[
  {
    "path": ".editorconfig",
    "content": "root = true\r\n\r\n[*]\r\nend_of_line = crlf\r\ninsert_final_newline = true\r\nindent_style = space\r\nindent_size = 4\r\n"
  },
  {
    "path": ".github/FUNDING.yml",
    "content": "# These are supported funding model platforms\n\ngithub: jogibear9988\npatreon: jogibear9988\n"
  },
  {
    "path": ".gitignore",
    "content": "# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)\n[Bb]in/\n[Oo]bj/\n\n# mstest test results\nTestResults\n\n## Ignore Visual Studio temporary files, build results, and\n## files generated by popular Visual Studio add-ons.\n\n# User-specific files\n.vs\n*.suo\n*.user\n*.sln.docstates\n\n# Build results\n[Dd]ebug/\n[Rr]elease/\nx64/\n*_i.c\n*_p.c\n*.ilk\n*.meta\n*.obj\n*.pch\n*.pdb\n*.pgc\n*.pgd\n*.rsp\n*.sbr\n*.tlb\n*.tli\n*.tlh\n*.tmp\n*.log\n*.vspscc\n*.vssscc\n.builds\n\n# Visual C++ cache files\nipch/\n*.aps\n*.ncb\n*.opensdf\n*.sdf\n\n# Visual Studio profiler\n*.psess\n*.vsp\n*.vspx\n\n# Guidance Automation Toolkit\n*.gpState\n\n# ReSharper is a .NET coding add-in\n_ReSharper*\n\n# NCrunch\n*.ncrunch*\n.*crunch*.local.xml\n\n# Installshield output folder \n[Ee]xpress\n\n# DocProject is a documentation generator add-in\nDocProject/buildhelp/\nDocProject/Help/*.HxT\nDocProject/Help/*.HxC\nDocProject/Help/*.hhc\nDocProject/Help/*.hhk\nDocProject/Help/*.hhp\nDocProject/Help/Html2\nDocProject/Help/html\n\n# Click-Once directory\npublish\n\n# Publish Web Output\n*.Publish.xml\n\n# NuGet Packages Directory\npackages\n*.nupkg\npackage/lib/\n\n# Windows Azure Build Output\ncsx\n*.build.csdef\n\n# Windows Store app package directory\nAppPackages/\n\n# Others\n[Bb]in\n[Oo]bj\nsql\nTestResults\n[Tt]est[Rr]esult*\n*.Cache\nClientBin\n[Ss]tyle[Cc]op.*\n~$*\n*.dbmdl\nGenerated_Code #added for RIA/Silverlight projects\n\n# Backup & report files from converting an old project file to a newer\n# Visual Studio version. Backup files are not needed, because we have git ;-)\n_UpgradeReport_Files/\nBackup*/\nUpgradeLog*.XML\n"
  },
  {
    "path": "README.md",
    "content": "DotNetProjects.Wpf.Toolkit\n==========================\n\nNews\n----\n\n!!NetCore 3 support!!\n\nNuget\n-----\n\nA Fork of the MS Wpf Toolkit, supporting NetCore3, splited in 4 Nugets:\n\nhttps://www.nuget.org/packages/DotNetProjects.WpfToolkit.Input/\nhttps://www.nuget.org/packages/DotNetProjects.WpfToolkit.Layout/\nhttps://www.nuget.org/packages/DotNetProjects.WpfToolkit.DataVisualization/\nhttps://www.nuget.org/packages/DotNetProjects.WpfToolkit.Themes/\n\nBe careful! The old nuget:\n\nhttps://www.nuget.org/packages/DotNetProjects.Wpf.Toolkit/\n\nis deprecated\n\nAnd these 4 ones:\n\nhttps://www.nuget.org/packages/DotNetProjects.Input.Toolkit/\nhttps://www.nuget.org/packages/DotNetProjects.Layout.Toolkit/\nhttps://www.nuget.org/packages/DotNetProjects.DataVisualization.Toolkit/\nhttps://www.nuget.org/packages/DotNetProjects.WPF.Themes/\n\nare renamed.\n\nInfo\n----\nwpf toolkit fork of the MS WPF Toolkit (https://wpf.codeplex.com/releases/view/40535)\n\nAdditional Features:\n\n  - Port to .NET 4.0\n  - Remove of Controls which exist already in .NET 4.0!\n  - Create Example for the Charting Controls\n  - Include of the WPF Theming Project\n  - splited into 4 nugets\n  \n  - Work on Bugfixes (if someone knows some)\n"
  },
  {
    "path": "WpfToolkit/AssemblyAttrs.cs",
    "content": "//---------------------------------------------------------------------------\r\n//\r\n// Copyright (C) Microsoft Corporation.  All rights reserved.\r\n//\r\n// This file specifies various assembly level attributes.\r\n//\r\n//---------------------------------------------------------------------------\r\n\r\nusing System;\r\nusing System.Resources;\r\nusing System.Security;\r\nusing System.Windows;\r\nusing System.Windows.Markup;\r\n\r\n// Needed to turn on checking of security critical call chains\r\n[assembly:SecurityCritical]\r\n\r\n// Needed to enable xbap scenarios\r\n[assembly:AllowPartiallyTrustedCallers]\r\n\r\n[assembly:CLSCompliant(true)]\r\n[assembly:NeutralResourcesLanguage(\"en-US\")]\r\n\r\n[assembly:ThemeInfo(\r\n    // Specifies the location of theme specific resources\r\n    ResourceDictionaryLocation.SourceAssembly,\r\n    // Specifies the location of non-theme specific resources:\r\n    ResourceDictionaryLocation.SourceAssembly)]\r\n\r\n[assembly:XmlnsDefinition(\"http://schemas.microsoft.com/wpf/2008/toolkit\", \"Microsoft.Windows.Controls\")]\r\n[assembly: XmlnsDefinition(\"http://schemas.microsoft.com/wpf/2008/toolkit\", \"Microsoft.Windows.Controls.Primitives\")]\r\n\r\n// This line adds the public classes in this assembly and the System.Windows namespace to \r\n// the default WPF namespace.  This makes it XAML compatible with Silverlight where VisualStateManager\r\n// is part of the default namespace.\r\n[assembly:XmlnsDefinition(\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\", \"System.Windows\")]\r\n\r\n"
  },
  {
    "path": "WpfToolkit/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\r\nusing System.Resources;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\nusing System.Windows;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"WPF Toolkit\")]\r\n[assembly: AssemblyDescription(\"\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyCompany(\"Microsoft Corp.\")]\r\n[assembly: AssemblyProduct(\"WPF Toolkit\")]\r\n[assembly: AssemblyCopyright(\"Copyright © 2010 Microsoft Corp. All rights reserved.\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// In order to begin building localizable applications, set \r\n// <UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file\r\n// inside a <PropertyGroup>.  For example, if you are using US english\r\n// in your source files, set the <UICulture> to en-US.  Then uncomment\r\n// the NeutralResourceLanguage attribute below.  Update the \"en-US\" in\r\n// the line below to match the UICulture setting in the project file.\r\n\r\n// [assembly: NeutralResourcesLanguage(\"en-US\", UltimateResourceFallbackLocation.Satellite)]\r\n\r\n// Version information for an assembly consists of the following four values:\r\n//\r\n//      Major Version\r\n//      Minor Version \r\n//      Build Number\r\n//      Revision\r\n//\r\n// You can specify all the values or you can default the Build and Revision Numbers \r\n// by using the '*' as shown below:\r\n// [assembly: AssemblyVersion(\"1.0.*\")]\r\n[assembly: AssemblyVersion(\"5.0.*\")]\r\n[assembly: AssemblyFileVersion(\"5.0.*\")]\r\n"
  },
  {
    "path": "WpfToolkit/Calendar/Microsoft/Windows/Automation/Peers/CalendarAutomationPeer.cs",
    "content": "﻿//---------------------------------------------------------------------------\r\n//\r\n// Copyright (C) Microsoft Corporation.  All rights reserved.\r\n//\r\n//---------------------------------------------------------------------------\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Windows;\r\nusing System.Windows.Automation;\r\nusing System.Windows.Automation.Peers;\r\nusing System.Windows.Automation.Provider;\r\nusing System.Windows.Controls;\r\nusing Microsoft.Windows.Controls;\r\nusing Microsoft.Windows.Controls.Primitives;\r\n\r\nnamespace Microsoft.Windows.Automation.Peers\r\n{\r\n    /// <summary>\r\n    /// AutomationPeer for Calendar Control\r\n    /// </summary>\r\n    public sealed class CalendarAutomationPeer : FrameworkElementAutomationPeer, IGridProvider, IMultipleViewProvider, ISelectionProvider, ITableProvider\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the CalendarAutomationPeer class.\r\n        /// </summary>\r\n        /// <param name=\"owner\">Owning Calendar</param>\r\n        public CalendarAutomationPeer(Calendar owner)\r\n            : base(owner)\r\n        {\r\n        }\r\n\r\n        #region Private Properties\r\n\r\n        private Calendar OwningCalendar\r\n        {\r\n            get\r\n            {\r\n                return this.Owner as Calendar;\r\n            }\r\n        }\r\n\r\n        private Grid OwningGrid\r\n        {\r\n            get\r\n            {\r\n                if (this.OwningCalendar != null && this.OwningCalendar.MonthControl != null)\r\n                {\r\n                    if (this.OwningCalendar.DisplayMode == CalendarMode.Month)\r\n                    {\r\n                        return this.OwningCalendar.MonthControl.MonthView;\r\n                    }\r\n                    else\r\n                    {\r\n                        return this.OwningCalendar.MonthControl.YearView;\r\n                    }\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        #endregion Private Properties\r\n\r\n        #region Public Methods\r\n\r\n        /// <summary>\r\n        /// Gets the control pattern that is associated with the specified System.Windows.Automation.Peers.PatternInterface.\r\n        /// </summary>\r\n        /// <param name=\"patternInterface\">A value from the System.Windows.Automation.Peers.PatternInterface enumeration.</param>\r\n        /// <returns>The object that supports the specified pattern, or null if unsupported.</returns>\r\n        public override object GetPattern(PatternInterface patternInterface)\r\n        {\r\n            switch (patternInterface)\r\n            {\r\n                case PatternInterface.Grid:\r\n                case PatternInterface.Table:\r\n                case PatternInterface.MultipleView:\r\n                case PatternInterface.Selection:\r\n                    {\r\n                        if (this.OwningGrid != null)\r\n                        {\r\n                            return this;\r\n                        }\r\n\r\n                        break;\r\n                    }\r\n\r\n                default: break;\r\n            }\r\n\r\n            return base.GetPattern(patternInterface);\r\n        }\r\n\r\n        #endregion Public Methods\r\n\r\n        #region Protected Methods\r\n\r\n        /// <summary>\r\n        /// Gets the control type for the element that is associated with the UI Automation peer.\r\n        /// </summary>\r\n        /// <returns>The control type.</returns>\r\n        protected override AutomationControlType GetAutomationControlTypeCore()\r\n        {\r\n            return AutomationControlType.Calendar;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called by GetClassName that gets a human readable name that, in addition to AutomationControlType, \r\n        /// differentiates the control represented by this AutomationPeer.\r\n        /// </summary>\r\n        /// <returns>The string that contains the name.</returns>\r\n        protected override string GetClassNameCore()\r\n        {\r\n            return this.Owner.GetType().Name;\r\n        }\r\n\r\n        #endregion Protected Methods\r\n\r\n        #region InternalMethods\r\n\r\n        internal void RaiseSelectionEvents(SelectionChangedEventArgs e)\r\n        {\r\n            int numSelected = this.OwningCalendar.SelectedDates.Count;\r\n            int numAdded = e.AddedItems.Count;\r\n\r\n            if (AutomationPeer.ListenerExists(AutomationEvents.SelectionItemPatternOnElementSelected) && numSelected == 1 && numAdded == 1)\r\n            {\r\n                CalendarDayButton selectedButton = this.OwningCalendar.FindDayButtonFromDay((DateTime)e.AddedItems[0]);\r\n\r\n                if (selectedButton != null)\r\n                {\r\n                    AutomationPeer peer = FrameworkElementAutomationPeer.FromElement(selectedButton);\r\n\r\n                    if (peer != null)\r\n                    {\r\n                        peer.RaiseAutomationEvent(AutomationEvents.SelectionItemPatternOnElementSelected);\r\n                    }\r\n                }\r\n            }\r\n            else\r\n            {\r\n                if (AutomationPeer.ListenerExists(AutomationEvents.SelectionItemPatternOnElementAddedToSelection))\r\n                {\r\n                    foreach (DateTime date in e.AddedItems)\r\n                    {\r\n                        CalendarDayButton selectedButton = this.OwningCalendar.FindDayButtonFromDay(date);\r\n\r\n                        if (selectedButton != null)\r\n                        {\r\n                            AutomationPeer peer = FrameworkElementAutomationPeer.FromElement(selectedButton);\r\n\r\n                            if (peer != null)\r\n                            {\r\n                                peer.RaiseAutomationEvent(AutomationEvents.SelectionItemPatternOnElementAddedToSelection);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (AutomationPeer.ListenerExists(AutomationEvents.SelectionItemPatternOnElementRemovedFromSelection))\r\n                {\r\n                    foreach (DateTime date in e.RemovedItems)\r\n                    {\r\n                        CalendarDayButton removedButton = this.OwningCalendar.FindDayButtonFromDay(date);\r\n\r\n                        if (removedButton != null)\r\n                        {\r\n                            AutomationPeer peer = FrameworkElementAutomationPeer.FromElement(removedButton);\r\n\r\n                            if (peer != null)\r\n                            {\r\n                                peer.RaiseAutomationEvent(AutomationEvents.SelectionItemPatternOnElementRemovedFromSelection);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        #endregion InternalMethods\r\n\r\n        #region IGridProvider\r\n\r\n        int IGridProvider.ColumnCount\r\n        {\r\n            get\r\n            {\r\n                if (this.OwningGrid != null)\r\n                {\r\n                    return this.OwningGrid.ColumnDefinitions.Count;\r\n                }\r\n\r\n                return 0;\r\n            }\r\n        }\r\n\r\n        int IGridProvider.RowCount\r\n        {\r\n            get\r\n            {\r\n                if (this.OwningGrid != null)\r\n                {\r\n                    if (this.OwningCalendar.DisplayMode == CalendarMode.Month)\r\n                    {\r\n                        // In Month DisplayMode, since first row is DayTitles, we return the RowCount-1\r\n                        return Math.Max(0, this.OwningGrid.RowDefinitions.Count - 1);\r\n                    }\r\n                    else\r\n                    {\r\n                        return this.OwningGrid.RowDefinitions.Count;\r\n                    }\r\n                }\r\n\r\n                return 0;\r\n            }\r\n        }\r\n\r\n        IRawElementProviderSimple IGridProvider.GetItem(int row, int column)\r\n        {\r\n            if (this.OwningCalendar.DisplayMode == CalendarMode.Month)\r\n            {\r\n                // In Month DisplayMode, since first row is DayTitles, we increment the row number by 1\r\n                row++;\r\n            }\r\n\r\n            if (this.OwningGrid != null && row >= 0 && row < this.OwningGrid.RowDefinitions.Count && column >= 0 && column < this.OwningGrid.ColumnDefinitions.Count)\r\n            {\r\n                foreach (UIElement child in this.OwningGrid.Children)\r\n                {\r\n                    int childRow = (int)child.GetValue(Grid.RowProperty);\r\n                    int childColumn = (int)child.GetValue(Grid.ColumnProperty);\r\n                    if (childRow == row && childColumn == column)\r\n                    {\r\n                        AutomationPeer peer = CreatePeerForElement(child);\r\n                        if (peer != null)\r\n                        {\r\n                            return ProviderFromPeer(peer);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        #endregion IGridProvider\r\n\r\n        #region IMultipleViewProvider\r\n\r\n        int IMultipleViewProvider.CurrentView \r\n        { \r\n            get \r\n            { \r\n                return (int)this.OwningCalendar.DisplayMode; \r\n            } \r\n        }\r\n\r\n        int[] IMultipleViewProvider.GetSupportedViews()\r\n        {\r\n            int[] supportedViews = new int[3];\r\n\r\n            supportedViews[0] = (int)CalendarMode.Month;\r\n            supportedViews[1] = (int)CalendarMode.Year;\r\n            supportedViews[2] = (int)CalendarMode.Decade;\r\n\r\n            return supportedViews;\r\n        }\r\n\r\n        string IMultipleViewProvider.GetViewName(int viewId)\r\n        {\r\n            switch (viewId)\r\n            {\r\n                case 0:\r\n                    {\r\n                        return SR.Get(SRID.CalendarAutomationPeer_MonthMode);\r\n                    }\r\n\r\n                case 1:\r\n                    {\r\n                        return SR.Get(SRID.CalendarAutomationPeer_YearMode);\r\n                    }\r\n\r\n                case 2:\r\n                    {\r\n                        return SR.Get(SRID.CalendarAutomationPeer_DecadeMode);\r\n                    }\r\n            }\r\n\r\n            // TODO: update when Jolt 23302 is fixed\r\n            // throw new ArgumentOutOfRangeException(\"viewId\", Resource.Calendar_OnDisplayModePropertyChanged_InvalidValue);\r\n            return String.Empty;\r\n        }\r\n\r\n        void IMultipleViewProvider.SetCurrentView(int viewId)\r\n        {\r\n            this.OwningCalendar.DisplayMode = (CalendarMode)viewId;\r\n        }\r\n\r\n        #endregion IMultipleViewProvider\r\n\r\n        #region ISelectionProvider\r\n\r\n        bool ISelectionProvider.CanSelectMultiple\r\n        {\r\n            get\r\n            {\r\n                return this.OwningCalendar.SelectionMode == CalendarSelectionMode.SingleRange || this.OwningCalendar.SelectionMode == CalendarSelectionMode.MultipleRange;\r\n            }\r\n        }\r\n\r\n        bool ISelectionProvider.IsSelectionRequired \r\n        { \r\n            get \r\n            { \r\n                return false; \r\n            } \r\n        }\r\n\r\n        IRawElementProviderSimple[] ISelectionProvider.GetSelection()\r\n        {\r\n            List<IRawElementProviderSimple> providers = new List<IRawElementProviderSimple>();\r\n\r\n            if (this.OwningGrid != null)\r\n            {\r\n                if (this.OwningCalendar.DisplayMode == CalendarMode.Month && this.OwningCalendar.SelectedDates != null && this.OwningCalendar.SelectedDates.Count != 0)\r\n                {\r\n                    // return selected DayButtons\r\n                    CalendarDayButton dayButton;\r\n\r\n                    foreach (UIElement child in this.OwningGrid.Children)\r\n                    {\r\n                        int childRow = (int)child.GetValue(Grid.RowProperty);\r\n\r\n                        if (childRow != 0)\r\n                        {\r\n                            dayButton = child as CalendarDayButton;\r\n\r\n                            if (dayButton != null && dayButton.IsSelected)\r\n                            {\r\n                                AutomationPeer peer = CreatePeerForElement(dayButton);\r\n\r\n                                if (peer != null)\r\n                                {\r\n                                    providers.Add(ProviderFromPeer(peer));\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    // return the CalendarButton which has focus\r\n                    CalendarButton calendarButton;\r\n\r\n                    foreach (UIElement child in this.OwningGrid.Children)\r\n                    {\r\n                        calendarButton = child as CalendarButton;\r\n\r\n                        if (calendarButton != null && calendarButton.IsFocused)\r\n                        {\r\n                            AutomationPeer peer = CreatePeerForElement(calendarButton);\r\n\r\n                            if (peer != null)\r\n                            {\r\n                                providers.Add(ProviderFromPeer(peer));\r\n                            }\r\n\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (providers.Count > 0)\r\n                {\r\n                    return providers.ToArray();\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        #endregion ISelectionProvider\r\n\r\n        #region ITableProvider\r\n\r\n        RowOrColumnMajor ITableProvider.RowOrColumnMajor\r\n        {\r\n            get\r\n            {\r\n                return RowOrColumnMajor.RowMajor;\r\n            }\r\n        }\r\n\r\n        IRawElementProviderSimple[] ITableProvider.GetColumnHeaders()\r\n        {\r\n            if (this.OwningCalendar.DisplayMode == CalendarMode.Month)\r\n            {\r\n                List<IRawElementProviderSimple> providers = new List<IRawElementProviderSimple>();\r\n\r\n                foreach (UIElement child in this.OwningGrid.Children)\r\n                {\r\n                    int childRow = (int)child.GetValue(Grid.RowProperty);\r\n\r\n                    if (childRow == 0)\r\n                    {\r\n                        AutomationPeer peer = CreatePeerForElement(child);\r\n\r\n                        if (peer != null)\r\n                        {\r\n                            providers.Add(ProviderFromPeer(peer));\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (providers.Count > 0)\r\n                {\r\n                    return providers.ToArray();\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        // If WeekNumber functionality is supported by Calendar in the future,\r\n        // this method should return weeknumbers\r\n        IRawElementProviderSimple[] ITableProvider.GetRowHeaders()\r\n        {\r\n            return null;\r\n        }\r\n\r\n        #endregion ITableProvider\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Calendar/Microsoft/Windows/Automation/Peers/CalendarButtonAutomationPeer.cs",
    "content": "﻿//---------------------------------------------------------------------------\r\n//\r\n// Copyright (C) Microsoft Corporation.  All rights reserved.\r\n//\r\n//---------------------------------------------------------------------------\r\n\r\nusing System;\r\nusing System.Windows.Automation;\r\nusing System.Windows.Automation.Peers;\r\nusing System.Windows.Automation.Provider;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing Microsoft.Windows.Controls;\r\nusing Microsoft.Windows.Controls.Primitives;\r\n\r\nnamespace Microsoft.Windows.Automation.Peers\r\n{\r\n    /// <summary>\r\n    /// AutomationPeer for CalendarButton\r\n    /// </summary>\r\n    public sealed class CalendarButtonAutomationPeer : ButtonAutomationPeer, IGridItemProvider, ISelectionItemProvider\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the CalendarButtonAutomationPeer class.\r\n        /// </summary>\r\n        /// <param name=\"owner\">Owning CalendarButton</param>\r\n        public CalendarButtonAutomationPeer(CalendarButton owner)\r\n            : base(owner)\r\n        {\r\n        }\r\n\r\n        #region Private Properties\r\n\r\n        private Calendar OwningCalendar\r\n        {\r\n            get\r\n            {\r\n                return this.OwningCalendarButton.Owner;\r\n            }\r\n        }\r\n\r\n        private IRawElementProviderSimple OwningCalendarAutomationPeer\r\n        {\r\n            get\r\n            {\r\n                if (this.OwningCalendar != null)\r\n                {\r\n                    AutomationPeer peer = CreatePeerForElement(this.OwningCalendar);\r\n\r\n                    if (peer != null)\r\n                    {\r\n                        return ProviderFromPeer(peer);\r\n                    }\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        private CalendarButton OwningCalendarButton\r\n        {\r\n            get\r\n            {\r\n                return this.Owner as CalendarButton;\r\n            }\r\n        }\r\n\r\n        private DateTime? Date\r\n        {\r\n            get\r\n            {\r\n                if (this.OwningCalendarButton != null && this.OwningCalendarButton.DataContext is DateTime)\r\n                {\r\n                    return (DateTime?)this.OwningCalendarButton.DataContext;\r\n                }\r\n                else\r\n                {\r\n                    return null;\r\n                }\r\n            }\r\n        }\r\n\r\n        #endregion Private Properties\r\n\r\n        #region Public Methods\r\n\r\n        /// <summary>\r\n        /// Gets the control pattern that is associated with the specified System.Windows.Automation.Peers.PatternInterface.\r\n        /// </summary>\r\n        /// <param name=\"patternInterface\">A value from the System.Windows.Automation.Peers.PatternInterface enumeration.</param>\r\n        /// <returns>The object that supports the specified pattern, or null if unsupported.</returns>\r\n        public override object GetPattern(PatternInterface patternInterface)\r\n        {\r\n            object result = null;\r\n\r\n            switch (patternInterface)\r\n            {\r\n                case PatternInterface.SelectionItem:\r\n                case PatternInterface.GridItem:\r\n                    {\r\n                        if (this.OwningCalendar != null && this.OwningCalendar.MonthControl != null && this.OwningCalendarButton != null)\r\n                        {\r\n                            result = this;\r\n                        }\r\n                        else\r\n                        {\r\n                            result = base.GetPattern(patternInterface);\r\n                        }\r\n\r\n                        break;\r\n                    }\r\n\r\n                default:\r\n                    {\r\n                        result = base.GetPattern(patternInterface);\r\n                        break;\r\n                    }\r\n            }\r\n\r\n            return result;\r\n        }\r\n\r\n        #endregion Public methods\r\n\r\n        #region Protected Methods\r\n\r\n        /// <summary>\r\n        /// Gets the control type for the element that is associated with the UI Automation peer.\r\n        /// </summary>\r\n        /// <returns>The control type.</returns>\r\n        protected override AutomationControlType GetAutomationControlTypeCore()\r\n        {\r\n            return AutomationControlType.Button;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called by GetClassName that gets a human readable name that, in addition to AutomationControlType, \r\n        /// differentiates the control represented by this AutomationPeer.\r\n        /// </summary>\r\n        /// <returns>The string that contains the name.</returns>\r\n        protected override string GetClassNameCore()\r\n        {\r\n            return Owner.GetType().Name;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Overrides the GetLocalizedControlTypeCore method for CalendarButtonAutomationPeer\r\n        /// </summary>\r\n        /// <returns></returns>\r\n        protected override string GetLocalizedControlTypeCore()\r\n        {\r\n            return SR.Get(SRID.CalendarAutomationPeer_CalendarButtonLocalizedControlType);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Overrides the GetHelpTextCore method for CalendarButtonAutomationPeer\r\n        /// </summary>\r\n        /// <returns></returns>\r\n        protected override string GetHelpTextCore()\r\n        {\r\n            DateTime? date = this.Date;\r\n            return date.HasValue ? DateTimeHelper.ToLongDateString(date, DateTimeHelper.GetCulture(this.OwningCalendarButton)) : base.GetHelpTextCore();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Overrides the GetNameCore method for CalendarButtonAutomationPeer\r\n        /// </summary>\r\n        /// <returns></returns>\r\n        protected override string GetNameCore()\r\n        {\r\n            DateTime? date = this.Date;\r\n            if (date.HasValue)\r\n            {\r\n                if (this.OwningCalendar.DisplayMode == CalendarMode.Decade)\r\n                {\r\n                    return DateTimeHelper.ToYearString(date, DateTimeHelper.GetCulture(this.OwningCalendarButton));\r\n                }\r\n                else\r\n                {\r\n                    return DateTimeHelper.ToYearMonthPatternString(date, DateTimeHelper.GetCulture(this.OwningCalendarButton));\r\n                }\r\n            }\r\n            else\r\n            {\r\n                return base.GetNameCore();\r\n            }\r\n        }\r\n\r\n        #endregion Protected Methods\r\n\r\n        #region IGridItemProvider\r\n\r\n        int IGridItemProvider.Column\r\n        {\r\n            get\r\n            {\r\n                return (int)this.OwningCalendarButton.GetValue(Grid.ColumnProperty);\r\n            }\r\n        }\r\n\r\n        int IGridItemProvider.ColumnSpan \r\n        {\r\n            get\r\n            {\r\n                return (int)this.OwningCalendarButton.GetValue(Grid.ColumnSpanProperty);\r\n            }\r\n        }\r\n\r\n        IRawElementProviderSimple IGridItemProvider.ContainingGrid\r\n        {\r\n            get\r\n            {\r\n                return this.OwningCalendarAutomationPeer;\r\n            }\r\n        }\r\n\r\n        int IGridItemProvider.Row\r\n        {\r\n            get\r\n            {\r\n                return (int)this.OwningCalendarButton.GetValue(Grid.RowSpanProperty);\r\n            }\r\n        }\r\n\r\n        int IGridItemProvider.RowSpan \r\n        { \r\n            get \r\n            { \r\n                return 1; \r\n            } \r\n        }\r\n\r\n        #endregion IGridItemProvider\r\n\r\n        #region ISelectionItemProvider\r\n\r\n        bool ISelectionItemProvider.IsSelected \r\n        { \r\n            get \r\n            { \r\n                return this.OwningCalendarButton.IsFocused; \r\n            } \r\n        }\r\n\r\n        IRawElementProviderSimple ISelectionItemProvider.SelectionContainer\r\n        {\r\n            get\r\n            {\r\n                return this.OwningCalendarAutomationPeer;\r\n            }\r\n        }\r\n\r\n        void ISelectionItemProvider.AddToSelection()\r\n        {\r\n            return;\r\n        }\r\n\r\n        void ISelectionItemProvider.RemoveFromSelection()\r\n        {\r\n            return;\r\n        }\r\n\r\n        void ISelectionItemProvider.Select()\r\n        {\r\n            if (this.OwningCalendarButton.IsEnabled)\r\n            {\r\n                this.OwningCalendarButton.MoveFocus(new TraversalRequest(FocusNavigationDirection.First));\r\n            }\r\n            else\r\n            {\r\n                throw new ElementNotEnabledException();\r\n            }\r\n        }\r\n\r\n        #endregion ISelectionItemProvider\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Calendar/Microsoft/Windows/Automation/Peers/CalendarDayButtonAutomationPeer.cs",
    "content": "﻿//---------------------------------------------------------------------------\r\n//\r\n// Copyright (C) Microsoft Corporation.  All rights reserved.\r\n//\r\n//---------------------------------------------------------------------------\r\n\r\nusing System;\r\nusing System.Diagnostics;\r\nusing System.Windows;\r\nusing System.Windows.Automation;\r\nusing System.Windows.Automation.Peers;\r\nusing System.Windows.Automation.Provider;\r\nusing System.Windows.Controls;\r\nusing Microsoft.Windows.Controls;\r\nusing Microsoft.Windows.Controls.Primitives;\r\n\r\nnamespace Microsoft.Windows.Automation.Peers\r\n{\r\n    /// <summary>\r\n    /// AutomationPeer for CalendarDayButton\r\n    /// </summary>\r\n    public sealed class CalendarDayButtonAutomationPeer : ButtonAutomationPeer, IGridItemProvider, ISelectionItemProvider, ITableItemProvider\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the CalendarDayButtonAutomationPeer class.\r\n        /// </summary>\r\n        /// <param name=\"owner\">Owning CalendarDayButton</param>\r\n        public CalendarDayButtonAutomationPeer(CalendarDayButton owner)\r\n            : base(owner)\r\n        {\r\n        }\r\n\r\n        #region Private Properties\r\n\r\n        private Microsoft.Windows.Controls.Calendar OwningCalendar\r\n        {\r\n            get\r\n            {\r\n                return this.OwningCalendarDayButton.Owner;\r\n            }\r\n        }\r\n\r\n        private IRawElementProviderSimple OwningCalendarAutomationPeer\r\n        {\r\n            get\r\n            {\r\n                if (this.OwningCalendar != null)\r\n                {\r\n                    AutomationPeer peer = CreatePeerForElement(this.OwningCalendar);\r\n\r\n                    if (peer != null)\r\n                    {\r\n                        return ProviderFromPeer(peer);\r\n                    }\r\n                }\r\n\r\n                return null;\r\n            }\r\n        }\r\n\r\n        private CalendarDayButton OwningCalendarDayButton\r\n        {\r\n            get\r\n            {\r\n                return this.Owner as CalendarDayButton;\r\n            }\r\n        }\r\n\r\n        private DateTime? Date\r\n        {\r\n            get\r\n            {\r\n                if (this.OwningCalendarDayButton != null && this.OwningCalendarDayButton.DataContext is DateTime)\r\n                {\r\n                    return (DateTime?)this.OwningCalendarDayButton.DataContext;\r\n                }\r\n                else\r\n                {\r\n                    return null;\r\n                }\r\n            }\r\n        }\r\n\r\n        #endregion Private Properties\r\n\r\n        #region Public Methods\r\n\r\n        /// <summary>\r\n        /// Gets the control pattern that is associated with the specified System.Windows.Automation.Peers.PatternInterface.\r\n        /// </summary>\r\n        /// <param name=\"patternInterface\">A value from the System.Windows.Automation.Peers.PatternInterface enumeration.</param>\r\n        /// <returns>The object that supports the specified pattern, or null if unsupported.</returns>\r\n        public override object GetPattern(PatternInterface patternInterface)\r\n        {\r\n            object result = null;\r\n\r\n            switch (patternInterface)\r\n            {\r\n                case PatternInterface.SelectionItem:\r\n                case PatternInterface.GridItem:\r\n                case PatternInterface.TableItem:\r\n                {\r\n                    if (this.OwningCalendar != null && this.OwningCalendarDayButton != null)\r\n                    {\r\n                        result = this;\r\n                    }\r\n                    else\r\n                    {\r\n                        result = base.GetPattern(patternInterface);\r\n                    }\r\n\r\n                    break;\r\n                }\r\n\r\n                default:\r\n                {\r\n                    result = base.GetPattern(patternInterface);\r\n                    break;\r\n                }\r\n            }\r\n\r\n            return result;\r\n        }\r\n\r\n        #endregion Public Methods\r\n\r\n        #region Protected Methods\r\n\r\n        /// <summary>\r\n        /// Gets the control type for the element that is associated with the UI Automation peer.\r\n        /// </summary>\r\n        /// <returns>The control type.</returns>\r\n        protected override AutomationControlType GetAutomationControlTypeCore()\r\n        {\r\n            return AutomationControlType.Button;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called by GetClassName that gets a human readable name that, in addition to AutomationControlType, \r\n        /// differentiates the control represented by this AutomationPeer.\r\n        /// </summary>\r\n        /// <returns>The string that contains the name.</returns>\r\n        protected override string GetClassNameCore()\r\n        {\r\n            return Owner.GetType().Name;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Overrides the GetHelpTextCore method for CalendarDayButtonAutomationPeer\r\n        /// </summary>\r\n        /// <returns></returns>\r\n        protected override string GetHelpTextCore()\r\n        {\r\n            DateTime? date = this.Date;\r\n            if (date.HasValue)\r\n            {\r\n                string dateString = DateTimeHelper.ToLongDateString(Date, DateTimeHelper.GetCulture(this.OwningCalendarDayButton));\r\n\r\n                if (this.OwningCalendarDayButton.IsBlackedOut)\r\n                {\r\n                    return string.Format(DateTimeHelper.GetCurrentDateFormat(), SR.Get(SRID.CalendarAutomationPeer_BlackoutDayHelpText), dateString);\r\n                }\r\n                else\r\n                {\r\n                    return dateString;\r\n                }\r\n            }\r\n            else\r\n            {\r\n                return base.GetHelpTextCore();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Overrides the GetLocalizedControlTypeCore method for CalendarDayButtonAutomationPeer\r\n        /// </summary>\r\n        /// <returns></returns>\r\n        protected override string GetLocalizedControlTypeCore()\r\n        {\r\n            return SR.Get(SRID.CalendarAutomationPeer_DayButtonLocalizedControlType);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Overrides the GetNameCore method for CalendarDayButtonAutomationPeer\r\n        /// </summary>\r\n        /// <returns></returns>\r\n        protected override string GetNameCore()\r\n        {\r\n            DateTime? date = this.Date;\r\n            return date.HasValue ? DateTimeHelper.ToLongDateString(Date, DateTimeHelper.GetCulture(this.OwningCalendarDayButton)) : base.GetNameCore();\r\n        }\r\n\r\n        #endregion Protected Methods\r\n\r\n        #region IGridItemProvider\r\n\r\n        /// <summary>\r\n        /// Grid item column.\r\n        /// </summary>\r\n        int IGridItemProvider.Column\r\n        {\r\n            get\r\n            {\r\n                return (int)this.OwningCalendarDayButton.GetValue(Grid.ColumnProperty);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Grid item column span.\r\n        /// </summary>\r\n        int IGridItemProvider.ColumnSpan\r\n        {\r\n            get { return (int)this.OwningCalendarDayButton.GetValue(Grid.ColumnSpanProperty); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Grid item's containing grid.\r\n        /// </summary>\r\n        IRawElementProviderSimple IGridItemProvider.ContainingGrid\r\n        {\r\n            get\r\n            {\r\n                return this.OwningCalendarAutomationPeer;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Grid item row.\r\n        /// </summary>\r\n        int IGridItemProvider.Row\r\n        {\r\n            get\r\n            {                \r\n                Debug.Assert((int)this.OwningCalendarDayButton.GetValue(Grid.RowProperty) > 0);\r\n\r\n                // we decrement the Row value by one since the first row is composed of DayTitles\r\n                return (int)this.OwningCalendarDayButton.GetValue(Grid.RowProperty) - 1;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Grid item row span.\r\n        /// </summary>\r\n        int IGridItemProvider.RowSpan\r\n        {\r\n            get\r\n            {\r\n                return (int)this.OwningCalendarDayButton.GetValue(Grid.RowSpanProperty);\r\n            }\r\n        }\r\n\r\n        #endregion IGridItemProvider\r\n\r\n        #region ISelectionItemProvider\r\n\r\n        /// <summary>\r\n        /// True if the owning CalendarDayButton is selected.\r\n        /// </summary>\r\n        bool ISelectionItemProvider.IsSelected \r\n        { \r\n            get \r\n            { \r\n                return this.OwningCalendarDayButton.IsSelected; \r\n            } \r\n        }\r\n\r\n        /// <summary>\r\n        /// Selection items selection container.\r\n        /// </summary>\r\n        IRawElementProviderSimple ISelectionItemProvider.SelectionContainer\r\n        {\r\n            get\r\n            {\r\n                return this.OwningCalendarAutomationPeer;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Adds selection item to selection.\r\n        /// </summary>\r\n        void ISelectionItemProvider.AddToSelection()\r\n        {\r\n            // Return if the item is already selected or a day is already selected in the SingleSelectionMode\r\n            if (((ISelectionItemProvider)this).IsSelected)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (EnsureSelection() && this.OwningCalendarDayButton.DataContext is DateTime)\r\n            {\r\n                if (this.OwningCalendar.SelectionMode == CalendarSelectionMode.SingleDate)\r\n                {\r\n                    this.OwningCalendar.SelectedDate = (DateTime)this.OwningCalendarDayButton.DataContext;\r\n                }\r\n                else\r\n                {\r\n                    this.OwningCalendar.SelectedDates.Add((DateTime)this.OwningCalendarDayButton.DataContext);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes selection item from selection.\r\n        /// </summary>\r\n        void ISelectionItemProvider.RemoveFromSelection()\r\n        {\r\n            // Return if the item is not already selected.\r\n            if (!((ISelectionItemProvider)this).IsSelected)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (this.OwningCalendarDayButton.DataContext is DateTime)\r\n            {\r\n                this.OwningCalendar.SelectedDates.Remove((DateTime)this.OwningCalendarDayButton.DataContext);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Selects this item.\r\n        /// </summary>\r\n        void ISelectionItemProvider.Select()\r\n        {\r\n            if (EnsureSelection())\r\n            {\r\n                this.OwningCalendar.SelectedDates.Clear();\r\n\r\n                if (this.OwningCalendarDayButton.DataContext is DateTime)\r\n                {\r\n                    this.OwningCalendar.SelectedDates.Add((DateTime)this.OwningCalendarDayButton.DataContext);\r\n                }\r\n            }\r\n        }\r\n\r\n        #endregion ISelectionItemProvider\r\n\r\n        #region ITableItemProvider\r\n\r\n        /// <summary>\r\n        /// Gets the table item's column headers.\r\n        /// </summary>\r\n        /// <returns>The table item's column headers</returns>\r\n        IRawElementProviderSimple[] ITableItemProvider.GetColumnHeaderItems()\r\n        {\r\n            if (this.OwningCalendar != null && this.OwningCalendarAutomationPeer != null)\r\n            {\r\n                IRawElementProviderSimple[] headers = ((ITableProvider)CreatePeerForElement(this.OwningCalendar)).GetColumnHeaders();\r\n\r\n                if (headers != null)\r\n                {\r\n                    int column = ((IGridItemProvider)this).Column;\r\n                    return new IRawElementProviderSimple[] { headers[column] };\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Get's the table item's row headers.\r\n        /// </summary>\r\n        /// <returns>The table item's row headers</returns>\r\n        IRawElementProviderSimple[] ITableItemProvider.GetRowHeaderItems()\r\n        {\r\n            return null;\r\n        }\r\n\r\n        #endregion ITableItemProvider\r\n\r\n        #region Private Methods\r\n\r\n        private bool EnsureSelection()\r\n        {\r\n            if (!this.OwningCalendarDayButton.IsEnabled)\r\n            {\r\n                throw new ElementNotEnabledException();\r\n            }\r\n\r\n            // If the day is a blackout day or the SelectionMode is None, selection is not allowed\r\n            if (this.OwningCalendarDayButton.IsBlackedOut ||\r\n                this.OwningCalendar.SelectionMode == CalendarSelectionMode.None)\r\n            {\r\n                return false;\r\n            }\r\n\r\n            return true;\r\n        }\r\n\r\n        #endregion Private Methods\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Calendar/Microsoft/Windows/Controls/Calendar.cs",
    "content": "﻿//---------------------------------------------------------------------------\r\n//\r\n// Copyright (C) Microsoft Corporation.  All rights reserved.\r\n//\r\n//---------------------------------------------------------------------------\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Windows;\r\nusing System.Windows.Automation.Peers;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing Microsoft.Windows.Automation.Peers;\r\nusing Microsoft.Windows.Controls.Primitives;\r\n\r\nnamespace Microsoft.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Represents a control that enables a user to select a date by using a visual calendar display. \r\n    /// </summary>\r\n    [TemplatePart(Name = Calendar.ElementRoot, Type = typeof(Panel))]\r\n    [TemplatePart(Name = Calendar.ElementMonth, Type = typeof(CalendarItem))]\r\n    public class Calendar : Control\r\n    {\r\n        #region Constants\r\n\r\n        private const string ElementRoot = \"PART_Root\";\r\n        private const string ElementMonth = \"PART_CalendarItem\";\r\n\r\n        private const int COLS = 7;\r\n        private const int ROWS = 7;\r\n        private const int YEAR_ROWS = 3;\r\n        private const int YEAR_COLS = 4;\r\n        private const int YEARS_PER_DECADE = 10;\r\n\r\n        #endregion Constants\r\n\r\n        #region Data\r\n        private DateTime? _hoverStart;\r\n        private DateTime? _hoverEnd;\r\n        private bool _isShiftPressed;\r\n        private DateTime? _currentDate;\r\n        private CalendarItem _monthControl;\r\n        private CalendarBlackoutDatesCollection _blackoutDates;\r\n        private SelectedDatesCollection _selectedDates;\r\n\r\n        #endregion Data\r\n\r\n        #region Public Events\r\n\r\n        public static readonly RoutedEvent SelectedDatesChangedEvent = EventManager.RegisterRoutedEvent(\"SelectedDatesChanged\", RoutingStrategy.Direct, typeof(EventHandler<SelectionChangedEventArgs>), typeof(Calendar));\r\n\r\n        /// <summary>\r\n        /// Occurs when a date is selected.\r\n        /// </summary>\r\n        public event EventHandler<SelectionChangedEventArgs> SelectedDatesChanged\r\n        {\r\n            add { AddHandler(SelectedDatesChangedEvent, value); }\r\n            remove { RemoveHandler(SelectedDatesChangedEvent, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Occurs when the DisplayDate property is changed.\r\n        /// </summary>\r\n        public event EventHandler<CalendarDateChangedEventArgs> DisplayDateChanged;\r\n\r\n        /// <summary>\r\n        /// Occurs when the DisplayMode property is changed. \r\n        /// </summary>\r\n        public event EventHandler<CalendarModeChangedEventArgs> DisplayModeChanged;\r\n\r\n        /// <summary>\r\n        /// Occurs when the SelectionMode property is changed. \r\n        /// </summary>\r\n        public event EventHandler<EventArgs> SelectionModeChanged;\r\n\r\n        #endregion Public Events\r\n\r\n        /// <summary>\r\n        /// Static constructor\r\n        /// </summary>\r\n        static Calendar()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(Calendar), new FrameworkPropertyMetadata(typeof(Calendar)));\r\n            KeyboardNavigation.TabNavigationProperty.OverrideMetadata(typeof(Calendar), new FrameworkPropertyMetadata(KeyboardNavigationMode.Once));\r\n            KeyboardNavigation.DirectionalNavigationProperty.OverrideMetadata(typeof(Calendar), new FrameworkPropertyMetadata(KeyboardNavigationMode.Contained));\r\n\r\n            EventManager.RegisterClassHandler(typeof(Calendar), UIElement.GotFocusEvent, new RoutedEventHandler(OnGotFocus));\r\n            LanguageProperty.OverrideMetadata(typeof(Calendar), new FrameworkPropertyMetadata(new PropertyChangedCallback(OnLanguageChanged)));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the Calendar class.\r\n        /// </summary>\r\n        public Calendar()\r\n        {\r\n            this._blackoutDates = new CalendarBlackoutDatesCollection(this);\r\n            this._selectedDates = new SelectedDatesCollection(this);\r\n            this.DisplayDate = DateTime.Today;\r\n        }\r\n\r\n        #region Public Properties\r\n\r\n        #region BlackoutDates\r\n\r\n        /// <summary>\r\n        /// Gets or sets the dates that are not selectable.\r\n        /// </summary>\r\n        public CalendarBlackoutDatesCollection BlackoutDates\r\n        {\r\n            get { return _blackoutDates; }\r\n        }\r\n\r\n        #endregion BlackoutDates\r\n\r\n        #region CalendarButtonStyle\r\n\r\n        /// <summary>\r\n        /// Gets or sets the style for displaying a CalendarButton.\r\n        /// </summary>\r\n        public Style CalendarButtonStyle\r\n        {\r\n            get { return (Style)GetValue(CalendarButtonStyleProperty); }\r\n            set { SetValue(CalendarButtonStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the CalendarButtonStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty CalendarButtonStyleProperty =\r\n            DependencyProperty.Register(\r\n            \"CalendarButtonStyle\",\r\n            typeof(Style),\r\n            typeof(Calendar));\r\n\r\n        #endregion CalendarButtonStyle\r\n\r\n        #region CalendarDayButtonStyle\r\n\r\n        /// <summary>\r\n        /// Gets or sets the style for displaying a day.\r\n        /// </summary>\r\n        public Style CalendarDayButtonStyle\r\n        {\r\n            get { return (Style)GetValue(CalendarDayButtonStyleProperty); }\r\n            set { SetValue(CalendarDayButtonStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the DayButtonStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty CalendarDayButtonStyleProperty =\r\n            DependencyProperty.Register(\r\n            \"CalendarDayButtonStyle\",\r\n            typeof(Style),\r\n            typeof(Calendar));\r\n\r\n        #endregion CalendarDayButtonStyle\r\n\r\n        #region CalendarItemStyle\r\n\r\n        /// <summary>\r\n        /// Gets or sets the style for a Month.\r\n        /// </summary>\r\n        public Style CalendarItemStyle\r\n        {\r\n            get { return (Style)GetValue(CalendarItemStyleProperty); }\r\n            set { SetValue(CalendarItemStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the MonthStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty CalendarItemStyleProperty =\r\n            DependencyProperty.Register(\r\n            \"CalendarItemStyle\",\r\n            typeof(Style),\r\n            typeof(Calendar));\r\n\r\n        #endregion CalendarItemStyle\r\n\r\n        #region DisplayDate\r\n\r\n        /// <summary>\r\n        /// Gets or sets the date to display.\r\n        /// </summary>\r\n        /// \r\n        public DateTime DisplayDate\r\n        {\r\n            get { return (DateTime)GetValue(DisplayDateProperty); }\r\n            set { SetValue(DisplayDateProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the DisplayDate dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty DisplayDateProperty =\r\n            DependencyProperty.Register(\r\n            \"DisplayDate\",\r\n            typeof(DateTime),\r\n            typeof(Calendar),\r\n            new FrameworkPropertyMetadata(DateTime.MinValue, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnDisplayDateChanged, CoerceDisplayDate));\r\n\r\n        /// <summary>\r\n        /// DisplayDateProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">Calendar that changed its DisplayDate.</param>\r\n        /// <param name=\"e\">DependencyPropertyChangedEventArgs.</param>\r\n        private static void OnDisplayDateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            Calendar c = d as Calendar;\r\n            Debug.Assert(c != null);\r\n\r\n            c.DisplayDateInternal = DateTimeHelper.DiscardDayTime((DateTime)e.NewValue);\r\n            c.UpdateCellItems();\r\n            c.OnDisplayDateChanged(new CalendarDateChangedEventArgs((DateTime)e.OldValue, (DateTime)e.NewValue));\r\n        }\r\n\r\n        private static object CoerceDisplayDate(DependencyObject d, object value)\r\n        {\r\n            Calendar c = d as Calendar;\r\n\r\n            DateTime date = (DateTime)value;\r\n            if (c.DisplayDateStart.HasValue && (date < c.DisplayDateStart.Value))\r\n            {\r\n                value = c.DisplayDateStart.Value;\r\n            }\r\n            else if (c.DisplayDateEnd.HasValue && (date > c.DisplayDateEnd.Value))\r\n            {\r\n                value = c.DisplayDateEnd.Value;\r\n            }\r\n\r\n            return value;\r\n        }\r\n\r\n        #endregion DisplayDate\r\n\r\n        #region DisplayDateEnd\r\n\r\n        /// <summary>\r\n        /// Gets or sets the last date to be displayed.\r\n        /// </summary>\r\n        /// \r\n        public DateTime? DisplayDateEnd\r\n        {\r\n            get { return (DateTime?)GetValue(DisplayDateEndProperty); }\r\n            set { SetValue(DisplayDateEndProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the DisplayDateEnd dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty DisplayDateEndProperty =\r\n            DependencyProperty.Register(\r\n            \"DisplayDateEnd\",\r\n            typeof(DateTime?),\r\n            typeof(Calendar),\r\n            new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnDisplayDateEndChanged, CoerceDisplayDateEnd));\r\n\r\n        /// <summary>\r\n        /// DisplayDateEndProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">Calendar that changed its DisplayDateEnd.</param>\r\n        /// <param name=\"e\">DependencyPropertyChangedEventArgs.</param>\r\n        private static void OnDisplayDateEndChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            Calendar c = d as Calendar;\r\n            Debug.Assert(c != null);\r\n\r\n            c.CoerceValue(DisplayDateProperty);\r\n            c.UpdateCellItems();\r\n        }\r\n\r\n        private static object CoerceDisplayDateEnd(DependencyObject d, object value)\r\n        {\r\n            Calendar c = d as Calendar;\r\n\r\n            DateTime? date = (DateTime?)value;\r\n\r\n            if (date.HasValue)\r\n            {\r\n                if (c.DisplayDateStart.HasValue && (date.Value < c.DisplayDateStart.Value))\r\n                {\r\n                    value = c.DisplayDateStart;\r\n                }\r\n\r\n                DateTime? maxSelectedDate = c.SelectedDates.MaximumDate;\r\n                if (maxSelectedDate.HasValue && (date.Value < maxSelectedDate.Value))\r\n                {\r\n                    value = maxSelectedDate;\r\n                }\r\n            }\r\n\r\n            return value;\r\n        }\r\n\r\n        #endregion DisplayDateEnd\r\n\r\n        #region DisplayDateStart\r\n\r\n        /// <summary>\r\n        /// Gets or sets the first date to be displayed.\r\n        /// </summary>\r\n        /// \r\n        public DateTime? DisplayDateStart\r\n        {\r\n            get { return (DateTime?)GetValue(DisplayDateStartProperty); }\r\n            set { SetValue(DisplayDateStartProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the DisplayDateStart dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty DisplayDateStartProperty =\r\n            DependencyProperty.Register(\r\n            \"DisplayDateStart\",\r\n            typeof(DateTime?),\r\n            typeof(Calendar),\r\n            new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnDisplayDateStartChanged, CoerceDisplayDateStart));\r\n\r\n        /// <summary>\r\n        /// DisplayDateStartProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">Calendar that changed its DisplayDateStart.</param>\r\n        /// <param name=\"e\">DependencyPropertyChangedEventArgs.</param>\r\n        private static void OnDisplayDateStartChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            Calendar c = d as Calendar;\r\n            Debug.Assert(c != null);\r\n\r\n            c.CoerceValue(DisplayDateEndProperty);\r\n            c.CoerceValue(DisplayDateProperty);\r\n            c.UpdateCellItems();\r\n        }\r\n\r\n        private static object CoerceDisplayDateStart(DependencyObject d, object value)\r\n        {\r\n            Calendar c = d as Calendar;\r\n\r\n            DateTime? date = (DateTime?)value;\r\n\r\n            if (date.HasValue)\r\n            {\r\n                DateTime? minSelectedDate = c.SelectedDates.MinimumDate;\r\n                if (minSelectedDate.HasValue && (date.Value > minSelectedDate.Value))\r\n                {\r\n                    value = minSelectedDate;\r\n                }\r\n            }\r\n\r\n            return value;\r\n        }\r\n\r\n        #endregion DisplayDateStart\r\n\r\n        #region DisplayMode\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether the calendar is displayed in months or years.\r\n        /// </summary>\r\n        public CalendarMode DisplayMode\r\n        {\r\n            get { return (CalendarMode)GetValue(DisplayModeProperty); }\r\n            set { SetValue(DisplayModeProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the DisplayMode dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty DisplayModeProperty =\r\n            DependencyProperty.Register(\r\n            \"DisplayMode\",\r\n            typeof(CalendarMode),\r\n            typeof(Calendar),\r\n            new FrameworkPropertyMetadata(CalendarMode.Month, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnDisplayModePropertyChanged),\r\n            new ValidateValueCallback(IsValidDisplayMode));\r\n\r\n        /// <summary>\r\n        /// DisplayModeProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">Calendar that changed its DisplayMode.</param>\r\n        /// <param name=\"e\">DependencyPropertyChangedEventArgs.</param>\r\n        private static void OnDisplayModePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            Calendar c = d as Calendar;\r\n            Debug.Assert(c != null);\r\n            CalendarMode mode = (CalendarMode)e.NewValue;\r\n            CalendarMode oldMode = (CalendarMode)e.OldValue;\r\n            CalendarItem monthControl = c.MonthControl;\r\n\r\n            switch (mode)\r\n            {\r\n                case CalendarMode.Month:\r\n                    {\r\n                        if (oldMode == CalendarMode.Year || oldMode == CalendarMode.Decade)\r\n                        {\r\n                            // Cancel highlight when switching to month display mode\r\n                            c.HoverStart = c.HoverEnd = null;\r\n                            c.CurrentDate = c.DisplayDate;\r\n                        }\r\n\r\n                        c.UpdateCellItems();\r\n                        break;\r\n                    }\r\n\r\n                case CalendarMode.Year:\r\n                case CalendarMode.Decade:\r\n                    {\r\n                        if (oldMode == CalendarMode.Month)\r\n                        {\r\n                            c.DisplayDate = c.CurrentDate;\r\n                        }\r\n\r\n                        c.UpdateCellItems();\r\n                        break;\r\n                    }\r\n\r\n                default:\r\n                    Debug.Assert(false);\r\n                    break;\r\n            }\r\n\r\n            c.OnDisplayModeChanged(new CalendarModeChangedEventArgs((CalendarMode)e.OldValue, mode));\r\n        }\r\n\r\n        #endregion DisplayMode\r\n\r\n        #region FirstDayOfWeek\r\n\r\n        /// <summary>\r\n        /// Gets or sets the day that is considered the beginning of the week.\r\n        /// </summary>\r\n        public DayOfWeek FirstDayOfWeek\r\n        {\r\n            get { return (DayOfWeek)GetValue(FirstDayOfWeekProperty); }\r\n            set { SetValue(FirstDayOfWeekProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the FirstDayOfWeek dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty FirstDayOfWeekProperty =\r\n            DependencyProperty.Register(\r\n            \"FirstDayOfWeek\",\r\n            typeof(DayOfWeek),\r\n            typeof(Calendar),\r\n            new FrameworkPropertyMetadata(DateTimeHelper.GetCurrentDateFormat().FirstDayOfWeek,\r\n                                OnFirstDayOfWeekChanged),\r\n            new ValidateValueCallback(IsValidFirstDayOfWeek));\r\n\r\n        /// <summary>\r\n        /// FirstDayOfWeekProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">Calendar that changed its FirstDayOfWeek.</param>\r\n        /// <param name=\"e\">DependencyPropertyChangedEventArgs.</param>\r\n        private static void OnFirstDayOfWeekChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            Calendar c = d as Calendar;\r\n            c.UpdateCellItems();\r\n        }\r\n\r\n        #endregion FirstDayOfWeek\r\n\r\n        #region IsTodayHighlighted\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether the current date is highlighted.\r\n        /// </summary>\r\n        public bool IsTodayHighlighted\r\n        {\r\n            get { return (bool)GetValue(IsTodayHighlightedProperty); }\r\n            set { SetValue(IsTodayHighlightedProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the IsTodayHighlighted dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty IsTodayHighlightedProperty =\r\n            DependencyProperty.Register(\r\n            \"IsTodayHighlighted\",\r\n            typeof(bool),\r\n            typeof(Calendar),\r\n            new FrameworkPropertyMetadata(true, OnIsTodayHighlightedChanged));\r\n\r\n        /// <summary>\r\n        /// IsTodayHighlightedProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">Calendar that changed its IsTodayHighlighted.</param>\r\n        /// <param name=\"e\">DependencyPropertyChangedEventArgs.</param>\r\n        private static void OnIsTodayHighlightedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            Calendar c = d as Calendar;\r\n\r\n            int i = DateTimeHelper.CompareYearMonth(c.DisplayDateInternal, DateTime.Today);\r\n\r\n            if (i > -2 && i < 2)\r\n            {\r\n                c.UpdateCellItems();\r\n            }\r\n        }\r\n\r\n        #endregion IsTodayHighlighted\r\n        \r\n        #region Language\r\n        private static void OnLanguageChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            Calendar c = d as Calendar;\r\n            if (DependencyPropertyHelper.GetValueSource(d, Calendar.FirstDayOfWeekProperty).BaseValueSource == BaseValueSource.Default)\r\n            {\r\n                c.CoerceValue(FirstDayOfWeekProperty);\r\n                c.UpdateCellItems();\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        #region SelectedDate\r\n\r\n        /// <summary>\r\n        /// Gets or sets the currently selected date.\r\n        /// </summary>\r\n        /// \r\n        public DateTime? SelectedDate\r\n        {\r\n            get { return (DateTime?)GetValue(SelectedDateProperty); }\r\n            set { SetValue(SelectedDateProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the SelectedDate dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty SelectedDateProperty =\r\n            DependencyProperty.Register(\r\n            \"SelectedDate\",\r\n            typeof(DateTime?),\r\n            typeof(Calendar),\r\n            new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnSelectedDateChanged));\r\n\r\n        /// <summary>\r\n        /// SelectedDateProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">Calendar that changed its SelectedDate.</param>\r\n        /// <param name=\"e\">DependencyPropertyChangedEventArgs.</param>\r\n        private static void OnSelectedDateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            Calendar c = d as Calendar;\r\n            Debug.Assert(c != null);\r\n\r\n            if (c.SelectionMode != CalendarSelectionMode.None || e.NewValue == null)\r\n            {\r\n                DateTime? addedDate;\r\n\r\n                addedDate = (DateTime?)e.NewValue;\r\n\r\n                if (IsValidDateSelection(c, addedDate))\r\n                {\r\n                    if (!addedDate.HasValue)\r\n                    {\r\n                        c.SelectedDates.ClearInternal(true /*fireChangeNotification*/);\r\n                    }\r\n                    else\r\n                    {\r\n                        if (addedDate.HasValue && !(c.SelectedDates.Count > 0 && c.SelectedDates[0] == addedDate.Value))\r\n                        {\r\n                            c.SelectedDates.ClearInternal();\r\n                            c.SelectedDates.Add(addedDate.Value);\r\n                        }\r\n                    }\r\n\r\n                    // We update the current date for only the Single mode.For the other modes it automatically gets updated\r\n                    if (c.SelectionMode == CalendarSelectionMode.SingleDate)\r\n                    {\r\n                        if (addedDate.HasValue)\r\n                        {\r\n                            c.CurrentDate = addedDate.Value;\r\n                        }\r\n\r\n                        c.UpdateCellItems();\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    throw new ArgumentOutOfRangeException(\"d\", SR.Get(SRID.Calendar_OnSelectedDateChanged_InvalidValue));\r\n                }\r\n            }\r\n            else\r\n            {\r\n                throw new InvalidOperationException(SR.Get(SRID.Calendar_OnSelectedDateChanged_InvalidOperation));\r\n            }\r\n        }\r\n\r\n        #endregion SelectedDate\r\n\r\n        #region SelectedDates\r\n\r\n        // TODO: Should it be of type ObservableCollection?\r\n\r\n        /// <summary>\r\n        /// Gets the dates that are currently selected.\r\n        /// </summary>\r\n        public SelectedDatesCollection SelectedDates\r\n        {\r\n            get { return _selectedDates; }\r\n        }\r\n\r\n        #endregion SelectedDates\r\n\r\n        #region SelectionMode\r\n\r\n        /// <summary>\r\n        /// Gets or sets the selection mode for the calendar.\r\n        /// </summary>\r\n        public CalendarSelectionMode SelectionMode\r\n        {\r\n            get { return (CalendarSelectionMode)GetValue(SelectionModeProperty); }\r\n            set { SetValue(SelectionModeProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the SelectionMode dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty SelectionModeProperty =\r\n            DependencyProperty.Register(\r\n            \"SelectionMode\",\r\n            typeof(CalendarSelectionMode),\r\n            typeof(Calendar),\r\n            new FrameworkPropertyMetadata(CalendarSelectionMode.SingleDate, OnSelectionModeChanged),\r\n            new ValidateValueCallback(IsValidSelectionMode));\r\n\r\n        private static void OnSelectionModeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            Calendar c = d as Calendar;\r\n            Debug.Assert(c != null);\r\n\r\n            c.HoverStart = c.HoverEnd = null;\r\n            c.SelectedDates.ClearInternal(true /*fireChangeNotification*/);\r\n            c.OnSelectionModeChanged(EventArgs.Empty);\r\n        }\r\n\r\n        #endregion SelectionMode\r\n\r\n        #endregion Public Properties\r\n\r\n        #region Internal Events\r\n\r\n        internal event MouseButtonEventHandler DayButtonMouseUp;\r\n\r\n        internal event RoutedEventHandler DayOrMonthPreviewKeyDown;\r\n\r\n        #endregion Internal Events\r\n\r\n        #region Internal Properties\r\n\r\n        /// <summary>\r\n        /// This flag is used to determine whether DatePicker should change its \r\n        /// DisplayDate because of a SelectedDate change on its Calendar\r\n        /// </summary>\r\n        internal bool DatePickerDisplayDateFlag\r\n        {\r\n            get;\r\n            set;\r\n        }\r\n\r\n        internal DateTime DisplayDateInternal\r\n        {\r\n            get;\r\n            private set;\r\n        }\r\n\r\n        internal DateTime DisplayDateEndInternal\r\n        {\r\n            get\r\n            {\r\n                return this.DisplayDateEnd.GetValueOrDefault(DateTime.MaxValue);\r\n            }\r\n        }\r\n\r\n        internal DateTime DisplayDateStartInternal\r\n        {\r\n            get\r\n            {\r\n                return this.DisplayDateStart.GetValueOrDefault(DateTime.MinValue);\r\n            }\r\n        }\r\n\r\n        internal DateTime CurrentDate\r\n        {\r\n            get { return _currentDate.GetValueOrDefault(this.DisplayDateInternal); }\r\n            set { _currentDate = value; }\r\n        }\r\n\r\n        internal DateTime? HoverStart\r\n        {\r\n            get\r\n            {\r\n                return this.SelectionMode == CalendarSelectionMode.None ? null : _hoverStart;\r\n            }\r\n\r\n            set \r\n            { \r\n                _hoverStart = value; \r\n            }\r\n        }\r\n\r\n        internal DateTime? HoverEnd\r\n        {\r\n            get\r\n            {\r\n                return this.SelectionMode == CalendarSelectionMode.None ? null : _hoverEnd;\r\n            }\r\n\r\n            set\r\n            {\r\n                _hoverEnd = value;\r\n            }\r\n        }\r\n\r\n        internal CalendarItem MonthControl\r\n        {\r\n            get { return _monthControl; }\r\n        }\r\n\r\n        internal DateTime DisplayMonth\r\n        {\r\n            get\r\n            {\r\n                return DateTimeHelper.DiscardDayTime(DisplayDate);\r\n            }\r\n        }\r\n\r\n        internal DateTime DisplayYear\r\n        {\r\n            get\r\n            {\r\n                return new DateTime(DisplayDate.Year, 1, 1);\r\n            }\r\n        }\r\n\r\n        #endregion Internal Properties\r\n\r\n        #region Private Properties\r\n\r\n        private bool IsRightToLeft\r\n        {\r\n            get \r\n            {\r\n                return FlowDirection == FlowDirection.RightToLeft;\r\n            }\r\n        }\r\n        #endregion Private Properties\r\n\r\n        #region Public Methods\r\n\r\n        /// <summary>\r\n        /// Invoked whenever application code or an internal process, \r\n        /// such as a rebuilding layout pass, calls the ApplyTemplate method.\r\n        /// </summary>\r\n        public override void OnApplyTemplate()\r\n        {\r\n            if (_monthControl != null)\r\n            {\r\n                _monthControl.Owner = null;\r\n            }\r\n\r\n            base.OnApplyTemplate();\r\n\r\n            _monthControl = GetTemplateChild(ElementMonth) as CalendarItem;\r\n\r\n            if (_monthControl != null)\r\n            {\r\n                _monthControl.Owner = this;\r\n            }\r\n\r\n            this.CurrentDate = this.DisplayDate;\r\n            UpdateCellItems();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Provides a text representation of the selected date.\r\n        /// </summary>\r\n        /// <returns>A text representation of the selected date, or an empty string if SelectedDate is a null reference.</returns>\r\n        public override string ToString()\r\n        {\r\n            if (this.SelectedDate != null)\r\n            {\r\n                return this.SelectedDate.Value.ToString(DateTimeHelper.GetDateFormat(DateTimeHelper.GetCulture(this)));\r\n            }\r\n            else\r\n            {\r\n                return string.Empty;\r\n            }\r\n        }\r\n\r\n        #endregion Public Methods\r\n\r\n        #region Protected Methods\r\n\r\n        protected virtual void OnSelectedDatesChanged(SelectionChangedEventArgs e)\r\n        {\r\n            RaiseEvent(e);\r\n        }\r\n\r\n        protected virtual void OnDisplayDateChanged(CalendarDateChangedEventArgs e)\r\n        {\r\n            EventHandler<CalendarDateChangedEventArgs> handler = this.DisplayDateChanged;\r\n            if (handler != null)\r\n            {\r\n                handler(this, e);\r\n            }\r\n        }\r\n\r\n        protected virtual void OnDisplayModeChanged(CalendarModeChangedEventArgs e)\r\n        {\r\n            EventHandler<CalendarModeChangedEventArgs> handler = this.DisplayModeChanged;\r\n\r\n            if (handler != null)\r\n            {\r\n                handler(this, e);\r\n            }\r\n        }\r\n\r\n        protected virtual void OnSelectionModeChanged(EventArgs e)\r\n        {\r\n            EventHandler<EventArgs> handler = this.SelectionModeChanged;\r\n\r\n            if (handler != null)\r\n            {\r\n                handler(this, e);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates the automation peer for this Calendar Control.\r\n        /// </summary>\r\n        /// <returns></returns>\r\n        protected override AutomationPeer OnCreateAutomationPeer()\r\n        {\r\n            return new CalendarAutomationPeer(this);\r\n        }\r\n\r\n        protected override void OnKeyDown(KeyEventArgs e)\r\n        {\r\n            if (!e.Handled)\r\n            {\r\n                e.Handled = ProcessCalendarKey(e);\r\n            }\r\n        }\r\n\r\n        protected override void OnKeyUp(KeyEventArgs e)\r\n        {\r\n            if (!e.Handled)\r\n            {\r\n                if (e.Key == Key.LeftShift || e.Key == Key.RightShift)\r\n                {\r\n                    ProcessShiftKeyUp();\r\n                }\r\n            }\r\n        }\r\n\r\n        #endregion Protected Methods\r\n\r\n        #region Internal Methods\r\n\r\n        internal CalendarDayButton FindDayButtonFromDay(DateTime day)\r\n        {\r\n            if (this.MonthControl != null)\r\n            {\r\n                foreach (CalendarDayButton b in this.MonthControl.GetCalendarDayButtons())\r\n                {\r\n                    if (b.DataContext is DateTime)\r\n                    {\r\n                        if (DateTimeHelper.CompareDays((DateTime)b.DataContext, day) == 0)\r\n                        {\r\n                            return b;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        internal static bool IsValidDateSelection(Calendar cal, object value)\r\n        {\r\n            return (value == null) || (!cal.BlackoutDates.Contains((DateTime)value));\r\n        }\r\n\r\n        internal void OnDayButtonMouseUp(MouseButtonEventArgs e)\r\n        {\r\n            MouseButtonEventHandler handler = this.DayButtonMouseUp;\r\n            if (null != handler)\r\n            {\r\n                handler(this, e);\r\n            }\r\n        }\r\n\r\n        internal void OnDayOrMonthPreviewKeyDown(RoutedEventArgs e)\r\n        {\r\n            RoutedEventHandler handler = this.DayOrMonthPreviewKeyDown;\r\n            if (null != handler)\r\n            {\r\n                handler(this, e);\r\n            }\r\n        }\r\n\r\n        // If the day is a trailing day, Update the DisplayDate\r\n        internal void OnDayClick(DateTime selectedDate)\r\n        {\r\n            if (this.SelectionMode == CalendarSelectionMode.None)\r\n            {\r\n                this.CurrentDate = selectedDate;\r\n            }\r\n\r\n            if (DateTimeHelper.CompareYearMonth(selectedDate, this.DisplayDateInternal) != 0)\r\n            {\r\n                MoveDisplayTo(selectedDate);\r\n            }\r\n            else\r\n            {\r\n                UpdateCellItems();\r\n                FocusDate(selectedDate);\r\n            }            \r\n        }\r\n\r\n        internal void OnCalendarButtonPressed(CalendarButton b, bool switchDisplayMode)\r\n        {\r\n            if (b.DataContext is DateTime)\r\n            {\r\n                DateTime d = (DateTime)b.DataContext;\r\n\r\n                DateTime? newDate = null;\r\n                CalendarMode newMode = CalendarMode.Month;\r\n\r\n                switch (this.DisplayMode)\r\n                {\r\n                    case CalendarMode.Month:\r\n                    {\r\n                        Debug.Assert(false);\r\n                        break;\r\n                    }\r\n\r\n                    case CalendarMode.Year:\r\n                    {\r\n                        newDate = DateTimeHelper.SetYearMonth(this.DisplayDate, d);\r\n                        newMode = CalendarMode.Month;\r\n                        break;\r\n                    }\r\n\r\n                    case CalendarMode.Decade:\r\n                    {\r\n                        newDate = DateTimeHelper.SetYear(this.DisplayDate, d.Year);\r\n                        newMode = CalendarMode.Year;\r\n                        break;\r\n                    }\r\n\r\n                    default: \r\n                        Debug.Assert(false); \r\n                        break;\r\n                }\r\n\r\n                if (newDate.HasValue)\r\n                {\r\n                    this.DisplayDate = newDate.Value;\r\n                    if (switchDisplayMode)\r\n                    {\r\n                        this.DisplayMode = newMode;\r\n                        FocusDate(this.DisplayMode == CalendarMode.Month ? this.CurrentDate : this.DisplayDate);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private DateTime? GetDateOffset(DateTime date, int offset, CalendarMode displayMode)\r\n        {\r\n            DateTime? result = null;\r\n            switch (displayMode)\r\n            {\r\n                case CalendarMode.Month:\r\n                {\r\n                    result = DateTimeHelper.AddMonths(date, offset);\r\n                    break;\r\n                }\r\n\r\n                case CalendarMode.Year:\r\n                {\r\n                    result = DateTimeHelper.AddYears(date, offset);\r\n                    break;\r\n                }\r\n\r\n                case CalendarMode.Decade:\r\n                {\r\n                    result = DateTimeHelper.AddYears(this.DisplayDate, offset * YEARS_PER_DECADE);\r\n                    break;\r\n                }\r\n\r\n                default:\r\n                Debug.Assert(false);\r\n                break;\r\n            }\r\n\r\n            return result;\r\n        }\r\n\r\n        private void MoveDisplayTo(DateTime? date)\r\n        {\r\n            if (date.HasValue)\r\n            {\r\n                DateTime d = date.Value.Date;\r\n                switch (this.DisplayMode)\r\n                {\r\n                    case CalendarMode.Month:\r\n                    {\r\n                        this.DisplayDate = DateTimeHelper.DiscardDayTime(d);\r\n                        this.CurrentDate = d;\r\n                        UpdateCellItems();\r\n\r\n                        break;\r\n                    }\r\n\r\n                    case CalendarMode.Year:\r\n                    case CalendarMode.Decade:\r\n                    {\r\n                        this.DisplayDate = d;\r\n                        UpdateCellItems();\r\n                        \r\n                        break;\r\n                    }\r\n\r\n                    default:\r\n                    Debug.Assert(false);\r\n                    break;\r\n                }\r\n\r\n                FocusDate(d);\r\n            }\r\n        }\r\n\r\n        internal void OnNextClick()\r\n        {\r\n            DateTime? nextDate = GetDateOffset(this.DisplayDate, 1, this.DisplayMode);\r\n            if (nextDate.HasValue)\r\n            {\r\n                MoveDisplayTo(DateTimeHelper.DiscardDayTime(nextDate.Value));\r\n            }\r\n        }\r\n\r\n        internal void OnPreviousClick()\r\n        {\r\n            DateTime? nextDate = GetDateOffset(this.DisplayDate, -1, this.DisplayMode);\r\n            if (nextDate.HasValue)\r\n            {\r\n                MoveDisplayTo(DateTimeHelper.DiscardDayTime(nextDate.Value));\r\n            }\r\n        }\r\n\r\n        internal void OnSelectedDatesCollectionChanged(SelectionChangedEventArgs e)\r\n        {\r\n            if (IsSelectionChanged(e))\r\n            {\r\n                if (AutomationPeer.ListenerExists(AutomationEvents.SelectionItemPatternOnElementSelected) ||\r\n                    AutomationPeer.ListenerExists(AutomationEvents.SelectionItemPatternOnElementAddedToSelection) ||\r\n                    AutomationPeer.ListenerExists(AutomationEvents.SelectionItemPatternOnElementRemovedFromSelection))\r\n                {\r\n                    CalendarAutomationPeer peer = FrameworkElementAutomationPeer.FromElement(this) as CalendarAutomationPeer;\r\n                    if (peer != null)\r\n                    {\r\n                        peer.RaiseSelectionEvents(e);\r\n                    }\r\n                }\r\n\r\n                CoerceFromSelection();\r\n                OnSelectedDatesChanged(e);\r\n            }\r\n        }\r\n\r\n        internal void UpdateCellItems()\r\n        {\r\n            CalendarItem monthControl = this.MonthControl;\r\n            if (monthControl != null)\r\n            {\r\n                switch (this.DisplayMode)\r\n                {\r\n                    case CalendarMode.Month:\r\n                    {\r\n                        monthControl.UpdateMonthMode();\r\n                        break;\r\n                    }\r\n\r\n                    case CalendarMode.Year:\r\n                    {\r\n                        monthControl.UpdateYearMode();\r\n                        break;\r\n                    }\r\n\r\n                    case CalendarMode.Decade:\r\n                    {\r\n                        monthControl.UpdateDecadeMode();\r\n                        break;\r\n                    }\r\n\r\n                    default: \r\n                        Debug.Assert(false); \r\n                        break;\r\n                }\r\n            }\r\n        }\r\n\r\n        #endregion Internal Methods\r\n\r\n        #region Private Methods\r\n\r\n        private void CoerceFromSelection()\r\n        {\r\n            CoerceValue(DisplayDateStartProperty);\r\n            CoerceValue(DisplayDateEndProperty);\r\n            CoerceValue(DisplayDateProperty);\r\n        }\r\n\r\n        // This method adds the days that were selected by Keyboard to the SelectedDays Collection \r\n        private void AddKeyboardSelection()\r\n        {\r\n            if (this.HoverStart != null)\r\n            {\r\n                this.SelectedDates.ClearInternal();\r\n\r\n                // In keyboard selection, we are sure that the collection does not include any blackout days\r\n                this.SelectedDates.AddRange(this.HoverStart.Value, this.CurrentDate);\r\n            }\r\n        }\r\n\r\n        private static bool IsSelectionChanged(SelectionChangedEventArgs e)\r\n        {\r\n            if (e.AddedItems.Count != e.RemovedItems.Count)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            foreach (DateTime addedDate in e.AddedItems)\r\n            {\r\n                if (!e.RemovedItems.Contains(addedDate))\r\n                {\r\n                    return true;\r\n                }\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        private static bool IsValidDisplayMode(object value)\r\n        {\r\n            CalendarMode mode = (CalendarMode)value;\r\n\r\n            return mode == CalendarMode.Month\r\n                || mode == CalendarMode.Year\r\n                || mode == CalendarMode.Decade;\r\n        }\r\n\r\n        internal static bool IsValidFirstDayOfWeek(object value)\r\n        {\r\n            DayOfWeek day = (DayOfWeek)value;\r\n\r\n            return day == DayOfWeek.Sunday\r\n                || day == DayOfWeek.Monday\r\n                || day == DayOfWeek.Tuesday\r\n                || day == DayOfWeek.Wednesday\r\n                || day == DayOfWeek.Thursday\r\n                || day == DayOfWeek.Friday\r\n                || day == DayOfWeek.Saturday;\r\n        }\r\n\r\n        private static bool IsValidKeyboardSelection(Calendar cal, object value)\r\n        {\r\n            if (value == null)\r\n            {\r\n                return true;\r\n            }\r\n            else\r\n            {\r\n                if (cal.BlackoutDates.Contains((DateTime)value))\r\n                {\r\n                    return false;\r\n                }\r\n                else\r\n                {\r\n                    return DateTime.Compare((DateTime)value, cal.DisplayDateStartInternal) >= 0 && DateTime.Compare((DateTime)value, cal.DisplayDateEndInternal) <= 0;\r\n                }\r\n            }\r\n        }\r\n\r\n        private static bool IsValidSelectionMode(object value)\r\n        {\r\n            CalendarSelectionMode mode = (CalendarSelectionMode)value;\r\n\r\n            return mode == CalendarSelectionMode.SingleDate\r\n                || mode == CalendarSelectionMode.SingleRange\r\n                || mode == CalendarSelectionMode.MultipleRange\r\n                || mode == CalendarSelectionMode.None;\r\n        }\r\n\r\n        private void OnSelectedMonthChanged(DateTime? selectedMonth)\r\n        {\r\n            if (selectedMonth.HasValue)\r\n            {\r\n                Debug.Assert(this.DisplayMode == CalendarMode.Year);\r\n                this.DisplayDate = selectedMonth.Value;\r\n\r\n                UpdateCellItems();\r\n\r\n                FocusDate(selectedMonth.Value);\r\n            }\r\n        }\r\n\r\n        private void OnSelectedYearChanged(DateTime? selectedYear)\r\n        {\r\n            if (selectedYear.HasValue)\r\n            {\r\n                Debug.Assert(this.DisplayMode == CalendarMode.Decade);\r\n                this.DisplayDate = selectedYear.Value;\r\n\r\n                UpdateCellItems();\r\n\r\n                FocusDate(selectedYear.Value);\r\n            }\r\n        }\r\n\r\n        internal void FocusDate(DateTime date)\r\n        {\r\n            if (MonthControl != null)\r\n            {\r\n                MonthControl.FocusDate(date);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        ///     Called when this element gets focus.\r\n        /// </summary>\r\n        private static void OnGotFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            // When Calendar gets focus move it to the DisplayDate\r\n            var c = (Calendar)sender;\r\n            if (!e.Handled && e.OriginalSource == c)\r\n            {\r\n                // This check is for the case where the DisplayDate is the first of the month\r\n                // and the SelectedDate is in the middle of the month.  If you tab into the Calendar\r\n                // the focus should go to the SelectedDate, not the DisplayDate.\r\n                if (c.SelectedDate.HasValue && DateTimeHelper.CompareYearMonth(c.SelectedDate.Value, c.DisplayDateInternal) == 0)\r\n                {\r\n                    c.FocusDate(c.SelectedDate.Value);\r\n                }\r\n                else\r\n                {\r\n                    c.FocusDate(c.DisplayDate);\r\n                }\r\n\r\n                e.Handled = true;\r\n            }\r\n        }\r\n\r\n        private bool ProcessCalendarKey(KeyEventArgs e)\r\n        {\r\n            if (this.DisplayMode == CalendarMode.Month)\r\n            {\r\n                // If a blackout day is inactive, when clicked on it, the previous inactive day which is not a blackout day can get the focus.\r\n                // In this case we should allow keyboard functions on that inactive day\r\n                CalendarDayButton currentDayButton = (MonthControl != null) ? MonthControl.GetCalendarDayButton(this.CurrentDate) : null;\r\n\r\n                if (DateTimeHelper.CompareYearMonth(this.CurrentDate, this.DisplayDateInternal) != 0 && currentDayButton != null && !currentDayButton.IsInactive)\r\n                {\r\n                    return false;\r\n                }\r\n            }\r\n\r\n            bool ctrl, shift;\r\n            KeyboardHelper.GetMetaKeyState(out ctrl, out shift);\r\n\r\n            switch (e.Key)\r\n            {\r\n                case Key.Up:\r\n                {\r\n                    ProcessUpKey(ctrl, shift);\r\n                    return true;\r\n                }\r\n\r\n                case Key.Down:\r\n                {\r\n                    ProcessDownKey(ctrl, shift);\r\n                    return true;\r\n                }\r\n\r\n                case Key.Left:\r\n                {\r\n                    ProcessLeftKey(shift);\r\n                    return true;\r\n                }\r\n\r\n                case Key.Right:\r\n                {\r\n                    ProcessRightKey(shift);\r\n                    return true;\r\n                }\r\n\r\n                case Key.PageDown:\r\n                {\r\n                    ProcessPageDownKey(shift);\r\n                    return true;\r\n                }\r\n\r\n                case Key.PageUp:\r\n                {\r\n                    ProcessPageUpKey(shift);\r\n                    return true;\r\n                }\r\n\r\n                case Key.Home:\r\n                {\r\n                    ProcessHomeKey(shift);\r\n                    return true;\r\n                }\r\n\r\n                case Key.End:\r\n                {\r\n                    ProcessEndKey(shift);\r\n                    return true;\r\n                }\r\n\r\n                case Key.Enter:\r\n                case Key.Space:\r\n                {\r\n                    return ProcessEnterKey();\r\n                }\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        private void ProcessDownKey(bool ctrl, bool shift)\r\n        {\r\n            switch (this.DisplayMode)\r\n            {\r\n                case CalendarMode.Month:\r\n                {\r\n                    if (!ctrl || shift)\r\n                    {\r\n                        DateTime? selectedDate = this._blackoutDates.GetNonBlackoutDate(DateTimeHelper.AddDays(this.CurrentDate, COLS), 1);\r\n                        ProcessSelection(shift, selectedDate);\r\n                    }\r\n\r\n                    break;\r\n                }\r\n\r\n                case CalendarMode.Year:\r\n                {\r\n                    if (ctrl)\r\n                    {\r\n                        this.DisplayMode = CalendarMode.Month;\r\n                        FocusDate(this.DisplayDate);\r\n                    }\r\n                    else\r\n                    {\r\n                        DateTime? selectedMonth = DateTimeHelper.AddMonths(this.DisplayDate, YEAR_COLS);\r\n                        OnSelectedMonthChanged(selectedMonth);\r\n                    }\r\n\r\n                    break;\r\n                }\r\n\r\n                case CalendarMode.Decade:\r\n                {\r\n                    if (ctrl)\r\n                    {                        \r\n                        this.DisplayMode = CalendarMode.Year;\r\n                        FocusDate(this.DisplayDate);\r\n                    }\r\n                    else\r\n                    {\r\n                        DateTime? selectedYear = DateTimeHelper.AddYears(this.DisplayDate, YEAR_COLS);\r\n                        OnSelectedYearChanged(selectedYear);\r\n                    }\r\n\r\n                    break;\r\n                }\r\n            }\r\n        }\r\n\r\n        private void ProcessEndKey(bool shift)\r\n        {\r\n            switch (this.DisplayMode)\r\n            {\r\n                case CalendarMode.Month:\r\n                {\r\n                    if (this.DisplayDate != null)\r\n                    {\r\n                        DateTime? selectedDate = new DateTime(this.DisplayDateInternal.Year, this.DisplayDateInternal.Month, 1);\r\n\r\n                        if (DateTimeHelper.CompareYearMonth(DateTime.MaxValue, selectedDate.Value) > 0)\r\n                        {\r\n                            // since DisplayDate is not equal to DateTime.MaxValue we are sure selectedDate is not null\r\n                            selectedDate = DateTimeHelper.AddMonths(selectedDate.Value, 1).Value;\r\n                            selectedDate = DateTimeHelper.AddDays(selectedDate.Value, -1).Value;\r\n                        }\r\n                        else\r\n                        {\r\n                            selectedDate = DateTime.MaxValue;\r\n                        }\r\n\r\n                        ProcessSelection(shift, selectedDate);\r\n                    }\r\n\r\n                    break;\r\n                }\r\n\r\n                case CalendarMode.Year:\r\n                {\r\n                    DateTime selectedMonth = new DateTime(this.DisplayDate.Year, 12, 1);\r\n                    OnSelectedMonthChanged(selectedMonth);\r\n                    break;\r\n                }\r\n\r\n                case CalendarMode.Decade:\r\n                {\r\n                    DateTime? selectedYear = new DateTime(DateTimeHelper.EndOfDecade(this.DisplayDate), 1, 1);\r\n                    OnSelectedYearChanged(selectedYear);\r\n                    break;\r\n                }\r\n            }\r\n        }\r\n\r\n        private bool ProcessEnterKey()\r\n        {\r\n            switch (this.DisplayMode)\r\n            {\r\n                case CalendarMode.Year:\r\n                {\r\n                    this.DisplayMode = CalendarMode.Month;\r\n                    FocusDate(this.DisplayDate);\r\n                    return true;\r\n                }\r\n\r\n                case CalendarMode.Decade:\r\n                {\r\n                    this.DisplayMode = CalendarMode.Year;\r\n                    FocusDate(this.DisplayDate);\r\n                    return true;\r\n                }\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        private void ProcessHomeKey(bool shift)\r\n        {\r\n            switch (this.DisplayMode)\r\n            {\r\n                case CalendarMode.Month:\r\n                {\r\n                    // TODO: Not all types of calendars start with Day1. If Non-Gregorian is supported check this:\r\n                    DateTime? selectedDate = new DateTime(this.DisplayDateInternal.Year, this.DisplayDateInternal.Month, 1);\r\n                    ProcessSelection(shift, selectedDate);\r\n                    break;\r\n                }\r\n\r\n                case CalendarMode.Year:\r\n                {\r\n                    DateTime selectedMonth = new DateTime(this.DisplayDate.Year, 1, 1);\r\n                    OnSelectedMonthChanged(selectedMonth);\r\n                    break;\r\n                }\r\n\r\n                case CalendarMode.Decade:\r\n                {\r\n                    DateTime? selectedYear = new DateTime(DateTimeHelper.DecadeOfDate(this.DisplayDate), 1, 1);\r\n                    OnSelectedYearChanged(selectedYear);\r\n                    break;\r\n                }\r\n            }\r\n        }\r\n\r\n        private void ProcessLeftKey(bool shift)\r\n        {\r\n            int moveAmmount = (!this.IsRightToLeft) ? -1 : 1;\r\n            switch (this.DisplayMode)\r\n            {\r\n                case CalendarMode.Month:\r\n                {\r\n                    DateTime? selectedDate = this._blackoutDates.GetNonBlackoutDate(DateTimeHelper.AddDays(this.CurrentDate, moveAmmount), moveAmmount);\r\n                    ProcessSelection(shift, selectedDate);\r\n                    break;\r\n                }\r\n\r\n                case CalendarMode.Year:\r\n                {\r\n                    DateTime? selectedMonth = DateTimeHelper.AddMonths(this.DisplayDate, moveAmmount);\r\n                    OnSelectedMonthChanged(selectedMonth);\r\n                    break;\r\n                }\r\n\r\n                case CalendarMode.Decade:\r\n                {\r\n                    DateTime? selectedYear = DateTimeHelper.AddYears(this.DisplayDate, moveAmmount);\r\n                    OnSelectedYearChanged(selectedYear);\r\n                    break;\r\n                }\r\n            }\r\n        }\r\n\r\n        private void ProcessPageDownKey(bool shift)\r\n        {\r\n            switch (this.DisplayMode)\r\n            {\r\n                case CalendarMode.Month:\r\n                {\r\n                    DateTime? selectedDate = this._blackoutDates.GetNonBlackoutDate(DateTimeHelper.AddMonths(this.CurrentDate, 1), 1);\r\n                    ProcessSelection(shift, selectedDate);\r\n                    break;\r\n                }\r\n\r\n                case CalendarMode.Year:\r\n                {\r\n                    DateTime? selectedMonth = DateTimeHelper.AddYears(this.DisplayDate, 1);\r\n                    OnSelectedMonthChanged(selectedMonth);\r\n                    break;\r\n                }\r\n\r\n                case CalendarMode.Decade:\r\n                {\r\n                    DateTime? selectedYear = DateTimeHelper.AddYears(this.DisplayDate, 10);\r\n                    OnSelectedYearChanged(selectedYear);\r\n                    break;\r\n                }\r\n            }\r\n        }\r\n\r\n        private void ProcessPageUpKey(bool shift)\r\n        {\r\n            switch (this.DisplayMode)\r\n            {\r\n                case CalendarMode.Month:\r\n                {\r\n                    DateTime? selectedDate = this._blackoutDates.GetNonBlackoutDate(DateTimeHelper.AddMonths(this.CurrentDate, -1), -1);\r\n                    ProcessSelection(shift, selectedDate);\r\n                    break;\r\n                }\r\n\r\n                case CalendarMode.Year:\r\n                {\r\n                    DateTime? selectedMonth = DateTimeHelper.AddYears(this.DisplayDate, -1);\r\n                    OnSelectedMonthChanged(selectedMonth);\r\n                    break;\r\n                }\r\n\r\n                case CalendarMode.Decade:\r\n                {\r\n                    DateTime? selectedYear = DateTimeHelper.AddYears(this.DisplayDate, -10);\r\n                    OnSelectedYearChanged(selectedYear);\r\n                    break;\r\n                }\r\n            }\r\n        }\r\n\r\n        private void ProcessRightKey(bool shift)\r\n        {\r\n            int moveAmmount = (!this.IsRightToLeft) ? 1 : -1;\r\n            switch (this.DisplayMode)\r\n            {\r\n                case CalendarMode.Month:\r\n                {\r\n                    DateTime? selectedDate = this._blackoutDates.GetNonBlackoutDate(DateTimeHelper.AddDays(this.CurrentDate, moveAmmount), moveAmmount);\r\n                    ProcessSelection(shift, selectedDate);\r\n                    break;\r\n                }\r\n\r\n                case CalendarMode.Year:\r\n                {\r\n                    DateTime? selectedMonth = DateTimeHelper.AddMonths(this.DisplayDate, moveAmmount);\r\n                    OnSelectedMonthChanged(selectedMonth);\r\n                    break;\r\n                }\r\n\r\n                case CalendarMode.Decade:\r\n                {\r\n                    DateTime? selectedYear = DateTimeHelper.AddYears(this.DisplayDate, moveAmmount);\r\n                    OnSelectedYearChanged(selectedYear);\r\n                    break;\r\n                }\r\n            }\r\n        }\r\n\r\n        private void ProcessSelection(bool shift, DateTime? lastSelectedDate)\r\n        {\r\n            if (this.SelectionMode == CalendarSelectionMode.None && lastSelectedDate != null)\r\n            {\r\n                OnDayClick(lastSelectedDate.Value);\r\n                return;\r\n            }\r\n\r\n            if (lastSelectedDate != null && IsValidKeyboardSelection(this, lastSelectedDate.Value))\r\n            {\r\n                if (this.SelectionMode == CalendarSelectionMode.SingleRange || this.SelectionMode == CalendarSelectionMode.MultipleRange)\r\n                {\r\n                    this.SelectedDates.ClearInternal();\r\n                    if (shift)\r\n                    {\r\n                        this._isShiftPressed = true;\r\n                        if (!this.HoverStart.HasValue)\r\n                        {\r\n                            this.HoverStart = this.HoverEnd = this.CurrentDate;\r\n                        }\r\n                        \r\n                        // If we hit a BlackOutDay with keyboard we do not update the HoverEnd\r\n                        CalendarDateRange range;\r\n\r\n                        if (DateTime.Compare(this.HoverStart.Value, lastSelectedDate.Value) < 0)\r\n                        {\r\n                            range = new CalendarDateRange(this.HoverStart.Value, lastSelectedDate.Value);\r\n                        }\r\n                        else\r\n                        {\r\n                            range = new CalendarDateRange(lastSelectedDate.Value, this.HoverStart.Value);\r\n                        }\r\n\r\n                        if (!this.BlackoutDates.ContainsAny(range))\r\n                        {\r\n                            this._currentDate = lastSelectedDate;\r\n                            this.HoverEnd = lastSelectedDate;\r\n                        }\r\n\r\n                        OnDayClick(this.CurrentDate);\r\n                    }\r\n                    else\r\n                    {\r\n                        this.HoverStart = this.HoverEnd = this.CurrentDate = lastSelectedDate.Value;\r\n                        AddKeyboardSelection();\r\n                        OnDayClick(lastSelectedDate.Value);                        \r\n                    }                    \r\n                }\r\n                else\r\n                {\r\n                    // ON CLEAR \r\n                    this.CurrentDate = lastSelectedDate.Value;\r\n                    this.HoverStart = this.HoverEnd = null;\r\n                    if (this.SelectedDates.Count > 0)\r\n                    {\r\n                        this.SelectedDates[0] = lastSelectedDate.Value;\r\n                    }\r\n                    else\r\n                    {\r\n                        this.SelectedDates.Add(lastSelectedDate.Value);\r\n                    }\r\n\r\n                    OnDayClick(lastSelectedDate.Value);\r\n                }\r\n\r\n                UpdateCellItems();\r\n            }\r\n        }\r\n\r\n        private void ProcessShiftKeyUp()\r\n        {\r\n            if (this._isShiftPressed && (this.SelectionMode == CalendarSelectionMode.SingleRange || this.SelectionMode == CalendarSelectionMode.MultipleRange))\r\n            {\r\n                AddKeyboardSelection();\r\n                this._isShiftPressed = false;\r\n                this.HoverStart = this.HoverEnd = null;\r\n            }\r\n        }\r\n\r\n        private void ProcessUpKey(bool ctrl, bool shift)\r\n        {\r\n            switch (this.DisplayMode)\r\n            {\r\n                case CalendarMode.Month:\r\n                {\r\n                    if (ctrl)\r\n                    {\r\n                        this.DisplayMode = CalendarMode.Year;\r\n                        FocusDate(this.DisplayDate);\r\n                    }\r\n                    else\r\n                    {\r\n                        DateTime? selectedDate = this._blackoutDates.GetNonBlackoutDate(DateTimeHelper.AddDays(this.CurrentDate, -COLS), -1);\r\n                        ProcessSelection(shift, selectedDate);\r\n                    }\r\n\r\n                    break;\r\n                }\r\n\r\n                case CalendarMode.Year:\r\n                {\r\n                    if (ctrl)\r\n                    {\r\n                        this.DisplayMode = CalendarMode.Decade;\r\n                        FocusDate(this.DisplayDate);\r\n                    }\r\n                    else\r\n                    {\r\n                        DateTime? selectedMonth = DateTimeHelper.AddMonths(this.DisplayDate, -YEAR_COLS);\r\n                        OnSelectedMonthChanged(selectedMonth);\r\n                    }\r\n\r\n                    break;\r\n                }\r\n\r\n                case CalendarMode.Decade:\r\n                {\r\n                    if (!ctrl)\r\n                    {\r\n                        DateTime? selectedYear = DateTimeHelper.AddYears(this.DisplayDate, -YEAR_COLS);\r\n                        OnSelectedYearChanged(selectedYear);\r\n                    }\r\n\r\n                    break;\r\n                }\r\n            }\r\n        }\r\n\r\n        #endregion Private Methods\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Calendar/Microsoft/Windows/Controls/CalendarBlackoutDatesCollection.cs",
    "content": "﻿//---------------------------------------------------------------------------\r\n//\r\n// Copyright (C) Microsoft Corporation.  All rights reserved.\r\n//\r\n//---------------------------------------------------------------------------\r\n\r\nusing System;\r\nusing System.Collections.ObjectModel;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics;\r\nusing System.Threading;\r\n\r\nnamespace Microsoft.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Represents a collection of DateTimeRanges.\r\n    /// </summary>\r\n    public sealed class CalendarBlackoutDatesCollection : ObservableCollection<CalendarDateRange>\r\n    {\r\n        #region Data\r\n\r\n        private Thread _dispatcherThread;\r\n        private Calendar _owner;\r\n\r\n        #endregion Data\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the CalendarBlackoutDatesCollection class.\r\n        /// </summary>\r\n        /// <param name=\"owner\"></param>\r\n        public CalendarBlackoutDatesCollection(Calendar owner)\r\n        {\r\n            _owner = owner;\r\n            this._dispatcherThread = Thread.CurrentThread;\r\n        }\r\n\r\n        #region Public Methods\r\n\r\n        /// <summary>\r\n        /// Dates that are in the past are added to the BlackoutDates.\r\n        /// </summary>\r\n        public void AddDatesInPast()\r\n        {\r\n            this.Add(new CalendarDateRange(DateTime.MinValue, DateTime.Today.AddDays(-1)));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Checks if a DateTime is in the Collection\r\n        /// </summary>\r\n        /// <param name=\"date\"></param>\r\n        /// <returns></returns>\r\n        public bool Contains(DateTime date)\r\n        {\r\n            return null != GetContainingDateRange(date);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Checks if a Range is in the collection\r\n        /// </summary>\r\n        /// <param name=\"start\"></param>\r\n        /// <param name=\"end\"></param>\r\n        /// <returns></returns>\r\n        public bool Contains(DateTime start, DateTime end)\r\n        {\r\n            DateTime rangeStart, rangeEnd;\r\n            int n = Count;\r\n\r\n            if (DateTime.Compare(end, start) > -1)\r\n            {\r\n                rangeStart = DateTimeHelper.DiscardTime(start).Value;\r\n                rangeEnd = DateTimeHelper.DiscardTime(end).Value;\r\n            }\r\n            else\r\n            {\r\n                rangeStart = DateTimeHelper.DiscardTime(end).Value;\r\n                rangeEnd = DateTimeHelper.DiscardTime(start).Value;\r\n            }\r\n\r\n            for (int i = 0; i < n; i++)\r\n            {\r\n                if (DateTime.Compare(this[i].Start, rangeStart) == 0 && DateTime.Compare(this[i].End, rangeEnd) == 0)\r\n                {\r\n                    return true;\r\n                }\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns true if any day in the given DateTime range is contained in the BlackOutDays.\r\n        /// </summary>\r\n        /// <param name=\"range\">CalendarDateRange that is searched in BlackOutDays</param>\r\n        /// <returns>true if at least one day in the range is included in the BlackOutDays</returns>\r\n        public bool ContainsAny(CalendarDateRange range)\r\n        {\r\n            foreach (CalendarDateRange item in this)\r\n            {\r\n                if (item.ContainsAny(range))\r\n                {\r\n                    return true;\r\n                }\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        /// <summary>\r\n        /// This finds the next date that is not blacked out in a certian direction.\r\n        /// </summary>\r\n        /// <param name=\"requestedDate\"></param>\r\n        /// <param name=\"dayInterval\"></param>\r\n        /// <returns></returns>\r\n        internal DateTime? GetNonBlackoutDate(DateTime? requestedDate, int dayInterval)\r\n        {\r\n            Debug.Assert(dayInterval != 0);\r\n\r\n            DateTime? currentDate = requestedDate;\r\n            CalendarDateRange range = null;\r\n\r\n            if (requestedDate == null)\r\n            {\r\n                return null;\r\n            }\r\n\r\n            if ((range = GetContainingDateRange((DateTime)currentDate)) == null)\r\n            {\r\n                return requestedDate;\r\n            }\r\n\r\n            do\r\n            {\r\n                if (dayInterval > 0)\r\n                {\r\n                    // Moving Forwards.\r\n                    // The DateRanges require start <= end\r\n                    currentDate = DateTimeHelper.AddDays(range.End, dayInterval);\r\n\r\n                }\r\n                else\r\n                {\r\n                    //Moving backwards.\r\n                    currentDate = DateTimeHelper.AddDays(range.Start, dayInterval);\r\n                }\r\n\r\n            } while (currentDate != null && ((range = GetContainingDateRange((DateTime)currentDate)) != null));\r\n\r\n\r\n\r\n            return currentDate;\r\n        }\r\n\r\n        #endregion Public Methods\r\n\r\n        #region Protected Methods\r\n\r\n        /// <summary>\r\n        /// All the items in the collection are removed.\r\n        /// </summary>\r\n        protected override void ClearItems()\r\n        {\r\n            if (!IsValidThread())\r\n            {\r\n                throw new NotSupportedException(SR.Get(SRID.CalendarCollection_MultiThreadedCollectionChangeNotSupported));\r\n            }\r\n\r\n            foreach (CalendarDateRange item in Items)\r\n            {\r\n                UnRegisterItem(item);\r\n            }\r\n\r\n            base.ClearItems();\r\n            this._owner.UpdateCellItems();\r\n        }\r\n\r\n        /// <summary>\r\n        /// The item is inserted in the specified place in the collection.\r\n        /// </summary>\r\n        /// <param name=\"index\"></param>\r\n        /// <param name=\"item\"></param>\r\n        protected override void InsertItem(int index, CalendarDateRange item)\r\n        {\r\n            if (!IsValidThread())\r\n            {\r\n                throw new NotSupportedException(SR.Get(SRID.CalendarCollection_MultiThreadedCollectionChangeNotSupported));\r\n            }\r\n\r\n            if (IsValid(item))\r\n            {\r\n                RegisterItem(item);\r\n                base.InsertItem(index, item);\r\n                _owner.UpdateCellItems();\r\n            }\r\n            else\r\n            {\r\n                throw new ArgumentOutOfRangeException(SR.Get(SRID.Calendar_UnSelectableDates));\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// The item in the specified index is removed from the collection.\r\n        /// </summary>\r\n        /// <param name=\"index\"></param>\r\n        protected override void RemoveItem(int index)\r\n        {\r\n            if (!IsValidThread())\r\n            {\r\n                throw new NotSupportedException(SR.Get(SRID.CalendarCollection_MultiThreadedCollectionChangeNotSupported));\r\n            }\r\n\r\n            if (index >= 0 && index < this.Count)\r\n            {\r\n                UnRegisterItem(Items[index]);\r\n            }\r\n\r\n            base.RemoveItem(index);\r\n            _owner.UpdateCellItems();\r\n        }\r\n\r\n        /// <summary>\r\n        /// The object in the specified index is replaced with the provided item.\r\n        /// </summary>\r\n        /// <param name=\"index\"></param>\r\n        /// <param name=\"item\"></param>\r\n        protected override void SetItem(int index, CalendarDateRange item)\r\n        {\r\n            if (!IsValidThread())\r\n            {\r\n                throw new NotSupportedException(SR.Get(SRID.CalendarCollection_MultiThreadedCollectionChangeNotSupported));\r\n            }\r\n\r\n            if (IsValid(item))\r\n            {\r\n                CalendarDateRange oldItem = null;\r\n                if (index >= 0 && index < this.Count)\r\n                {\r\n                    oldItem = Items[index];\r\n                }\r\n\r\n                base.SetItem(index, item);\r\n\r\n                UnRegisterItem(oldItem);\r\n                RegisterItem(Items[index]);\r\n\r\n                _owner.UpdateCellItems();\r\n            }\r\n            else\r\n            {\r\n                throw new ArgumentOutOfRangeException(SR.Get(SRID.Calendar_UnSelectableDates));\r\n            }\r\n        }\r\n\r\n        #endregion Protected Methods\r\n\r\n        #region Private Methods\r\n\r\n        /// <summary>\r\n        /// Registers for change notification on date ranges\r\n        /// </summary>\r\n        /// <param name=\"item\"></param>\r\n        private void RegisterItem(CalendarDateRange item)\r\n        {\r\n            if (item != null)\r\n            {\r\n                item.Changing += new EventHandler<CalendarDateRangeChangingEventArgs>(Item_Changing);\r\n                item.PropertyChanged += new PropertyChangedEventHandler(Item_PropertyChanged);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Un registers for change notification on date ranges\r\n        /// </summary>\r\n        private void UnRegisterItem(CalendarDateRange item)\r\n        {\r\n            if (item != null)\r\n            {\r\n                item.Changing -= new EventHandler<CalendarDateRangeChangingEventArgs>(Item_Changing);\r\n                item.PropertyChanged -= new PropertyChangedEventHandler(Item_PropertyChanged);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Reject date range changes that would make the blackout dates collection invalid\r\n        /// </summary>\r\n        /// <param name=\"sender\"></param>\r\n        /// <param name=\"e\"></param>\r\n        private void Item_Changing(object sender, CalendarDateRangeChangingEventArgs e)\r\n        {\r\n            CalendarDateRange item = sender as CalendarDateRange;\r\n            if (item != null)\r\n            {\r\n                if (!IsValid(e.Start, e.End))\r\n                {\r\n                    throw new ArgumentOutOfRangeException(SR.Get(SRID.Calendar_UnSelectableDates));\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Update the calendar view to reflect the new blackout dates\r\n        /// </summary>\r\n        /// <param name=\"sender\"></param>\r\n        /// <param name=\"e\"></param>\r\n        private void Item_PropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            if (sender is CalendarDateRange)\r\n            {\r\n                _owner.UpdateCellItems();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Tests to see if a date range is not already selected\r\n        /// </summary>\r\n        /// <param name=\"item\">date range to test</param>\r\n        /// <returns>True if no selected day falls in the given date range</returns>\r\n        private bool IsValid(CalendarDateRange item)\r\n        {\r\n            return IsValid(item.Start, item.End);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Tests to see if a date range is not already selected\r\n        /// </summary>\r\n        /// <param name=\"start\">First day of date range to test</param>\r\n        /// <param name=\"end\">Last day of date range to test</param>\r\n        /// <returns>True if no selected day falls between start and end</returns>\r\n        private bool IsValid(DateTime start, DateTime end)\r\n        {\r\n            foreach (object child in _owner.SelectedDates)\r\n            {\r\n                DateTime? day = child as DateTime?;\r\n                Debug.Assert(day != null);\r\n                if (DateTimeHelper.InRange(day.Value, start, end))\r\n                {\r\n                    return false;\r\n                }\r\n            }\r\n\r\n            return true;\r\n        }\r\n\r\n        private bool IsValidThread()\r\n        {\r\n            return Thread.CurrentThread == this._dispatcherThread;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the DateRange that contains the date.\r\n        /// </summary>\r\n        /// <param name=\"date\"></param>\r\n        /// <returns></returns>\r\n        private CalendarDateRange GetContainingDateRange(DateTime date)\r\n        {\r\n            if (date == null)\r\n                return null;\r\n\r\n            for (int i = 0; i < Count; i++)\r\n            {\r\n                if (DateTimeHelper.InRange(date, this[i]))\r\n                {\r\n                    return this[i];\r\n                }\r\n            }\r\n            return null;\r\n        }\r\n\r\n        #endregion Private Methods\r\n    }\r\n}\r\n\r\n"
  },
  {
    "path": "WpfToolkit/Calendar/Microsoft/Windows/Controls/CalendarButton.cs",
    "content": "﻿//---------------------------------------------------------------------------\r\n//\r\n// Copyright (C) Microsoft Corporation.  All rights reserved.\r\n//\r\n//---------------------------------------------------------------------------\r\n\r\nusing System.Windows;\r\nusing System.Windows.Automation.Peers;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing Microsoft.Windows.Automation.Peers;\r\n\r\nnamespace Microsoft.Windows.Controls.Primitives\r\n{\r\n    /// <summary>\r\n    /// Represents a button control used in Calendar Control, which reacts to the Click event.\r\n    /// </summary>\r\n    [TemplateVisualState(Name = VisualStates.StateNormal, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StateMouseOver, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StatePressed, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StateDisabled, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StateUnselected, GroupName = VisualStates.GroupSelection)]\r\n    [TemplateVisualState(Name = VisualStates.StateSelected, GroupName = VisualStates.GroupSelection)]\r\n    [TemplateVisualState(Name = VisualStates.StateCalendarButtonUnfocused, GroupName = VisualStates.GroupCalendarButtonFocus)]\r\n    [TemplateVisualState(Name = VisualStates.StateCalendarButtonFocused, GroupName = VisualStates.GroupCalendarButtonFocus)]\r\n    [TemplateVisualState(Name = VisualStates.StateInactive, GroupName = VisualStates.GroupActive)]\r\n    [TemplateVisualState(Name = VisualStates.StateActive, GroupName = VisualStates.GroupActive)]\r\n    public sealed class CalendarButton : Button\r\n    {\r\n        #region Data\r\n\r\n        private bool _shouldCoerceContent;\r\n        private object _coercedContent;\r\n\r\n        #endregion Data\r\n\r\n        /// <summary>\r\n        /// Static constructor\r\n        /// </summary>\r\n        static CalendarButton()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(CalendarButton), new FrameworkPropertyMetadata(typeof(CalendarButton)));\r\n            ContentProperty.OverrideMetadata(typeof(CalendarButton), new FrameworkPropertyMetadata(null, OnCoerceContent));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Represents the CalendarButton that is used in Calendar Control.\r\n        /// </summary>\r\n        public CalendarButton()\r\n            : base()\r\n        {\r\n            // Attach the necessary events to their virtual counterparts\r\n            Loaded += delegate { ChangeVisualState(false); };\r\n        }\r\n\r\n        #region Public Properties\r\n\r\n        #region HasSelectedDays\r\n\r\n        internal static readonly DependencyPropertyKey HasSelectedDaysPropertyKey = DependencyProperty.RegisterReadOnly(\r\n            \"HasSelectedDays\",\r\n            typeof(bool),\r\n            typeof(CalendarButton),\r\n            new FrameworkPropertyMetadata(false, new PropertyChangedCallback(OnVisualStatePropertyChanged)));\r\n\r\n        /// <summary>\r\n        /// Dependency property field for HasSelectedDays property\r\n        /// </summary>\r\n        public static readonly DependencyProperty HasSelectedDaysProperty = HasSelectedDaysPropertyKey.DependencyProperty;\r\n\r\n        /// <summary>\r\n        /// True if the CalendarButton represents a date range containing the display date\r\n        /// </summary>\r\n        public bool HasSelectedDays\r\n        {\r\n            get { return (bool)GetValue(HasSelectedDaysProperty); }\r\n            internal set { SetValue(HasSelectedDaysPropertyKey, value); }\r\n        }\r\n\r\n        #endregion HasSelectedDays\r\n\r\n        #region IsInactive\r\n\r\n        internal static readonly DependencyPropertyKey IsInactivePropertyKey = DependencyProperty.RegisterReadOnly(\r\n            \"IsInactive\",\r\n            typeof(bool),\r\n            typeof(CalendarButton),\r\n            new FrameworkPropertyMetadata(false, new PropertyChangedCallback(OnVisualStatePropertyChanged)));\r\n\r\n        /// <summary>\r\n        /// Dependency property field for IsInactive property\r\n        /// </summary>\r\n        public static readonly DependencyProperty IsInactiveProperty = IsInactivePropertyKey.DependencyProperty;\r\n\r\n        /// <summary>\r\n        /// True if the CalendarButton represents\r\n        ///     a month that falls outside the current year \r\n        ///     or \r\n        ///     a year that falls outside the current decade\r\n        /// </summary>\r\n        public bool IsInactive\r\n        {\r\n            get { return (bool)GetValue(IsInactiveProperty); }\r\n            internal set { SetValue(IsInactivePropertyKey, value); }\r\n        }\r\n\r\n        #endregion IsInactive\r\n\r\n        #endregion Public Properties\r\n\r\n        #region Internal Properties\r\n\r\n        internal Microsoft.Windows.Controls.Calendar Owner\r\n        {\r\n            get;\r\n            set;\r\n        }\r\n\r\n        #endregion Internal Properties\r\n\r\n        #region Public Methods\r\n\r\n        /// <summary>\r\n        /// Apply a template to the button.\r\n        /// </summary>\r\n        public override void OnApplyTemplate()\r\n        {\r\n            base.OnApplyTemplate();\r\n\r\n            // Sync the logical and visual states of the control\r\n            ChangeVisualState(false);\r\n        }\r\n\r\n        #endregion Public Methods\r\n\r\n        #region Protected Methods\r\n\r\n        /// <summary>\r\n        /// Creates the automation peer for the DayButton.\r\n        /// </summary>\r\n        /// <returns></returns>\r\n        protected override AutomationPeer OnCreateAutomationPeer()\r\n        {\r\n            return new CalendarButtonAutomationPeer(this);\r\n        }\r\n\r\n        protected override void OnGotKeyboardFocus(System.Windows.Input.KeyboardFocusChangedEventArgs e)\r\n        {\r\n            ChangeVisualState(true);\r\n            base.OnGotKeyboardFocus(e);\r\n        }\r\n\r\n        protected override void OnLostKeyboardFocus(System.Windows.Input.KeyboardFocusChangedEventArgs e)\r\n        {\r\n            ChangeVisualState(true);\r\n            base.OnLostKeyboardFocus(e);\r\n        }\r\n\r\n        #endregion Protected Methods\r\n\r\n        #region Internal Methods\r\n\r\n        internal void SetContentInternal(string value)\r\n        {\r\n            if (BindingOperations.GetBindingExpressionBase(this, ContentControl.ContentProperty) != null)\r\n            {\r\n                Content = value;\r\n            }\r\n            else\r\n            {\r\n                this._shouldCoerceContent = true;\r\n                this._coercedContent = value;\r\n                this.CoerceValue(ContentControl.ContentProperty);\r\n            }\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region Private Methods\r\n\r\n        /// <summary>\r\n        /// Change to the correct visual state for the button.\r\n        /// </summary>\r\n        /// <param name=\"useTransitions\">\r\n        /// true to use transitions when updating the visual state, false to\r\n        /// snap directly to the new visual state.\r\n        /// </param>\r\n        private void ChangeVisualState(bool useTransitions)\r\n        {\r\n            // Update the SelectionStates group\r\n            if (HasSelectedDays)\r\n            {\r\n                VisualStates.GoToState(this, useTransitions, VisualStates.StateSelected, VisualStates.StateUnselected);\r\n            }\r\n            else\r\n            {\r\n                VisualStates.GoToState(this, useTransitions, VisualStates.StateUnselected);\r\n            }\r\n\r\n            // Update the ActiveStates group\r\n            if (IsInactive)\r\n            {\r\n                VisualStates.GoToState(this, useTransitions, VisualStates.StateInactive);\r\n            }\r\n            else\r\n            {\r\n                VisualStates.GoToState(this, useTransitions, VisualStates.StateActive, VisualStates.StateInactive);\r\n            }\r\n\r\n            // Update the FocusStates group\r\n            if (IsKeyboardFocused)\r\n            {\r\n                VisualStates.GoToState(this, useTransitions, VisualStates.StateCalendarButtonFocused, VisualStates.StateCalendarButtonUnfocused);\r\n            }\r\n            else\r\n            {\r\n                VisualStateManager.GoToState(this, VisualStates.StateCalendarButtonUnfocused, useTransitions);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Common PropertyChangedCallback for dependency properties that trigger visual state changes\r\n        /// </summary>\r\n        /// <param name=\"dObject\"></param>\r\n        /// <param name=\"e\"></param>\r\n        private static void OnVisualStatePropertyChanged(DependencyObject dObject, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            CalendarButton button = dObject as CalendarButton;\r\n            if (button != null && !object.Equals(e.OldValue, e.NewValue))\r\n            {\r\n                button.ChangeVisualState(true);\r\n            }\r\n        }\r\n\r\n        private static object OnCoerceContent(DependencyObject sender, object baseValue)\r\n        {\r\n            CalendarButton button = (CalendarButton)sender;\r\n            if (button._shouldCoerceContent)\r\n            {\r\n                button._shouldCoerceContent = false;\r\n                return button._coercedContent;\r\n            }\r\n\r\n            return baseValue;\r\n        }\r\n\r\n        #endregion Private Methods\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Calendar/Microsoft/Windows/Controls/CalendarDateChangedEventArgs.cs",
    "content": "﻿//---------------------------------------------------------------------------\r\n//\r\n// Copyright (C) Microsoft Corporation.  All rights reserved.\r\n//\r\n//---------------------------------------------------------------------------\r\n\r\nusing System;\r\n\r\nnamespace Microsoft.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Provides data for the DateSelected and DisplayDateChanged events.\r\n    /// </summary>\r\n    public class CalendarDateChangedEventArgs : System.Windows.RoutedEventArgs\r\n    {\r\n        internal CalendarDateChangedEventArgs(DateTime? removedDate, DateTime? addedDate)\r\n        {\r\n            this.RemovedDate = removedDate;\r\n            this.AddedDate = addedDate;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the date to be newly displayed.\r\n        /// </summary>\r\n        public DateTime? AddedDate\r\n        {\r\n            get;\r\n            private set;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the date that was previously displayed.\r\n        /// </summary>\r\n        public DateTime? RemovedDate\r\n        {\r\n            get;\r\n            private set;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Calendar/Microsoft/Windows/Controls/CalendarDateRange.cs",
    "content": "﻿//---------------------------------------------------------------------------\r\n//\r\n// Copyright (C) Microsoft Corporation.  All rights reserved.\r\n//\r\n//---------------------------------------------------------------------------\r\n\r\nusing System;\r\nusing System.ComponentModel;\r\n\r\nnamespace Microsoft.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Specifies a DateTime range class which has a start and end.\r\n    /// </summary>\r\n    public sealed class CalendarDateRange : INotifyPropertyChanged\r\n    {\r\n        #region Data\r\n        private DateTime _end;\r\n        private DateTime _start;\r\n        #endregion Data\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the CalendarDateRange class.\r\n        /// </summary>\r\n        public CalendarDateRange() :\r\n            this(DateTime.MinValue, DateTime.MaxValue)\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the CalendarDateRange class which creates a range from a single DateTime value.\r\n        /// </summary>\r\n        /// <param name=\"day\"></param>\r\n        public CalendarDateRange(DateTime day) :\r\n            this(day, day)\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the CalendarDateRange class which accepts range start and end dates.\r\n        /// </summary>\r\n        /// <param name=\"start\"></param>\r\n        /// <param name=\"end\"></param>\r\n        public CalendarDateRange(DateTime start, DateTime end)\r\n        {\r\n            _start = start;\r\n            _end = end;\r\n        }\r\n\r\n        #region Public Events\r\n\r\n        public event PropertyChangedEventHandler PropertyChanged;\r\n\r\n        #endregion\r\n\r\n        #region Public Properties\r\n\r\n        /// <summary>\r\n        /// Specifies the End date of the CalendarDateRange.\r\n        /// </summary>\r\n        public DateTime End\r\n        {\r\n            get \r\n            { \r\n                return CoerceEnd(_start, _end);\r\n            }\r\n\r\n            set\r\n            {\r\n                DateTime newEnd = CoerceEnd(_start, value);\r\n                if (newEnd != End)\r\n                {\r\n                    OnChanging(new CalendarDateRangeChangingEventArgs(_start, newEnd));\r\n                    _end = value;\r\n                    OnPropertyChanged(new PropertyChangedEventArgs(\"End\"));\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Specifies the Start date of the CalendarDateRange.\r\n        /// </summary>\r\n        public DateTime Start\r\n        {\r\n            get \r\n            { \r\n                return _start; \r\n            }\r\n\r\n            set \r\n            { \r\n                if (_start != value)\r\n                {\r\n                    DateTime oldEnd = End;\r\n                    DateTime newEnd = CoerceEnd(value, _end);\r\n\r\n                    OnChanging(new CalendarDateRangeChangingEventArgs(value, newEnd));\r\n\r\n                    _start = value;\r\n\r\n                    OnPropertyChanged(new PropertyChangedEventArgs(\"Start\"));\r\n\r\n                    if (newEnd != oldEnd)\r\n                    {\r\n                        OnPropertyChanged(new PropertyChangedEventArgs(\"End\"));\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        #endregion Public Properties\r\n\r\n        #region Internal Events\r\n\r\n        internal event EventHandler<CalendarDateRangeChangingEventArgs> Changing;\r\n\r\n        #endregion Internal Events\r\n\r\n        #region Internal Methods\r\n\r\n        /// <summary>\r\n        /// Returns true if any day in the given DateTime range is contained in the current CalendarDateRange.\r\n        /// </summary>\r\n        /// <param name=\"range\"></param>\r\n        /// <returns></returns>\r\n        internal bool ContainsAny(CalendarDateRange range)\r\n        {\r\n            return (range.End >= this.Start) && (this.End >= range.Start);\r\n        }\r\n\r\n        #endregion Internal Methods\r\n\r\n        #region Private Methods\r\n\r\n        private void OnChanging(CalendarDateRangeChangingEventArgs e)\r\n        {\r\n            EventHandler<CalendarDateRangeChangingEventArgs> handler = this.Changing;\r\n            if (handler != null)\r\n            {\r\n                handler(this, e);\r\n            }\r\n        }\r\n\r\n        private void OnPropertyChanged(PropertyChangedEventArgs e)\r\n        {\r\n            PropertyChangedEventHandler handler = this.PropertyChanged;\r\n            if (handler != null)\r\n            {\r\n                handler(this, e);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Coerced the end parameter to satisfy the start &lt;= end constraint\r\n        /// </summary>\r\n        /// <param name=\"start\"></param>\r\n        /// <param name=\"end\"></param>\r\n        /// <returns>If start &lt;= end the end parameter otherwise the start parameter</returns>\r\n        private static DateTime CoerceEnd(DateTime start, DateTime end)\r\n        {\r\n            return (DateTime.Compare(start, end) <= 0) ? end : start;\r\n        }\r\n\r\n        #endregion Private Methods\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Calendar/Microsoft/Windows/Controls/CalendarDateRangeChangingEventArgs.cs",
    "content": "//---------------------------------------------------------------------------\r\n//\r\n// Copyright (C) Microsoft Corporation.  All rights reserved.\r\n//\r\n//---------------------------------------------------------------------------\r\n\r\nusing System;\r\n\r\nnamespace Microsoft.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Event arguments to notify clients that the range is changing and what the new range will be\r\n    /// </summary>\r\n    internal class CalendarDateRangeChangingEventArgs : EventArgs\r\n    {\r\n        public CalendarDateRangeChangingEventArgs(DateTime start, DateTime end)\r\n        {\r\n            _start = start;\r\n            _end = end;\r\n        }\r\n\r\n        public DateTime Start\r\n        {\r\n            get { return _start; }\r\n        }\r\n\r\n        public DateTime End\r\n        {\r\n            get { return _end; }\r\n        }\r\n\r\n        private DateTime _start;\r\n        private DateTime _end;\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Calendar/Microsoft/Windows/Controls/CalendarDayButton.cs",
    "content": "﻿//---------------------------------------------------------------------------\r\n//\r\n// Copyright (C) Microsoft Corporation.  All rights reserved.\r\n//\r\n//---------------------------------------------------------------------------\r\n\r\nusing System.Windows;\r\nusing System.Windows.Automation.Peers;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing Microsoft.Windows.Automation.Peers;\r\n\r\nnamespace Microsoft.Windows.Controls.Primitives\r\n{\r\n    /// <summary>\r\n    /// Represents a button control used in Calendar Control, which reacts to the Click event.\r\n    /// </summary>\r\n    [TemplateVisualState(Name = VisualStates.StateNormal, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StateMouseOver, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StatePressed, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StateDisabled, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StateUnselected, GroupName = VisualStates.GroupSelection)]\r\n    [TemplateVisualState(Name = VisualStates.StateSelected, GroupName = VisualStates.GroupSelection)]\r\n    [TemplateVisualState(Name = VisualStates.StateCalendarButtonUnfocused, GroupName = VisualStates.GroupCalendarButtonFocus)]\r\n    [TemplateVisualState(Name = VisualStates.StateCalendarButtonFocused, GroupName = VisualStates.GroupCalendarButtonFocus)]\r\n    [TemplateVisualState(Name = VisualStates.StateInactive, GroupName = VisualStates.GroupActive)]\r\n    [TemplateVisualState(Name = VisualStates.StateActive, GroupName = VisualStates.GroupActive)]\r\n    [TemplateVisualState(Name = CalendarDayButton.StateRegularDay, GroupName = CalendarDayButton.GroupDay)]\r\n    [TemplateVisualState(Name = CalendarDayButton.StateToday, GroupName = CalendarDayButton.GroupDay)]\r\n    [TemplateVisualState(Name = CalendarDayButton.StateNormalDay, GroupName = CalendarDayButton.GroupBlackout)]\r\n    [TemplateVisualState(Name = CalendarDayButton.StateBlackoutDay, GroupName = CalendarDayButton.GroupBlackout)]\r\n    public sealed class CalendarDayButton : Button\r\n    {\r\n        #region Constants\r\n        /// <summary>\r\n        /// Default content for the CalendarDayButton\r\n        /// </summary>\r\n        private const int DEFAULTCONTENT = 1;\r\n\r\n        /// <summary>\r\n        /// Identifies the Today state.\r\n        /// </summary>\r\n        internal const string StateToday = \"Today\";\r\n\r\n        /// <summary>\r\n        /// Identifies the RegularDay state.\r\n        /// </summary>\r\n        internal const string StateRegularDay = \"RegularDay\";\r\n\r\n        /// <summary>\r\n        /// Name of the Day state group.\r\n        /// </summary>\r\n        internal const string GroupDay = \"DayStates\";\r\n\r\n        /// <summary>\r\n        /// Identifies the BlackoutDay state.\r\n        /// </summary>\r\n        internal const string StateBlackoutDay = \"BlackoutDay\";\r\n\r\n        /// <summary>\r\n        /// Identifies the NormalDay state.\r\n        /// </summary>\r\n        internal const string StateNormalDay = \"NormalDay\";\r\n\r\n        /// <summary>\r\n        /// Name of the BlackoutDay state group.\r\n        /// </summary>\r\n        internal const string GroupBlackout = \"BlackoutDayStates\";\r\n\r\n        #endregion Constants\r\n\r\n        #region Data\r\n\r\n        private bool _shouldCoerceContent;\r\n        private object _coercedContent;\r\n\r\n        #endregion Data\r\n\r\n        /// <summary>\r\n        /// Static constructor\r\n        /// </summary>\r\n        static CalendarDayButton()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(CalendarDayButton), new FrameworkPropertyMetadata(typeof(CalendarDayButton)));\r\n            ContentProperty.OverrideMetadata(typeof(CalendarDayButton), new FrameworkPropertyMetadata(null, OnCoerceContent));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Represents the CalendarDayButton that is used in Calendar Control.\r\n        /// </summary>\r\n        public CalendarDayButton()\r\n            : base()\r\n        {\r\n            // Attach the necessary events to their virtual counterparts\r\n            Loaded += delegate { ChangeVisualState(false); };\r\n        }\r\n\r\n        #region Public Properties\r\n\r\n        #region IsToday\r\n\r\n        internal static readonly DependencyPropertyKey IsTodayPropertyKey = DependencyProperty.RegisterReadOnly(\r\n            \"IsToday\",\r\n            typeof(bool),\r\n            typeof(CalendarDayButton),\r\n            new FrameworkPropertyMetadata(false, new PropertyChangedCallback(OnVisualStatePropertyChanged)));\r\n\r\n        /// <summary>\r\n        /// Dependency property field for IsToday property\r\n        /// </summary>\r\n        public static readonly DependencyProperty IsTodayProperty = IsTodayPropertyKey.DependencyProperty;\r\n\r\n        /// <summary>\r\n        /// True if the CalendarDayButton represents today\r\n        /// </summary>\r\n        public bool IsToday\r\n        {\r\n            get { return (bool)GetValue(IsTodayProperty); }\r\n        }\r\n\r\n        #endregion IsToday\r\n\r\n        #region IsSelected\r\n\r\n        internal static readonly DependencyPropertyKey IsSelectedPropertyKey = DependencyProperty.RegisterReadOnly(\r\n            \"IsSelected\",\r\n            typeof(bool),\r\n            typeof(CalendarDayButton),\r\n            new FrameworkPropertyMetadata(false, new PropertyChangedCallback(OnVisualStatePropertyChanged)));\r\n\r\n        /// <summary>\r\n        /// Dependency property field for IsSelected property\r\n        /// </summary>\r\n        public static readonly DependencyProperty IsSelectedProperty = IsSelectedPropertyKey.DependencyProperty;\r\n\r\n        /// <summary>\r\n        /// True if the CalendarDayButton is selected\r\n        /// </summary>\r\n        public bool IsSelected\r\n        {\r\n            get { return (bool)GetValue(IsSelectedProperty); }\r\n        }\r\n\r\n        #endregion IsSelected\r\n\r\n        #region IsInactive\r\n\r\n        internal static readonly DependencyPropertyKey IsInactivePropertyKey = DependencyProperty.RegisterReadOnly(\r\n            \"IsInactive\",\r\n            typeof(bool),\r\n            typeof(CalendarDayButton),\r\n            new FrameworkPropertyMetadata(false, new PropertyChangedCallback(OnVisualStatePropertyChanged)));\r\n\r\n        /// <summary>\r\n        /// Dependency property field for IsActive property\r\n        /// </summary>\r\n        public static readonly DependencyProperty IsInactiveProperty = IsInactivePropertyKey.DependencyProperty;\r\n\r\n        /// <summary>\r\n        /// True if the CalendarDayButton represents a day that falls in the currently displayed month\r\n        /// </summary>\r\n        public bool IsInactive\r\n        {\r\n            get { return (bool)GetValue(IsInactiveProperty); }\r\n        }\r\n\r\n        #endregion IsInactive\r\n\r\n        #region IsBlackedOut\r\n\r\n        internal static readonly DependencyPropertyKey IsBlackedOutPropertyKey = DependencyProperty.RegisterReadOnly(\r\n            \"IsBlackedOut\",\r\n            typeof(bool),\r\n            typeof(CalendarDayButton),\r\n            new FrameworkPropertyMetadata(false, new PropertyChangedCallback(OnVisualStatePropertyChanged)));\r\n\r\n        /// <summary>\r\n        /// Dependency property field for IsBlackedOut property\r\n        /// </summary>\r\n        public static readonly DependencyProperty IsBlackedOutProperty = IsBlackedOutPropertyKey.DependencyProperty;\r\n\r\n        /// <summary>\r\n        /// True if the CalendarDayButton represents a blackout date\r\n        /// </summary>\r\n        public bool IsBlackedOut\r\n        {\r\n            get { return (bool)GetValue(IsBlackedOutProperty); }\r\n        }\r\n\r\n        #endregion IsBlackedOut\r\n\r\n        #region IsHighlighted\r\n\r\n        internal static readonly DependencyPropertyKey IsHighlightedPropertyKey = DependencyProperty.RegisterReadOnly(\r\n            \"IsHighlighted\",\r\n            typeof(bool),\r\n            typeof(CalendarDayButton),\r\n            new FrameworkPropertyMetadata(false, new PropertyChangedCallback(OnVisualStatePropertyChanged)));\r\n\r\n        /// <summary>\r\n        /// Dependency property field for IsHighlighted property\r\n        /// </summary>\r\n        public static readonly DependencyProperty IsHighlightedProperty = IsHighlightedPropertyKey.DependencyProperty;\r\n\r\n        /// <summary>\r\n        /// True if the CalendarDayButton represents a highlighted date\r\n        /// </summary>\r\n        public bool IsHighlighted\r\n        {\r\n            get { return (bool)GetValue(IsHighlightedProperty); }\r\n        }\r\n\r\n        #endregion IsHighlighted\r\n\r\n        #endregion Public Properties\r\n\r\n        #region Internal Properties\r\n\r\n        internal Microsoft.Windows.Controls.Calendar Owner\r\n        {\r\n            get;\r\n            set;\r\n        }\r\n\r\n        #endregion Internal Properties\r\n\r\n        #region Public Methods\r\n        /// <summary>\r\n        /// Apply a template to the button.\r\n        /// </summary>\r\n        public override void OnApplyTemplate()\r\n        {\r\n            base.OnApplyTemplate();\r\n\r\n            // Sync the logical and visual states of the control\r\n            ChangeVisualState(false);\r\n        }\r\n\r\n        #endregion Public Methods\r\n\r\n        #region Protected Methods\r\n\r\n        /// <summary>\r\n        /// Creates the automation peer for the CalendarDayButton.\r\n        /// </summary>\r\n        /// <returns></returns>\r\n        protected override AutomationPeer OnCreateAutomationPeer()\r\n        {\r\n            return new CalendarDayButtonAutomationPeer(this);\r\n        }\r\n\r\n        protected override void OnGotKeyboardFocus(System.Windows.Input.KeyboardFocusChangedEventArgs e)\r\n        {\r\n            ChangeVisualState(true);\r\n            base.OnGotKeyboardFocus(e);\r\n        }\r\n\r\n        protected override void OnLostKeyboardFocus(System.Windows.Input.KeyboardFocusChangedEventArgs e)\r\n        {\r\n            ChangeVisualState(true);\r\n            base.OnLostKeyboardFocus(e);\r\n        }\r\n\r\n        #endregion Protected Methods\r\n\r\n        #region Internal Methods\r\n\r\n        /// <summary>\r\n        /// Change to the correct visual state for the button.\r\n        /// </summary>\r\n        /// <param name=\"useTransitions\">\r\n        /// true to use transitions when updating the visual state, false to\r\n        /// snap directly to the new visual state.\r\n        /// </param>\r\n        internal void ChangeVisualState(bool useTransitions)\r\n        {\r\n            if (this.IsEnabled)\r\n            {\r\n                VisualStates.GoToState(this, useTransitions, VisualStates.StateNormal);\r\n            }\r\n            else\r\n            {\r\n                VisualStates.GoToState(this, useTransitions, VisualStates.StateDisabled);\r\n            }\r\n\r\n            // Update the SelectionStates group\r\n            if (IsSelected || IsHighlighted)\r\n            {\r\n                VisualStates.GoToState(this, useTransitions, VisualStates.StateSelected, VisualStates.StateUnselected);\r\n            }\r\n            else\r\n            {\r\n                VisualStates.GoToState(this, useTransitions, VisualStates.StateUnselected);\r\n            }\r\n\r\n            // Update the ActiveStates group\r\n            if (!IsInactive)\r\n            {\r\n                VisualStates.GoToState(this, useTransitions, VisualStates.StateActive, VisualStates.StateInactive);\r\n            }\r\n            else\r\n            {\r\n                VisualStates.GoToState(this, useTransitions, VisualStates.StateInactive);\r\n            }\r\n\r\n            // Update the DayStates group\r\n            if (IsToday && this.Owner != null && this.Owner.IsTodayHighlighted)\r\n            {\r\n                VisualStates.GoToState(this, useTransitions, StateToday, StateRegularDay);\r\n            }\r\n            else\r\n            {\r\n                VisualStates.GoToState(this, useTransitions, StateRegularDay);\r\n            }\r\n\r\n            // Update the BlackoutDayStates group\r\n            if (IsBlackedOut)\r\n            {\r\n                VisualStates.GoToState(this, useTransitions, StateBlackoutDay, StateNormalDay);\r\n            }\r\n            else\r\n            {\r\n                VisualStates.GoToState(this, useTransitions, StateNormalDay);\r\n            }\r\n\r\n            // Update the FocusStates group\r\n            if (IsKeyboardFocused)\r\n            {\r\n                VisualStates.GoToState(this, useTransitions, VisualStates.StateCalendarButtonFocused, VisualStates.StateCalendarButtonUnfocused);\r\n            }\r\n            else\r\n            {\r\n                VisualStateManager.GoToState(this, VisualStates.StateCalendarButtonUnfocused, useTransitions);\r\n            }\r\n        }\r\n\r\n        internal void SetContentInternal(string value)\r\n        {\r\n            if (BindingOperations.GetBindingExpressionBase(this, ContentControl.ContentProperty) != null)\r\n            {\r\n                Content = value;\r\n            }\r\n            else\r\n            {\r\n                this._shouldCoerceContent = true;\r\n                this._coercedContent = value;\r\n                this.CoerceValue(ContentControl.ContentProperty);\r\n            }\r\n        }\r\n\r\n        #endregion Internal Methods\r\n\r\n        #region Private Methods\r\n\r\n        /// <summary>\r\n        /// Common PropertyChangedCallback for dependency properties that trigger visual state changes\r\n        /// </summary>\r\n        /// <param name=\"dObject\"></param>\r\n        /// <param name=\"e\"></param>\r\n        private static void OnVisualStatePropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            CalendarDayButton dayButton = sender as CalendarDayButton;\r\n            if (dayButton != null)\r\n            {\r\n                dayButton.ChangeVisualState(true);\r\n            }\r\n        }\r\n\r\n        private static object OnCoerceContent(DependencyObject sender, object baseValue)\r\n        {\r\n            CalendarDayButton button = (CalendarDayButton)sender;\r\n            if (button._shouldCoerceContent)\r\n            {\r\n                button._shouldCoerceContent = false;\r\n                return button._coercedContent;\r\n            }\r\n\r\n            return baseValue;\r\n        }\r\n\r\n        #endregion Private Methods\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Calendar/Microsoft/Windows/Controls/CalendarItem.cs",
    "content": "﻿//---------------------------------------------------------------------------\r\n//\r\n// Copyright (C) Microsoft Corporation.  All rights reserved.\r\n//\r\n//---------------------------------------------------------------------------\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing System.Windows.Input;\r\n\r\nnamespace Microsoft.Windows.Controls.Primitives\r\n{\r\n    [TemplatePart(Name = CalendarItem.ElementRoot, Type = typeof(FrameworkElement))]\r\n    [TemplatePart(Name = CalendarItem.ElementHeaderButton, Type = typeof(Button))]\r\n    [TemplatePart(Name = CalendarItem.ElementPreviousButton, Type = typeof(Button))]\r\n    [TemplatePart(Name = CalendarItem.ElementNextButton, Type = typeof(Button))]\r\n    [TemplatePart(Name = CalendarItem.ElementDayTitleTemplate, Type = typeof(DataTemplate))]\r\n    [TemplatePart(Name = CalendarItem.ElementMonthView, Type = typeof(Grid))]\r\n    [TemplatePart(Name = CalendarItem.ElementYearView, Type = typeof(Grid))]\r\n    [TemplatePart(Name = CalendarItem.ElementDisabledVisual, Type = typeof(FrameworkElement))]\r\n    [TemplateVisualState(Name = VisualStates.StateNormal, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StateDisabled, GroupName = VisualStates.GroupCommon)]\r\n    public sealed partial class CalendarItem : Control\r\n    {\r\n        #region Constants\r\n        private const string ElementRoot = \"PART_Root\";\r\n        private const string ElementHeaderButton = \"PART_HeaderButton\";\r\n        private const string ElementPreviousButton = \"PART_PreviousButton\";\r\n        private const string ElementNextButton = \"PART_NextButton\";\r\n        private const string ElementDayTitleTemplate = \"DayTitleTemplate\";\r\n        private const string ElementMonthView = \"PART_MonthView\";\r\n        private const string ElementYearView = \"PART_YearView\";\r\n        private const string ElementDisabledVisual = \"PART_DisabledVisual\";\r\n\r\n        private const int COLS = 7;\r\n        private const int ROWS = 7;\r\n        private const int YEAR_COLS = 4;\r\n        private const int YEAR_ROWS = 3;\r\n        private const int NUMBER_OF_DAYS_IN_WEEK = 7;\r\n\r\n        #endregion Constants\r\n\r\n        #region Data\r\n\r\n        private System.Globalization.Calendar _calendar = new GregorianCalendar();\r\n        private DataTemplate _dayTitleTemplate;\r\n        private FrameworkElement _disabledVisual;\r\n        private Button _headerButton;\r\n        private Grid _monthView;\r\n        private Button _nextButton;\r\n        private Button _previousButton;\r\n        private Grid _yearView;\r\n        private bool _isMonthPressed;\r\n        private bool _isDayPressed;\r\n\r\n        #endregion Data\r\n\r\n        static CalendarItem()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(CalendarItem), new FrameworkPropertyMetadata(typeof(CalendarItem)));\r\n            FocusableProperty.OverrideMetadata(typeof(CalendarItem), new FrameworkPropertyMetadata(false));\r\n            KeyboardNavigation.TabNavigationProperty.OverrideMetadata(typeof(CalendarItem), new FrameworkPropertyMetadata(KeyboardNavigationMode.Once));\r\n            KeyboardNavigation.DirectionalNavigationProperty.OverrideMetadata(typeof(CalendarItem), new FrameworkPropertyMetadata(KeyboardNavigationMode.Contained));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Represents the month that is used in Calendar Control.\r\n        /// </summary>\r\n        public CalendarItem()\r\n        {\r\n        }\r\n\r\n        #region Internal Properties\r\n\r\n        internal Grid MonthView\r\n        {\r\n            get { return _monthView; }\r\n        }\r\n\r\n        internal Microsoft.Windows.Controls.Calendar Owner\r\n        {\r\n            get;\r\n            set;\r\n        }\r\n\r\n        internal Grid YearView\r\n        {\r\n            get { return _yearView; }\r\n        }\r\n\r\n        #endregion Internal Properties\r\n\r\n        #region Private Properties\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether the calendar is displayed in months, years or decades.\r\n        /// </summary>\r\n        private CalendarMode DisplayMode\r\n        {\r\n            get\r\n            {\r\n                return (this.Owner != null) ? this.Owner.DisplayMode : CalendarMode.Month;\r\n            }\r\n        }\r\n\r\n        private Button HeaderButton\r\n        {\r\n            get\r\n            {\r\n                return this._headerButton;\r\n            }\r\n        }\r\n\r\n        private Button NextButton\r\n        {\r\n            get\r\n            {\r\n                return this._nextButton;\r\n            }\r\n        }\r\n\r\n        private Button PreviousButton\r\n        {\r\n            get\r\n            {\r\n                return this._previousButton;\r\n            }\r\n        }\r\n\r\n        private DateTime DisplayDate\r\n        {\r\n            get\r\n            {\r\n                return (Owner != null) ? Owner.DisplayDate : DateTime.Today;\r\n            }\r\n        }\r\n\r\n        #endregion Private Properties\r\n\r\n        #region Public Methods\r\n\r\n        /// <summary>\r\n        /// Invoked whenever application code or an internal process, \r\n        /// such as a rebuilding layout pass, calls the ApplyTemplate method.\r\n        /// </summary>\r\n        public override void OnApplyTemplate()\r\n        {\r\n            base.OnApplyTemplate();\r\n\r\n            if (this._previousButton != null)\r\n            {\r\n                this._previousButton.Click -= new RoutedEventHandler(PreviousButton_Click);\r\n            }\r\n\r\n            if (this._nextButton != null)\r\n            {\r\n                this._nextButton.Click -= new RoutedEventHandler(NextButton_Click);\r\n            }\r\n\r\n            if (this._headerButton != null)\r\n            {\r\n                this._headerButton.Click -= new RoutedEventHandler(HeaderButton_Click);\r\n            }\r\n\r\n            _monthView = GetTemplateChild(ElementMonthView) as Grid;\r\n            _yearView = GetTemplateChild(ElementYearView) as Grid;\r\n            _previousButton = GetTemplateChild(ElementPreviousButton) as Button;\r\n            _nextButton = GetTemplateChild(ElementNextButton) as Button;\r\n            _headerButton = GetTemplateChild(ElementHeaderButton) as Button;\r\n            _disabledVisual = GetTemplateChild(ElementDisabledVisual) as FrameworkElement;\r\n\r\n            // WPF Compat: Unlike SL, WPF is not able to get elements in template resources with GetTemplateChild()\r\n            _dayTitleTemplate = null;\r\n            if (Template != null && Template.Resources.Contains(ElementDayTitleTemplate))\r\n            {\r\n                _dayTitleTemplate = Template.Resources[ElementDayTitleTemplate] as DataTemplate;\r\n            }\r\n\r\n            if (this._previousButton != null)\r\n            {\r\n                // If the user does not provide a Content value in template, we provide a helper text that can be used in Accessibility\r\n                // this text is not shown on the UI, just used for Accessibility purposes\r\n                if (this._previousButton.Content == null)\r\n                {\r\n                    this._previousButton.Content = SR.Get(SRID.Calendar_PreviousButtonName);\r\n                }\r\n\r\n                this._previousButton.Click += new RoutedEventHandler(PreviousButton_Click);\r\n            }\r\n\r\n            if (this._nextButton != null)\r\n            {\r\n                // If the user does not provide a Content value in template, we provide a helper text that can be used in Accessibility\r\n                // this text is not shown on the UI, just used for Accessibility purposes\r\n                if (this._nextButton.Content == null)\r\n                {\r\n                    this._nextButton.Content = SR.Get(SRID.Calendar_NextButtonName);\r\n                }\r\n\r\n                this._nextButton.Click += new RoutedEventHandler(NextButton_Click);\r\n            }\r\n\r\n            if (this._headerButton != null)\r\n            {\r\n                this._headerButton.Click += new RoutedEventHandler(HeaderButton_Click);\r\n            }\r\n\r\n            PopulateGrids();\r\n\r\n            if (this.Owner != null)\r\n            {\r\n                switch (this.Owner.DisplayMode)\r\n                {\r\n                    case CalendarMode.Year: \r\n                        UpdateYearMode(); \r\n                        break;\r\n                    case CalendarMode.Decade: \r\n                        UpdateDecadeMode(); \r\n                        break;\r\n                    case CalendarMode.Month: \r\n                        UpdateMonthMode(); \r\n                        break;\r\n\r\n                    default: \r\n                        Debug.Assert(false); \r\n                        break;\r\n                }\r\n            }\r\n            else\r\n            {\r\n                UpdateMonthMode();\r\n            }\r\n        }\r\n\r\n        #endregion Public Methods\r\n\r\n        #region Protected Methods\r\n\r\n        protected override void OnMouseUp(MouseButtonEventArgs e)\r\n        {\r\n            base.OnMouseUp(e);\r\n\r\n            if (this.IsMouseCaptured)\r\n            {\r\n                this.ReleaseMouseCapture();\r\n            }\r\n\r\n            this._isMonthPressed = false;\r\n            this._isDayPressed = false;\r\n\r\n            // In Month mode, we may need to end a drag selection even if  the mouse up isn't on the calendar.\r\n            if (!e.Handled &&\r\n                this.Owner.DisplayMode == CalendarMode.Month &&\r\n                this.Owner.HoverEnd.HasValue)\r\n            {\r\n                FinishSelection(this.Owner.HoverEnd.Value);\r\n            }\r\n        }\r\n\r\n        protected override void OnLostMouseCapture(MouseEventArgs e)\r\n        {\r\n            base.OnLostMouseCapture(e);\r\n\r\n            if (!this.IsMouseCaptured)\r\n            {\r\n                this._isDayPressed = false;\r\n                this._isMonthPressed = false;\r\n            }\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region Internal Methods\r\n\r\n        internal void UpdateDecadeMode()\r\n        {\r\n            DateTime selectedYear;\r\n\r\n            if (this.Owner != null)\r\n            {\r\n                selectedYear = this.Owner.DisplayYear;\r\n            }\r\n            else\r\n            {\r\n                selectedYear = DateTime.Today;\r\n            }\r\n\r\n            int decade = GetDecadeForDecadeMode(selectedYear);\r\n            int decadeEnd = decade + 9;\r\n\r\n            SetDecadeModeHeaderButton(decade);\r\n            SetDecadeModePreviousButton(decade);\r\n            SetDecadeModeNextButton(decadeEnd);\r\n\r\n            if (_yearView != null)\r\n            {\r\n                SetYearButtons(decade, decadeEnd);\r\n            }\r\n        }\r\n\r\n        internal void UpdateMonthMode()\r\n        {\r\n            SetMonthModeHeaderButton();\r\n            SetMonthModePreviousButton();\r\n            SetMonthModeNextButton();\r\n\r\n            if (_monthView != null)\r\n            {\r\n                SetMonthModeDayTitles();\r\n                SetMonthModeCalendarDayButtons();\r\n                AddMonthModeHighlight();\r\n            }\r\n        }\r\n\r\n        internal void UpdateYearMode()\r\n        {\r\n            SetYearModeHeaderButton();\r\n            SetYearModePreviousButton();\r\n            SetYearModeNextButton();\r\n\r\n            if (_yearView != null)\r\n            {\r\n                SetYearModeMonthButtons();\r\n            }\r\n        }\r\n\r\n        internal IEnumerable<CalendarDayButton> GetCalendarDayButtons()\r\n        {\r\n            // TODO: should be updated if we support MultiCalendar\r\n            int count = ROWS * COLS;\r\n            if (MonthView != null)\r\n            {\r\n                UIElementCollection dayButtonsHost = MonthView.Children;\r\n                for (int childIndex = COLS; childIndex < count; childIndex++)\r\n                {\r\n                    CalendarDayButton b = dayButtonsHost[childIndex] as CalendarDayButton;\r\n                    if (b != null)\r\n                    {\r\n                        yield return b;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        internal CalendarDayButton GetFocusedCalendarDayButton()\r\n        {\r\n            foreach (CalendarDayButton b in GetCalendarDayButtons())\r\n            {\r\n                if (b != null && b.IsFocused)\r\n                {\r\n                    return b;\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        internal CalendarDayButton GetCalendarDayButton(DateTime date)\r\n        {\r\n            foreach (CalendarDayButton b in GetCalendarDayButtons())\r\n            {\r\n                if (b != null && b.DataContext is DateTime)\r\n                {\r\n                    if (DateTimeHelper.CompareDays(date, (DateTime)b.DataContext) == 0)\r\n                    {\r\n                        return b;\r\n                    }\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        internal CalendarButton GetCalendarButton(DateTime date, CalendarMode mode)\r\n        {\r\n            Debug.Assert(mode != CalendarMode.Month);\r\n\r\n            foreach (CalendarButton b in GetCalendarButtons())\r\n            {\r\n                if (b != null && b.DataContext is DateTime)\r\n                {\r\n                    if (mode == CalendarMode.Year)\r\n                    {\r\n                        if (DateTimeHelper.CompareYearMonth(date, (DateTime)b.DataContext) == 0)\r\n                        {\r\n                            return b;\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        if (date.Year == ((DateTime)b.DataContext).Year)\r\n                        {\r\n                            return b;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        internal CalendarButton GetFocusedCalendarButton()\r\n        {\r\n            foreach (CalendarButton b in GetCalendarButtons())\r\n            {\r\n                if (b != null && b.IsFocused)\r\n                {\r\n                    return b;\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        private IEnumerable<CalendarButton> GetCalendarButtons()\r\n        {            \r\n            foreach (UIElement element in this.YearView.Children)\r\n            {\r\n                CalendarButton b = element as CalendarButton;\r\n                if (b != null)\r\n                {\r\n                    yield return b;\r\n                }\r\n            }\r\n        }\r\n\r\n        internal void FocusDate(DateTime date)\r\n        {\r\n            FrameworkElement focusTarget = null;\r\n\r\n            switch (this.DisplayMode)\r\n            {\r\n                case CalendarMode.Month:\r\n                {\r\n                    focusTarget = GetCalendarDayButton(date);\r\n                    break;\r\n                }\r\n\r\n                case CalendarMode.Year:\r\n                case CalendarMode.Decade:\r\n                {\r\n                    focusTarget = GetCalendarButton(date, this.DisplayMode);\r\n                    break;\r\n                }\r\n\r\n                default:\r\n                {\r\n                    Debug.Assert(false);\r\n                    break;\r\n                }\r\n            }\r\n\r\n            if (focusTarget != null && !focusTarget.IsFocused)\r\n            {\r\n                focusTarget.MoveFocus(new TraversalRequest(FocusNavigationDirection.First));\r\n            }\r\n        }\r\n\r\n        #endregion Internal Methods\r\n\r\n        #region Private Methods\r\n\r\n        private int GetDecadeForDecadeMode(DateTime selectedYear)\r\n        {\r\n            int decade = DateTimeHelper.DecadeOfDate(selectedYear);\r\n\r\n            // Adjust the decade value if the mouse move selection is on,\r\n            // such that if first or last year among the children are selected\r\n            // then return the current selected decade as is.\r\n            if (_isMonthPressed && _yearView != null)\r\n            {\r\n                UIElementCollection yearViewChildren = _yearView.Children;\r\n                int count = yearViewChildren.Count;\r\n\r\n                if (count > 0)\r\n                {\r\n                    CalendarButton child = yearViewChildren[0] as CalendarButton;\r\n                    if (child != null &&\r\n                        child.DataContext is DateTime &&\r\n                        ((DateTime)child.DataContext).Year == selectedYear.Year)\r\n                    {\r\n                        return (decade + 10);\r\n                    }\r\n                }\r\n\r\n                if (count > 1)\r\n                {\r\n                    CalendarButton child = yearViewChildren[count - 1] as CalendarButton;\r\n                    if (child != null &&\r\n                        child.DataContext is DateTime &&\r\n                        ((DateTime)child.DataContext).Year == selectedYear.Year)\r\n                    {\r\n                        return (decade - 10);\r\n                    }\r\n                }\r\n            }\r\n            return decade;\r\n        }\r\n\r\n        private void EndDrag(bool ctrl, DateTime selectedDate)\r\n        {\r\n            if (this.Owner != null)\r\n            {\r\n                this.Owner.CurrentDate = selectedDate;\r\n\r\n                if (this.Owner.HoverStart.HasValue)\r\n                {\r\n                    if (\r\n                        ctrl &&\r\n                        DateTime.Compare(this.Owner.HoverStart.Value, selectedDate) == 0 &&\r\n                        (Owner.SelectionMode == CalendarSelectionMode.SingleDate || Owner.SelectionMode == CalendarSelectionMode.MultipleRange))\r\n                    {\r\n                        // Ctrl + single click = toggle\r\n                        this.Owner.SelectedDates.Toggle(selectedDate);\r\n                    }\r\n                    else\r\n                    {\r\n                        // this is selection with Mouse, we do not guarantee the range does not include BlackOutDates.\r\n                        // Use the internal AddRange that omits BlackOutDates based on the SelectionMode\r\n                        this.Owner.SelectedDates.AddRangeInternal(this.Owner.HoverStart.Value, selectedDate);\r\n                    }\r\n\r\n                    Owner.OnDayClick(selectedDate);\r\n                }\r\n            }\r\n        }\r\n\r\n\r\n        private void CellOrMonth_PreviewKeyDown(object sender, RoutedEventArgs e)\r\n        {\r\n            Debug.Assert(e != null);\r\n\r\n            if (this.Owner == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            this.Owner.OnDayOrMonthPreviewKeyDown(e);\r\n        }\r\n\r\n        private void Cell_Clicked(object sender, RoutedEventArgs e)\r\n        {\r\n            if (this.Owner == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            CalendarDayButton b = sender as CalendarDayButton;\r\n            Debug.Assert(b != null);\r\n\r\n            if (!(b.DataContext is DateTime))\r\n            {\r\n                return;\r\n            }\r\n\r\n            // If the day is a blackout day selection is not allowed\r\n            if (!b.IsBlackedOut)\r\n            {\r\n                DateTime clickedDate = (DateTime)b.DataContext;\r\n                bool ctrl, shift;\r\n\r\n                KeyboardHelper.GetMetaKeyState(out ctrl, out shift);\r\n\r\n                switch (this.Owner.SelectionMode)\r\n                {\r\n                    case CalendarSelectionMode.None:\r\n                    {\r\n                        break;\r\n                    }\r\n\r\n                    case CalendarSelectionMode.SingleDate:\r\n                    {\r\n                        if (!ctrl)\r\n                        {\r\n                            this.Owner.SelectedDate = clickedDate;\r\n                        }\r\n                        else\r\n                        {\r\n                            this.Owner.SelectedDates.Toggle(clickedDate);\r\n                        }\r\n\r\n                        break;\r\n                    }\r\n\r\n                    case CalendarSelectionMode.SingleRange:\r\n                        {\r\n                            DateTime? lastDate = this.Owner.CurrentDate;\r\n                            this.Owner.SelectedDates.ClearInternal(true /*fireChangeNotification*/);\r\n                            if (shift && lastDate.HasValue)\r\n                            {\r\n                                this.Owner.SelectedDates.AddRangeInternal(lastDate.Value, clickedDate);\r\n                            }\r\n                            else\r\n                            {\r\n                                this.Owner.SelectedDate = clickedDate;\r\n                                this.Owner.HoverStart = null;\r\n                                this.Owner.HoverEnd = null;\r\n                            }\r\n\r\n                            break;\r\n                        }\r\n\r\n                    case CalendarSelectionMode.MultipleRange:\r\n                        {\r\n                            if (!ctrl)\r\n                            {\r\n                                this.Owner.SelectedDates.ClearInternal(true /*fireChangeNotification*/);\r\n                            }\r\n\r\n                            if (shift)\r\n                            {\r\n                                this.Owner.SelectedDates.AddRangeInternal(this.Owner.CurrentDate, clickedDate);\r\n                            }\r\n                            else\r\n                            {\r\n                                if (!ctrl)\r\n                                {\r\n                                    this.Owner.SelectedDate = clickedDate;\r\n                                }\r\n                                else\r\n                                {\r\n                                    this.Owner.SelectedDates.Toggle(clickedDate);\r\n                                    this.Owner.HoverStart = null;\r\n                                    this.Owner.HoverEnd = null;\r\n                                }\r\n                            }\r\n\r\n                            break;\r\n                        }\r\n                }\r\n\r\n                this.Owner.OnDayClick(clickedDate);\r\n            }\r\n        }\r\n\r\n        private void Cell_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)\r\n        {\r\n            CalendarDayButton b = sender as CalendarDayButton;\r\n\r\n            if (b == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (this.Owner == null || !(b.DataContext is DateTime))\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (b.IsBlackedOut)\r\n            {\r\n                this.Owner.HoverStart = null;\r\n            }\r\n            else\r\n            {\r\n                this._isDayPressed = true;\r\n                Mouse.Capture(this, CaptureMode.SubTree);\r\n\r\n                b.MoveFocus(new TraversalRequest(FocusNavigationDirection.First));\r\n\r\n                bool ctrl, shift;\r\n                KeyboardHelper.GetMetaKeyState(out ctrl, out shift);\r\n\r\n                DateTime selectedDate = (DateTime)b.DataContext;\r\n                Debug.Assert(selectedDate != null);\r\n\r\n                switch (this.Owner.SelectionMode)\r\n                {\r\n                    case CalendarSelectionMode.None:\r\n                    {\r\n                        break;\r\n                    }\r\n\r\n                    case CalendarSelectionMode.SingleDate:\r\n                    {\r\n                        this.Owner.DatePickerDisplayDateFlag = true;\r\n                        if (!ctrl)\r\n                        {\r\n                            this.Owner.SelectedDate = selectedDate;\r\n                        }\r\n                        else\r\n                        {\r\n                            this.Owner.SelectedDates.Toggle(selectedDate);\r\n                        }\r\n\r\n                        break;\r\n                    }\r\n\r\n                    case CalendarSelectionMode.SingleRange:\r\n                    {\r\n                        this.Owner.SelectedDates.ClearInternal();\r\n\r\n                        if (shift)\r\n                        {\r\n                            if (!this.Owner.HoverStart.HasValue)\r\n                            {\r\n                                this.Owner.HoverStart = this.Owner.HoverEnd = this.Owner.CurrentDate;\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            this.Owner.HoverStart = this.Owner.HoverEnd = selectedDate;\r\n                        }\r\n\r\n                        break;\r\n                    }\r\n\r\n                    case CalendarSelectionMode.MultipleRange:\r\n                    {\r\n                        if (!ctrl)\r\n                        {\r\n                            this.Owner.SelectedDates.ClearInternal();\r\n                        }\r\n\r\n                        if (shift)\r\n                        {\r\n                            if (!this.Owner.HoverStart.HasValue)\r\n                            {\r\n                                this.Owner.HoverStart = this.Owner.HoverEnd = this.Owner.CurrentDate;\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            this.Owner.HoverStart = this.Owner.HoverEnd = selectedDate;\r\n                        }\r\n\r\n                        break;\r\n                    }\r\n                }\r\n\r\n                this.Owner.CurrentDate = selectedDate;\r\n                this.Owner.UpdateCellItems();\r\n            }\r\n        }\r\n\r\n        private void Cell_MouseEnter(object sender, MouseEventArgs e)\r\n        {\r\n            CalendarDayButton b = sender as CalendarDayButton;\r\n            if (b == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (b.IsBlackedOut)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (e.LeftButton == MouseButtonState.Pressed && this._isDayPressed)\r\n            {\r\n                b.MoveFocus(new TraversalRequest(FocusNavigationDirection.First));\r\n\r\n                if (this.Owner == null || !(b.DataContext is DateTime))\r\n                {\r\n                    return;\r\n                }\r\n\r\n                DateTime selectedDate = (DateTime)b.DataContext;\r\n\r\n                switch (this.Owner.SelectionMode)\r\n                {\r\n                    case CalendarSelectionMode.SingleDate:\r\n                    {\r\n                        this.Owner.DatePickerDisplayDateFlag = true;\r\n                        this.Owner.HoverStart = this.Owner.HoverEnd = null;\r\n                        if (this.Owner.SelectedDates.Count == 0)\r\n                        {\r\n                            this.Owner.SelectedDates.Add(selectedDate);\r\n                        }\r\n                        else\r\n                        {\r\n                            this.Owner.SelectedDates[0] = selectedDate;\r\n                        }\r\n\r\n                        return;\r\n                    }\r\n                }\r\n\r\n                this.Owner.HoverEnd = selectedDate;\r\n                this.Owner.CurrentDate = selectedDate;\r\n                this.Owner.UpdateCellItems();\r\n            }\r\n        }\r\n\r\n        private void Cell_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)\r\n        {\r\n            CalendarDayButton b = sender as CalendarDayButton;\r\n            if (b == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (this.Owner == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (!b.IsBlackedOut)\r\n            {\r\n                this.Owner.OnDayButtonMouseUp(e);\r\n            }\r\n\r\n            if (!(b.DataContext is DateTime))\r\n            {\r\n                return;\r\n            }\r\n\r\n            FinishSelection((DateTime)b.DataContext);\r\n            e.Handled = true;\r\n        }\r\n\r\n        private void FinishSelection(DateTime selectedDate)\r\n        {\r\n            bool ctrl, shift;\r\n            KeyboardHelper.GetMetaKeyState(out ctrl, out shift);\r\n\r\n            if (this.Owner.SelectionMode == CalendarSelectionMode.None || this.Owner.SelectionMode == CalendarSelectionMode.SingleDate)\r\n            {\r\n                this.Owner.OnDayClick(selectedDate);\r\n                return;\r\n            }\r\n\r\n            if (this.Owner.HoverStart.HasValue)\r\n            {\r\n                switch (this.Owner.SelectionMode)\r\n                {\r\n                    case CalendarSelectionMode.SingleRange:\r\n                    {\r\n                        // Update SelectedDates\r\n                        this.Owner.SelectedDates.ClearInternal();\r\n                        EndDrag(ctrl, selectedDate);\r\n                        break;\r\n                    }\r\n\r\n                    case CalendarSelectionMode.MultipleRange:\r\n                    {\r\n                        // add the selection (either single day or SingleRange day)\r\n                        EndDrag(ctrl, selectedDate);\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n            else\r\n            {\r\n                // If the day is blacked out but also a trailing day we should be able to switch months\r\n                CalendarDayButton b = GetCalendarDayButton(selectedDate);\r\n                if (b != null && b.IsInactive && b.IsBlackedOut)\r\n                {\r\n                    this.Owner.OnDayClick(selectedDate);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void Month_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)\r\n        {\r\n            CalendarButton b = sender as CalendarButton;\r\n            if (b != null)\r\n            {\r\n                this._isMonthPressed = true;\r\n                Mouse.Capture(this, CaptureMode.SubTree);\r\n\r\n                if (this.Owner != null)\r\n                {\r\n                    this.Owner.OnCalendarButtonPressed(b, false);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void Month_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)\r\n        {\r\n            CalendarButton b = sender as CalendarButton;\r\n            if (b != null && this.Owner != null)\r\n            {\r\n                this.Owner.OnCalendarButtonPressed(b, true);\r\n            }\r\n        }\r\n\r\n        private void Month_MouseEnter(object sender, MouseEventArgs e)\r\n        {\r\n            CalendarButton b = sender as CalendarButton;\r\n            if (b != null)\r\n            {\r\n                if (this._isMonthPressed && this.Owner != null)\r\n                {\r\n                    this.Owner.OnCalendarButtonPressed(b, false);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void Month_Clicked(object sender, RoutedEventArgs e)\r\n        {\r\n            CalendarButton b = sender as CalendarButton;\r\n            if (b != null)\r\n            {\r\n                this.Owner.OnCalendarButtonPressed(b, true);\r\n            }\r\n        }\r\n\r\n        private void HeaderButton_Click(object sender, RoutedEventArgs e)\r\n        {\r\n            if (this.Owner != null)\r\n            {\r\n                if (this.Owner.DisplayMode == CalendarMode.Month)\r\n                {\r\n                    this.Owner.DisplayMode = CalendarMode.Year;\r\n                }\r\n                else\r\n                {\r\n                    Debug.Assert(this.Owner.DisplayMode == CalendarMode.Year);\r\n\r\n                    this.Owner.DisplayMode = CalendarMode.Decade;\r\n                }\r\n\r\n                this.FocusDate(this.DisplayDate);\r\n            }\r\n        }\r\n\r\n        private void PreviousButton_Click(object sender, RoutedEventArgs e)\r\n        {\r\n            if (this.Owner != null)\r\n            {\r\n                this.Owner.OnPreviousClick();\r\n            }\r\n        }\r\n\r\n        private void NextButton_Click(object sender, RoutedEventArgs e)\r\n        {\r\n            if (this.Owner != null)\r\n            {\r\n                this.Owner.OnNextClick();\r\n            }\r\n        }\r\n\r\n        private void PopulateGrids()\r\n        {\r\n            if (_monthView != null)\r\n            {\r\n                if (_dayTitleTemplate != null)\r\n                {\r\n                    for (int i = 0; i < COLS; i++)\r\n                    {\r\n                        FrameworkElement titleCell = (FrameworkElement)this._dayTitleTemplate.LoadContent();\r\n                        titleCell.SetValue(Grid.RowProperty, 0);\r\n                        titleCell.SetValue(Grid.ColumnProperty, i);\r\n                        this._monthView.Children.Add(titleCell);\r\n                    }\r\n                }\r\n\r\n                for (int i = 1; i < ROWS; i++)\r\n                {\r\n                    for (int j = 0; j < COLS; j++)\r\n                    {\r\n                        CalendarDayButton dayCell = new CalendarDayButton();\r\n\r\n                        dayCell.Owner = this.Owner;\r\n                        dayCell.SetValue(Grid.RowProperty, i);\r\n                        dayCell.SetValue(Grid.ColumnProperty, j);\r\n                        dayCell.SetBinding(CalendarDayButton.StyleProperty, GetOwnerBinding(\"CalendarDayButtonStyle\"));\r\n                        dayCell.AddHandler(CalendarDayButton.MouseLeftButtonDownEvent, new MouseButtonEventHandler(Cell_MouseLeftButtonDown), true);\r\n                        dayCell.AddHandler(CalendarDayButton.MouseLeftButtonUpEvent, new MouseButtonEventHandler(Cell_MouseLeftButtonUp), true);\r\n                        dayCell.AddHandler(CalendarDayButton.MouseEnterEvent, new MouseEventHandler(Cell_MouseEnter), true);\r\n                        dayCell.Click += new RoutedEventHandler(Cell_Clicked);\r\n                        dayCell.AddHandler(PreviewKeyDownEvent, new RoutedEventHandler(CellOrMonth_PreviewKeyDown), true);\r\n\r\n                        this._monthView.Children.Add(dayCell);\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (_yearView != null)\r\n            {\r\n                CalendarButton monthCell;\r\n                int count = 0;\r\n                for (int i = 0; i < YEAR_ROWS; i++)\r\n                {\r\n                    for (int j = 0; j < YEAR_COLS; j++)\r\n                    {\r\n                        monthCell = new CalendarButton();\r\n\r\n                        monthCell.Owner = this.Owner;\r\n                        monthCell.SetValue(Grid.RowProperty, i);\r\n                        monthCell.SetValue(Grid.ColumnProperty, j);\r\n                        monthCell.SetBinding(CalendarButton.StyleProperty, GetOwnerBinding(\"CalendarButtonStyle\"));\r\n                        monthCell.AddHandler(CalendarButton.MouseLeftButtonDownEvent, new MouseButtonEventHandler(Month_MouseLeftButtonDown), true);\r\n                        monthCell.AddHandler(CalendarButton.MouseLeftButtonUpEvent, new MouseButtonEventHandler(Month_MouseLeftButtonUp), true);\r\n                        monthCell.AddHandler(CalendarButton.MouseEnterEvent, new MouseEventHandler(Month_MouseEnter), true);\r\n                        monthCell.AddHandler(UIElement.PreviewKeyDownEvent, new RoutedEventHandler(CellOrMonth_PreviewKeyDown), true);\r\n                        monthCell.Click += new RoutedEventHandler(Month_Clicked);\r\n                        this._yearView.Children.Add(monthCell);\r\n                        count++;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n\r\n        #region Month Mode Display\r\n\r\n        private void SetMonthModeDayTitles()\r\n        {\r\n            if (_monthView != null)\r\n            {\r\n                string[] shortestDayNames = DateTimeHelper.GetDateFormat(DateTimeHelper.GetCulture(this)).ShortestDayNames;\r\n\r\n                for (int childIndex = 0; childIndex < COLS; childIndex++)\r\n                {\r\n                    FrameworkElement daytitle = _monthView.Children[childIndex] as FrameworkElement;\r\n                    \r\n                    if (daytitle != null && shortestDayNames != null && shortestDayNames.Length > 0)\r\n                    {\r\n                        if (this.Owner != null)\r\n                        {\r\n                            daytitle.DataContext = shortestDayNames[(childIndex + (int)this.Owner.FirstDayOfWeek) % shortestDayNames.Length];\r\n                        }\r\n                        else\r\n                        {\r\n                            daytitle.DataContext = shortestDayNames[(childIndex + (int)DateTimeHelper.GetDateFormat(DateTimeHelper.GetCulture(this)).FirstDayOfWeek) % shortestDayNames.Length];\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void SetMonthModeCalendarDayButtons()\r\n        {\r\n            DateTime firstDayOfMonth = DateTimeHelper.DiscardDayTime(DisplayDate);\r\n            int lastMonthToDisplay = GetNumberOfDisplayedDaysFromPreviousMonth(firstDayOfMonth);\r\n\r\n            bool isMinMonth = DateTimeHelper.CompareYearMonth(firstDayOfMonth, DateTime.MinValue) <= 0;\r\n            bool isMaxMonth = DateTimeHelper.CompareYearMonth(firstDayOfMonth, DateTime.MaxValue) >= 0;\r\n            int daysInMonth = _calendar.GetDaysInMonth(firstDayOfMonth.Year, firstDayOfMonth.Month);\r\n            CultureInfo culture = DateTimeHelper.GetCulture(this);\r\n\r\n            int count = ROWS * COLS;\r\n            for (int childIndex = COLS; childIndex < count; childIndex++)\r\n            {\r\n                CalendarDayButton childButton = _monthView.Children[childIndex] as CalendarDayButton;\r\n                Debug.Assert(childButton != null);\r\n\r\n                int dayOffset = childIndex - lastMonthToDisplay - COLS;\r\n                if ((!isMinMonth || (dayOffset >= 0)) && (!isMaxMonth || (dayOffset < daysInMonth)))\r\n                {\r\n                    DateTime dateToAdd = _calendar.AddDays(firstDayOfMonth, dayOffset);\r\n                    SetMonthModeDayButtonState(childButton, dateToAdd);\r\n                    childButton.DataContext = dateToAdd;\r\n                    childButton.SetContentInternal(DateTimeHelper.ToDayString(dateToAdd, culture));\r\n                }\r\n                else\r\n                {\r\n                    SetMonthModeDayButtonState(childButton, null);\r\n                    childButton.DataContext = null;\r\n                    childButton.SetContentInternal(DateTimeHelper.ToDayString(null, culture));\r\n                }\r\n            }\r\n        }\r\n\r\n        private void SetMonthModeDayButtonState(CalendarDayButton childButton, DateTime? dateToAdd)\r\n        {\r\n            if (this.Owner != null)\r\n            {\r\n                if (dateToAdd.HasValue)\r\n                {\r\n                    childButton.Visibility = Visibility.Visible;\r\n\r\n                    // If the day is outside the DisplayDateStart/End boundary, do not show it\r\n                    if (DateTimeHelper.CompareDays(dateToAdd.Value, this.Owner.DisplayDateStartInternal) < 0 || DateTimeHelper.CompareDays(dateToAdd.Value, this.Owner.DisplayDateEndInternal) > 0)\r\n                    {\r\n                        childButton.IsEnabled = false;\r\n                        childButton.Visibility = Visibility.Hidden;\r\n                    }\r\n                    else\r\n                    {\r\n                        childButton.IsEnabled = true;\r\n\r\n                        // SET IF THE DAY IS SELECTABLE OR NOT\r\n                        childButton.SetValue(\r\n                            CalendarDayButton.IsBlackedOutPropertyKey, \r\n                            this.Owner.BlackoutDates.Contains(dateToAdd.Value));\r\n\r\n                        // SET IF THE DAY IS ACTIVE OR NOT: set if the day is a trailing day or not\r\n                        childButton.SetValue(\r\n                            CalendarDayButton.IsInactivePropertyKey, \r\n                            DateTimeHelper.CompareYearMonth(dateToAdd.Value, this.Owner.DisplayDateInternal) != 0);\r\n\r\n                        // SET IF THE DAY IS TODAY OR NOT\r\n                        if (DateTimeHelper.CompareDays(dateToAdd.Value, DateTime.Today) == 0)\r\n                        {\r\n                            childButton.SetValue(CalendarDayButton.IsTodayPropertyKey, true);\r\n                            \r\n                            // Calendar.IsTodayHighlighted affects the final visual state for Today buttons \r\n                            // but childButton property change callbacks are no called in response to \r\n                            // Calendar.IsTodayHighlighted changing so we must explicitly update the visual state\r\n                            childButton.ChangeVisualState(true);\r\n                        }\r\n                        else\r\n                        {\r\n                            childButton.SetValue(CalendarDayButton.IsTodayPropertyKey, false);\r\n                        }\r\n\r\n                        // SET IF THE DAY IS SELECTED OR NOT\r\n                        // Since we should be comparing the Date values not DateTime values, we can't use this.Owner.SelectedDates.Contains(dateToAdd) directly\r\n                        bool isSelected = false;\r\n                        foreach (DateTime item in this.Owner.SelectedDates)\r\n                        {\r\n                            isSelected |= (DateTimeHelper.CompareDays(dateToAdd.Value, item) == 0);                            \r\n                        }\r\n\r\n                        childButton.SetValue(CalendarDayButton.IsSelectedPropertyKey, isSelected);\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    childButton.Visibility = Visibility.Hidden;\r\n                    childButton.IsEnabled = false;\r\n                    childButton.SetValue(CalendarDayButton.IsBlackedOutPropertyKey, false);\r\n                    childButton.SetValue(CalendarDayButton.IsInactivePropertyKey, true);\r\n                    childButton.SetValue(CalendarDayButton.IsTodayPropertyKey, false);\r\n                    childButton.SetValue(CalendarDayButton.IsSelectedPropertyKey, false);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void AddMonthModeHighlight()\r\n        {\r\n            var owner = this.Owner;\r\n            if (owner == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (owner.HoverStart.HasValue && owner.HoverEnd.HasValue)\r\n            {\r\n                DateTime hStart = owner.HoverEnd.Value;\r\n                DateTime hEnd = owner.HoverEnd.Value;\r\n\r\n                int daysToHighlight = DateTimeHelper.CompareDays(owner.HoverEnd.Value, owner.HoverStart.Value);\r\n                if (daysToHighlight < 0)\r\n                {\r\n                    hEnd = this.Owner.HoverStart.Value;\r\n                }\r\n                else\r\n                {\r\n                    hStart = this.Owner.HoverStart.Value;\r\n                }\r\n\r\n                int count = ROWS * COLS;\r\n\r\n                for (int childIndex = COLS; childIndex < count; childIndex++)\r\n                {\r\n                    CalendarDayButton childButton = _monthView.Children[childIndex] as CalendarDayButton;\r\n                    if (childButton.DataContext is DateTime)\r\n                    {\r\n                        DateTime date = (DateTime)childButton.DataContext;\r\n                        childButton.SetValue(\r\n                            CalendarDayButton.IsHighlightedPropertyKey,\r\n                            (daysToHighlight != 0) && DateTimeHelper.InRange(date, hStart, hEnd));\r\n                    }\r\n                    else\r\n                    {\r\n                        childButton.SetValue(CalendarDayButton.IsHighlightedPropertyKey, false);\r\n                    }\r\n                }\r\n            }\r\n            else\r\n            {\r\n                int count = ROWS * COLS;\r\n\r\n                for (int childIndex = COLS; childIndex < count; childIndex++)\r\n                {\r\n                    CalendarDayButton childButton = _monthView.Children[childIndex] as CalendarDayButton;\r\n                    childButton.SetValue(CalendarDayButton.IsHighlightedPropertyKey, false);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void SetMonthModeHeaderButton()\r\n        {\r\n            if (this._headerButton != null)\r\n            {\r\n                this._headerButton.Content = DateTimeHelper.ToYearMonthPatternString(DisplayDate, DateTimeHelper.GetCulture(this));\r\n\r\n                if (this.Owner != null)\r\n                {                    \r\n                    this._headerButton.IsEnabled = true;\r\n                }\r\n            }\r\n        }\r\n\r\n        private void SetMonthModeNextButton()\r\n        {\r\n            if (this.Owner != null && _nextButton != null)\r\n            {\r\n                DateTime firstDayOfMonth = DateTimeHelper.DiscardDayTime(DisplayDate);\r\n\r\n                // DisplayDate is equal to DateTime.MaxValue\r\n                if (DateTimeHelper.CompareYearMonth(firstDayOfMonth, DateTime.MaxValue) == 0)\r\n                {\r\n                    _nextButton.IsEnabled = false;\r\n                }\r\n                else\r\n                {\r\n                    // Since we are sure DisplayDate is not equal to DateTime.MaxValue, \r\n                    // it is safe to use AddMonths  \r\n                    DateTime firstDayOfNextMonth = _calendar.AddMonths(firstDayOfMonth, 1);\r\n                    _nextButton.IsEnabled = (DateTimeHelper.CompareDays(this.Owner.DisplayDateEndInternal, firstDayOfNextMonth) > -1);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void SetMonthModePreviousButton()\r\n        {\r\n            if (this.Owner != null && _previousButton != null)\r\n            {\r\n                DateTime firstDayOfMonth = DateTimeHelper.DiscardDayTime(DisplayDate);\r\n                _previousButton.IsEnabled = (DateTimeHelper.CompareDays(this.Owner.DisplayDateStartInternal, firstDayOfMonth) < 0);\r\n            }\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region Year Mode Display\r\n\r\n        private void SetYearButtons(int decade, int decadeEnd)\r\n        {\r\n            int year;\r\n            int count = -1;\r\n            foreach (object child in _yearView.Children)\r\n            {\r\n                CalendarButton childButton = child as CalendarButton;\r\n                Debug.Assert(childButton != null);\r\n                year = decade + count;\r\n\r\n                if (year <= DateTime.MaxValue.Year && year >= DateTime.MinValue.Year)\r\n                {\r\n                    // There should be no time component. Time is 12:00 AM\r\n                    DateTime day = new DateTime(year, 1, 1);\r\n                    childButton.DataContext = day;\r\n                    childButton.SetContentInternal(DateTimeHelper.ToYearString(day, DateTimeHelper.GetCulture(this)));\r\n                    childButton.Visibility = Visibility.Visible;\r\n\r\n                    if (this.Owner != null)\r\n                    {\r\n                        childButton.HasSelectedDays = (Owner.DisplayDate.Year == year);\r\n\r\n                        if (year < this.Owner.DisplayDateStartInternal.Year || year > this.Owner.DisplayDateEndInternal.Year)\r\n                        {\r\n                            childButton.IsEnabled = false;\r\n                            childButton.Opacity = 0;\r\n                        }\r\n                        else\r\n                        {\r\n                            childButton.IsEnabled = true;\r\n                            childButton.Opacity = 1;\r\n                        }\r\n                    }\r\n\r\n                    // SET IF THE YEAR IS INACTIVE OR NOT: set if the year is a trailing year or not\r\n                    childButton.IsInactive = year < decade || year > decadeEnd;\r\n                }\r\n                else\r\n                {\r\n                    childButton.DataContext = null;\r\n                    childButton.IsEnabled = false;\r\n                    childButton.Opacity = 0;\r\n                }\r\n\r\n                count++;\r\n            }\r\n        }\r\n\r\n        private void SetYearModeMonthButtons()\r\n        {\r\n            int count = 0;\r\n            foreach (object child in _yearView.Children)\r\n            {\r\n                CalendarButton childButton = child as CalendarButton;\r\n                Debug.Assert(childButton != null);\r\n                \r\n                // There should be no time component. Time is 12:00 AM\r\n                DateTime day = new DateTime(DisplayDate.Year, count + 1, 1);\r\n                childButton.DataContext = day;\r\n                childButton.SetContentInternal(DateTimeHelper.ToAbbreviatedMonthString(day,DateTimeHelper.GetCulture(this)));\r\n                childButton.Visibility = Visibility.Visible;\r\n\r\n                if (this.Owner != null)\r\n                {\r\n                    Debug.Assert(this.Owner.DisplayDateInternal != null);\r\n                    childButton.HasSelectedDays = (DateTimeHelper.CompareYearMonth(day, this.Owner.DisplayDateInternal) == 0);\r\n\r\n                    if (DateTimeHelper.CompareYearMonth(day, this.Owner.DisplayDateStartInternal) < 0 || DateTimeHelper.CompareYearMonth(day, this.Owner.DisplayDateEndInternal) > 0)\r\n                    {\r\n                        childButton.IsEnabled = false;\r\n                        childButton.Opacity = 0;\r\n                    }\r\n                    else\r\n                    {\r\n                        childButton.IsEnabled = true;\r\n                        childButton.Opacity = 1;\r\n                    }\r\n                }\r\n\r\n                childButton.IsInactive = false;\r\n                count++;\r\n            }\r\n        }\r\n\r\n        private void SetYearModeHeaderButton()\r\n        {\r\n            if (this._headerButton != null)\r\n            {\r\n                this._headerButton.IsEnabled = true;\r\n                this._headerButton.Content = DateTimeHelper.ToYearString(DisplayDate, DateTimeHelper.GetCulture(this));\r\n            }\r\n        }\r\n\r\n        private void SetYearModeNextButton()\r\n        {\r\n            if (this.Owner != null && _nextButton != null)\r\n            {\r\n                _nextButton.IsEnabled = (this.Owner.DisplayDateEndInternal.Year != DisplayDate.Year);\r\n            }\r\n        }\r\n\r\n        private void SetYearModePreviousButton()\r\n        {\r\n            if (this.Owner != null && _previousButton != null)\r\n            {\r\n                _previousButton.IsEnabled = (this.Owner.DisplayDateStartInternal.Year != DisplayDate.Year);\r\n            }\r\n        }\r\n\r\n        #endregion Year Mode Display\r\n\r\n        #region Decade Mode Display\r\n\r\n        private void SetDecadeModeHeaderButton(int decade)\r\n        {\r\n            if (this._headerButton != null)\r\n            {\r\n                this._headerButton.Content = DateTimeHelper.ToDecadeRangeString(decade, DateTimeHelper.GetCulture(this));\r\n                this._headerButton.IsEnabled = false;\r\n            }\r\n        }\r\n\r\n        private void SetDecadeModeNextButton(int decadeEnd)\r\n        {\r\n            if (this.Owner != null && _nextButton != null)\r\n            {\r\n                _nextButton.IsEnabled = (this.Owner.DisplayDateEndInternal.Year > decadeEnd);\r\n            }\r\n        }\r\n\r\n        private void SetDecadeModePreviousButton(int decade)\r\n        {\r\n            if (this.Owner != null && _previousButton != null)\r\n            {\r\n                _previousButton.IsEnabled = (decade > this.Owner.DisplayDateStartInternal.Year);\r\n            }\r\n        }\r\n\r\n        #endregion Decade Mode Display\r\n\r\n        // How many days of the previous month need to be displayed\r\n        private int GetNumberOfDisplayedDaysFromPreviousMonth(DateTime firstOfMonth)\r\n        {\r\n            DayOfWeek day = _calendar.GetDayOfWeek(firstOfMonth);\r\n            int i;\r\n\r\n            if (this.Owner != null)\r\n            {\r\n                i = ((day - this.Owner.FirstDayOfWeek + NUMBER_OF_DAYS_IN_WEEK) % NUMBER_OF_DAYS_IN_WEEK);\r\n            }\r\n            else\r\n            {\r\n                i = ((day - DateTimeHelper.GetDateFormat(DateTimeHelper.GetCulture(this)).FirstDayOfWeek + NUMBER_OF_DAYS_IN_WEEK) % NUMBER_OF_DAYS_IN_WEEK);\r\n            }\r\n\r\n            if (i == 0)\r\n            {\r\n                return NUMBER_OF_DAYS_IN_WEEK;\r\n            }\r\n            else\r\n            {\r\n                return i;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a binding to a property on the owning calendar\r\n        /// </summary>\r\n        /// <param name=\"propertyName\"></param>\r\n        /// <returns></returns>\r\n        private BindingBase GetOwnerBinding(string propertyName)\r\n        {\r\n            Binding result = new Binding(propertyName);\r\n            result.Source = this.Owner;\r\n            return result;\r\n        }\r\n\r\n        #endregion Private Methods\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Calendar/Microsoft/Windows/Controls/CalendarMode.cs",
    "content": "//---------------------------------------------------------------------------\r\n//\r\n// Copyright (C) Microsoft Corporation.  All rights reserved.\r\n//\r\n//---------------------------------------------------------------------------\r\n\r\nnamespace Microsoft.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Specifies values for the different modes of operation of a Calendar. \r\n    /// </summary>\r\n    public enum CalendarMode\r\n    {\r\n        /// <summary>\r\n        /// The Calendar displays a month at a time.\r\n        /// </summary>\r\n        Month = 0,\r\n\r\n        /// <summary>\r\n        ///  The Calendar displays a year at a time.\r\n        /// </summary>\r\n        Year = 1,\r\n        \r\n        /// <summary>\r\n        /// The Calendar displays a decade at a time.\r\n        /// </summary>\r\n        Decade = 2,\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Calendar/Microsoft/Windows/Controls/CalendarModeChangedEventArgs.cs",
    "content": "﻿//---------------------------------------------------------------------------\r\n//\r\n// Copyright (C) Microsoft Corporation.  All rights reserved.\r\n//\r\n//---------------------------------------------------------------------------\r\n\r\nnamespace Microsoft.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Provides data for the DisplayModeChanged event.\r\n    /// </summary>\r\n    public class CalendarModeChangedEventArgs : System.Windows.RoutedEventArgs\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the CalendarModeChangedEventArgs class.\r\n        /// </summary>\r\n        /// <param name=\"oldMode\">Previous value of the property, prior to the event being raised.</param>\r\n        /// <param name=\"newMode\">Current value of the property at the time of the event.</param>\r\n        public CalendarModeChangedEventArgs(CalendarMode oldMode, CalendarMode newMode)\r\n        {\r\n            this.OldMode = oldMode;\r\n            this.NewMode = newMode;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the new mode of the Calendar.\r\n        /// </summary>\r\n        public CalendarMode NewMode\r\n        {\r\n            get;\r\n            private set;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the previous mode of the Calendar.\r\n        /// </summary>\r\n        public CalendarMode OldMode\r\n        {\r\n            get;\r\n            private set;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Calendar/Microsoft/Windows/Controls/CalendarSelectionChangedEventArgs.cs",
    "content": "//---------------------------------------------------------------------------\r\n//\r\n// Copyright (C) Microsoft Corporation.  All rights reserved.\r\n//\r\n//---------------------------------------------------------------------------\r\n\r\nusing System;\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\n\r\nnamespace Microsoft.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Workaround for Dev10 Bug 527138 UIElement.RaiseEvent(e) throws InvalidCastException when \r\n    ///     e is of type SelectionChangedEventArgs \r\n    ///     e.RoutedEvent was registered with a handler not of type System.Windows.Controls.SelectionChangedEventHandler\r\n    /// </summary>\r\n    internal class CalendarSelectionChangedEventArgs : SelectionChangedEventArgs\r\n    {\r\n        /// <summary>\r\n        /// Constructor\r\n        /// </summary>\r\n        /// <param name=\"eventId\">Routed Event</param>\r\n        /// <param name=\"removedItems\">Items removed from selection</param>\r\n        /// <param name=\"addedItems\">Items added to selection</param>\r\n        public CalendarSelectionChangedEventArgs(RoutedEvent eventId, IList removedItems, IList addedItems) :\r\n            base(eventId, removedItems, addedItems)\r\n        {\r\n        }\r\n\r\n        protected override void InvokeEventHandler(Delegate genericHandler, object genericTarget)\r\n        {\r\n            EventHandler<SelectionChangedEventArgs> handler = genericHandler as EventHandler<SelectionChangedEventArgs>;\r\n            if (handler != null)\r\n            {\r\n                handler(genericTarget, this);\r\n            }\r\n            else\r\n            {\r\n                base.InvokeEventHandler(genericHandler, genericTarget);\r\n            }\r\n        }\r\n    }\r\n}\r\n\r\n"
  },
  {
    "path": "WpfToolkit/Calendar/Microsoft/Windows/Controls/CalendarSelectionMode.cs",
    "content": "﻿//---------------------------------------------------------------------------\r\n//\r\n// Copyright (C) Microsoft Corporation.  All rights reserved.\r\n//\r\n//---------------------------------------------------------------------------\r\n\r\nnamespace Microsoft.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Specifies values for the different selection modes of a Calendar. \r\n    /// </summary>\r\n    public enum CalendarSelectionMode\r\n    {\r\n        /// <summary>\r\n        /// One date can be selected at a time.\r\n        /// </summary>\r\n        SingleDate = 0,\r\n        \r\n        /// <summary>\r\n        /// One range of dates can be selected at a time.\r\n        /// </summary>\r\n        SingleRange = 1,\r\n        \r\n        /// <summary>\r\n        /// Multiple dates or ranges can be selected at a time.\r\n        /// </summary>\r\n        MultipleRange = 2,\r\n        \r\n        /// <summary>\r\n        /// No dates can be selected.\r\n        /// </summary>\r\n        None = 3,\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Calendar/Microsoft/Windows/Controls/DateTimeHelper.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to [###LICENSE_NAME###].\r\n// Please see [###LICENSE_LINK###] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Diagnostics;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Markup;\r\n\r\nnamespace Microsoft.Windows.Controls\r\n{\r\n    // NOTICE: This date time helper assumes it is working in a Gregorian calendar\r\n    //         If we ever support non Gregorian calendars this class would need to be redesigned\r\n    internal static class DateTimeHelper\r\n    {\r\n        private static System.Globalization.Calendar cal = new GregorianCalendar();\r\n\r\n        public static DateTime? AddDays(DateTime time, int days)\r\n        {\r\n            try\r\n            {\r\n                return cal.AddDays(time, days);\r\n            }\r\n            catch (System.ArgumentException)\r\n            {\r\n                return null;\r\n            }\r\n        }\r\n\r\n        public static DateTime? AddMonths(DateTime time, int months)\r\n        {\r\n            try\r\n            {\r\n                return cal.AddMonths(time, months);\r\n            }\r\n            catch (System.ArgumentException)\r\n            {\r\n                return null;\r\n            }\r\n        }\r\n\r\n        public static DateTime? AddYears(DateTime time, int years)\r\n        {\r\n            try\r\n            {\r\n                return cal.AddYears(time, years);\r\n            }\r\n            catch (System.ArgumentException)\r\n            {\r\n                return null;\r\n            }\r\n        }\r\n\r\n        public static DateTime? SetYear(DateTime date, int year)\r\n        {\r\n            return DateTimeHelper.AddYears(date, year - date.Year);                        \r\n        }\r\n\r\n        public static DateTime? SetYearMonth(DateTime date, DateTime yearMonth)\r\n        {\r\n            DateTime? target = SetYear(date, yearMonth.Year);\r\n            if (target.HasValue)\r\n            {\r\n                target = DateTimeHelper.AddMonths(target.Value, yearMonth.Month - date.Month);\r\n            }\r\n\r\n            return target;\r\n        }\r\n\r\n        public static int CompareDays(DateTime dt1, DateTime dt2)\r\n        {\r\n            return DateTime.Compare(DiscardTime(dt1).Value, DiscardTime(dt2).Value);\r\n        }\r\n\r\n        public static int CompareYearMonth(DateTime dt1, DateTime dt2)\r\n        {\r\n            return ((dt1.Year - dt2.Year) * 12) + (dt1.Month - dt2.Month);\r\n        }\r\n\r\n        public static int DecadeOfDate(DateTime date)\r\n        {\r\n            return date.Year - (date.Year % 10);\r\n        }\r\n\r\n        public static DateTime DiscardDayTime(DateTime d)\r\n        {\r\n            return new DateTime(d.Year, d.Month, 1, 0, 0, 0);\r\n        }\r\n\r\n        public static DateTime? DiscardTime(DateTime? d)\r\n        {\r\n            if (d == null)\r\n            {\r\n                return null;\r\n            }\r\n\r\n            return d.Value.Date;\r\n        }\r\n\r\n        public static int EndOfDecade(DateTime date)\r\n        {\r\n            return DecadeOfDate(date) + 9;\r\n        }\r\n\r\n        public static DateTimeFormatInfo GetCurrentDateFormat()\r\n        {\r\n            return GetDateFormat(CultureInfo.CurrentCulture);\r\n        }\r\n\r\n        internal static CultureInfo GetCulture(FrameworkElement element)\r\n        {\r\n            CultureInfo culture;\r\n            if (DependencyPropertyHelper.GetValueSource(element, FrameworkElement.LanguageProperty).BaseValueSource != BaseValueSource.Default)\r\n            {\r\n                culture = GetCultureInfo(element);\r\n            }\r\n            else\r\n            {\r\n                culture = CultureInfo.CurrentCulture;\r\n            }\r\n            return culture;\r\n        }\r\n\r\n        // ------------------------------------------------------------------\r\n        // Retrieve CultureInfo property from specified element.\r\n        // ------------------------------------------------------------------\r\n        internal static CultureInfo GetCultureInfo(DependencyObject element)\r\n        {\r\n            XmlLanguage language = (XmlLanguage)element.GetValue(FrameworkElement.LanguageProperty);\r\n            try\r\n            {\r\n                return language.GetSpecificCulture();\r\n            }\r\n            catch (InvalidOperationException)\r\n            {\r\n                // We default to en-US if no part of the language tag is recognized.\r\n                return CultureInfo.ReadOnly(new CultureInfo(\"en-us\", false));\r\n            }\r\n        }\r\n\r\n        internal static DateTimeFormatInfo GetDateFormat(CultureInfo culture)\r\n        {\r\n            if (culture.Calendar is GregorianCalendar)\r\n            {\r\n                return culture.DateTimeFormat;\r\n            }\r\n            else\r\n            {\r\n                GregorianCalendar foundCal = null;\r\n                DateTimeFormatInfo dtfi = null;\r\n\r\n                foreach (System.Globalization.Calendar cal in culture.OptionalCalendars)\r\n                {\r\n                    if (cal is GregorianCalendar)\r\n                    {\r\n                        // Return the first Gregorian calendar with CalendarType == Localized\r\n                        // Otherwise return the first Gregorian calendar\r\n                        if (foundCal == null)\r\n                        {\r\n                            foundCal = cal as GregorianCalendar;\r\n                        }\r\n                        \r\n                        if (((GregorianCalendar)cal).CalendarType == GregorianCalendarTypes.Localized)\r\n                        {\r\n                            foundCal = cal as GregorianCalendar;\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n\r\n\r\n                if (foundCal == null)\r\n                {\r\n                    // if there are no GregorianCalendars in the OptionalCalendars list, use the invariant dtfi\r\n                    dtfi = ((CultureInfo)CultureInfo.InvariantCulture.Clone()).DateTimeFormat;\r\n                    dtfi.Calendar = new GregorianCalendar();\r\n                }\r\n                else\r\n                {\r\n                    dtfi = ((CultureInfo)culture.Clone()).DateTimeFormat;\r\n                    dtfi.Calendar = foundCal; \r\n                }\r\n\r\n                return dtfi;\r\n            }\r\n        }\r\n\r\n        // returns if the date is included in the range\r\n        public static bool InRange(DateTime date, CalendarDateRange range)\r\n        {\r\n            return InRange(date, range.Start, range.End);\r\n        }\r\n\r\n        // returns if the date is included in the range\r\n        public static bool InRange(DateTime date, DateTime start, DateTime end)\r\n        {\r\n            Debug.Assert(DateTime.Compare(start, end) < 1);\r\n\r\n            if (CompareDays(date, start) > -1 && CompareDays(date, end) < 1)\r\n            {\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        public static string ToDayString(DateTime? date, CultureInfo culture)\r\n        {\r\n            string result = string.Empty;\r\n            DateTimeFormatInfo format = GetDateFormat(culture);\r\n\r\n            if (date.HasValue && format != null)\r\n            {\r\n                result = date.Value.Day.ToString(format);\r\n            }\r\n\r\n            return result;\r\n        }\r\n\r\n        public static string ToDecadeRangeString(int decade, CultureInfo culture)\r\n        {\r\n            string result = string.Empty;\r\n            DateTimeFormatInfo format = culture.DateTimeFormat;\r\n\r\n            if (format != null)\r\n            {\r\n                int decadeEnd = decade + 9;\r\n                result = decade.ToString(format) + \"-\" + decadeEnd.ToString(format);\r\n            }\r\n\r\n            return result;\r\n        }\r\n\r\n        public static string ToYearMonthPatternString(DateTime? date, CultureInfo culture)\r\n        {\r\n            string result = string.Empty;\r\n            DateTimeFormatInfo format = GetDateFormat(culture);\r\n\r\n            if (date.HasValue && format != null)\r\n            {\r\n                result = date.Value.ToString(format.YearMonthPattern, format);\r\n            }\r\n\r\n            return result;\r\n        }\r\n\r\n        public static string ToYearString(DateTime? date, CultureInfo culture)\r\n        {\r\n            string result = string.Empty;\r\n            DateTimeFormatInfo format = GetDateFormat(culture);\r\n\r\n            if (date.HasValue && format != null)\r\n            {\r\n                result = date.Value.Year.ToString(format);\r\n            }\r\n\r\n            return result;\r\n        }\r\n\r\n        public static string ToAbbreviatedMonthString(DateTime? date, CultureInfo culture)\r\n        {\r\n            string result = string.Empty;\r\n            DateTimeFormatInfo format = GetDateFormat(culture);\r\n\r\n            if (date.HasValue && format != null)\r\n            {\r\n                string[] monthNames = format.AbbreviatedMonthNames;\r\n                if (monthNames != null && monthNames.Length > 0)\r\n                {\r\n                    result = monthNames[(date.Value.Month - 1) % monthNames.Length];\r\n                }\r\n            }\r\n\r\n            return result;\r\n        }\r\n\r\n        public static string ToLongDateString(DateTime? date, CultureInfo culture)\r\n        {\r\n            string result = string.Empty;\r\n            DateTimeFormatInfo format = GetDateFormat(culture);\r\n\r\n            if (date.HasValue && format != null)\r\n            {\r\n                result = date.Value.Date.ToString(format.LongDatePattern, format);\r\n            }\r\n\r\n            return result;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Calendar/Microsoft/Windows/Controls/KeyboardHelper.cs",
    "content": "﻿using System.Windows.Input;\r\n\r\nnamespace Microsoft.Windows.Controls\r\n{\r\n    internal static class KeyboardHelper\r\n    {\r\n        public static void GetMetaKeyState(out bool ctrl, out bool shift)\r\n        {\r\n            ctrl = (Keyboard.Modifiers & ModifierKeys.Control) == ModifierKeys.Control;\r\n            shift = (Keyboard.Modifiers & ModifierKeys.Shift) == ModifierKeys.Shift;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Calendar/Microsoft/Windows/Controls/SelectedDatesCollection.cs",
    "content": "﻿//---------------------------------------------------------------------------\r\n//\r\n// Copyright (C) Microsoft Corporation.  All rights reserved.\r\n//\r\n//---------------------------------------------------------------------------\r\n\r\nusing System;\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Diagnostics;\r\nusing System.Threading;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\n\r\nnamespace Microsoft.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Represents the collection of SelectedDates for the Calendar Control.\r\n    /// </summary>\r\n    public sealed class SelectedDatesCollection : ObservableCollection<DateTime>\r\n    {\r\n        #region Data\r\n        private Collection<DateTime> _addedItems;\r\n        private Collection<DateTime> _removedItems;\r\n        private Thread _dispatcherThread;\r\n        private bool _isAddingRange;\r\n        private Calendar _owner;\r\n        private DateTime? _maximumDate;\r\n        private DateTime? _minimumDate;\r\n\r\n        #endregion Data\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the CalendarSelectedDatesCollection class.\r\n        /// </summary>\r\n        /// <param name=\"owner\"></param>\r\n        public SelectedDatesCollection(Calendar owner)\r\n        {\r\n            this._dispatcherThread = Thread.CurrentThread;\r\n            this._owner = owner;\r\n            this._addedItems = new Collection<DateTime>();\r\n            this._removedItems = new Collection<DateTime>();\r\n        }\r\n\r\n        #region Internal Properties\r\n\r\n        internal DateTime? MinimumDate\r\n        {\r\n            get\r\n            {\r\n                if (Count < 1)\r\n                {\r\n                    return null;\r\n                }\r\n\r\n                if (!_minimumDate.HasValue)\r\n                {\r\n                    DateTime result = this[0];\r\n                    foreach (DateTime selectedDate in this)\r\n                    {\r\n                        if (DateTime.Compare(selectedDate, result) < 0)\r\n                        {\r\n                            result = selectedDate;\r\n                        }\r\n                    }\r\n\r\n                    _maximumDate = result;\r\n                }\r\n\r\n                return _minimumDate;\r\n            }\r\n        }\r\n\r\n        internal DateTime? MaximumDate\r\n        {\r\n            get\r\n            {\r\n                if (Count < 1)\r\n                {\r\n                    return null;\r\n                }\r\n\r\n                if (!_maximumDate.HasValue)\r\n                {\r\n                    DateTime result = this[0];\r\n                    foreach (DateTime selectedDate in this)\r\n                    {\r\n                        if (DateTime.Compare(selectedDate, result) > 0)\r\n                        {\r\n                            result = selectedDate;\r\n                        }\r\n                    }\r\n\r\n                    _maximumDate = result;\r\n                }\r\n\r\n                return _maximumDate;\r\n            }\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region Public methods\r\n\r\n        /// <summary>\r\n        /// Adds a range of dates to the Calendar SelectedDates.\r\n        /// </summary>\r\n        /// <param name=\"start\"></param>\r\n        /// <param name=\"end\"></param>\r\n        public void AddRange(DateTime start, DateTime end)\r\n        {\r\n            BeginAddRange();\r\n\r\n            // If CalendarSelectionMode.SingleRange and a user programmatically tries to add multiple ranges, we will throw away the old range and replace it with the new one.\r\n            if (this._owner.SelectionMode == CalendarSelectionMode.SingleRange && this.Count > 0)\r\n            {\r\n                this.ClearInternal();\r\n            }\r\n\r\n            foreach (DateTime current in GetDaysInRange(start, end))\r\n            {\r\n                this.Add(current);\r\n            }\r\n\r\n            EndAddRange();\r\n        }\r\n\r\n        #endregion Public Methods\r\n\r\n        #region Protected methods\r\n\r\n        /// <summary>\r\n        /// Clears all the items of the SelectedDates.\r\n        /// </summary>\r\n        protected override void ClearItems()\r\n        {\r\n            if (!IsValidThread())\r\n            {\r\n                throw new NotSupportedException(SR.Get(SRID.CalendarCollection_MultiThreadedCollectionChangeNotSupported));\r\n            }\r\n\r\n            // Turn off highlight\r\n            this._owner.HoverStart = null;\r\n            ClearInternal(true /*fireChangeNotification*/);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Inserts the item in the specified position of the SelectedDates collection.\r\n        /// </summary>\r\n        /// <param name=\"index\"></param>\r\n        /// <param name=\"item\"></param>\r\n        protected override void InsertItem(int index, DateTime item)\r\n        {\r\n            if (!IsValidThread())\r\n            {\r\n                throw new NotSupportedException(SR.Get(SRID.CalendarCollection_MultiThreadedCollectionChangeNotSupported));\r\n            }\r\n\r\n            if (!this.Contains(item))\r\n            {\r\n                Collection<DateTime> addedItems = new Collection<DateTime>();\r\n\r\n                bool isCleared = CheckSelectionMode();\r\n\r\n                if (Calendar.IsValidDateSelection(this._owner, item))\r\n                {\r\n                    // If the Collection is cleared since it is SingleRange and it had another range\r\n                    // set the index to 0\r\n                    if (isCleared)\r\n                    {\r\n                        index = 0;\r\n                        isCleared = false;\r\n                    }\r\n\r\n                    base.InsertItem(index, item);\r\n                    UpdateMinMax(item);\r\n\r\n                    // The event fires after SelectedDate changes\r\n                    if (index == 0 && !(this._owner.SelectedDate.HasValue && DateTime.Compare(this._owner.SelectedDate.Value, item) == 0))\r\n                    {\r\n                        this._owner.SelectedDate = item;\r\n                    }\r\n\r\n                    if (!_isAddingRange)\r\n                    {\r\n                        addedItems.Add(item);\r\n\r\n                        RaiseSelectionChanged(this._removedItems, addedItems);\r\n                        this._removedItems.Clear();\r\n                        int monthDifference = DateTimeHelper.CompareYearMonth(item, this._owner.DisplayDateInternal);\r\n\r\n                        if (monthDifference < 2 && monthDifference > -2)\r\n                        {\r\n                            this._owner.UpdateCellItems();\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        this._addedItems.Add(item);\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    throw new ArgumentOutOfRangeException(SR.Get(SRID.Calendar_OnSelectedDateChanged_InvalidValue));\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes the item at the specified position.\r\n        /// </summary>\r\n        /// <param name=\"index\"></param>\r\n        protected override void RemoveItem(int index)\r\n        {\r\n            if (!IsValidThread())\r\n            {\r\n                throw new NotSupportedException(SR.Get(SRID.CalendarCollection_MultiThreadedCollectionChangeNotSupported));\r\n            }\r\n\r\n            if (index >= this.Count)\r\n            {\r\n                base.RemoveItem(index);\r\n                ClearMinMax();\r\n            }\r\n            else\r\n            {\r\n                Collection<DateTime> addedItems = new Collection<DateTime>();\r\n                Collection<DateTime> removedItems = new Collection<DateTime>();\r\n                int monthDifference = DateTimeHelper.CompareYearMonth(this[index], this._owner.DisplayDateInternal);\r\n\r\n                removedItems.Add(this[index]);\r\n                base.RemoveItem(index);\r\n                ClearMinMax();\r\n\r\n                // The event fires after SelectedDate changes\r\n                if (index == 0)\r\n                {\r\n                    if (Count > 0)\r\n                    {\r\n                        this._owner.SelectedDate = this[0];\r\n                    }\r\n                    else\r\n                    {\r\n                        this._owner.SelectedDate = null;\r\n                    }\r\n                }\r\n\r\n                RaiseSelectionChanged(removedItems, addedItems);\r\n\r\n                if (monthDifference < 2 && monthDifference > -2)\r\n                {\r\n                    this._owner.UpdateCellItems();\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// The object in the specified index is replaced with the provided item.\r\n        /// </summary>\r\n        /// <param name=\"index\"></param>\r\n        /// <param name=\"item\"></param>\r\n        protected override void SetItem(int index, DateTime item)\r\n        {\r\n            if (!IsValidThread())\r\n            {\r\n                throw new NotSupportedException(SR.Get(SRID.CalendarCollection_MultiThreadedCollectionChangeNotSupported));\r\n            }\r\n\r\n            if (!this.Contains(item))\r\n            {\r\n                Collection<DateTime> addedItems = new Collection<DateTime>();\r\n                Collection<DateTime> removedItems = new Collection<DateTime>();\r\n\r\n                if (index >= this.Count)\r\n                {\r\n                    base.SetItem(index, item);\r\n                    UpdateMinMax(item);\r\n                }\r\n                else\r\n                {\r\n                    if (item != null && DateTime.Compare(this[index], item) != 0 && Calendar.IsValidDateSelection(this._owner, item))\r\n                    {\r\n                        removedItems.Add(this[index]);\r\n                        base.SetItem(index, item);\r\n                        UpdateMinMax(item);\r\n\r\n                        addedItems.Add(item);\r\n\r\n                        // The event fires after SelectedDate changes\r\n                        if (index == 0 && !(this._owner.SelectedDate.HasValue && DateTime.Compare(this._owner.SelectedDate.Value, item) == 0))\r\n                        {\r\n                            this._owner.SelectedDate = item;\r\n                        }\r\n\r\n                        RaiseSelectionChanged(removedItems, addedItems);\r\n\r\n                        int monthDifference = DateTimeHelper.CompareYearMonth(item, this._owner.DisplayDateInternal);\r\n\r\n                        if (monthDifference < 2 && monthDifference > -2)\r\n                        {\r\n                            this._owner.UpdateCellItems();\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        #endregion Protected methods\r\n\r\n        #region Internal Methods\r\n\r\n        /// <summary>\r\n        /// Adds a range of dates to the Calendar SelectedDates.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// Helper version of AddRange for mouse drag selection. \r\n        /// This version guarantees no exceptions will be thrown by removing blackout days from the range before adding to the collection      \r\n        /// </remarks>\r\n        internal void AddRangeInternal(DateTime start, DateTime end)\r\n        {\r\n            BeginAddRange();\r\n\r\n            // In Mouse Selection we allow the user to be able to add multiple ranges in one action in MultipleRange Mode\r\n            // In SingleRange Mode, we only add the first selected range\r\n            DateTime lastAddedDate = start;\r\n            foreach (DateTime current in GetDaysInRange(start, end))\r\n            {\r\n                if (Calendar.IsValidDateSelection(this._owner, current))\r\n                {\r\n                    this.Add(current);\r\n                    lastAddedDate = current;\r\n                }\r\n                else\r\n                {\r\n                    if (this._owner.SelectionMode == CalendarSelectionMode.SingleRange)\r\n                    {\r\n                        this._owner.CurrentDate = lastAddedDate;\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n\r\n            EndAddRange();\r\n        }\r\n\r\n        internal void ClearInternal()\r\n        {\r\n            ClearInternal(false /*fireChangeNotification*/);\r\n        }\r\n\r\n        internal void ClearInternal(bool fireChangeNotification)\r\n        {\r\n            if (this.Count > 0)\r\n            {\r\n                foreach (DateTime item in this)\r\n                {\r\n                    _removedItems.Add(item);\r\n                }\r\n\r\n                base.ClearItems();\r\n                ClearMinMax();\r\n\r\n                if (fireChangeNotification)\r\n                {\r\n                    if (this._owner.SelectedDate != null)\r\n                    {\r\n                        this._owner.SelectedDate = null;\r\n                    }\r\n\r\n                    if (_removedItems.Count > 0)\r\n                    {\r\n                        Collection<DateTime> addedItems = new Collection<DateTime>();\r\n                        RaiseSelectionChanged(_removedItems, addedItems);\r\n                        _removedItems.Clear();\r\n                    }\r\n\r\n                    this._owner.UpdateCellItems();\r\n                }\r\n            }\r\n        }\r\n\r\n\r\n        internal void Toggle(DateTime date)\r\n        {\r\n            if (Calendar.IsValidDateSelection(this._owner, date))\r\n            {\r\n                switch (this._owner.SelectionMode)\r\n                {\r\n                    case CalendarSelectionMode.SingleDate:\r\n                    {\r\n                        if (!this._owner.SelectedDate.HasValue || DateTimeHelper.CompareDays(this._owner.SelectedDate.Value, date) != 0)\r\n                        {\r\n                            this._owner.SelectedDate = date;\r\n                        }\r\n                        else \r\n                        {\r\n                            this._owner.SelectedDate = null;\r\n                        }\r\n\r\n                        break;\r\n                    }\r\n\r\n                    case CalendarSelectionMode.MultipleRange:\r\n                    {\r\n                        if (!Remove(date))\r\n                        {\r\n                            Add(date);\r\n                        }\r\n\r\n                        break;\r\n                    }\r\n\r\n                    default: \r\n                    {\r\n                        Debug.Assert(false);\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        #endregion Internal Methods\r\n\r\n        #region Private Methods\r\n\r\n        private void RaiseSelectionChanged(IList removedItems, IList addedItems)\r\n        {\r\n            this._owner.OnSelectedDatesCollectionChanged(new CalendarSelectionChangedEventArgs(Calendar.SelectedDatesChangedEvent, removedItems, addedItems));\r\n        }\r\n\r\n        private void BeginAddRange()\r\n        {\r\n            Debug.Assert(!_isAddingRange);\r\n            _isAddingRange = true;\r\n        }\r\n\r\n        private void EndAddRange()\r\n        {\r\n            Debug.Assert(_isAddingRange);\r\n\r\n            _isAddingRange = false;\r\n            RaiseSelectionChanged(this._removedItems, this._addedItems);\r\n            this._removedItems.Clear();\r\n            this._addedItems.Clear();\r\n            this._owner.UpdateCellItems();\r\n        }\r\n\r\n        private bool CheckSelectionMode()\r\n        {\r\n            if (this._owner.SelectionMode == CalendarSelectionMode.None)\r\n            {\r\n                throw new InvalidOperationException(SR.Get(SRID.Calendar_OnSelectedDateChanged_InvalidOperation));\r\n            }\r\n\r\n            if (this._owner.SelectionMode == CalendarSelectionMode.SingleDate && this.Count > 0)\r\n            {\r\n                throw new InvalidOperationException(SR.Get(SRID.Calendar_CheckSelectionMode_InvalidOperation));\r\n            }\r\n\r\n            // if user tries to add an item into the SelectedDates in SingleRange mode, we throw away the old range and replace it with the new one\r\n            // in order to provide the removed items without an additional event, we are calling ClearInternal\r\n            if (this._owner.SelectionMode == CalendarSelectionMode.SingleRange && !_isAddingRange && this.Count > 0)\r\n            {\r\n                this.ClearInternal();\r\n                return true;\r\n            }\r\n            else\r\n            {\r\n                return false;\r\n            }\r\n        }\r\n\r\n        private bool IsValidThread()\r\n        {\r\n            return Thread.CurrentThread == this._dispatcherThread;\r\n        }\r\n\r\n        private void UpdateMinMax(DateTime date)\r\n        {\r\n            if ((!_maximumDate.HasValue) || (date > _maximumDate.Value))\r\n            {\r\n                _maximumDate = date;\r\n            }\r\n\r\n            if ((!_minimumDate.HasValue) || (date < _minimumDate.Value))\r\n            {\r\n                _minimumDate = date;\r\n            }\r\n        }\r\n\r\n        private void ClearMinMax()\r\n        {\r\n            _maximumDate = null;\r\n            _minimumDate = null;\r\n        }\r\n\r\n        private static IEnumerable<DateTime> GetDaysInRange(DateTime start, DateTime end)\r\n        {\r\n            // increment parameter specifies if the Days were selected in Descending order or Ascending order\r\n            // based on this value, we add the days in the range either in Ascending order or in Descending order\r\n            int increment = GetDirection(start, end);\r\n\r\n            DateTime? rangeStart = start;\r\n\r\n            do\r\n            {\r\n                yield return rangeStart.Value;\r\n                rangeStart = DateTimeHelper.AddDays(rangeStart.Value, increment);\r\n            }\r\n            while (rangeStart.HasValue && DateTime.Compare(end, rangeStart.Value) != -increment);\r\n        }\r\n\r\n        private static int GetDirection(DateTime start, DateTime end)\r\n        {\r\n            return (DateTime.Compare(end, start) >= 0) ? 1 : -1;\r\n        }\r\n\r\n        #endregion Private Methods\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Calendar/Microsoft/Windows/Controls/VisualStates.cs",
    "content": "﻿//---------------------------------------------------------------------------\r\n//\r\n// Copyright (C) Microsoft Corporation.  All rights reserved.\r\n//\r\n//---------------------------------------------------------------------------\r\n\r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\n\r\nnamespace Microsoft.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Names and helpers for visual states in the controls.\r\n    /// </summary>\r\n    internal static class VisualStates\r\n    {\r\n        #region GroupCalendarButtonFocus\r\n        /// <summary>\r\n        /// Unfocused state for Calendar Buttons\r\n        /// </summary>\r\n        public const string StateCalendarButtonUnfocused = \"CalendarButtonUnfocused\";\r\n\r\n        /// <summary>\r\n        /// Focused state for Calendar Buttons\r\n        /// </summary>\r\n        public const string StateCalendarButtonFocused = \"CalendarButtonFocused\";\r\n\r\n        /// <summary>\r\n        /// CalendarButtons Focus state group\r\n        /// </summary>\r\n        public const string GroupCalendarButtonFocus = \"CalendarButtonFocusStates\";\r\n\r\n        #endregion GroupCalendarButtonFocus\r\n\r\n        #region GroupCommon\r\n        /// <summary>\r\n        /// Normal state\r\n        /// </summary>\r\n        public const string StateNormal = \"Normal\";\r\n\r\n        /// <summary>\r\n        /// MouseOver state\r\n        /// </summary>\r\n        public const string StateMouseOver = \"MouseOver\";\r\n\r\n        /// <summary>\r\n        /// Pressed state\r\n        /// </summary>\r\n        public const string StatePressed = \"Pressed\";\r\n\r\n        /// <summary>\r\n        /// Disabled state\r\n        /// </summary>\r\n        public const string StateDisabled = \"Disabled\";\r\n\r\n        /// <summary>\r\n        /// Common state group\r\n        /// </summary>\r\n        public const string GroupCommon = \"CommonStates\";\r\n        #endregion GroupCommon\r\n\r\n        #region GroupFocus\r\n        /// <summary>\r\n        /// Unfocused state\r\n        /// </summary>\r\n        public const string StateUnfocused = \"Unfocused\";\r\n\r\n        /// <summary>\r\n        /// Focused state\r\n        /// </summary>\r\n        public const string StateFocused = \"Focused\";\r\n\r\n        /// <summary>\r\n        /// Focus state group\r\n        /// </summary>\r\n        public const string GroupFocus = \"FocusStates\";\r\n        #endregion GroupFocus\r\n\r\n        #region GroupSelection\r\n        /// <summary>\r\n        /// Selected state\r\n        /// </summary>\r\n        public const string StateSelected = \"Selected\";\r\n\r\n        /// <summary>\r\n        /// Unselected state\r\n        /// </summary>\r\n        public const string StateUnselected = \"Unselected\";\r\n\r\n        /// <summary>\r\n        /// Selection state group\r\n        /// </summary>\r\n        public const string GroupSelection = \"SelectionStates\";\r\n        #endregion GroupSelection\r\n\r\n        #region GroupActive\r\n        /// <summary>\r\n        /// Active state\r\n        /// </summary>\r\n        public const string StateActive = \"Active\";\r\n\r\n        /// <summary>\r\n        /// Inactive state\r\n        /// </summary>\r\n        public const string StateInactive = \"Inactive\";\r\n\r\n        /// <summary>\r\n        /// Active state group\r\n        /// </summary>\r\n        public const string GroupActive = \"ActiveStates\";\r\n        #endregion GroupActive\r\n\r\n        #region GroupValidation\r\n        /// <summary>\r\n        /// Valid state\r\n        /// </summary>\r\n        public const string StateValid = \"Valid\";\r\n\r\n        /// <summary>\r\n        /// InvalidFocused state\r\n        /// </summary>\r\n        public const string StateInvalidFocused = \"InvalidFocused\";\r\n\r\n        /// <summary>\r\n        /// InvalidUnfocused state\r\n        /// </summary>\r\n        public const string StateInvalidUnfocused = \"InvalidUnfocused\";\r\n\r\n        /// <summary>\r\n        /// Validation state group\r\n        /// </summary>\r\n        public const string GroupValidation = \"ValidationStates\";\r\n        #endregion GroupValidation\r\n\r\n        #region GroupWatermark\r\n        /// <summary>\r\n        /// Unwatermarked state\r\n        /// </summary>\r\n        public const string StateUnwatermarked = \"Unwatermarked\";\r\n\r\n        /// <summary>\r\n        /// Watermarked state\r\n        /// </summary>\r\n        public const string StateWatermarked = \"Watermarked\";\r\n\r\n        /// <summary>\r\n        /// Watermark state group\r\n        /// </summary>\r\n        public const string GroupWatermark = \"WatermarkStates\";\r\n        #endregion GroupWatermark\r\n\r\n        /// <summary>\r\n        /// Use VisualStateManager to change the visual state of the control.\r\n        /// </summary>\r\n        /// <param name=\"control\">\r\n        /// Control whose visual state is being changed.\r\n        /// </param>\r\n        /// <param name=\"useTransitions\">\r\n        /// true to use transitions when updating the visual state, false to\r\n        /// snap directly to the new visual state.\r\n        /// </param>\r\n        /// <param name=\"stateNames\">\r\n        /// Ordered list of state names and fallback states to transition into.\r\n        /// Only the first state to be found will be used.\r\n        /// </param>\r\n        public static void GoToState(Control control, bool useTransitions, params string[] stateNames)\r\n        {\r\n            if (control == null)\r\n            {\r\n                throw new ArgumentNullException(\"control\");\r\n            }\r\n\r\n            if (stateNames == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            foreach (string name in stateNames)\r\n            {\r\n                if (VisualStateManager.GoToState(control, name, useTransitions))\r\n                {\r\n                    break;\r\n                }\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Calendar/Themes/Aero.NormalColor.xaml",
    "content": "﻿<!--=================================================================\r\nCopyright (C) Microsoft Corporation.  All rights reserved.\r\n==================================================================-->\r\n\r\n<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n                    xmlns:local=\"clr-namespace:Microsoft.Windows.Controls\"\r\n                    xmlns:sys=\"clr-namespace:System;assembly=mscorlib\">\r\n\r\n  <sys:String x:Key=\"{ComponentResourceKey TypeInTargetAssembly={x:Type local:Calendar},ResourceId=Theme}\">Aero.NormalColor</sys:String>\r\n\r\n</ResourceDictionary>\r\n"
  },
  {
    "path": "WpfToolkit/Calendar/Themes/Classic.xaml",
    "content": "﻿<!--=================================================================\r\nCopyright (C) Microsoft Corporation.  All rights reserved.\r\n==================================================================-->\r\n\r\n<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n                    xmlns:local=\"clr-namespace:Microsoft.Windows.Controls\"\r\n                    xmlns:sys=\"clr-namespace:System;assembly=mscorlib\">\r\n\r\n  <sys:String x:Key=\"{ComponentResourceKey TypeInTargetAssembly={x:Type local:Calendar}, ResourceId=Theme}\">Classic</sys:String>\r\n\r\n</ResourceDictionary>\r\n"
  },
  {
    "path": "WpfToolkit/Calendar/Themes/Generic.xaml",
    "content": "﻿<!--=================================================================\r\nCopyright (C) Microsoft Corporation.  All rights reserved.\r\n==================================================================-->\r\n\r\n<ResourceDictionary \r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:local=\"clr-namespace:Microsoft.Windows.Controls\"\r\n    xmlns:primitives=\"clr-namespace:Microsoft.Windows.Controls.Primitives\"\r\n    xmlns:vsm=\"clr-namespace:System.Windows\">\r\n\r\n    <LinearGradientBrush x:Key=\"{ComponentResourceKey TypeInTargetAssembly={x:Type local:Calendar}, ResourceId=CalendarBackgroundBrush}\"\r\n    \tx:Shared=\"false\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n        <GradientStop Color=\"{DynamicResource {x:Static SystemColors.ActiveCaptionColorKey}}\" Offset=\"0\"/>\r\n        <GradientStop Color=\"{DynamicResource {x:Static SystemColors.ActiveCaptionColorKey}}\" Offset=\"0.16\"/>\r\n        <GradientStop Color=\"{DynamicResource {x:Static SystemColors.WindowColorKey}}\" Offset=\"0.16\"/>\r\n        <GradientStop Color=\"{DynamicResource {x:Static SystemColors.WindowColorKey}}\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <!--Calendar-->\r\n    <Style TargetType=\"local:Calendar\">\r\n        <Setter Property=\"Foreground\" Value=\"#FF333333\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource {ComponentResourceKey TypeInTargetAssembly={x:Type local:Calendar}, ResourceId=CalendarBackgroundBrush}}\" />\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"#FFA3AEB9\" Offset=\"0\"/>\r\n                    <GradientStop Color=\"#FF8399A9\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF718597\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF617584\" Offset=\"1\"/>\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"></Setter>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"local:Calendar\">\r\n                    <StackPanel Name=\"PART_Root\" HorizontalAlignment=\"Center\">\r\n                        <primitives:CalendarItem \r\n                            Name=\"PART_CalendarItem\" \r\n                            Style=\"{TemplateBinding CalendarItemStyle}\"\r\n                            Background=\"{TemplateBinding Background}\" \r\n                            BorderBrush=\"{TemplateBinding BorderBrush}\" \r\n                            BorderThickness=\"{TemplateBinding BorderThickness}\"                            \r\n                            />\r\n                    </StackPanel>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- Start: Previous button template -->\r\n    <ControlTemplate x:Key=\"PreviousButtonTemplate\" TargetType=\"Button\">\r\n        <Grid Cursor=\"Hand\">\r\n            <vsm:VisualStateManager.VisualStateGroups>\r\n                <vsm:VisualStateGroup x:Name=\"CommonStates\">\r\n                    <vsm:VisualState x:Name=\"Normal\" />\r\n                    <vsm:VisualState x:Name=\"MouseOver\">\r\n                        <Storyboard>\r\n                            <ColorAnimation Storyboard.TargetName=\"TextColor\" Storyboard.TargetProperty=\"Color\" To=\"#FF73A9D8\" Duration=\"0\" />\r\n                        </Storyboard>\r\n                    </vsm:VisualState>\r\n                    <vsm:VisualState x:Name=\"Disabled\">\r\n                        <Storyboard>\r\n                            <DoubleAnimation Storyboard.TargetName=\"TextColor\" Storyboard.TargetProperty=\"Opacity\" To=\".5\" Duration=\"0\" />\r\n                        </Storyboard>\r\n                    </vsm:VisualState>\r\n                </vsm:VisualStateGroup>\r\n            </vsm:VisualStateManager.VisualStateGroups>\r\n            <Rectangle Fill=\"#11E5EBF1\" Stretch=\"Fill\" Opacity=\"1\"/>\r\n            <Grid>\r\n                <Path Margin=\"14,-6,0,0\" Height=\"10\" Width=\"6\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Left\" Stretch=\"Fill\" Data=\"M288.75,232.25 L288.75,240.625 L283,236.625 z\">\r\n                    <Path.Fill>\r\n                        <SolidColorBrush x:Name=\"TextColor\" Color=\"#FF333333\" />\r\n                    </Path.Fill>\r\n                </Path>\r\n            </Grid>\r\n        </Grid>\r\n    </ControlTemplate>\r\n\r\n    <!-- End: Previous button template -->\r\n\r\n    <!-- Start: Next button template -->\r\n    <ControlTemplate x:Key=\"NextButtonTemplate\" TargetType=\"Button\">\r\n        <Grid Cursor=\"Hand\">\r\n            <vsm:VisualStateManager.VisualStateGroups>\r\n                <vsm:VisualStateGroup x:Name=\"CommonStates\">\r\n                    <vsm:VisualState x:Name=\"Normal\" />\r\n                    <vsm:VisualState x:Name=\"MouseOver\">\r\n                        <Storyboard>\r\n                            <ColorAnimation Storyboard.TargetName=\"TextColor\" Storyboard.TargetProperty=\"Color\" To=\"#FF73A9D8\" Duration=\"0\" />\r\n                        </Storyboard>\r\n                    </vsm:VisualState>\r\n                    <vsm:VisualState x:Name=\"Disabled\">\r\n                        <Storyboard>\r\n                            <DoubleAnimation Storyboard.TargetName=\"TextColor\" Storyboard.TargetProperty=\"Opacity\" To=\".5\" Duration=\"0\" />\r\n                        </Storyboard>\r\n                    </vsm:VisualState>\r\n                </vsm:VisualStateGroup>\r\n            </vsm:VisualStateManager.VisualStateGroups>\r\n            <Rectangle Fill=\"#11E5EBF1\" Stretch=\"Fill\" Opacity=\"1\"/>\r\n            <Grid>\r\n                <Path Margin=\"0,-6,14,0\" Height=\"10\" Width=\"6\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Right\" Stretch=\"Fill\" Data=\"M282.875,231.875 L282.875,240.375 L288.625,236 z\">\r\n                    <Path.Fill>\r\n                        <SolidColorBrush x:Name=\"TextColor\" Color=\"#FF333333\" />\r\n                    </Path.Fill>\r\n                </Path>\r\n            </Grid>\r\n        </Grid>\r\n    </ControlTemplate>\r\n\r\n    <!-- End: Next button template -->\r\n\r\n    <!-- Start: Header button template -->\r\n    <ControlTemplate x:Key=\"HeaderButtonTemplate\" TargetType=\"Button\">\r\n        <Grid Cursor=\"Hand\">\r\n            <vsm:VisualStateManager.VisualStateGroups>\r\n                <vsm:VisualStateGroup x:Name=\"CommonStates\">\r\n                    <vsm:VisualState x:Name=\"Normal\" />\r\n                    <vsm:VisualState x:Name=\"MouseOver\">\r\n                        <Storyboard>\r\n                            <ColorAnimation Storyboard.TargetName=\"TextColor\" Storyboard.TargetProperty=\"Color\" To=\"#FF73A9D8\" Duration=\"0\" />\r\n                        </Storyboard>\r\n                    </vsm:VisualState>\r\n                    <vsm:VisualState x:Name=\"Disabled\">\r\n                        <Storyboard>\r\n                            <DoubleAnimation Storyboard.TargetName=\"buttonContent\" Storyboard.TargetProperty=\"Opacity\" To=\".5\" Duration=\"0\" />\r\n                        </Storyboard>\r\n                    </vsm:VisualState>\r\n                </vsm:VisualStateGroup>\r\n            </vsm:VisualStateManager.VisualStateGroups>\r\n            <ContentPresenter\r\n                                                  x:Name=\"buttonContent\"\r\n                                                  Content=\"{TemplateBinding Content}\"\r\n                                                  ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                                                  Margin=\"1,4,1,9\"\r\n                                                  HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                                                  VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\">\r\n                <TextElement.Foreground>\r\n                    <SolidColorBrush x:Name=\"TextColor\" Color=\"#FF333333\"/>\r\n                </TextElement.Foreground>\r\n            </ContentPresenter>\r\n        </Grid>\r\n    </ControlTemplate>\r\n\r\n    <!-- End: Header button template -->\r\n    <!--CalendarItem-->\r\n    <Style TargetType=\"primitives:CalendarItem\">\r\n        <Setter Property=\"Margin\" Value=\"0,3,0,3\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"primitives:CalendarItem\">\r\n                    <ControlTemplate.Resources>\r\n                        <!-- Start: Data template for header button -->\r\n                        <DataTemplate x:Key=\"DayTitleTemplate\">\r\n                            <TextBlock\r\n                                                FontWeight=\"Bold\" \r\n                                                FontFamily=\"Verdana\" \r\n                                                FontSize=\"9.5\" \r\n                                                Foreground=\"#FF333333\" \r\n                                                HorizontalAlignment=\"Center\"\r\n                                                Text=\"{Binding}\"\r\n                                                Margin=\"0,6,0,6\"\r\n                                                VerticalAlignment=\"Center\"/>\r\n                                        </DataTemplate>\r\n                        <!-- End: Data template for header button -->\r\n                    </ControlTemplate.Resources>\r\n                    <Grid Name=\"PART_Root\" >\r\n                        <Grid.Resources>\r\n                            <SolidColorBrush x:Key=\"DisabledColor\" Color=\"#A5FFFFFF\" />\r\n                        </Grid.Resources>\r\n                        <vsm:VisualStateManager.VisualStateGroups>\r\n                            <vsm:VisualStateGroup x:Name=\"CommonStates\">\r\n                                <vsm:VisualState x:Name=\"Normal\" />\r\n                                <vsm:VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"PART_DisabledVisual\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" Duration=\"0\" />\r\n                                    </Storyboard>\r\n                                </vsm:VisualState>\r\n                            </vsm:VisualStateGroup>\r\n                        </vsm:VisualStateManager.VisualStateGroups>\r\n\r\n                        <Border \r\n                            BorderBrush=\"{TemplateBinding BorderBrush}\" \r\n                            BorderThickness=\"{TemplateBinding BorderThickness}\" \r\n                            Background=\"{TemplateBinding Background}\" \r\n                            CornerRadius=\"1\">\r\n                            <Border CornerRadius=\"1\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"2\">\r\n                                <Grid>\r\n                                    <Grid.RowDefinitions>\r\n                                        <RowDefinition Height=\"Auto\"/>\r\n                                        <RowDefinition Height=\"*\"/>\r\n                                    </Grid.RowDefinitions>\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                    </Grid.ColumnDefinitions>\r\n\r\n                                    <!-- Start: Previous button content -->\r\n                                    <Button x:Name=\"PART_PreviousButton\" \r\n                                            Grid.Row=\"0\" Grid.Column=\"0\"\r\n                                            Template=\"{StaticResource PreviousButtonTemplate}\" \r\n                                            Height=\"20\" Width=\"28\" \r\n                                            HorizontalAlignment=\"Left\" \r\n                                            Focusable=\"False\"\r\n                                            />\r\n                                    <!-- End: Previous button content -->\r\n\r\n                                    <!-- Start: Header button content -->\r\n                                    <Button x:Name=\"PART_HeaderButton\"                                             \r\n                                            Grid.Row=\"0\" Grid.Column=\"1\" \r\n                                            Template=\"{StaticResource HeaderButtonTemplate}\" \r\n                                            HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" \r\n                                            FontWeight=\"Bold\" FontSize=\"10.5\" \r\n                                            Focusable=\"False\"\r\n                                            />\r\n                                    <!-- End: Header button content -->\r\n\r\n                                    <!-- Start: Next button content -->\r\n                                    <Button x:Name=\"PART_NextButton\" \r\n                                            Grid.Row=\"0\" Grid.Column=\"2\" \r\n                                            Height=\"20\" Width=\"28\" \r\n                                            HorizontalAlignment=\"Right\" \r\n                                            Template=\"{StaticResource NextButtonTemplate}\" \r\n                                            Focusable=\"False\"\r\n                                            />\r\n                                    <!-- End: Next button content -->\r\n\r\n                                    <!-- Start: Month Content Grid -->\r\n                                    <Grid x:Name=\"PART_MonthView\" Grid.Row=\"1\" Grid.ColumnSpan=\"3\" Visibility=\"Visible\" Margin=\"6,-1,6,6\">\r\n                                        <Grid.RowDefinitions>\r\n                                            <RowDefinition Height=\"Auto\"/>\r\n                                            <RowDefinition Height=\"Auto\"/>\r\n                                            <RowDefinition Height=\"Auto\"/>\r\n                                            <RowDefinition Height=\"Auto\"/>\r\n                                            <RowDefinition Height=\"Auto\"/>\r\n                                            <RowDefinition Height=\"Auto\"/>\r\n                                            <RowDefinition Height=\"Auto\"/>\r\n                                        </Grid.RowDefinitions>\r\n                                        <Grid.ColumnDefinitions>\r\n                                            <ColumnDefinition Width=\"Auto\"/>\r\n                                            <ColumnDefinition Width=\"Auto\"/>\r\n                                            <ColumnDefinition Width=\"Auto\"/>\r\n                                            <ColumnDefinition Width=\"Auto\"/>\r\n                                            <ColumnDefinition Width=\"Auto\"/>\r\n                                            <ColumnDefinition Width=\"Auto\"/>\r\n                                            <ColumnDefinition Width=\"Auto\"/>\r\n                                        </Grid.ColumnDefinitions>\r\n                                    </Grid>\r\n                                    <!-- End: Month Content Grid -->\r\n\r\n                                    <!-- End: Year Content Grid -->\r\n                                    <Grid x:Name=\"PART_YearView\" Grid.Row=\"1\" Grid.ColumnSpan=\"3\" Visibility=\"Hidden\" Margin=\"6,-3,7,6\">\r\n                                        <Grid.RowDefinitions>\r\n                                            <RowDefinition Height=\"Auto\"/>\r\n                                            <RowDefinition Height=\"Auto\"/>\r\n                                            <RowDefinition Height=\"Auto\"/>\r\n                                        </Grid.RowDefinitions>\r\n                                        <Grid.ColumnDefinitions>\r\n                                            <ColumnDefinition Width=\"Auto\"/>\r\n                                            <ColumnDefinition Width=\"Auto\"/>\r\n                                            <ColumnDefinition Width=\"Auto\"/>\r\n                                            <ColumnDefinition Width=\"Auto\"/>\r\n                                        </Grid.ColumnDefinitions>\r\n                                    </Grid>\r\n                                    <!-- End: Year Content Grid -->\r\n                                </Grid>\r\n                            </Border>\r\n                        </Border>\r\n                        <Rectangle x:Name=\"PART_DisabledVisual\" Opacity=\"0\" Visibility=\"Collapsed\" Stretch=\"Fill\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" Stroke=\"{StaticResource DisabledColor}\" Fill=\"{StaticResource DisabledColor}\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter TargetName=\"PART_DisabledVisual\" Property=\"Visibility\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <DataTrigger Value=\"Year\">\r\n                            <DataTrigger.Binding>\r\n                                <Binding Path=\"DisplayMode\">\r\n                                    <Binding.RelativeSource>\r\n                                        <RelativeSource Mode=\"FindAncestor\" AncestorType=\"{x:Type local:Calendar}\" />\r\n                                    </Binding.RelativeSource>\r\n                                </Binding>\r\n                            </DataTrigger.Binding>\r\n                            <Setter TargetName=\"PART_MonthView\" Property=\"Visibility\" Value=\"Hidden\" />\r\n                            <Setter TargetName=\"PART_YearView\" Property=\"Visibility\" Value=\"Visible\" />\r\n                        </DataTrigger>\r\n                        <DataTrigger Value=\"Decade\">\r\n                            <DataTrigger.Binding>\r\n                                <Binding Path=\"DisplayMode\">\r\n                                    <Binding.RelativeSource>\r\n                                        <RelativeSource Mode=\"FindAncestor\" AncestorType=\"{x:Type local:Calendar}\" />\r\n                                    </Binding.RelativeSource>\r\n                                </Binding>\r\n                            </DataTrigger.Binding>\r\n                            <Setter TargetName=\"PART_MonthView\" Property=\"Visibility\" Value=\"Hidden\" />\r\n                            <Setter TargetName=\"PART_YearView\" Property=\"Visibility\" Value=\"Visible\" />\r\n                        </DataTrigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>        \r\n    </Style>\r\n\r\n    <!--CalendarDayButton-->\r\n    <Style TargetType=\"primitives:CalendarDayButton\">\r\n        <Setter Property=\"Background\" Value=\"#FFBADDE9\"/>\r\n        <Setter Property=\"MinWidth\" Value=\"5\"/>\r\n        <Setter Property=\"MinHeight\" Value=\"5\"/>\r\n        <Setter Property=\"FontSize\" Value=\"10\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Center\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"primitives:CalendarDayButton\">\r\n                    <Grid>\r\n                        <vsm:VisualStateManager.VisualStateGroups>\r\n                            <vsm:VisualStateGroup x:Name=\"CommonStates\">\r\n                                <vsm:VisualStateGroup.Transitions>\r\n                                    <vsm:VisualTransition GeneratedDuration=\"0:0:0.1\" />\r\n                                </vsm:VisualStateGroup.Transitions>\r\n                                <vsm:VisualState x:Name=\"Normal\" />\r\n                                <vsm:VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\" To=\".5\" Duration=\"0\" />\r\n                                    </Storyboard>\r\n                                </vsm:VisualState>\r\n                                <vsm:VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\" To=\".5\" Duration=\"0\" />\r\n                                    </Storyboard>\r\n                                </vsm:VisualState>\r\n                                <vsm:VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" Duration=\"0\" />\r\n                                        <DoubleAnimation Storyboard.TargetName=\"NormalText\" Storyboard.TargetProperty=\"Opacity\" To=\".35\" Duration=\"0\" />\r\n                                    </Storyboard>\r\n                                </vsm:VisualState>\r\n                            </vsm:VisualStateGroup>\r\n                            <vsm:VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <vsm:VisualStateGroup.Transitions>\r\n                                    <vsm:VisualTransition GeneratedDuration=\"0\" />\r\n                                </vsm:VisualStateGroup.Transitions>\r\n                                <vsm:VisualState x:Name=\"Unselected\" />\r\n                                <vsm:VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"SelectedBackground\" Storyboard.TargetProperty=\"Opacity\" To=\".75\" Duration=\"0\" />\r\n                                    </Storyboard>\r\n                                </vsm:VisualState>\r\n                            </vsm:VisualStateGroup>\r\n                            <vsm:VisualStateGroup x:Name=\"CalendarButtonFocusStates\">\r\n                                <vsm:VisualStateGroup.Transitions>\r\n                                    <vsm:VisualTransition GeneratedDuration=\"0\" />\r\n                                </vsm:VisualStateGroup.Transitions>\r\n                                <vsm:VisualState x:Name=\"CalendarButtonFocused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"DayButtonFocusVisual\" Storyboard.TargetProperty=\"Visibility\" Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </vsm:VisualState>\r\n                                <vsm:VisualState x:Name=\"CalendarButtonUnfocused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"DayButtonFocusVisual\" Storyboard.TargetProperty=\"Visibility\" Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </vsm:VisualState>\r\n                            </vsm:VisualStateGroup>\r\n                            <vsm:VisualStateGroup x:Name=\"ActiveStates\">\r\n                                <vsm:VisualStateGroup.Transitions>\r\n                                    <vsm:VisualTransition GeneratedDuration=\"0\" />\r\n                                </vsm:VisualStateGroup.Transitions>\r\n                                <vsm:VisualState x:Name=\"Active\" />\r\n                                <vsm:VisualState x:Name=\"Inactive\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimation Duration=\"0\" Storyboard.TargetName=\"selectedText\" Storyboard.TargetProperty=\"Color\" To=\"#FF777777\"></ColorAnimation>\r\n                                    </Storyboard>\r\n                                </vsm:VisualState>\r\n                            </vsm:VisualStateGroup>\r\n                            <vsm:VisualStateGroup x:Name=\"DayStates\">\r\n                                <vsm:VisualStateGroup.Transitions>\r\n                                    <vsm:VisualTransition GeneratedDuration=\"0\" />\r\n                                </vsm:VisualStateGroup.Transitions>\r\n                                <vsm:VisualState x:Name=\"RegularDay\" />\r\n                                <vsm:VisualState x:Name=\"Today\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"TodayBackground\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" Duration=\"0\" />\r\n                                        <ColorAnimation Duration=\"0\" Storyboard.TargetName=\"selectedText\" Storyboard.TargetProperty=\"Color\" To=\"#FFFFFFFF\"></ColorAnimation>\r\n                                    </Storyboard>\r\n                                </vsm:VisualState>\r\n                            </vsm:VisualStateGroup>\r\n                            <vsm:VisualStateGroup x:Name=\"BlackoutDayStates\">\r\n                                <vsm:VisualStateGroup.Transitions>\r\n                                    <vsm:VisualTransition GeneratedDuration=\"0\" />\r\n                                </vsm:VisualStateGroup.Transitions>\r\n                                <vsm:VisualState x:Name=\"NormalDay\" />\r\n                                <vsm:VisualState x:Name=\"BlackoutDay\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"Blackout\" Storyboard.TargetProperty=\"Opacity\" To=\".2\"/>\r\n                                    </Storyboard>\r\n                                </vsm:VisualState>\r\n                            </vsm:VisualStateGroup>\r\n                        </vsm:VisualStateManager.VisualStateGroups>\r\n                        <Rectangle x:Name=\"TodayBackground\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" Fill=\"#FFAAAAAA\"/>\r\n                        <Rectangle x:Name=\"SelectedBackground\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" Fill=\"{TemplateBinding Background}\"/>\r\n                        <Rectangle x:Name=\"Background\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" Fill=\"{TemplateBinding Background}\"/>\r\n                        <ContentPresenter\r\n                                x:Name=\"NormalText\"\r\n                                HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                                VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                                Margin=\"5,1,5,1\">\r\n                            <TextElement.Foreground>\r\n                                <SolidColorBrush x:Name=\"selectedText\" Color=\"#FF333333\"/>\r\n                            </TextElement.Foreground>\r\n                        </ContentPresenter>\r\n                        <Path x:Name=\"Blackout\" Opacity=\"0\" Margin=\"3\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"#FF000000\" Stretch=\"Fill\" Data=\"M8.1772461,11.029181 L10.433105,11.029181 L11.700684,12.801641 L12.973633,11.029181 L15.191895,11.029181 L12.844727,13.999395 L15.21875,17.060919 L12.962891,17.060919 L11.673828,15.256231 L10.352539,17.060919 L8.1396484,17.060919 L10.519043,14.042364 z\"/>\r\n                        <Rectangle x:Name=\"DayButtonFocusVisual\" Visibility=\"Collapsed\" IsHitTestVisible=\"false\" RadiusX=\"1\" RadiusY=\"1\" Stroke=\"#FF45D6FA\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--Calendar Button-->\r\n    <Style TargetType=\"primitives:CalendarButton\">\r\n        <Setter Property=\"Background\" Value=\"#FFBADDE9\"/>\r\n        <Setter Property=\"MinWidth\" Value=\"40\"/>\r\n        <Setter Property=\"MinHeight\" Value=\"42\"/>\r\n        <Setter Property=\"FontSize\" Value=\"10\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Center\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"primitives:CalendarButton\">\r\n                    <Grid>\r\n                        <vsm:VisualStateManager.VisualStateGroups>\r\n                            <vsm:VisualStateGroup x:Name=\"CommonStates\">\r\n                                <vsm:VisualStateGroup.Transitions>\r\n                                    <vsm:VisualTransition GeneratedDuration=\"0:0:0.1\" />\r\n                                </vsm:VisualStateGroup.Transitions>\r\n                                <vsm:VisualState x:Name=\"Normal\" />\r\n                                <vsm:VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\" To=\".5\" Duration=\"0\" />\r\n                                    </Storyboard>\r\n                                </vsm:VisualState>\r\n                                <vsm:VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\" To=\".5\" Duration=\"0\" />\r\n                                    </Storyboard>\r\n                                </vsm:VisualState>\r\n                            </vsm:VisualStateGroup>\r\n                            <vsm:VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <vsm:VisualStateGroup.Transitions>\r\n                                    <vsm:VisualTransition GeneratedDuration=\"0\" />\r\n                                </vsm:VisualStateGroup.Transitions>\r\n                                <vsm:VisualState x:Name=\"Unselected\" />\r\n                                <vsm:VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"SelectedBackground\" Storyboard.TargetProperty=\"Opacity\" To=\".75\" Duration=\"0\" />\r\n                                    </Storyboard>\r\n                                </vsm:VisualState>\r\n                            </vsm:VisualStateGroup>\r\n                            <vsm:VisualStateGroup x:Name=\"ActiveStates\">\r\n                                <vsm:VisualStateGroup.Transitions>\r\n                                    <vsm:VisualTransition GeneratedDuration=\"0\" />\r\n                                </vsm:VisualStateGroup.Transitions>\r\n                                <vsm:VisualState x:Name=\"Active\" />\r\n                                <vsm:VisualState x:Name=\"Inactive\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimation Duration=\"0\" Storyboard.TargetName=\"selectedText\" Storyboard.TargetProperty=\"Color\" To=\"#FF777777\"></ColorAnimation>\r\n                                    </Storyboard>\r\n                                </vsm:VisualState>\r\n                            </vsm:VisualStateGroup>\r\n                            <vsm:VisualStateGroup x:Name=\"CalendarButtonFocusStates\">\r\n                                <vsm:VisualStateGroup.Transitions>\r\n                                    <vsm:VisualTransition GeneratedDuration=\"0\" />\r\n                                </vsm:VisualStateGroup.Transitions>\r\n                                <vsm:VisualState x:Name=\"CalendarButtonFocused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"CalendarButtonFocusVisual\" Storyboard.TargetProperty=\"Visibility\" Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </vsm:VisualState>\r\n                                <vsm:VisualState x:Name=\"CalendarButtonUnfocused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"CalendarButtonFocusVisual\" Storyboard.TargetProperty=\"Visibility\" Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </vsm:VisualState>\r\n                            </vsm:VisualStateGroup>\r\n                        </vsm:VisualStateManager.VisualStateGroups>\r\n                        <Rectangle x:Name=\"SelectedBackground\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" Fill=\"{TemplateBinding Background}\"/>\r\n                        <Rectangle x:Name=\"Background\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" Fill=\"{TemplateBinding Background}\"/>\r\n                        <ContentPresenter\r\n                                x:Name=\"NormalText\"\r\n                                HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                                VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                                Margin=\"1,0,1,1\">\r\n                            <TextElement.Foreground>\r\n                                <SolidColorBrush x:Name=\"selectedText\" Color=\"#FF333333\"/>\r\n                            </TextElement.Foreground>\r\n                        </ContentPresenter>\r\n                        <Rectangle x:Name=\"CalendarButtonFocusVisual\" Visibility=\"Collapsed\" IsHitTestVisible=\"false\" RadiusX=\"1\" RadiusY=\"1\" Stroke=\"#FF45D6FA\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Setter TargetName=\"CalendarButtonFocusVisual\" Property=\"Visibility\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/Calendar/Themes/Luna.HomeStead.xaml",
    "content": "﻿<!--=================================================================\r\nCopyright (C) Microsoft Corporation.  All rights reserved.\r\n==================================================================-->\r\n\r\n<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n                    xmlns:local=\"clr-namespace:Microsoft.Windows.Controls\"\r\n                    xmlns:sys=\"clr-namespace:System;assembly=mscorlib\">\r\n\r\n  <sys:String x:Key=\"{ComponentResourceKey TypeInTargetAssembly={x:Type local:Calendar},ResourceId=Theme}\">Luna.HomeStead</sys:String>\r\n\r\n</ResourceDictionary>\r\n"
  },
  {
    "path": "WpfToolkit/Calendar/Themes/Luna.Metallic.xaml",
    "content": "﻿<!--=================================================================\r\nCopyright (C) Microsoft Corporation.  All rights reserved.\r\n==================================================================-->\r\n\r\n<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n                    xmlns:local=\"clr-namespace:Microsoft.Windows.Controls\"\r\n                    xmlns:sys=\"clr-namespace:System;assembly=mscorlib\">\r\n\r\n  <sys:String x:Key=\"{ComponentResourceKey TypeInTargetAssembly={x:Type local:Calendar},ResourceId=Theme}\">Luna.Metallic</sys:String>\r\n\r\n</ResourceDictionary>\r\n"
  },
  {
    "path": "WpfToolkit/Calendar/Themes/Luna.NormalColor.xaml",
    "content": "﻿<!--=================================================================\r\nCopyright (C) Microsoft Corporation.  All rights reserved.\r\n==================================================================-->\r\n\r\n<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n                    xmlns:local=\"clr-namespace:Microsoft.Windows.Controls\"\r\n                    xmlns:sys=\"clr-namespace:System;assembly=mscorlib\">\r\n\r\n  <sys:String x:Key=\"{ComponentResourceKey TypeInTargetAssembly={x:Type local:Calendar},ResourceId=Theme}\">Luna.NormalColor</sys:String>\r\n\r\n</ResourceDictionary>\r\n"
  },
  {
    "path": "WpfToolkit/Calendar/Themes/Royale.NormalColor.xaml",
    "content": "﻿<!--=================================================================\r\nCopyright (C) Microsoft Corporation.  All rights reserved.\r\n==================================================================-->\r\n\r\n<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n                    xmlns:local=\"clr-namespace:Microsoft.Windows.Controls\"\r\n                    xmlns:sys=\"clr-namespace:System;assembly=mscorlib\">\r\n\r\n  <sys:String x:Key=\"{ComponentResourceKey TypeInTargetAssembly={x:Type local:Calendar},ResourceId=Theme}\">Royale.NormalColor</sys:String>\r\n\r\n</ResourceDictionary>\r\n"
  },
  {
    "path": "WpfToolkit/Common/System/Windows/Controls/BindingEvaluator.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System.Windows.Data;\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// A framework element that permits a binding to be evaluated in a new data\r\n    /// context leaf node.\r\n    /// </summary>\r\n    /// <typeparam name=\"T\">The type of dynamic binding to return.</typeparam>\r\n    internal partial class BindingEvaluator<T> : FrameworkElement\r\n    {\r\n        /// <summary>\r\n        /// Gets or sets the string value binding used by the control.\r\n        /// </summary>\r\n        private Binding _binding;\r\n\r\n        #region public T Value\r\n        /// <summary>\r\n        /// Gets or sets the data item string value.\r\n        /// </summary>\r\n        public T Value\r\n        {\r\n            get { return (T)GetValue(ValueProperty); }\r\n            set { SetValue(ValueProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Value dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ValueProperty =\r\n            DependencyProperty.Register(\r\n                \"Value\",\r\n                typeof(T),\r\n                typeof(BindingEvaluator<T>),\r\n                new PropertyMetadata(default(T)));\r\n\r\n        #endregion public string Value\r\n\r\n        /// <summary>\r\n        /// Gets or sets the value binding.\r\n        /// </summary>\r\n        public Binding ValueBinding\r\n        {\r\n            get { return _binding; }\r\n            set\r\n            {\r\n                _binding = value;\r\n                SetBinding(ValueProperty, _binding);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the BindingEvaluator class.\r\n        /// </summary>\r\n        public BindingEvaluator()\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the BindingEvaluator class,\r\n        /// setting the initial binding to the provided parameter.\r\n        /// </summary>\r\n        /// <param name=\"binding\">The initial string value binding.</param>\r\n        public BindingEvaluator(Binding binding)\r\n        {\r\n            SetBinding(ValueProperty, binding);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Clears the data context so that the control does not keep a\r\n        /// reference to the last-looked up item.\r\n        /// </summary>\r\n        public void ClearDataContext()\r\n        {\r\n            DataContext = null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the data context of the framework element and returns the \r\n        /// updated binding value.\r\n        /// </summary>\r\n        /// <param name=\"o\">The object to use as the data context.</param>\r\n        /// <param name=\"clearDataContext\">If set to true, this parameter will\r\n        /// clear the data context immediately after retrieving the value.</param>\r\n        /// <returns>Returns the evaluated T value of the bound dependency\r\n        /// property.</returns>\r\n        public T GetDynamicValue(object o, bool clearDataContext)\r\n        {\r\n            DataContext = o;\r\n            T value = Value;\r\n            if (clearDataContext)\r\n            {\r\n                DataContext = null;\r\n            }\r\n            return value;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the data context of the framework element and returns the \r\n        /// updated binding value.\r\n        /// </summary>\r\n        /// <param name=\"o\">The object to use as the data context.</param>\r\n        /// <returns>Returns the evaluated T value of the bound dependency\r\n        /// property.</returns>\r\n        public T GetDynamicValue(object o)\r\n        {\r\n            DataContext = o;\r\n            return Value;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Common/System/Windows/Controls/Extensions.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Media;\r\n\r\nnamespace System.Windows.Controls.Extensions\r\n{\r\n    /// <summary>\r\n    /// This set of internal extension methods provide general solutions and \r\n    /// utilities in a small enough number to not warrant a dedicated extension\r\n    /// methods class.\r\n    /// </summary>\r\n    internal static partial class Extensions\r\n    {\r\n        /// <summary>\r\n        /// Inverts a Matrix. The Invert functionality on the Matrix type is \r\n        /// internal to the framework only. Since Matrix is a struct, an out \r\n        /// parameter must be presented.\r\n        /// </summary>\r\n        /// <param name=\"m\">The Matrix object.</param>\r\n        /// <param name=\"outputMatrix\">The matrix to return by an output \r\n        /// parameter.</param>\r\n        /// <returns>Returns a value indicating whether the type was \r\n        /// successfully inverted. If the determinant is 0.0, then it cannot \r\n        /// be inverted and the original instance will remain untouched.</returns>\r\n        public static bool Invert(this Matrix m, out Matrix outputMatrix)\r\n        {\r\n            double determinant = m.M11 * m.M22 - m.M12 * m.M21;\r\n            if (determinant == 0.0)\r\n            {\r\n                outputMatrix = m;\r\n                return false;\r\n            }\r\n\r\n            Matrix matCopy = m;\r\n            m.M11 = matCopy.M22 / determinant;\r\n            m.M12 = -1 * matCopy.M12 / determinant;\r\n            m.M21 = -1 * matCopy.M21 / determinant;\r\n            m.M22 = matCopy.M11 / determinant;\r\n            m.OffsetX = (matCopy.OffsetY * matCopy.M21 - matCopy.OffsetX * matCopy.M22) / determinant;\r\n            m.OffsetY = (matCopy.OffsetX * matCopy.M12 - matCopy.OffsetY * matCopy.M11) / determinant;\r\n\r\n            outputMatrix = m;\r\n            return true;\r\n        }\r\n\r\n        /// <summary>\r\n        /// An implementation of the Contains member of string that takes in a \r\n        /// string comparison. The traditional .NET string Contains member uses \r\n        /// StringComparison.Ordinal.\r\n        /// </summary>\r\n        /// <param name=\"s\">The string.</param>\r\n        /// <param name=\"value\">The string value to search for.</param>\r\n        /// <param name=\"comparison\">The string comparison type.</param>\r\n        /// <returns>Returns true when the substring is found.</returns>\r\n        public static bool Contains(this string s, string value, StringComparison comparison)\r\n        {\r\n            return s.IndexOf(value, comparison) >= 0;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Common/System/Windows/Controls/IUpdateVisualState.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Diagnostics.CodeAnalysis;\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// The IUpdateVisualState interface is used to provide the\r\n    /// InteractionHelper with access to the type's UpdateVisualState method.\r\n    /// </summary>\r\n    [SuppressMessage(\"Microsoft.Design\", \"CA1064:ExceptionsShouldBePublic\", Justification = \"This is not an exception class.\")]\r\n    internal interface IUpdateVisualState\r\n    {\r\n        /// <summary>\r\n        /// Update the visual state of the control.\r\n        /// </summary>\r\n        /// <param name=\"useTransitions\">\r\n        /// A value indicating whether to automatically generate transitions to\r\n        /// the new state, or instantly transition to the new state.\r\n        /// </param>\r\n        void UpdateVisualState(bool useTransitions);\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Common/System/Windows/Controls/InteractionHelper.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Diagnostics;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// The InteractionHelper provides controls with support for all of the\r\n    /// common interactions like mouse movement, mouse clicks, key presses,\r\n    /// etc., and also incorporates proper event semantics when the control is\r\n    /// disabled.\r\n    /// </summary>\r\n    internal sealed partial class InteractionHelper\r\n    {\r\n        // TODO: Consult with user experience experts to validate the double\r\n        // click distance and time thresholds.\r\n\r\n        /// <summary>\r\n        /// The threshold used to determine whether two clicks are temporally\r\n        /// local and considered a double click (or triple, quadruple, etc.).\r\n        /// 500 milliseconds is the default double click value on Windows.\r\n        /// This value would ideally be pulled form the system settings.\r\n        /// </summary>\r\n        private const double SequentialClickThresholdInMilliseconds = 500.0;\r\n\r\n        /// <summary>\r\n        /// The threshold used to determine whether two clicks are spatially\r\n        /// local and considered a double click (or triple, quadruple, etc.)\r\n        /// in pixels squared.  We use pixels squared so that we can compare to\r\n        /// the distance delta without taking a square root.\r\n        /// </summary>\r\n        private const double SequentialClickThresholdInPixelsSquared = 3.0 * 3.0;\r\n\r\n        /// <summary>\r\n        /// Gets the control the InteractionHelper is targeting.\r\n        /// </summary>\r\n        public Control Control { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether the control has focus.\r\n        /// </summary>\r\n        public bool IsFocused { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether the mouse is over the control.\r\n        /// </summary> \r\n        public bool IsMouseOver { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether the read-only property is set.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Linked file.\")]\r\n        public bool IsReadOnly { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether the mouse button is pressed down\r\n        /// over the control.\r\n        /// </summary>\r\n        public bool IsPressed { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the last time the control was clicked.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// The value is stored as Utc time because it is slightly more\r\n        /// performant than converting to local time.\r\n        /// </remarks>\r\n        private DateTime LastClickTime { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the mouse position of the last click.\r\n        /// </summary>\r\n        /// <remarks>The value is relative to the control.</remarks>\r\n        private Point LastClickPosition { get; set; }\r\n        \r\n        /// <summary>\r\n        /// Gets the number of times the control was clicked.\r\n        /// </summary>\r\n        public int ClickCount { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Reference used to call UpdateVisualState on the base class.\r\n        /// </summary>\r\n        private IUpdateVisualState _updateVisualState;\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the InteractionHelper class.\r\n        /// </summary>\r\n        /// <param name=\"control\">Control receiving interaction.</param>\r\n        public InteractionHelper(Control control)\r\n        {\r\n            Debug.Assert(control != null, \"control should not be null!\");\r\n            Control = control;\r\n            _updateVisualState = control as IUpdateVisualState;\r\n\r\n            // Wire up the event handlers for events without a virtual override\r\n            control.Loaded += OnLoaded;\r\n            control.IsEnabledChanged += OnIsEnabledChanged;\r\n        }\r\n\r\n        #region UpdateVisualState\r\n        /// <summary>\r\n        /// Update the visual state of the control.\r\n        /// </summary>\r\n        /// <param name=\"useTransitions\">\r\n        /// A value indicating whether to automatically generate transitions to\r\n        /// the new state, or instantly transition to the new state.\r\n        /// </param>\r\n        /// <remarks>\r\n        /// UpdateVisualState works differently than the rest of the injected\r\n        /// functionality.  Most of the other events are overridden by the\r\n        /// calling class which calls Allow, does what it wants, and then calls\r\n        /// Base.  UpdateVisualState is the opposite because a number of the\r\n        /// methods in InteractionHelper need to trigger it in the calling\r\n        /// class.  We do this using the IUpdateVisualState internal interface.\r\n        /// </remarks>\r\n        private void UpdateVisualState(bool useTransitions)\r\n        {\r\n            if (_updateVisualState != null)\r\n            {\r\n                _updateVisualState.UpdateVisualState(useTransitions);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Update the visual state of the control.\r\n        /// </summary>\r\n        /// <param name=\"useTransitions\">\r\n        /// A value indicating whether to automatically generate transitions to\r\n        /// the new state, or instantly transition to the new state.\r\n        /// </param>\r\n        public void UpdateVisualStateBase(bool useTransitions)\r\n        {\r\n            // Handle the Common states\r\n            if (!Control.IsEnabled)\r\n            {\r\n                VisualStates.GoToState(Control, useTransitions, VisualStates.StateDisabled, VisualStates.StateNormal);\r\n            }\r\n            else if (IsReadOnly)\r\n            {\r\n                VisualStates.GoToState(Control, useTransitions, VisualStates.StateReadOnly, VisualStates.StateNormal);\r\n            }\r\n            else if (IsPressed)\r\n            {\r\n                VisualStates.GoToState(Control, useTransitions, VisualStates.StatePressed, VisualStates.StateMouseOver, VisualStates.StateNormal);\r\n            }\r\n            else if (IsMouseOver)\r\n            {\r\n                VisualStates.GoToState(Control, useTransitions, VisualStates.StateMouseOver, VisualStates.StateNormal);\r\n            }\r\n            else\r\n            {\r\n                VisualStates.GoToState(Control, useTransitions, VisualStates.StateNormal);\r\n            }\r\n\r\n            // Handle the Focused states\r\n            if (IsFocused)\r\n            {\r\n                VisualStates.GoToState(Control, useTransitions, VisualStates.StateFocused, VisualStates.StateUnfocused);\r\n            }\r\n            else\r\n            {\r\n                VisualStates.GoToState(Control, useTransitions, VisualStates.StateUnfocused);\r\n            }\r\n        }\r\n        #endregion UpdateVisualState\r\n\r\n        /// <summary>\r\n        /// Handle the control's Loaded event.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The control.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private void OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            UpdateVisualState(false);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handle changes to the control's IsEnabled property.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The control.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private void OnIsEnabledChanged(object sender, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            bool enabled = (bool) e.NewValue;\r\n            if (!enabled)\r\n            {\r\n                IsPressed = false;\r\n                IsMouseOver = false;\r\n                IsFocused = false;\r\n            }\r\n\r\n            UpdateVisualState(true);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles changes to the control's IsReadOnly property.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value of the property.</param>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Linked file.\")]\r\n        public void OnIsReadOnlyChanged(bool value)\r\n        {\r\n            IsReadOnly = value;\r\n            if (!value)\r\n            {\r\n                IsPressed = false;\r\n                IsMouseOver = false;\r\n                IsFocused = false;\r\n            }\r\n\r\n            UpdateVisualState(true);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Update the visual state of the control when its template is changed.\r\n        /// </summary>\r\n        public void OnApplyTemplateBase()\r\n        {\r\n            UpdateVisualState(false);\r\n        }\r\n\r\n        #region GotFocus\r\n        /// <summary>\r\n        /// Check if the control's GotFocus event should be handled.\r\n        /// </summary>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        /// <returns>\r\n        /// A value indicating whether the event should be handled.\r\n        /// </returns>\r\n        public bool AllowGotFocus(RoutedEventArgs e)\r\n        {\r\n            if (e == null)\r\n            {\r\n                throw new ArgumentNullException(\"e\");\r\n            }\r\n\r\n            bool enabled = Control.IsEnabled;\r\n            if (enabled)\r\n            {\r\n                IsFocused = true;\r\n            }\r\n            return enabled;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Base implementation of the virtual GotFocus event handler.\r\n        /// </summary>\r\n        public void OnGotFocusBase()\r\n        {\r\n            UpdateVisualState(true);\r\n        }\r\n        #endregion GotFocus\r\n\r\n        #region LostFocus\r\n        /// <summary>\r\n        /// Check if the control's LostFocus event should be handled.\r\n        /// </summary>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        /// <returns>\r\n        /// A value indicating whether the event should be handled.\r\n        /// </returns>\r\n        public bool AllowLostFocus(RoutedEventArgs e)\r\n        {\r\n            if (e == null)\r\n            {\r\n                throw new ArgumentNullException(\"e\");\r\n            }\r\n\r\n            bool enabled = Control.IsEnabled;\r\n            if (enabled)\r\n            {\r\n                IsFocused = false;\r\n            }\r\n            return enabled;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Base implementation of the virtual LostFocus event handler.\r\n        /// </summary>\r\n        public void OnLostFocusBase()\r\n        {\r\n            IsPressed = false;\r\n            UpdateVisualState(true);\r\n        }\r\n        #endregion LostFocus\r\n\r\n        #region MouseEnter\r\n        /// <summary>\r\n        /// Check if the control's MouseEnter event should be handled.\r\n        /// </summary>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        /// <returns>\r\n        /// A value indicating whether the event should be handled.\r\n        /// </returns>\r\n        public bool AllowMouseEnter(MouseEventArgs e)\r\n        {\r\n            if (e == null)\r\n            {\r\n                throw new ArgumentNullException(\"e\");\r\n            }\r\n\r\n            bool enabled = Control.IsEnabled;\r\n            if (enabled)\r\n            {\r\n                IsMouseOver = true;\r\n            }\r\n            return enabled;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Base implementation of the virtual MouseEnter event handler.\r\n        /// </summary>\r\n        public void OnMouseEnterBase()\r\n        {\r\n            UpdateVisualState(true);\r\n        }\r\n        #endregion MouseEnter\r\n\r\n        #region MouseLeave\r\n        /// <summary>\r\n        /// Check if the control's MouseLeave event should be handled.\r\n        /// </summary>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        /// <returns>\r\n        /// A value indicating whether the event should be handled.\r\n        /// </returns>\r\n        public bool AllowMouseLeave(MouseEventArgs e)\r\n        {\r\n            if (e == null)\r\n            {\r\n                throw new ArgumentNullException(\"e\");\r\n            }\r\n\r\n            bool enabled = Control.IsEnabled;\r\n            if (enabled)\r\n            {\r\n                IsMouseOver = false;\r\n            }\r\n            return enabled;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Base implementation of the virtual MouseLeave event handler.\r\n        /// </summary>\r\n        public void OnMouseLeaveBase()\r\n        {\r\n            UpdateVisualState(true);\r\n        }\r\n        #endregion MouseLeave\r\n\r\n        #region MouseLeftButtonDown\r\n        /// <summary>\r\n        /// Check if the control's MouseLeftButtonDown event should be handled.\r\n        /// </summary>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        /// <returns>\r\n        /// A value indicating whether the event should be handled.\r\n        /// </returns>\r\n        public bool AllowMouseLeftButtonDown(MouseButtonEventArgs e)\r\n        {\r\n            if (e == null)\r\n            {\r\n                throw new ArgumentNullException(\"e\");\r\n            }\r\n\r\n            bool enabled = Control.IsEnabled;\r\n            if (enabled)\r\n            {\r\n                // Get the current position and time\r\n                DateTime now = DateTime.UtcNow;\r\n                Point position = e.GetPosition(Control);\r\n\r\n                // Compute the deltas from the last click\r\n                double timeDelta = (now - LastClickTime).TotalMilliseconds;\r\n                Point lastPosition = LastClickPosition;\r\n                double dx = position.X - lastPosition.X;\r\n                double dy = position.Y - lastPosition.Y;\r\n                double distance = dx * dx + dy * dy;\r\n\r\n                // Check if the values fall under the sequential click temporal\r\n                // and spatial thresholds\r\n                if (timeDelta < SequentialClickThresholdInMilliseconds &&\r\n                    distance < SequentialClickThresholdInPixelsSquared)\r\n                {\r\n                    // TODO: Does each click have to be within the single time\r\n                    // threshold on WPF?\r\n                    ClickCount++;\r\n                }\r\n                else\r\n                {\r\n                    ClickCount = 1;\r\n                }\r\n\r\n                // Set the new position and time\r\n                LastClickTime = now;\r\n                LastClickPosition = position;\r\n\r\n                // Raise the event\r\n                IsPressed = true;\r\n            }\r\n            else\r\n            {\r\n                ClickCount = 1;\r\n            }\r\n\r\n            return enabled;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Base implementation of the virtual MouseLeftButtonDown event\r\n        /// handler.\r\n        /// </summary>\r\n        public void OnMouseLeftButtonDownBase()\r\n        {\r\n            UpdateVisualState(true);\r\n        }\r\n        #endregion MouseLeftButtonDown\r\n\r\n        #region MouseLeftButtonUp\r\n        /// <summary>\r\n        /// Check if the control's MouseLeftButtonUp event should be handled.\r\n        /// </summary>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        /// <returns>\r\n        /// A value indicating whether the event should be handled.\r\n        /// </returns>\r\n        public bool AllowMouseLeftButtonUp(MouseButtonEventArgs e)\r\n        {\r\n            if (e == null)\r\n            {\r\n                throw new ArgumentNullException(\"e\");\r\n            }\r\n\r\n            bool enabled = Control.IsEnabled;\r\n            if (enabled)\r\n            {\r\n                IsPressed = false;\r\n            }\r\n            return enabled;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Base implementation of the virtual MouseLeftButtonUp event handler.\r\n        /// </summary>\r\n        public void OnMouseLeftButtonUpBase()\r\n        {\r\n            UpdateVisualState(true);\r\n        }\r\n        #endregion MouseLeftButtonUp\r\n\r\n        #region KeyDown\r\n        /// <summary>\r\n        /// Check if the control's KeyDown event should be handled.\r\n        /// </summary>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        /// <returns>\r\n        /// A value indicating whether the event should be handled.\r\n        /// </returns>\r\n        public bool AllowKeyDown(KeyEventArgs e)\r\n        {\r\n            if (e == null)\r\n            {\r\n                throw new ArgumentNullException(\"e\");\r\n            }\r\n\r\n            return Control.IsEnabled;\r\n        }\r\n        #endregion KeyDown\r\n\r\n        #region KeyUp\r\n        /// <summary>\r\n        /// Check if the control's KeyUp event should be handled.\r\n        /// </summary>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        /// <returns>\r\n        /// A value indicating whether the event should be handled.\r\n        /// </returns>\r\n        public bool AllowKeyUp(KeyEventArgs e)\r\n        {\r\n            if (e == null)\r\n            {\r\n                throw new ArgumentNullException(\"e\");\r\n            }\r\n\r\n            return Control.IsEnabled;\r\n        }\r\n        #endregion KeyUp\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Common/System/Windows/Controls/ItemsControlHelper.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media;\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// The ItemContainerGenerator provides useful utilities for ItemsControls.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    internal sealed partial class ItemsControlHelper\r\n    {\r\n        /// <summary>\r\n        /// Gets or sets the ItemsControl being tracked by the\r\n        /// ItemContainerGenerator.\r\n        /// </summary>\r\n        private ItemsControl ItemsControl { get; set; }\r\n\r\n        /// <summary>\r\n        /// A Panel that is used as the ItemsHost of the ItemsControl.  This\r\n        /// property will only be valid when the ItemsControl is live in the\r\n        /// tree and has generated containers for some of its items.\r\n        /// </summary>\r\n        private Panel _itemsHost;\r\n\r\n        /// <summary>\r\n        /// Gets a Panel that is used as the ItemsHost of the ItemsControl.\r\n        /// This property will only be valid when the ItemsControl is live in\r\n        /// the tree and has generated containers for some of its items.\r\n        /// </summary>\r\n        internal Panel ItemsHost\r\n        {\r\n            get\r\n            {\r\n                // Lookup the ItemsHost if we haven't already cached it.\r\n                if (_itemsHost == null && ItemsControl != null && ItemsControl.ItemContainerGenerator != null)\r\n                {\r\n                    // Get any live container\r\n                    DependencyObject container = ItemsControl.ItemContainerGenerator.ContainerFromIndex(0);\r\n                    if (container != null)\r\n                    {\r\n                        // Get the parent of the container\r\n                        _itemsHost = VisualTreeHelper.GetParent(container) as Panel;\r\n                    }\r\n                }\r\n\r\n                return _itemsHost;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// A ScrollViewer that is used to scroll the items in the ItemsHost.\r\n        /// </summary>\r\n        private ScrollViewer _scrollHost;\r\n\r\n        /// <summary>\r\n        /// Gets a ScrollViewer that is used to scroll the items in the\r\n        /// ItemsHost.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Code is linked into multiple projects.\")]\r\n        internal ScrollViewer ScrollHost\r\n        {\r\n            get\r\n            {\r\n                if (_scrollHost == null)\r\n                {\r\n                    Panel itemsHost = ItemsHost;\r\n                    if (itemsHost != null)\r\n                    {\r\n                        for (DependencyObject obj = itemsHost; obj != ItemsControl && obj != null; obj = VisualTreeHelper.GetParent(obj))\r\n                        {\r\n                            ScrollViewer viewer = obj as ScrollViewer;\r\n                            if (viewer != null)\r\n                            {\r\n                                _scrollHost = viewer;\r\n                                break;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                return _scrollHost;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the ItemContainerGenerator.\r\n        /// </summary>\r\n        /// <param name=\"control\">\r\n        /// The ItemsControl being tracked by the ItemContainerGenerator.\r\n        /// </param>\r\n        internal ItemsControlHelper(ItemsControl control)\r\n        {\r\n            Debug.Assert(control != null, \"control cannot be null!\");\r\n            ItemsControl = control;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Apply a control template to the ItemsControl.\r\n        /// </summary>\r\n        internal void OnApplyTemplate()\r\n        {\r\n            // Clear the cached ItemsHost, ScrollHost\r\n            _itemsHost = null;\r\n            _scrollHost = null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Prepares the specified container to display the specified item.\r\n        /// </summary>\r\n        /// <param name=\"element\">\r\n        /// Container element used to display the specified item.\r\n        /// </param>\r\n        /// <param name=\"parentItemContainerStyle\">\r\n        /// The ItemContainerStyle for the parent ItemsControl.\r\n        /// </param>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Code is linked into multiple projects.\")]\r\n        internal static void PrepareContainerForItemOverride(DependencyObject element, Style parentItemContainerStyle)\r\n        {\r\n            // Apply the ItemContainerStyle to the item\r\n            Control control = element as Control;\r\n            if (parentItemContainerStyle != null && control != null && control.Style == null)\r\n            {\r\n                control.SetValue(Control.StyleProperty, parentItemContainerStyle);\r\n            }\r\n\r\n            // Note: WPF also does preparation for ContentPresenter,\r\n            // ContentControl, HeaderedContentControl, and ItemsControl.  Since\r\n            // we don't have any other ItemsControls using this\r\n            // ItemContainerGenerator, we've removed that code for now.  It\r\n            // should be added back later when necessary.\r\n        }\r\n\r\n        /// <summary>\r\n        /// Update the style of any generated items when the ItemContainerStyle\r\n        /// has been changed.\r\n        /// </summary>\r\n        /// <param name=\"itemContainerStyle\">The ItemContainerStyle.</param>\r\n        internal void UpdateItemContainerStyle(Style itemContainerStyle)\r\n        {\r\n            if (itemContainerStyle == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            Panel itemsHost = ItemsHost;\r\n            if (itemsHost == null || itemsHost.Children == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            foreach (UIElement element in itemsHost.Children)\r\n            {\r\n                FrameworkElement obj = element as FrameworkElement;\r\n                if (obj.Style == null)\r\n                {\r\n                    obj.Style = itemContainerStyle;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Scroll the desired element into the ScrollHost's viewport.\r\n        /// </summary>\r\n        /// <param name=\"element\">Element to scroll into view.</param>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"File is linked across multiple projects and this method is used in some but not others.\")]\r\n        internal void ScrollIntoView(FrameworkElement element)\r\n        {\r\n            // Get the ScrollHost\r\n            ScrollViewer scrollHost = ScrollHost;\r\n            if (scrollHost == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            // Get the position of the element relative to the ScrollHost\r\n            GeneralTransform transform = null;\r\n            try\r\n            {\r\n                transform = element.TransformToVisual(scrollHost);\r\n            }\r\n            catch (ArgumentException)\r\n            {\r\n                // Ignore failures when not in the visual tree\r\n                return;\r\n            }\r\n            Rect itemRect = new Rect(\r\n                transform.Transform(new Point()),\r\n                transform.Transform(new Point(element.ActualWidth, element.ActualHeight)));\r\n\r\n            // Scroll vertically\r\n            double verticalOffset = scrollHost.VerticalOffset;\r\n            double verticalDelta = 0;\r\n            double hostBottom = scrollHost.ViewportHeight;\r\n            double itemBottom = itemRect.Bottom;\r\n            if (hostBottom < itemBottom)\r\n            {\r\n                verticalDelta = itemBottom - hostBottom;\r\n                verticalOffset += verticalDelta;\r\n            }\r\n            double itemTop = itemRect.Top;\r\n            if (itemTop - verticalDelta < 0)\r\n            {\r\n                verticalOffset -= verticalDelta - itemTop;\r\n            }\r\n            scrollHost.ScrollToVerticalOffset(verticalOffset);\r\n\r\n            // Scroll horizontally\r\n            double horizontalOffset = scrollHost.HorizontalOffset;\r\n            double horizontalDelta = 0;\r\n            double hostRight = scrollHost.ViewportWidth;\r\n            double itemRight = itemRect.Right;\r\n            if (hostRight < itemRight)\r\n            {\r\n                horizontalDelta = itemRight - hostRight;\r\n                horizontalOffset += horizontalDelta;\r\n            }\r\n            double itemLeft = itemRect.Left;\r\n            if (itemLeft - horizontalDelta < 0)\r\n            {\r\n                horizontalOffset -= horizontalDelta - itemLeft;\r\n            }\r\n            scrollHost.ScrollToHorizontalOffset(horizontalOffset);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Common/System/Windows/Controls/VisualStates.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Media;\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Names and helpers for visual states in the controls.\r\n    /// </summary>\r\n    internal static class VisualStates\r\n    {\r\n        #region GroupCommon\r\n        /// <summary>\r\n        /// Common state group.\r\n        /// </summary>\r\n        public const string GroupCommon = \"CommonStates\";\r\n\r\n        /// <summary>\r\n        /// Normal state of the Common state group.\r\n        /// </summary>\r\n        public const string StateNormal = \"Normal\";\r\n\r\n        /// <summary>\r\n        /// Normal state of the Common state group.\r\n        /// </summary>\r\n        public const string StateReadOnly = \"ReadOnly\";\r\n\r\n        /// <summary>\r\n        /// MouseOver state of the Common state group.\r\n        /// </summary>\r\n        public const string StateMouseOver = \"MouseOver\";\r\n\r\n        /// <summary>\r\n        /// Pressed state of the Common state group.\r\n        /// </summary>\r\n        public const string StatePressed = \"Pressed\";\r\n\r\n        /// <summary>\r\n        /// Disabled state of the Common state group.\r\n        /// </summary>\r\n        public const string StateDisabled = \"Disabled\";\r\n        #endregion GroupCommon\r\n\r\n        #region GroupFocus\r\n        /// <summary>\r\n        /// Focus state group.\r\n        /// </summary>\r\n        public const string GroupFocus = \"FocusStates\";\r\n\r\n        /// <summary>\r\n        /// Unfocused state of the Focus state group.\r\n        /// </summary>\r\n        public const string StateUnfocused = \"Unfocused\";\r\n\r\n        /// <summary>\r\n        /// Focused state of the Focus state group.\r\n        /// </summary>\r\n        public const string StateFocused = \"Focused\";\r\n        #endregion GroupFocus\r\n\r\n        #region GroupSelection\r\n        /// <summary>\r\n        /// Selection state group.\r\n        /// </summary>\r\n        public const string GroupSelection = \"SelectionStates\";\r\n\r\n        /// <summary>\r\n        /// Selected state of the Selection state group.\r\n        /// </summary>\r\n        public const string StateSelected = \"Selected\";\r\n\r\n        /// <summary>\r\n        /// Unselected state of the Selection state group.\r\n        /// </summary>\r\n        public const string StateUnselected = \"Unselected\";\r\n\r\n        /// <summary>\r\n        /// Selected inactive state of the Selection state group.\r\n        /// </summary>\r\n        public const string StateSelectedInactive = \"SelectedInactive\";\r\n        #endregion GroupSelection\r\n\r\n        #region GroupExpansion\r\n        /// <summary>\r\n        /// Expansion state group.\r\n        /// </summary>\r\n        public const string GroupExpansion = \"ExpansionStates\";\r\n\r\n        /// <summary>\r\n        /// Expanded state of the Expansion state group.\r\n        /// </summary>\r\n        public const string StateExpanded = \"Expanded\";\r\n\r\n        /// <summary>\r\n        /// Collapsed state of the Expansion state group.\r\n        /// </summary>\r\n        public const string StateCollapsed = \"Collapsed\";\r\n        #endregion GroupExpansion\r\n\r\n        #region GroupPopup\r\n        /// <summary>\r\n        /// Popup state group.\r\n        /// </summary>\r\n        public const string GroupPopup = \"PopupStates\";\r\n\r\n        /// <summary>\r\n        /// Opened state of the Popup state group.\r\n        /// </summary>\r\n        public const string StatePopupOpened = \"PopupOpened\";\r\n\r\n        /// <summary>\r\n        /// Closed state of the Popup state group.\r\n        /// </summary>\r\n        public const string StatePopupClosed = \"PopupClosed\";\r\n        #endregion\r\n\r\n        #region GroupValidation\r\n        /// <summary>\r\n        /// ValidationStates state group.\r\n        /// </summary>\r\n        public const string GroupValidation = \"ValidationStates\";\r\n\r\n        /// <summary>\r\n        /// The valid state for the ValidationStates group.\r\n        /// </summary>\r\n        public const string StateValid = \"Valid\";\r\n\r\n        /// <summary>\r\n        /// Invalid, focused state for the ValidationStates group.\r\n        /// </summary>\r\n        public const string StateInvalidFocused = \"InvalidFocused\";\r\n\r\n        /// <summary>\r\n        /// Invalid, unfocused state for the ValidationStates group.\r\n        /// </summary>\r\n        public const string StateInvalidUnfocused = \"InvalidUnfocused\";\r\n        #endregion\r\n\r\n        #region GroupExpandDirection\r\n        /// <summary>\r\n        /// ExpandDirection state group.\r\n        /// </summary>\r\n        public const string GroupExpandDirection = \"ExpandDirectionStates\";\r\n\r\n        /// <summary>\r\n        /// Down expand direction state of ExpandDirection state group.\r\n        /// </summary>\r\n        public const string StateExpandDown = \"ExpandDown\";\r\n\r\n        /// <summary>\r\n        /// Up expand direction state of ExpandDirection state group.\r\n        /// </summary>\r\n        public const string StateExpandUp = \"ExpandUp\";\r\n\r\n        /// <summary>\r\n        /// Left expand direction state of ExpandDirection state group.\r\n        /// </summary>\r\n        public const string StateExpandLeft = \"ExpandLeft\";\r\n\r\n        /// <summary>\r\n        /// Right expand direction state of ExpandDirection state group.\r\n        /// </summary>\r\n        public const string StateExpandRight = \"ExpandRight\";\r\n        #endregion\r\n\r\n        #region GroupHasItems\r\n        /// <summary>\r\n        /// HasItems state group.\r\n        /// </summary>\r\n        public const string GroupHasItems = \"HasItemsStates\";\r\n\r\n        /// <summary>\r\n        /// HasItems state of the HasItems state group.\r\n        /// </summary>\r\n        public const string StateHasItems = \"HasItems\";\r\n\r\n        /// <summary>\r\n        /// NoItems state of the HasItems state group.\r\n        /// </summary>\r\n        public const string StateNoItems = \"NoItems\";\r\n        #endregion GroupHasItems\r\n\r\n        #region GroupIncrease\r\n        /// <summary>\r\n        /// Increment state group.\r\n        /// </summary>\r\n        public const string GroupIncrease = \"IncreaseStates\";\r\n\r\n        /// <summary>\r\n        /// State enabled for increment group.\r\n        /// </summary>\r\n        public const string StateIncreaseEnabled = \"IncreaseEnabled\";\r\n\r\n        /// <summary>\r\n        /// State disabled for increment group.\r\n        /// </summary>\r\n        public const string StateIncreaseDisabled = \"IncreaseDisabled\";\r\n        #endregion GroupIncrease\r\n\r\n        #region GroupDecrease\r\n        /// <summary>\r\n        /// Decrement state group.\r\n        /// </summary>\r\n        public const string GroupDecrease = \"DecreaseStates\";\r\n\r\n        /// <summary>\r\n        /// State enabled for decrement group.\r\n        /// </summary>\r\n        public const string StateDecreaseEnabled = \"DecreaseEnabled\";\r\n\r\n        /// <summary>\r\n        /// State disabled for decrement group.\r\n        /// </summary>\r\n        public const string StateDecreaseDisabled = \"DecreaseDisabled\";\r\n        #endregion GroupDecrease\r\n\r\n        #region GroupIteractionMode\r\n        /// <summary>\r\n        /// InteractionMode state group.\r\n        /// </summary>\r\n        public const string GroupInteractionMode = \"InteractionModeStates\";\r\n\r\n        /// <summary>\r\n        /// Edit of the DisplayMode state group.\r\n        /// </summary>\r\n        public const string StateEdit = \"Edit\";\r\n\r\n        /// <summary>\r\n        /// Display of the DisplayMode state group.\r\n        /// </summary>\r\n        public const string StateDisplay = \"Display\";\r\n        #endregion GroupIteractionMode\r\n\r\n        #region GroupLocked\r\n        /// <summary>\r\n        /// DisplayMode state group.\r\n        /// </summary>\r\n        public const string GroupLocked = \"LockedStates\";\r\n\r\n        /// <summary>\r\n        /// Edit of the DisplayMode state group.\r\n        /// </summary>\r\n        public const string StateLocked = \"Locked\";\r\n\r\n        /// <summary>\r\n        /// Display of the DisplayMode state group.\r\n        /// </summary>\r\n        public const string StateUnlocked = \"Unlocked\";\r\n        #endregion GroupLocked\r\n\r\n        #region GroupActive\r\n        /// <summary>\r\n        /// Active state.\r\n        /// </summary>\r\n        public const string StateActive = \"Active\";\r\n\r\n        /// <summary>\r\n        /// Inactive state.\r\n        /// </summary>\r\n        public const string StateInactive = \"Inactive\";\r\n\r\n        /// <summary>\r\n        /// Active state group.\r\n        /// </summary>\r\n        public const string GroupActive = \"ActiveStates\";\r\n        #endregion GroupActive\r\n\r\n        #region GroupWatermark\r\n        /// <summary>\r\n        /// Non-watermarked state.\r\n        /// </summary>\r\n        public const string StateUnwatermarked = \"Unwatermarked\";\r\n\r\n        /// <summary>\r\n        /// Watermarked state.\r\n        /// </summary>\r\n        public const string StateWatermarked = \"Watermarked\";\r\n\r\n        /// <summary>\r\n        /// Watermark state group.\r\n        /// </summary>\r\n        public const string GroupWatermark = \"WatermarkStates\";\r\n        #endregion GroupWatermark\r\n\r\n        #region GroupCalendarButtonFocus\r\n        /// <summary>\r\n        /// Unfocused state for Calendar Buttons.\r\n        /// </summary>\r\n        public const string StateCalendarButtonUnfocused = \"CalendarButtonUnfocused\";\r\n\r\n        /// <summary>\r\n        /// Focused state for Calendar Buttons.\r\n        /// </summary>\r\n        public const string StateCalendarButtonFocused = \"CalendarButtonFocused\";\r\n\r\n        /// <summary>\r\n        /// CalendarButtons Focus state group.\r\n        /// </summary>\r\n        public const string GroupCalendarButtonFocus = \"CalendarButtonFocusStates\";\r\n        #endregion GroupCalendarButtonFocus\r\n\r\n        #region GroupBusyStatus\r\n        /// <summary>\r\n        /// Busy state for BusyIndicator.\r\n        /// </summary>\r\n        public const string StateBusy = \"Busy\";\r\n\r\n        /// <summary>\r\n        /// Idle state for BusyIndicator.\r\n        /// </summary>\r\n        public const string StateIdle = \"Idle\";\r\n\r\n        /// <summary>\r\n        /// Busyness group name.\r\n        /// </summary>\r\n        public const string GroupBusyStatus = \"BusyStatusStates\";\r\n        #endregion\r\n\r\n        #region GroupVisibility\r\n        /// <summary>\r\n        /// Visible state name for BusyIndicator.\r\n        /// </summary>\r\n        public const string StateVisible = \"Visible\";\r\n\r\n        /// <summary>\r\n        /// Hidden state name for BusyIndicator.\r\n        /// </summary>\r\n        public const string StateHidden = \"Hidden\";\r\n        \r\n        /// <summary>\r\n        /// BusyDisplay group.\r\n        /// </summary>\r\n        public const string GroupVisibility = \"VisibilityStates\";\r\n        #endregion\r\n\r\n        /// <summary>\r\n        /// Use VisualStateManager to change the visual state of the control.\r\n        /// </summary>\r\n        /// <param name=\"control\">\r\n        /// Control whose visual state is being changed.\r\n        /// </param>\r\n        /// <param name=\"useTransitions\">\r\n        /// A value indicating whether to use transitions when updating the\r\n        /// visual state, or to snap directly to the new visual state.\r\n        /// </param>\r\n        /// <param name=\"stateNames\">\r\n        /// Ordered list of state names and fallback states to transition into.\r\n        /// Only the first state to be found will be used.\r\n        /// </param>\r\n        public static void GoToState(Control control, bool useTransitions, params string[] stateNames)\r\n        {\r\n            Debug.Assert(control != null, \"control should not be null!\");\r\n            Debug.Assert(stateNames != null, \"stateNames should not be null!\");\r\n            Debug.Assert(stateNames.Length > 0, \"stateNames should not be empty!\");\r\n\r\n            foreach (string name in stateNames)\r\n            {\r\n                if (VisualStateManager.GoToState(control, name, useTransitions))\r\n                {\r\n                    break;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the implementation root of the Control.\r\n        /// </summary>\r\n        /// <param name=\"dependencyObject\">The DependencyObject.</param>\r\n        /// <returns>Returns the implementation root or null.</returns>\r\n        public static FrameworkElement GetImplementationRoot(DependencyObject dependencyObject)\r\n        {\r\n            Debug.Assert(dependencyObject != null, \"DependencyObject should not be null.\");\r\n            return (1 == VisualTreeHelper.GetChildrenCount(dependencyObject)) ? \r\n                VisualTreeHelper.GetChild(dependencyObject, 0) as FrameworkElement : \r\n                null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// This method tries to get the named VisualStateGroup for the \r\n        /// dependency object. The provided object's ImplementationRoot will be \r\n        /// looked up in this call.\r\n        /// </summary>\r\n        /// <param name=\"dependencyObject\">The dependency object.</param>\r\n        /// <param name=\"groupName\">The visual state group's name.</param>\r\n        /// <returns>Returns null or the VisualStateGroup object.</returns>\r\n        public static VisualStateGroup TryGetVisualStateGroup(DependencyObject dependencyObject, string groupName)\r\n        {\r\n            FrameworkElement root = GetImplementationRoot(dependencyObject);\r\n            if (root == null)\r\n            {\r\n                return null;\r\n            }\r\n\r\n            return VisualStateManager.GetVisualStateGroups(root)\r\n                .OfType<VisualStateGroup>()\r\n                .Where(group => string.CompareOrdinal(groupName, group.Name) == 0)\r\n                .FirstOrDefault();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Common/System/Windows/Controls/VisualTreeExtensions.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Media;\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// A static class providing methods for working with the visual tree.  \r\n    /// </summary>\r\n    internal static class VisualTreeExtensions\r\n    {\r\n        /// <summary>\r\n        /// Retrieves all the visual children of a framework element.\r\n        /// </summary>\r\n        /// <param name=\"parent\">The parent framework element.</param>\r\n        /// <returns>The visual children of the framework element.</returns>\r\n        internal static IEnumerable<DependencyObject> GetVisualChildren(this DependencyObject parent)\r\n        {\r\n            Debug.Assert(parent != null, \"The parent cannot be null.\");\r\n\r\n            int childCount = VisualTreeHelper.GetChildrenCount(parent);\r\n            for (int counter = 0; counter < childCount; counter++)\r\n            {\r\n                yield return VisualTreeHelper.GetChild(parent, counter);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Retrieves all the logical children of a framework element using a \r\n        /// breadth-first search.  A visual element is assumed to be a logical \r\n        /// child of another visual element if they are in the same namescope.\r\n        /// For performance reasons this method manually manages the queue \r\n        /// instead of using recursion.\r\n        /// </summary>\r\n        /// <param name=\"parent\">The parent framework element.</param>\r\n        /// <returns>The logical children of the framework element.</returns>\r\n        internal static IEnumerable<FrameworkElement> GetLogicalChildrenBreadthFirst(this FrameworkElement parent)\r\n        {\r\n            Debug.Assert(parent != null, \"The parent cannot be null.\");\r\n\r\n            Queue<FrameworkElement> queue =\r\n                new Queue<FrameworkElement>(parent.GetVisualChildren().OfType<FrameworkElement>());\r\n\r\n            while (queue.Count > 0)\r\n            {\r\n                FrameworkElement element = queue.Dequeue();\r\n                yield return element;\r\n\r\n                foreach (FrameworkElement visualChild in element.GetVisualChildren().OfType<FrameworkElement>())\r\n                {\r\n                    queue.Enqueue(visualChild);\r\n                }\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Common/System/Windows/Controls/WeakEventListener.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System.Diagnostics.CodeAnalysis;\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Implements a weak event listener that allows the owner to be garbage\r\n    /// collected if its only remaining link is an event handler.\r\n    /// </summary>\r\n    /// <typeparam name=\"TInstance\">Type of instance listening for the event.</typeparam>\r\n    /// <typeparam name=\"TSource\">Type of source for the event.</typeparam>\r\n    /// <typeparam name=\"TEventArgs\">Type of event arguments for the event.</typeparam>\r\n    [SuppressMessage(\"Microsoft.Performance\", \"CA1812:AvoidUninstantiatedInternalClasses\", Justification = \"Used as link target in several projects.\")]\r\n    internal class WeakEventListener<TInstance, TSource, TEventArgs> where TInstance : class\r\n    {\r\n        /// <summary>\r\n        /// WeakReference to the instance listening for the event.\r\n        /// </summary>\r\n        private WeakReference _weakInstance;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the method to call when the event fires.\r\n        /// </summary>\r\n        public Action<TInstance, TSource, TEventArgs> OnEventAction { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the method to call when detaching from the event.\r\n        /// </summary>\r\n        public Action<WeakEventListener<TInstance, TSource, TEventArgs>> OnDetachAction { get; set; }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instances of the WeakEventListener class.\r\n        /// </summary>\r\n        /// <param name=\"instance\">Instance subscribing to the event.</param>\r\n        public WeakEventListener(TInstance instance)\r\n        {\r\n            if (null == instance)\r\n            {\r\n                throw new ArgumentNullException(\"instance\");\r\n            }\r\n            _weakInstance = new WeakReference(instance);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handler for the subscribed event calls OnEventAction to handle it.\r\n        /// </summary>\r\n        /// <param name=\"source\">Event source.</param>\r\n        /// <param name=\"eventArgs\">Event arguments.</param>\r\n        public void OnEvent(TSource source, TEventArgs eventArgs)\r\n        {\r\n            TInstance target = (TInstance)_weakInstance.Target;\r\n            if (null != target)\r\n            {\r\n                // Call registered action\r\n                if (null != OnEventAction)\r\n                {\r\n                    OnEventAction(target, source, eventArgs);\r\n                }\r\n            }\r\n            else\r\n            {\r\n                // Detach from event\r\n                Detach();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Detaches from the subscribed event.\r\n        /// </summary>\r\n        public void Detach()\r\n        {\r\n            if (null != OnDetachAction)\r\n            {\r\n                OnDetachAction(this);\r\n                OnDetachAction = null;\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/AggregatedObservableCollection.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Collections.Specialized;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// Aggregated observable collection.\r\n    /// </summary>\r\n    /// <typeparam name=\"T\">The type of the items in the observable collections.\r\n    /// </typeparam>\r\n    internal class AggregatedObservableCollection<T> : ReadOnlyObservableCollection<T>\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of an aggregated observable collection.\r\n        /// </summary>\r\n        public AggregatedObservableCollection()\r\n        {\r\n            this.ChildCollections = new NoResetObservableCollection<IList>();\r\n            this.ChildCollections.CollectionChanged += new NotifyCollectionChangedEventHandler(ChildCollectionsCollectionChanged);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Rebuilds the list if a collection changes.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source of the event.</param>\r\n        /// <param name=\"e\">Information about the event.</param>\r\n        private void ChildCollectionsCollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)\r\n        {\r\n            Debug.Assert(e.Action != NotifyCollectionChangedAction.Reset, \"Reset is not supported.\");\r\n\r\n            if (e.Action == NotifyCollectionChangedAction.Add)\r\n            {\r\n                e.NewItems\r\n                    .OfType<IList>()\r\n                    .ForEachWithIndex((newCollection, index) =>\r\n                    {\r\n                        int startingIndex = GetStartingIndexOfCollectionAtIndex(e.NewStartingIndex + index);\r\n                        foreach (T item in newCollection.OfType<T>().Reverse())\r\n                        {\r\n                            this.Mutate(items => items.Insert(startingIndex, item));\r\n                        }\r\n\r\n                        INotifyCollectionChanged notifyCollectionChanged = newCollection as INotifyCollectionChanged;\r\n                        if (notifyCollectionChanged != null)\r\n                        {\r\n                            notifyCollectionChanged.CollectionChanged += ChildCollectionCollectionChanged;\r\n                        }\r\n                    });\r\n            }\r\n            else if (e.Action == NotifyCollectionChangedAction.Remove)\r\n            {\r\n                foreach (IList oldCollection in e.OldItems)\r\n                {\r\n                    INotifyCollectionChanged notifyCollectionChanged = oldCollection as INotifyCollectionChanged;\r\n                    if (notifyCollectionChanged != null)\r\n                    {\r\n                        notifyCollectionChanged.CollectionChanged -= ChildCollectionCollectionChanged;\r\n                    }\r\n\r\n                    foreach (T item in oldCollection)\r\n                    {\r\n                        this.Mutate(items => items.Remove(item));\r\n                    }\r\n                }\r\n            }\r\n            else if (e.Action == NotifyCollectionChangedAction.Replace)\r\n            {\r\n                foreach (IList oldCollection in e.OldItems)\r\n                {\r\n                    INotifyCollectionChanged notifyCollectionChanged = oldCollection as INotifyCollectionChanged;\r\n                    if (notifyCollectionChanged != null)\r\n                    {\r\n                        notifyCollectionChanged.CollectionChanged -= ChildCollectionCollectionChanged;\r\n                    }\r\n                }\r\n\r\n                foreach (IList newCollection in e.NewItems)\r\n                {\r\n                    INotifyCollectionChanged notifyCollectionChanged = newCollection as INotifyCollectionChanged;\r\n                    if (notifyCollectionChanged != null)\r\n                    {\r\n                        notifyCollectionChanged.CollectionChanged += ChildCollectionCollectionChanged;\r\n                    }\r\n                }\r\n\r\n                Rebuild();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Synchronizes the collection with changes made in a child collection.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source of the event.</param>\r\n        /// <param name=\"e\">Information about the event.</param>\r\n        private void ChildCollectionCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)\r\n        {\r\n            Debug.Assert(e.Action != NotifyCollectionChangedAction.Reset, \"Reset is not supported.\");\r\n            IList collectionSender = sender as IList;\r\n\r\n            if (e.Action == NotifyCollectionChangedAction.Add)\r\n            {\r\n                int startingIndex = GetStartingIndexOfCollectionAtIndex(ChildCollections.IndexOf(collectionSender));\r\n                e.NewItems\r\n                    .OfType<T>()\r\n                    .ForEachWithIndex((item, index) =>\r\n                        {\r\n                            this.Mutate(that => that.Insert(startingIndex + e.NewStartingIndex + index, item));\r\n                        });\r\n            }\r\n            else if (e.Action == NotifyCollectionChangedAction.Remove)\r\n            {\r\n                foreach (T item in e.OldItems.OfType<T>())\r\n                {\r\n                    this.Mutate(that => that.Remove(item));\r\n                }\r\n            }\r\n            else if (e.Action == NotifyCollectionChangedAction.Replace)\r\n            {\r\n                for (int cnt = 0; cnt < e.NewItems.Count; cnt++)\r\n                {\r\n                    T oldItem = (T)e.OldItems[cnt];\r\n                    T newItem = (T)e.NewItems[cnt];\r\n                    int oldItemIndex = this.IndexOf(oldItem);\r\n                    this.Mutate((that) =>\r\n                        {\r\n                            that[oldItemIndex] = newItem;\r\n                        });\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the starting index of a collection in the aggregate\r\n        /// collection.\r\n        /// </summary>\r\n        /// <param name=\"index\">The starting index of a collection.</param>\r\n        /// <returns>The starting index of the collection in the aggregate \r\n        /// collection.</returns>\r\n        private int GetStartingIndexOfCollectionAtIndex(int index)\r\n        {\r\n            return ChildCollections.OfType<IEnumerable>().Select(collection => collection.CastWrapper<T>()).Take(index).SelectMany(collection => collection).Count();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Rebuild the list in the correct order when a child collection \r\n        /// changes.\r\n        /// </summary>\r\n        private void Rebuild()\r\n        {\r\n            this.Mutate(that => that.Clear());\r\n            this.Mutate(that =>\r\n                {\r\n                    IList<T> items = ChildCollections.OfType<IEnumerable>().Select(collection => collection.CastWrapper<T>()).SelectMany(collection => collection).ToList();\r\n                    foreach (T item in items)\r\n                    {\r\n                        that.Add(item);\r\n                    }\r\n                });\r\n        }\r\n        \r\n        /// <summary>\r\n        /// Gets child collections of the aggregated collection.\r\n        /// </summary>\r\n        public ObservableCollection<IList> ChildCollections { get; private set; }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/AssemblyInfoShared.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Resources;\r\nusing System.Windows.Markup;\r\n\r\n// WPF shared settings\r\n[assembly: CLSCompliant(true)]\r\n[assembly: NeutralResourcesLanguage(\"en-US\")]\r\n[assembly: XmlnsDefinition(\"clr-namespace:System.Windows.Controls.DataVisualization;assembly=DotNetProjects.DataVisualization.Toolkit\", \"System.Windows.Controls.DataVisualization\")]\r\n[assembly: XmlnsDefinition(\"clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=DotNetProjects.DataVisualization.Toolkit\", \"System.Windows.Controls.DataVisualization.Charting\")]\r\n[assembly: XmlnsPrefix(\"clr-namespace:System.Windows.Controls.DataVisualization;assembly=DotNetProjects.DataVisualization.Toolkit\", \"visualizationToolkit\")]\r\n[assembly: XmlnsPrefix(\"clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=DotNetProjects.DataVisualization.Toolkit\", \"chartingToolkit\")]\r\n#if !NO_XMLNSDEFINITION_URIS\r\n[assembly: XmlnsPrefix(\"http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit\", \"toolkit\")]\r\n[assembly: XmlnsDefinition(\"http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit\", \"System.Windows.Controls.DataVisualization\")]\r\n[assembly: XmlnsDefinition(\"http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit\", \"System.Windows.Controls.DataVisualization.Charting\")]\r\n#endif\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/AnimationSequence.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Specifies the supported animation sequences.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public enum AnimationSequence\r\n    {\r\n        /// <summary>\r\n        /// Animates all of the data points simultaneously.\r\n        /// </summary>\r\n        Simultaneous = 0,\r\n\r\n        /// <summary>\r\n        /// Animates the data points from first to last.\r\n        /// </summary>\r\n        FirstToLast = 1,\r\n\r\n        /// <summary>\r\n        /// Animates the data points from last to first.\r\n        /// </summary>\r\n        LastToFirst = 2\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Axis/Axis.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Collections.ObjectModel;\r\nusing System.Collections.Specialized;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// An axis class used to determine the plot area coordinate of values.\r\n    /// </summary>\r\n    public abstract class Axis : Control, IAxis\r\n    {\r\n        #region public AxisLocation Location\r\n        /// <summary>\r\n        /// Gets or sets the axis location.\r\n        /// </summary>\r\n        public AxisLocation Location\r\n        {\r\n            get { return (AxisLocation)GetValue(LocationProperty); }\r\n            set { SetValue(LocationProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Location dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty LocationProperty =\r\n            DependencyProperty.Register(\r\n                \"Location\",\r\n                typeof(AxisLocation),\r\n                typeof(Axis),\r\n                new PropertyMetadata(AxisLocation.Auto, OnLocationPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// LocationProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">Axis that changed its Location.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnLocationPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            Axis source = (Axis)d;\r\n            AxisLocation oldValue = (AxisLocation)e.OldValue;\r\n            AxisLocation newValue = (AxisLocation)e.NewValue;\r\n            source.OnLocationPropertyChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// LocationProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>        \r\n        protected virtual void OnLocationPropertyChanged(AxisLocation oldValue, AxisLocation newValue)\r\n        {\r\n            RoutedPropertyChangedEventHandler<AxisLocation> handler = this.LocationChanged;\r\n            if (handler != null)\r\n            {\r\n                handler(this, new RoutedPropertyChangedEventArgs<AxisLocation>(oldValue, newValue));\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// This event is raised when the location property is changed.\r\n        /// </summary>\r\n        public event RoutedPropertyChangedEventHandler<AxisLocation> LocationChanged;\r\n\r\n        #endregion public AxisLocation Location\r\n\r\n        /// <summary>\r\n        /// Gets the list of child axes belonging to this axis.\r\n        /// </summary>\r\n        public ObservableCollection<IAxis> DependentAxes { get; private set; }\r\n\r\n        #region public AxisOrientation Orientation\r\n        /// <summary>\r\n        /// Gets or sets the orientation of the axis.\r\n        /// </summary>\r\n        public AxisOrientation Orientation\r\n        {\r\n            get { return (AxisOrientation)GetValue(OrientationProperty); }\r\n            set { SetValue(OrientationProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Orientation dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty OrientationProperty =\r\n            DependencyProperty.Register(\r\n                \"Orientation\",\r\n                typeof(AxisOrientation),\r\n                typeof(Axis),\r\n                new PropertyMetadata(AxisOrientation.None, OnOrientationPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// OrientationProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">Axis that changed its Orientation.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnOrientationPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            Axis source = (Axis)d;\r\n            AxisOrientation oldValue = (AxisOrientation)e.OldValue;\r\n            AxisOrientation newValue = (AxisOrientation)e.NewValue;\r\n            source.OnOrientationPropertyChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// OrientationProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>        \r\n        protected virtual void OnOrientationPropertyChanged(AxisOrientation oldValue, AxisOrientation newValue)\r\n        {\r\n            RoutedPropertyChangedEventHandler<AxisOrientation> handler = OrientationChanged;\r\n            if (handler != null)\r\n            {\r\n                handler(this, new RoutedPropertyChangedEventArgs<AxisOrientation>(oldValue, newValue));\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// This event is raised when the Orientation property is changed.\r\n        /// </summary>\r\n        public event RoutedPropertyChangedEventHandler<AxisOrientation> OrientationChanged;\r\n\r\n        #endregion public AxisOrientation Orientation\r\n\r\n        /// <summary>\r\n        /// Raises the invalidated event.\r\n        /// </summary>\r\n        /// <param name=\"args\">Information about the event.</param>\r\n        protected virtual void OnInvalidated(RoutedEventArgs args)\r\n        {\r\n            foreach (IAxisListener listener in RegisteredListeners)\r\n            {\r\n                listener.AxisInvalidated(this);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or the collection of series that are using the Axis.\r\n        /// </summary>\r\n        public ObservableCollection<IAxisListener> RegisteredListeners { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Returns a value indicating whether the axis can plot a value.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value to plot.</param>\r\n        /// <returns>A value indicating whether the axis can plot a value.\r\n        /// </returns>\r\n        public abstract bool CanPlot(object value);\r\n\r\n        /// <summary>\r\n        /// The plot area coordinate of a value.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value for which to retrieve the plot area\r\n        /// coordinate.</param>\r\n        /// <returns>The plot area coordinate.</returns>\r\n        public abstract UnitValue GetPlotAreaCoordinate(object value);\r\n\r\n        /// <summary>\r\n        /// Instantiates a new instance of the Axis class.\r\n        /// </summary>\r\n        protected Axis()\r\n        {\r\n            RegisteredListeners = new UniqueObservableCollection<IAxisListener>();\r\n            this.RegisteredListeners.CollectionChanged += RegisteredListenersCollectionChanged;\r\n            this.DependentAxes = new ObservableCollection<IAxis>();\r\n            this.DependentAxes.CollectionChanged += OnChildAxesCollectionChanged;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Child axes collection changed.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source of the event.</param>\r\n        /// <param name=\"e\">Information about the event.</param>\r\n        private void OnChildAxesCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)\r\n        {\r\n            this.OnDependentAxesCollectionChanged();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Child axes collection changed.\r\n        /// </summary>\r\n        protected virtual void OnDependentAxesCollectionChanged()\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// This event is raised when the registered listeners collection is\r\n        /// changed.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source of the event.</param>\r\n        /// <param name=\"e\">Information about the event.</param>\r\n        private void RegisteredListenersCollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)\r\n        {\r\n            if (e.OldItems != null)\r\n            {\r\n                foreach (IAxisListener obj in e.OldItems)\r\n                {\r\n                    OnObjectUnregistered(obj);\r\n                }\r\n            }\r\n            if (e.NewItems != null)\r\n            {\r\n                foreach (IAxisListener obj in e.NewItems)\r\n                {\r\n                    OnObjectRegistered(obj);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// This method is invoked when a series is registered.\r\n        /// </summary>\r\n        /// <param name=\"series\">The series that has been registered.</param>\r\n        protected virtual void OnObjectRegistered(IAxisListener series)\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// This method is invoked when a series is unregistered.\r\n        /// </summary>\r\n        /// <param name=\"series\">The series that has been unregistered.</param>\r\n        protected virtual void OnObjectUnregistered(IAxisListener series)\r\n        {\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Axis/AxisIntervalType.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Specifies an interval type.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    internal enum AxisIntervalType\r\n    {\r\n        /// <summary>\r\n        /// Automatically determined by the ISeriesHost control.\r\n        /// </summary>\r\n        Auto = 0,\r\n\r\n        /// <summary>\r\n        /// The interval type is numerical.\r\n        /// </summary>\r\n        Number = 1,\r\n\r\n        /// <summary>\r\n        /// The interval type is years.\r\n        /// </summary>\r\n        Years = 2,\r\n\r\n        /// <summary>\r\n        /// The interval type is months.\r\n        /// </summary>\r\n        Months = 3,\r\n\r\n        /// <summary>\r\n        /// The interval type is weeks.\r\n        /// </summary>\r\n        Weeks = 4,\r\n\r\n        /// <summary>\r\n        /// The interval type is days.\r\n        /// </summary>\r\n        Days = 5,\r\n\r\n        /// <summary>\r\n        /// The interval type is hours.\r\n        /// </summary>\r\n        Hours = 6,\r\n\r\n        /// <summary>\r\n        /// The interval type is minutes.\r\n        /// </summary>\r\n        Minutes = 7,\r\n\r\n        /// <summary>\r\n        /// The interval type is seconds.\r\n        /// </summary>\r\n        Seconds = 8,\r\n\r\n        /// <summary>\r\n        /// The interval type is milliseconds.\r\n        /// </summary>\r\n        Milliseconds = 9,\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Axis/AxisLabel.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// A label used to display data in an axis.\r\n    /// </summary>\r\n    public class AxisLabel : Control\r\n    {\r\n        #region public string StringFormat\r\n        /// <summary>\r\n        /// Gets or sets the text string format.\r\n        /// </summary>\r\n        public string StringFormat\r\n        {\r\n            get { return GetValue(StringFormatProperty) as string; }\r\n            set { SetValue(StringFormatProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the StringFormat dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty StringFormatProperty =\r\n            DependencyProperty.Register(\r\n                \"StringFormat\",\r\n                typeof(string),\r\n                typeof(AxisLabel),\r\n                new PropertyMetadata(null, OnStringFormatPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// StringFormatProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">AxisLabel that changed its StringFormat.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnStringFormatPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            AxisLabel source = (AxisLabel)d;\r\n            string newValue = (string)e.NewValue;\r\n            source.OnStringFormatPropertyChanged(newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// StringFormatProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"newValue\">New value.</param>        \r\n        protected virtual void OnStringFormatPropertyChanged(string newValue)\r\n        {\r\n            UpdateFormattedContent();\r\n        }\r\n        #endregion public string StringFormat\r\n\r\n        #region public string FormattedContent\r\n        /// <summary>\r\n        /// Gets the formatted content property.\r\n        /// </summary>\r\n        public string FormattedContent\r\n        {\r\n            get { return GetValue(FormattedContentProperty) as string; }\r\n            protected set { SetValue(FormattedContentProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the FormattedContent dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty FormattedContentProperty =\r\n            DependencyProperty.Register(\r\n                \"FormattedContent\",\r\n                typeof(string),\r\n                typeof(AxisLabel),\r\n                new PropertyMetadata(null));\r\n        #endregion public string FormattedContent\r\n\r\n        /// <summary>\r\n        /// Initializes the static members of the AxisLabel class.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1810:InitializeReferenceTypeStaticFieldsInline\", Justification = \"Dependency properties are initialized in-line.\")]\r\n        static AxisLabel()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(AxisLabel), new FrameworkPropertyMetadata(typeof(AxisLabel)));\r\n        }\r\n        \r\n        /// <summary>\r\n        /// Instantiates a new instance of the AxisLabel class.\r\n        /// </summary>\r\n        public AxisLabel()\r\n        {\r\n            this.SetBinding(FormattedContentProperty, new Binding { Converter = new StringFormatConverter(), ConverterParameter = StringFormat ?? \"{0}\" });\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the formatted text.\r\n        /// </summary>\r\n        protected virtual void UpdateFormattedContent()\r\n        {\r\n            this.SetBinding(FormattedContentProperty, new Binding { Converter = new StringFormatConverter(), ConverterParameter = StringFormat ?? \"{0}\" });\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Axis/AxisLocation.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Axis position.\r\n    /// </summary>\r\n    public enum AxisLocation\r\n    {\r\n        /// <summary>\r\n        /// Location is determined automatically.\r\n        /// </summary>\r\n        Auto,\r\n\r\n        /// <summary>\r\n        /// Left in the series host area.\r\n        /// </summary>\r\n        Left,\r\n\r\n        /// <summary>\r\n        /// Top in the series host area.\r\n        /// </summary>\r\n        Top,\r\n\r\n        /// <summary>\r\n        /// Right in the series host area.\r\n        /// </summary>\r\n        Right,\r\n\r\n        /// <summary>\r\n        /// Bottom of the series host area.\r\n        /// </summary>\r\n        Bottom,\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Axis/AxisOrientation.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Specifies the orientation of an axis.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public enum AxisOrientation\r\n    {\r\n        /// <summary>\r\n        /// Orientation is automatically set.\r\n        /// </summary>\r\n        None,\r\n\r\n        /// <summary>\r\n        /// Indicates the axis plots along the X axis.\r\n        /// </summary>\r\n        [System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"X\", Justification = \"X is the expected terminology.\")]\r\n        X,\r\n\r\n        /// <summary>\r\n        /// Indicates the axis plots along the Y axis.\r\n        /// </summary>\r\n        [System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Y\", Justification = \"Y is the expected terminology.\")]\r\n        Y,\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Axis/CategoryAxis.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\nusing System.Windows.Shapes;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// An axis that displays categories.\r\n    /// </summary>\r\n    [StyleTypedProperty(Property = \"GridLineStyle\", StyleTargetType = typeof(Line))]\r\n    [StyleTypedProperty(Property = \"MajorTickMarkStyle\", StyleTargetType = typeof(Line))]\r\n    [StyleTypedProperty(Property = \"AxisLabelStyle\", StyleTargetType = typeof(AxisLabel))]\r\n    [StyleTypedProperty(Property = \"TitleStyle\", StyleTargetType = typeof(Title))]\r\n    [TemplatePart(Name = AxisGridName, Type = typeof(Grid))]\r\n    [TemplatePart(Name = AxisTitleName, Type = typeof(Title))]\r\n    public class CategoryAxis : DisplayAxis, ICategoryAxis\r\n    {\r\n        /// <summary>\r\n        /// A pool of major tick marks.\r\n        /// </summary>\r\n        private ObjectPool<Line> _majorTickMarkPool;\r\n\r\n        /// <summary>\r\n        /// A pool of labels.\r\n        /// </summary>\r\n        private ObjectPool<Control> _labelPool;\r\n\r\n        #region public CategorySortOrder SortOrder\r\n        /// <summary>\r\n        /// Gets or sets the sort order used for the categories.\r\n        /// </summary>\r\n        public CategorySortOrder SortOrder\r\n        {\r\n            get { return (CategorySortOrder)GetValue(SortOrderProperty); }\r\n            set { SetValue(SortOrderProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the SortOrder dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty SortOrderProperty =\r\n            DependencyProperty.Register(\r\n                \"SortOrder\",\r\n                typeof(CategorySortOrder),\r\n                typeof(CategoryAxis),\r\n                new PropertyMetadata(CategorySortOrder.None, OnSortOrderPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// SortOrderProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">CategoryAxis that changed its SortOrder.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnSortOrderPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            CategoryAxis source = (CategoryAxis)d;\r\n            source.OnSortOrderPropertyChanged();\r\n        }\r\n\r\n        /// <summary>\r\n        /// SortOrderProperty property changed handler.\r\n        /// </summary>\r\n        private void OnSortOrderPropertyChanged()\r\n        {\r\n            Invalidate();\r\n        }\r\n        #endregion public CategorySortOrder SortOrder\r\n\r\n        /// <summary>\r\n        /// Gets or sets a list of categories to display.\r\n        /// </summary>\r\n        private IList<object> Categories { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the grid line coordinates to display.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\", MessageId = \"GridLine\", Justification = \"This is the expected capitalization.\")]\r\n        private IList<UnitValue> GridLineCoordinatesToDisplay { get; set; }\r\n\r\n        /// <summary>\r\n        /// Instantiates a new instance of the CategoryAxis class.\r\n        /// </summary>\r\n        public CategoryAxis()\r\n        {\r\n            this._labelPool = new ObjectPool<Control>(() => CreateAxisLabel());\r\n            this._majorTickMarkPool = new ObjectPool<Line>(() => CreateMajorTickMark());\r\n            this.Categories = new List<object>();\r\n            this.GridLineCoordinatesToDisplay = new List<UnitValue>();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates categories when a series is registered.\r\n        /// </summary>\r\n        /// <param name=\"series\">The series to be registered.</param>\r\n        protected override void OnObjectRegistered(IAxisListener series)\r\n        {\r\n            base.OnObjectRegistered(series);\r\n            if (series is IDataProvider)\r\n            {\r\n                UpdateCategories();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates categories when a series is unregistered.\r\n        /// </summary>\r\n        /// <param name=\"series\">The series to be unregistered.</param>\r\n        protected override void OnObjectUnregistered(IAxisListener series)\r\n        {\r\n            base.OnObjectUnregistered(series);\r\n            if (series is IDataProvider)\r\n            {\r\n                UpdateCategories();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns range of coordinates for a given category.\r\n        /// </summary>\r\n        /// <param name=\"category\">The category to return the range for.</param>\r\n        /// <returns>The range of coordinates corresponding to the category.\r\n        /// </returns>\r\n        public Range<UnitValue> GetPlotAreaCoordinateRange(object category)\r\n        {\r\n            if (category == null)\r\n            {\r\n                throw new ArgumentNullException(\"category\");\r\n            }\r\n            int index = Categories.IndexOf(category);\r\n            if (index == -1)\r\n            {\r\n                return new Range<UnitValue>();\r\n            }\r\n\r\n            if (Orientation == AxisOrientation.X || Orientation == AxisOrientation.Y)\r\n            {\r\n                double maximumLength = Math.Max(ActualLength - 1, 0);\r\n                double lower = (index * maximumLength) / Categories.Count;\r\n                double upper = ((index + 1) * maximumLength) / Categories.Count;\r\n\r\n                if (Orientation == AxisOrientation.X)\r\n                {\r\n                    return new Range<UnitValue>(new UnitValue(lower, Unit.Pixels), new UnitValue(upper, Unit.Pixels));\r\n                }\r\n                else if (Orientation == AxisOrientation.Y)\r\n                {\r\n                    return new Range<UnitValue>(new UnitValue(maximumLength - upper, Unit.Pixels), new UnitValue(maximumLength - lower, Unit.Pixels));\r\n                }\r\n            }\r\n            else\r\n            {\r\n                double startingAngle = 270.0;\r\n                double angleOffset = 360 / this.Categories.Count;\r\n                double halfAngleOffset = angleOffset / 2.0;\r\n                int categoryIndex = this.Categories.IndexOf(category);\r\n                double angle = startingAngle + (categoryIndex * angleOffset);\r\n\r\n                return new Range<UnitValue>(new UnitValue(angle - halfAngleOffset, Unit.Degrees), new UnitValue(angle + halfAngleOffset, Unit.Degrees));\r\n            }\r\n\r\n            return new Range<UnitValue>();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the category at a given coordinate.\r\n        /// </summary>\r\n        /// <param name=\"position\">The plot area position.</param>\r\n        /// <returns>The category at the given plot area position.</returns>\r\n        public object GetCategoryAtPosition(UnitValue position)\r\n        {\r\n            if (this.ActualLength == 0.0 || this.Categories.Count == 0)\r\n            {\r\n                return null;\r\n            }\r\n            if (position.Unit == Unit.Pixels)\r\n            {\r\n                double coordinate = position.Value;\r\n                int index = (int)Math.Floor(coordinate / (this.ActualLength / this.Categories.Count));\r\n                if (index >= 0 && index < this.Categories.Count)\r\n                {\r\n                    if (Orientation == AxisOrientation.X)\r\n                    {\r\n                        return this.Categories[index];\r\n                    }\r\n                    else\r\n                    {\r\n                        return this.Categories[(this.Categories.Count - 1) - index];\r\n                    }\r\n                }\r\n            }\r\n            else\r\n            {\r\n                throw new NotImplementedException();\r\n            }\r\n            return null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the categories in response to an update from a registered\r\n        /// axis data provider.\r\n        /// </summary>\r\n        /// <param name=\"dataProvider\">The category axis information\r\n        /// provider.</param>\r\n        /// <param name=\"data\">A sequence of categories.</param>\r\n        public void DataChanged(IDataProvider dataProvider, IEnumerable<object> data)\r\n        {\r\n            UpdateCategories();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the list of categories.\r\n        /// </summary>\r\n        private void UpdateCategories()\r\n        {\r\n            IEnumerable<object> categories =\r\n                this.RegisteredListeners\r\n                .OfType<IDataProvider>()\r\n                .SelectMany(infoProvider => infoProvider.GetData(this))\r\n                .Distinct();\r\n\r\n            if (SortOrder == CategorySortOrder.Ascending)\r\n            {\r\n                categories = categories.OrderBy(category => category);\r\n            }\r\n            else if (SortOrder == CategorySortOrder.Descending)\r\n            {\r\n                categories = categories.OrderByDescending(category => category);\r\n            }\r\n\r\n            this.Categories = categories.ToList();\r\n\r\n            Invalidate();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the major axis grid line coordinates.\r\n        /// </summary>\r\n        /// <param name=\"availableSize\">The available size.</param>\r\n        /// <returns>A sequence of the major grid line coordinates.</returns>\r\n        protected override IEnumerable<UnitValue> GetMajorGridLineCoordinates(Size availableSize)\r\n        {\r\n            return GridLineCoordinatesToDisplay;\r\n        }\r\n\r\n        /// <summary>\r\n        /// The plot area coordinate of a value.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value for which to retrieve the plot area\r\n        /// coordinate.</param>\r\n        /// <returns>The plot area coordinate.</returns>\r\n        public override UnitValue GetPlotAreaCoordinate(object value)\r\n        {\r\n            if (value == null)\r\n            {\r\n                throw new ArgumentNullException(\"value\");\r\n            }\r\n\r\n            Range<UnitValue> range = GetPlotAreaCoordinateRange(value);\r\n            if (range.HasData)\r\n            {\r\n                double minimum = range.Minimum.Value;\r\n                double maximum = range.Maximum.Value;\r\n                return new UnitValue(((maximum - minimum) / 2.0) + minimum, range.Minimum.Unit);\r\n            }\r\n            else\r\n            {\r\n                return UnitValue.NaN();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates and prepares a new axis label.\r\n        /// </summary>\r\n        /// <param name=\"value\">The axis label value.</param>\r\n        /// <returns>The axis label content control.</returns>\r\n        private Control CreateAndPrepareAxisLabel(object value)\r\n        {\r\n            Control axisLabel = _labelPool.Next();\r\n            PrepareAxisLabel(axisLabel, value);\r\n            return axisLabel;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Renders as an oriented axis.\r\n        /// </summary>\r\n        /// <param name=\"availableSize\">The available size.</param>\r\n        private void RenderOriented(Size availableSize)\r\n        {\r\n            _labelPool.Reset();\r\n            _majorTickMarkPool.Reset();\r\n\r\n            try\r\n            {\r\n                OrientedPanel.Children.Clear();\r\n                this.GridLineCoordinatesToDisplay.Clear();\r\n\r\n                if (this.Categories.Count > 0)\r\n                {\r\n                    double maximumLength = Math.Max(GetLength(availableSize) - 1, 0);\r\n\r\n                    Action<double> placeTickMarkAt =\r\n                        (pos) =>\r\n                        {\r\n                            Line tickMark = _majorTickMarkPool.Next();\r\n                            OrientedPanel.SetCenterCoordinate(tickMark, pos);\r\n                            OrientedPanel.SetPriority(tickMark, 0);\r\n                            this.GridLineCoordinatesToDisplay.Add(new UnitValue(pos, Unit.Pixels));\r\n                            OrientedPanel.Children.Add(tickMark);\r\n                        };\r\n\r\n                    int index = 0;\r\n                    int priority = 0;\r\n\r\n                    foreach (object category in Categories)\r\n                    {\r\n                        Control axisLabel = CreateAndPrepareAxisLabel(category);\r\n                        double lower = ((index * maximumLength) / Categories.Count) + 0.5;\r\n                        double upper = (((index + 1) * maximumLength) / Categories.Count) + 0.5;\r\n                        placeTickMarkAt(lower);\r\n                        OrientedPanel.SetCenterCoordinate(axisLabel, (lower + upper) / 2);\r\n                        OrientedPanel.SetPriority(axisLabel, priority + 1);\r\n                        OrientedPanel.Children.Add(axisLabel);\r\n                        index++;\r\n                        priority = (priority + 1) % 2;\r\n                    }\r\n                    placeTickMarkAt(maximumLength + 0.5);\r\n                }\r\n            }\r\n            finally\r\n            {\r\n                _labelPool.Done();\r\n                _majorTickMarkPool.Done();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Renders the axis labels, tick marks, and other visual elements.\r\n        /// </summary>\r\n        /// <param name=\"availableSize\">The available size.</param>\r\n        protected override void Render(Size availableSize)\r\n        {\r\n            RenderOriented(availableSize);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a value indicating whether a value can be plotted on the\r\n        /// axis.\r\n        /// </summary>\r\n        /// <param name=\"value\">A value which may or may not be able to be\r\n        /// plotted.</param>\r\n        /// <returns>A value indicating whether a value can be plotted on the\r\n        /// axis.</returns>\r\n        public override bool CanPlot(object value)\r\n        {\r\n            return true;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Axis/CategorySortOrder.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// The sort order to use when sorting categories.\r\n    /// </summary>\r\n    public enum CategorySortOrder\r\n    {\r\n        /// <summary>\r\n        /// No sort order.\r\n        /// </summary>\r\n        None,\r\n\r\n        /// <summary>\r\n        /// Ascending sort order.\r\n        /// </summary>\r\n        Ascending,\r\n\r\n        /// <summary>\r\n        /// Descending sort order.\r\n        /// </summary>\r\n        Descending\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Axis/DateTimeAxis.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Shapes;\r\nusing EF = System.Windows.Controls.DataVisualization.EnumerableFunctions;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// An axis that displays numeric values.\r\n    /// </summary>\r\n    [StyleTypedProperty(Property = \"GridLineStyle\", StyleTargetType = typeof(Line))]\r\n    [StyleTypedProperty(Property = \"MajorTickMarkStyle\", StyleTargetType = typeof(Line))]\r\n    [StyleTypedProperty(Property = \"MinorTickMarkStyle\", StyleTargetType = typeof(Line))]\r\n    [StyleTypedProperty(Property = \"AxisLabelStyle\", StyleTargetType = typeof(DateTimeAxisLabel))]\r\n    [StyleTypedProperty(Property = \"TitleStyle\", StyleTargetType = typeof(Title))]\r\n    [TemplatePart(Name = AxisGridName, Type = typeof(Grid))]\r\n    [TemplatePart(Name = AxisTitleName, Type = typeof(Title))]\r\n    public class DateTimeAxis : RangeAxis\r\n    {\r\n        #region public DateTime? ActualMaximum\r\n        /// <summary>\r\n        /// Gets the actual maximum value plotted on the chart.\r\n        /// </summary>\r\n        public DateTime? ActualMaximum\r\n        {\r\n            get { return (DateTime?)GetValue(ActualMaximumProperty); }\r\n            private set { SetValue(ActualMaximumProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ActualMaximum dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ActualMaximumProperty =\r\n            DependencyProperty.Register(\r\n                \"ActualMaximum\",\r\n                typeof(DateTime?),\r\n                typeof(DateTimeAxis),\r\n                null);\r\n        #endregion public DateTime? ActualMaximum\r\n\r\n        #region public DateTime? ActualMinimum\r\n        /// <summary>\r\n        /// Gets the actual maximum value plotted on the chart.\r\n        /// </summary>\r\n        public DateTime? ActualMinimum\r\n        {\r\n            get { return (DateTime?)GetValue(ActualMinimumProperty); }\r\n            private set { SetValue(ActualMinimumProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ActualMinimum dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ActualMinimumProperty =\r\n            DependencyProperty.Register(\r\n                \"ActualMinimum\",\r\n                typeof(DateTime?),\r\n                typeof(DateTimeAxis),\r\n                null);\r\n        #endregion public DateTime? ActualMinimum\r\n\r\n        #region public DateTime? Maximum\r\n        /// <summary>\r\n        /// Gets or sets the maximum value plotted on the axis.\r\n        /// </summary>\r\n        [TypeConverter(typeof(NullableConverter<DateTime>))]\r\n        public DateTime? Maximum\r\n        {\r\n            get { return (DateTime?)GetValue(MaximumProperty); }\r\n            set { SetValue(MaximumProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Maximum dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty MaximumProperty =\r\n            DependencyProperty.Register(\r\n                \"Maximum\",\r\n                typeof(DateTime?),\r\n                typeof(DateTimeAxis),\r\n                new PropertyMetadata(null, OnMaximumPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// MaximumProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">DateTimeAxis2 that changed its Maximum.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnMaximumPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DateTimeAxis source = (DateTimeAxis)d;\r\n            DateTime? newValue = (DateTime?)e.NewValue;\r\n            source.OnMaximumPropertyChanged(newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// MaximumProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        private void OnMaximumPropertyChanged(DateTime? newValue)\r\n        {\r\n            this.ProtectedMaximum = newValue;\r\n        }\r\n        #endregion public DateTime? Maximum\r\n\r\n        #region public DateTime? Minimum\r\n        /// <summary>\r\n        /// Gets or sets the minimum value to plot on the axis.\r\n        /// </summary>\r\n        [TypeConverter(typeof(NullableConverter<DateTime>))]\r\n        public DateTime? Minimum\r\n        {\r\n            get { return (DateTime?)GetValue(MinimumProperty); }\r\n            set { SetValue(MinimumProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Minimum dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty MinimumProperty =\r\n            DependencyProperty.Register(\r\n                \"Minimum\",\r\n                typeof(DateTime?),\r\n                typeof(DateTimeAxis),\r\n                new PropertyMetadata(null, OnMinimumPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// MinimumProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">DateTimeAxis2 that changed its Minimum.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnMinimumPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DateTimeAxis source = (DateTimeAxis)d;\r\n            DateTime? newValue = (DateTime?)e.NewValue;\r\n            source.OnMinimumPropertyChanged(newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// MinimumProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        private void OnMinimumPropertyChanged(DateTime? newValue)\r\n        {\r\n            this.ProtectedMinimum = newValue;\r\n        }\r\n        #endregion public DateTime? Minimum\r\n\r\n        #region public double? Interval\r\n        /// <summary>\r\n        /// Gets or sets the axis interval.\r\n        /// </summary>\r\n        [TypeConverter(typeof(NullableConverter<double>))]\r\n        public double? Interval\r\n        {\r\n            get { return (double?)GetValue(IntervalProperty); }\r\n            set { SetValue(IntervalProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Interval dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty IntervalProperty =\r\n            DependencyProperty.Register(\r\n                \"Interval\",\r\n                typeof(double?),\r\n                typeof(DateTimeAxis),\r\n                new PropertyMetadata(null, OnIntervalPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// IntervalProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">DateTimeAxis2 that changed its Interval.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnIntervalPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DateTimeAxis source = (DateTimeAxis)d;\r\n            source.OnIntervalPropertyChanged();\r\n        }\r\n\r\n        /// <summary>\r\n        /// IntervalProperty property changed handler.\r\n        /// </summary>\r\n        private void OnIntervalPropertyChanged()\r\n        {\r\n            Invalidate();\r\n        }\r\n        #endregion public double? Interval\r\n\r\n        #region public double ActualInterval\r\n        /// <summary>\r\n        /// Gets the actual interval.\r\n        /// </summary>\r\n        public double ActualInterval\r\n        {\r\n            get { return (double)GetValue(ActualIntervalProperty); }\r\n            private set { SetValue(ActualIntervalProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ActualInterval dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ActualIntervalProperty =\r\n            DependencyProperty.Register(\r\n                \"ActualInterval\",\r\n                typeof(double),\r\n                typeof(DateTimeAxis),\r\n                new PropertyMetadata(double.NaN));\r\n\r\n        #endregion public double ActualInterval\r\n\r\n        #region public DateTimeIntervalType IntervalType\r\n        /// <summary>\r\n        /// Gets or sets the interval to use for the axis.\r\n        /// </summary>\r\n        public DateTimeIntervalType IntervalType\r\n        {\r\n            get { return (DateTimeIntervalType)GetValue(IntervalTypeProperty); }\r\n            set { SetValue(IntervalTypeProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the InternalIntervalType dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty IntervalTypeProperty =\r\n            DependencyProperty.Register(\r\n                \"IntervalType\",\r\n                typeof(DateTimeIntervalType),\r\n                typeof(DateTimeAxis),\r\n                new PropertyMetadata(DateTimeIntervalType.Auto, OnIntervalTypePropertyChanged));\r\n\r\n        /// <summary>\r\n        /// IntervalTypeProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">DateTimeAxis that changed its InternalIntervalType.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnIntervalTypePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DateTimeAxis source = (DateTimeAxis)d;\r\n            DateTimeIntervalType newValue = (DateTimeIntervalType)e.NewValue;\r\n            source.OnIntervalTypePropertyChanged(newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// IntervalTypeProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        private void OnIntervalTypePropertyChanged(DateTimeIntervalType newValue)\r\n        {\r\n            this.ActualIntervalType = newValue;\r\n            Invalidate();\r\n        }\r\n        #endregion public DateTimeIntervalType IntervalType\r\n\r\n        #region public DateTimeIntervalType ActualIntervalType\r\n        /// <summary>\r\n        /// Gets or sets the actual interval type.\r\n        /// </summary>\r\n        private DateTimeIntervalType ActualIntervalType\r\n        {\r\n            get { return (DateTimeIntervalType)GetValue(ActualIntervalTypeProperty); }\r\n            set { SetValue(ActualIntervalTypeProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ActualIntervalType dependency property.\r\n        /// </summary>\r\n        private static readonly DependencyProperty ActualIntervalTypeProperty =\r\n            DependencyProperty.Register(\r\n                \"ActualIntervalType\",\r\n                typeof(DateTimeIntervalType),\r\n                typeof(DateTimeAxis),\r\n                new PropertyMetadata(DateTimeIntervalType.Auto));\r\n\r\n        #endregion public DateTimeIntervalType ActualIntervalType\r\n\r\n        /// <summary>\r\n        /// Gets the origin value on the axis.\r\n        /// </summary>\r\n        protected override IComparable Origin\r\n        {\r\n            get { return null; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Instantiates a new instance of the DateTimeAxis2 class.\r\n        /// </summary>\r\n        public DateTimeAxis()\r\n        {\r\n            int year = DateTime.Now.Year;\r\n            this.ActualRange = new Range<IComparable>(new DateTime(year, 1, 1), new DateTime(year + 1, 1, 1));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates a new instance of the DateTimeAxisLabel class.\r\n        /// </summary>\r\n        /// <returns>Returns  a new instance of the DateTimeAxisLabel class.\r\n        /// </returns>\r\n        protected override Control CreateAxisLabel()\r\n        {\r\n            return new DateTimeAxisLabel();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Prepares an instance of the DateTimeAxisLabel class by setting its\r\n        /// IntervalType property.\r\n        /// </summary>\r\n        /// <param name=\"label\">An instance of the DateTimeAxisLabel class.\r\n        /// </param>\r\n        /// <param name=\"dataContext\">The data context to assign to the label.\r\n        /// </param>\r\n        protected override void PrepareAxisLabel(Control label, object dataContext)\r\n        {\r\n            DateTimeAxisLabel dateTimeAxisLabel = label as DateTimeAxisLabel;\r\n\r\n            if (dateTimeAxisLabel != null)\r\n            {\r\n                dateTimeAxisLabel.IntervalType = ActualIntervalType;\r\n            }\r\n            base.PrepareAxisLabel(label, dataContext);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the actual range of DateTime values.\r\n        /// </summary>\r\n        protected Range<DateTime> ActualDateTimeRange { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Updates the typed actual maximum and minimum properties when the\r\n        /// actual range changes.\r\n        /// </summary>\r\n        /// <param name=\"range\">The actual range.</param>\r\n        protected override void OnActualRangeChanged(Range<IComparable> range)\r\n        {\r\n            ActualDateTimeRange = range.ToDateTimeRange();\r\n\r\n            if (range.HasData)\r\n            {\r\n                this.ActualMaximum = (DateTime)range.Maximum;\r\n                this.ActualMinimum = (DateTime)range.Minimum;\r\n            }\r\n            else\r\n            {\r\n                this.ActualMaximum = null;\r\n                this.ActualMinimum = null;\r\n            }\r\n\r\n            base.OnActualRangeChanged(range);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a value indicating whether a value can plot.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value to plot.</param>\r\n        /// <returns>A value indicating whether a value can plot.</returns>\r\n        public override bool CanPlot(object value)\r\n        {\r\n            DateTime val;\r\n            return ValueHelper.TryConvert(value, out val);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the plot area coordinate of a value.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value to plot.</param>\r\n        /// <param name=\"length\">The length of the axis.</param>\r\n        /// <returns>The plot area coordinate of a value.</returns>\r\n        protected override UnitValue GetPlotAreaCoordinate(object value, double length)\r\n        {\r\n            return GetPlotAreaCoordinate(value, ActualDateTimeRange, length);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the plot area coordinate of a value.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value to plot.</param>\r\n        /// <param name=\"currentRange\">The range to use determine the coordinate.</param>\r\n        /// <param name=\"length\">The length of the axis.</param>\r\n        /// <returns>The plot area coordinate of a value.</returns>\r\n        protected override UnitValue GetPlotAreaCoordinate(object value, Range<IComparable> currentRange, double length)\r\n        {\r\n            return GetPlotAreaCoordinate(value, currentRange.ToDateTimeRange(), length);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the plot area coordinate of a value.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value to plot.</param>\r\n        /// <param name=\"currentRange\">The range to use determine the coordinate.</param>\r\n        /// <param name=\"length\">The length of the axis.</param>\r\n        /// <returns>The plot area coordinate of a value.</returns>\r\n        private static UnitValue GetPlotAreaCoordinate(object value, Range<DateTime> currentRange, double length)\r\n        {\r\n            if (currentRange.HasData)\r\n            {\r\n                DateTime dateTimeValue = ValueHelper.ToDateTime(value);\r\n\r\n                double rangelength = currentRange.Maximum.ToOADate() - currentRange.Minimum.ToOADate();\r\n                double pixelLength = Math.Max(length - 1, 0);\r\n\r\n                return new UnitValue((dateTimeValue.ToOADate() - currentRange.Minimum.ToOADate()) * (pixelLength / rangelength), Unit.Pixels);\r\n            }\r\n\r\n            return UnitValue.NaN();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the actual interval to use to determine which values are \r\n        /// displayed in the axis.\r\n        /// </summary>\r\n        /// <param name=\"availableSize\">The available size.</param>\r\n        /// <returns>The actual interval to use to determine which values are \r\n        /// displayed in the axis.\r\n        /// </returns>\r\n        private double CalculateActualInterval(Size availableSize)\r\n        {\r\n            if (Interval != null)\r\n            {\r\n                return Interval.Value;\r\n            }\r\n\r\n            DateTimeIntervalType intervalType;\r\n            double interval = CalculateDateTimeInterval(ActualDateTimeRange.Minimum, ActualDateTimeRange.Maximum, out intervalType, availableSize);\r\n            ActualIntervalType = intervalType;\r\n            return interval;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a sequence of major values.\r\n        /// </summary>\r\n        /// <param name=\"availableSize\">The available size.</param>\r\n        /// <returns>A sequence of major values.</returns>\r\n        protected virtual IEnumerable<DateTime> GetMajorAxisValues(Size availableSize)\r\n        {\r\n            if (!ActualRange.HasData || ValueHelper.Compare(ActualRange.Minimum, ActualRange.Maximum) == 0 || GetLength(availableSize) == 0.0)\r\n            {\r\n                yield break;\r\n            }\r\n\r\n            this.ActualInterval = CalculateActualInterval(availableSize);\r\n            DateTime date = ActualDateTimeRange.Minimum;\r\n\r\n            DateTime start = AlignIntervalStart(date, this.ActualInterval, ActualIntervalType);\r\n            while (start < date)\r\n            {\r\n                start = IncrementDateTime(start, this.ActualInterval);\r\n            }\r\n\r\n            IEnumerable<DateTime> intermediateDates =\r\n                EnumerableFunctions\r\n                    .Iterate(start, next => IncrementDateTime(next, this.ActualInterval))\r\n                    .TakeWhile(current => ActualDateTimeRange.Contains(current));\r\n\r\n            foreach (DateTime current in intermediateDates)\r\n            {\r\n                yield return current;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a sequence of values to create major tick marks for.\r\n        /// </summary>\r\n        /// <param name=\"availableSize\">The available size.</param>\r\n        /// <returns>A sequence of values to create major tick marks for.\r\n        /// </returns>\r\n        protected override IEnumerable<IComparable> GetMajorTickMarkValues(Size availableSize)\r\n        {\r\n            return GetMajorAxisValues(availableSize).CastWrapper<IComparable>();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a sequence of values to plot on the axis.\r\n        /// </summary>\r\n        /// <param name=\"availableSize\">The available size.</param>\r\n        /// <returns>A sequence of values to plot on the axis.</returns>\r\n        protected override IEnumerable<IComparable> GetLabelValues(Size availableSize)\r\n        {\r\n            return GetMajorAxisValues(availableSize).CastWrapper<IComparable>();\r\n        }\r\n\r\n        /// <summary>\r\n        /// This method accepts a date time and increments it.\r\n        /// </summary>\r\n        /// <param name=\"date\">A date time.</param>\r\n        /// <param name=\"interval\">The interval used to increment the date time.\r\n        /// </param>\r\n        /// <returns>The new date time.</returns>\r\n        private DateTime IncrementDateTime(DateTime date, double interval)\r\n        {\r\n            DateTimeIntervalType intervalType = this.ActualIntervalType;\r\n            TimeSpan span = new TimeSpan(0);\r\n            DateTime result;\r\n\r\n            if (intervalType == DateTimeIntervalType.Days)\r\n            {\r\n                span = TimeSpan.FromDays(interval);\r\n            }\r\n            else if (intervalType == DateTimeIntervalType.Hours)\r\n            {\r\n                span = TimeSpan.FromHours(interval);\r\n            }\r\n            else if (intervalType == DateTimeIntervalType.Milliseconds)\r\n            {\r\n                span = TimeSpan.FromMilliseconds(interval);\r\n            }\r\n            else if (intervalType == DateTimeIntervalType.Seconds)\r\n            {\r\n                span = TimeSpan.FromSeconds(interval);\r\n            }\r\n            else if (intervalType == DateTimeIntervalType.Minutes)\r\n            {\r\n                span = TimeSpan.FromMinutes(interval);\r\n            }\r\n            else if (intervalType == DateTimeIntervalType.Weeks)\r\n            {\r\n                span = TimeSpan.FromDays(7.0 * interval);\r\n            }\r\n            else if (intervalType == DateTimeIntervalType.Months)\r\n            {\r\n                // Special case handling when current date point\r\n                // to the last day of the month\r\n                bool lastMonthDay = false;\r\n                if (date.Day == DateTime.DaysInMonth(date.Year, date.Month))\r\n                {\r\n                    lastMonthDay = true;\r\n                }\r\n\r\n                // Add specified amount of months\r\n                date = date.AddMonths((int)Math.Floor(interval));\r\n                span = TimeSpan.FromDays(30.0 * (interval - Math.Floor(interval)));\r\n\r\n                // Check if last month of the day was used\r\n                if (lastMonthDay && span.Ticks == 0)\r\n                {\r\n                    // Make sure the last day of the month is selected\r\n                    int daysInMobth = DateTime.DaysInMonth(date.Year, date.Month);\r\n                    date = date.AddDays(daysInMobth - date.Day);\r\n                }\r\n            }\r\n            else if (intervalType == DateTimeIntervalType.Years)\r\n            {\r\n                date = date.AddYears((int)Math.Floor(interval));\r\n                span = TimeSpan.FromDays(365.0 * (interval - Math.Floor(interval)));\r\n            }\r\n\r\n            result = date.Add(span);\r\n\r\n            return result;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Adjusts the beginning of the first interval depending on the type and size.\r\n        /// </summary>\r\n        /// <param name=\"start\">Original start point.</param>\r\n        /// <param name=\"intervalSize\">Interval size.</param>\r\n        /// <param name=\"type\">Type of the interval (Month, Year, ...).</param>\r\n        /// <returns>\r\n        /// Adjusted interval start position.\r\n        /// </returns>\r\n        private static DateTime AlignIntervalStart(DateTime start, double intervalSize, DateTimeIntervalType type)\r\n        {\r\n            // Do not adjust start position for these interval type\r\n            if (type == DateTimeIntervalType.Auto)\r\n            {\r\n                return start;\r\n            }\r\n\r\n            // Get the beginning of the interval depending on type\r\n            DateTime newStartDate = start;\r\n\r\n            // Adjust the months interval depending on size\r\n            if (intervalSize > 0.0 && intervalSize != 1.0)\r\n            {\r\n                if (type == DateTimeIntervalType.Months && intervalSize <= 12.0 && intervalSize > 1)\r\n                {\r\n                    // Make sure that the beginning is aligned correctly for cases\r\n                    // like quarters and half years\r\n                    DateTime resultDate = newStartDate;\r\n                    DateTime sizeAdjustedDate = new DateTime(newStartDate.Year, 1, 1, 0, 0, 0);\r\n                    while (sizeAdjustedDate < newStartDate)\r\n                    {\r\n                        resultDate = sizeAdjustedDate;\r\n                        sizeAdjustedDate = sizeAdjustedDate.AddMonths((int)intervalSize);\r\n                    }\r\n\r\n                    newStartDate = resultDate;\r\n                    return newStartDate;\r\n                }\r\n            }\r\n\r\n            // Check interval type\r\n            switch (type)\r\n            {\r\n                case DateTimeIntervalType.Years:\r\n                    int year = (int)((int)(newStartDate.Year / intervalSize) * intervalSize);\r\n                    if (year <= 0)\r\n                    {\r\n                        year = 1;\r\n                    }\r\n                    newStartDate = new DateTime(year, 1, 1, 0, 0, 0);\r\n                    break;\r\n\r\n                case DateTimeIntervalType.Months:\r\n                    int month = (int)((int)(newStartDate.Month / intervalSize) * intervalSize);\r\n                    if (month <= 0)\r\n                    {\r\n                        month = 1;\r\n                    }\r\n                    newStartDate = new DateTime(newStartDate.Year, month, 1, 0, 0, 0);\r\n                    break;\r\n\r\n                case DateTimeIntervalType.Days:\r\n                    int day = (int)((int)(newStartDate.Day / intervalSize) * intervalSize);\r\n                    if (day <= 0)\r\n                    {\r\n                        day = 1;\r\n                    }\r\n                    newStartDate = new DateTime(newStartDate.Year, newStartDate.Month, day, 0, 0, 0);\r\n                    break;\r\n\r\n                case DateTimeIntervalType.Hours:\r\n                    int hour = (int)((int)(newStartDate.Hour / intervalSize) * intervalSize);\r\n                    newStartDate = new DateTime(\r\n                        newStartDate.Year,\r\n                        newStartDate.Month,\r\n                        newStartDate.Day,\r\n                        hour,\r\n                        0,\r\n                        0);\r\n                    break;\r\n\r\n                case DateTimeIntervalType.Minutes:\r\n                    int minute = (int)((int)(newStartDate.Minute / intervalSize) * intervalSize);\r\n                    newStartDate = new DateTime(\r\n                        newStartDate.Year,\r\n                        newStartDate.Month,\r\n                        newStartDate.Day,\r\n                        newStartDate.Hour,\r\n                        minute,\r\n                        0);\r\n                    break;\r\n\r\n                case DateTimeIntervalType.Seconds:\r\n                    int second = (int)((int)(newStartDate.Second / intervalSize) * intervalSize);\r\n                    newStartDate = new DateTime(\r\n                        newStartDate.Year,\r\n                        newStartDate.Month,\r\n                        newStartDate.Day,\r\n                        newStartDate.Hour,\r\n                        newStartDate.Minute,\r\n                        second,\r\n                        0);\r\n                    break;\r\n\r\n                case DateTimeIntervalType.Milliseconds:\r\n                    int milliseconds = (int)((int)(newStartDate.Millisecond / intervalSize) * intervalSize);\r\n                    newStartDate = new DateTime(\r\n                        newStartDate.Year,\r\n                        newStartDate.Month,\r\n                        newStartDate.Day,\r\n                        newStartDate.Hour,\r\n                        newStartDate.Minute,\r\n                        newStartDate.Second,\r\n                        milliseconds);\r\n                    break;\r\n\r\n                case DateTimeIntervalType.Weeks:\r\n\r\n                    // Elements that have interval set to weeks should be aligned to the \r\n                    // nearest start of week no matter how many weeks is the interval.\r\n                    newStartDate = new DateTime(\r\n                        newStartDate.Year,\r\n                        newStartDate.Month,\r\n                        newStartDate.Day,\r\n                        0,\r\n                        0,\r\n                        0);\r\n\r\n                    newStartDate = newStartDate.AddDays(-((int)newStartDate.DayOfWeek));\r\n                    break;\r\n            }\r\n\r\n            return newStartDate;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the value range given a plot area coordinate.\r\n        /// </summary>\r\n        /// <param name=\"value\">The position.</param>\r\n        /// <returns>A range of values at that plot area coordinate.</returns>\r\n        protected override IComparable GetValueAtPosition(UnitValue value)\r\n        {\r\n            if (ActualRange.HasData && ActualLength != 0.0)\r\n            {\r\n                double coordinate = value.Value;\r\n                if (value.Unit == Unit.Pixels)\r\n                {\r\n                    double minimumAsDouble = ActualDateTimeRange.Minimum.ToOADate();\r\n                    double rangelength = ActualDateTimeRange.Maximum.ToOADate() - minimumAsDouble;\r\n                    DateTime output = DateTime.FromOADate((coordinate * (rangelength / ActualLength)) + minimumAsDouble);\r\n\r\n                    return output;\r\n                }\r\n                else\r\n                {\r\n                    throw new NotImplementedException();\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Recalculates a DateTime interval obtained from maximum and minimum.\r\n        /// </summary>\r\n        /// <param name=\"minimum\">The minimum.</param>\r\n        /// <param name=\"maximum\">The maximum.</param>\r\n        /// <param name=\"type\">Date time interval type.</param>\r\n        /// <param name=\"availableSize\">The available size.</param>\r\n        /// <returns>Auto Interval.</returns>\r\n        [SuppressMessage(\"Microsoft.Maintainability\", \"CA1502:AvoidExcessiveComplexity\", Justification = \"The method should inspect all variations of time span (millisec to year) and contains long case. Otherwise is simple and readable.\")]\r\n        private double CalculateDateTimeInterval(DateTime minimum, DateTime maximum, out DateTimeIntervalType type, Size availableSize)\r\n        {\r\n            DateTime dateTimeMin = minimum;\r\n            DateTime dateTimeMax = maximum;\r\n            TimeSpan timeSpan = dateTimeMax.Subtract(dateTimeMin);\r\n\r\n            // this algorithm is designed to return close to 10 intervals.\r\n            // we need to align the time span for PrefferedNumberOfIntervals\r\n            double maxIntervals = Orientation == AxisOrientation.X ? MaximumAxisIntervalsPer200Pixels * 0.8 : MaximumAxisIntervalsPer200Pixels;\r\n            double rangeMultiplicator = GetLength(availableSize) / (200 * 10 / maxIntervals);\r\n            timeSpan = new TimeSpan((long)((double)timeSpan.Ticks / rangeMultiplicator));\r\n\r\n            // Minutes\r\n            double inter = timeSpan.TotalMinutes;\r\n\r\n            // For Range less than 60 seconds interval is 5 sec\r\n            if (inter <= 1.0)\r\n            {\r\n                // Milli Seconds\r\n                double milliSeconds = timeSpan.TotalMilliseconds;\r\n                if (milliSeconds <= 10)\r\n                {\r\n                    type = DateTimeIntervalType.Milliseconds;\r\n                    return 1;\r\n                }\r\n                if (milliSeconds <= 50)\r\n                {\r\n                    type = DateTimeIntervalType.Milliseconds;\r\n                    return 4;\r\n                }\r\n                if (milliSeconds <= 200)\r\n                {\r\n                    type = DateTimeIntervalType.Milliseconds;\r\n                    return 20;\r\n                }\r\n                if (milliSeconds <= 500)\r\n                {\r\n                    type = DateTimeIntervalType.Milliseconds;\r\n                    return 50;\r\n                }\r\n\r\n                // Seconds\r\n                double seconds = timeSpan.TotalSeconds;\r\n\r\n                if (seconds <= 7)\r\n                {\r\n                    type = DateTimeIntervalType.Seconds;\r\n                    return 1;\r\n                }\r\n                else if (seconds <= 15)\r\n                {\r\n                    type = DateTimeIntervalType.Seconds;\r\n                    return 2;\r\n                }\r\n                else if (seconds <= 30)\r\n                {\r\n                    type = DateTimeIntervalType.Seconds;\r\n                    return 5;\r\n                }\r\n                else if (seconds <= 60)\r\n                {\r\n                    type = DateTimeIntervalType.Seconds;\r\n                    return 10;\r\n                }\r\n            }\r\n            else if (inter <= 2.0)\r\n            {\r\n                // For Range less than 120 seconds interval is 10 sec\r\n                type = DateTimeIntervalType.Seconds;\r\n                return 20;\r\n            }\r\n            else if (inter <= 3.0)\r\n            {\r\n                // For Range less than 180 seconds interval is 30 sec\r\n                type = DateTimeIntervalType.Seconds;\r\n                return 30;\r\n            }\r\n            else if (inter <= 10)\r\n            {\r\n                // For Range less than 10 minutes interval is 1 min\r\n                type = DateTimeIntervalType.Minutes;\r\n                return 1;\r\n            }\r\n            else if (inter <= 20)\r\n            {\r\n                // For Range less than 20 minutes interval is 1 min\r\n                type = DateTimeIntervalType.Minutes;\r\n                return 2;\r\n            }\r\n            else if (inter <= 60)\r\n            {\r\n                // For Range less than 60 minutes interval is 5 min\r\n                type = DateTimeIntervalType.Minutes;\r\n                return 5;\r\n            }\r\n            else if (inter <= 120)\r\n            {\r\n                // For Range less than 120 minutes interval is 10 min\r\n                type = DateTimeIntervalType.Minutes;\r\n                return 10;\r\n            }\r\n            else if (inter <= 180)\r\n            {\r\n                // For Range less than 180 minutes interval is 30 min\r\n                type = DateTimeIntervalType.Minutes;\r\n                return 30;\r\n            }\r\n            else if (inter <= 60 * 12)\r\n            {\r\n                // For Range less than 12 hours interval is 1 hour\r\n                type = DateTimeIntervalType.Hours;\r\n                return 1;\r\n            }\r\n            else if (inter <= 60 * 24)\r\n            {\r\n                // For Range less than 24 hours interval is 4 hour\r\n                type = DateTimeIntervalType.Hours;\r\n                return 4;\r\n            }\r\n            else if (inter <= 60 * 24 * 2)\r\n            {\r\n                // For Range less than 2 days interval is 6 hour\r\n                type = DateTimeIntervalType.Hours;\r\n                return 6;\r\n            }\r\n            else if (inter <= 60 * 24 * 3)\r\n            {\r\n                // For Range less than 3 days interval is 12 hour\r\n                type = DateTimeIntervalType.Hours;\r\n                return 12;\r\n            }\r\n            else if (inter <= 60 * 24 * 10)\r\n            {\r\n                // For Range less than 10 days interval is 1 day\r\n                type = DateTimeIntervalType.Days;\r\n                return 1;\r\n            }\r\n            else if (inter <= 60 * 24 * 20)\r\n            {\r\n                // For Range less than 20 days interval is 2 day\r\n                type = DateTimeIntervalType.Days;\r\n                return 2;\r\n            }\r\n            else if (inter <= 60 * 24 * 30)\r\n            {\r\n                // For Range less than 30 days interval is 3 day\r\n                type = DateTimeIntervalType.Days;\r\n                return 3;\r\n            }\r\n            else if (inter <= 60 * 24 * 30.5 * 2)\r\n            {\r\n                // For Range less than 2 months interval is 1 week\r\n                type = DateTimeIntervalType.Weeks;\r\n                return 1;\r\n            }\r\n            else if (inter <= 60 * 24 * 30.5 * 5)\r\n            {\r\n                // For Range less than 5 months interval is 2weeks\r\n                type = DateTimeIntervalType.Weeks;\r\n                return 2;\r\n            }\r\n            else if (inter <= 60 * 24 * 30.5 * 12)\r\n            {\r\n                // For Range less than 12 months interval is 1 month\r\n                type = DateTimeIntervalType.Months;\r\n                return 1;\r\n            }\r\n            else if (inter <= 60 * 24 * 30.5 * 24)\r\n            {\r\n                // For Range less than 24 months interval is 3 month\r\n                type = DateTimeIntervalType.Months;\r\n                return 3;\r\n            }\r\n            else if (inter <= 60 * 24 * 30.5 * 48)\r\n            {\r\n                // For Range less than 48 months interval is 6 months \r\n                type = DateTimeIntervalType.Months;\r\n                return 6;\r\n            }\r\n\r\n            // For Range more than 48 months interval is year \r\n            type = DateTimeIntervalType.Years;\r\n            double years = inter / 60 / 24 / 365;\r\n            if (years < 5)\r\n            {\r\n                return 1;\r\n            }\r\n            else if (years < 10)\r\n            {\r\n                return 2;\r\n            }\r\n\r\n            // Make a correction of the interval\r\n            return Math.Floor(years / 5);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Overrides the actual range to ensure that it is never set to an\r\n        /// empty range.\r\n        /// </summary>\r\n        /// <param name=\"range\">The range to override.</param>\r\n        /// <returns>The overridden range.</returns>\r\n        [SuppressMessage(\"Microsoft.Maintainability\", \"CA1502:AvoidExcessiveComplexity\", Justification = \"This method is very difficult to break up cleanly.\")]\r\n        protected override Range<IComparable> OverrideDataRange(Range<IComparable> range)\r\n        {\r\n            Range<IComparable> overriddenActualRange = range;\r\n\r\n            if (!overriddenActualRange.HasData)\r\n            {\r\n                int year = DateTime.Now.Year;\r\n                return new Range<IComparable>(new DateTime(year, 1, 1), new DateTime(year + 1, 1, 1));\r\n            }\r\n            else if (ValueHelper.Compare(overriddenActualRange.Minimum, overriddenActualRange.Maximum) == 0)\r\n            {\r\n                DateTime minimum = ValueHelper.ToDateTime(overriddenActualRange.Minimum);\r\n                DateTime midpoint = ((DateTime.MinValue == minimum) ? DateTime.Now : minimum).Date;\r\n                return new Range<IComparable>(midpoint.AddMonths(-6), midpoint.AddMonths(6));\r\n            }\r\n\r\n            // ActualLength of 1.0 or less maps all points to the same coordinate\r\n            if (range.HasData && this.ActualLength > 1.0)\r\n            {\r\n                IList<ValueMarginCoordinateAndOverlap> valueMargins = new List<ValueMarginCoordinateAndOverlap>();\r\n                foreach (ValueMargin valueMargin in\r\n                    this.RegisteredListeners\r\n                        .OfType<IValueMarginProvider>()\r\n                        .SelectMany(provider => provider.GetValueMargins(this)))\r\n                {\r\n                    valueMargins.Add(\r\n                        new ValueMarginCoordinateAndOverlap\r\n                        {\r\n                            ValueMargin = valueMargin,\r\n                        });\r\n                }\r\n\r\n                if (valueMargins.Count > 0)\r\n                {\r\n                    double maximumPixelMarginLength =\r\n                        valueMargins\r\n                        .Select(valueMargin => valueMargin.ValueMargin.LowMargin + valueMargin.ValueMargin.HighMargin)\r\n                        .MaxOrNullable().Value;\r\n\r\n                    // Requested margin is larger than the axis so give up\r\n                    // trying to find a range that will fit it.\r\n                    if (maximumPixelMarginLength > this.ActualLength)\r\n                    {\r\n                        return range;\r\n                    }\r\n\r\n                    Range<DateTime> currentRange = range.ToDateTimeRange();\r\n\r\n                    // Ensure range is not empty.\r\n                    if (currentRange.Minimum == currentRange.Maximum)\r\n                    {\r\n                        int year = DateTime.Now.Year;\r\n                        currentRange = new Range<DateTime>(new DateTime(year, 1, 1), new DateTime(year + 1, 1, 1));\r\n                    }\r\n\r\n                    // priming the loop\r\n                    double actualLength = this.ActualLength;\r\n                    ValueMarginCoordinateAndOverlap maxLeftOverlapValueMargin;\r\n                    ValueMarginCoordinateAndOverlap maxRightOverlapValueMargin;\r\n                    UpdateValueMargins(valueMargins, currentRange.ToComparableRange());\r\n                    GetMaxLeftAndRightOverlap(valueMargins, out maxLeftOverlapValueMargin, out maxRightOverlapValueMargin);\r\n\r\n                    while (maxLeftOverlapValueMargin.LeftOverlap > 0 || maxRightOverlapValueMargin.RightOverlap > 0)\r\n                    {\r\n                        long unitOverPixels = currentRange.GetLength().Value.Ticks / ((long) actualLength);\r\n                        DateTime newMinimum = new DateTime(currentRange.Minimum.Ticks - (long)((maxLeftOverlapValueMargin.LeftOverlap + 0.5) * unitOverPixels));\r\n                        DateTime newMaximum = new DateTime(currentRange.Maximum.Ticks + (long)((maxRightOverlapValueMargin.RightOverlap + 0.5) * unitOverPixels));\r\n\r\n                        currentRange = new Range<DateTime>(newMinimum, newMaximum);\r\n                        UpdateValueMargins(valueMargins, currentRange.ToComparableRange());\r\n                        GetMaxLeftAndRightOverlap(valueMargins, out maxLeftOverlapValueMargin, out maxRightOverlapValueMargin);\r\n                    }\r\n\r\n                    return currentRange.ToComparableRange();\r\n                }\r\n            }\r\n\r\n            return range;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Axis/DateTimeAxisLabel.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// An axis label for displaying DateTime values.\r\n    /// </summary>\r\n    public class DateTimeAxisLabel : AxisLabel\r\n    {\r\n        #region public DateTimeIntervalType IntervalType\r\n        /// <summary>\r\n        /// Gets or sets the interval type of the DateTimeAxis2.\r\n        /// </summary>\r\n        public DateTimeIntervalType IntervalType\r\n        {\r\n            get { return (DateTimeIntervalType)GetValue(IntervalTypeProperty); }\r\n            set { SetValue(IntervalTypeProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the IntervalType dependency property.\r\n        /// </summary>\r\n        public static readonly System.Windows.DependencyProperty IntervalTypeProperty =\r\n            System.Windows.DependencyProperty.Register(\r\n                \"IntervalType\",\r\n                typeof(DateTimeIntervalType),\r\n                typeof(DateTimeAxisLabel),\r\n                new System.Windows.PropertyMetadata(DateTimeIntervalType.Auto, OnIntervalTypePropertyChanged));\r\n\r\n        /// <summary>\r\n        /// IntervalTypeProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">DateTimeAxisLabel that changed its IntervalType.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnIntervalTypePropertyChanged(System.Windows.DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DateTimeAxisLabel source = (DateTimeAxisLabel)d;\r\n            DateTimeIntervalType oldValue = (DateTimeIntervalType)e.OldValue;\r\n            DateTimeIntervalType newValue = (DateTimeIntervalType)e.NewValue;\r\n            source.OnIntervalTypePropertyChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// IntervalTypeProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>        \r\n        protected virtual void OnIntervalTypePropertyChanged(DateTimeIntervalType oldValue, DateTimeIntervalType newValue)\r\n        {\r\n            UpdateFormattedContent();\r\n        }\r\n        #endregion public DateTimeIntervalType IntervalType\r\n\r\n        #region public string YearsIntervalStringFormat\r\n        /// <summary>\r\n        /// Gets or sets the format string to use when the interval is hours.\r\n        /// </summary>\r\n        public string YearsIntervalStringFormat\r\n        {\r\n            get { return GetValue(YearsIntervalStringFormatProperty) as string; }\r\n            set { SetValue(YearsIntervalStringFormatProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the YearsIntervalStringFormat dependency property.\r\n        /// </summary>\r\n        public static readonly System.Windows.DependencyProperty YearsIntervalStringFormatProperty =\r\n            System.Windows.DependencyProperty.Register(\r\n                \"YearsIntervalStringFormat\",\r\n                typeof(string),\r\n                typeof(DateTimeAxisLabel),\r\n                new System.Windows.PropertyMetadata(null, OnYearsIntervalStringFormatPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// YearsIntervalStringFormatProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">DateTimeAxisLabel that changed its YearsIntervalStringFormat.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnYearsIntervalStringFormatPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DateTimeAxisLabel source = (DateTimeAxisLabel)d;\r\n            source.OnYearsIntervalStringFormatPropertyChanged();\r\n        }\r\n\r\n        /// <summary>\r\n        /// YearsIntervalStringFormatProperty property changed handler.\r\n        /// </summary>    \r\n        protected virtual void OnYearsIntervalStringFormatPropertyChanged()\r\n        {\r\n            UpdateFormattedContent();\r\n        }\r\n        #endregion public string YearsIntervalStringFormat\r\n\r\n        #region public string MonthsIntervalStringFormat\r\n        /// <summary>\r\n        /// Gets or sets the format string to use when the interval is hours.\r\n        /// </summary>\r\n        public string MonthsIntervalStringFormat\r\n        {\r\n            get { return GetValue(MonthsIntervalStringFormatProperty) as string; }\r\n            set { SetValue(MonthsIntervalStringFormatProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the MonthsIntervalStringFormat dependency property.\r\n        /// </summary>\r\n        public static readonly System.Windows.DependencyProperty MonthsIntervalStringFormatProperty =\r\n            System.Windows.DependencyProperty.Register(\r\n                \"MonthsIntervalStringFormat\",\r\n                typeof(string),\r\n                typeof(DateTimeAxisLabel),\r\n                new System.Windows.PropertyMetadata(null, OnMonthsIntervalStringFormatPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// MonthsIntervalStringFormatProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">DateTimeAxisLabel that changed its MonthsIntervalStringFormat.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnMonthsIntervalStringFormatPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DateTimeAxisLabel source = (DateTimeAxisLabel)d;\r\n            source.OnMonthsIntervalStringFormatPropertyChanged();\r\n        }\r\n\r\n        /// <summary>\r\n        /// MonthsIntervalStringFormatProperty property changed handler.\r\n        /// </summary>    \r\n        protected virtual void OnMonthsIntervalStringFormatPropertyChanged()\r\n        {\r\n            UpdateFormattedContent();\r\n        }\r\n        #endregion public string MonthsIntervalStringFormat\r\n\r\n        #region public string WeeksIntervalStringFormat\r\n        /// <summary>\r\n        /// Gets or sets the format string to use when the interval is hours.\r\n        /// </summary>\r\n        public string WeeksIntervalStringFormat\r\n        {\r\n            get { return GetValue(WeeksIntervalStringFormatProperty) as string; }\r\n            set { SetValue(WeeksIntervalStringFormatProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the WeeksIntervalStringFormat dependency property.\r\n        /// </summary>\r\n        public static readonly System.Windows.DependencyProperty WeeksIntervalStringFormatProperty =\r\n            System.Windows.DependencyProperty.Register(\r\n                \"WeeksIntervalStringFormat\",\r\n                typeof(string),\r\n                typeof(DateTimeAxisLabel),\r\n                new System.Windows.PropertyMetadata(null, OnWeeksIntervalStringFormatPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// WeeksIntervalStringFormatProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">DateTimeAxisLabel that changed its WeeksIntervalStringFormat.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnWeeksIntervalStringFormatPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DateTimeAxisLabel source = (DateTimeAxisLabel)d;\r\n            source.OnWeeksIntervalStringFormatPropertyChanged();\r\n        }\r\n\r\n        /// <summary>\r\n        /// WeeksIntervalStringFormatProperty property changed handler.\r\n        /// </summary>    \r\n        protected virtual void OnWeeksIntervalStringFormatPropertyChanged()\r\n        {\r\n            UpdateFormattedContent();\r\n        }\r\n        #endregion public string WeeksIntervalStringFormat\r\n\r\n        #region public string DaysIntervalStringFormat\r\n        /// <summary>\r\n        /// Gets or sets the format string to use when the interval is hours.\r\n        /// </summary>\r\n        public string DaysIntervalStringFormat\r\n        {\r\n            get { return GetValue(DaysIntervalStringFormatProperty) as string; }\r\n            set { SetValue(DaysIntervalStringFormatProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the DaysIntervalStringFormat dependency property.\r\n        /// </summary>\r\n        public static readonly System.Windows.DependencyProperty DaysIntervalStringFormatProperty =\r\n            System.Windows.DependencyProperty.Register(\r\n                \"DaysIntervalStringFormat\",\r\n                typeof(string),\r\n                typeof(DateTimeAxisLabel),\r\n                new System.Windows.PropertyMetadata(null, OnDaysIntervalStringFormatPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// DaysIntervalStringFormatProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">DateTimeAxisLabel that changed its DaysIntervalStringFormat.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnDaysIntervalStringFormatPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DateTimeAxisLabel source = (DateTimeAxisLabel)d;\r\n            source.OnDaysIntervalStringFormatPropertyChanged();\r\n        }\r\n\r\n        /// <summary>\r\n        /// DaysIntervalStringFormatProperty property changed handler.\r\n        /// </summary>    \r\n        protected virtual void OnDaysIntervalStringFormatPropertyChanged()\r\n        {\r\n            UpdateFormattedContent();\r\n        }\r\n        #endregion public string DaysIntervalStringFormat\r\n\r\n        #region public string HoursIntervalStringFormat\r\n        /// <summary>\r\n        /// Gets or sets the format string to use when the interval is hours.\r\n        /// </summary>\r\n        public string HoursIntervalStringFormat\r\n        {\r\n            get { return GetValue(HoursIntervalStringFormatProperty) as string; }\r\n            set { SetValue(HoursIntervalStringFormatProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the HoursIntervalStringFormat dependency property.\r\n        /// </summary>\r\n        public static readonly System.Windows.DependencyProperty HoursIntervalStringFormatProperty =\r\n            System.Windows.DependencyProperty.Register(\r\n                \"HoursIntervalStringFormat\",\r\n                typeof(string),\r\n                typeof(DateTimeAxisLabel),\r\n                new System.Windows.PropertyMetadata(null, OnHoursIntervalStringFormatPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// HoursIntervalStringFormatProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">DateTimeAxisLabel that changed its HoursIntervalStringFormat.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnHoursIntervalStringFormatPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DateTimeAxisLabel source = (DateTimeAxisLabel)d;\r\n            source.OnHoursIntervalStringFormatPropertyChanged();\r\n        }\r\n\r\n        /// <summary>\r\n        /// HoursIntervalStringFormatProperty property changed handler.\r\n        /// </summary>    \r\n        protected virtual void OnHoursIntervalStringFormatPropertyChanged()\r\n        {\r\n            UpdateFormattedContent();\r\n        }\r\n        #endregion public string HoursIntervalStringFormat\r\n\r\n        #region public string MinutesIntervalStringFormat\r\n        /// <summary>\r\n        /// Gets or sets the format string to use when the interval is hours.\r\n        /// </summary>\r\n        public string MinutesIntervalStringFormat\r\n        {\r\n            get { return GetValue(MinutesIntervalStringFormatProperty) as string; }\r\n            set { SetValue(MinutesIntervalStringFormatProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the MinutesIntervalStringFormat dependency property.\r\n        /// </summary>\r\n        public static readonly System.Windows.DependencyProperty MinutesIntervalStringFormatProperty =\r\n            System.Windows.DependencyProperty.Register(\r\n                \"MinutesIntervalStringFormat\",\r\n                typeof(string),\r\n                typeof(DateTimeAxisLabel),\r\n                new System.Windows.PropertyMetadata(null, OnMinutesIntervalStringFormatPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// MinutesIntervalStringFormatProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">DateTimeAxisLabel that changed its MinutesIntervalStringFormat.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnMinutesIntervalStringFormatPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DateTimeAxisLabel source = (DateTimeAxisLabel)d;\r\n            source.OnMinutesIntervalStringFormatPropertyChanged();\r\n        }\r\n\r\n        /// <summary>\r\n        /// MinutesIntervalStringFormatProperty property changed handler.\r\n        /// </summary>    \r\n        protected virtual void OnMinutesIntervalStringFormatPropertyChanged()\r\n        {\r\n            UpdateFormattedContent();\r\n        }\r\n        #endregion public string MinutesIntervalStringFormat\r\n\r\n        #region public string SecondsIntervalStringFormat\r\n        /// <summary>\r\n        /// Gets or sets the format string to use when the interval is hours.\r\n        /// </summary>\r\n        public string SecondsIntervalStringFormat\r\n        {\r\n            get { return GetValue(SecondsIntervalStringFormatProperty) as string; }\r\n            set { SetValue(SecondsIntervalStringFormatProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the SecondsIntervalStringFormat dependency property.\r\n        /// </summary>\r\n        public static readonly System.Windows.DependencyProperty SecondsIntervalStringFormatProperty =\r\n            System.Windows.DependencyProperty.Register(\r\n                \"SecondsIntervalStringFormat\",\r\n                typeof(string),\r\n                typeof(DateTimeAxisLabel),\r\n                new System.Windows.PropertyMetadata(null, OnSecondsIntervalStringFormatPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// SecondsIntervalStringFormatProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">DateTimeAxisLabel that changed its SecondsIntervalStringFormat.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnSecondsIntervalStringFormatPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DateTimeAxisLabel source = (DateTimeAxisLabel)d;\r\n            source.OnSecondsIntervalStringFormatPropertyChanged();\r\n        }\r\n\r\n        /// <summary>\r\n        /// SecondsIntervalStringFormatProperty property changed handler.\r\n        /// </summary>    \r\n        protected virtual void OnSecondsIntervalStringFormatPropertyChanged()\r\n        {\r\n            UpdateFormattedContent();\r\n        }\r\n        #endregion public string SecondsIntervalStringFormat\r\n\r\n        #region public string MillisecondsIntervalStringFormat\r\n        /// <summary>\r\n        /// Gets or sets the format string to use when the interval is hours.\r\n        /// </summary>\r\n        public string MillisecondsIntervalStringFormat\r\n        {\r\n            get { return GetValue(MillisecondsIntervalStringFormatProperty) as string; }\r\n            set { SetValue(MillisecondsIntervalStringFormatProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the MillisecondsIntervalStringFormat dependency property.\r\n        /// </summary>\r\n        public static readonly System.Windows.DependencyProperty MillisecondsIntervalStringFormatProperty =\r\n            System.Windows.DependencyProperty.Register(\r\n                \"MillisecondsIntervalStringFormat\",\r\n                typeof(string),\r\n                typeof(DateTimeAxisLabel),\r\n                new System.Windows.PropertyMetadata(null, OnMillisecondsIntervalStringFormatPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// MillisecondsIntervalStringFormatProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">DateTimeAxisLabel that changed its MillisecondsIntervalStringFormat.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnMillisecondsIntervalStringFormatPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DateTimeAxisLabel source = (DateTimeAxisLabel)d;\r\n            source.OnMillisecondsIntervalStringFormatPropertyChanged();\r\n        }\r\n\r\n        /// <summary>\r\n        /// MillisecondsIntervalStringFormatProperty property changed handler.\r\n        /// </summary>    \r\n        protected virtual void OnMillisecondsIntervalStringFormatPropertyChanged()\r\n        {\r\n            UpdateFormattedContent();\r\n        }\r\n        #endregion public string MillisecondsIntervalStringFormat\r\n\r\n        /// <summary>\r\n        /// Initializes the static members of the DateTimeAxisLabel class.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1810:InitializeReferenceTypeStaticFieldsInline\", Justification = \"Dependency properties are initialized in-line.\")]\r\n        static DateTimeAxisLabel()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(DateTimeAxisLabel), new FrameworkPropertyMetadata(typeof(DateTimeAxisLabel)));\r\n        }  \r\n\r\n        /// <summary>\r\n        /// Instantiates a new instance of the DateTimeAxisLabel class.\r\n        /// </summary>\r\n        public DateTimeAxisLabel()\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the formatted text.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Maintainability\", \"CA1502:AvoidExcessiveComplexity\", Justification = \"Code is not overly complex.\")]\r\n        protected override void UpdateFormattedContent()\r\n        {\r\n            if (StringFormat == null)\r\n            {\r\n                switch (IntervalType)\r\n                {\r\n                    case DateTimeIntervalType.Years:\r\n                        this.SetBinding(FormattedContentProperty, new Binding { Converter = new StringFormatConverter(), ConverterParameter = YearsIntervalStringFormat ?? StringFormat ?? \"{0}\" });\r\n                        break;\r\n                    case DateTimeIntervalType.Months:\r\n                        this.SetBinding(FormattedContentProperty, new Binding { Converter = new StringFormatConverter(), ConverterParameter = MonthsIntervalStringFormat ?? StringFormat ?? \"{0}\" });\r\n                        break;\r\n                    case DateTimeIntervalType.Weeks:\r\n                        this.SetBinding(FormattedContentProperty, new Binding { Converter = new StringFormatConverter(), ConverterParameter = WeeksIntervalStringFormat ?? StringFormat ?? \"{0}\" });\r\n                        break;\r\n                    case DateTimeIntervalType.Days:\r\n                        this.SetBinding(FormattedContentProperty, new Binding { Converter = new StringFormatConverter(), ConverterParameter = DaysIntervalStringFormat ?? StringFormat ?? \"{0}\" });\r\n                        break;\r\n                    case DateTimeIntervalType.Hours:\r\n                        this.SetBinding(FormattedContentProperty, new Binding { Converter = new StringFormatConverter(), ConverterParameter = HoursIntervalStringFormat ?? StringFormat ?? \"{0}\" });\r\n                        break;\r\n                    case DateTimeIntervalType.Minutes:\r\n                        this.SetBinding(FormattedContentProperty, new Binding { Converter = new StringFormatConverter(), ConverterParameter = MinutesIntervalStringFormat ?? StringFormat ?? \"{0}\" });\r\n                        break;\r\n                    case DateTimeIntervalType.Seconds:\r\n                        this.SetBinding(FormattedContentProperty, new Binding { Converter = new StringFormatConverter(), ConverterParameter = SecondsIntervalStringFormat ?? StringFormat ?? \"{0}\" });\r\n                        break;\r\n                    case DateTimeIntervalType.Milliseconds:\r\n                        this.SetBinding(FormattedContentProperty, new Binding { Converter = new StringFormatConverter(), ConverterParameter = MillisecondsIntervalStringFormat ?? StringFormat ?? \"{0}\" });\r\n                        break;\r\n                    default:\r\n                        base.UpdateFormattedContent();\r\n                        break;\r\n                }\r\n            }\r\n            else\r\n            {\r\n                base.UpdateFormattedContent();\r\n            }\r\n        }       \r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Axis/DateTimeIntervalType.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// A date time interval.\r\n    /// </summary>\r\n    public enum DateTimeIntervalType\r\n    {\r\n        /// <summary>\r\n        /// Automatically determine interval.\r\n        /// </summary>\r\n        Auto = 0,\r\n\r\n        /// <summary>\r\n        /// Interval type is milliseconds.\r\n        /// </summary>\r\n        Milliseconds = 1,\r\n\r\n        /// <summary>\r\n        /// Interval type is seconds.\r\n        /// </summary>\r\n        Seconds = 2,\r\n\r\n        /// <summary>\r\n        /// Interval type is minutes.\r\n        /// </summary>\r\n        Minutes = 3,\r\n\r\n        /// <summary>\r\n        /// Interval type is hours.\r\n        /// </summary>\r\n        Hours = 4,\r\n\r\n        /// <summary>\r\n        /// Interval type is days.\r\n        /// </summary>\r\n        Days = 5,\r\n\r\n        /// <summary>\r\n        /// Interval type is weeks.\r\n        /// </summary>\r\n        Weeks = 6,\r\n\r\n        /// <summary>\r\n        /// Interval type is months.\r\n        /// </summary>\r\n        Months = 7,\r\n\r\n        /// <summary>\r\n        /// Interval type is years.\r\n        /// </summary>\r\n        Years = 8,\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Axis/DisplayAxis.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Media;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Shapes;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// An axis that has a range.\r\n    /// </summary>\r\n    public abstract class DisplayAxis : Axis, IRequireSeriesHost\r\n    {\r\n        /// <summary>\r\n        /// Maximum intervals per 200 pixels.\r\n        /// </summary>\r\n        protected const double MaximumAxisIntervalsPer200Pixels = 8;\r\n\r\n        /// <summary>\r\n        /// The name of the axis grid template part.\r\n        /// </summary>\r\n        protected const string AxisGridName = \"AxisGrid\";\r\n\r\n        /// <summary>\r\n        /// The name of the axis title template part.\r\n        /// </summary>\r\n        protected const string AxisTitleName = \"AxisTitle\";\r\n\r\n        #region public Style AxisLabelStyle\r\n        /// <summary>\r\n        /// Gets or sets the style used for the axis labels.\r\n        /// </summary>\r\n        public Style AxisLabelStyle\r\n        {\r\n            get { return GetValue(AxisLabelStyleProperty) as Style; }\r\n            set { SetValue(AxisLabelStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the AxisLabelStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty AxisLabelStyleProperty =\r\n            DependencyProperty.Register(\r\n                \"AxisLabelStyle\",\r\n                typeof(Style),\r\n                typeof(DisplayAxis),\r\n                new PropertyMetadata(null, OnAxisLabelStylePropertyChanged));\r\n\r\n        /// <summary>\r\n        /// AxisLabelStyleProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">DisplayAxis that changed its AxisLabelStyle.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnAxisLabelStylePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DisplayAxis source = (DisplayAxis)d;\r\n            Style oldValue = (Style)e.OldValue;\r\n            Style newValue = (Style)e.NewValue;\r\n            source.OnAxisLabelStylePropertyChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// AxisLabelStyleProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>        \r\n        protected virtual void OnAxisLabelStylePropertyChanged(Style oldValue, Style newValue)\r\n        {\r\n        }\r\n        #endregion public Style AxisLabelStyle\r\n\r\n        /// <summary>\r\n        /// Gets the actual length.\r\n        /// </summary>\r\n        protected double ActualLength\r\n        {\r\n            get\r\n            {\r\n                return GetLength(new Size(this.ActualWidth, this.ActualHeight));\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the length of the axis given an available size.\r\n        /// </summary>\r\n        /// <param name=\"availableSize\">The available size.</param>\r\n        /// <returns>The length of the axis given an available size.</returns>\r\n        protected double GetLength(Size availableSize)\r\n        {\r\n            if (this.ActualHeight == 0.0 && this.ActualWidth == 0.0)\r\n            {\r\n                return 0.0;\r\n            }\r\n            if (this.Orientation == AxisOrientation.X)\r\n            {\r\n                return availableSize.Width;\r\n            }\r\n            else if (this.Orientation == AxisOrientation.Y)\r\n            {\r\n                return availableSize.Height;\r\n            }\r\n            else\r\n            {\r\n                throw new InvalidOperationException(Properties.Resources.DisplayAxis_GetLength_CannotDetermineTheLengthOfAnAxisWithAnOrientationOfNone);\r\n            }\r\n        }\r\n\r\n        #region private GridLines GridLines\r\n\r\n        /// <summary>\r\n        /// This field stores the grid lines element.\r\n        /// </summary>\r\n        private DisplayAxisGridLines _gridLines;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the grid lines property.\r\n        /// </summary>\r\n        internal DisplayAxisGridLines GridLines\r\n        {\r\n            get { return _gridLines; }\r\n            set \r\n            { \r\n                if (value != _gridLines)\r\n                {\r\n                    DisplayAxisGridLines oldValue = _gridLines;\r\n                    _gridLines = value;\r\n                    OnGridLinesPropertyChanged(oldValue, value);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// GridLinesProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>        \r\n        private void OnGridLinesPropertyChanged(DisplayAxisGridLines oldValue, DisplayAxisGridLines newValue)\r\n        {\r\n            if (SeriesHost != null && oldValue != null)\r\n            {\r\n                SeriesHost.BackgroundElements.Remove(oldValue);\r\n            }\r\n            if (SeriesHost != null && newValue != null)\r\n            {\r\n                SeriesHost.BackgroundElements.Add(newValue);\r\n            }\r\n        }\r\n        #endregion private GridLines GridLines\r\n\r\n        #region public Style MajorTickMarkStyle\r\n        /// <summary>\r\n        /// Gets or sets the style applied to the Axis tick marks.\r\n        /// </summary>\r\n        /// <value>The Style applied to the Axis tick marks.</value>\r\n        public Style MajorTickMarkStyle\r\n        {\r\n            get { return GetValue(MajorTickMarkStyleProperty) as Style; }\r\n            set { SetValue(MajorTickMarkStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the MajorTickMarkStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty MajorTickMarkStyleProperty =\r\n            DependencyProperty.Register(\r\n                \"MajorTickMarkStyle\",\r\n                typeof(Style),\r\n                typeof(DisplayAxis),\r\n                new PropertyMetadata(null, OnMajorTickMarkStylePropertyChanged));\r\n\r\n        /// <summary>\r\n        /// MajorTickMarkStyleProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">DisplayAxis that changed its MajorTickMarkStyle.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnMajorTickMarkStylePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DisplayAxis source = (DisplayAxis)d;\r\n            Style oldValue = (Style)e.OldValue;\r\n            Style newValue = (Style)e.NewValue;\r\n            source.OnMajorTickMarkStylePropertyChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// MajorTickMarkStyleProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>        \r\n        protected virtual void OnMajorTickMarkStylePropertyChanged(Style oldValue, Style newValue)\r\n        {\r\n        }\r\n        #endregion public Style MajorTickMarkStyle\r\n\r\n        #region public object Title\r\n        /// <summary>\r\n        /// Gets or sets the title property.\r\n        /// </summary>\r\n        public object Title\r\n        {\r\n            get { return GetValue(TitleProperty) as object; }\r\n            set { SetValue(TitleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Title dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty TitleProperty =\r\n            DependencyProperty.Register(\r\n                \"Title\",\r\n                typeof(object),\r\n                typeof(DisplayAxis),\r\n                new PropertyMetadata(null, OnTitlePropertyChanged));\r\n\r\n        /// <summary>\r\n        /// TitleProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">DisplayAxis that changed its Title.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnTitlePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DisplayAxis source = (DisplayAxis)d;\r\n            object oldValue = (object)e.OldValue;\r\n            object newValue = (object)e.NewValue;\r\n            source.OnTitlePropertyChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// TitleProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>        \r\n        protected virtual void OnTitlePropertyChanged(object oldValue, object newValue)\r\n        {\r\n            if (this.AxisTitle != null)\r\n            {\r\n                this.AxisTitle.Content = Title;\r\n            }\r\n        }\r\n        #endregion public object Title\r\n\r\n        /// <summary>\r\n        /// Gets or sets the LayoutTransformControl used to rotate the title.\r\n        /// </summary>\r\n        private LayoutTransformControl TitleLayoutTransformControl { get; set; }\r\n\r\n        #region public Style TitleStyle\r\n        /// <summary>\r\n        /// Gets or sets the style applied to the Axis title.\r\n        /// </summary>\r\n        /// <value>The Style applied to the Axis title.</value>\r\n        public Style TitleStyle\r\n        {\r\n            get { return GetValue(TitleStyleProperty) as Style; }\r\n            set { SetValue(TitleStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the TitleStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty TitleStyleProperty =\r\n            DependencyProperty.Register(\r\n                \"TitleStyle\",\r\n                typeof(Style),\r\n                typeof(DisplayAxis),\r\n                null);\r\n        #endregion\r\n\r\n        #region public bool ShowGridLines\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether grid lines should be shown.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\", MessageId = \"GridLines\", Justification = \"This is the expected casing.\")]\r\n        public bool ShowGridLines\r\n        {\r\n            get { return (bool)GetValue(ShowGridLinesProperty); }\r\n            set { SetValue(ShowGridLinesProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ShowGridLines dependency property.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\", MessageId = \"GridLines\", Justification = \"This is the expected capitalization.\")]\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\", MessageId = \"GridLine\", Justification = \"This is the expected capitalization.\")]\r\n        public static readonly DependencyProperty ShowGridLinesProperty =\r\n            DependencyProperty.Register(\r\n                \"ShowGridLines\",\r\n                typeof(bool),\r\n                typeof(DisplayAxis),\r\n                new PropertyMetadata(false, OnShowGridLinesPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// ShowGridLinesProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">Axis that changed its ShowGridLines.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnShowGridLinesPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DisplayAxis source = (DisplayAxis)d;\r\n            bool oldValue = (bool)e.OldValue;\r\n            bool newValue = (bool)e.NewValue;\r\n            source.OnShowGridLinesPropertyChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// ShowGridLinesProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>        \r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\", MessageId = \"GridLine\", Justification = \"This is the expected capitalization.\")]\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\", MessageId = \"GridLines\", Justification = \"This is the expected capitalization.\")]\r\n        protected virtual void OnShowGridLinesPropertyChanged(bool oldValue, bool newValue)\r\n        {\r\n            SetShowGridLines(newValue);\r\n        }\r\n        #endregion public bool ShowGridLines\r\n\r\n        /// <summary>\r\n        /// Creates and destroys a grid lines element based on the specified\r\n        /// value.\r\n        /// </summary>\r\n        /// <param name=\"newValue\">A value indicating whether to display grid \r\n        /// lines or not.</param>\r\n        private void SetShowGridLines(bool newValue)\r\n        {\r\n            if (newValue == true)\r\n            {\r\n                this.GridLines = new OrientedAxisGridLines(this);\r\n            }\r\n            else\r\n            {\r\n                this.GridLines = null;\r\n            }\r\n        }\r\n\r\n        #region public Style GridLineStyle\r\n        /// <summary>\r\n        /// Gets or sets the Style of the Axis's gridlines.\r\n        /// </summary>\r\n        [System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\", MessageId = \"GridLine\", Justification = \"Current casing is the expected one.\")]\r\n        public Style GridLineStyle\r\n        {\r\n            get { return GetValue(GridLineStyleProperty) as Style; }\r\n            set { SetValue(GridLineStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the GridlineStyle dependency property.\r\n        /// </summary>\r\n        [System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\", MessageId = \"GridLine\", Justification = \"Current casing is the expected one.\")]\r\n        public static readonly DependencyProperty GridLineStyleProperty =\r\n            DependencyProperty.Register(\r\n                \"GridLineStyle\",\r\n                typeof(Style),\r\n                typeof(DisplayAxis),\r\n                null);\r\n        #endregion\r\n\r\n        /// <summary>\r\n        /// The grid used to layout the axis.\r\n        /// </summary>\r\n        private Grid _grid;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the grid used to layout the axis.\r\n        /// </summary>\r\n        private Grid AxisGrid\r\n        {\r\n            get\r\n            {\r\n                return _grid;\r\n            }\r\n            set\r\n            {\r\n                if (_grid != value)\r\n                {\r\n                    if (_grid != null)\r\n                    {\r\n                        _grid.Children.Clear();\r\n                    }\r\n\r\n                    _grid = value;\r\n\r\n                    if (_grid != null)\r\n                    {\r\n                        _grid.Children.Add(this.OrientedPanel);\r\n                        if (this.AxisTitle != null)\r\n                        {\r\n                            _grid.Children.Add(this.AxisTitle);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a grid to lay out the dependent axis.\r\n        /// </summary>\r\n        private Grid DependentAxisGrid { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets the oriented panel used to layout the axis labels.\r\n        /// </summary>\r\n        internal OrientedPanel OrientedPanel { get; private set; }\r\n\r\n        /// <summary>\r\n        /// The control used to display the axis title.\r\n        /// </summary>\r\n        private Title _axisTitle;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the title control used to display the title.\r\n        /// </summary>\r\n        private Title AxisTitle\r\n        {\r\n            get\r\n            {\r\n                return _axisTitle;\r\n            }\r\n            set\r\n            {\r\n                if (_axisTitle != value)\r\n                {\r\n                    if (_axisTitle != null)\r\n                    {\r\n                        _axisTitle.Content = null;\r\n                    }\r\n\r\n                    _axisTitle = value;\r\n                    if (Title != null)\r\n                    {\r\n                        _axisTitle.Content = Title;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates a major axis tick mark.\r\n        /// </summary>\r\n        /// <returns>A line to used to render a tick mark.</returns>\r\n        protected virtual Line CreateMajorTickMark()\r\n        {\r\n            return CreateTickMark(MajorTickMarkStyle);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates a tick mark and applies a style to it.\r\n        /// </summary>\r\n        /// <param name=\"style\">The style to apply.</param>\r\n        /// <returns>The newly created tick mark.</returns>\r\n        protected Line CreateTickMark(Style style)\r\n        {\r\n            Line line = new Line();\r\n            line.Style = style;\r\n            if (this.Orientation == AxisOrientation.Y)\r\n            {\r\n                line.Y1 = 0.5;\r\n                line.Y2 = 0.5;\r\n            }\r\n            else if (this.Orientation == AxisOrientation.X)\r\n            {\r\n                line.X1 = 0.5;\r\n                line.X2 = 0.5;\r\n            }\r\n            return line;\r\n        }\r\n\r\n        /// <summary>\r\n        /// This method is used to share the grid line coordinates with the\r\n        /// internal grid lines control.\r\n        /// </summary>\r\n        /// <returns>A sequence of the major grid line coordinates.</returns>\r\n        internal IEnumerable<UnitValue> InternalGetMajorGridLinePositions()\r\n        {\r\n            return GetMajorGridLineCoordinates(new Size(this.ActualWidth, this.ActualHeight));\r\n        }\r\n        \r\n        /// <summary>\r\n        /// Returns the coordinates to use for the grid line control.\r\n        /// </summary>\r\n        /// <param name=\"availableSize\">The available size.</param>\r\n        /// <returns>A sequence of coordinates at which to draw grid lines.\r\n        /// </returns>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\", MessageId = \"GridLine\", Justification = \"This is the expected capitalization.\")]\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1024:UsePropertiesWhereAppropriate\", Justification = \"Returns the coordinates of the grid lines.\")]\r\n        protected abstract IEnumerable<UnitValue> GetMajorGridLineCoordinates(Size availableSize);\r\n\r\n        /// <summary>\r\n        /// Initializes the static members of the DisplayAxis class.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1810:InitializeReferenceTypeStaticFieldsInline\", Justification = \"Dependency properties are initialized in-line.\")]\r\n        static DisplayAxis()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(DisplayAxis), new FrameworkPropertyMetadata(typeof(DisplayAxis)));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Instantiates a new instance of the DisplayAxis class.\r\n        /// </summary>\r\n        protected DisplayAxis()\r\n        {\r\n            this.OrientedPanel = new OrientedPanel();\r\n            this.DependentAxisGrid = new Grid();\r\n\r\n            this.TitleLayoutTransformControl = new LayoutTransformControl();\r\n            this.TitleLayoutTransformControl.HorizontalAlignment = HorizontalAlignment.Center;\r\n            this.TitleLayoutTransformControl.VerticalAlignment = VerticalAlignment.Center;\r\n\r\n            this.SizeChanged += new SizeChangedEventHandler(DisplayAxisSizeChanged);\r\n        }\r\n\r\n        /// <summary>\r\n        /// If display axis has just become visible, invalidate.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source of the event.</param>\r\n        /// <param name=\"e\">Information about the event.</param>\r\n        private void DisplayAxisSizeChanged(object sender, SizeChangedEventArgs e)\r\n        {\r\n            if (e.PreviousSize.Width == 0.0 && e.PreviousSize.Height == 0.0)\r\n            {\r\n                Invalidate();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates an axis label.\r\n        /// </summary>\r\n        /// <returns>The new axis label.</returns>\r\n        protected virtual Control CreateAxisLabel()\r\n        {\r\n            return new AxisLabel();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the grid lines element if a suitable dependent axis has\r\n        /// been added to a radial axis.\r\n        /// </summary>\r\n        protected override void OnDependentAxesCollectionChanged()\r\n        {\r\n            SetShowGridLines(ShowGridLines);\r\n            base.OnDependentAxesCollectionChanged();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Prepares an axis label to be plotted.\r\n        /// </summary>\r\n        /// <param name=\"label\">The axis label to prepare.</param>\r\n        /// <param name=\"dataContext\">The data context to use for the axis \r\n        /// label.</param>\r\n        protected virtual void PrepareAxisLabel(Control label, object dataContext)\r\n        {\r\n            label.DataContext = dataContext;\r\n            label.SetStyle(AxisLabelStyle);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Retrieves template parts and configures layout.\r\n        /// </summary>\r\n        public override void OnApplyTemplate()\r\n        {\r\n            base.OnApplyTemplate();\r\n\r\n            this.AxisGrid = GetTemplateChild(AxisGridName) as Grid;\r\n            this.AxisTitle = GetTemplateChild(AxisTitleName) as Title;\r\n            if (this.AxisTitle != null && this.AxisGrid.Children.Contains(this.AxisTitle))\r\n            {\r\n                this.AxisGrid.Children.Remove(this.AxisTitle);\r\n                this.TitleLayoutTransformControl.Child = this.AxisTitle;\r\n                this.AxisGrid.Children.Add(this.TitleLayoutTransformControl);\r\n            }\r\n\r\n            ArrangeAxisGrid();\r\n        }\r\n\r\n        /// <summary>\r\n        /// When the size of the oriented panel changes invalidate the axis.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source of the event.</param>\r\n        /// <param name=\"e\">Information about the event.</param>\r\n        private void OnOrientedPanelSizeChanged(object sender, SizeChangedEventArgs e)\r\n        {\r\n            Invalidate();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Arranges the grid when the location property is changed.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">The old location.</param>\r\n        /// <param name=\"newValue\">The new location.</param>\r\n        protected override void OnLocationPropertyChanged(AxisLocation oldValue, AxisLocation newValue)\r\n        {\r\n            ArrangeAxisGrid();\r\n            base.OnLocationPropertyChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Arranges the elements in the axis grid.\r\n        /// </summary>\r\n        private void ArrangeAxisGrid()\r\n        {\r\n            if (this.AxisGrid != null)\r\n            {\r\n                this.AxisGrid.ColumnDefinitions.Clear();\r\n                this.AxisGrid.RowDefinitions.Clear();\r\n                this.AxisGrid.Children.Clear();\r\n\r\n                if (this.Orientation == AxisOrientation.Y)\r\n                {\r\n                    this.OrientedPanel.Orientation = System.Windows.Controls.Orientation.Vertical;\r\n                    this.OrientedPanel.IsReversed = true;\r\n\r\n                    if (this.Location == AxisLocation.Left || this.Location == AxisLocation.Right)\r\n                    {\r\n                        this.TitleLayoutTransformControl.Transform = new RotateTransform { Angle = -90.0 };\r\n\r\n                        this.OrientedPanel.IsInverted = !(Location == AxisLocation.Right);\r\n                        this.AxisGrid.ColumnDefinitions.Add(new ColumnDefinition());\r\n                        this.AxisGrid.RowDefinitions.Add(new RowDefinition());\r\n\r\n                        int column = 0;\r\n                        if (this.AxisTitle != null)\r\n                        {\r\n                            this.AxisGrid.ColumnDefinitions.Add(new ColumnDefinition());\r\n                            Grid.SetRow(this.TitleLayoutTransformControl, 0);\r\n                            Grid.SetColumn(this.TitleLayoutTransformControl, 0);\r\n                            column++;\r\n                        }\r\n                        Grid.SetRow(this.OrientedPanel, 0);\r\n                        Grid.SetColumn(this.OrientedPanel, column);\r\n\r\n                        this.AxisGrid.Children.Add(this.TitleLayoutTransformControl);\r\n                        this.AxisGrid.Children.Add(this.OrientedPanel);\r\n\r\n                        if (this.Location == AxisLocation.Right)\r\n                        {\r\n                            AxisGrid.Mirror(System.Windows.Controls.Orientation.Vertical);\r\n                            this.TitleLayoutTransformControl.Transform = new RotateTransform { Angle = 90 };\r\n                        }\r\n                    }\r\n                }\r\n                else if (this.Orientation == AxisOrientation.X)\r\n                {\r\n                    this.OrientedPanel.Orientation = System.Windows.Controls.Orientation.Horizontal;\r\n                    this.OrientedPanel.IsReversed = false;\r\n\r\n                    if (this.Location == AxisLocation.Top || this.Location == AxisLocation.Bottom)\r\n                    {\r\n                        this.OrientedPanel.IsInverted = (Location == AxisLocation.Top);\r\n                        this.TitleLayoutTransformControl.Transform = new RotateTransform { Angle = 0 };\r\n\r\n                        this.AxisGrid.ColumnDefinitions.Add(new ColumnDefinition());\r\n                        this.AxisGrid.RowDefinitions.Add(new RowDefinition());\r\n\r\n                        if (this.AxisTitle != null)\r\n                        {\r\n                            this.AxisGrid.RowDefinitions.Add(new RowDefinition());\r\n                            Grid.SetColumn(this.TitleLayoutTransformControl, 0);\r\n                            Grid.SetRow(this.TitleLayoutTransformControl, 1);\r\n                        }\r\n\r\n                        Grid.SetColumn(this.OrientedPanel, 0);\r\n                        Grid.SetRow(this.OrientedPanel, 0);\r\n\r\n                        this.AxisGrid.Children.Add(this.TitleLayoutTransformControl);\r\n                        this.AxisGrid.Children.Add(this.OrientedPanel);\r\n\r\n                        if (this.Location == AxisLocation.Top)\r\n                        {\r\n                            AxisGrid.Mirror(System.Windows.Controls.Orientation.Horizontal);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                Invalidate();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Renders the axis.\r\n        /// </summary>\r\n        /// <param name=\"availableSize\">The available size.</param>\r\n        /// <returns>The required size.</returns>\r\n        protected override Size MeasureOverride(Size availableSize)\r\n        {\r\n            RenderAxis(availableSize);\r\n            return base.MeasureOverride(availableSize);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Reformulates the grid when the orientation is changed.  Grid is\r\n        /// either separated into two columns or two rows.  The title is \r\n        /// inserted with the outermost section from the edge and an oriented\r\n        /// panel is inserted into the innermost section.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">The old value.</param>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        protected override void OnOrientationPropertyChanged(AxisOrientation oldValue, AxisOrientation newValue)\r\n        {\r\n            ArrangeAxisGrid();\r\n            base.OnOrientationPropertyChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the visual appearance of the axis when it is invalidated.\r\n        /// </summary>\r\n        /// <param name=\"args\">Information for the invalidated event.</param>\r\n        protected override void OnInvalidated(RoutedEventArgs args)\r\n        {\r\n            InvalidateMeasure();\r\n            base.OnInvalidated(args);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Renders the axis if there is a valid value for orientation.\r\n        /// </summary>\r\n        /// <param name=\"availableSize\">The available size in which to render \r\n        /// the axis.</param>\r\n        private void RenderAxis(Size availableSize)\r\n        {\r\n            if (Orientation != AxisOrientation.None && Location != AxisLocation.Auto)\r\n            {\r\n                Render(availableSize);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Renders the axis labels, tick marks, and other visual elements.\r\n        /// </summary>\r\n        /// <param name=\"availableSize\">The available size.</param>\r\n        protected abstract void Render(Size availableSize);\r\n\r\n        /// <summary>\r\n        /// Invalidates the axis.\r\n        /// </summary>\r\n        protected void Invalidate()\r\n        {\r\n            OnInvalidated(new RoutedEventArgs());\r\n        }\r\n\r\n        /// <summary>\r\n        /// The series host.\r\n        /// </summary>\r\n        private ISeriesHost _seriesHost;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the series host.\r\n        /// </summary>\r\n        public ISeriesHost SeriesHost\r\n        {\r\n            get\r\n            {\r\n                return _seriesHost;\r\n            }\r\n            set\r\n            {\r\n                if (value != _seriesHost)\r\n                {\r\n                    ISeriesHost oldValue = _seriesHost;\r\n                    _seriesHost = value;\r\n                    OnSeriesHostPropertyChanged(oldValue, value);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// This method is run when the series host property is changed.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">The old series host.</param>\r\n        /// <param name=\"newValue\">The new series host.</param>\r\n        protected virtual void OnSeriesHostPropertyChanged(ISeriesHost oldValue, ISeriesHost newValue)\r\n        {\r\n            if (oldValue != null && this.GridLines != null)\r\n            {\r\n                oldValue.BackgroundElements.Remove(this.GridLines);\r\n            }\r\n\r\n            if (newValue != null && this.GridLines != null)\r\n            {\r\n                newValue.BackgroundElements.Add(this.GridLines);\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Axis/DisplayAxisGridLines.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Shapes;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// This control draws gridlines with the help of an axis.\r\n    /// </summary>\r\n    [SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\", MessageId = \"GridLine\", Justification = \"This is the expected capitalization.\")]\r\n    [SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\", MessageId = \"DisplayAxisGridLines\", Justification = \"This is the expected capitalization.\")]\r\n    internal abstract class DisplayAxisGridLines : Canvas, IAxisListener\r\n    {\r\n        #region public DisplayAxis Axis\r\n\r\n        /// <summary>\r\n        /// The field that stores the axis that the grid lines are connected to.\r\n        /// </summary>\r\n        private DisplayAxis _axis;\r\n\r\n        /// <summary>\r\n        /// Gets the axis that the grid lines are connected to.\r\n        /// </summary>\r\n        public DisplayAxis Axis\r\n        {\r\n            get { return _axis; }\r\n            private set\r\n            {\r\n                if (_axis != value)\r\n                {\r\n                    DisplayAxis oldValue = _axis;\r\n                    _axis = value;\r\n                    if (oldValue != _axis)\r\n                    {\r\n                        OnAxisPropertyChanged(oldValue, value);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// AxisProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        private void OnAxisPropertyChanged(DisplayAxis oldValue, DisplayAxis newValue)\r\n        {\r\n            Debug.Assert(newValue != null, \"Don't set the axis property to null.\");\r\n\r\n            if (newValue != null)\r\n            {\r\n                newValue.RegisteredListeners.Add(this);\r\n            }\r\n\r\n            if (oldValue != null)\r\n            {\r\n                oldValue.RegisteredListeners.Remove(this);\r\n            }\r\n        }\r\n        #endregion public DisplayAxis Axis\r\n\r\n        /// <summary>\r\n        /// Instantiates a new instance of the DisplayAxisGridLines class.\r\n        /// </summary>\r\n        /// <param name=\"axis\">The axis used by the DisplayAxisGridLines.</param>\r\n        public DisplayAxisGridLines(DisplayAxis axis)\r\n        {\r\n            this.Axis = axis;\r\n            this.SizeChanged += new SizeChangedEventHandler(OnSizeChanged);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Redraws grid lines when the size of the control changes.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source of the event.</param>\r\n        /// <param name=\"e\">Information about the event.</param>\r\n        private void OnSizeChanged(object sender, SizeChangedEventArgs e)\r\n        {\r\n            Invalidate();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Redraws grid lines when the axis is invalidated.\r\n        /// </summary>\r\n        /// <param name=\"axis\">The invalidated axis.</param>\r\n        public void AxisInvalidated(IAxis axis)\r\n        {\r\n            Invalidate();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Draws the grid lines.\r\n        /// </summary>\r\n        protected abstract void Invalidate();\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Axis/IAnchoredToOrigin.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Range axes look for this interface on series to determine whether to\r\n    /// anchor the origin to the bottom or top of the screen where possible.\r\n    /// </summary>\r\n    /// <remarks>\r\n    /// Implementing this interface ensures that value margins will not cause\r\n    /// an origin to float above the bottom or top of the screen if no\r\n    /// data exists below or above.\r\n    /// </remarks>\r\n    public interface IAnchoredToOrigin\r\n    {\r\n        /// <summary>\r\n        /// Gets the axis to which the data is anchored.\r\n        /// </summary>\r\n        IRangeAxis AnchoredAxis { get; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Axis/IAxis.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.ObjectModel;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// An axis interface used to determine the plot area coordinate of values.\r\n    /// </summary>\r\n    public interface IAxis\r\n    {\r\n        /// <summary>\r\n        /// Gets or sets the orientation of the axis.\r\n        /// </summary>\r\n        AxisOrientation Orientation { get; set; }\r\n\r\n        /// <summary>\r\n        /// This event is raised when the Orientation property is changed.\r\n        /// </summary>\r\n        event RoutedPropertyChangedEventHandler<AxisOrientation> OrientationChanged;\r\n \r\n        /// <summary>\r\n        /// Returns a value indicating whether the axis can plot a value.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value to plot.</param>\r\n        /// <returns>A value indicating whether the axis can plot a value.\r\n        /// </returns>\r\n        bool CanPlot(object value);\r\n\r\n        /// <summary>\r\n        /// The plot area coordinate of a value.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value for which to retrieve the plot area\r\n        /// coordinate.</param>\r\n        /// <returns>The plot area coordinate.</returns>\r\n        UnitValue GetPlotAreaCoordinate(object value);\r\n\r\n        /// <summary>\r\n        /// Gets the registered IAxisListeners.\r\n        /// </summary>\r\n        ObservableCollection<IAxisListener> RegisteredListeners { get; }\r\n\r\n        /// <summary>\r\n        /// Gets the collection of child axes.\r\n        /// </summary>\r\n        ObservableCollection<IAxis> DependentAxes { get; }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Axis/IAxisListener.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// An object that listens for changes in an axis.\r\n    /// </summary>\r\n    public interface IAxisListener\r\n    {\r\n        /// <summary>\r\n        /// This method is called when the axis is invalidated.\r\n        /// </summary>\r\n        /// <param name=\"axis\">The axis that has been invalidated.</param>\r\n        void AxisInvalidated(IAxis axis);\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Axis/ICategoryAxis.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// An axis that is arranged by category.\r\n    /// </summary>\r\n    public interface ICategoryAxis : IAxis, IDataConsumer\r\n    {\r\n        /// <summary>\r\n        /// Accepts a category and returns the coordinate range of that category\r\n        /// on the axis.\r\n        /// </summary>\r\n        /// <param name=\"category\">A category for which to retrieve the \r\n        /// coordinate location.</param>\r\n        /// <returns>The coordinate range of the category on the axis.</returns>        \r\n        Range<UnitValue> GetPlotAreaCoordinateRange(object category);\r\n        \r\n        /// <summary>\r\n        /// Returns the category at a given coordinate.\r\n        /// </summary>\r\n        /// <param name=\"position\">The plot are coordinate.</param>\r\n        /// <returns>The category at the given plot area coordinate.</returns>\r\n        object GetCategoryAtPosition(UnitValue position);\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Axis/IDataConsumer.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// An object that consumes data.\r\n    /// </summary>\r\n    public interface IDataConsumer\r\n    {\r\n        /// <summary>\r\n        /// Supplies the consumer with data.\r\n        /// </summary>\r\n        /// <param name=\"dataProvider\">The data provider.</param>\r\n        /// <param name=\"data\">The data used by the consumer.</param>\r\n        void DataChanged(IDataProvider dataProvider, IEnumerable<object> data);\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Axis/IDataProvider.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Provides information to a category axis.\r\n    /// </summary>\r\n    public interface IDataProvider\r\n    {\r\n        /// <summary>\r\n        /// Retrieves the data to be plotted on the axis.\r\n        /// </summary>\r\n        /// <param name=\"axis\">The axis to retrieve the data for.</param>\r\n        /// <returns>The data to plot on the axis.</returns>\r\n        IEnumerable<object> GetData(IDataConsumer axis);\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Axis/IRangeAxis.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Windows;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// An axis with a range.\r\n    /// </summary>\r\n    public interface IRangeAxis : IAxis, IRangeConsumer\r\n    {\r\n        /// <summary>\r\n        /// Gets the range of values displayed on the axis.\r\n        /// </summary>\r\n        Range<IComparable> Range { get; }\r\n\r\n        /// <summary>\r\n        /// The plot area coordinate of a value.\r\n        /// </summary>\r\n        /// <param name=\"position\">The position at which to retrieve the plot \r\n        /// area coordinate.</param>\r\n        /// <returns>The plot area coordinate.</returns>\r\n        IComparable GetValueAtPosition(UnitValue position);\r\n\r\n        /// <summary>\r\n        /// Gets the origin value on the axis.\r\n        /// </summary>\r\n        IComparable Origin { get; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Axis/IRangeConsumer.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// An object that consumes a range.\r\n    /// </summary>\r\n    public interface IRangeConsumer\r\n    {\r\n        /// <summary>\r\n        /// Informs a range consumer that a provider's range has changed.\r\n        /// </summary>\r\n        /// <param name=\"provider\">The range provider.</param>\r\n        /// <param name=\"range\">The range of data.</param>\r\n        void RangeChanged(IRangeProvider provider, Range<IComparable> range);\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Axis/IRangeProvider.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Provides information to a RangeConsumer.\r\n    /// </summary>\r\n    public interface IRangeProvider\r\n    {\r\n        /// <summary>\r\n        /// Returns the range of values.\r\n        /// </summary>\r\n        /// <param name=\"rangeConsumer\">The range consumer requesting the data \r\n        /// range.</param>\r\n        /// <returns>A data range.</returns>\r\n        Range<IComparable> GetRange(IRangeConsumer rangeConsumer);\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Axis/IValueMarginConsumer.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Consumes value margins and uses them to lay out objects.\r\n    /// </summary>\r\n    public interface IValueMarginConsumer\r\n    {\r\n        /// <summary>\r\n        /// Updates layout to accommodate for value margins.\r\n        /// </summary>\r\n        /// <param name=\"provider\">A value margin provider.</param>\r\n        /// <param name=\"valueMargins\">A sequence of value margins.</param>\r\n        void ValueMarginsChanged(IValueMarginProvider provider, IEnumerable<ValueMargin> valueMargins);\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Axis/IValueMarginProvider.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics.CodeAnalysis;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Provides information about margins necessary for values.\r\n    /// </summary>\r\n    public interface IValueMarginProvider\r\n    {\r\n        /// <summary>\r\n        /// Gets the margins required for values.\r\n        /// </summary>\r\n        /// <param name=\"consumer\">The axis to retrieve the value margins \r\n        /// for.</param>\r\n        /// <returns>The margins required for values.</returns>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1024:UsePropertiesWhereAppropriate\", Justification = \"This method does a substantial amount of work.\")]\r\n        IEnumerable<ValueMargin> GetValueMargins(IValueMarginConsumer consumer);\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Axis/LinearAxis.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Shapes;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// An axis that displays numeric values.\r\n    /// </summary>\r\n    [StyleTypedProperty(Property = \"GridLineStyle\", StyleTargetType = typeof(Line))]\r\n    [StyleTypedProperty(Property = \"MajorTickMarkStyle\", StyleTargetType = typeof(Line))]\r\n    [StyleTypedProperty(Property = \"MinorTickMarkStyle\", StyleTargetType = typeof(Line))]\r\n    [StyleTypedProperty(Property = \"AxisLabelStyle\", StyleTargetType = typeof(NumericAxisLabel))]\r\n    [StyleTypedProperty(Property = \"TitleStyle\", StyleTargetType = typeof(Title))]\r\n    [TemplatePart(Name = AxisGridName, Type = typeof(Grid))]\r\n    [TemplatePart(Name = AxisTitleName, Type = typeof(Title))]\r\n    public class LinearAxis : NumericAxis\r\n    {\r\n        #region public double? Interval\r\n        /// <summary>\r\n        /// Gets or sets the axis interval.\r\n        /// </summary>\r\n        [TypeConverter(typeof(NullableConverter<double>))]\r\n        public double? Interval\r\n        {\r\n            get { return (double?)GetValue(IntervalProperty); }\r\n            set { SetValue(IntervalProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Interval dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty IntervalProperty =\r\n            DependencyProperty.Register(\r\n                \"Interval\",\r\n                typeof(double?),\r\n                typeof(LinearAxis),\r\n                new PropertyMetadata(null, OnIntervalPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// IntervalProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">LinearAxis that changed its Interval.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnIntervalPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            LinearAxis source = (LinearAxis)d;\r\n            source.OnIntervalPropertyChanged();\r\n        }\r\n\r\n        /// <summary>\r\n        /// IntervalProperty property changed handler.\r\n        /// </summary>\r\n        private void OnIntervalPropertyChanged()\r\n        {\r\n            OnInvalidated(new RoutedEventArgs());\r\n        }\r\n        #endregion public double? Interval\r\n\r\n        #region public double ActualInterval\r\n        /// <summary>\r\n        /// Gets the actual interval of the axis.\r\n        /// </summary>\r\n        public double ActualInterval\r\n        {\r\n            get { return (double)GetValue(ActualIntervalProperty); }\r\n            private set { SetValue(ActualIntervalProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ActualInterval dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ActualIntervalProperty =\r\n            DependencyProperty.Register(\r\n                \"ActualInterval\",\r\n                typeof(double),\r\n                typeof(LinearAxis),\r\n                new PropertyMetadata(double.NaN));\r\n        #endregion public double ActualInterval\r\n\r\n        /// <summary>\r\n        /// Instantiates a new instance of the LinearAxis class.\r\n        /// </summary>\r\n        public LinearAxis()\r\n        {\r\n            this.ActualRange = new Range<IComparable>(0.0, 1.0);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the actual range of double values.\r\n        /// </summary>\r\n        protected Range<double> ActualDoubleRange { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Updates ActualDoubleRange when ActualRange changes.\r\n        /// </summary>\r\n        /// <param name=\"range\">New ActualRange value.</param>\r\n        protected override void OnActualRangeChanged(Range<IComparable> range)\r\n        {\r\n            ActualDoubleRange = range.ToDoubleRange();\r\n            base.OnActualRangeChanged(range);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the plot area coordinate of a value.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value to plot.</param>\r\n        /// <param name=\"length\">The length of axis.</param>\r\n        /// <returns>The plot area coordinate of a value.</returns>\r\n        protected override UnitValue GetPlotAreaCoordinate(object value, double length)\r\n        {\r\n            return GetPlotAreaCoordinate(value, ActualDoubleRange, length);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the plot area coordinate of a value.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value to plot.</param>\r\n        /// <param name=\"currentRange\">The range of values.</param>\r\n        /// <param name=\"length\">The length of axis.</param>\r\n        /// <returns>The plot area coordinate of a value.</returns>\r\n        protected override UnitValue GetPlotAreaCoordinate(object value, Range<IComparable> currentRange, double length)\r\n        {\r\n            return GetPlotAreaCoordinate(value, currentRange.ToDoubleRange(), length);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the plot area coordinate of a value.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value to plot.</param>\r\n        /// <param name=\"currentRange\">The range of values.</param>\r\n        /// <param name=\"length\">The length of axis.</param>\r\n        /// <returns>The plot area coordinate of a value.</returns>\r\n        private static UnitValue GetPlotAreaCoordinate(object value, Range<double> currentRange, double length)\r\n        {\r\n            if (currentRange.HasData)\r\n            {\r\n                double doubleValue = ValueHelper.ToDouble(value);\r\n\r\n                double pixelLength = Math.Max(length - 1, 0);\r\n                double rangelength = currentRange.Maximum - currentRange.Minimum;\r\n\r\n                return new UnitValue((doubleValue - currentRange.Minimum) * (pixelLength / rangelength), Unit.Pixels);\r\n            }\r\n\r\n            return UnitValue.NaN();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the actual interval to use to determine which values are \r\n        /// displayed in the axis.\r\n        /// </summary>\r\n        /// <param name=\"availableSize\">The available size.</param>\r\n        /// <returns>Actual interval to use to determine which values are \r\n        /// displayed in the axis.\r\n        /// </returns>\r\n        protected virtual double CalculateActualInterval(Size availableSize)\r\n        {\r\n            if (Interval != null)\r\n            {\r\n                return Interval.Value;\r\n            }\r\n\r\n            // Adjust maximum interval count adjusted for current axis\r\n            double adjustedMaximumIntervalsPer200Pixels = (Orientation == AxisOrientation.X ? 0.8 : 1.0) * MaximumAxisIntervalsPer200Pixels;\r\n            // Calculate maximum interval count for current space\r\n            double maximumIntervalCount = Math.Max(GetLength(availableSize) * adjustedMaximumIntervalsPer200Pixels / 200.0, 1.0);\r\n            // Calculate range\r\n            double range = ActualDoubleRange.Maximum - ActualDoubleRange.Minimum;\r\n            // Calculate largest acceptable interval\r\n            double bestInterval = range / maximumIntervalCount;\r\n            // Calculate mimimum ideal interval (ideal => something that gives nice axis values)\r\n            double minimumIdealInterval = Math.Pow(10, Math.Floor(Math.Log10(bestInterval)));\r\n            // Walk the list of ideal multipliers\r\n            foreach (int idealMultiplier in new int[] { 10, 5, 2, 1 })\r\n            {\r\n                // Check the current ideal multiplier against the maximum count\r\n                double currentIdealInterval = minimumIdealInterval * idealMultiplier;\r\n                if (maximumIntervalCount < (range / currentIdealInterval))\r\n                {\r\n                    // Went too far, break out\r\n                    break;\r\n                }\r\n                // Update the best interval\r\n                bestInterval = currentIdealInterval;\r\n            }\r\n            // Return best interval\r\n            return bestInterval;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a sequence of values to create major tick marks for.\r\n        /// </summary>\r\n        /// <param name=\"availableSize\">The available size.</param>\r\n        /// <returns>A sequence of values to create major tick marks for.\r\n        /// </returns>\r\n        protected override IEnumerable<IComparable> GetMajorTickMarkValues(Size availableSize)\r\n        {\r\n            return GetMajorValues(availableSize).CastWrapper<IComparable>();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a sequence of major axis values.\r\n        /// </summary>\r\n        /// <param name=\"availableSize\">The available size.</param>\r\n        /// <returns>A sequence of major axis values.\r\n        /// </returns>\r\n        private IEnumerable<double> GetMajorValues(Size availableSize)\r\n        {\r\n            if (!ActualRange.HasData || ValueHelper.Compare(ActualRange.Minimum, ActualRange.Maximum) == 0 || GetLength(availableSize) == 0.0)\r\n            {\r\n                yield break;\r\n            }\r\n            this.ActualInterval = CalculateActualInterval(availableSize);\r\n            double startValue = AlignToInterval(ActualDoubleRange.Minimum, this.ActualInterval);\r\n            if (startValue < ActualDoubleRange.Minimum)\r\n            {\r\n                startValue = AlignToInterval(ActualDoubleRange.Minimum + this.ActualInterval, this.ActualInterval);\r\n            }\r\n            double nextValue = startValue;\r\n            for (int counter = 1; nextValue <= ActualDoubleRange.Maximum; counter++)\r\n            {\r\n                yield return nextValue;\r\n                nextValue = startValue + (counter * this.ActualInterval);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a sequence of values to plot on the axis.\r\n        /// </summary>\r\n        /// <param name=\"availableSize\">The available size.</param>\r\n        /// <returns>A sequence of values to plot on the axis.</returns>\r\n        protected override IEnumerable<IComparable> GetLabelValues(Size availableSize)\r\n        {\r\n            return GetMajorValues(availableSize).CastWrapper<IComparable>();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Aligns a value to the provided interval value.  The aligned value\r\n        /// should always be smaller than or equal to than the provided value.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value to align to the interval.</param>\r\n        /// <param name=\"interval\">The interval to align to.</param>\r\n        /// <returns>The aligned value.</returns>\r\n        private static double AlignToInterval(double value, double interval)\r\n        {\r\n            double typedInterval = (double)interval;\r\n            double typedValue = (double)value;\r\n            return ValueHelper.RemoveNoiseFromDoubleMath(ValueHelper.RemoveNoiseFromDoubleMath(Math.Floor(typedValue / typedInterval)) * typedInterval);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the value range given a plot area coordinate.\r\n        /// </summary>\r\n        /// <param name=\"value\">The plot area position.</param>\r\n        /// <returns>The value at that plot area coordinate.</returns>\r\n        protected override IComparable GetValueAtPosition(UnitValue value)\r\n        {\r\n            if (ActualRange.HasData && ActualLength != 0.0)\r\n            {\r\n                if (value.Unit == Unit.Pixels)\r\n                {\r\n                    double coordinate = value.Value;\r\n\r\n                    double rangelength = ActualDoubleRange.Maximum - ActualDoubleRange.Minimum;\r\n                    double output = ((coordinate * (rangelength / ActualLength)) + ActualDoubleRange.Minimum);\r\n\r\n                    return output;\r\n                }\r\n                else\r\n                {\r\n                    throw new NotImplementedException();\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Function that uses the mid point of all the data values\r\n        /// in the value margins to convert a length into a range\r\n        /// of data with the mid point as the center of that range.\r\n        /// </summary>\r\n        /// <param name=\"midPoint\">The mid point of the range.</param>\r\n        /// <param name=\"length\">The length of the range.</param>\r\n        /// <returns>The range object.</returns>\r\n        private static Range<double> LengthToRange(double midPoint, double length)\r\n        {\r\n            double halfLength = length / 2.0;\r\n            return new Range<double>(midPoint - halfLength, midPoint + halfLength);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Overrides the actual range to ensure that it is never set to an\r\n        /// empty range.\r\n        /// </summary>\r\n        /// <param name=\"range\">The range to override.</param>\r\n        /// <returns>Returns the overridden range.</returns>\r\n        protected override Range<IComparable> OverrideDataRange(Range<IComparable> range)\r\n        {\r\n            range = base.OverrideDataRange(range);\r\n            if (!range.HasData)\r\n            {\r\n                return new Range<IComparable>(0.0, 1.0);\r\n            }\r\n            else if (ValueHelper.Compare(range.Minimum, range.Maximum) == 0)\r\n            {\r\n                Range<IComparable> outputRange = new Range<IComparable>((ValueHelper.ToDouble(range.Minimum)) - 1, (ValueHelper.ToDouble(range.Maximum)) + 1);\r\n                return outputRange;\r\n            }\r\n\r\n            // ActualLength of 1.0 or less maps all points to the same coordinate\r\n            if (range.HasData && this.ActualLength > 1.0)\r\n            {\r\n                bool isDataAnchoredToOrigin = false;\r\n                IList<ValueMarginCoordinateAndOverlap> valueMargins = new List<ValueMarginCoordinateAndOverlap>();\r\n                foreach (IValueMarginProvider valueMarginProvider in this.RegisteredListeners.OfType<IValueMarginProvider>())\r\n                {\r\n                    foreach (ValueMargin valueMargin in valueMarginProvider.GetValueMargins(this))\r\n                    {\r\n                        IAnchoredToOrigin dataAnchoredToOrigin = valueMarginProvider as IAnchoredToOrigin;\r\n                        isDataAnchoredToOrigin = (dataAnchoredToOrigin != null && dataAnchoredToOrigin.AnchoredAxis == this);\r\n                        \r\n                        valueMargins.Add(\r\n                        new ValueMarginCoordinateAndOverlap\r\n                        {\r\n                            ValueMargin = valueMargin,\r\n                        });\r\n                    }\r\n                }\r\n\r\n                if (valueMargins.Count > 0)\r\n                {\r\n                    double maximumPixelMarginLength =\r\n                        valueMargins\r\n                        .Select(valueMargin => valueMargin.ValueMargin.LowMargin + valueMargin.ValueMargin.HighMargin)\r\n                        .MaxOrNullable().Value;\r\n\r\n                    // Requested margin is larger than the axis so give up\r\n                    // trying to find a range that will fit it.\r\n                    if (maximumPixelMarginLength > this.ActualLength)\r\n                    {\r\n                        return range;\r\n                    }\r\n\r\n                    Range<double> originalRange = range.ToDoubleRange();\r\n                    Range<double> currentRange = range.ToDoubleRange();\r\n\r\n                    // Ensure range is not empty.\r\n                    if (currentRange.Minimum == currentRange.Maximum)\r\n                    {\r\n                        currentRange = new Range<double>(currentRange.Maximum - 1, currentRange.Maximum + 1);\r\n                    }\r\n\r\n                    // priming the loop\r\n                    double actualLength = this.ActualLength;\r\n                    ValueMarginCoordinateAndOverlap maxLeftOverlapValueMargin;\r\n                    ValueMarginCoordinateAndOverlap maxRightOverlapValueMargin;\r\n                    UpdateValueMargins(valueMargins, currentRange.ToComparableRange());\r\n                    GetMaxLeftAndRightOverlap(valueMargins, out maxLeftOverlapValueMargin, out maxRightOverlapValueMargin);\r\n\r\n                    while (maxLeftOverlapValueMargin.LeftOverlap > 0 || maxRightOverlapValueMargin.RightOverlap > 0)\r\n                    {\r\n                        double unitOverPixels = currentRange.GetLength().Value / actualLength;\r\n                        double newMinimum = currentRange.Minimum - ((maxLeftOverlapValueMargin.LeftOverlap + 0.5) * unitOverPixels);\r\n                        double newMaximum = currentRange.Maximum + ((maxRightOverlapValueMargin.RightOverlap + 0.5) * unitOverPixels);\r\n\r\n                        currentRange = new Range<double>(newMinimum, newMaximum);\r\n                        UpdateValueMargins(valueMargins, currentRange.ToComparableRange());\r\n                        GetMaxLeftAndRightOverlap(valueMargins, out maxLeftOverlapValueMargin, out maxRightOverlapValueMargin);\r\n                    }\r\n\r\n                    if (isDataAnchoredToOrigin)\r\n                    {\r\n                        if (originalRange.Minimum >= 0 && currentRange.Minimum < 0)\r\n                        {\r\n                            currentRange = new Range<double>(0, currentRange.Maximum);\r\n                        }\r\n                        else if (originalRange.Maximum <= 0 && currentRange.Maximum > 0)\r\n                        {\r\n                            currentRange = new Range<double>(currentRange.Minimum, 0);\r\n                        }\r\n                    }\r\n\r\n                    return currentRange.ToComparableRange();\r\n                }\r\n            }\r\n            return range;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Axis/LogarithmicAxis.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Shapes;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// An axis that displays numeric values along a logarithmic range.\r\n    /// </summary>\r\n    [StyleTypedProperty(Property = \"GridLineStyle\", StyleTargetType = typeof(Line))]\r\n    [StyleTypedProperty(Property = \"MajorTickMarkStyle\", StyleTargetType = typeof(Line))]\r\n    [StyleTypedProperty(Property = \"MinorTickMarkStyle\", StyleTargetType = typeof(Line))]\r\n    [StyleTypedProperty(Property = \"AxisLabelStyle\", StyleTargetType = typeof(NumericAxisLabel))]\r\n    [StyleTypedProperty(Property = \"TitleStyle\", StyleTargetType = typeof(Title))]\r\n    [TemplatePart(Name = AxisGridName, Type = typeof(Grid))]\r\n    [TemplatePart(Name = AxisTitleName, Type = typeof(Title))]\r\n    public class LogarithmicAxis : NumericAxis\r\n    {\r\n        /// <summary>\r\n        /// Instantiates a new instance of the LogarithmicAxis\r\n        /// </summary>\r\n        public LogarithmicAxis()\r\n        {\r\n            ActualRange = new Range<IComparable>(1.0, 2.0);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the actual range of double values.\r\n        /// </summary>\r\n        protected Range<double> ActualDoubleRange { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Updates ActualDoubleRange when ActualRange changes.\r\n        /// </summary>\r\n        /// <param name=\"range\">New ActualRange value.</param>\r\n        protected override void OnActualRangeChanged(Range<IComparable> range)\r\n        {\r\n            ActualDoubleRange = range.ToDoubleRange();\r\n            base.OnActualRangeChanged(range);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the plot area coordinate of a value.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value to plot.</param>\r\n        /// <param name=\"currentRange\">The range of values.</param>\r\n        /// <param name=\"length\">The length of axis.</param>\r\n        /// <returns>The plot area coordinate of a value.</returns>\r\n        protected override UnitValue GetPlotAreaCoordinate(object value, Range<IComparable> currentRange, double length)\r\n        {\r\n            return GetPlotAreaCoordinate(value, currentRange.ToDoubleRange(), length);\r\n        }\r\n        protected override UnitValue GetPlotAreaCoordinate(object value, double length)\r\n        {\r\n            return GetPlotAreaCoordinate(value, ActualDoubleRange, length);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the plot area coordinate of a value.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value to plot.</param>\r\n        /// <param name=\"range\">The range of values.</param>\r\n        /// <param name=\"length\">The length of the axis.</param>\r\n        /// <returns>The plot area coordinate of the value.</returns>\r\n        protected static UnitValue GetPlotAreaCoordinate(object value, Range<double> range, double length)\r\n        {\r\n            if (value == null)\r\n            {\r\n                throw new ArgumentNullException(\"value\");\r\n            }\r\n\r\n            if (range.HasData)\r\n            {\r\n                double doubleValue = ValueHelper.ToDouble(value);\r\n                Range<double> actualDoubleRange = range;\r\n\r\n                return\r\n                    new UnitValue\r\n                    (\r\n                        length /\r\n                        Math.Log10(actualDoubleRange.Maximum / actualDoubleRange.Minimum) *\r\n                        Math.Log10(doubleValue / actualDoubleRange.Minimum),\r\n                        Unit.Pixels\r\n                    );\r\n            }\r\n\r\n            return new UnitValue();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the value range given a plot area coordinate.\r\n        /// </summary>\r\n        /// <param name=\"value\">The plot area position.</param>\r\n        /// <returns>The value at that plot area coordinate.</returns>\r\n        protected override IComparable GetValueAtPosition(UnitValue value)\r\n        {\r\n            if (ActualRange.HasData && ActualLength != 0.0)\r\n            {\r\n                if (value.Unit == Unit.Pixels)\r\n                {\r\n                    double coordinate = value.Value;\r\n                    Range<double> actualDoubleRange = ActualRange.ToDoubleRange();\r\n\r\n                    double output =\r\n                        Math.Pow\r\n                        (\r\n                            10,\r\n                            coordinate *\r\n                            Math.Log10(actualDoubleRange.Maximum / actualDoubleRange.Minimum) /\r\n                            ActualLength\r\n                        )\r\n                        *\r\n                        actualDoubleRange.Minimum;\r\n\r\n                    return output;\r\n                }\r\n                else\r\n                {\r\n                    throw new NotImplementedException();\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a sequence of values to create major tick marks for.\r\n        /// </summary>\r\n        /// <param name=\"availableSize\">The available size.</param>\r\n        /// <returns>A sequence of values to create major tick marks for.\r\n        /// </returns>\r\n        protected override IEnumerable<IComparable> GetMajorTickMarkValues(Size availableSize)\r\n        {\r\n            return GetMajorValues(availableSize).Cast<IComparable>();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a sequence of values to plot on the axis.\r\n        /// </summary>\r\n        /// <param name=\"availableSize\">The available size.</param>\r\n        /// <returns>A sequence of values to plot on the axis.</returns>\r\n        protected override IEnumerable<IComparable> GetLabelValues(Size availableSize)\r\n        {\r\n            return GetMajorValues(availableSize).Cast<IComparable>();\r\n        }\r\n\r\n        private string _majorValues = \"125;250;500;1000;2000;4000;8000\";\r\n        public string MajorValues\r\n        {\r\n            get { return _majorValues; }\r\n            set { _majorValues = value; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a sequence of major axis values.\r\n        /// </summary>\r\n        /// <param name=\"availableSize\">The available size.</param>\r\n        /// <returns>A sequence of major axis values.\r\n        /// </returns>\r\n        private IEnumerable<double> GetMajorValues(Size availableSize)\r\n        {\r\n            if (!ActualRange.HasData || ValueHelper.Compare(ActualRange.Minimum, ActualRange.Maximum) == 0 || GetLength(availableSize) == 0.0)\r\n            {\r\n                yield break;\r\n            }\r\n\r\n            foreach (var c in MajorValues.Split(new []{';'}))\r\n            {\r\n                yield return double.Parse(c);\r\n            }            \r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Axis/NullableConverter.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Collections.Specialized;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing ResxResources = System.Windows.Controls.DataVisualization.Properties.Resources;\r\nusing System.ComponentModel;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Converts a string or base value to a <see cref=\"Nullable\"/> value.\r\n    /// </summary>\r\n    /// <typeparam name=\"T\">The type should be value type.</typeparam>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public class NullableConverter<T> : TypeConverter where T : struct\r\n    {\r\n        /// <summary>\r\n        /// Returns whether the type converter can convert an object from the \r\n        /// specified type to the type of this converter.\r\n        /// </summary>\r\n        /// <param name=\"context\">An object that provides a format context.\r\n        /// </param>\r\n        /// <param name=\"sourceType\">The type you want to convert from.</param>\r\n        /// <returns>\r\n        /// Returns true if this converter can perform the conversion; \r\n        /// otherwise, false.\r\n        /// </returns>\r\n        public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)\r\n        {\r\n            if (sourceType == typeof(T))\r\n            {\r\n                return true;\r\n            }\r\n            else if (sourceType == typeof(string))\r\n            {\r\n                return true;\r\n            }\r\n            return false;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns whether the type converter can convert an object from the \r\n        /// specified type to the type of this converter.\r\n        /// </summary>\r\n        /// <param name=\"context\">An object that provides a format context.\r\n        /// </param>\r\n        /// <param name=\"destinationType\">The type you want to convert to.\r\n        /// </param>\r\n        /// <returns>\r\n        /// Returns true if this converter can perform the conversion; \r\n        /// otherwise, false.\r\n        /// </returns>\r\n        public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)\r\n        {\r\n            return (destinationType == typeof(T));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Converts from the specified value to the type of this converter.\r\n        /// </summary>\r\n        /// <param name=\"context\">An object that provides a format context.\r\n        /// </param>\r\n        /// <param name=\"culture\">The \r\n        /// <see cref=\"T:System.Globalization.CultureInfo\"/> to use as the \r\n        /// current culture.</param>\r\n        /// <param name=\"value\">The value to convert to the type of this \r\n        /// converter.</param>\r\n        /// <returns>The converted value.</returns>\r\n        /// <exception cref=\"T:System.NotSupportedException\">\r\n        /// The conversion cannot be performed.\r\n        /// </exception>\r\n        public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)\r\n        {\r\n            string stringValue = value as string;\r\n            if (value is T)\r\n            {\r\n                return new Nullable<T>((T)value);\r\n            }\r\n            else if (string.IsNullOrEmpty(stringValue) || String.Equals(stringValue, \"Auto\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                return new Nullable<T>();\r\n            }\r\n            return new Nullable<T>((T)Convert.ChangeType(value, typeof(T), culture));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Converts from the specified value to the a specified type from the\r\n        /// type of this converter.\r\n        /// </summary>\r\n        /// <param name=\"context\">An object that provides a format context.\r\n        /// </param>\r\n        /// <param name=\"culture\">The \r\n        /// <see cref=\"T:System.Globalization.CultureInfo\"/> to use as the \r\n        /// current culture.</param>\r\n        /// <param name=\"value\">The value to convert to the type of this \r\n        /// converter.</param>\r\n        /// <param name=\"destinationType\">The type of convert the value to\r\n        /// .</param>\r\n        /// <returns>The converted value.</returns>\r\n        /// <exception cref=\"T:System.NotSupportedException\">\r\n        /// The conversion cannot be performed.\r\n        /// </exception>\r\n        public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)\r\n        {\r\n            if (value == null)\r\n            {\r\n                return string.Empty;\r\n            }\r\n            else if (destinationType == typeof(string))\r\n            {\r\n                return value.ToString();\r\n            }\r\n            return base.ConvertTo(context, culture, value, destinationType);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Axis/NumericAxis.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Shapes;\r\nusing EF = System.Windows.Controls.DataVisualization.EnumerableFunctions;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// An axis that displays numeric values.\r\n    /// </summary>\r\n    public abstract class NumericAxis : RangeAxis\r\n    {\r\n        #region public double? ActualMaximum\r\n        /// <summary>\r\n        /// Gets the actual maximum value plotted on the chart.\r\n        /// </summary>\r\n        public double? ActualMaximum\r\n        {\r\n            get { return (double?)GetValue(ActualMaximumProperty); }\r\n            private set { SetValue(ActualMaximumProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ActualMaximum dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ActualMaximumProperty =\r\n            DependencyProperty.Register(\r\n                \"ActualMaximum\",\r\n                typeof(double?),\r\n                typeof(NumericAxis),\r\n                null);\r\n\r\n        #endregion public double? ActualMaximum\r\n\r\n        #region public double? ActualMinimum\r\n        /// <summary>\r\n        /// Gets the actual maximum value plotted on the chart.\r\n        /// </summary>\r\n        public double? ActualMinimum\r\n        {\r\n            get { return (double?)GetValue(ActualMinimumProperty); }\r\n            private set { SetValue(ActualMinimumProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ActualMinimum dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ActualMinimumProperty =\r\n            DependencyProperty.Register(\r\n                \"ActualMinimum\",\r\n                typeof(double?),\r\n                typeof(NumericAxis),\r\n                null);\r\n\r\n        #endregion public double? ActualMinimum\r\n\r\n        #region public double? Maximum\r\n        /// <summary>\r\n        /// Gets or sets the maximum value plotted on the axis.\r\n        /// </summary>\r\n        [TypeConverter(typeof(NullableConverter<double>))]\r\n        public double? Maximum\r\n        {\r\n            get { return (double?)GetValue(MaximumProperty); }\r\n            set { SetValue(MaximumProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Maximum dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty MaximumProperty =\r\n            DependencyProperty.Register(\r\n                \"Maximum\",\r\n                typeof(double?),\r\n                typeof(NumericAxis),\r\n                new PropertyMetadata(null, OnMaximumPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// MaximumProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">NumericAxis that changed its Maximum.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnMaximumPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            NumericAxis source = (NumericAxis)d;\r\n            double? newValue = (double?)e.NewValue;\r\n            source.OnMaximumPropertyChanged(newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// MaximumProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        protected virtual void OnMaximumPropertyChanged(double? newValue)\r\n        {\r\n            this.ProtectedMaximum = newValue;\r\n        }\r\n        #endregion public double? Maximum\r\n\r\n        #region public double? Minimum\r\n        /// <summary>\r\n        /// Gets or sets the minimum value to plot on the axis.\r\n        /// </summary>\r\n        [TypeConverter(typeof(NullableConverter<double>))]\r\n        public double? Minimum\r\n        {\r\n            get { return (double?)GetValue(MinimumProperty); }\r\n            set { SetValue(MinimumProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Minimum dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty MinimumProperty =\r\n            DependencyProperty.Register(\r\n                \"Minimum\",\r\n                typeof(double?),\r\n                typeof(NumericAxis),\r\n                new PropertyMetadata(null, OnMinimumPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// MinimumProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">NumericAxis that changed its Minimum.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnMinimumPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            NumericAxis source = (NumericAxis)d;\r\n            double? newValue = (double?)e.NewValue;\r\n            source.OnMinimumPropertyChanged(newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// MinimumProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        protected virtual void OnMinimumPropertyChanged(double? newValue)\r\n        {\r\n            this.ProtectedMinimum = newValue;\r\n        }\r\n        #endregion public double? Minimum\r\n\r\n        #region public bool ExtendRangeToOrigin\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether to always show the origin.\r\n        /// </summary>\r\n        public bool ExtendRangeToOrigin\r\n        {\r\n            get { return (bool)GetValue(ExtendRangeToOriginProperty); }\r\n            set { SetValue(ExtendRangeToOriginProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ExtendRangeToOrigin dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ExtendRangeToOriginProperty =\r\n            DependencyProperty.Register(\r\n                \"ExtendRangeToOrigin\",\r\n                typeof(bool),\r\n                typeof(NumericAxis),\r\n                new PropertyMetadata(false, OnExtendRangeToOriginPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// ExtendRangeToOriginProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">NumericAxis that changed its ExtendRangeToOrigin.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnExtendRangeToOriginPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            NumericAxis source = (NumericAxis)d;\r\n            bool oldValue = (bool)e.OldValue;\r\n            bool newValue = (bool)e.NewValue;\r\n            source.OnExtendRangeToOriginPropertyChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// ExtendRangeToOriginProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        protected virtual void OnExtendRangeToOriginPropertyChanged(bool oldValue, bool newValue)\r\n        {\r\n            this.ActualRange = this.OverrideDataRange(this.ActualRange);\r\n        }\r\n        #endregion public bool ExtendRangeToOrigin\r\n\r\n        /// <summary>\r\n        /// Gets the origin value on the axis.\r\n        /// </summary>\r\n        protected override IComparable Origin\r\n        {\r\n            get { return 0.0; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Instantiates a new instance of the NumericAxis class.\r\n        /// </summary>\r\n        protected NumericAxis()\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the typed actual maximum and minimum properties when the\r\n        /// actual range changes.\r\n        /// </summary>\r\n        /// <param name=\"range\">The actual range.</param>\r\n        protected override void OnActualRangeChanged(Range<IComparable> range)\r\n        {\r\n            if (range.HasData)\r\n            {\r\n                this.ActualMaximum = (double)range.Maximum;\r\n                this.ActualMinimum = (double)range.Minimum;\r\n            }\r\n            else\r\n            {\r\n                this.ActualMaximum = null;\r\n                this.ActualMinimum = null;\r\n            }\r\n\r\n            base.OnActualRangeChanged(range);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a value indicating whether a value can plot.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value to plot.</param>\r\n        /// <returns>A value indicating whether a value can plot.</returns>\r\n        public override bool CanPlot(object value)\r\n        {\r\n            double val;\r\n            return ValueHelper.TryConvert(value, out val);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a numeric axis label.\r\n        /// </summary>\r\n        /// <returns>A numeric axis label.</returns>\r\n        protected override Control CreateAxisLabel()\r\n        {\r\n            return new NumericAxisLabel();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Overrides the data value range and returns a range that takes the\r\n        /// margins of the values into account.\r\n        /// </summary>\r\n        /// <param name=\"range\">The range of data values.</param>\r\n        /// <returns>A range that can store both the data values and their \r\n        /// margins.</returns>\r\n        protected override Range<IComparable> OverrideDataRange(Range<IComparable> range)\r\n        {\r\n            range = base.OverrideDataRange(range);\r\n\r\n            if (ExtendRangeToOrigin)\r\n            {\r\n                Range<double> adjustedRange = range.ToDoubleRange();\r\n\r\n                if (!adjustedRange.HasData)\r\n                {\r\n                    return new Range<IComparable>(0.0, 0.0);\r\n                }\r\n                else\r\n                {\r\n                    double minimum = adjustedRange.Minimum;\r\n                    double maximum = adjustedRange.Maximum;\r\n                    if (minimum > 0.0)\r\n                    {\r\n                        minimum = 0.0;\r\n                    }\r\n                    else if (maximum < 0.0)\r\n                    {\r\n                        maximum = 0.0;\r\n                    }\r\n                    return new Range<IComparable>(minimum, maximum);\r\n                }\r\n            }\r\n            return range;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Axis/NumericAxisLabel.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Windows;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// A label used to display numeric axis values.\r\n    /// </summary>\r\n    public class NumericAxisLabel : AxisLabel\r\n    {\r\n        /// <summary>\r\n        /// Initializes the static members of the NumericAxisLabel class.\r\n        /// </summary>\r\n        static NumericAxisLabel()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(NumericAxisLabel), new FrameworkPropertyMetadata(typeof(NumericAxisLabel)));\r\n        }   \r\n\r\n        /// <summary>\r\n        /// Instantiates a new instance of the NumericAxisLabel class.\r\n        /// </summary>\r\n        public NumericAxisLabel()\r\n        {\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Axis/OrientedAxisGridLines.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Shapes;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// This control draws gridlines with the help of an axis.\r\n    /// </summary>\r\n    [SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\", MessageId = \"GridLine\", Justification = \"This is the expected capitalization.\")]\r\n    [SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\", MessageId = \"GridLines\", Justification = \"This is the expected capitalization.\")]\r\n    internal class OrientedAxisGridLines : DisplayAxisGridLines\r\n    {\r\n        /// <summary>\r\n        /// A pool of grid lines.\r\n        /// </summary>\r\n        private ObjectPool<Line> _gridLinePool;\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the OrientedAxisGridLines class.\r\n        /// </summary>\r\n        /// <param name=\"displayAxis\">The axis to draw grid lines for.</param>\r\n        public OrientedAxisGridLines(DisplayAxis displayAxis)\r\n            : base(displayAxis)\r\n        {\r\n            _gridLinePool = new ObjectPool<Line>(() => new Line { Style = Axis.GridLineStyle });\r\n        }\r\n\r\n        /// <summary>\r\n        /// Draws the grid lines.\r\n        /// </summary>\r\n        protected override void Invalidate()\r\n        {\r\n            _gridLinePool.Reset();\r\n\r\n            try\r\n            {\r\n                IList<UnitValue> intervals = Axis.InternalGetMajorGridLinePositions().ToList();\r\n\r\n                this.Children.Clear();\r\n\r\n                double maximumHeight = Math.Max(Math.Round(ActualHeight - 1), 0);\r\n                double maximumWidth = Math.Max(Math.Round(ActualWidth - 1), 0);\r\n                for (int index = 0; index < intervals.Count; index++)\r\n                {\r\n                    double currentValue = intervals[index].Value;\r\n\r\n                    double position = currentValue;\r\n                    if (!double.IsNaN(position))\r\n                    {\r\n                        Line line = _gridLinePool.Next();\r\n                        if (Axis.Orientation == AxisOrientation.Y)\r\n                        {\r\n                            line.Y1 = line.Y2 = maximumHeight - Math.Round(position - (line.StrokeThickness / 2));\r\n                            line.X1 = 0.0;\r\n                            line.X2 = maximumWidth;\r\n                        }\r\n                        else if (Axis.Orientation == AxisOrientation.X)\r\n                        {\r\n                            line.X1 = line.X2 = Math.Round(position - (line.StrokeThickness / 2));\r\n                            line.Y1 = 0.0;\r\n                            line.Y2 = maximumHeight;\r\n                        }\r\n                        // workaround for '1px line thickness issue'\r\n                        if (line.StrokeThickness % 2 > 0)\r\n                        {\r\n                            line.SetValue(Canvas.LeftProperty, 0.5);\r\n                            line.SetValue(Canvas.TopProperty, 0.5);\r\n                        }\r\n                        this.Children.Add(line);\r\n                    }\r\n                }\r\n            }\r\n            finally\r\n            {\r\n                _gridLinePool.Done();\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Axis/RangeAxis.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Media;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Shapes;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// An axis that has a range.\r\n    /// </summary>\r\n    public abstract class RangeAxis : DisplayAxis, IRangeAxis, IValueMarginConsumer\r\n    {\r\n        /// <summary>\r\n        /// A pool of major tick marks.\r\n        /// </summary>\r\n        private ObjectPool<Line> _majorTickMarkPool;\r\n\r\n        /// <summary>\r\n        /// A pool of major tick marks.\r\n        /// </summary>\r\n        private ObjectPool<Line> _minorTickMarkPool;\r\n\r\n        /// <summary>\r\n        /// A pool of labels.\r\n        /// </summary>\r\n        private ObjectPool<Control> _labelPool;\r\n             \r\n        #region public Style MinorTickMarkStyle\r\n        /// <summary>\r\n        /// Gets or sets the minor tick mark style.\r\n        /// </summary>\r\n        public Style MinorTickMarkStyle\r\n        {\r\n            get { return GetValue(MinorTickMarkStyleProperty) as Style; }\r\n            set { SetValue(MinorTickMarkStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the MinorTickMarkStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty MinorTickMarkStyleProperty =\r\n            DependencyProperty.Register(\r\n                \"MinorTickMarkStyle\",\r\n                typeof(Style),\r\n                typeof(RangeAxis),\r\n                new PropertyMetadata(null));\r\n\r\n        #endregion public Style MinorTickMarkStyle\r\n\r\n        /// <summary>\r\n        /// The actual range of values.\r\n        /// </summary>\r\n        private Range<IComparable> _actualRange;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the actual range of values.\r\n        /// </summary>\r\n        protected Range<IComparable> ActualRange\r\n        {\r\n            get\r\n            {\r\n                return _actualRange;\r\n            }\r\n            set\r\n            {\r\n                Range<IComparable> oldValue = _actualRange;\r\n                Range<IComparable> minMaxEnforcedValue = EnforceMaximumAndMinimum(value);\r\n\r\n                if (!oldValue.Equals(minMaxEnforcedValue))\r\n                {\r\n                    _actualRange = minMaxEnforcedValue;\r\n                    OnActualRangeChanged(minMaxEnforcedValue);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// The maximum value displayed in the range axis.\r\n        /// </summary>\r\n        private IComparable _protectedMaximum;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the maximum value displayed in the range axis.\r\n        /// </summary>\r\n        protected IComparable ProtectedMaximum\r\n        {\r\n            get\r\n            {\r\n                return _protectedMaximum;\r\n            }\r\n            set\r\n            {\r\n                if (value != null && ProtectedMinimum != null && ValueHelper.Compare(ProtectedMinimum, value) > 0)\r\n                {\r\n                    throw new InvalidOperationException(Properties.Resources.RangeAxis_MaximumValueMustBeLargerThanOrEqualToMinimumValue);\r\n                }\r\n                if (!object.ReferenceEquals(_protectedMaximum, value) && !object.Equals(_protectedMaximum, value))\r\n                {\r\n                    _protectedMaximum = value;\r\n                    UpdateActualRange();\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// The minimum value displayed in the range axis.\r\n        /// </summary>\r\n        private IComparable _protectedMinimum;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the minimum value displayed in the range axis.\r\n        /// </summary>\r\n        protected IComparable ProtectedMinimum\r\n        {\r\n            get\r\n            {\r\n                return _protectedMinimum;\r\n            }\r\n            set\r\n            {\r\n                if (value != null && ProtectedMaximum != null && ValueHelper.Compare(value, ProtectedMaximum) > 0)\r\n                {\r\n                    throw new InvalidOperationException(Properties.Resources.RangeAxis_MinimumValueMustBeLargerThanOrEqualToMaximumValue);\r\n                }\r\n                if (!object.ReferenceEquals(_protectedMinimum, value) && !object.Equals(_protectedMinimum, value))\r\n                {\r\n                    _protectedMinimum = value;\r\n                    UpdateActualRange();\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes the static members of the RangeAxis class.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1810:InitializeReferenceTypeStaticFieldsInline\", Justification = \"Dependency properties are initialized in-line.\")]\r\n        static RangeAxis()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(RangeAxis), new FrameworkPropertyMetadata(typeof(RangeAxis)));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Instantiates a new instance of the RangeAxis class.\r\n        /// </summary>\r\n        protected RangeAxis()\r\n        {\r\n            this._labelPool = new ObjectPool<Control>(() => CreateAxisLabel());\r\n            this._majorTickMarkPool = new ObjectPool<Line>(() => CreateMajorTickMark());\r\n            this._minorTickMarkPool = new ObjectPool<Line>(() => CreateMinorTickMark());\r\n\r\n            // Update actual range when size changes for the first time.  This\r\n            // is necessary because the value margins may have changed after\r\n            // the first layout pass.\r\n            SizeChangedEventHandler handler = null;\r\n            handler = delegate\r\n            {\r\n                SizeChanged -= handler;\r\n                UpdateActualRange();\r\n            };\r\n            SizeChanged += handler;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates a minor axis tick mark.\r\n        /// </summary>\r\n        /// <returns>A line to used to render a tick mark.</returns>\r\n        protected Line CreateMinorTickMark()\r\n        {\r\n            return CreateTickMark(MinorTickMarkStyle);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Invalidates axis when the actual range changes.\r\n        /// </summary>\r\n        /// <param name=\"range\">The new actual range.</param>\r\n        protected virtual void OnActualRangeChanged(Range<IComparable> range)\r\n        {\r\n            Invalidate();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the plot area coordinate of a given value.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value to return the plot area coordinate for.</param>\r\n        /// <returns>The plot area coordinate of the given value.</returns>\r\n        public override UnitValue GetPlotAreaCoordinate(object value)\r\n        {\r\n            if (value == null)\r\n            {\r\n                throw new ArgumentNullException(\"value\");\r\n            }\r\n\r\n            return GetPlotAreaCoordinate(value, ActualLength);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the plot area coordinate of a given value.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value to return the plot area coordinate for.</param>\r\n        /// <param name=\"length\">The length of the axis.</param>\r\n        /// <returns>The plot area coordinate of the given value.</returns>\r\n        protected abstract UnitValue GetPlotAreaCoordinate(object value, double length);\r\n\r\n        /// <summary>\r\n        /// Returns the plot area coordinate of a given value.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value to return the plot area coordinate for.</param>\r\n        /// <param name=\"currentRange\">The value range to use when calculating the plot area coordinate.</param>\r\n        /// <param name=\"length\">The length of the axis.</param>\r\n        /// <returns>The plot area coordinate of the given value.</returns>\r\n        protected abstract UnitValue GetPlotAreaCoordinate(object value, Range<IComparable> currentRange, double length);\r\n\r\n        /// <summary>\r\n        /// Overrides the data range.\r\n        /// </summary>\r\n        /// <param name=\"range\">The range to potentially override.</param>\r\n        /// <returns>The overridden range.</returns>\r\n        protected virtual Range<IComparable> OverrideDataRange(Range<IComparable> range)\r\n        {\r\n            return range;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Modifies a range to respect the minimum and maximum axis values.\r\n        /// </summary>\r\n        /// <param name=\"range\">The range of data.</param>\r\n        /// <returns>A range modified to  respect the minimum and maximum axis \r\n        /// values.</returns>\r\n        private Range<IComparable> EnforceMaximumAndMinimum(Range<IComparable> range)\r\n        {\r\n            if (range.HasData)\r\n            {\r\n                IComparable minimum = ProtectedMinimum ?? range.Minimum;\r\n                IComparable maximum = ProtectedMaximum ?? range.Maximum;\r\n\r\n                if (ValueHelper.Compare(minimum, maximum) > 0)\r\n                {\r\n                    IComparable temp = maximum;\r\n                    maximum = minimum;\r\n                    minimum = temp;\r\n                }\r\n\r\n                return new Range<IComparable>(minimum, maximum);\r\n            }\r\n            else\r\n            {\r\n                IComparable minimum = ProtectedMinimum;\r\n                IComparable maximum = ProtectedMaximum;\r\n                if (ProtectedMinimum != null && ProtectedMaximum == null)\r\n                {\r\n                    maximum = minimum;\r\n                }\r\n                else if (ProtectedMaximum != null && ProtectedMinimum == null)\r\n                {\r\n                    minimum = maximum;\r\n                }\r\n                else\r\n                {\r\n                    return range;\r\n                }\r\n                return new Range<IComparable>(minimum, maximum);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the actual range displayed on the axis.\r\n        /// </summary>\r\n        private void UpdateActualRange()\r\n        {\r\n            Action action = () =>\r\n            {\r\n                Range<IComparable> dataRange;\r\n                if (ProtectedMaximum == null || ProtectedMinimum == null)\r\n                {\r\n                    if (Orientation == AxisOrientation.None)\r\n                    {\r\n                        if (ProtectedMinimum != null)\r\n                        {\r\n                            this.ActualRange = OverrideDataRange(new Range<IComparable>(ProtectedMinimum, ProtectedMinimum));\r\n                        }\r\n                        else\r\n                        {\r\n                            this.ActualRange = OverrideDataRange(new Range<IComparable>(ProtectedMaximum, ProtectedMaximum));\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        dataRange =\r\n                            this.RegisteredListeners\r\n                                .OfType<IRangeProvider>()\r\n                                .Select(rangeProvider => rangeProvider.GetRange(this))\r\n                                .Sum();\r\n\r\n                        this.ActualRange = OverrideDataRange(dataRange);\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    this.ActualRange = new Range<IComparable>(ProtectedMinimum, ProtectedMaximum);\r\n                }\r\n            };\r\n\r\n            // Repeat this after layout pass.\r\n            if (this.ActualLength == 0.0)\r\n            {\r\n                this.Dispatcher.BeginInvoke(action);\r\n            }\r\n\r\n            action();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Renders the axis as an oriented axis.\r\n        /// </summary>\r\n        /// <param name=\"availableSize\">The available size.</param>\r\n        private void RenderOriented(Size availableSize)\r\n        {\r\n            _minorTickMarkPool.Reset();\r\n            _majorTickMarkPool.Reset();\r\n            _labelPool.Reset();\r\n\r\n            double length = GetLength(availableSize);\r\n            try\r\n            {\r\n                OrientedPanel.Children.Clear();\r\n                if (ActualRange.HasData && !Object.Equals(ActualRange.Minimum, ActualRange.Maximum))\r\n                {\r\n                    foreach (IComparable axisValue in GetMajorTickMarkValues(availableSize))\r\n                    {\r\n                        UnitValue coordinate = GetPlotAreaCoordinate(axisValue, length);\r\n                        if (ValueHelper.CanGraph(coordinate.Value))\r\n                        {\r\n                            Line line = _majorTickMarkPool.Next();\r\n                            OrientedPanel.SetCenterCoordinate(line, coordinate.Value);\r\n                            OrientedPanel.SetPriority(line, 0);\r\n                            OrientedPanel.Children.Add(line);\r\n                        }\r\n                    }\r\n\r\n                    foreach (IComparable axisValue in GetMinorTickMarkValues(availableSize))\r\n                    {\r\n                        UnitValue coordinate = GetPlotAreaCoordinate(axisValue, length);\r\n                        if (ValueHelper.CanGraph(coordinate.Value))\r\n                        {\r\n                            Line line = _minorTickMarkPool.Next();\r\n                            OrientedPanel.SetCenterCoordinate(line, coordinate.Value);\r\n                            OrientedPanel.SetPriority(line, 0);\r\n                            OrientedPanel.Children.Add(line);\r\n                        }\r\n                    }\r\n\r\n                    int count = 0;\r\n                    foreach (IComparable axisValue in GetLabelValues(availableSize))\r\n                    {\r\n                        UnitValue coordinate = GetPlotAreaCoordinate(axisValue, length);\r\n                        if (ValueHelper.CanGraph(coordinate.Value))\r\n                        {\r\n                            Control axisLabel = _labelPool.Next();\r\n                            PrepareAxisLabel(axisLabel, axisValue);\r\n                            OrientedPanel.SetCenterCoordinate(axisLabel, coordinate.Value);\r\n                            OrientedPanel.SetPriority(axisLabel, count + 1);\r\n                            OrientedPanel.Children.Add(axisLabel);\r\n                            count = (count + 1) % 2;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            finally\r\n            {\r\n                _minorTickMarkPool.Done();\r\n                _majorTickMarkPool.Done();\r\n                _labelPool.Done();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Renders the axis labels, tick marks, and other visual elements.\r\n        /// </summary>\r\n        /// <param name=\"availableSize\">The available size.</param>\r\n        protected override void Render(Size availableSize)\r\n        {\r\n            RenderOriented(availableSize);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a sequence of the major grid line coordinates.\r\n        /// </summary>\r\n        /// <param name=\"availableSize\">The available size.</param>\r\n        /// <returns>A sequence of the major grid line coordinates.</returns>\r\n        protected override IEnumerable<UnitValue> GetMajorGridLineCoordinates(Size availableSize)\r\n        {\r\n            return GetMajorTickMarkValues(availableSize).Select(value => GetPlotAreaCoordinate(value)).Where(value => ValueHelper.CanGraph(value.Value));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a sequence of the values at which to plot major grid lines.\r\n        /// </summary>\r\n        /// <param name=\"availableSize\">The available size.</param>\r\n        /// <returns>A sequence of the values at which to plot major grid lines.\r\n        /// </returns>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\", MessageId = \"GridLine\", Justification = \"This is the expected capitalization.\")]\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1024:UsePropertiesWhereAppropriate\", Justification = \"This method may do a lot of work and is therefore not a suitable candidate for a property.\")]\r\n        protected virtual IEnumerable<IComparable> GetMajorGridLineValues(Size availableSize)\r\n        {\r\n            return GetMajorTickMarkValues(availableSize);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a sequence of values to plot on the axis.\r\n        /// </summary>\r\n        /// <param name=\"availableSize\">The available size.</param>\r\n        /// <returns>A sequence of values to plot on the axis.</returns>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1024:UsePropertiesWhereAppropriate\", Justification = \"This method may do a lot of work and is therefore not a suitable candidate for a property.\")]\r\n        protected abstract IEnumerable<IComparable> GetMajorTickMarkValues(Size availableSize);\r\n\r\n        /// <summary>\r\n        /// Returns a sequence of values to plot on the axis.\r\n        /// </summary>\r\n        /// <param name=\"availableSize\">The available size.</param>\r\n        /// <returns>A sequence of values to plot on the axis.</returns>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1024:UsePropertiesWhereAppropriate\", Justification = \"This method may do a lot of work and is therefore not a suitable candidate for a property.\")]\r\n        protected virtual IEnumerable<IComparable> GetMinorTickMarkValues(Size availableSize)\r\n        {\r\n            yield break;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a sequence of values to plot on the axis.\r\n        /// </summary>\r\n        /// <param name=\"availableSize\">The available size.</param>\r\n        /// <returns>A sequence of values to plot on the axis.</returns>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1024:UsePropertiesWhereAppropriate\", Justification = \"This method may do a lot of work and is therefore not a suitable candidate for a property.\")]\r\n        protected abstract IEnumerable<IComparable> GetLabelValues(Size availableSize);\r\n\r\n        /// <summary>\r\n        /// Returns the value range given a plot area coordinate.\r\n        /// </summary>\r\n        /// <param name=\"value\">The plot area coordinate.</param>\r\n        /// <returns>A range of values at that plot area coordinate.</returns>\r\n        protected abstract IComparable GetValueAtPosition(UnitValue value);\r\n\r\n        /// <summary>\r\n        /// Gets the actual maximum value.\r\n        /// </summary>\r\n        Range<IComparable> IRangeAxis.Range\r\n        {\r\n            get { return ActualRange; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the value range given a plot area coordinate.\r\n        /// </summary>\r\n        /// <param name=\"value\">The plot area coordinate.</param>\r\n        /// <returns>A range of values at that plot area coordinate.</returns>\r\n        IComparable IRangeAxis.GetValueAtPosition(UnitValue value)\r\n        {\r\n            return GetValueAtPosition(value);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the axis with information about a provider's data range.\r\n        /// </summary>\r\n        /// <param name=\"usesRangeAxis\">The information provider.</param>\r\n        /// <param name=\"range\">The range of data in the information provider.\r\n        /// </param>\r\n        void IRangeConsumer.RangeChanged(IRangeProvider usesRangeAxis, Range<IComparable> range)\r\n        {\r\n            UpdateActualRange();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the layout of the axis to accommodate a sequence of value\r\n        /// margins.\r\n        /// </summary>\r\n        /// <param name=\"provider\">A value margin provider.</param>\r\n        /// <param name=\"valueMargins\">A sequence of value margins.</param>\r\n        void IValueMarginConsumer.ValueMarginsChanged(IValueMarginProvider provider, IEnumerable<ValueMargin> valueMargins)\r\n        {\r\n            Action action = () =>\r\n                {\r\n                    if (this.Orientation != AxisOrientation.None)\r\n                    {\r\n                        // Determine if any of the value margins are outside the axis\r\n                        // area.  If so update range.\r\n                        bool updateRange =\r\n                            valueMargins\r\n                                .Select(\r\n                                    valueMargin =>\r\n                                    {\r\n                                        double coordinate = GetPlotAreaCoordinate(valueMargin.Value).Value;\r\n                                        return new Range<double>(coordinate - valueMargin.LowMargin, coordinate + valueMargin.HighMargin);\r\n                                    })\r\n                                .Where(range => range.Minimum < 0 || range.Maximum > this.ActualLength)\r\n                                .Any();\r\n\r\n                        if (updateRange)\r\n                        {\r\n                            UpdateActualRange();\r\n                        }\r\n                    }\r\n                };\r\n            \r\n            // Repeat this after layout pass.\r\n            if (this.ActualLength == 0)\r\n            {\r\n                this.Dispatcher.BeginInvoke(action);\r\n            }\r\n            else\r\n            {\r\n                action();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// If a new range provider is registered, update actual range.\r\n        /// </summary>\r\n        /// <param name=\"series\">The axis listener being registered.</param>\r\n        protected override void OnObjectRegistered(IAxisListener series)\r\n        {\r\n            base.OnObjectRegistered(series);\r\n            if (series is IRangeProvider || series is IValueMarginProvider)\r\n            {\r\n                UpdateActualRange();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// If a range provider is unregistered, update actual range.\r\n        /// </summary>\r\n        /// <param name=\"series\">The axis listener being unregistered.</param>\r\n        protected override void OnObjectUnregistered(IAxisListener series)\r\n        {\r\n            base.OnObjectUnregistered(series);\r\n            if (series is IRangeProvider || series is IValueMarginProvider)\r\n            {\r\n                UpdateActualRange();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Create function that when given a range will return the \r\n        /// amount in pixels by which the value margin range \r\n        /// overlaps.  Positive numbers represent values outside the\r\n        /// range.\r\n        /// </summary>\r\n        /// <param name=\"valueMargins\">The list of value margins, coordinates, and overlaps.</param>\r\n        /// <param name=\"comparableRange\">The new range to use to calculate coordinates.</param>\r\n        internal void UpdateValueMargins(IList<ValueMarginCoordinateAndOverlap> valueMargins, Range<IComparable> comparableRange)\r\n        {\r\n            double actualLength = this.ActualLength;\r\n            int valueMarginsCount = valueMargins.Count;\r\n            for (int count = 0; count < valueMarginsCount; count++)\r\n            {\r\n                ValueMarginCoordinateAndOverlap item = valueMargins[count];\r\n                item.Coordinate = GetPlotAreaCoordinate(item.ValueMargin.Value, comparableRange, actualLength).Value;\r\n                item.LeftOverlap = -(item.Coordinate - item.ValueMargin.LowMargin);\r\n                item.RightOverlap = (item.Coordinate + item.ValueMargin.HighMargin) - actualLength;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the value margin, coordinate, and overlap triples that have the largest left and right overlap.\r\n        /// </summary>\r\n        /// <param name=\"valueMargins\">The list of value margin, coordinate, and \r\n        /// overlap triples.</param>\r\n        /// <param name=\"maxLeftOverlapValueMargin\">The value margin, \r\n        /// coordinate, and overlap triple that has the largest left overlap.\r\n        /// </param>\r\n        /// <param name=\"maxRightOverlapValueMargin\">The value margin, \r\n        /// coordinate, and overlap triple that has the largest right overlap.\r\n        /// </param>\r\n        internal static void GetMaxLeftAndRightOverlap(IList<ValueMarginCoordinateAndOverlap> valueMargins, out ValueMarginCoordinateAndOverlap maxLeftOverlapValueMargin, out ValueMarginCoordinateAndOverlap maxRightOverlapValueMargin)\r\n        {\r\n            maxLeftOverlapValueMargin = new ValueMarginCoordinateAndOverlap();\r\n            maxRightOverlapValueMargin = new ValueMarginCoordinateAndOverlap();\r\n            double maxLeftOverlap = double.MinValue;\r\n            double maxRightOverlap = double.MinValue;\r\n            int valueMarginsCount = valueMargins.Count;\r\n            for (int cnt = 0; cnt < valueMarginsCount; cnt++)\r\n            {\r\n                ValueMarginCoordinateAndOverlap valueMargin = valueMargins[cnt];\r\n                double leftOverlap = valueMargin.LeftOverlap;\r\n                if (leftOverlap > maxLeftOverlap)\r\n                {\r\n                    maxLeftOverlap = leftOverlap;\r\n                    maxLeftOverlapValueMargin = valueMargin;\r\n                }\r\n                double rightOverlap = valueMargin.RightOverlap;\r\n                if (rightOverlap > maxRightOverlap)\r\n                {\r\n                    maxRightOverlap = rightOverlap;\r\n                    maxRightOverlapValueMargin = valueMargin;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the origin value on the axis.\r\n        /// </summary>\r\n        IComparable IRangeAxis.Origin { get { return this.Origin; } }\r\n\r\n        /// <summary>\r\n        /// Gets the origin value on the axis.\r\n        /// </summary>\r\n        protected abstract IComparable Origin { get; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Axis/ValueMargin.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// A margin specified for a given value.\r\n    /// </summary>\r\n    public struct ValueMargin\r\n    {\r\n        /// <summary>\r\n        /// Gets the value that the margin is associated with.\r\n        /// </summary>\r\n        public object Value { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Gets the low margin for a value.\r\n        /// </summary>\r\n        public double LowMargin { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Gets the high margin for a value.\r\n        /// </summary>\r\n        public double HighMargin { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the ValueMargin class.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value the margin is associated with.</param>\r\n        /// <param name=\"lowMargin\">The lower margin.</param>\r\n        /// <param name=\"highMargin\">The higher margin.</param> \r\n        public ValueMargin(object value, double lowMargin, double highMargin) : this()\r\n        {\r\n            Value = value;\r\n            LowMargin = lowMargin;\r\n            HighMargin = highMargin;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Determines whether two value margins are equal.\r\n        /// </summary>\r\n        /// <param name=\"obj\">The value margin to compare with this one.</param>\r\n        /// <returns>A value indicating whether the two value margins are equal.\r\n        /// </returns>\r\n        public override bool Equals(object obj)\r\n        {\r\n            if (obj is ValueMargin)\r\n            {\r\n                ValueMargin valueMargin = (ValueMargin)obj;\r\n                return this.Value.Equals(valueMargin.Value) && this.LowMargin.Equals(valueMargin.LowMargin) && this.HighMargin.Equals(valueMargin.HighMargin);\r\n            }\r\n            return false;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Determines whether two unit value objects are equal.\r\n        /// </summary>\r\n        /// <param name=\"left\">The left value margin.</param>\r\n        /// <param name=\"right\">The right value margin.</param>\r\n        /// <returns>A value indicating  whether two value margins objects are \r\n        /// equal.</returns>\r\n        public static bool operator ==(ValueMargin left, ValueMargin right)\r\n        {\r\n            return left.Equals(right);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Determines whether two value margin objects are not equal.\r\n        /// </summary>\r\n        /// <param name=\"left\">The left value margin.</param>\r\n        /// <param name=\"right\">The right value margin.</param>\r\n        /// <returns>A value indicating whether two value margin objects are not\r\n        /// equal.</returns>\r\n        public static bool operator !=(ValueMargin left, ValueMargin right)\r\n        {\r\n            return !left.Equals(right);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the hash code of the value margin object.\r\n        /// </summary>\r\n        /// <returns>The hash code.</returns>\r\n        public override int GetHashCode()\r\n        {\r\n            return this.Value.GetHashCode() ^ this.LowMargin.GetHashCode() ^ this.HighMargin.GetHashCode();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Chart/Chart.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Collections.Specialized;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\nusing System.Runtime.InteropServices;\r\nusing System.Windows.Controls.DataVisualization.Charting.Primitives;\r\nusing System.Windows.Input;\r\nusing System.Windows.Markup;\r\nusing System.Windows.Media;\r\nusing System.Windows.Shapes;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Represents a control that displays a Chart.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    [TemplatePart(Name = Chart.ChartAreaName, Type = typeof(EdgePanel))]\r\n    [TemplatePart(Name = Chart.LegendName, Type = typeof(Legend))]\r\n    [TemplatePart(Name = Chart.SelectionAreaName, Type = typeof(Canvas))]\r\n    [TemplatePart(Name = Chart.PlotAreaName, Type = typeof(Grid))]\r\n    [StyleTypedProperty(Property = \"TitleStyle\", StyleTargetType = typeof(Title))]\r\n    [StyleTypedProperty(Property = \"LegendStyle\", StyleTargetType = typeof(Legend))]\r\n    [StyleTypedProperty(Property = \"ChartAreaStyle\", StyleTargetType = typeof(EdgePanel))]\r\n    [StyleTypedProperty(Property = \"PlotAreaStyle\", StyleTargetType = typeof(Grid))]\r\n    [ContentProperty(\"Series\")]\r\n    public partial class Chart : Control, ISeriesHost\r\n    {\r\n        /// <summary>\r\n        /// Specifies the name of the ChartArea TemplatePart.\r\n        /// </summary>\r\n        private const string ChartAreaName = \"ChartArea\";\r\n\r\n        /// <summary>\r\n        /// Specifies the name of the ChartArea TemplatePart.\r\n        /// </summary>\r\n        private const string SelectionAreaName = \"SelectionArea\";\r\n\r\n        private const string PlotAreaName = \"PlotArea\";\r\n\r\n        /// <summary>\r\n        /// Specifies the name of the legend TemplatePart.\r\n        /// </summary>\r\n        private const string LegendName = \"Legend\";\r\n\r\n        /// <summary>\r\n        /// Specifies the name of the legend TemplatePart.\r\n        /// </summary>\r\n        private const string CrosshairContainerName = \"PART_CrosshairContainer\";\r\n        \r\n\r\n        /// <summary>\r\n        /// Gets or sets the chart area children collection.\r\n        /// </summary>\r\n        private AggregatedObservableCollection<UIElement> ChartAreaChildren { get; set; }\r\n\r\n        /// <summary>\r\n        /// An adapter that synchronizes changes to the ChartAreaChildren\r\n        /// property to the ChartArea panel's children collection.\r\n        /// </summary>\r\n        private ObservableCollectionListAdapter<UIElement> _chartAreaChildrenListAdapter = new ObservableCollectionListAdapter<UIElement>();\r\n\r\n        /// <summary>\r\n        /// Gets or sets a collection of Axes in the Chart.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA2227:CollectionPropertiesShouldBeReadOnly\", Justification = \"Setter is public to work around a limitation with the XAML editing tools.\")]\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA1801:ReviewUnusedParameters\", MessageId = \"value\", Justification = \"Setter is public to work around a limitation with the XAML editing tools.\")]\r\n        public Collection<IAxis> Axes\r\n        {\r\n            get\r\n            {\r\n                return _axes;\r\n            }\r\n            set\r\n            {\r\n                throw new NotSupportedException(Properties.Resources.Chart_Axes_SetterNotSupported);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Stores the collection of Axes in the Chart.\r\n        /// </summary>\r\n        private Collection<IAxis> _axes;\r\n\r\n        /// <summary>\r\n        /// The collection of foreground elements.\r\n        /// </summary>\r\n        private ObservableCollection<UIElement> _foregroundElements = new NoResetObservableCollection<UIElement>();\r\n\r\n        /// <summary>\r\n        /// The collection of background elements.\r\n        /// </summary>\r\n        private ObservableCollection<UIElement> _backgroundElements = new NoResetObservableCollection<UIElement>();\r\n\r\n        /// <summary>\r\n        /// Gets the collection of foreground elements.\r\n        /// </summary>\r\n        ObservableCollection<UIElement> ISeriesHost.ForegroundElements { get { return ForegroundElements; } }\r\n\r\n        /// <summary>\r\n        /// Gets the collection of foreground elements.\r\n        /// </summary>\r\n        protected ObservableCollection<UIElement> ForegroundElements { get { return _foregroundElements; } }\r\n\r\n        /// <summary>\r\n        /// Gets the collection of background elements.\r\n        /// </summary>\r\n        ObservableCollection<UIElement> ISeriesHost.BackgroundElements { get { return BackgroundElements; } }\r\n\r\n        /// <summary>\r\n        /// Gets the collection of background elements.\r\n        /// </summary>\r\n        protected ObservableCollection<UIElement> BackgroundElements { get { return _backgroundElements; } }\r\n\r\n        /// <summary>\r\n        /// Axes arranged along the edges.\r\n        /// </summary>\r\n        private ObservableCollection<Axis> _edgeAxes = new NoResetObservableCollection<Axis>();\r\n\r\n        /// <summary>\r\n        /// Gets or sets the axes that are currently in the chart.\r\n        /// </summary>\r\n        private IList<IAxis> InternalActualAxes { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets the actual axes displayed in the chart.\r\n        /// </summary>\r\n        public ReadOnlyCollection<IAxis> ActualAxes { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the reference to the template's ChartArea.\r\n        /// </summary>\r\n        private EdgePanel ChartArea { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the reference to the Chart's Legend.\r\n        /// </summary>\r\n        private Legend Legend { get; set; }\r\n\r\n        private Canvas SelectionArea { get; set; }\r\n\r\n        private Grid PlotArea { get; set; }\r\n\r\n        private Grid CrosshairContainer { get; set; }\r\n        private Grid Crosshair { get; set; }\r\n        private Border LocationIndicator { get; set; }\r\n        \r\n\r\n        /// <summary>\r\n        /// Gets or sets the collection of Series displayed by the Chart.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA2227:CollectionPropertiesShouldBeReadOnly\", Justification = \"Setter is public to work around a limitation with the XAML editing tools.\")]\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA1801:ReviewUnusedParameters\", MessageId = \"value\", Justification = \"Setter is public to work around a limitation with the XAML editing tools.\")]\r\n        public Collection<ISeries> Series\r\n        {\r\n            get\r\n            {\r\n                return _series;\r\n            }\r\n            set\r\n            {\r\n                throw new NotSupportedException(Properties.Resources.Chart_Series_SetterNotSupported);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Stores the collection of Series displayed by the Chart.\r\n        /// </summary>\r\n        private Collection<ISeries> _series;\r\n\r\n        #region ItemsSource\r\n\r\n        /// <summary>\r\n        /// List of CLR-objects which represent series of the chart\r\n        /// </summary>\r\n        public IEnumerable ItemsSource\r\n        {\r\n            get { return (IEnumerable)GetValue(ItemsSourceProperty); }\r\n            set { SetValue(ItemsSourceProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty ItemsSourceProperty =\r\n            DependencyProperty.Register(\"ItemsSource\", typeof(IEnumerable), typeof(Chart), new PropertyMetadata(null, (s, e) => ((Chart)s).InitSeries()));\r\n\r\n        /// <summary>\r\n        /// Template for an item, transforms a CLR-object to an ISeries object\r\n        /// </summary>\r\n        public DataTemplate ItemTemplate\r\n        {\r\n            get { return (DataTemplate)GetValue(ItemTemplateProperty); }\r\n            set { SetValue(ItemTemplateProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty ItemTemplateProperty =\r\n            DependencyProperty.Register(\"ItemTemplate\", typeof(DataTemplate), typeof(Chart), new PropertyMetadata(null, (s, e) => ((Chart)s).InitSeries()));\r\n\r\n        /// <summary>\r\n        /// This property is necessary for stacked charts\r\n        /// </summary>\r\n        public DataTemplate ItemsHostTemplate\r\n        {\r\n            get { return (DataTemplate)GetValue(ItemsHostTemplateProperty); }\r\n            set { SetValue(ItemsHostTemplateProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty ItemsHostTemplateProperty =\r\n            DependencyProperty.Register(\"ItemsHostTemplate\", typeof(DataTemplate), typeof(Chart), new PropertyMetadata(null, (s, e) => ((Chart)s).InitSeries()));\r\n\r\n        private void InitSeries()\r\n        {\r\n            this.Series.Clear();\r\n            if (this.ItemsSource == null || this.ItemTemplate == null)\r\n                return;\r\n\r\n            //From items to series\r\n            var series = from item in this.ItemsSource.OfType<object>()\r\n                         let seriesItem = this.ItemTemplate.LoadContent() as ISeries\r\n                         where seriesItem != null && seriesItem is FrameworkElement\r\n                         let dummy = ((FrameworkElement)seriesItem).DataContext = item\r\n                         select seriesItem;\r\n\r\n            //Generic series and stacked series are different, that's why I use this if-else\r\n            var hostSeries = this.ItemsHostTemplate != null ? this.ItemsHostTemplate.LoadContent() as DefinitionSeries : null;\r\n            if (hostSeries != null)\r\n            {\r\n                this.Series.Add(hostSeries);\r\n                series.OfType<SeriesDefinition>().ToList().ForEach(hostSeries.SeriesDefinitions.Add);\r\n            }\r\n            else series.ToList().ForEach(this.Series.Add);\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region public Style ChartAreaStyle\r\n        /// <summary>\r\n        /// Gets or sets the Style of the ISeriesHost's ChartArea.\r\n        /// </summary>\r\n        public Style ChartAreaStyle\r\n        {\r\n            get { return GetValue(ChartAreaStyleProperty) as Style; }\r\n            set { SetValue(ChartAreaStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ChartAreaStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ChartAreaStyleProperty =\r\n            DependencyProperty.Register(\r\n                \"ChartAreaStyle\",\r\n                typeof(Style),\r\n                typeof(Chart),\r\n                null);\r\n        #endregion public Style ChartAreaStyle\r\n\r\n        /// <summary>\r\n        /// Gets the collection of legend items.\r\n        /// </summary>\r\n        public Collection<object> LegendItems { get; private set; }\r\n\r\n        #region public Style LegendStyle\r\n        /// <summary>\r\n        /// Gets or sets the Style of the ISeriesHost's Legend.\r\n        /// </summary>\r\n        public Style LegendStyle\r\n        {\r\n            get { return GetValue(LegendStyleProperty) as Style; }\r\n            set { SetValue(LegendStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the LegendStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty LegendStyleProperty =\r\n            DependencyProperty.Register(\r\n                \"LegendStyle\",\r\n                typeof(Style),\r\n                typeof(Chart),\r\n                null);\r\n        #endregion public Style LegendStyle\r\n\r\n        #region public object LegendTitle\r\n        /// <summary>\r\n        /// Gets or sets the Title content of the Legend.\r\n        /// </summary>\r\n        public object LegendTitle\r\n        {\r\n            get { return GetValue(LegendTitleProperty); }\r\n            set { SetValue(LegendTitleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the LegendTitle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty LegendTitleProperty =\r\n            DependencyProperty.Register(\r\n                \"LegendTitle\",\r\n                typeof(object),\r\n                typeof(Chart),\r\n                null);\r\n        #endregion public object LegendTitle\r\n\r\n        #region public Style PlotAreaStyle\r\n        /// <summary>\r\n        /// Gets or sets the Style of the ISeriesHost's PlotArea.\r\n        /// </summary>\r\n        public Style PlotAreaStyle\r\n        {\r\n            get { return GetValue(PlotAreaStyleProperty) as Style; }\r\n            set { SetValue(PlotAreaStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the PlotAreaStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty PlotAreaStyleProperty =\r\n            DependencyProperty.Register(\r\n                \"PlotAreaStyle\",\r\n                typeof(Style),\r\n                typeof(Chart),\r\n                null);\r\n        #endregion public Style PlotAreaStyle\r\n\r\n        #region public Collection<ResourceDictionary> Palette\r\n        /// <summary>\r\n        /// Gets or sets a palette of ResourceDictionaries used by the children of the Chart.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA2227:CollectionPropertiesShouldBeReadOnly\", Justification = \"Want to allow this to be set from XAML.\")]\r\n        public Collection<ResourceDictionary> Palette\r\n        {\r\n            get { return GetValue(PaletteProperty) as Collection<ResourceDictionary>; }\r\n            set { SetValue(PaletteProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Palette dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty PaletteProperty =\r\n            DependencyProperty.Register(\r\n                \"Palette\",\r\n                typeof(Collection<ResourceDictionary>),\r\n                typeof(Chart),\r\n                new PropertyMetadata(OnPalettePropertyChanged));\r\n\r\n        /// <summary>\r\n        /// Called when the value of the Palette property is changed.\r\n        /// </summary>\r\n        /// <param name=\"d\">Chart that contains the changed Palette.\r\n        /// </param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnPalettePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            Chart source = (Chart) d;\r\n            Collection<ResourceDictionary> newValue = (Collection<ResourceDictionary>)e.NewValue;\r\n            source.OnPalettePropertyChanged(newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the value of the Palette property is changed.\r\n        /// </summary>\r\n        /// <param name=\"newValue\">The new value for the Palette.</param>\r\n        private void OnPalettePropertyChanged(Collection<ResourceDictionary> newValue)\r\n        {\r\n            ResourceDictionaryDispenser.ResourceDictionaries = newValue;\r\n        }\r\n        #endregion public Collection<ResourceDictionary> Palette\r\n\r\n        public Visibility CrosshairVisibility\r\n        {\r\n            get { return (Visibility)GetValue(CrosshairVisibilityProperty); }\r\n            set { SetValue(CrosshairVisibilityProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty CrosshairVisibilityProperty =\r\n            DependencyProperty.Register(\"CrosshairVisibility\", typeof(Visibility), typeof(Chart), new PropertyMetadata(Visibility.Collapsed));\r\n\r\n        \r\n        /// <summary>\r\n        /// Gets or sets an object that rotates through the palette.\r\n        /// </summary>\r\n        private ResourceDictionaryDispenser ResourceDictionaryDispenser { get; set; }\r\n\r\n        /// <summary>\r\n        /// Event that is invoked when the ResourceDictionaryDispenser's collection has changed.\r\n        /// </summary>\r\n        public event EventHandler ResourceDictionariesChanged;\r\n\r\n        #region public object Title\r\n        /// <summary>\r\n        /// Gets or sets the title displayed for the Chart.\r\n        /// </summary>\r\n        public object Title\r\n        {\r\n            get { return GetValue(TitleProperty); }\r\n            set { SetValue(TitleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Title dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty TitleProperty =\r\n            DependencyProperty.Register(\r\n                \"Title\",\r\n                typeof(object),\r\n                typeof(Chart),\r\n                null);\r\n        #endregion\r\n\r\n        #region public Style TitleStyle\r\n        /// <summary>\r\n        /// Gets or sets the Style of the ISeriesHost's Title.\r\n        /// </summary>\r\n        public Style TitleStyle\r\n        {\r\n            get { return GetValue(TitleStyleProperty) as Style; }\r\n            set { SetValue(TitleStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the TitleStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty TitleStyleProperty =\r\n            DependencyProperty.Register(\r\n                \"TitleStyle\",\r\n                typeof(Style),\r\n                typeof(Chart),\r\n                null);\r\n        #endregion public Style TitleStyle\r\n\r\n        /// <summary>\r\n        /// Initializes the static members of the Chart class.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1810:InitializeReferenceTypeStaticFieldsInline\", Justification = \"Dependency properties are initialized in-line.\")]\r\n        static Chart()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(Chart), new FrameworkPropertyMetadata(typeof(Chart)));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the Chart class.\r\n        /// </summary>\r\n        public Chart()\r\n        {\r\n            // Create the backing collection for Series\r\n            UniqueObservableCollection<ISeries> series = new UniqueObservableCollection<ISeries>();\r\n            series.CollectionChanged += new NotifyCollectionChangedEventHandler(SeriesCollectionChanged);\r\n            _series = series;\r\n\r\n            // Create the backing collection for Axes\r\n            UniqueObservableCollection<IAxis> axes = new UniqueObservableCollection<IAxis>();\r\n            _axes = axes;\r\n\r\n            ObservableCollection<IAxis> actualAxes = new SeriesHostAxesCollection(this, axes);\r\n            actualAxes.CollectionChanged += ActualAxesCollectionChanged;\r\n            this.InternalActualAxes = actualAxes;\r\n            this.ActualAxes = new ReadOnlyCollection<IAxis>(InternalActualAxes);\r\n\r\n            // Create collection for LegendItems\r\n            LegendItems = new AggregatedObservableCollection<object>();\r\n\r\n            ChartAreaChildren = new AggregatedObservableCollection<UIElement>();\r\n            ChartAreaChildren.ChildCollections.Add(_edgeAxes);\r\n            ChartAreaChildren.ChildCollections.Add(_backgroundElements);\r\n            ChartAreaChildren.ChildCollections.Add(Series);\r\n            ChartAreaChildren.ChildCollections.Add(_foregroundElements);\r\n\r\n            _chartAreaChildrenListAdapter.Collection = ChartAreaChildren;\r\n\r\n            // Create a dispenser\r\n            ResourceDictionaryDispenser = new ResourceDictionaryDispenser();\r\n            ResourceDictionaryDispenser.ResourceDictionariesChanged += delegate\r\n            {\r\n                OnResourceDictionariesChanged(EventArgs.Empty);\r\n            };\r\n        }\r\n\r\n        /// <summary>\r\n        /// Invokes the ResourceDictionariesChanged event.\r\n        /// </summary>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private void OnResourceDictionariesChanged(EventArgs e)\r\n        {\r\n            // Forward event on to listeners\r\n            EventHandler handler = ResourceDictionariesChanged;\r\n            if (null != handler)\r\n            {\r\n                handler.Invoke(this, e);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Determines the location of an axis based on the existing axes in\r\n        /// the chart.\r\n        /// </summary>\r\n        /// <param name=\"axis\">The axis to determine the location of.</param>\r\n        /// <returns>The location of the axis.</returns>\r\n        private AxisLocation GetAutoAxisLocation(Axis axis)\r\n        {\r\n            if (axis.Orientation == AxisOrientation.X)\r\n            {\r\n                int numberOfTopAxes = InternalActualAxes.OfType<Axis>().Where(currentAxis => currentAxis.Location == AxisLocation.Top).Count();\r\n                int numberOfBottomAxes = InternalActualAxes.OfType<Axis>().Where(currentAxis => currentAxis.Location == AxisLocation.Bottom).Count();\r\n                return (numberOfBottomAxes > numberOfTopAxes) ? AxisLocation.Top : AxisLocation.Bottom;\r\n            }\r\n            else if (axis.Orientation == AxisOrientation.Y)\r\n            {\r\n                int numberOfLeftAxes = InternalActualAxes.OfType<Axis>().Where(currentAxis => currentAxis.Location == AxisLocation.Left).Count();\r\n                int numberOfRightAxes = InternalActualAxes.OfType<Axis>().Where(currentAxis => currentAxis.Location == AxisLocation.Right).Count();\r\n                return (numberOfLeftAxes > numberOfRightAxes) ? AxisLocation.Right : AxisLocation.Left;\r\n            }\r\n            else\r\n            {\r\n                return AxisLocation.Auto;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Adds an axis to the ISeriesHost area.\r\n        /// </summary>\r\n        /// <param name=\"axis\">The axis to add to the ISeriesHost area.</param>\r\n        private void AddAxisToChartArea(Axis axis)\r\n        {\r\n            IRequireSeriesHost requiresSeriesHost = axis as IRequireSeriesHost;\r\n            if (requiresSeriesHost != null)\r\n            {\r\n                requiresSeriesHost.SeriesHost = this;\r\n            }\r\n\r\n            if (axis.Location == AxisLocation.Auto)\r\n            {\r\n                axis.Location = GetAutoAxisLocation(axis);\r\n            }\r\n\r\n            SetEdge(axis);\r\n\r\n            axis.LocationChanged += AxisLocationChanged;\r\n            axis.OrientationChanged += AxisOrientationChanged;\r\n\r\n            if (axis.Location != AxisLocation.Auto)\r\n            {\r\n                _edgeAxes.Add(axis);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Rebuilds the chart area if an axis orientation is changed.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source of the event.</param>\r\n        /// <param name=\"args\">Information about the event.</param>\r\n        private void AxisOrientationChanged(object sender, RoutedPropertyChangedEventArgs<AxisOrientation> args)\r\n        {\r\n            Axis axis = (Axis)sender;\r\n\r\n            axis.Location = GetAutoAxisLocation(axis);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Sets the Edge property of an axis based on its location and\r\n        /// orientation.\r\n        /// </summary>\r\n        /// <param name=\"axis\">The axis to set the edge property of.</param>\r\n        private static void SetEdge(Axis axis)\r\n        {\r\n            switch (axis.Location)\r\n            {\r\n                case AxisLocation.Bottom:\r\n                    EdgePanel.SetEdge(axis, Edge.Bottom);\r\n                    break;\r\n                case AxisLocation.Top:\r\n                    EdgePanel.SetEdge(axis, Edge.Top);\r\n                    break;\r\n                case AxisLocation.Left:\r\n                    EdgePanel.SetEdge(axis, Edge.Left);\r\n                    break;\r\n                case AxisLocation.Right:\r\n                    EdgePanel.SetEdge(axis, Edge.Right);\r\n                    break;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Rebuild the chart area if an axis location is changed.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source of the event.</param>\r\n        /// <param name=\"args\">Information about the event.</param>\r\n        private void AxisLocationChanged(object sender, RoutedPropertyChangedEventArgs<AxisLocation> args)\r\n        {\r\n            Axis axis = (Axis)sender;\r\n\r\n            if (args.NewValue == AxisLocation.Auto)\r\n            {\r\n                throw new InvalidOperationException(Properties.Resources.Chart_AxisLocationChanged_CantBeChangedToAutoWhenHostedInsideOfASeriesHost);\r\n            }\r\n\r\n            SetEdge(axis);\r\n\r\n            _edgeAxes.Remove(axis);\r\n            _edgeAxes.Add(axis);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Adds a series to the plot area and injects chart services.\r\n        /// </summary>\r\n        /// <param name=\"series\">The series to add to the plot area.</param>\r\n        private void AddSeriesToPlotArea(ISeries series)\r\n        {\r\n            series.SeriesHost = this;\r\n\r\n            AggregatedObservableCollection<object> chartLegendItems = this.LegendItems as AggregatedObservableCollection<object>;\r\n            int indexOfSeries = this.Series.IndexOf(series);\r\n            chartLegendItems.ChildCollections.Insert(indexOfSeries, series.LegendItems);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Builds the visual tree for the Chart control when a new template\r\n        /// is applied.\r\n        /// </summary>\r\n        public override void OnApplyTemplate()\r\n        {\r\n            // Call base implementation\r\n            base.OnApplyTemplate();\r\n\r\n            // Unhook events from former template parts\r\n            if (null != ChartArea)\r\n            {\r\n                ChartArea.Children.Clear();\r\n            }\r\n\r\n            if (null != Legend)\r\n            {\r\n                Legend.ItemsSource = null;\r\n            }\r\n\r\n            // Access new template parts\r\n            ChartArea = GetTemplateChild(ChartAreaName) as EdgePanel;\r\n\r\n            Legend = GetTemplateChild(LegendName) as Legend;\r\n\r\n            SelectionArea = GetTemplateChild(SelectionAreaName) as Canvas;\r\n\r\n            PlotArea = GetTemplateChild(PlotAreaName) as Grid;\r\n\r\n            CrosshairContainer = GetTemplateChild(CrosshairContainerName) as Grid;\r\n            Crosshair = GetTemplateChild(\"PART_Crosshair\") as Grid;\r\n            LocationIndicator = GetTemplateChild(\"PART_LocationIndicator\") as Border;\r\n\r\n\r\n            if (ChartArea != null)\r\n            {\r\n                _chartAreaChildrenListAdapter.TargetList = ChartArea.Children;\r\n                _chartAreaChildrenListAdapter.Populate();\r\n            }\r\n\r\n            if (Legend != null)\r\n            {\r\n                Legend.ItemsSource = this.LegendItems;\r\n            }\r\n\r\n            if (SelectionArea != null)\r\n            {\r\n                SelectionArea.MouseLeftButtonDown += SelectionArea_MouseLeftButtonDown;\r\n            }\r\n\r\n            if (CrosshairContainer != null)\r\n            {\r\n                CrosshairContainer.MouseEnter += CrosshairContainer_MouseEnter;\r\n                CrosshairContainer.MouseLeave += CrosshairContainer_MouseLeave;\r\n                CrosshairContainer.MouseMove += CrosshairContainer_MouseMove;\r\n            }\r\n        }\r\n\r\n        private KeyValuePair<object, object> GetPlotAreaCoordinates(Point position)\r\n        {\r\n            if (this.ActualAxes.Count >= 2) // && Axes[0] is IRangeAxis && Axes[1] is IRangeAxis)\r\n            {\r\n                object yAxisHit = null;\r\n                object xAxisHit = null;\r\n\r\n                if (this.ActualAxes[0].Orientation == AxisOrientation.Y)\r\n                {\r\n                    if (ActualAxes[0] is IRangeAxis)\r\n                    {\r\n                        yAxisHit = ((IRangeAxis)this.ActualAxes[0]).GetValueAtPosition(new UnitValue(PlotArea.ActualHeight - position.Y, Unit.Pixels));\r\n\r\n                    }\r\n                    else if (ActualAxes[0] is ICategoryAxis)\r\n                    {\r\n                        yAxisHit = ((ICategoryAxis)this.ActualAxes[0]).GetCategoryAtPosition(new UnitValue(/*PlotArea.ActualHeight -*/ position.Y, Unit.Pixels));\r\n                    }\r\n                }\r\n                if (this.ActualAxes[0].Orientation == AxisOrientation.X)\r\n                {\r\n                    if (ActualAxes[0] is IRangeAxis)\r\n                    {\r\n                        xAxisHit = ((IRangeAxis)this.ActualAxes[0]).GetValueAtPosition(new UnitValue(position.X, Unit.Pixels));\r\n\r\n                    }\r\n                    else if (ActualAxes[0] is ICategoryAxis)\r\n                    {\r\n                        xAxisHit = ((ICategoryAxis)this.ActualAxes[0]).GetCategoryAtPosition(new UnitValue(position.X, Unit.Pixels));\r\n                    }\r\n                }\r\n\r\n                if (this.ActualAxes[1].Orientation == AxisOrientation.Y)\r\n                {\r\n                    if (ActualAxes[1] is IRangeAxis)\r\n                    {\r\n                        yAxisHit = ((IRangeAxis)this.ActualAxes[1]).GetValueAtPosition(new UnitValue(PlotArea.ActualHeight - position.Y, Unit.Pixels));\r\n\r\n                    }\r\n                    else if (ActualAxes[1] is ICategoryAxis)\r\n                    {\r\n                        yAxisHit = ((ICategoryAxis)this.ActualAxes[1]).GetCategoryAtPosition(new UnitValue(/*PlotArea.ActualHeight -*/ position.Y, Unit.Pixels));\r\n                    }\r\n                }\r\n                if (this.ActualAxes[1].Orientation == AxisOrientation.X)\r\n                {\r\n                    if (ActualAxes[1] is IRangeAxis)\r\n                    {\r\n                        xAxisHit = ((IRangeAxis)this.ActualAxes[1]).GetValueAtPosition(new UnitValue(position.X, Unit.Pixels));\r\n\r\n                    }\r\n                    else if (ActualAxes[1] is ICategoryAxis)\r\n                    {\r\n                        xAxisHit = ((ICategoryAxis)this.ActualAxes[1]).GetCategoryAtPosition(new UnitValue(position.X, Unit.Pixels));\r\n                    }\r\n                }\r\n                \r\n                return new KeyValuePair<object, object>(xAxisHit, yAxisHit);\r\n            }\r\n\r\n            return new KeyValuePair<object, object>();\r\n        }\r\n\r\n        void CrosshairContainer_MouseMove(object sender, MouseEventArgs e)\r\n        {\r\n            Point mousePos = e.GetPosition(PlotArea);\r\n            var crosshairLocation = GetPlotAreaCoordinates(mousePos);\r\n\r\n            LocationIndicator.DataContext = crosshairLocation;\r\n            Crosshair.DataContext = mousePos;    \r\n        }\r\n\r\n        void CrosshairContainer_MouseLeave(object sender, MouseEventArgs e)\r\n        {\r\n            SetCrossHairVisibility(false);\r\n        }\r\n\r\n        private void CrosshairContainer_MouseEnter(object sender, MouseEventArgs e)\r\n        {\r\n            SetCrossHairVisibility(true);\r\n        }\r\n\r\n        private void SetCrossHairVisibility(bool visible)\r\n        {\r\n            LocationIndicator.Visibility = visible ? Visibility.Visible : Visibility.Collapsed;\r\n            Crosshair.Visibility = visible ? Visibility.Visible : Visibility.Collapsed;\r\n            this.Cursor = visible ? Cursors.None : Cursors.Arrow;\r\n        }\r\n\r\n        private Rectangle SelectionRect;\r\n        private Point SelectionStartPoint;\r\n        private void SelectionArea_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)\r\n        {\r\n            if (Keyboard.Modifiers == ModifierKeys.Control)\r\n            {\r\n                //if (currentOrderList != null && currentOrderList.Count <= 7)\r\n                //    return;\r\n\r\n                SelectionStartPoint = e.GetPosition((sender as Canvas));\r\n                \r\n                if (SelectionRect == null)\r\n                {\r\n                    SelectionRect = new Rectangle();\r\n                    SelectionArea.Children.Add(SelectionRect);\r\n                    Canvas.SetLeft(SelectionRect, SelectionStartPoint.X);\r\n                    Canvas.SetTop(SelectionRect, 0);\r\n                    SelectionRect.Height = PlotArea.ActualHeight;\r\n                    SelectionRect.Opacity = .5;\r\n                    SelectionRect.Fill = new SolidColorBrush(Colors.LightGray);\r\n                    SelectionRect.Stroke = new SolidColorBrush(Colors.Gray);\r\n                    SelectionRect.StrokeThickness = 2.0;\r\n                }\r\n\r\n            }\r\n            else\r\n            {\r\n                //LineSeries ls = this.chart1.Series[0] as LineSeries;\r\n\r\n                //if (OrdersStack.Count <= 1)\r\n                //{\r\n                //    ls.ItemsSource = orders;\r\n                //    currentOrderList = null;\r\n                //    while (OrdersStack.Count > 0)\r\n                //        OrdersStack.Pop();\r\n                //    return;\r\n                //}\r\n                //else\r\n                //{\r\n                //    OrdersStack.Pop();\r\n                //    currentOrderList = OrdersStack.Pop();\r\n                //    ls.ItemsSource = currentOrderList;\r\n                //}\r\n            }\r\n\r\n        }\r\n\r\n\r\n        /// <summary>\r\n        /// Ensures that ISeriesHost is in a consistent state when axes collection is\r\n        /// changed.\r\n        /// </summary>\r\n        /// <param name=\"sender\">Event source.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private void ActualAxesCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)\r\n        {\r\n            if (e.NewItems != null)\r\n            {\r\n                foreach (Axis axis in e.NewItems.OfType<Axis>())\r\n                {\r\n                    AddAxisToChartArea(axis);\r\n                }\r\n            }\r\n            if (e.OldItems != null)\r\n            {\r\n                foreach (Axis axis in e.OldItems.OfType<Axis>())\r\n                {\r\n                    RemoveAxisFromChartArea(axis);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes an axis from the Chart area.\r\n        /// </summary>\r\n        /// <param name=\"axis\">The axis to remove from the ISeriesHost area.</param>\r\n        private void RemoveAxisFromChartArea(Axis axis)\r\n        {\r\n            axis.LocationChanged -= AxisLocationChanged;\r\n            axis.OrientationChanged -= AxisOrientationChanged;\r\n            IRequireSeriesHost requiresSeriesHost = axis as IRequireSeriesHost;\r\n            if (requiresSeriesHost != null)\r\n            {\r\n                requiresSeriesHost.SeriesHost = null;\r\n            }\r\n\r\n            _edgeAxes.Remove(axis);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes a series from the plot area.\r\n        /// </summary>\r\n        /// <param name=\"series\">The series to remove from the plot area.\r\n        /// </param>\r\n        private void RemoveSeriesFromPlotArea(ISeries series)\r\n        {\r\n            AggregatedObservableCollection<object> legendItemsList = LegendItems as AggregatedObservableCollection<object>;\r\n            legendItemsList.ChildCollections.Remove(series.LegendItems);\r\n\r\n            series.SeriesHost = null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the ObservableCollection.CollectionChanged property\r\n        /// changes.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The object that raised the event.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void SeriesCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)\r\n        {\r\n            // Clear ISeriesHost property of old Series\r\n            if (null != e.OldItems)\r\n            {\r\n                foreach (ISeries series in e.OldItems)\r\n                {\r\n                    ISeriesHost host = series as ISeriesHost;\r\n                    if (host != null)\r\n                    {\r\n                        foreach (IRequireGlobalSeriesIndex tracksGlobalIndex in host.GetDescendentSeries().OfType<IRequireGlobalSeriesIndex>())\r\n                        {\r\n                            tracksGlobalIndex.GlobalSeriesIndexChanged(null);\r\n                        }\r\n                        host.Series.CollectionChanged -= new NotifyCollectionChangedEventHandler(ChildSeriesCollectionChanged);\r\n                    }\r\n                    IRequireGlobalSeriesIndex require = series as IRequireGlobalSeriesIndex;\r\n                    if (require != null)\r\n                    {\r\n                        require.GlobalSeriesIndexChanged(null);\r\n                    }\r\n\r\n                    RemoveSeriesFromPlotArea(series);\r\n                }\r\n            }\r\n\r\n            // Set ISeriesHost property of new Series\r\n            if (null != e.NewItems)\r\n            {\r\n                foreach (ISeries series in e.NewItems)\r\n                {\r\n                    ISeriesHost host = series as ISeriesHost;\r\n                    if (null != host)\r\n                    {\r\n                        host.Series.CollectionChanged += new NotifyCollectionChangedEventHandler(ChildSeriesCollectionChanged);\r\n                    }\r\n                    AddSeriesToPlotArea(series);\r\n                }\r\n            }\r\n\r\n            if (e.Action != NotifyCollectionChangedAction.Replace)\r\n            {\r\n                OnGlobalSeriesIndexesInvalidated(this, new RoutedEventArgs());\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles changes to the collections of child ISeries implementing ISeriesHost.\r\n        /// </summary>\r\n        /// <param name=\"sender\">Event source.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private void ChildSeriesCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)\r\n        {\r\n            OnGlobalSeriesIndexesInvalidated(this, new RoutedEventArgs());\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a rotating enumerator of ResourceDictionary objects that coordinates\r\n        /// with the dispenser object to ensure that no two enumerators are on the same\r\n        /// item. If the dispenser is reset or its collection is changed then the\r\n        /// enumerators are also reset.\r\n        /// </summary>\r\n        /// <param name=\"predicate\">A predicate that returns a value indicating\r\n        /// whether to return an item.</param>\r\n        /// <returns>An enumerator of ResourceDictionaries.</returns>\r\n        public IEnumerator<ResourceDictionary> GetResourceDictionariesWhere(Func<ResourceDictionary, bool> predicate)\r\n        {\r\n            return ResourceDictionaryDispenser.GetResourceDictionariesWhere(predicate);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the global indexes of all descendents that require a global\r\n        /// index.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source of the event.</param>\r\n        /// <param name=\"args\">The event data.</param>\r\n        private void OnGlobalSeriesIndexesInvalidated(object sender, RoutedEventArgs args)\r\n        {\r\n            UpdateGlobalIndexes();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the global index property of all Series that track their\r\n        /// global index.\r\n        /// </summary>\r\n        private void UpdateGlobalIndexes()\r\n        {\r\n            (this as ISeriesHost).GetDescendentSeries().OfType<IRequireGlobalSeriesIndex>().ForEachWithIndex(\r\n                (seriesThatTracksGlobalIndex, index) =>\r\n                {\r\n                    seriesThatTracksGlobalIndex.GlobalSeriesIndexChanged(index);\r\n                });\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Series host of the chart.\r\n        /// </summary>\r\n        /// <remarks>This will always return null.</remarks>\r\n        ISeriesHost IRequireSeriesHost.SeriesHost\r\n        {\r\n            get { return SeriesHost; }\r\n            set { SeriesHost = value; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Series host of the chart.\r\n        /// </summary>\r\n        /// <remarks>This will always return null.</remarks>\r\n        protected ISeriesHost SeriesHost { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets the axes collection of the chart.\r\n        /// </summary>\r\n        ObservableCollection<IAxis> ISeriesHost.Axes\r\n        {\r\n            get { return InternalActualAxes as ObservableCollection<IAxis>; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the Series collection of the chart.\r\n        /// </summary>\r\n        ObservableCollection<ISeries> ISeriesHost.Series\r\n        {\r\n            get { return (ObservableCollection<ISeries>)Series; }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Chart/SeriesHostAxesCollection.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections.Specialized;\r\nusing System.Diagnostics;\r\nusing System.Linq;\r\nusing System.Windows;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// An axes collection used by a series host.\r\n    /// </summary>\r\n    internal class SeriesHostAxesCollection : UniqueObservableCollection<IAxis>\r\n    {\r\n        /// <summary>\r\n        /// Gets or sets the series host field.\r\n        /// </summary>\r\n        private ISeriesHost SeriesHost { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a collection of axes cannot be removed under any \r\n        /// circumstances.\r\n        /// </summary>\r\n        private UniqueObservableCollection<IAxis> PersistentAxes { get; set; }\r\n\r\n        /// <summary>\r\n        /// Instantiates a new instance of the SeriesHostAxesCollection class.\r\n        /// </summary>\r\n        /// <param name=\"seriesHost\">The series host.</param>\r\n        internal SeriesHostAxesCollection(ISeriesHost seriesHost)\r\n        {\r\n            this.SeriesHost = seriesHost;\r\n            this.PersistentAxes = new UniqueObservableCollection<IAxis>();\r\n            this.CollectionChanged += ThisCollectionChanged;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Instantiates a new instance of the SeriesHostAxesCollection class.\r\n        /// </summary>\r\n        /// <param name=\"seriesHost\">The series host.</param>\r\n        /// <param name=\"persistentAxes\">A collection of axes that can never be \r\n        /// removed from the chart.</param>\r\n        internal SeriesHostAxesCollection(ISeriesHost seriesHost, UniqueObservableCollection<IAxis> persistentAxes)\r\n            : this(seriesHost)\r\n        {\r\n            Debug.Assert(persistentAxes != null, \"Persistent axes collection cannot be null.\");\r\n            this.SeriesHost = seriesHost;\r\n            this.PersistentAxes = persistentAxes;\r\n            this.PersistentAxes.CollectionChanged += PersistentAxesCollectionChanged;\r\n        }\r\n\r\n        /// <summary>\r\n        /// A method that attaches and removes listeners to axes added to this\r\n        /// collection.\r\n        /// </summary>\r\n        /// <param name=\"sender\">This object.</param>\r\n        /// <param name=\"e\">Information about the event.</param>\r\n        private void ThisCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)\r\n        {\r\n            if (e.NewItems != null)\r\n            {\r\n                foreach (IAxis axis in e.NewItems)\r\n                {\r\n                    axis.RegisteredListeners.CollectionChanged += AxisRegisteredListenersCollectionChanged;\r\n                }\r\n            }\r\n            if (e.OldItems != null)\r\n            {\r\n                foreach (IAxis axis in e.OldItems)\r\n                {\r\n                    axis.RegisteredListeners.CollectionChanged -= AxisRegisteredListenersCollectionChanged;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Remove an axis from the collection if it is no longer used.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The axis that has had its registered \r\n        /// listeners collection changed.</param>\r\n        /// <param name=\"e\">Information about the event.</param>\r\n        private void AxisRegisteredListenersCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)\r\n        {\r\n            IAxis axis = this.Where(currentAxis => currentAxis.RegisteredListeners == sender).First();\r\n\r\n            if (e.OldItems != null)\r\n            {\r\n                if (!PersistentAxes.Contains(axis) && !SeriesHost.IsUsedByASeries(axis))\r\n                {\r\n                    this.Remove(axis);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// This method synchronizes the collection with the persistent axes \r\n        /// collection when it is changed.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source of the event.</param>\r\n        /// <param name=\"e\">Information about the event.</param>\r\n        public void PersistentAxesCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)\r\n        {\r\n            if (e.NewItems != null)\r\n            {\r\n                foreach (IAxis axis in e.NewItems)\r\n                {\r\n                    if (!this.Contains(axis))\r\n                    {\r\n                        this.Add(axis);\r\n                    }\r\n                }\r\n            }\r\n            if (e.OldItems != null)\r\n            {\r\n                foreach (IAxis axis in e.OldItems)\r\n                {\r\n                    if (this.Contains(axis) && !SeriesHost.IsUsedByASeries(axis))\r\n                    {\r\n                        this.Remove(axis);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes an item from the axes collection but throws an exception\r\n        /// if a series in the series host is listening to it.\r\n        /// </summary>\r\n        /// <param name=\"index\">The index of the item being removed.</param>\r\n        protected override void RemoveItem(int index)\r\n        {\r\n            IAxis axis = this[index];\r\n\r\n            if (SeriesHost.IsUsedByASeries(axis))\r\n            {\r\n                throw new InvalidOperationException(Properties.Resources.SeriesHostAxesCollection_RemoveItem_AxisCannotBeRemovedFromASeriesHostWhenOneOrMoreSeriesAreListeningToIt);\r\n            }\r\n            else if (PersistentAxes.Contains(axis))\r\n            {\r\n                throw new InvalidOperationException(Properties.Resources.SeriesHostAxesCollection_InvalidAttemptToRemovePermanentAxisFromSeriesHost);\r\n            }\r\n            else\r\n            {\r\n                base.RemoveItem(index);\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/DataPoint/AreaDataPoint.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Represents a data point used for an area series.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    [TemplateVisualState(Name = DataPoint.StateCommonNormal, GroupName = DataPoint.GroupCommonStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateCommonMouseOver, GroupName = DataPoint.GroupCommonStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateSelectionUnselected, GroupName = DataPoint.GroupSelectionStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateSelectionSelected, GroupName = DataPoint.GroupSelectionStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateRevealShown, GroupName = DataPoint.GroupRevealStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateRevealHidden, GroupName = DataPoint.GroupRevealStates)]\r\n    public partial class AreaDataPoint : DataPoint\r\n    {\r\n        /// <summary>\r\n        /// Initializes the static members of the AreaDataPoint class.\r\n        /// </summary>\r\n        static AreaDataPoint()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(AreaDataPoint), new FrameworkPropertyMetadata(typeof(AreaDataPoint)));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the AreaDataPoint class.\r\n        /// </summary>\r\n        public AreaDataPoint()\r\n        {\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/DataPoint/BarDataPoint.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Represents a data point used for a bar series.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    [TemplateVisualState(Name = DataPoint.StateCommonNormal, GroupName = DataPoint.GroupCommonStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateCommonMouseOver, GroupName = DataPoint.GroupCommonStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateSelectionUnselected, GroupName = DataPoint.GroupSelectionStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateSelectionSelected, GroupName = DataPoint.GroupSelectionStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateRevealShown, GroupName = DataPoint.GroupRevealStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateRevealHidden, GroupName = DataPoint.GroupRevealStates)]\r\n    public partial class BarDataPoint : DataPoint\r\n    {\r\n        /// <summary>\r\n        /// Initializes the static members of the BarDataPoint class.\r\n        /// </summary>\r\n        static BarDataPoint()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(BarDataPoint), new FrameworkPropertyMetadata(typeof(BarDataPoint)));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the BarDataPoint class.\r\n        /// </summary>\r\n        public BarDataPoint()\r\n        {\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/DataPoint/BubbleDataPoint.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Diagnostics.CodeAnalysis;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Represents a data point used for a bubble series.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    [TemplateVisualState(Name = DataPoint.StateCommonNormal, GroupName = DataPoint.GroupCommonStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateCommonMouseOver, GroupName = DataPoint.GroupCommonStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateSelectionUnselected, GroupName = DataPoint.GroupSelectionStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateSelectionSelected, GroupName = DataPoint.GroupSelectionStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateRevealShown, GroupName = DataPoint.GroupRevealStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateRevealHidden, GroupName = DataPoint.GroupRevealStates)]\r\n    public class BubbleDataPoint : DataPoint\r\n    {\r\n        #region public double Size\r\n        /// <summary>\r\n        /// Gets or sets the size value of the bubble data point.\r\n        /// </summary>\r\n        public double Size\r\n        {\r\n            get { return (double)GetValue(SizeProperty); }\r\n            set { SetValue(SizeProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Size dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty SizeProperty =\r\n            DependencyProperty.Register(\r\n                \"Size\",\r\n                typeof(double),\r\n                typeof(BubbleDataPoint),\r\n                new PropertyMetadata(0.0, OnSizePropertyChanged));\r\n\r\n        /// <summary>\r\n        /// SizeProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">BubbleDataPoint that changed its Size.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnSizePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            BubbleDataPoint source = (BubbleDataPoint)d;\r\n            double oldValue = (double)e.OldValue;\r\n            double newValue = (double)e.NewValue;\r\n            source.OnSizePropertyChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// SizeProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        private void OnSizePropertyChanged(double oldValue, double newValue)\r\n        {\r\n            RoutedPropertyChangedEventHandler<double> handler = SizePropertyChanged;\r\n            if (handler != null)\r\n            {\r\n                handler(this, new RoutedPropertyChangedEventArgs<double>(oldValue, newValue));\r\n            }\r\n\r\n            if (this.State == DataPointState.Created)\r\n            {\r\n                this.ActualSize = newValue;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// This event is raised when the size property is changed.\r\n        /// </summary>\r\n        internal event RoutedPropertyChangedEventHandler<double> SizePropertyChanged;\r\n\r\n        #endregion public double Size\r\n\r\n        #region public double ActualSize\r\n        /// <summary>\r\n        /// Gets or sets the actual size of the bubble data point.\r\n        /// </summary>\r\n        public double ActualSize\r\n        {\r\n            get { return (double)GetValue(ActualSizeProperty); }\r\n            set { SetValue(ActualSizeProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ActualSize dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ActualSizeProperty =\r\n            DependencyProperty.Register(\r\n                \"ActualSize\",\r\n                typeof(double),\r\n                typeof(BubbleDataPoint),\r\n                new PropertyMetadata(0.0, OnActualSizePropertyChanged));\r\n\r\n        /// <summary>\r\n        /// ActualSizeProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">BubbleDataPoint that changed its ActualSize.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnActualSizePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            BubbleDataPoint source = (BubbleDataPoint)d;\r\n            double oldValue = (double)e.OldValue;\r\n            double newValue = (double)e.NewValue;\r\n            source.OnActualSizePropertyChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// ActualSizeProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        private void OnActualSizePropertyChanged(double oldValue, double newValue)\r\n        {\r\n            RoutedPropertyChangedEventHandler<double> handler = ActualSizePropertyChanged;\r\n            if (handler != null)\r\n            {\r\n                handler(this, new RoutedPropertyChangedEventArgs<double>(oldValue, newValue));\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// This event is raised when the actual size property is changed.\r\n        /// </summary>\r\n        internal event RoutedPropertyChangedEventHandler<double> ActualSizePropertyChanged;\r\n\r\n        #endregion public double ActualSize\r\n\r\n        /// <summary>\r\n        /// Initializes the static members of the BubbleDataPoint class.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1810:InitializeReferenceTypeStaticFieldsInline\", Justification = \"Dependency properties are initialized in-line.\")]\r\n        static BubbleDataPoint()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(BubbleDataPoint), new FrameworkPropertyMetadata(typeof(BubbleDataPoint)));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the bubble data point.\r\n        /// </summary>\r\n        public BubbleDataPoint()\r\n        {\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/DataPoint/CandlestickDataPoint.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Represents a data point used for scatter series.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    [TemplateVisualState(Name = DataPoint.StateCommonNormal, GroupName = DataPoint.GroupCommonStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateCommonMouseOver, GroupName = DataPoint.GroupCommonStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateSelectionUnselected, GroupName = DataPoint.GroupSelectionStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateSelectionSelected, GroupName = DataPoint.GroupSelectionStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateRevealShown, GroupName = DataPoint.GroupRevealStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateRevealHidden, GroupName = DataPoint.GroupRevealStates)]\r\n    public sealed partial class CandlestickDataPoint : DataPoint\r\n    {\r\n        #region public double Open\r\n        /// <summary>\r\n        /// Gets or sets the size value of the bubble data point.\r\n        /// </summary>\r\n        public double Open\r\n        {\r\n            get { return (double)GetValue(OpenProperty); }\r\n            set { SetValue(OpenProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Size dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty OpenProperty =\r\n            DependencyProperty.Register(\r\n                \"Open\",\r\n                typeof(double),\r\n                typeof(CandlestickDataPoint),\r\n                new PropertyMetadata(0.0));\r\n\r\n        #endregion public double Open\r\n\r\n        #region public double Close\r\n        /// <summary>\r\n        /// Gets or sets the size value of the bubble data point.\r\n        /// </summary>\r\n        public double Close\r\n        {\r\n            get { return (double)GetValue(CloseProperty); }\r\n            set { SetValue(CloseProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Size dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty CloseProperty =\r\n            DependencyProperty.Register(\r\n                \"Close\",\r\n                typeof(double),\r\n                typeof(CandlestickDataPoint),\r\n                new PropertyMetadata(0.0));\r\n\r\n        #endregion public double Close\r\n\r\n        #region public double High\r\n        /// <summary>\r\n        /// Gets or sets the size value of the bubble data point.\r\n        /// </summary>\r\n        public double High\r\n        {\r\n            get { return (double)GetValue(HighProperty); }\r\n            set { SetValue(HighProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Size dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty HighProperty =\r\n            DependencyProperty.Register(\r\n                \"High\",\r\n                typeof(double),\r\n                typeof(CandlestickDataPoint),\r\n                new PropertyMetadata(0.0));\r\n\r\n        #endregion public double High\r\n\r\n        #region public double Low\r\n        /// <summary>\r\n        /// Gets or sets the size value of the bubble data point.\r\n        /// </summary>\r\n        public double Low\r\n        {\r\n            get { return (double)GetValue(LowProperty); }\r\n            set { SetValue(LowProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Size dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty LowProperty =\r\n            DependencyProperty.Register(\r\n                \"Low\",\r\n                typeof(double),\r\n                typeof(CandlestickDataPoint),\r\n                new PropertyMetadata(0.0));\r\n\r\n        #endregion public double Low\r\n\r\n        private const string BodyName = \"PART_Body\";\r\n        private Grid Body { get; set; }\r\n        private const string ShadowName = \"PART_Shadow\";\r\n        private Grid Shadow { get; set; }\r\n\r\n        /// <summary>\r\n        /// Initializes the static members of the BarDataPoint class.\r\n        /// </summary>\r\n        static CandlestickDataPoint()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(CandlestickDataPoint), new FrameworkPropertyMetadata(typeof(CandlestickDataPoint)));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the ScatterDataPoint class.\r\n        /// </summary>\r\n        public CandlestickDataPoint()\r\n        {\r\n        }\r\n\r\n        public override void OnApplyTemplate()\r\n        {\r\n            base.OnApplyTemplate();\r\n\r\n            Body = GetTemplateChild(BodyName) as Grid;\r\n            Shadow = GetTemplateChild(ShadowName) as Grid;\r\n        }\r\n\r\n        public void UpdateBody(IRangeAxis rangeAxis)\r\n        {\r\n            if (Body == null)\r\n                return;\r\n\r\n            double highPointY = rangeAxis.GetPlotAreaCoordinate(ValueHelper.ToDouble(High)).Value;\r\n            double lowPointY = rangeAxis.GetPlotAreaCoordinate(ValueHelper.ToDouble(Low)).Value;\r\n            double openPointY = rangeAxis.GetPlotAreaCoordinate(ValueHelper.ToDouble(Open)).Value;\r\n            double closePointY = rangeAxis.GetPlotAreaCoordinate(ValueHelper.ToDouble(Close)).Value;\r\n\r\n            Thickness margin;\r\n            if (openPointY > closePointY)\r\n            {\r\n                margin = new Thickness(0, highPointY - openPointY, 0, closePointY - lowPointY);\r\n            }\r\n            else\r\n            {\r\n                margin = new Thickness(0, highPointY - closePointY, 0, openPointY - lowPointY);\r\n            }\r\n\r\n            Body.Margin = margin;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/DataPoint/ColumnDataPoint.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Represents a data point used for a column series.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    [TemplateVisualState(Name = DataPoint.StateCommonNormal, GroupName = DataPoint.GroupCommonStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateCommonMouseOver, GroupName = DataPoint.GroupCommonStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateSelectionUnselected, GroupName = DataPoint.GroupSelectionStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateSelectionSelected, GroupName = DataPoint.GroupSelectionStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateRevealShown, GroupName = DataPoint.GroupRevealStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateRevealHidden, GroupName = DataPoint.GroupRevealStates)]\r\n    public partial class ColumnDataPoint : DataPoint\r\n    {\r\n        /// <summary>\r\n        /// Initializes the static members of the ColumnDataPoint class.\r\n        /// </summary>\r\n        static ColumnDataPoint()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(ColumnDataPoint), new FrameworkPropertyMetadata(typeof(ColumnDataPoint)));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the ColumnDataPoint class.\r\n        /// </summary>\r\n        public ColumnDataPoint()\r\n        {\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/DataPoint/DataPoint.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Threading;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Represents a control that displays a data point.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    [TemplateVisualState(Name = DataPoint.StateCommonNormal, GroupName = DataPoint.GroupCommonStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateCommonMouseOver, GroupName = DataPoint.GroupCommonStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateSelectionUnselected, GroupName = DataPoint.GroupSelectionStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateSelectionSelected, GroupName = DataPoint.GroupSelectionStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateRevealShown, GroupName = DataPoint.GroupRevealStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateRevealHidden, GroupName = DataPoint.GroupRevealStates)]\r\n    public abstract partial class DataPoint : Control\r\n    {\r\n        #region CommonStates\r\n        /// <summary>\r\n        /// Common state group.\r\n        /// </summary>\r\n        internal const string GroupCommonStates = \"CommonStates\";\r\n\r\n        /// <summary>\r\n        /// Normal state of the Common group.\r\n        /// </summary>\r\n        internal const string StateCommonNormal = \"Normal\";\r\n\r\n        /// <summary>\r\n        /// MouseOver state of the Common group.\r\n        /// </summary>\r\n        internal const string StateCommonMouseOver = \"MouseOver\";\r\n        #endregion CommonStates\r\n\r\n        #region SelectionStates\r\n        /// <summary>\r\n        /// Selection state group.\r\n        /// </summary>\r\n        internal const string GroupSelectionStates = \"SelectionStates\";\r\n\r\n        /// <summary>\r\n        /// Unselected state of the Selection group.\r\n        /// </summary>\r\n        internal const string StateSelectionUnselected = \"Unselected\";\r\n\r\n        /// <summary>\r\n        /// Selected state of the Selection group.\r\n        /// </summary>\r\n        internal const string StateSelectionSelected = \"Selected\";\r\n        #endregion SelectionStates\r\n\r\n        #region GroupRevealStates\r\n        /// <summary>\r\n        /// Reveal state group.\r\n        /// </summary>\r\n        internal const string GroupRevealStates = \"RevealStates\";\r\n\r\n        /// <summary>\r\n        /// Shown state of the Reveal group.\r\n        /// </summary>\r\n        internal const string StateRevealShown = \"Shown\";\r\n\r\n        /// <summary>\r\n        /// Hidden state of the Reveal group.\r\n        /// </summary>\r\n        internal const string StateRevealHidden = \"Hidden\";\r\n        #endregion GroupRevealStates\r\n\r\n        #region public bool IsSelectionEnabled\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether selection is enabled.\r\n        /// </summary>\r\n        public bool IsSelectionEnabled\r\n        {\r\n            get { return (bool)GetValue(IsSelectionEnabledProperty); }\r\n            set { SetValue(IsSelectionEnabledProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the IsSelectionEnabled dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty IsSelectionEnabledProperty =\r\n            DependencyProperty.Register(\r\n                \"IsSelectionEnabled\",\r\n                typeof(bool),\r\n                typeof(DataPoint),\r\n                new PropertyMetadata(false, OnIsSelectionEnabledPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// IsSelectionEnabledProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">Control that changed its IsSelectionEnabled.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnIsSelectionEnabledPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DataPoint source = (DataPoint)d;\r\n            bool oldValue = (bool)e.OldValue;\r\n            bool newValue = (bool)e.NewValue;\r\n            source.OnIsSelectionEnabledPropertyChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// IsSelectionEnabledProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        protected virtual void OnIsSelectionEnabledPropertyChanged(bool oldValue, bool newValue)\r\n        {\r\n            if (newValue == false)\r\n            {\r\n                IsSelected = false;\r\n                IsHovered = false;\r\n            }\r\n        }\r\n        #endregion public bool IsSelectionEnabled\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether the data point is active.\r\n        /// </summary>\r\n        internal bool IsActive { get; private set; }\r\n\r\n        /// <summary>\r\n        /// An event raised when the IsSelected property is changed.\r\n        /// </summary>\r\n        internal event RoutedPropertyChangedEventHandler<bool> IsSelectedChanged;\r\n\r\n        /// <summary>\r\n        /// A value indicating whether the mouse is hovering over the data \r\n        /// point.\r\n        /// </summary>\r\n        private bool _isHovered;\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether the mouse is hovering over\r\n        /// the data point.\r\n        /// </summary>\r\n        protected bool IsHovered\r\n        {\r\n            get { return _isHovered; }\r\n            private set \r\n            {\r\n                bool oldValue = _isHovered;\r\n                _isHovered = value;\r\n                if (oldValue != _isHovered)\r\n                {\r\n                    OnIsHoveredPropertyChanged(oldValue, value);\r\n                }\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        /// IsHoveredProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        protected virtual void OnIsHoveredPropertyChanged(bool oldValue, bool newValue)\r\n        {\r\n            VisualStateManager.GoToState(this, (newValue == true) ? StateCommonMouseOver : StateCommonNormal, true);\r\n        }\r\n\r\n        #region internal bool IsSelected\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether the data point is selected.\r\n        /// </summary>\r\n        internal bool IsSelected\r\n        {\r\n            get { return (bool)GetValue(IsSelectedProperty); }\r\n            set { SetValue(IsSelectedProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the IsSelected dependency property.\r\n        /// </summary>\r\n        internal static readonly DependencyProperty IsSelectedProperty =\r\n            DependencyProperty.Register(\r\n                \"IsSelected\",\r\n                typeof(bool),\r\n                typeof(DataPoint),\r\n                new PropertyMetadata(false, OnIsSelectedPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// IsSelectedProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">Control that changed its IsSelected.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnIsSelectedPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DataPoint source = (DataPoint)d;\r\n            bool oldValue = (bool)e.OldValue;\r\n            bool newValue = (bool)e.NewValue;\r\n            source.OnIsSelectedPropertyChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// IsSelectedProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">The value to be replaced.</param>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        protected virtual void OnIsSelectedPropertyChanged(bool oldValue, bool newValue)\r\n        {\r\n            VisualStateManager.GoToState(this, newValue ? StateSelectionSelected : StateSelectionUnselected, true);\r\n\r\n            RoutedPropertyChangedEventHandler<bool> handler = this.IsSelectedChanged;\r\n            if (handler != null)\r\n            {\r\n                handler(this, new RoutedPropertyChangedEventArgs<bool>(oldValue, newValue));\r\n            }\r\n        }\r\n        #endregion internal bool IsSelected\r\n\r\n        /// <summary>\r\n        /// Event raised when the actual dependent value of the data point is changed.\r\n        /// </summary>\r\n        internal event RoutedPropertyChangedEventHandler<IComparable> ActualDependentValueChanged;\r\n\r\n        #region public IComparable ActualDependentValue\r\n        /// <summary>\r\n        /// Gets or sets the actual dependent value displayed in the chart.\r\n        /// </summary>\r\n        public IComparable ActualDependentValue\r\n        {\r\n            get { return (IComparable)GetValue(ActualDependentValueProperty); }\r\n            set { SetValue(ActualDependentValueProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ActualDependentValue dependency property.\r\n        /// </summary>\r\n        public static readonly System.Windows.DependencyProperty ActualDependentValueProperty =\r\n            System.Windows.DependencyProperty.Register(\r\n                \"ActualDependentValue\",\r\n                typeof(IComparable),\r\n                typeof(DataPoint),\r\n                new System.Windows.PropertyMetadata(0.0, OnActualDependentValuePropertyChanged));\r\n\r\n        /// <summary>\r\n        /// Called when the value of the ActualDependentValue property changes.\r\n        /// </summary>\r\n        /// <param name=\"d\">Control that changed its ActualDependentValue.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnActualDependentValuePropertyChanged(System.Windows.DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DataPoint source = (DataPoint)d;\r\n            IComparable oldValue = (IComparable)e.OldValue;\r\n            IComparable newValue = (IComparable)e.NewValue;\r\n            source.OnActualDependentValuePropertyChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// A value indicating whether the actual independent value is being\r\n        /// coerced.\r\n        /// </summary>\r\n        private bool _isCoercingActualDependentValue;\r\n        \r\n        /// <summary>\r\n        /// The preserved previous actual dependent value before coercion.\r\n        /// </summary>\r\n        private IComparable _oldActualDependentValueBeforeCoercion;\r\n\r\n        /// <summary>\r\n        /// Called when the value of the ActualDependentValue property changes.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">The value to be replaced.</param>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        protected virtual void OnActualDependentValuePropertyChanged(IComparable oldValue, IComparable newValue)\r\n        {\r\n            double coercedValue = 0.0;\r\n            if (!(newValue is double) && ValueHelper.TryConvert(newValue, out coercedValue))\r\n            {\r\n                _isCoercingActualDependentValue = true;\r\n                _oldActualDependentValueBeforeCoercion = oldValue;\r\n            }\r\n\r\n            if (!_isCoercingActualDependentValue)\r\n            {\r\n                if (_oldActualDependentValueBeforeCoercion != null)\r\n                {\r\n                    oldValue = _oldActualDependentValueBeforeCoercion;\r\n                    _oldActualDependentValueBeforeCoercion = null;\r\n                }\r\n\r\n                RoutedPropertyChangedEventHandler<IComparable> handler = this.ActualDependentValueChanged;\r\n                if (handler != null)\r\n                {\r\n                    handler(this, new RoutedPropertyChangedEventArgs<IComparable>(oldValue, newValue));\r\n                }\r\n            }\r\n\r\n            if (_isCoercingActualDependentValue)\r\n            {\r\n                _isCoercingActualDependentValue = false;\r\n                this.ActualDependentValue = coercedValue;\r\n            }\r\n        }\r\n        #endregion public IComparable ActualDependentValue\r\n\r\n        /// <summary>\r\n        /// This event is raised when the dependent value of the data point is \r\n        /// changed.\r\n        /// </summary>\r\n        internal event RoutedPropertyChangedEventHandler<IComparable> DependentValueChanged;\r\n\r\n        #region public IComparable DependentValue\r\n        /// <summary>\r\n        /// Gets or sets the dependent value of the Control.\r\n        /// </summary>\r\n        public IComparable DependentValue\r\n        {\r\n            get { return (IComparable) GetValue(DependentValueProperty); }\r\n            set { SetValue(DependentValueProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the DependentValue dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty DependentValueProperty =\r\n            DependencyProperty.Register(\r\n                \"DependentValue\",\r\n                typeof(IComparable),\r\n                typeof(DataPoint),\r\n                new PropertyMetadata(null, OnDependentValuePropertyChanged));\r\n\r\n        /// <summary>\r\n        /// Called when the DependentValue property changes.\r\n        /// </summary>\r\n        /// <param name=\"d\">Control that changed its DependentValue.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnDependentValuePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DataPoint source = (DataPoint)d;\r\n            IComparable oldValue = (IComparable) e.OldValue;\r\n            IComparable newValue = (IComparable) e.NewValue;\r\n            source.OnDependentValuePropertyChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the DependentValue property changes.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">The value to be replaced.</param>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        protected virtual void OnDependentValuePropertyChanged(IComparable oldValue, IComparable newValue)\r\n        {\r\n            SetFormattedProperty(FormattedDependentValueProperty, DependentValueStringFormat, newValue);\r\n            RoutedPropertyChangedEventHandler<IComparable> handler = this.DependentValueChanged;\r\n            if (handler != null)\r\n            {\r\n                handler(this, new RoutedPropertyChangedEventArgs<IComparable>(oldValue, newValue));\r\n            }\r\n\r\n            if (this.State == DataPointState.Created)\r\n            {\r\n                // Prefer setting the value as a double...\r\n                double coercedNewValue;\r\n                if (ValueHelper.TryConvert(newValue, out coercedNewValue))\r\n                {\r\n                    ActualDependentValue = coercedNewValue;\r\n                }\r\n                else\r\n                {\r\n                    // ... but fall back otherwise\r\n                    ActualDependentValue = newValue;\r\n                }\r\n            }\r\n        }\r\n        #endregion public IComparable DependentValue\r\n\r\n        #region public string DependentValueStringFormat\r\n        /// <summary>\r\n        /// Gets or sets the format string for the FormattedDependentValue property.\r\n        /// </summary>\r\n        public string DependentValueStringFormat\r\n        {\r\n            get { return GetValue(DependentValueStringFormatProperty) as string; }\r\n            set { SetValue(DependentValueStringFormatProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the DependentValueStringFormat dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty DependentValueStringFormatProperty =\r\n            DependencyProperty.Register(\r\n                \"DependentValueStringFormat\",\r\n                typeof(string),\r\n                typeof(DataPoint),\r\n                new PropertyMetadata(null, OnDependentValueStringFormatPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// Called when DependentValueStringFormat property changes.\r\n        /// </summary>\r\n        /// <param name=\"d\">Control that changed its DependentValueStringFormat.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnDependentValueStringFormatPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DataPoint source = d as DataPoint;\r\n            string oldValue = e.OldValue as string;\r\n            string newValue = e.NewValue as string;\r\n            source.OnDependentValueStringFormatPropertyChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when DependentValueStringFormat property changes.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">The value to be replaced.</param>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        protected virtual void OnDependentValueStringFormatPropertyChanged(string oldValue, string newValue)\r\n        {\r\n            SetFormattedProperty(FormattedDependentValueProperty, newValue, DependentValue);\r\n        }\r\n        #endregion public string DependentValueStringFormat\r\n\r\n        #region public string FormattedDependentValue\r\n        /// <summary>\r\n        /// Gets the DependentValue as formatted by the DependentValueStringFormat property.\r\n        /// </summary>\r\n        public string FormattedDependentValue\r\n        {\r\n            get { return GetValue(FormattedDependentValueProperty) as string; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the FormattedDependentValue dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty FormattedDependentValueProperty =\r\n            DependencyProperty.Register(\r\n                \"FormattedDependentValue\",\r\n                typeof(string),\r\n                typeof(DataPoint),\r\n                null);\r\n        #endregion public string FormattedDependentValue\r\n\r\n        #region public string FormattedIndependentValue\r\n        /// <summary>\r\n        /// Gets the IndependentValue as formatted by the IndependentValueStringFormat property.\r\n        /// </summary>\r\n        public string FormattedIndependentValue\r\n        {\r\n            get { return GetValue(FormattedIndependentValueProperty) as string; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the FormattedIndependentValue dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty FormattedIndependentValueProperty =\r\n            DependencyProperty.Register(\r\n                \"FormattedIndependentValue\",\r\n                typeof(string),\r\n                typeof(DataPoint),\r\n                null);\r\n        #endregion public string FormattedIndependentValue\r\n        \r\n        /// <summary>\r\n        /// Called when the independent value of the data point is changed.\r\n        /// </summary>\r\n        internal event RoutedPropertyChangedEventHandler<object> IndependentValueChanged;\r\n\r\n        #region public object IndependentValue\r\n        /// <summary>\r\n        /// Gets or sets the independent value.\r\n        /// </summary>\r\n        public object IndependentValue\r\n        {\r\n            get { return GetValue(IndependentValueProperty); }\r\n            set { SetValue(IndependentValueProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the IndependentValue dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty IndependentValueProperty =\r\n            DependencyProperty.Register(\r\n                \"IndependentValue\",\r\n                typeof(object),\r\n                typeof(DataPoint),\r\n                new PropertyMetadata(null, OnIndependentValuePropertyChanged));\r\n\r\n        /// <summary>\r\n        /// Called when the IndependentValue property changes.\r\n        /// </summary>\r\n        /// <param name=\"d\">Control that changed its IndependentValue.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnIndependentValuePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DataPoint source = (DataPoint)d;\r\n            object oldValue = e.OldValue;\r\n            object newValue = e.NewValue;\r\n            source.OnIndependentValuePropertyChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the IndependentValue property changes.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">The old value.</param>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        protected virtual void OnIndependentValuePropertyChanged(object oldValue, object newValue)\r\n        {\r\n            SetFormattedProperty(FormattedIndependentValueProperty, IndependentValueStringFormat, newValue);\r\n            RoutedPropertyChangedEventHandler<object> handler = this.IndependentValueChanged;\r\n            if (handler != null)\r\n            {\r\n                handler(this, new RoutedPropertyChangedEventArgs<object>(oldValue, newValue));\r\n            }\r\n\r\n            if (this.State == DataPointState.Created)\r\n            {\r\n                // Prefer setting the value as a double...\r\n                double coercedNewValue;\r\n                if (ValueHelper.TryConvert(newValue, out coercedNewValue))\r\n                {\r\n                    ActualIndependentValue = coercedNewValue;\r\n                }\r\n                else\r\n                {\r\n                    // ... but fall back otherwise\r\n                    ActualIndependentValue = newValue;\r\n                }\r\n            }\r\n        }\r\n        #endregion public object IndependentValue\r\n\r\n        #region public string IndependentValueStringFormat\r\n        /// <summary>\r\n        /// Gets or sets the format string for the FormattedIndependentValue property.\r\n        /// </summary>\r\n        public string IndependentValueStringFormat\r\n        {\r\n            get { return GetValue(IndependentValueStringFormatProperty) as string; }\r\n            set { SetValue(IndependentValueStringFormatProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the IndependentValueStringFormat dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty IndependentValueStringFormatProperty =\r\n            DependencyProperty.Register(\r\n                \"IndependentValueStringFormat\",\r\n                typeof(string),\r\n                typeof(DataPoint),\r\n                new PropertyMetadata(null, OnIndependentValueStringFormatPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// Called when the value of the IndependentValueStringFormat property changes.\r\n        /// </summary>\r\n        /// <param name=\"d\">Control that changed its IndependentValueStringFormat.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnIndependentValueStringFormatPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DataPoint source = d as DataPoint;\r\n            string oldValue = e.OldValue as string;\r\n            string newValue = e.NewValue as string;\r\n            source.OnIndependentValueStringFormatPropertyChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the value of the IndependentValueStringFormat property changes.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">The value to be replaced.</param>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        protected virtual void OnIndependentValueStringFormatPropertyChanged(string oldValue, string newValue)\r\n        {\r\n            SetFormattedProperty(FormattedIndependentValueProperty, newValue, IndependentValue);\r\n        }\r\n        #endregion public string IndependentValueStringFormat\r\n\r\n        /// <summary>\r\n        /// Occurs when the actual independent value of the data point is \r\n        /// changed.\r\n        /// </summary>\r\n        internal event RoutedPropertyChangedEventHandler<object> ActualIndependentValueChanged;\r\n\r\n        #region public object ActualIndependentValue\r\n        /// <summary>\r\n        /// Gets or sets the actual independent value.\r\n        /// </summary>\r\n        public object ActualIndependentValue\r\n        {\r\n            get { return (object)GetValue(ActualIndependentValueProperty); }\r\n            set { SetValue(ActualIndependentValueProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// A value indicating whether the actual independent value is being\r\n        /// coerced.\r\n        /// </summary>\r\n        private bool _isCoercingActualIndependentValue;\r\n\r\n        /// <summary>\r\n        /// The preserved previous actual dependent value before coercion.\r\n        /// </summary>\r\n        private object _oldActualIndependentValueBeforeCoercion;\r\n\r\n        /// <summary>\r\n        /// Identifies the ActualIndependentValue dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ActualIndependentValueProperty =\r\n            DependencyProperty.Register(\r\n                \"ActualIndependentValue\",\r\n                typeof(object),\r\n                typeof(DataPoint),\r\n                new PropertyMetadata(OnActualIndependentValuePropertyChanged));\r\n\r\n        /// <summary>\r\n        /// Called when the ActualIndependentValue property changes.\r\n        /// </summary>\r\n        /// <param name=\"d\">Control that changed its ActualIndependentValue.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnActualIndependentValuePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DataPoint source = (DataPoint)d;\r\n            object oldValue = (object)e.OldValue;\r\n            object newValue = (object)e.NewValue;\r\n            source.OnActualIndependentValuePropertyChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the ActualIndependentValue property changes.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">The value to be replaced.</param>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        protected virtual void OnActualIndependentValuePropertyChanged(object oldValue, object newValue)\r\n        {\r\n            double coercedValue = 0.0;\r\n            if (!(newValue is double) && ValueHelper.TryConvert(newValue, out coercedValue))\r\n            {\r\n                _isCoercingActualIndependentValue = true;\r\n                _oldActualIndependentValueBeforeCoercion = oldValue;\r\n            }\r\n\r\n            if (!_isCoercingActualIndependentValue)\r\n            {\r\n                if (_oldActualIndependentValueBeforeCoercion != null)\r\n                {\r\n                    oldValue = _oldActualIndependentValueBeforeCoercion;\r\n                    _oldActualIndependentValueBeforeCoercion = null;\r\n                }\r\n\r\n                RoutedPropertyChangedEventHandler<object> handler = this.ActualIndependentValueChanged;\r\n                if (handler != null)\r\n                {\r\n                    handler(this, new RoutedPropertyChangedEventArgs<object>(oldValue, newValue));\r\n                }\r\n            }\r\n\r\n            if (_isCoercingActualIndependentValue)\r\n            {\r\n                _isCoercingActualIndependentValue = false;\r\n                this.ActualIndependentValue = coercedValue;\r\n            }\r\n        }\r\n        #endregion public object ActualIndependentValue\r\n\r\n        /// <summary>\r\n        /// Occurs when the state of a data point is changed.\r\n        /// </summary>\r\n        internal event RoutedPropertyChangedEventHandler<DataPointState> StateChanged;\r\n\r\n        #region public DataPointState State\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether the State property is being\r\n        /// coerced to its previous value.\r\n        /// </summary>\r\n        private bool IsCoercingState { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the state of the data point.\r\n        /// </summary>\r\n        internal DataPointState State\r\n        {\r\n            get { return (DataPointState)GetValue(StateProperty); }\r\n            set { SetValue(StateProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the State dependency property.\r\n        /// </summary>\r\n        internal static readonly DependencyProperty StateProperty =\r\n            DependencyProperty.Register(\r\n                \"State\",\r\n                typeof(DataPointState),\r\n                typeof(DataPoint),\r\n                new PropertyMetadata(DataPointState.Created, OnStatePropertyChanged));\r\n\r\n        /// <summary>\r\n        /// Called when the value of the State property changes.\r\n        /// </summary>\r\n        /// <param name=\"d\">Control that changed its State.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnStatePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DataPoint source = (DataPoint)d;\r\n            DataPointState oldValue = (DataPointState)e.OldValue;\r\n            DataPointState newValue = (DataPointState)e.NewValue;\r\n            source.OnStatePropertyChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the value of the State property changes.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">The value to be replaced.</param>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        protected virtual void OnStatePropertyChanged(DataPointState oldValue, DataPointState newValue)\r\n        {\r\n            if (!IsCoercingState)\r\n            {\r\n                // If state ever goes to or past PendingRemoval, the DataPoint is no longer active\r\n                if (DataPointState.PendingRemoval <= newValue)\r\n                {\r\n                    IsActive = false;\r\n                }\r\n\r\n                if (newValue < oldValue)\r\n                {\r\n                    // If we've somehow gone backwards in the life cycle (other \r\n                    // than when we go back to normal from updating) coerce to \r\n                    // old value.\r\n                    IsCoercingState = true;\r\n                    this.State = oldValue;\r\n                    IsCoercingState = false;\r\n                }\r\n                else\r\n                {\r\n                    // Update selection\r\n                    if (newValue > DataPointState.Normal)\r\n                    {\r\n                        this.IsSelectionEnabled = false;\r\n                    }\r\n\r\n                    // Start state transition\r\n                    bool transitionStarted = false;\r\n                    switch (newValue)\r\n                    {\r\n                        case DataPointState.Showing:\r\n                        case DataPointState.Hiding:\r\n                            transitionStarted = GoToCurrentRevealState();\r\n                            break;\r\n                    }\r\n\r\n                    // Fire Changed event\r\n                    RoutedPropertyChangedEventHandler<DataPointState> handler = this.StateChanged;\r\n                    if (handler != null)\r\n                    {\r\n                        handler(this, new RoutedPropertyChangedEventArgs<DataPointState>(oldValue, newValue));\r\n                    }\r\n\r\n                    // Change state if no transition started\r\n                    if (!transitionStarted && _templateApplied)\r\n                    {\r\n                        switch (newValue)\r\n                        {\r\n                            case DataPointState.Showing:\r\n                                State = DataPointState.Normal;\r\n                                break;\r\n                            case DataPointState.Hiding:\r\n                                State = DataPointState.Hidden;\r\n                                break;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n        #endregion internal DataPointState State\r\n\r\n        /// <summary>\r\n        /// Gets the implementation root of the Control.\r\n        /// </summary>\r\n        private FrameworkElement ImplementationRoot\r\n        {\r\n            get\r\n            {\r\n                return (1 == VisualTreeHelper.GetChildrenCount(this)) ? VisualTreeHelper.GetChild(this, 0) as FrameworkElement : null;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Tracks whether the Reveal/Shown VisualState is available.\r\n        /// </summary>\r\n        private bool _haveStateRevealShown;\r\n\r\n        /// <summary>\r\n        /// Tracks whether the Reveal/Hidden VisualState is available.\r\n        /// </summary>\r\n        private bool _haveStateRevealHidden;\r\n\r\n        /// <summary>\r\n        /// Tracks whether the template has been applied yet.\r\n        /// </summary>\r\n        private bool _templateApplied;\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the DataPoint class.\r\n        /// </summary>\r\n        protected DataPoint()\r\n        {\r\n            Loaded += new RoutedEventHandler(OnLoaded);\r\n            IsActive = true;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the Control's visuals to reflect the current state(s).\r\n        /// </summary>\r\n        /// <returns>True if a state transition was started.</returns>\r\n        private bool GoToCurrentRevealState()\r\n        {\r\n            bool transitionStarted = false;\r\n            string stateName = null;\r\n            switch (State)\r\n            {\r\n                case DataPointState.Showing:\r\n                    if (_haveStateRevealShown)\r\n                    {\r\n                        stateName = StateRevealShown;\r\n                    }\r\n                    break;\r\n                case DataPointState.Hiding:\r\n                    if (_haveStateRevealHidden)\r\n                    {\r\n                        stateName = StateRevealHidden;\r\n                    }\r\n                    break;\r\n            }\r\n            if (null != stateName)\r\n            {\r\n                if (!DesignerProperties.GetIsInDesignMode(this))\r\n                {\r\n                    // The use of Dispatcher.BeginInvoke here is necessary to \r\n                    // work around the StackOverflowException Silverlight throws \r\n                    // when it tries to play too many VSM animations.\r\n                    Dispatcher.BeginInvoke(new Action(() => VisualStateManager.GoToState(this, stateName, true)));\r\n                }\r\n                else\r\n                {\r\n                    VisualStateManager.GoToState(this, stateName, false);\r\n                }\r\n                transitionStarted = true;\r\n            }\r\n            return transitionStarted;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Builds the visual tree for the DataPoint when a new template is applied.\r\n        /// </summary>\r\n        public override void OnApplyTemplate()\r\n        {\r\n            // Unhook CurrentStateChanged handler\r\n            VisualStateGroup groupReveal = VisualStateManager.GetVisualStateGroups(ImplementationRoot).CastWrapper<VisualStateGroup>().Where(group => GroupRevealStates == group.Name).FirstOrDefault();\r\n            if (null != groupReveal)\r\n            {\r\n                groupReveal.CurrentStateChanged -= new EventHandler<VisualStateChangedEventArgs>(OnCurrentStateChanged);\r\n            }\r\n\r\n            base.OnApplyTemplate();\r\n\r\n            // Hook CurrentStateChanged handler\r\n            _haveStateRevealShown = false;\r\n            _haveStateRevealHidden = false;\r\n            groupReveal = VisualStateManager.GetVisualStateGroups(ImplementationRoot).CastWrapper<VisualStateGroup>().Where(group => GroupRevealStates == group.Name).FirstOrDefault();\r\n            if (null != groupReveal)\r\n            {\r\n                groupReveal.CurrentStateChanged += new EventHandler<VisualStateChangedEventArgs>(OnCurrentStateChanged);\r\n                _haveStateRevealShown = groupReveal.States.CastWrapper<VisualState>().Where(state => StateRevealShown == state.Name).Any();\r\n                _haveStateRevealHidden = groupReveal.States.CastWrapper<VisualState>().Where(state => StateRevealHidden == state.Name).Any();\r\n            }\r\n\r\n            _templateApplied = true;\r\n\r\n            // Go to current state(s)\r\n            GoToCurrentRevealState();\r\n\r\n            if (DesignerProperties.GetIsInDesignMode(this))\r\n            {\r\n                // Transition to Showing state in design mode so DataPoint will be visible\r\n                State = DataPointState.Showing;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Changes the DataPoint object's state after one of the VSM state animations completes.\r\n        /// </summary>\r\n        /// <param name=\"sender\">Event source.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private void OnCurrentStateChanged(object sender, VisualStateChangedEventArgs e)\r\n        {\r\n            switch (e.NewState.Name)\r\n            {\r\n                case StateRevealShown:\r\n                    if (State == DataPointState.Showing)\r\n                    {\r\n                        State = DataPointState.Normal;\r\n                    }\r\n                    break;\r\n                case StateRevealHidden:\r\n                    if (State == DataPointState.Hiding)\r\n                    {\r\n                        State = DataPointState.Hidden;\r\n                    }\r\n                    break;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the Control's Loaded event.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The Control.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private void OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            GoToCurrentRevealState();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Provides handling for the MouseEnter event.\r\n        /// </summary>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        protected override void OnMouseEnter(MouseEventArgs e)\r\n        {\r\n            base.OnMouseEnter(e);\r\n\r\n            if (IsSelectionEnabled)\r\n            {\r\n                IsHovered = true;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Provides handling for the MouseLeave event.\r\n        /// </summary>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        protected override void OnMouseLeave(MouseEventArgs e)\r\n        {\r\n            base.OnMouseLeave(e);\r\n            if (IsSelectionEnabled)\r\n            {\r\n                IsHovered = false;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Provides handling for the MouseLeftButtonDown event.\r\n        /// </summary>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)\r\n        {\r\n            if (DefinitionSeriesIsSelectionEnabledHandling)\r\n            {\r\n                // DefinitionSeries-compatible handling\r\n                if (!IsSelectionEnabled)\r\n                {\r\n                    // Prevents clicks from bubbling to background, but necessary\r\n                    // to avoid letting ListBoxItem select the item\r\n                    e.Handled = true;\r\n                }\r\n                base.OnMouseLeftButtonDown(e);\r\n            }\r\n            else\r\n            {\r\n                // Traditional handling\r\n                base.OnMouseLeftButtonDown(e);\r\n                if (IsSelectionEnabled)\r\n                {\r\n                    IsSelected = (ModifierKeys.None == (ModifierKeys.Control & Keyboard.Modifiers));\r\n                    e.Handled = true;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether to handle IsSelectionEnabled in the DefinitionSeries manner.\r\n        /// </summary>\r\n        internal bool DefinitionSeriesIsSelectionEnabledHandling { get; set; }\r\n\r\n        /// <summary>\r\n        /// Sets a dependency property with the specified format.\r\n        /// </summary>\r\n        /// <param name=\"property\">The DependencyProperty to set.</param>\r\n        /// <param name=\"format\">The Format string to apply to the value.</param>\r\n        /// <param name=\"value\">The value of the dependency property to be formatted.</param>\r\n        internal void SetFormattedProperty(DependencyProperty property, string format, object value)\r\n        {\r\n            SetValue(property, string.Format(CultureInfo.CurrentCulture, format ?? \"{0}\", value));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/DataPoint/DataPointState.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Describes the state a data point is in.\r\n    /// </summary>\r\n    public enum DataPointState\r\n    {\r\n        /// <summary>\r\n        /// Data point has been created.\r\n        /// </summary>\r\n        Created,\r\n\r\n        /// <summary>\r\n        /// Data point is in the process of being revealed.\r\n        /// </summary>\r\n        Showing,\r\n\r\n        /// <summary>\r\n        /// Data point is visible in the plot area.\r\n        /// </summary>\r\n        Normal,\r\n\r\n        /// <summary>\r\n        /// Data point is in the process of being removed from the plot area.\r\n        /// </summary>\r\n        PendingRemoval,\r\n\r\n        /// <summary>\r\n        /// Data point is in the process of being hidden.\r\n        /// </summary>\r\n        Hiding,\r\n\r\n        /// <summary>\r\n        /// Data point is hidden.\r\n        /// </summary>\r\n        Hidden,\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/DataPoint/LineDataPoint.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Represents a data point used for a line series.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    [TemplateVisualState(Name = DataPoint.StateCommonNormal, GroupName = DataPoint.GroupCommonStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateCommonMouseOver, GroupName = DataPoint.GroupCommonStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateSelectionUnselected, GroupName = DataPoint.GroupSelectionStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateSelectionSelected, GroupName = DataPoint.GroupSelectionStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateRevealShown, GroupName = DataPoint.GroupRevealStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateRevealHidden, GroupName = DataPoint.GroupRevealStates)]\r\n    public partial class LineDataPoint : DataPoint\r\n    {\r\n        /// <summary>\r\n        /// Initializes the static members of the LineDataPoint class.\r\n        /// </summary>\r\n        static LineDataPoint()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(LineDataPoint), new FrameworkPropertyMetadata(typeof(LineDataPoint)));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the LineDataPoint class.\r\n        /// </summary>\r\n        public LineDataPoint()\r\n        {\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/DataPoint/PieDataPoint.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Represents a data point used for a pie series.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    [TemplatePart(Name = SliceName, Type = typeof(UIElement))]\r\n    [TemplateVisualState(Name = DataPoint.StateCommonNormal, GroupName = DataPoint.GroupCommonStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateCommonMouseOver, GroupName = DataPoint.GroupCommonStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateSelectionUnselected, GroupName = DataPoint.GroupSelectionStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateSelectionSelected, GroupName = DataPoint.GroupSelectionStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateRevealShown, GroupName = DataPoint.GroupRevealStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateRevealHidden, GroupName = DataPoint.GroupRevealStates)]\r\n    public class PieDataPoint : DataPoint\r\n    {\r\n        /// <summary>\r\n        /// The name of the slice template part.\r\n        /// </summary>\r\n        private const string SliceName = \"Slice\";\r\n\r\n        /// <summary>\r\n        /// Name of the ActualDataPointStyle property.\r\n        /// </summary>\r\n        internal const string ActualDataPointStyleName = \"ActualDataPointStyle\";\r\n\r\n        #region public Geometry Geometry\r\n        /// <summary>\r\n        /// Gets or sets the Geometry property which defines the shape of the\r\n        /// data point.\r\n        /// </summary>\r\n        public Geometry Geometry\r\n        {\r\n            get { return GetValue(GeometryProperty) as Geometry; }\r\n            set { SetValue(GeometryProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Geometry dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty GeometryProperty =\r\n            DependencyProperty.Register(\r\n                \"Geometry\",\r\n                typeof(Geometry),\r\n                typeof(PieDataPoint),\r\n                null);\r\n        #endregion public Geometry Geometry\r\n\r\n        // GeometrySelection and GeometryHighlight exist on Silverlight because\r\n        // a single Geometry object can not be the target of multiple\r\n        // TemplateBindings - yet the default template has 3 Paths that bind.\r\n\r\n        #region public Geometry GeometrySelection\r\n        /// <summary>\r\n        /// Gets or sets the Geometry which defines the shape of a point. The \r\n        /// GeometrySelection property is a copy of the Geometry property.\r\n        /// </summary>\r\n        public Geometry GeometrySelection\r\n        {\r\n            get { return GetValue(GeometrySelectionProperty) as Geometry; }\r\n            set { SetValue(GeometrySelectionProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the GeometrySelection dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty GeometrySelectionProperty =\r\n            DependencyProperty.Register(\r\n                \"GeometrySelection\",\r\n                typeof(Geometry),\r\n                typeof(PieDataPoint),\r\n                null);\r\n        #endregion public Geometry GeometrySelection\r\n\r\n        #region public Geometry GeometryHighlight\r\n        /// <summary>\r\n        /// Gets or sets the GeometryHighlight property which is a clone of the\r\n        /// Geometry property.\r\n        /// </summary>\r\n        public Geometry GeometryHighlight\r\n        {\r\n            get { return GetValue(GeometryHighlightProperty) as Geometry; }\r\n            set { SetValue(GeometryHighlightProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the GeometryHighlight dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty GeometryHighlightProperty =\r\n            DependencyProperty.Register(\r\n                \"GeometryHighlight\",\r\n                typeof(Geometry),\r\n                typeof(PieDataPoint),\r\n                null);\r\n        #endregion public Geometry GeometryHighlight\r\n\r\n        /// <summary>\r\n        /// Occurs when the actual offset ratio of the pie data point changes.\r\n        /// </summary>\r\n        internal event RoutedPropertyChangedEventHandler<double> ActualOffsetRatioChanged;\r\n\r\n        #region public double ActualOffsetRatio\r\n        /// <summary>\r\n        /// Gets or sets the offset ratio that is displayed on the screen.\r\n        /// </summary>\r\n        public double ActualOffsetRatio\r\n        {\r\n            get { return (double)GetValue(ActualOffsetRatioProperty); }\r\n            set { SetValue(ActualOffsetRatioProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ActualOffsetRatio dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ActualOffsetRatioProperty =\r\n            DependencyProperty.Register(\r\n                \"ActualOffsetRatio\",\r\n                typeof(double),\r\n                typeof(PieDataPoint),\r\n                new PropertyMetadata(OnActualOffsetRatioPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// Called when the value of the ActualOffsetRatioProperty property changes.\r\n        /// </summary>\r\n        /// <param name=\"d\">PieDataPoint that changed its ActualOffsetRatio.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnActualOffsetRatioPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            PieDataPoint source = (PieDataPoint)d;\r\n            double oldValue = (double)e.OldValue;\r\n            double newValue = (double)e.NewValue;\r\n            source.OnActualOffsetRatioPropertyChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the value of the ActualOffsetRatioProperty property changes.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">The value to be replaced.</param>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        private void OnActualOffsetRatioPropertyChanged(double oldValue, double newValue)\r\n        {\r\n            RoutedPropertyChangedEventHandler<double> handler = this.ActualOffsetRatioChanged;\r\n            if (handler != null)\r\n            {\r\n                handler(this, new RoutedPropertyChangedEventArgs<double>(oldValue, newValue));\r\n            }\r\n\r\n            if (DesignerProperties.GetIsInDesignMode(this))\r\n            {\r\n                PieSeries.UpdatePieDataPointGeometry(this, ActualWidth, ActualHeight);\r\n            }\r\n        }\r\n        #endregion public double ActualOffsetRatio\r\n\r\n        /// <summary>\r\n        /// An event raised when the actual ratio of the pie data point is\r\n        /// changed.\r\n        /// </summary>\r\n        internal event RoutedPropertyChangedEventHandler<double> ActualRatioChanged;\r\n\r\n        #region public double ActualRatio\r\n        /// <summary>\r\n        /// Gets or sets the ratio displayed on the screen.\r\n        /// </summary>\r\n        public double ActualRatio\r\n        {\r\n            get { return (double)GetValue(ActualRatioProperty); }\r\n            set { SetValue(ActualRatioProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ActualRatio dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ActualRatioProperty =\r\n            DependencyProperty.Register(\r\n                \"ActualRatio\",\r\n                typeof(double),\r\n                typeof(PieDataPoint),\r\n                new PropertyMetadata(OnActualRatioPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// Called when the value of the ActualRatioProperty property changes.\r\n        /// </summary>\r\n        /// <param name=\"d\">PieDataPoint that changed its ActualRatio.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnActualRatioPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            PieDataPoint source = (PieDataPoint)d;\r\n            double oldValue = (double)e.OldValue;\r\n            double newValue = (double)e.NewValue;\r\n            source.OnActualRatioPropertyChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the value of the ActualRatioProperty property changes.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">The value to be replaced.</param>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        private void OnActualRatioPropertyChanged(double oldValue, double newValue)\r\n        {\r\n            if (ValueHelper.CanGraph(newValue))\r\n            {\r\n                RoutedPropertyChangedEventHandler<double> handler = this.ActualRatioChanged;\r\n                if (handler != null)\r\n                {\r\n                    handler(this, new RoutedPropertyChangedEventArgs<double>(oldValue, newValue));\r\n                }\r\n            }\r\n            else\r\n            {\r\n                this.ActualRatio = 0.0;\r\n            }\r\n\r\n            if (DesignerProperties.GetIsInDesignMode(this))\r\n            {\r\n                PieSeries.UpdatePieDataPointGeometry(this, ActualWidth, ActualHeight);\r\n            }\r\n        }\r\n        #endregion public double ActualRatio\r\n\r\n        #region public string FormattedRatio\r\n        /// <summary>\r\n        /// Gets the Ratio with the value of the RatioStringFormat property applied.\r\n        /// </summary>\r\n        public string FormattedRatio\r\n        {\r\n            get { return GetValue(FormattedRatioProperty) as string; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the FormattedRatio dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty FormattedRatioProperty =\r\n            DependencyProperty.Register(\r\n                \"FormattedRatio\",\r\n                typeof(string),\r\n                typeof(PieDataPoint),\r\n                null);\r\n        #endregion public string FormattedRatio\r\n\r\n        /// <summary>\r\n        /// An event raised when the offset ratio of the pie data point is\r\n        /// changed.\r\n        /// </summary>\r\n        internal event RoutedPropertyChangedEventHandler<double> OffsetRatioChanged;\r\n\r\n        #region public double OffsetRatio\r\n        /// <summary>\r\n        /// Gets or sets the offset ratio of the pie data point.\r\n        /// </summary>\r\n        public double OffsetRatio\r\n        {\r\n            get { return (double)GetValue(OffsetRatioProperty); }\r\n            set { SetValue(OffsetRatioProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the OffsetRatio dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty OffsetRatioProperty =\r\n            DependencyProperty.Register(\r\n                \"OffsetRatio\",\r\n                typeof(double),\r\n                typeof(PieDataPoint),\r\n                new PropertyMetadata(OnOffsetRatioPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// Called when the value of the OffsetRatioProperty property changes.\r\n        /// </summary>\r\n        /// <param name=\"d\">PieDataPoint that changed its OffsetRatio.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnOffsetRatioPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            PieDataPoint source = (PieDataPoint)d;\r\n            double oldValue = (double)e.OldValue;\r\n            double newValue = (double)e.NewValue;\r\n            source.OnOffsetRatioPropertyChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the value of the OffsetRatioProperty property changes.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">The value to be replaced.</param>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        private void OnOffsetRatioPropertyChanged(double oldValue, double newValue)\r\n        {\r\n            if (ValueHelper.CanGraph(newValue))\r\n            {\r\n                RoutedPropertyChangedEventHandler<double> handler = this.OffsetRatioChanged;\r\n                if (handler != null)\r\n                {\r\n                    handler(this, new RoutedPropertyChangedEventArgs<double>(oldValue, newValue));\r\n                }\r\n                if (this.State == DataPointState.Created)\r\n                {\r\n                    ActualOffsetRatio = newValue;\r\n                }\r\n            }\r\n            else\r\n            {\r\n                this.OffsetRatio = 0.0;\r\n            }\r\n        }\r\n        #endregion public double OffsetRatio\r\n\r\n        /// <summary>\r\n        /// An event raised when the ratio of the pie data point is\r\n        /// changed.\r\n        /// </summary>\r\n        internal event RoutedPropertyChangedEventHandler<double> RatioChanged;\r\n\r\n        #region public double Ratio\r\n        /// <summary>\r\n        /// Gets or sets the ratio of the total that the data point \r\n        /// represents.\r\n        /// </summary>\r\n        public double Ratio\r\n        {\r\n            get { return (double)GetValue(RatioProperty); }\r\n            set { SetValue(RatioProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Ratio dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty RatioProperty =\r\n            DependencyProperty.Register(\r\n                \"Ratio\",\r\n                typeof(double),\r\n                typeof(PieDataPoint),\r\n                new PropertyMetadata(OnRatioPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// Called when the value of the RatioProperty property changes.\r\n        /// </summary>\r\n        /// <param name=\"d\">PieDataPoint that changed its Ratio.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnRatioPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            PieDataPoint source = (PieDataPoint)d;\r\n            double oldValue = (double)e.OldValue;\r\n            double newValue = (double)e.NewValue;\r\n            source.OnRatioPropertyChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the value of the RatioProperty property changes.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">The value to be replaced.</param>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        private void OnRatioPropertyChanged(double oldValue, double newValue)\r\n        {\r\n            if (ValueHelper.CanGraph(newValue))\r\n            {\r\n                SetFormattedProperty(FormattedRatioProperty, RatioStringFormat, newValue);\r\n                RoutedPropertyChangedEventHandler<double> handler = this.RatioChanged;\r\n                if (handler != null)\r\n                {\r\n                    handler(this, new RoutedPropertyChangedEventArgs<double>(oldValue, newValue));\r\n                }\r\n\r\n                if (this.State == DataPointState.Created)\r\n                {\r\n                    ActualRatio = newValue;\r\n                }\r\n            }\r\n            else\r\n            {\r\n                this.Ratio = 0.0;\r\n            }\r\n        }\r\n        #endregion public double Ratio\r\n\r\n        #region public string RatioStringFormat\r\n        /// <summary>\r\n        /// Gets or sets the format string for the FormattedRatio property.\r\n        /// </summary>\r\n        public string RatioStringFormat\r\n        {\r\n            get { return GetValue(RatioStringFormatProperty) as string; }\r\n            set { SetValue(RatioStringFormatProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the RatioStringFormat dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty RatioStringFormatProperty =\r\n            DependencyProperty.Register(\r\n                \"RatioStringFormat\",\r\n                typeof(string),\r\n                typeof(PieDataPoint),\r\n                new PropertyMetadata(null, OnRatioStringFormatPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// Called when the value of the RatioStringFormatProperty property changes.\r\n        /// </summary>\r\n        /// <param name=\"d\">PieDataPoint that changed its RatioStringFormat.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnRatioStringFormatPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            PieDataPoint source = d as PieDataPoint;\r\n            string newValue = e.NewValue as string;\r\n            source.OnRatioStringFormatPropertyChanged(newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the value of the RatioStringFormatProperty property changes.\r\n        /// </summary>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        private void OnRatioStringFormatPropertyChanged(string newValue)\r\n        {\r\n            SetFormattedProperty(FormattedRatioProperty, newValue, Ratio);\r\n        }\r\n        #endregion public string RatioStringFormat\r\n\r\n        #region internal Style ActualDataPointStyle\r\n        /// <summary>\r\n        /// Gets or sets the actual style used for the data points.\r\n        /// </summary>\r\n        internal Style ActualDataPointStyle\r\n        {\r\n            get { return GetValue(ActualDataPointStyleProperty) as Style; }\r\n            set { SetValue(ActualDataPointStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ActualDataPointStyle dependency property.\r\n        /// </summary>\r\n        internal static readonly DependencyProperty ActualDataPointStyleProperty =\r\n            DependencyProperty.Register(\r\n                ActualDataPointStyleName,\r\n                typeof(Style),\r\n                typeof(PieDataPoint),\r\n                null);\r\n        #endregion internal Style ActualDataPointStyle\r\n\r\n        #region internal Style ActualLegendItemStyle\r\n        /// <summary>\r\n        /// Gets or sets the actual style used for the legend item.\r\n        /// </summary>\r\n        internal Style ActualLegendItemStyle\r\n        {\r\n            get { return GetValue(ActualLegendItemStyleProperty) as Style; }\r\n            set { SetValue(ActualLegendItemStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ActualLegendItemStyle dependency property.\r\n        /// </summary>\r\n        internal static readonly DependencyProperty ActualLegendItemStyleProperty =\r\n            DependencyProperty.Register(\r\n                DataPointSeries.ActualLegendItemStyleName,\r\n                typeof(Style),\r\n                typeof(PieDataPoint),\r\n                null);\r\n        #endregion protected Style ActualLegendItemStyle\r\n\r\n        /// <summary>\r\n        /// Gets the Palette-dispensed ResourceDictionary for the Series.\r\n        /// </summary>\r\n        protected internal ResourceDictionary PaletteResources { get; internal set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the element that represents the pie slice.\r\n        /// </summary>\r\n        private UIElement SliceElement { get; set; }\r\n\r\n        /// <summary>\r\n        /// Initializes the static members of the PieDataPoint class.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1810:InitializeReferenceTypeStaticFieldsInline\", Justification = \"Dependency properties are initialized in-line.\")]\r\n        static PieDataPoint()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(PieDataPoint), new FrameworkPropertyMetadata(typeof(PieDataPoint)));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the PieDataPoint class.\r\n        /// </summary>\r\n        public PieDataPoint()\r\n        {\r\n            if (DesignerProperties.GetIsInDesignMode(this))\r\n            {\r\n                // Create default design-mode-friendly settings\r\n                ActualRatio = 0.2;\r\n                SizeChanged += delegate(object sender, SizeChangedEventArgs e)\r\n                {\r\n                    // Handle SizeChanged event to update Geometry dynamically\r\n                    PieSeries.UpdatePieDataPointGeometry(this, e.NewSize.Width, e.NewSize.Height);\r\n                };\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Builds the visual tree for the PieDataPoint when a new template is applied.\r\n        /// </summary>\r\n        public override void OnApplyTemplate()\r\n        {\r\n            if (null != SliceElement)\r\n            {\r\n                SliceElement.MouseEnter -= new MouseEventHandler(SliceElement_MouseEnter);\r\n                SliceElement.MouseLeave -= new MouseEventHandler(SliceElement_MouseLeave);\r\n            }\r\n\r\n            base.OnApplyTemplate();\r\n\r\n            SliceElement = GetTemplateChild(SliceName) as UIElement;\r\n\r\n            if (null != SliceElement)\r\n            {\r\n                SliceElement.MouseEnter += new MouseEventHandler(SliceElement_MouseEnter);\r\n                SliceElement.MouseLeave += new MouseEventHandler(SliceElement_MouseLeave);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Provides handling for the MouseEnter event.\r\n        /// </summary>\r\n        /// <param name=\"e\">The event data.</param>\r\n        protected override void OnMouseEnter(MouseEventArgs e)\r\n        {\r\n            // Do nothing because PieDataPoint handles SliceElement.MouseEnter instead\r\n        }\r\n\r\n        /// <summary>\r\n        /// Provides handling for the MouseLeave event.\r\n        /// </summary>\r\n        /// <param name=\"e\">The event data.</param>\r\n        protected override void OnMouseLeave(MouseEventArgs e)\r\n        {\r\n            // Do nothing because PieDataPoint handles SliceElement.MouseLeave instead\r\n        }\r\n\r\n        /// <summary>\r\n        /// Provides handling for the MouseEnter event.\r\n        /// </summary>\r\n        /// <param name=\"sender\">Event source.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void SliceElement_MouseEnter(object sender, MouseEventArgs e)\r\n        {\r\n            // Defer to Control's default MouseEnter handling\r\n            base.OnMouseEnter(e);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Provides handling for the MouseLeave event.\r\n        /// </summary>\r\n        /// <param name=\"sender\">Event source.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void SliceElement_MouseLeave(object sender, MouseEventArgs e)\r\n        {\r\n            // Defer to Control's default MouseLeave handling\r\n            base.OnMouseLeave(e);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/DataPoint/ScatterDataPoint.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Represents a data point used for a scatter series.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    [TemplateVisualState(Name = DataPoint.StateCommonNormal, GroupName = DataPoint.GroupCommonStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateCommonMouseOver, GroupName = DataPoint.GroupCommonStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateSelectionUnselected, GroupName = DataPoint.GroupSelectionStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateSelectionSelected, GroupName = DataPoint.GroupSelectionStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateRevealShown, GroupName = DataPoint.GroupRevealStates)]\r\n    [TemplateVisualState(Name = DataPoint.StateRevealHidden, GroupName = DataPoint.GroupRevealStates)]\r\n    public partial class ScatterDataPoint : DataPoint\r\n    {\r\n        /// <summary>\r\n        /// Initializes the static members of the ScatterDataPoint class.\r\n        /// </summary>\r\n        static ScatterDataPoint()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(ScatterDataPoint), new FrameworkPropertyMetadata(typeof(ScatterDataPoint)));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the ScatterDataPoint class.\r\n        /// </summary>\r\n        public ScatterDataPoint()\r\n        {\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/FrameworkElementExtensions.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// A set of extension methods for the DataPoint class.\r\n    /// </summary>\r\n    internal static class FrameworkElementExtensions\r\n    {\r\n        /// <summary>\r\n        /// Returns the actual margin for a given framework element and axis.\r\n        /// </summary>\r\n        /// <param name=\"element\">The framework element.</param>\r\n        /// <param name=\"axis\">The axis along which to return the margin.\r\n        /// </param>\r\n        /// <returns>The margin for a given framework element and axis.\r\n        /// </returns>\r\n        public static double GetActualMargin(this FrameworkElement element, IAxis axis)\r\n        {\r\n            double length = 0.0;\r\n            if (axis.Orientation == AxisOrientation.X)\r\n            {\r\n                length = element.ActualWidth;\r\n            }\r\n            else if (axis.Orientation == AxisOrientation.Y)\r\n            {\r\n                length = element.ActualHeight;\r\n            }\r\n            return length / 2.0;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the margin for a given framework element and axis.\r\n        /// </summary>\r\n        /// <param name=\"element\">The framework element.</param>\r\n        /// <param name=\"axis\">The axis along which to return the margin.\r\n        /// </param>\r\n        /// <returns>The margin for a given framework element and axis.\r\n        /// </returns>\r\n        public static double GetMargin(this FrameworkElement element, IAxis axis)\r\n        {\r\n            double length = 0.0;\r\n            if (axis.Orientation == AxisOrientation.X)\r\n            {\r\n                length = !double.IsNaN(element.Width) ? element.Width : element.ActualWidth;\r\n            }\r\n            else if (axis.Orientation == AxisOrientation.Y)\r\n            {\r\n                length = !double.IsNaN(element.Height) ? element.Height : element.ActualHeight;\r\n            }\r\n            return length / 2.0;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Helper/Converters.cs",
    "content": "﻿using System.Windows.Data;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n\tpublic class DoubleToVisibilityConverter : IValueConverter\r\n\t{\r\n\t\tpublic object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)\r\n\t\t{\r\n\t\t\tdouble doubleValue = (double)value;\r\n\t\t\tif (doubleValue == 0.0)\r\n\t\t\t{\r\n\t\t\t\treturn Visibility.Collapsed;\r\n\t\t\t}\r\n\t\t\treturn Visibility.Visible;\r\n\t\t}\r\n\r\n\t\tpublic object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)\r\n\t\t{\r\n\t\t\tthrow new NotImplementedException();\r\n\t\t}\r\n\t}\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Helper/FormattingConverter.cs",
    "content": "﻿using System;\r\nusing System.Net;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Documents;\r\nusing System.Windows.Ink;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Shapes;\r\nusing System.Windows.Data;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    public class FormattingConverter : IValueConverter\r\n    {\r\n        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)\r\n        {\r\n            string formatString = parameter as string;\r\n            return string.Format(\"{0:\" + formatString + \"}\", value);\r\n        }\r\n\r\n        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Helper/TreeHelper.cs",
    "content": "﻿using System.Windows.Media;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n\tinternal static class TreeHelper\r\n\t{\r\n\t\t/// <summary>\r\n\t\t/// Finds the first ancestor of the element passed as a parameter that has type T.\r\n\t\t/// </summary>\r\n\t\t/// <typeparam name=\"T\">The type of the ancestor we're looking for.</typeparam>\r\n\t\t/// <param name=\"visual\">The element where we start our search.</param>\r\n\t\t/// <returns>The first ancestor of element of type T.</returns>\r\n\t\tpublic static T FindAncestor<T>(DependencyObject element) where T : class\r\n\t\t{\r\n\t\t\twhile (element != null)\r\n\t\t\t{\r\n\t\t\t\tDependencyObject parent = VisualTreeHelper.GetParent(element) as DependencyObject;\r\n\t\t\t\tT result = parent as T;\r\n\t\t\t\tif (result != null)\r\n\t\t\t\t{\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t\telement = parent;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/IRequireSeriesHost.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// An object that implements this interface requires a series host.\r\n    /// </summary>\r\n    public interface IRequireSeriesHost\r\n    {\r\n        /// <summary>\r\n        /// Gets or sets the series host.\r\n        /// </summary>\r\n        ISeriesHost SeriesHost { get; set; }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/ISeriesHost.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Defines properties, methods and events for classes that host a \r\n    /// collection of Series objects.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public interface ISeriesHost : IRequireSeriesHost, IResourceDictionaryDispenser\r\n    {\r\n        /// <summary>\r\n        /// Gets the collection of axes the series host has available.\r\n        /// </summary>\r\n        ObservableCollection<IAxis> Axes { get; }\r\n\r\n        /// <summary>\r\n        /// Gets the collection of series the series host has available.\r\n        /// </summary>\r\n        ObservableCollection<ISeries> Series { get; }\r\n\r\n        /// <summary>\r\n        /// Gets the foreground elements.\r\n        /// </summary>\r\n        ObservableCollection<UIElement> ForegroundElements { get; }\r\n\r\n        /// <summary>\r\n        /// Gets the background elements.\r\n        /// </summary>\r\n        ObservableCollection<UIElement> BackgroundElements { get; }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/ISeriesHostExtensions.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Extension methods for series hosts.\r\n    /// </summary>\r\n    internal static class ISeriesHostExtensions\r\n    {\r\n        /// <summary>\r\n        /// Gets all series that track their global indexes recursively.\r\n        /// </summary>\r\n        /// <param name=\"rootSeriesHost\">The root series host.</param>\r\n        /// <returns>A sequence of series.</returns>\r\n        public static IEnumerable<ISeries> GetDescendentSeries(this ISeriesHost rootSeriesHost)\r\n        {\r\n            Queue<ISeries> series = new Queue<ISeries>(rootSeriesHost.Series);\r\n            while (series.Count != 0)\r\n            {\r\n                ISeries currentSeries = series.Dequeue();\r\n                yield return currentSeries;\r\n\r\n                ISeriesHost seriesHost = currentSeries as ISeriesHost;\r\n                if (seriesHost != null)\r\n                {\r\n                    foreach (ISeries childSeries in seriesHost.Series)\r\n                    {\r\n                        series.Enqueue(childSeries);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether an axis is in use by the series \r\n        /// host.\r\n        /// </summary>\r\n        /// <param name=\"that\">The series host.</param>\r\n        /// <param name=\"axis\">The axis that may or may not be used by a \r\n        /// series.</param>\r\n        /// <returns>A value indicating whether an axis is in use by the series \r\n        /// host.</returns>\r\n        public static bool IsUsedByASeries(this ISeriesHost that, IAxis axis)\r\n        {\r\n            return axis.RegisteredListeners.OfType<ISeries>().Intersect(that.Series).Any();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Pie/PieChartHelper.cs",
    "content": "﻿using System.Diagnostics;\r\nusing System.Windows.Media;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n\tinternal static class PieChartHelper\r\n\t{\r\n\t\tconst double DistanceTolerance = 0.01;\r\n\t\tconst double DistanceSmallArc = 40;\r\n\r\n\t\t/// <summary>\r\n\t\t/// Gets the center and arc midpoint from a pie chart data point's geometry.\r\n\t\t/// It also determines if the arc of this geometry is small.\r\n\t\t/// </summary>\r\n\t\t/// <param name=\"geometry\">The geometry of a pie chart data point.</param>\r\n\t\t/// <param name=\"center\">The center of the pie chart.</param>\r\n\t\t/// <param name=\"midpoint\">The midpoint of the arc in the pie wedge.</param>\r\n\t\t/// <param name=\"isArcSmall\">True if the arc of the geometry is small, false otherwise.</param>\r\n\t\t/// <returns>True if the geometry is of the right form, false otherwise.</returns>\r\n\t\tpublic static bool GetPieChartInfo(Geometry geometry, out Point center, out Point arcMidpoint, out bool isArcSmall)\r\n\t\t{\r\n\t\t\tcenter = arcMidpoint = new Point();\r\n\t\t\tisArcSmall = false;\r\n\r\n\t\t\tif (geometry == null)\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tEllipseGeometry ellipseGeometry = geometry as EllipseGeometry;\r\n\t\t\tif (ellipseGeometry != null)\r\n\t\t\t{\r\n\t\t\t\tcenter = ellipseGeometry.Center;\r\n\t\t\t\tarcMidpoint = center + new Vector(ellipseGeometry.RadiusX / Math.Sqrt(2), -ellipseGeometry.RadiusY / Math.Sqrt(2));\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t\tPathGeometry pathGeometry = geometry as PathGeometry;\r\n\t\t\tif (pathGeometry != null && pathGeometry.Figures.Count > 0)\r\n\t\t\t{\r\n\t\t\t\tPathFigure pathFigure = pathGeometry.Figures[0];\r\n\t\t\t\tif (pathFigure != null && pathFigure.Segments.Count > 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tcenter = pathFigure.StartPoint;\r\n\t\t\t\t\tLineSegment lineSegment = pathFigure.Segments[0] as LineSegment;\r\n\t\t\t\t\tArcSegment arcSegment = pathFigure.Segments[1] as ArcSegment;\r\n\t\t\t\t\tif (lineSegment != null && arcSegment != null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tCalculateArcInfo(center, lineSegment.Point, arcSegment, out arcMidpoint, out isArcSmall);\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t/// <summary>\r\n\t\t/// Calculates the midpoint of the arc passed as a parameter, as well as whether the arc is small.\r\n\t\t/// </summary>\r\n\t\t/// <param name=\"center\">The center of the pie chart.</param>\r\n\t\t/// <param name=\"startPoint\">The start point of the arc segment.</param>\r\n\t\t/// <param name=\"arcSegment\">The arc of the pie wedge itself.</param>\r\n\t\t/// <param name=\"arcMidpoint\">he midpoint of the arc in the pie wedge.</param>\r\n\t\t/// <param name=\"isArcSmall\">True if the arc is small, false otherwise.</param>\r\n\t\tprivate static void CalculateArcInfo(Point center, Point startPoint, ArcSegment arcSegment, out Point arcMidpoint, out bool isArcSmall)\r\n\t\t{\r\n\t\t\t// Note: we assume a valid arcSegment with equal radii.\r\n\t\t\tDebug.Assert(arcSegment != null);\r\n\t\t\tDebug.Assert(arcSegment.Size.Width == arcSegment.Size.Height);\r\n\r\n\t\t\tPoint endPoint = arcSegment.Point;\r\n\t\t\tPoint chordMidpoint = new Point(0.5 * (startPoint.X + endPoint.X), 0.5 * (startPoint.Y + endPoint.Y));\r\n\t\t\tVector chordDirection = endPoint - startPoint;\r\n\t\t\tdouble chordLength = chordDirection.Length;\r\n\t\t\tdouble radius = arcSegment.Size.Width;\r\n\r\n\t\t\tisArcSmall = chordLength < DistanceSmallArc;\r\n\r\n\t\t\t// If the chord length is less than the distance tolerance, just use the chord midpoint\r\n\t\t\t// or the point on the opposite side of the circle as appropriate.\r\n\t\t\tif (chordLength < DistanceTolerance)\r\n\t\t\t{\r\n\t\t\t\tarcMidpoint = arcSegment.IsLargeArc ? center - (chordMidpoint - center) : chordMidpoint;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tchordDirection /= chordLength;\r\n\t\t\t\tVector radialDirection = new Vector(-chordDirection.Y, chordDirection.X);\r\n\t\t\t\tdouble halfChordLength = 0.5 * chordLength;\r\n\t\t\t\tdouble radialOffset;\r\n\t\t\t\tif (radius >= halfChordLength)\r\n\t\t\t\t{\r\n\t\t\t\t\tdouble sectorRadius = Math.Sqrt(radius * radius - halfChordLength * halfChordLength);\r\n\t\t\t\t\tradialOffset = -radius + (arcSegment.IsLargeArc ? -sectorRadius : sectorRadius);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tradialOffset = -halfChordLength;\r\n\t\t\t\t}\r\n\t\t\t\tif (arcSegment.SweepDirection == SweepDirection.Counterclockwise)\r\n\t\t\t\t{\r\n\t\t\t\t\tradialOffset = -radialOffset;\r\n\t\t\t\t}\r\n\t\t\t\tarcMidpoint = chordMidpoint + radialOffset * radialDirection;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Pie/PieChartLabel.cs",
    "content": "﻿using System.Linq;\r\nusing System.Windows.Data;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Shapes;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// This is the control that holds the label. It includes an optional line connecting it to the chart, and whatever\r\n    /// content the developer specifies in the DataTemplate.\r\n    /// </summary>\r\n    [TemplatePart(Name = \"Canvas_PART\", Type = typeof(Canvas))]\r\n    [TemplatePart(Name = \"Content_PART\", Type = typeof(ContentPresenter))]\r\n    public class PieChartLabel : ContentControl\r\n    {\r\n        private ContentPresenter contentPart;\r\n        private Canvas canvasPart;\r\n        private Point center;\r\n        private Point arcMidpoint;\r\n\r\n        public bool IsArcSmall { get; set; }\r\n\r\n        static PieChartLabel()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(PieChartLabel), new FrameworkPropertyMetadata(typeof(PieChartLabel)));\r\n        }\r\n\r\n        /// <summary>\r\n        /// FormattedRation DP - When a PieChartLabel is created, this property is data bound to the PieDataPoint's equivalent\r\n        /// property. It will typically be used within the DataTemplate for PieChartLabel.\r\n        /// </summary>\r\n        public static readonly DependencyProperty FormattedRatioProperty = PieDataPoint.FormattedRatioProperty.AddOwner(typeof(PieChartLabel), null);\r\n        public string FormattedRatio\r\n        {\r\n            get { return (string)this.GetValue(FormattedRatioProperty); }\r\n            set { this.SetValue(FormattedRatioProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Geometry DP - When a PieChartLabel is created, this property is data bound to the PieDataPoint's equivalent\r\n        /// property. We need this information to calculate the position of the label.\r\n        /// </summary>\r\n        public static readonly DependencyProperty GeometryProperty = PieDataPoint.GeometryProperty.AddOwner(typeof(PieChartLabel), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsParentMeasure | FrameworkPropertyMetadataOptions.AffectsArrange, GeometryPropertyChanged));\r\n        public Geometry Geometry\r\n        {\r\n            get { return (Geometry)this.GetValue(GeometryProperty); }\r\n            set { this.SetValue(GeometryProperty, value); }\r\n        }\r\n\r\n        private static void GeometryPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            PieChartLabel label = obj as PieChartLabel;\r\n            if (label != null)\r\n            {\r\n                bool isArcSmall;\r\n                PieChartHelper.GetPieChartInfo(e.NewValue as Geometry, out label.center, out label.arcMidpoint, out isArcSmall);\r\n                label.IsArcSmall = isArcSmall;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// DisplayMode DP - The developer can set this DP to control how the labels should be displayed.\r\n        /// This property can have one of the following values:\r\n        /// ArcMidpoint - Center of the label is positioned at the arc midpoint.\r\n        /// Connected - A line connecting the arc midpoint and label is displayed.\r\n        /// Auto - If at least one pie slice is very small, all pie slices use the Connected display mode. Otherwise, they all use ArcMidpoint.\r\n        /// AutoMixed - Connected display mode is used for all small pie slices, and ArcMidpoint is used for all other slices.\r\n        /// InsideArc - Display the label inside ARC\r\n        /// </summary>\r\n        public DisplayMode DisplayMode\r\n        {\r\n            get { return (DisplayMode)this.GetValue(DisplayModeProperty); }\r\n            set { this.SetValue(DisplayModeProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty DisplayModeProperty =\r\n            DependencyProperty.Register(\"DisplayMode\", typeof(DisplayMode), typeof(PieChartLabel), new FrameworkPropertyMetadata(DisplayMode.ArcMidpoint, FrameworkPropertyMetadataOptions.AffectsArrange));\r\n\r\n        /// <summary>\r\n        /// LineStroke DP - Determines the brush of the line when in connected mode.\r\n        /// </summary>\r\n        public Brush LineStroke\r\n        {\r\n            get { return (Brush)this.GetValue(LineStrokeProperty); }\r\n            set { this.SetValue(LineStrokeProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty LineStrokeProperty =\r\n            DependencyProperty.Register(\"LineStroke\", typeof(Brush), typeof(PieChartLabel), new PropertyMetadata(new SolidColorBrush(Colors.Gray)));\r\n\r\n        /// <summary>\r\n        /// LineStrokeThickness DP - Determines the thickness of the line when in connected mode.\r\n        /// </summary>\r\n        public double LineStrokeThickness\r\n        {\r\n            get { return (double)this.GetValue(LineStrokeThicknessProperty); }\r\n            set { this.SetValue(LineStrokeThicknessProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty LineStrokeThicknessProperty =\r\n            DependencyProperty.Register(\"LineStrokeThickness\", typeof(double), typeof(PieChartLabel), new PropertyMetadata(1.0));\r\n\r\n        /// <summary>\r\n        /// On arrange, re-position the label.\r\n        /// </summary>\r\n        protected override Size ArrangeOverride(Size arrangeBounds)\r\n        {\r\n            this.PositionLabel();\r\n            return base.ArrangeOverride(arrangeBounds);\r\n        }\r\n\r\n        /// <summary>\r\n        /// When the template is applied, get the template parts. Also, ensure that if the \r\n        /// content of the label changes, the label is re-positioned.\r\n        /// </summary>\r\n        public override void OnApplyTemplate()\r\n        {\r\n            base.OnApplyTemplate();\r\n            contentPart = this.GetTemplateChild(\"Content_PART\") as ContentPresenter;\r\n            canvasPart = this.GetTemplateChild(\"Canvas_PART\") as Canvas;\r\n            if (contentPart != null)\r\n            {\r\n                contentPart.SizeChanged += delegate (object sender, SizeChangedEventArgs e)\r\n                {\r\n                    this.PositionLabel();\r\n                };\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Positions the label depending on the display mode specified by the developer.\r\n        /// </summary>\r\n        private void PositionLabel()\r\n        {\r\n            switch (this.DisplayMode)\r\n            {\r\n                case DisplayMode.ArcMidpoint:\r\n                    this.PositionArcMidpoint();\r\n                    break;\r\n                case DisplayMode.Connected:\r\n                    this.PositionConnected();\r\n                    break;\r\n                case DisplayMode.AutoMixed:\r\n                    this.PositionAutoMixed();\r\n                    break;\r\n                case DisplayMode.Auto:\r\n                    this.PositionAuto();\r\n                    break;\r\n                case DisplayMode.InsideArc:\r\n                    this.PositionInsideArc();\r\n                    break;\r\n            }\r\n        }\r\n\r\n        const double RadionToDegree = 180.0 / Math.PI;\r\n        private void PositionInsideArc()\r\n        {\r\n            this.RemovePolyline();\r\n\r\n            if (this.contentPart != null)\r\n            {\r\n                double left = this.center.X + (this.arcMidpoint.X - this.center.X) * 0.5 - this.contentPart.DesiredSize.Width * 0.5; // find center point with in Arc\r\n                double top = this.center.Y + (this.arcMidpoint.Y - this.center.Y) * 0.5 - this.contentPart.DesiredSize.Height * 0.5;\r\n                double labelAngle = Math.Atan2(this.arcMidpoint.Y - this.center.Y, (this.arcMidpoint.X - this.center.X)) * RadionToDegree;\r\n                if (this.center.X > this.arcMidpoint.X) labelAngle = labelAngle - 180;  // for Left to Right\r\n                this.contentPart.RenderTransform = new RotateTransform() { Angle = labelAngle, };\r\n                this.contentPart.RenderTransformOrigin = new Point(.5, .5);\r\n                Canvas.SetLeft(this.contentPart, left);\r\n                Canvas.SetTop(this.contentPart, top);\r\n            }\r\n        }\r\n        /// <summary>\r\n        /// Positions the label with its center in the same location as the midpoint of the pie slice arc.\r\n        /// </summary>\r\n        private void PositionArcMidpoint()\r\n        {\r\n            this.RemovePolyline();\r\n\r\n            if (this.contentPart != null)\r\n            {\r\n                Canvas.SetTop(this.contentPart, this.arcMidpoint.Y - 0.5 * this.contentPart.DesiredSize.Height);\r\n                Canvas.SetLeft(this.contentPart, this.arcMidpoint.X - 0.5 * this.contentPart.DesiredSize.Width);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Adds a line that connects the arc midpoint to the label and positions the label appropriately.\r\n        /// Ideally, I would add the Polyline in the template and I would only change its points here. Unfortunately,\r\n        /// because of a WPF bug, the Polyline doesn't render in certain corner-case scenarios. As a workaround,\r\n        /// I create a new Polyline everytime the label is positioned, as can be seen in this method.\r\n        /// </summary>\r\n        private void PositionConnected()\r\n        {\r\n            try\r\n            {\r\n                this.RemovePolyline();\r\n\r\n                if (this.contentPart != null)\r\n                {\r\n                    PointCollection newPoints = new PointCollection();\r\n\r\n                    // First point\r\n                    newPoints.Add(this.SnapPoint(this.arcMidpoint));\r\n\r\n                    // Second point\r\n                    Vector radialDirection = this.arcMidpoint - this.center;\r\n                    radialDirection.Normalize();\r\n                    Point secondPoint = this.arcMidpoint + (radialDirection * 10);\r\n                    newPoints.Add(this.SnapPoint(secondPoint));\r\n\r\n                    // Third point\r\n                    int sign = Math.Sign(radialDirection.X); // 1 if label is on the right side, -1 if it's on the left.\r\n                    Point thirdPoint = secondPoint + new Vector(sign * 20, 0);\r\n                    newPoints.Add(this.SnapPoint(thirdPoint));\r\n\r\n                    double contentX = (sign == 1) ? thirdPoint.X : thirdPoint.X - this.contentPart.DesiredSize.Width;\r\n                    double contentY = thirdPoint.Y - 0.5 * this.contentPart.DesiredSize.Height;\r\n                    Canvas.SetTop(this.contentPart, contentY);\r\n                    Canvas.SetLeft(this.contentPart, contentX);\r\n\r\n                    Polyline polyline = new Polyline();\r\n                    polyline.Points = newPoints;\r\n                    polyline.SetBinding(Polyline.StrokeThicknessProperty, new Binding(\"LineStrokeThickness\") { Source = this });\r\n                    polyline.SetBinding(Polyline.StrokeProperty, new Binding(\"LineStroke\") { Source = this });\r\n                    polyline.StrokeLineJoin = PenLineJoin.Round;\r\n\r\n                    this.canvasPart.Children.Add(polyline);\r\n                }\r\n            }\r\n            catch (Exception)\r\n            { }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes the Polyline from the canvas part.\r\n        /// </summary>\r\n        private void RemovePolyline()\r\n        {\r\n            if (this.canvasPart != null)\r\n            {\r\n                Polyline polyline = canvasPart.Children.OfType<Polyline>().FirstOrDefault();\r\n                if (polyline != null)\r\n                {\r\n                    canvasPart.Children.Remove(polyline);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Positions the label in the arc midpoint if it's big enough, and displays it connected by a line if it's\r\n        /// small.\r\n        /// </summary>\r\n        private void PositionAutoMixed()\r\n        {\r\n            if (this.IsArcSmall)\r\n            {\r\n                this.PositionConnected();\r\n            }\r\n            else\r\n            {\r\n                this.PositionArcMidpoint();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// If at least one arc is small, all labels are displayed connected by a line. Otherwise, they're positioned\r\n        /// in the arc midpoint.\r\n        /// </summary>\r\n        private void PositionAuto()\r\n        {\r\n            Chart chart = TreeHelper.FindAncestor<Chart>(this);\r\n            if (chart != null)\r\n            {\r\n                PieChartLabelArea labelArea = chart.Template.FindName(\"LabelArea_PART\", chart) as PieChartLabelArea;\r\n                if (labelArea != null && labelArea.HasSmallArc)\r\n                {\r\n                    this.PositionConnected();\r\n                }\r\n                else\r\n                {\r\n                    this.PositionArcMidpoint();\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Ensures that the line connecting the label is positioned in such a way that whole pixels are used to render\r\n        /// it. This calculation depends on whether the thickness of the line is odd or even.\r\n        /// </summary>\r\n        /// <param name=\"point\">A point belonging to the polyline.</param>\r\n        /// <returns>The point that will cause the line to snap to pixels.</returns>\r\n        private Point SnapPoint(Point point)\r\n        {\r\n            double lineThickness = this.LineStrokeThickness;\r\n            int intLineThickness = (int)lineThickness;\r\n            if (lineThickness == intLineThickness)\r\n            {\r\n                if ((intLineThickness % 2) == 1)\r\n                {\r\n                    return new Point(Math.Floor(point.X) + 0.5, Math.Floor(point.Y) + 0.5);\r\n                }\r\n                else\r\n                {\r\n                    return new Point(Math.Round(point.X), Math.Round(point.Y));\r\n                }\r\n            }\r\n            return point;\r\n        }\r\n\r\n        /// <summary>\r\n        /// When a label is clicked, the corresponding PieDataPoint becomes selected.\r\n        /// This enables master-detail scenario driven by clicking on labels.\r\n        /// </summary>\r\n        /// <param name=\"e\"></param>\r\n        protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)\r\n        {\r\n            Chart chart = TreeHelper.FindAncestor<Chart>(this);\r\n            if (chart != null)\r\n            {\r\n                PieSeries pieSeries = chart.Series.OfType<PieSeries>().FirstOrDefault();\r\n                if (pieSeries != null)\r\n                {\r\n                    pieSeries.SelectedItem = this.Content;\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    /// <summary>\r\n    /// Modes used to control how the labels are positioned.\r\n    /// </summary>\r\n    public enum DisplayMode\r\n    {\r\n        ArcMidpoint,    // Center of the label is positioned at the arc midpoint.\r\n        Connected,      // A line connecting the arc midpoint and label is displayed.\r\n        Auto,           // If at least one pie slice is very small, all pie slices use the Connected display mode. Otherwise, they all use ArcMidpoint.\r\n        AutoMixed,      // Connected display mode is used for all small pie slices, and ArcMidpoint is used for all other slices.\r\n        InsideArc       // Label is placed inside Arc, centered, text is left to right\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Pie/PieChartLabelArea.cs",
    "content": "﻿using System.Linq;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n\t/// <summary>\r\n\t/// Canvas where all labels (of type PieChartLabel) will be added. We need a separate\r\n\t/// canvas to avoid z-order issues. This prevents having a pie slice overlap a label.\r\n\t/// </summary>\r\n\tpublic class PieChartLabelArea : Canvas\r\n\t{\r\n\t\t/// <summary>\r\n\t\t/// HasSmallArc DP - If at least one slice of the pie chart is small, this property is set\r\n\t\t/// to true. This is used in the \"Auto\" mode. When in this mode, if this property is set to\r\n\t\t/// true, all labels will be connected to the chart by a line.\r\n\t\t/// </summary>\r\n\t\tpublic bool HasSmallArc\r\n\t\t{\r\n\t\t\tget { return (bool)this.GetValue(HasSmallArcProperty); }\r\n\t\t\tset { this.SetValue(HasSmallArcProperty, value); }\r\n\t\t}\r\n\r\n\t\tpublic static readonly DependencyProperty HasSmallArcProperty =\r\n\t\t\tDependencyProperty.Register(\"HasSmallArc\", typeof(bool), typeof(PieChartLabelArea), new PropertyMetadata(false, HasSmallArcPropertyChanged));\r\n\r\n\t\t/// <summary>\r\n\t\t/// When the HasSmallArc DO is set, all labels should be re-arranged.\r\n\t\t/// </summary>\r\n\t\tprivate static void HasSmallArcPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)\r\n\t\t{\r\n\t\t\tPieChartLabelArea labelArea = obj as PieChartLabelArea;\r\n\t\t\tif (labelArea != null)\r\n\t\t\t{\r\n\t\t\t\tforeach (PieChartLabel label in labelArea.Children.OfType<PieChartLabel>())\r\n\t\t\t\t{\r\n\t\t\t\t\tlabel.InvalidateArrange();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/// <summary>\r\n\t\t/// On measure, we check if there is at least one child of the canvas that is small, and we set\r\n\t\t/// HasSmallArc to reflect that information. \r\n\t\t/// Setting HasSmallArc ends up causing all labels to be re-arranged taking this information\r\n\t\t/// into consideration.\r\n\t\t/// </summary>\r\n\t\tprotected override Size MeasureOverride(Size constraint)\r\n\t\t{\r\n\t\t\tbool hasSmallArc = false;\r\n\t\t\tforeach (PieChartLabel label in this.Children.OfType<PieChartLabel>())\r\n\t\t\t{\r\n\t\t\t\tif (label.IsArcSmall)\r\n\t\t\t\t{\r\n\t\t\t\t\thasSmallArc = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tthis.HasSmallArc = hasSmallArc;\r\n\r\n\t\t\treturn base.MeasureOverride(constraint);\r\n\t\t}\r\n\t}\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Primitives/DelegatingListBox.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting.Primitives\r\n{\r\n    /// <summary>\r\n    /// Subclasses ListBox to provide an easy way for a consumer of\r\n    /// ListBox to hook into the four standard ListBox *Container*\r\n    /// overrides.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public class DelegatingListBox : ListBox\r\n    {\r\n        /// <summary>\r\n        /// Gets or sets a function to call when the\r\n        /// IsItemItsOwnContainerOverride method executes.\r\n        /// </summary>\r\n        public Func<object, bool> IsItemItsOwnContainer { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a function to call when the\r\n        /// GetContainerForItem method executes.\r\n        /// </summary>\r\n        public Func<DependencyObject> GetContainerForItem { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets an action to call when the\r\n        /// PrepareContainerForItem method executes.\r\n        /// </summary>\r\n        public Action<DependencyObject, object> PrepareContainerForItem { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets an action to call when the\r\n        /// ClearContainerForItem method executes.\r\n        /// </summary>\r\n        public Action<DependencyObject, object> ClearContainerForItem { get; set; }\r\n\r\n        /// <summary>\r\n        /// Initializes static members of the DelegatingListBox class.\r\n        /// </summary>\r\n        static DelegatingListBox()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(DelegatingListBox), new FrameworkPropertyMetadata(typeof(DelegatingListBox)));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the DelegatingListBox class.\r\n        /// </summary>\r\n        public DelegatingListBox()\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Determines if the specified item is (or is eligible to be) its own container.\r\n        /// </summary>\r\n        /// <param name=\"item\">The item to check.</param>\r\n        /// <returns>True if the item is (or is eligible to be) its own container; otherwise, false.</returns>\r\n        protected override bool IsItemItsOwnContainerOverride(object item)\r\n        {\r\n            return (null != IsItemItsOwnContainer) ?\r\n                IsItemItsOwnContainer(item) :\r\n                base.IsItemItsOwnContainerOverride(item);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates or identifies the element that is used to display the given item.\r\n        /// </summary>\r\n        /// <returns>The element that is used to display the given item.</returns>\r\n        protected override DependencyObject GetContainerForItemOverride()\r\n        {\r\n            return (null != GetContainerForItem) ?\r\n                GetContainerForItem() :\r\n                base.GetContainerForItemOverride();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Prepares the specified element to display the specified item.\r\n        /// </summary>\r\n        /// <param name=\"element\">The element used to display the specified item.</param>\r\n        /// <param name=\"item\">The item to display.</param>\r\n        protected override void PrepareContainerForItemOverride(DependencyObject element, object item)\r\n        {\r\n            base.PrepareContainerForItemOverride(element, item);\r\n            if (null != PrepareContainerForItem)\r\n            {\r\n                PrepareContainerForItem(element, item);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Undoes the effects of the PrepareContainerForItemOverride method.\r\n        /// </summary>\r\n        /// <param name=\"element\">The container element.</param>\r\n        /// <param name=\"item\">The item to display.</param>\r\n        protected override void ClearContainerForItemOverride(DependencyObject element, object item)\r\n        {\r\n            base.ClearContainerForItemOverride(element, item);\r\n            if (null != ClearContainerForItem)\r\n            {\r\n                ClearContainerForItem(element, item);\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Primitives/Edge.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting.Primitives\r\n{\r\n    /// <summary>\r\n    /// Specifies the edge position of a child element that is inside an\r\n    /// EdgePanel.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public enum Edge\r\n    {\r\n        /// <summary>\r\n        /// A child element that is positioned in the center of a EdgePanel.\r\n        /// </summary>\r\n        Center,\r\n\r\n        /// <summary>\r\n        /// A child element that is positioned on the left side of the\r\n        /// EdgePanel.\r\n        /// </summary>\r\n        Left,\r\n\r\n        /// <summary>\r\n        /// A child element that is positioned at the top of the EdgePanel.\r\n        /// </summary>\r\n        Top,\r\n        \r\n        /// <summary>\r\n        /// A child element that is positioned on the right side of the\r\n        /// EdgePanel.\r\n        /// </summary>\r\n        Right,\r\n\r\n        /// <summary>\r\n        /// A child element that is positioned at the bottom of the EdgePanel.\r\n        /// </summary>\r\n        Bottom,\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Primitives/EdgePanel.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Windows.Media;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting.Primitives\r\n{\r\n    /// <summary>\r\n    /// Defines an area where you can arrange child elements either horizontally\r\n    /// or vertically, relative to each other.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public class EdgePanel : Panel\r\n    {\r\n        /// <summary>\r\n        /// The maximum number of iterations.\r\n        /// </summary>\r\n        private const int MaximumIterations = 10;\r\n\r\n        /// <summary>\r\n        /// A flag that ignores a property change when set.\r\n        /// </summary>\r\n        private static bool _ignorePropertyChange;\r\n\r\n        #region public attached Edge Edge\r\n        /// <summary>\r\n        /// Gets the value of the Edge attached property for a specified\r\n        /// UIElement.\r\n        /// </summary>\r\n        /// <param name=\"element\">\r\n        /// The element from which the property value is read.\r\n        /// </param>\r\n        /// <returns>The Edge property value for the element.</returns>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\", Justification = \"EdgePanel only has UIElement children\")]\r\n        public static Edge GetEdge(UIElement element)\r\n        {\r\n            if (element == null)\r\n            {\r\n                throw new ArgumentNullException(\"element\");\r\n            }\r\n            return (Edge)element.GetValue(EdgeProperty);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Sets the value of the Edge attached property to a specified element.\r\n        /// </summary>\r\n        /// <param name=\"element\">\r\n        /// The element to which the attached property is written.\r\n        /// </param>\r\n        /// <param name=\"edge\">The needed Edge value.</param>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\", Justification = \"EdgePanel only has UIElement children\")]\r\n        public static void SetEdge(UIElement element, Edge edge)\r\n        {\r\n            if (element == null)\r\n            {\r\n                throw new ArgumentNullException(\"element\");\r\n            }\r\n            element.SetValue(EdgeProperty, edge);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Edge dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty EdgeProperty =\r\n            DependencyProperty.RegisterAttached(\r\n                \"Edge\",\r\n                typeof(Edge),\r\n                typeof(EdgePanel),\r\n                new PropertyMetadata(Edge.Center, OnEdgePropertyChanged));\r\n\r\n        /// <summary>\r\n        /// EdgeProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">UIElement that changed its Edge.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA2208:InstantiateArgumentExceptionsCorrectly\", Justification = \"Almost always set from the attached property CLR setter.\")]\r\n        private static void OnEdgePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            // Ignore the change if requested\r\n            if (_ignorePropertyChange)\r\n            {\r\n                _ignorePropertyChange = false;\r\n                return;\r\n            }\r\n\r\n            UIElement element = (UIElement)d;\r\n            Edge value = (Edge)e.NewValue;\r\n\r\n            // Validate the Edge property\r\n            if ((value != Edge.Left) &&\r\n                (value != Edge.Top) &&\r\n                (value != Edge.Right) &&\r\n                (value != Edge.Center) &&\r\n                (value != Edge.Bottom))\r\n            {\r\n                // Reset the property to its original state before throwing\r\n                _ignorePropertyChange = true;\r\n                element.SetValue(EdgeProperty, (Edge)e.OldValue);\r\n\r\n                string message = string.Format(\r\n                    CultureInfo.InvariantCulture,\r\n                    Properties.Resources.EdgePanel_OnEdgePropertyChanged,\r\n                    value);\r\n                 \r\n                throw new ArgumentException(message, \"value\");\r\n            }\r\n                 \r\n            // Cause the EdgePanel to update its layout when a child changes\r\n            EdgePanel panel = VisualTreeHelper.GetParent(element) as EdgePanel;\r\n            if (panel != null)\r\n            {\r\n                panel.InvalidateMeasure();\r\n            }\r\n        }\r\n        #endregion public attached Edge Edge\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the EdgePanel class.\r\n        /// </summary>\r\n        public EdgePanel()\r\n        {\r\n            this.SizeChanged += new SizeChangedEventHandler(EdgePanelSizeChanged);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Invalidate measure when edge panel is resized.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source of the event.</param>\r\n        /// <param name=\"e\">Information about the event.</param>\r\n        private void EdgePanelSizeChanged(object sender, SizeChangedEventArgs e)\r\n        {\r\n            InvalidateMeasure();\r\n        }\r\n\r\n        /// <summary>\r\n        /// The left rectangle in which to render left elements.\r\n        /// </summary>\r\n        private Rect _leftRect;\r\n\r\n        /// <summary>\r\n        /// The right rectangle in which to render right elements.\r\n        /// </summary>\r\n        private Rect _rightRect;\r\n\r\n        /// <summary>\r\n        /// The top rectangle in which to render top elements.\r\n        /// </summary>\r\n        private Rect _topRect;\r\n\r\n        /// <summary>\r\n        /// The bottom rectangle in which to render bottom elements.\r\n        /// </summary>\r\n        private Rect _bottomRect;\r\n\r\n        /// <summary>\r\n        /// Measures the children of a EdgePanel in anticipation of arranging\r\n        /// them during the ArrangeOverride pass.\r\n        /// </summary>\r\n        /// <param name=\"constraint\">A maximum Size to not exceed.</param>\r\n        /// <returns>The desired size of the EdgePanel.</returns>\r\n        [SuppressMessage(\"Microsoft.Maintainability\", \"CA1505:AvoidUnmaintainableCode\", Justification = \"Code is by nature difficult to refactor into several methods.\")] \r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1725:ParameterNamesShouldMatchBaseDeclaration\", MessageId = \"0#\", Justification = \"Compat with WPF.\")]\r\n        [SuppressMessage(\"Microsoft.Maintainability\", \"CA1502:AvoidExcessiveComplexity\", Justification = \"Splitting up method will make it more difficult to understand.\")]\r\n        protected override Size MeasureOverride(Size constraint)\r\n        {\r\n            constraint = new Size(this.ActualWidth, this.ActualHeight);\r\n\r\n            IList<UIElement> leftElements = this.Children.OfType<UIElement>().Where(element => GetEdge(element) == Edge.Left).ToList();\r\n            IList<UIElement> rightElements = this.Children.OfType<UIElement>().Where(element => GetEdge(element) == Edge.Right).ToList();\r\n            IList<UIElement> bottomElements = this.Children.OfType<UIElement>().Where(element => GetEdge(element) == Edge.Bottom).ToList();\r\n            IList<UIElement> topElements = this.Children.OfType<UIElement>().Where(element => GetEdge(element) == Edge.Top).ToList();\r\n\r\n            Rect totalRect = SafeCreateRect(0, 0, constraint.Width, constraint.Height);\r\n\r\n            _leftRect = (leftElements.Count > 0) ? totalRect : Rect.Empty;\r\n            _bottomRect = (bottomElements.Count > 0) ? totalRect : Rect.Empty;\r\n            _rightRect = (rightElements.Count > 0) ? totalRect : Rect.Empty;\r\n            _topRect = (topElements.Count > 0) ? totalRect : Rect.Empty;\r\n\r\n            double rightAxesWidth = 0.0;\r\n            double leftAxesWidth = 0.0;\r\n            double topAxesHeight = 0.0;\r\n            double bottomAxesHeight = 0.0;\r\n\r\n            double maxRightRequestedWidth = 0;\r\n            double maxLeftRequestedWidth = 0;\r\n            double maxTopRequestedHeight = 0;\r\n            double maxBottomRequestedHeight = 0;\r\n\r\n            double previousRightAxesWidth = rightAxesWidth;\r\n            double previousLeftAxesWidth = leftAxesWidth;\r\n            double previousTopAxesHeight = topAxesHeight;\r\n            double previousBottomAxesHeight = bottomAxesHeight;\r\n\r\n            int iterations = 0;\r\n            // Measure each of the Children\r\n            while (true)\r\n            {\r\n                // Measure the children using the rectangle regions.\r\n                if (rightElements.Count > 0)\r\n                {\r\n                    Size rightSize = new Size(constraint.Width, _rightRect.Height);\r\n                    foreach (UIElement rightUIElement in rightElements)\r\n                    {\r\n                        rightUIElement.Measure(rightSize);\r\n                    }\r\n\r\n                    previousRightAxesWidth = rightAxesWidth;\r\n                    rightAxesWidth = rightElements.Select(axis => axis.DesiredSize.Width).SumOrDefault();\r\n                    maxRightRequestedWidth = Math.Max(maxRightRequestedWidth, rightAxesWidth);\r\n                    _rightRect =\r\n                        SafeCreateRect(\r\n                            constraint.Width - rightAxesWidth,\r\n                            _rightRect.Top,\r\n                            rightAxesWidth,\r\n                            _rightRect.Height);\r\n                }\r\n\r\n                if (topElements.Count > 0)\r\n                {\r\n                    Size topSize = new Size(_topRect.Width, constraint.Height);\r\n                    foreach (UIElement topUIElement in topElements)\r\n                    {\r\n                        topUIElement.Measure(topSize);\r\n                    }\r\n\r\n                    previousTopAxesHeight = topAxesHeight;\r\n                    topAxesHeight = topElements.Select(axis => axis.DesiredSize.Height).SumOrDefault();\r\n                    maxTopRequestedHeight = Math.Max(maxTopRequestedHeight, topAxesHeight);\r\n                    _topRect =\r\n                        SafeCreateRect(\r\n                            _topRect.Left,\r\n                            _topRect.Top,\r\n                            _topRect.Width,\r\n                            topAxesHeight);\r\n                }\r\n\r\n                if (leftElements.Count > 0)\r\n                {\r\n                    Size leftSize = new Size(constraint.Width, _leftRect.Height);\r\n                    foreach (UIElement leftUIElement in leftElements)\r\n                    {\r\n                        leftUIElement.Measure(leftSize);\r\n                    }\r\n\r\n                    previousLeftAxesWidth = leftAxesWidth;\r\n                    leftAxesWidth = leftElements.Select(axis => axis.DesiredSize.Width).SumOrDefault();\r\n                    maxLeftRequestedWidth = Math.Max(maxLeftRequestedWidth, leftAxesWidth);\r\n                    _leftRect =\r\n                        SafeCreateRect(\r\n                            _leftRect.Left,\r\n                            _leftRect.Top,\r\n                            leftElements.Select(axis => axis.DesiredSize.Width).SumOrDefault(),\r\n                            _leftRect.Height);\r\n                }\r\n\r\n                if (bottomElements.Count > 0)\r\n                {\r\n                    Size bottomSize = new Size(_bottomRect.Width, constraint.Height);\r\n                    foreach (UIElement bottomUIElement in bottomElements)\r\n                    {\r\n                        bottomUIElement.Measure(bottomSize);\r\n                    }\r\n\r\n                    previousBottomAxesHeight = bottomAxesHeight;\r\n                    bottomAxesHeight = bottomElements.Select(axis => axis.DesiredSize.Height).SumOrDefault();\r\n                    maxBottomRequestedHeight = Math.Max(maxBottomRequestedHeight, bottomAxesHeight);\r\n                    _bottomRect =\r\n                        SafeCreateRect(\r\n                            _bottomRect.Left,\r\n                            constraint.Height - bottomAxesHeight,\r\n                            _bottomRect.Width,\r\n                            bottomAxesHeight);\r\n                }\r\n\r\n                // Ensuring that parallel axes don't collide\r\n                Rect leftRightCollisionRect = _leftRect;\r\n                leftRightCollisionRect.Intersect(_rightRect);\r\n\r\n                Rect topBottomCollisionRect = _topRect;\r\n                topBottomCollisionRect.Intersect(_bottomRect);\r\n\r\n                if (!leftRightCollisionRect.IsEmptyOrHasNoSize() || !topBottomCollisionRect.IsEmptyOrHasNoSize())\r\n                {\r\n                    return new Size();\r\n                }\r\n\r\n                // Resolving perpendicular axes collisions\r\n                Rect leftTopCollisionRect = _leftRect;\r\n                leftTopCollisionRect.Intersect(_topRect);\r\n                \r\n                Rect rightTopCollisionRect = _rightRect;\r\n                rightTopCollisionRect.Intersect(_topRect);\r\n\r\n                Rect leftBottomCollisionRect = _leftRect;\r\n                leftBottomCollisionRect.Intersect(_bottomRect);\r\n\r\n                Rect rightBottomCollisionRect = _rightRect;\r\n                rightBottomCollisionRect.Intersect(_bottomRect);\r\n\r\n                if (leftBottomCollisionRect.IsEmptyOrHasNoSize()\r\n                    && rightBottomCollisionRect.IsEmptyOrHasNoSize()\r\n                    && leftTopCollisionRect.IsEmptyOrHasNoSize()\r\n                    && rightTopCollisionRect.IsEmptyOrHasNoSize()                    \r\n                    && previousBottomAxesHeight == bottomAxesHeight\r\n                    && previousLeftAxesWidth == leftAxesWidth\r\n                    && previousRightAxesWidth == rightAxesWidth\r\n                    && previousTopAxesHeight == topAxesHeight)\r\n                {\r\n                    break;\r\n                }\r\n\r\n                if (iterations == MaximumIterations)\r\n                {\r\n                    _leftRect = SafeCreateRect(0, maxTopRequestedHeight, maxLeftRequestedWidth, (constraint.Height - maxTopRequestedHeight) - maxBottomRequestedHeight);\r\n                    _rightRect = SafeCreateRect(constraint.Width - maxRightRequestedWidth, maxTopRequestedHeight, maxRightRequestedWidth, (constraint.Height - maxTopRequestedHeight) - maxBottomRequestedHeight);\r\n                    _bottomRect = SafeCreateRect(maxLeftRequestedWidth, constraint.Height - maxBottomRequestedHeight, (constraint.Width - maxLeftRequestedWidth) - maxRightRequestedWidth, maxBottomRequestedHeight);\r\n                    _topRect = SafeCreateRect(maxLeftRequestedWidth, 0, (constraint.Width - maxLeftRequestedWidth) - maxRightRequestedWidth, maxTopRequestedHeight);\r\n\r\n                    foreach (UIElement leftElement in leftElements)\r\n                    {\r\n                        leftElement.Measure(new Size(_leftRect.Width, _leftRect.Height));\r\n                    }\r\n\r\n                    foreach (UIElement rightElement in rightElements)\r\n                    {\r\n                        rightElement.Measure(new Size(_rightRect.Width, _rightRect.Height));\r\n                    }\r\n\r\n                    foreach (UIElement bottomElement in bottomElements)\r\n                    {\r\n                        bottomElement.Measure(new Size(_bottomRect.Width, _bottomRect.Height));\r\n                    }\r\n\r\n                    foreach (UIElement topElement in topElements)\r\n                    {\r\n                        topElement.Measure(new Size(_topRect.Width, _topRect.Height));\r\n                    }\r\n                    break;\r\n                }\r\n\r\n                if (!leftBottomCollisionRect.IsEmptyOrHasNoSize())\r\n                {\r\n                    _leftRect =\r\n                        SafeCreateRect(\r\n                            _leftRect.Left,\r\n                            _leftRect.Top,\r\n                            _leftRect.Width,\r\n                            _leftRect.Height - leftBottomCollisionRect.Height);\r\n\r\n                    _bottomRect =\r\n                        SafeCreateRect(\r\n                            _bottomRect.Left + leftBottomCollisionRect.Width,\r\n                            _bottomRect.Top,\r\n                            _bottomRect.Width - leftBottomCollisionRect.Width,\r\n                            _bottomRect.Height);\r\n                }\r\n\r\n                if (!leftTopCollisionRect.IsEmptyOrHasNoSize())\r\n                {\r\n                    _leftRect =\r\n                        SafeCreateRect(\r\n                            _leftRect.Left,\r\n                            _leftRect.Top + leftTopCollisionRect.Height,\r\n                            _leftRect.Width,\r\n                            _leftRect.Height - leftTopCollisionRect.Height);\r\n\r\n                    _topRect =\r\n                        SafeCreateRect(\r\n                            _topRect.Left + leftTopCollisionRect.Width,\r\n                            _topRect.Top,\r\n                            _topRect.Width - leftTopCollisionRect.Width,\r\n                            _topRect.Height);\r\n                }\r\n\r\n                if (!rightBottomCollisionRect.IsEmptyOrHasNoSize())\r\n                {\r\n                    _rightRect =\r\n                        SafeCreateRect(\r\n                            _rightRect.Left,\r\n                            _rightRect.Top,\r\n                            _rightRect.Width,\r\n                            _rightRect.Height - rightBottomCollisionRect.Height);\r\n\r\n                    _bottomRect =\r\n                        SafeCreateRect(\r\n                            _bottomRect.Left,\r\n                            _bottomRect.Top,\r\n                            _bottomRect.Width - rightBottomCollisionRect.Width,\r\n                            _bottomRect.Height);\r\n                }\r\n\r\n                if (!rightTopCollisionRect.IsEmptyOrHasNoSize())\r\n                {\r\n                    _rightRect =\r\n                        SafeCreateRect(\r\n                            _rightRect.Left,\r\n                            _rightRect.Top + rightTopCollisionRect.Height,\r\n                            _rightRect.Width,\r\n                            _rightRect.Height - rightTopCollisionRect.Height);\r\n\r\n                    _topRect =\r\n                        SafeCreateRect(\r\n                            _topRect.Left,\r\n                            _topRect.Top,\r\n                            _topRect.Width - rightTopCollisionRect.Width,\r\n                            _topRect.Height);\r\n                }\r\n\r\n                // Bring axis measure rectangles together if there are gaps \r\n                // between them.\r\n                if (!_leftRect.IsEmpty)\r\n                {\r\n                    _leftRect =\r\n                        new Rect(\r\n                            new Point(_leftRect.Left, _topRect.BottomOrDefault(0)),\r\n                            new Point(_leftRect.Right, _bottomRect.TopOrDefault(constraint.Height)));\r\n                }\r\n\r\n                if (!_rightRect.IsEmpty)\r\n                {\r\n                    _rightRect =\r\n                        new Rect(\r\n                            new Point(_rightRect.Left, _topRect.BottomOrDefault(0)),\r\n                            new Point(_rightRect.Right, _bottomRect.TopOrDefault(constraint.Height)));\r\n                }\r\n\r\n                if (!_bottomRect.IsEmpty)\r\n                {\r\n                    _bottomRect =\r\n                        new Rect(\r\n                            new Point(_leftRect.RightOrDefault(0), _bottomRect.Top),\r\n                            new Point(_rightRect.LeftOrDefault(constraint.Width), _bottomRect.Bottom));\r\n                }\r\n\r\n                if (!_topRect.IsEmpty)\r\n                {\r\n                    _topRect =\r\n                        new Rect(\r\n                            new Point(_leftRect.RightOrDefault(0), _topRect.Top),\r\n                            new Point(_rightRect.LeftOrDefault(constraint.Width), _topRect.Bottom));\r\n                }\r\n\r\n                iterations++;\r\n            }\r\n\r\n            Size centerSize = \r\n                new Size(\r\n                    (constraint.Width - _leftRect.WidthOrDefault(0)) - _rightRect.WidthOrDefault(0), \r\n                    (constraint.Height - _topRect.HeightOrDefault(0)) - _bottomRect.HeightOrDefault(0));\r\n\r\n            foreach (UIElement element in Children.OfType<UIElement>().Where(child => GetEdge(child) == Edge.Center))\r\n            {\r\n                element.Measure(centerSize);\r\n            }\r\n\r\n            return new Size();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Arranges the content (child elements) of a EdgePanel element.\r\n        /// </summary>\r\n        /// <param name=\"arrangeSize\">\r\n        /// The Size the EdgePanel uses to arrange its child elements.\r\n        /// </param>\r\n        /// <returns>The arranged size of the EdgePanel.</returns>\r\n        [SuppressMessage(\"Microsoft.Maintainability\", \"CA1502:AvoidExcessiveComplexity\", Justification = \"Splitting up method will make it more difficult to understand.\")]\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1725:ParameterNamesShouldMatchBaseDeclaration\", MessageId = \"0#\", Justification = \"Compat with WPF.\")]\r\n        protected override Size ArrangeOverride(Size arrangeSize)\r\n        {\r\n            if (arrangeSize.Width == 0 || arrangeSize.Height == 0 || !ValueHelper.CanGraph(arrangeSize.Width) || !ValueHelper.CanGraph(arrangeSize.Height))\r\n            {\r\n                return arrangeSize;\r\n            }\r\n\r\n            IList<UIElement> leftElements = this.Children.OfType<UIElement>().Where(element => GetEdge(element) == Edge.Left).ToList();\r\n            IList<UIElement> rightElements = this.Children.OfType<UIElement>().Where(element => GetEdge(element) == Edge.Right).ToList();\r\n            IList<UIElement> bottomElements = this.Children.OfType<UIElement>().Where(element => GetEdge(element) == Edge.Bottom).ToList();\r\n            IList<UIElement> topElements = this.Children.OfType<UIElement>().Where(element => GetEdge(element) == Edge.Top).ToList();\r\n            \r\n            if (!_bottomRect.IsEmpty)\r\n            {\r\n                double workingHeight = _bottomRect.Top;\r\n                foreach (UIElement bottomUIElement in bottomElements)\r\n                {\r\n                    bottomUIElement.Arrange(SafeCreateRect(_leftRect.RightOrDefault(0), workingHeight, (arrangeSize.Width - _leftRect.WidthOrDefault(0)) - _rightRect.WidthOrDefault(0), bottomUIElement.DesiredSize.Height));\r\n                    workingHeight += bottomUIElement.DesiredSize.Height;\r\n                }\r\n            }\r\n            if (!_topRect.IsEmpty)\r\n            {\r\n                double workingTop = _topRect.Bottom;\r\n                foreach (UIElement topUIElement in topElements)\r\n                {\r\n                    workingTop -= topUIElement.DesiredSize.Height;\r\n                    topUIElement.Arrange(SafeCreateRect(_leftRect.RightOrDefault(0), workingTop, (arrangeSize.Width - _leftRect.WidthOrDefault(0)) - _rightRect.WidthOrDefault(0), topUIElement.DesiredSize.Height));\r\n                }\r\n            }\r\n\r\n            if (!_rightRect.IsEmpty)\r\n            {\r\n                double workingRight = _rightRect.Left;\r\n                foreach (UIElement rightUIElement in rightElements)\r\n                {\r\n                    rightUIElement.Arrange(SafeCreateRect(workingRight, _topRect.BottomOrDefault(0), rightUIElement.DesiredSize.Width, (arrangeSize.Height - _bottomRect.HeightOrDefault(0)) - _topRect.HeightOrDefault(0)));\r\n                    workingRight += rightUIElement.DesiredSize.Width;\r\n                }\r\n            }\r\n\r\n            if (!_leftRect.IsEmpty)\r\n            {\r\n                double workingLeft = _leftRect.Right;\r\n                foreach (UIElement leftUIElement in leftElements)\r\n                {\r\n                    workingLeft -= leftUIElement.DesiredSize.Width;\r\n                    Rect leftRect = SafeCreateRect(workingLeft, _topRect.BottomOrDefault(0), leftUIElement.DesiredSize.Width, (arrangeSize.Height - _bottomRect.HeightOrDefault(0)) - _topRect.HeightOrDefault(0));\r\n                    leftUIElement.Arrange(leftRect);\r\n                }\r\n            }\r\n\r\n            Rect centerRect = SafeCreateRect(\r\n                        _leftRect.RightOrDefault(0),\r\n                        _topRect.BottomOrDefault(0),\r\n                        ((arrangeSize.Width - _leftRect.WidthOrDefault(0)) - _rightRect.WidthOrDefault(0)),\r\n                        ((arrangeSize.Height - _topRect.HeightOrDefault(0)) - _bottomRect.HeightOrDefault(0)));\r\n\r\n            foreach (UIElement element in Children.OfType<UIElement>().Where(child => GetEdge(child) == Edge.Center))\r\n            {\r\n                element.Arrange(centerRect);\r\n            }\r\n\r\n            return arrangeSize;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates a Rect safely by forcing width/height to be valid.\r\n        /// </summary>\r\n        /// <param name=\"left\">Rect left parameter.</param>\r\n        /// <param name=\"top\">Rect top parameter.</param>\r\n        /// <param name=\"width\">Rect width parameter.</param>\r\n        /// <param name=\"height\">Rect height parameter.</param>\r\n        /// <returns>New Rect struct.</returns>\r\n        private static Rect SafeCreateRect(double left, double top, double width, double height)\r\n        {\r\n            return new Rect(left, top, Math.Max(0.0, width), Math.Max(0.0, height));\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/ResourceDictionaryDispensedEventArgs.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// Information describing the ResourceDictionary dispensed when a\r\n    /// ResourceDictionaryDispensed event is raised.\r\n    /// </summary>\r\n    internal class ResourceDictionaryDispensedEventArgs : EventArgs\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the ResourceDictionaryDispensedEventArgs class.\r\n        /// </summary>\r\n        /// <param name=\"index\">The index of the ResourceDictionary dispensed.</param>\r\n        /// <param name=\"resourceDictionary\">The ResourceDictionary dispensed.</param>\r\n        public ResourceDictionaryDispensedEventArgs(int index, ResourceDictionary resourceDictionary)\r\n        {\r\n            this.ResourceDictionary = resourceDictionary;\r\n            this.Index = index;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the index of the ResourceDictionary dispensed.\r\n        /// </summary>\r\n        public int Index { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Gets the ResourceDictionary dispensed.\r\n        /// </summary>\r\n        public ResourceDictionary ResourceDictionary { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Returns a value indicating whether two objects are equal.\r\n        /// </summary>\r\n        /// <param name=\"obj\">The other object.</param>\r\n        /// <returns>\r\n        /// A value indicating whether the two objects are equal.\r\n        /// </returns>\r\n        public override bool Equals(object obj)\r\n        {\r\n            return base.Equals(obj);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a hash code.\r\n        /// </summary>\r\n        /// <returns>A hash code.</returns>\r\n        public override int GetHashCode()\r\n        {\r\n            return base.GetHashCode();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/ResourceDictionaryDispenser.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\nusing System.Collections.Specialized;\r\nusing System.Diagnostics.CodeAnalysis;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// A class that rotates through a list of ResourceDictionaries.\r\n    /// </summary>\r\n    internal class ResourceDictionaryDispenser : IResourceDictionaryDispenser\r\n    {\r\n        /// <summary>\r\n        /// A linked list of ResourceDictionaries dispensed.\r\n        /// </summary>\r\n        private LinkedList<ResourceDictionaryDispensedEventArgs> _resourceDictionariesDispensed = new LinkedList<ResourceDictionaryDispensedEventArgs>();\r\n\r\n        /// <summary>\r\n        /// A bag of weak references to connected style enumerators.\r\n        /// </summary>\r\n        private WeakReferenceBag<ResourceDictionaryEnumerator> _resourceDictionaryEnumerators = new WeakReferenceBag<ResourceDictionaryEnumerator>();\r\n\r\n        /// <summary>\r\n        /// Value indicating whether to ignore that the enumerator has \r\n        /// dispensed a ResourceDictionary.\r\n        /// </summary>\r\n        private bool _ignoreResourceDictionaryDispensedByEnumerator;\r\n\r\n        /// <summary>\r\n        /// The list of ResourceDictionaries of rotate.\r\n        /// </summary>\r\n        private IList<ResourceDictionary> _resourceDictionaries;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the list of ResourceDictionaries to rotate.\r\n        /// </summary>\r\n        public IList<ResourceDictionary> ResourceDictionaries\r\n        {\r\n            get\r\n            {\r\n                return _resourceDictionaries;\r\n            }\r\n            set\r\n            {\r\n                if (value != _resourceDictionaries)\r\n                {\r\n                    {\r\n                        INotifyCollectionChanged notifyCollectionChanged = _resourceDictionaries as INotifyCollectionChanged;\r\n                        if (notifyCollectionChanged != null)\r\n                        {\r\n                            notifyCollectionChanged.CollectionChanged -= ResourceDictionariesCollectionChanged;\r\n                        }\r\n                    }\r\n                    _resourceDictionaries = value;\r\n                    {\r\n                        INotifyCollectionChanged notifyCollectionChanged = _resourceDictionaries as INotifyCollectionChanged;\r\n                        if (notifyCollectionChanged != null)\r\n                        {\r\n                            notifyCollectionChanged.CollectionChanged += ResourceDictionariesCollectionChanged;\r\n                        }\r\n                    }\r\n\r\n                    Reset();\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// This method is raised when the ResourceDictionaries collection is changed.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source of the event.</param>\r\n        /// <param name=\"e\">Information about the event.</param>\r\n        private void ResourceDictionariesCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)\r\n        {\r\n            if (!(e.Action == NotifyCollectionChangedAction.Add && (this.ResourceDictionaries.Count - e.NewItems.Count) == e.NewStartingIndex))\r\n            {\r\n                Reset();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// The parent of the ResourceDictionaryDispenser.\r\n        /// </summary>\r\n        private IResourceDictionaryDispenser _parent;\r\n\r\n        /// <summary>\r\n        /// Event that is invoked when the ResourceDictionaryDispenser's contents have changed.\r\n        /// </summary>\r\n        public event EventHandler ResourceDictionariesChanged;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the parent of the ResourceDictionaryDispenser.\r\n        /// </summary>\r\n        public IResourceDictionaryDispenser Parent\r\n        {\r\n            get\r\n            {\r\n                return _parent;\r\n            }\r\n            set\r\n            {\r\n                if (_parent != value)\r\n                {\r\n                    if (null != _parent)\r\n                    {\r\n                        _parent.ResourceDictionariesChanged -= new EventHandler(ParentResourceDictionariesChanged);\r\n                    }\r\n                    _parent = value;\r\n                    if (null != _parent)\r\n                    {\r\n                        _parent.ResourceDictionariesChanged += new EventHandler(ParentResourceDictionariesChanged);\r\n                    }\r\n                    OnParentChanged();\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the ResourceDictionaryDispenser class.\r\n        /// </summary>\r\n        public ResourceDictionaryDispenser()\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Resets the state of the ResourceDictionaryDispenser and its enumerators.\r\n        /// </summary>\r\n        private void Reset()\r\n        {\r\n            OnResetting();\r\n\r\n            // Invoke event\r\n            EventHandler handler = ResourceDictionariesChanged;\r\n            if (null != handler)\r\n            {\r\n                handler.Invoke(this, EventArgs.Empty);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Unregisters an enumerator so that it can be garbage collected.\r\n        /// </summary>\r\n        /// <param name=\"enumerator\">The enumerator.</param>\r\n        internal void Unregister(ResourceDictionaryEnumerator enumerator)\r\n        {\r\n            _resourceDictionaryEnumerators.Remove(enumerator);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a rotating enumerator of ResourceDictionary objects that coordinates\r\n        /// with the dispenser object to ensure that no two enumerators are on the same\r\n        /// item. If the dispenser is reset or its collection is changed then the\r\n        /// enumerators are also reset.\r\n        /// </summary>\r\n        /// <param name=\"predicate\">A predicate that returns a value indicating\r\n        /// whether to return an item.</param>\r\n        /// <returns>An enumerator of ResourceDictionaries.</returns>\r\n        [SuppressMessage(\"Microsoft.Reliability\", \"CA2000:Dispose objects before losing scope\", Justification = \"Returning a usable enumerator instance.\")]\r\n        public IEnumerator<ResourceDictionary> GetResourceDictionariesWhere(Func<ResourceDictionary, bool> predicate)\r\n        {\r\n            ResourceDictionaryEnumerator enumerator = new ResourceDictionaryEnumerator(this, predicate);\r\n\r\n            _ignoreResourceDictionaryDispensedByEnumerator = true;\r\n            try\r\n            {\r\n                foreach (ResourceDictionaryDispensedEventArgs args in _resourceDictionariesDispensed)\r\n                {\r\n                    enumerator.ResourceDictionaryDispenserResourceDictionaryDispensed(this, args);\r\n                }\r\n            }\r\n            finally\r\n            {\r\n                _ignoreResourceDictionaryDispensedByEnumerator = false;\r\n            }\r\n\r\n            _resourceDictionaryEnumerators.Add(enumerator);\r\n            return enumerator;\r\n        }\r\n\r\n        /// <summary>\r\n        /// This method is raised when an enumerator dispenses a ResourceDictionary.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source of the event.</param>\r\n        /// <param name=\"e\">Information about the event.</param>\r\n        internal void EnumeratorResourceDictionaryDispensed(object sender, ResourceDictionaryDispensedEventArgs e)\r\n        {\r\n            if (!_ignoreResourceDictionaryDispensedByEnumerator)\r\n            {\r\n                OnEnumeratorResourceDictionaryDispensed(this, e);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Raises the ParentChanged event.\r\n        /// </summary>\r\n        private void OnParentChanged()\r\n        {\r\n            foreach (ResourceDictionaryEnumerator enumerator in _resourceDictionaryEnumerators)\r\n            {\r\n                enumerator.ResourceDictionaryDispenserParentChanged();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Raises the EnumeratorResourceDictionaryDispensed event.\r\n        /// </summary>\r\n        /// <param name=\"source\">The source of the event.</param>\r\n        /// <param name=\"args\">Information about the event.</param>\r\n        private void OnEnumeratorResourceDictionaryDispensed(object source, ResourceDictionaryDispensedEventArgs args)\r\n        {\r\n            // Remove this item from the list of dispensed styles.\r\n            _resourceDictionariesDispensed.Remove(args);\r\n\r\n            // Add this item to the end of the list of dispensed styles.\r\n            _resourceDictionariesDispensed.AddLast(args);\r\n\r\n            foreach (ResourceDictionaryEnumerator enumerator in _resourceDictionaryEnumerators)\r\n            {\r\n                enumerator.ResourceDictionaryDispenserResourceDictionaryDispensed(source, args);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// This method raises the EnumeratorsResetting event.\r\n        /// </summary>\r\n        private void OnResetting()\r\n        {\r\n            _resourceDictionariesDispensed.Clear();\r\n\r\n            foreach (ResourceDictionaryEnumerator enumerator in _resourceDictionaryEnumerators)\r\n            {\r\n                enumerator.ResourceDictionaryDispenserResetting();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the Parent's ResourceDictionariesChanged event.\r\n        /// </summary>\r\n        /// <param name=\"sender\">Parent instance.</param>\r\n        /// <param name=\"e\">Event args.</param>\r\n        private void ParentResourceDictionariesChanged(object sender, EventArgs e)\r\n        {\r\n            Reset();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/ResourceDictionaryEnumerator.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// An enumerator that dispenses ResourceDictionaries sequentially by coordinating with\r\n    /// related enumerators.  Enumerators are related through an association\r\n    /// with a parent ResourceDictionaryDispenser class.\r\n    /// </summary>\r\n    internal class ResourceDictionaryEnumerator : IEnumerator<ResourceDictionary>\r\n    {\r\n        /// <summary>\r\n        /// The index of current item in the ResourceDictionaryDispenser's list.\r\n        /// </summary>\r\n        private int? index;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the current ResourceDictionary.\r\n        /// </summary>\r\n        private ResourceDictionary CurrentResourceDictionary { get; set; }\r\n\r\n        /// <summary>\r\n        /// The parent enumerator.\r\n        /// </summary>\r\n        private IEnumerator<ResourceDictionary> _parentEnumerator;\r\n\r\n        /// <summary>\r\n        /// Gets the parent enumerator.\r\n        /// </summary>\r\n        private IEnumerator<ResourceDictionary> ParentEnumerator\r\n        {\r\n            get\r\n            {\r\n                if (_parentEnumerator == null && ResourceDictionaryDispenser.Parent != null)\r\n                {\r\n                    _parentEnumerator = ResourceDictionaryDispenser.Parent.GetResourceDictionariesWhere(Predicate);\r\n                }\r\n                return _parentEnumerator;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of a ResourceDictionaryEnumerator.\r\n        /// </summary>\r\n        /// <param name=\"dispenser\">The dispenser that dispensed this\r\n        /// ResourceDictionaryEnumerator.</param>\r\n        /// <param name=\"predicate\">A predicate used to determine which\r\n        /// ResourceDictionaries to return.</param>\r\n        public ResourceDictionaryEnumerator(ResourceDictionaryDispenser dispenser, Func<ResourceDictionary, bool> predicate)\r\n        {\r\n            ResourceDictionaryDispenser = dispenser;\r\n            Predicate = predicate;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the parent has changed.\r\n        /// </summary>\r\n        internal void ResourceDictionaryDispenserParentChanged()\r\n        {\r\n            _parentEnumerator = null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the index of the next suitable style in the list.\r\n        /// </summary>\r\n        /// <param name=\"startIndex\">The index at which to start looking.</param>\r\n        /// <returns>The index of the next suitable ResourceDictionary.</returns>\r\n        private int? GetIndexOfNextSuitableResourceDictionary(int startIndex)\r\n        {\r\n            if (ResourceDictionaryDispenser.ResourceDictionaries == null || ResourceDictionaryDispenser.ResourceDictionaries.Count == 0)\r\n            {\r\n                return new int?();\r\n            }\r\n\r\n            if (startIndex >= ResourceDictionaryDispenser.ResourceDictionaries.Count)\r\n            {\r\n                startIndex = 0;\r\n            }\r\n\r\n            int counter = startIndex;\r\n            do\r\n            {\r\n                if (Predicate(ResourceDictionaryDispenser.ResourceDictionaries[counter]))\r\n                {\r\n                    return counter;\r\n                }\r\n\r\n                counter = (counter + 1) % ResourceDictionaryDispenser.ResourceDictionaries.Count;\r\n            }\r\n            while (startIndex != counter);\r\n\r\n            return new int?();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Resets the dispenser.\r\n        /// </summary>\r\n        internal void ResourceDictionaryDispenserResetting()\r\n        {\r\n            if (!ShouldRetrieveFromParentEnumerator)\r\n            {\r\n                index = new int?();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a predicate that returns a value indicating whether a \r\n        /// ResourceDictionary should be returned by this enumerator.\r\n        /// </summary>\r\n        /// <returns>A value indicating whether a ResourceDictionary can be returned by this\r\n        /// enumerator.</returns>\r\n        private Func<ResourceDictionary, bool> Predicate { get; set; }\r\n\r\n        /// <summary>\r\n        /// This method is invoked when one of the related enumerator's\r\n        /// dispenses.  The enumerator checks to see if the item\r\n        /// dispensed would've been the next item it would have returned.  If\r\n        /// so it updates it's index to the position after the previously\r\n        /// returned item.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The ResourceDictionaryDispenser.</param>\r\n        /// <param name=\"e\">Information about the event.</param>\r\n        internal void ResourceDictionaryDispenserResourceDictionaryDispensed(object sender, ResourceDictionaryDispensedEventArgs e)\r\n        {\r\n            if (!ShouldRetrieveFromParentEnumerator && Predicate(e.ResourceDictionary))\r\n            {\r\n                int? nextStyleIndex = GetIndexOfNextSuitableResourceDictionary(index ?? 0);\r\n                if ((nextStyleIndex ?? -1) == e.Index)\r\n                {\r\n                    index = (e.Index + 1) % ResourceDictionaryDispenser.ResourceDictionaries.Count;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Raises the EnumeratorResourceDictionaryDispensed.\r\n        /// </summary>\r\n        /// <param name=\"args\">Information about the ResourceDictionary dispensed.</param>\r\n        protected virtual void OnStyleDispensed(ResourceDictionaryDispensedEventArgs args)\r\n        {\r\n            ResourceDictionaryDispenser.EnumeratorResourceDictionaryDispensed(this, args);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the dispenser that dispensed this enumerator.\r\n        /// </summary>\r\n        public ResourceDictionaryDispenser ResourceDictionaryDispenser { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Gets the current ResourceDictionary.\r\n        /// </summary>\r\n        public ResourceDictionary Current\r\n        {\r\n            get { return CurrentResourceDictionary; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the current ResourceDictionary.\r\n        /// </summary>\r\n        object System.Collections.IEnumerator.Current\r\n        {\r\n            get { return CurrentResourceDictionary; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Moves to the next ResourceDictionary.\r\n        /// </summary>\r\n        /// <returns>A value indicating whether there are any more suitable\r\n        /// ResourceDictionary.</returns>\r\n        public bool MoveNext()\r\n        {\r\n            if (ShouldRetrieveFromParentEnumerator && ParentEnumerator != null)\r\n            {\r\n                bool isMore = ParentEnumerator.MoveNext();\r\n                if (isMore)\r\n                {\r\n                    this.CurrentResourceDictionary = ParentEnumerator.Current;\r\n                }\r\n                return isMore;\r\n            }\r\n\r\n            index = GetIndexOfNextSuitableResourceDictionary(index ?? 0);\r\n            if (index == null)\r\n            {\r\n                CurrentResourceDictionary = null;\r\n                Dispose();\r\n                return false;\r\n            }\r\n            \r\n            CurrentResourceDictionary = ResourceDictionaryDispenser.ResourceDictionaries[index.Value];\r\n            OnStyleDispensed(new ResourceDictionaryDispensedEventArgs(index.Value, CurrentResourceDictionary));\r\n\r\n            return true;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether a enumerator should return ResourceDictionaries\r\n        /// from its parent enumerator.\r\n        /// </summary>\r\n        private bool ShouldRetrieveFromParentEnumerator\r\n        {\r\n            get { return this.ResourceDictionaryDispenser.ResourceDictionaries == null; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Resets the enumerator.\r\n        /// </summary>\r\n        public void Reset()\r\n        {\r\n            throw new NotSupportedException(Properties.Resources.ResourceDictionaryEnumerator_CantResetEnumeratorResetDispenserInstead);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Stops listening to the dispenser.\r\n        /// </summary>\r\n        public void Dispose()\r\n        {\r\n            if (_parentEnumerator != null)\r\n            {\r\n                _parentEnumerator.Dispose();\r\n            }\r\n\r\n            this.ResourceDictionaryDispenser.Unregister(this);\r\n            GC.SuppressFinalize(this);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/AreaSeries.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\nusing System.Windows.Media;\r\nusing System.Windows.Shapes;\r\n\r\n#if !DEFINITION_SERIES_COMPATIBILITY_MODE\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Represents a control that contains a data series to be rendered in X/Y \r\n    /// line format.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    [StyleTypedProperty(Property = DataPointStyleName, StyleTargetType = typeof(AreaDataPoint))]\r\n    [StyleTypedProperty(Property = \"LegendItemStyle\", StyleTargetType = typeof(LegendItem))]\r\n    [StyleTypedProperty(Property = \"PathStyle\", StyleTargetType = typeof(Path))]\r\n    [TemplatePart(Name = DataPointSeries.PlotAreaName, Type = typeof(Canvas))]\r\n    [SuppressMessage(\"Microsoft.Maintainability\", \"CA1501:AvoidExcessiveInheritance\", Justification = \"Depth of hierarchy is necessary to avoid code duplication.\")]\r\n    public partial class AreaSeries : LineAreaBaseSeries<AreaDataPoint>, IAnchoredToOrigin\r\n    {\r\n        #region public Geometry Geometry\r\n        /// <summary>\r\n        /// Gets the geometry property.\r\n        /// </summary>\r\n        public Geometry Geometry\r\n        {\r\n            get { return GetValue(GeometryProperty) as Geometry; }\r\n            private set { SetValue(GeometryProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Geometry dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty GeometryProperty =\r\n            DependencyProperty.Register(\r\n                \"Geometry\",\r\n                typeof(Geometry),\r\n                typeof(AreaSeries),\r\n                null);\r\n        #endregion public Geometry Geometry\r\n\r\n        #region public Style PathStyle\r\n        /// <summary>\r\n        /// Gets or sets the style of the Path object that follows the data \r\n        /// points.\r\n        /// </summary>\r\n        public Style PathStyle\r\n        {\r\n            get { return GetValue(PathStyleProperty) as Style; }\r\n            set { SetValue(PathStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the PathStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty PathStyleProperty =\r\n            DependencyProperty.Register(\r\n                \"PathStyle\",\r\n                typeof(Style),\r\n                typeof(AreaSeries),\r\n                null);\r\n        #endregion public Style PathStyle\r\n\r\n        /// <summary>\r\n        /// Initializes the static members of the AreaSeries class.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1810:InitializeReferenceTypeStaticFieldsInline\", Justification = \"Dependency properties are initialized in-line.\")]\r\n        static AreaSeries()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(AreaSeries), new FrameworkPropertyMetadata(typeof(AreaSeries)));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the AreaSeries class.\r\n        /// </summary>\r\n        public AreaSeries()\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Acquire a horizontal linear axis and a vertical linear axis.\r\n        /// </summary>\r\n        /// <param name=\"firstDataPoint\">The first data point.</param>\r\n        protected override void GetAxes(DataPoint firstDataPoint)\r\n        {\r\n            GetAxes(\r\n                firstDataPoint,\r\n                (axis) => axis.Orientation == AxisOrientation.X,\r\n                () =>\r\n                {\r\n                    IAxis axis = CreateRangeAxisFromData(firstDataPoint.IndependentValue);\r\n                    if (axis == null)\r\n                    {\r\n                        axis = new CategoryAxis();\r\n                    }\r\n                    axis.Orientation = AxisOrientation.X;\r\n                    return axis;\r\n                },\r\n                (axis) => \r\n                    {\r\n                        IRangeAxis rangeAxis = axis as IRangeAxis;\r\n                        return rangeAxis != null && rangeAxis.Origin != null && axis.Orientation == AxisOrientation.Y;\r\n                    },\r\n                () =>\r\n                {\r\n                    DisplayAxis axis = (DisplayAxis)CreateRangeAxisFromData(firstDataPoint.DependentValue);\r\n                    if (axis == null || (axis as IRangeAxis).Origin == null)\r\n                    {\r\n                        throw new InvalidOperationException(Properties.Resources.DataPointSeriesWithAxes_NoSuitableAxisAvailableForPlottingDependentValue);\r\n                    }\r\n                    axis.ShowGridLines = true;\r\n                    axis.Orientation = AxisOrientation.Y;\r\n                    return axis;\r\n                });\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the Series shape object from a collection of Points.\r\n        /// </summary>\r\n        /// <param name=\"points\">Collection of Points.</param>\r\n        protected override void UpdateShapeFromPoints(IEnumerable<Point> points)\r\n        {\r\n            UnitValue originCoordinate = ActualDependentRangeAxis.GetPlotAreaCoordinate(ActualDependentRangeAxis.Origin);\r\n            UnitValue maximumCoordinate = ActualDependentRangeAxis.GetPlotAreaCoordinate(ActualDependentRangeAxis.Range.Maximum);\r\n            if (points.Any() && ValueHelper.CanGraph(originCoordinate.Value) && ValueHelper.CanGraph(maximumCoordinate.Value))\r\n            {\r\n                double originY = Math.Floor(originCoordinate.Value);\r\n                PathFigure figure = new PathFigure();\r\n                figure.IsClosed = true;\r\n                figure.IsFilled = true;\r\n\r\n                double maximum = maximumCoordinate.Value;\r\n                Point startPoint;\r\n                IEnumerator<Point> pointEnumerator = points.GetEnumerator();\r\n                pointEnumerator.MoveNext();\r\n                startPoint = new Point(pointEnumerator.Current.X, maximum - originY);\r\n                figure.StartPoint = startPoint;\r\n\r\n                Point lastPoint;\r\n                do\r\n                {\r\n                    lastPoint = pointEnumerator.Current;\r\n                    figure.Segments.Add(new LineSegment { Point = pointEnumerator.Current });\r\n                }\r\n                while (pointEnumerator.MoveNext());\r\n                figure.Segments.Add(new LineSegment { Point = new Point(lastPoint.X, maximum - originY) });\r\n\r\n                if (figure.Segments.Count > 1)\r\n                {\r\n                    PathGeometry geometry = new PathGeometry();\r\n                    geometry.Figures.Add(figure);\r\n                    Geometry = geometry;\r\n                    return;\r\n                }\r\n            }\r\n            else\r\n            {\r\n                Geometry = null;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Remove value margins from the side of the data points to ensure\r\n        /// that area chart is flush against the edge of the chart.\r\n        /// </summary>\r\n        /// <param name=\"consumer\">The value margin consumer.</param>\r\n        /// <returns>A sequence of value margins.</returns>\r\n        protected override IEnumerable<ValueMargin> GetValueMargins(IValueMarginConsumer consumer)\r\n        {\r\n            if (consumer == ActualIndependentAxis)\r\n            {\r\n                return Enumerable.Empty<ValueMargin>();\r\n            }\r\n            return base.GetValueMargins(consumer);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the axis to which the series is anchored.\r\n        /// </summary>\r\n        IRangeAxis IAnchoredToOrigin.AnchoredAxis\r\n        {\r\n            get { return AnchoredAxis; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the axis to which the series is anchored.\r\n        /// </summary>\r\n        protected IRangeAxis AnchoredAxis\r\n        {\r\n            get { return ActualDependentRangeAxis; }\r\n        }\r\n    }\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/BarSeries.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\n\r\n#if !DEFINITION_SERIES_COMPATIBILITY_MODE\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Represents a control that contains a data series to be rendered in bar format.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    [SuppressMessage(\"Microsoft.Maintainability\", \"CA1501:AvoidExcessiveInheritance\", Justification = \"Depth of hierarchy is necessary to avoid code duplication.\")]\r\n    [StyleTypedProperty(Property = DataPointStyleName, StyleTargetType = typeof(BarDataPoint))]\r\n    [StyleTypedProperty(Property = \"LegendItemStyle\", StyleTargetType = typeof(LegendItem))]\r\n    [TemplatePart(Name = DataPointSeries.PlotAreaName, Type = typeof(Canvas))]\r\n    public partial class BarSeries : ColumnBarBaseSeries<BarDataPoint>\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the BarSeries class.\r\n        /// </summary>\r\n        public BarSeries()\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Acquire a horizontal category axis and a vertical linear axis.\r\n        /// </summary>\r\n        /// <param name=\"firstDataPoint\">The first data point.</param>\r\n        protected override void GetAxes(DataPoint firstDataPoint)\r\n        {\r\n            GetAxes(\r\n                firstDataPoint,\r\n                (axis) => axis.Orientation == AxisOrientation.Y,\r\n                () => new CategoryAxis { Orientation = AxisOrientation.Y },\r\n                (axis) =>\r\n                {\r\n                    IRangeAxis rangeAxis = axis as IRangeAxis;\r\n                    return rangeAxis != null && rangeAxis.Origin != null && axis.Orientation == AxisOrientation.X;\r\n                },\r\n                () =>\r\n                {\r\n                    IRangeAxis rangeAxis = CreateRangeAxisFromData(firstDataPoint.DependentValue);\r\n                    rangeAxis.Orientation = AxisOrientation.X;\r\n                    if (rangeAxis == null || rangeAxis.Origin == null)\r\n                    {\r\n                        throw new InvalidOperationException(Properties.Resources.DataPointSeriesWithAxes_NoSuitableAxisAvailableForPlottingDependentValue);\r\n                    }\r\n                    DisplayAxis axis = rangeAxis as DisplayAxis;\r\n                    if (axis != null)\r\n                    {\r\n                        axis.ShowGridLines = true;\r\n                    }\r\n                    return rangeAxis;\r\n                });\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates each point.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point to update.</param>\r\n        protected override void UpdateDataPoint(DataPoint dataPoint)\r\n        {\r\n            if (SeriesHost == null || PlotArea == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            object category = dataPoint.ActualIndependentValue ?? (this.ActiveDataPoints.IndexOf(dataPoint) + 1);\r\n            Range<UnitValue> coordinateRange = GetCategoryRange(category);\r\n\r\n            if (!coordinateRange.HasData)\r\n            {\r\n                return;\r\n            }\r\n            else if (coordinateRange.Maximum.Unit != Unit.Pixels || coordinateRange.Minimum.Unit != Unit.Pixels)\r\n            {\r\n                throw new InvalidOperationException(Properties.Resources.DataPointSeriesWithAxes_ThisSeriesDoesNotSupportRadialAxes);\r\n            }\r\n\r\n            double minimum = (double)coordinateRange.Minimum.Value;\r\n            double maximum = (double)coordinateRange.Maximum.Value;\r\n\r\n            IEnumerable<BarSeries> barSeries = SeriesHost.Series.OfType<BarSeries>().Where(series => series.ActualIndependentAxis == ActualIndependentAxis);\r\n            int numberOfSeries = barSeries.Count();\r\n            double coordinateRangeHeight = (maximum - minimum);\r\n            double segmentHeight = coordinateRangeHeight * 0.8;\r\n            double barHeight = segmentHeight / numberOfSeries;\r\n            int seriesIndex = barSeries.IndexOf(this);\r\n\r\n            double dataPointX = ActualDependentRangeAxis.GetPlotAreaCoordinate(ValueHelper.ToDouble(dataPoint.ActualDependentValue)).Value;\r\n            double zeroPointX = ActualDependentRangeAxis.GetPlotAreaCoordinate(ActualDependentRangeAxis.Origin).Value;\r\n\r\n            double offset = seriesIndex * Math.Round(barHeight) + coordinateRangeHeight * 0.1;\r\n            double dataPointY = minimum + offset;\r\n\r\n            if (GetIsDataPointGrouped(category))\r\n            {\r\n                // Multiple DataPoints share this category; offset and overlap them appropriately\r\n                IGrouping<object, DataPoint> categoryGrouping = GetDataPointGroup(category);\r\n                int index = categoryGrouping.IndexOf(dataPoint);\r\n                dataPointY += (index * (barHeight * 0.2)) / (categoryGrouping.Count() - 1);\r\n                barHeight *= 0.8;\r\n                Canvas.SetZIndex(dataPoint, -index);\r\n            }\r\n\r\n            if (ValueHelper.CanGraph(dataPointX) && ValueHelper.CanGraph(dataPointY) && ValueHelper.CanGraph(zeroPointX))\r\n            {\r\n                dataPoint.Visibility = Visibility.Visible;\r\n\r\n                double top = Math.Round(dataPointY);\r\n                double height = Math.Round(barHeight);\r\n\r\n                double left = Math.Round(Math.Min(dataPointX, zeroPointX) - 0.5);\r\n                double right = Math.Round(Math.Max(dataPointX, zeroPointX) - 0.5);\r\n                double width = right - left + 1;\r\n\r\n                Canvas.SetLeft(dataPoint, left);\r\n                Canvas.SetTop(dataPoint, top);\r\n                dataPoint.Width = width;\r\n                dataPoint.Height = height;\r\n            }\r\n            else\r\n            {\r\n                dataPoint.Visibility = Visibility.Collapsed;\r\n            }\r\n        }\r\n    }\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/BubbleSeries.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Windows.Data;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Represents a control that contains a data series to be rendered in X/Y \r\n    /// line format.  A third binding determines the size of the data point.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    [TemplatePart(Name = DataPointSeries.PlotAreaName, Type = typeof(Canvas))]\r\n    [StyleTypedProperty(Property = DataPointStyleName, StyleTargetType = typeof(BubbleDataPoint))]\r\n    [StyleTypedProperty(Property = \"LegendItemStyle\", StyleTargetType = typeof(LegendItem))]\r\n    public class BubbleSeries : DataPointSingleSeriesWithAxes\r\n    {\r\n        /// <summary>\r\n        /// The maximum bubble size as a ratio of the smallest dimension.\r\n        /// </summary>\r\n        private const double MaximumBubbleSizeAsRatioOfSmallestDimension = 0.25;\r\n\r\n        /// <summary>\r\n        /// The binding used to identify the size value.\r\n        /// </summary>\r\n        private Binding _sizeValueBinding;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Binding to use for identifying the size of the bubble.\r\n        /// </summary>\r\n        public Binding SizeValueBinding \r\n        {\r\n            get\r\n            {\r\n                return _sizeValueBinding;\r\n            }\r\n            set\r\n            {\r\n                if (_sizeValueBinding != value)\r\n                {\r\n                    _sizeValueBinding = value;\r\n                    Refresh();\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Binding Path to use for identifying the size of the bubble.\r\n        /// </summary>\r\n        public string SizeValuePath\r\n        {\r\n            get\r\n            {\r\n                return (null != SizeValueBinding) ? SizeValueBinding.Path.Path : null;\r\n            }\r\n            set\r\n            {\r\n                if (null == value)\r\n                {\r\n                    SizeValueBinding = null;\r\n                }\r\n                else\r\n                {\r\n                    SizeValueBinding = new Binding(value);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Stores the range of ActualSize values for the BubbleDataPoints.\r\n        /// </summary>\r\n        private Range<double> _rangeOfActualSizeValues = new Range<double>();\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the bubble series.\r\n        /// </summary>\r\n        public BubbleSeries()\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates a new instance of bubble data point.\r\n        /// </summary>\r\n        /// <returns>A new instance of bubble data point.</returns>\r\n        protected override DataPoint CreateDataPoint()\r\n        {\r\n            return new BubbleDataPoint();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the custom ResourceDictionary to use for necessary resources.\r\n        /// </summary>\r\n        /// <returns>\r\n        /// ResourceDictionary to use for necessary resources.\r\n        /// </returns>\r\n        protected override IEnumerator<ResourceDictionary> GetResourceDictionaryEnumeratorFromHost()\r\n        {\r\n            return GetResourceDictionaryWithTargetType(SeriesHost, typeof(BubbleDataPoint), true);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Acquire a horizontal linear axis and a vertical linear axis.\r\n        /// </summary>\r\n        /// <param name=\"firstDataPoint\">The first data point.</param>\r\n        protected override void GetAxes(DataPoint firstDataPoint)\r\n        {\r\n            GetAxes(\r\n                firstDataPoint,\r\n                (axis) => axis.Orientation == AxisOrientation.X,\r\n                () =>\r\n                {\r\n                    IAxis axis = CreateRangeAxisFromData(firstDataPoint.IndependentValue);\r\n                    if (axis == null)\r\n                    {\r\n                        axis = new CategoryAxis();\r\n                    }\r\n                    axis.Orientation = AxisOrientation.X;\r\n                    return axis;\r\n                },\r\n                (axis) => axis.Orientation == AxisOrientation.Y && axis is IRangeAxis,\r\n                () =>\r\n                {\r\n                    DisplayAxis axis = (DisplayAxis)CreateRangeAxisFromData(firstDataPoint.DependentValue);\r\n                    if (axis == null)\r\n                    {\r\n                        throw new InvalidOperationException(Properties.Resources.DataPointSeriesWithAxes_NoSuitableAxisAvailableForPlottingDependentValue);\r\n                    }\r\n                    axis.ShowGridLines = true;\r\n                    axis.Orientation = AxisOrientation.Y;\r\n                    return axis;\r\n                });\r\n        }\r\n\r\n        /// <summary>\r\n        /// Prepares a bubble data point by binding the size value binding to\r\n        /// the size property.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point to prepare.</param>\r\n        /// <param name=\"dataContext\">The data context of the data point.\r\n        /// </param>\r\n        protected override void PrepareDataPoint(DataPoint dataPoint, object dataContext)\r\n        {\r\n            base.PrepareDataPoint(dataPoint, dataContext);\r\n\r\n            BubbleDataPoint bubbleDataPoint = (BubbleDataPoint)dataPoint;\r\n            bubbleDataPoint.SetBinding(BubbleDataPoint.SizeProperty, SizeValueBinding ?? DependentValueBinding ?? IndependentValueBinding);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Attaches size change and actual size change event handlers to the\r\n        /// data point.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point.</param>\r\n        protected override void AttachEventHandlersToDataPoint(DataPoint dataPoint)\r\n        {\r\n            BubbleDataPoint bubbleDataPoint = (BubbleDataPoint)dataPoint;\r\n            bubbleDataPoint.SizePropertyChanged += BubbleDataPointSizePropertyChanged;\r\n            bubbleDataPoint.ActualSizePropertyChanged += BubbleDataPointActualSizePropertyChanged;\r\n            base.AttachEventHandlersToDataPoint(dataPoint);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Detaches size change and actual size change event handlers from the\r\n        /// data point.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point.</param>\r\n        protected override void DetachEventHandlersFromDataPoint(DataPoint dataPoint)\r\n        {\r\n            BubbleDataPoint bubbleDataPoint = (BubbleDataPoint)dataPoint;\r\n            bubbleDataPoint.SizePropertyChanged -= BubbleDataPointSizePropertyChanged;\r\n            bubbleDataPoint.ActualSizePropertyChanged -= BubbleDataPointActualSizePropertyChanged;\r\n            base.DetachEventHandlersFromDataPoint(dataPoint);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates all data points when the actual size property of a data \r\n        /// point changes.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source of the event.</param>\r\n        /// <param name=\"e\">Information about the event.</param>\r\n        private void BubbleDataPointActualSizePropertyChanged(object sender, RoutedPropertyChangedEventArgs<double> e)\r\n        {\r\n            Range<double> newRangeOfActualSizeValues = ActiveDataPoints.OfType<BubbleDataPoint>().Select(d => Math.Abs(d.ActualSize)).GetRange();\r\n            if (newRangeOfActualSizeValues == _rangeOfActualSizeValues)\r\n            {\r\n                // No range change - only need to update the current point\r\n                UpdateDataPoint((BubbleDataPoint)sender);\r\n            }\r\n            else\r\n            {\r\n                // Range has changed - need to update all points\r\n                UpdateDataPoints(ActiveDataPoints);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Animates the value of the ActualSize property to the size property\r\n        /// when it changes.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source of the event.</param>\r\n        /// <param name=\"e\">Information about the event.</param>\r\n        private void BubbleDataPointSizePropertyChanged(object sender, RoutedPropertyChangedEventArgs<double> e)\r\n        {\r\n            BubbleDataPoint dataPoint = (BubbleDataPoint)sender;\r\n\r\n            DependencyPropertyAnimationHelper.BeginAnimation(\r\n                dataPoint, \r\n                BubbleDataPoint.ActualSizeProperty, \r\n                \"ActualSize\", \r\n                e.NewValue, \r\n                TransitionDuration, \r\n                this.TransitionEasingFunction);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Calculates the range of ActualSize values of all active BubbleDataPoints.\r\n        /// </summary>\r\n        protected override void OnBeforeUpdateDataPoints()\r\n        {\r\n            _rangeOfActualSizeValues = ActiveDataPoints.OfType<BubbleDataPoint>().Select(d => Math.Abs(d.ActualSize)).GetRange();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Ensure that if any data points are updated, all data points are \r\n        /// updated.\r\n        /// </summary>\r\n        /// <param name=\"dataPoints\">The data points to update.</param>\r\n        protected override void UpdateDataPoints(IEnumerable<DataPoint> dataPoints)\r\n        {\r\n            base.UpdateDataPoints(ActiveDataPoints);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the data point's visual representation.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point.</param>\r\n        protected override void UpdateDataPoint(DataPoint dataPoint)\r\n        {\r\n            double maximumDiameter = Math.Min(PlotAreaSize.Width, PlotAreaSize.Height) * MaximumBubbleSizeAsRatioOfSmallestDimension;\r\n\r\n            BubbleDataPoint bubbleDataPoint = (BubbleDataPoint)dataPoint;\r\n\r\n            double ratioOfLargestBubble =\r\n                (_rangeOfActualSizeValues.HasData && _rangeOfActualSizeValues.Maximum != 0.0 && bubbleDataPoint.ActualSize >= 0.0) ? Math.Abs(bubbleDataPoint.ActualSize) / _rangeOfActualSizeValues.Maximum : 0.0;\r\n\r\n            bubbleDataPoint.Width = ratioOfLargestBubble * maximumDiameter;\r\n            bubbleDataPoint.Height = ratioOfLargestBubble * maximumDiameter;\r\n\r\n            double left =\r\n                (ActualIndependentAxis.GetPlotAreaCoordinate(bubbleDataPoint.ActualIndependentValue)).Value\r\n                    - (bubbleDataPoint.Width / 2.0);\r\n\r\n            double top =\r\n                (PlotAreaSize.Height\r\n                    - (bubbleDataPoint.Height / 2.0))\r\n                    - ActualDependentRangeAxis.GetPlotAreaCoordinate(bubbleDataPoint.ActualDependentValue).Value;\r\n\r\n            if (ValueHelper.CanGraph(left) && ValueHelper.CanGraph(top))\r\n            {\r\n                dataPoint.Visibility = Visibility.Visible;\r\n\r\n                Canvas.SetLeft(bubbleDataPoint, left);\r\n                Canvas.SetTop(bubbleDataPoint, top);\r\n            }\r\n            else\r\n            {\r\n                dataPoint.Visibility = Visibility.Collapsed;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the value margins after all data points are updated.\r\n        /// </summary>\r\n        protected override void OnAfterUpdateDataPoints()\r\n        {\r\n            IValueMarginProvider provider = this as IValueMarginProvider;\r\n            {\r\n                IValueMarginConsumer consumer = ActualDependentRangeAxis as IValueMarginConsumer;\r\n                if (consumer != null)\r\n                {\r\n                    consumer.ValueMarginsChanged(provider, GetValueMargins(consumer));\r\n                }\r\n            }\r\n            {\r\n                IValueMarginConsumer consumer = ActualIndependentAxis as IValueMarginConsumer;\r\n                if (consumer != null)\r\n                {\r\n                    consumer.ValueMarginsChanged(provider, GetValueMargins(consumer));\r\n                }\r\n            }\r\n            base.OnAfterUpdateDataPoints();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the dependent axis as a range axis.\r\n        /// </summary>\r\n        public IRangeAxis ActualDependentRangeAxis { get { return this.InternalActualDependentAxis as IRangeAxis; } }\r\n\r\n        #region public IRangeAxis DependentRangeAxis\r\n        /// <summary>\r\n        /// Gets or sets the dependent range axis.\r\n        /// </summary>\r\n        public IRangeAxis DependentRangeAxis\r\n        {\r\n            get { return GetValue(DependentRangeAxisProperty) as IRangeAxis; }\r\n            set { SetValue(DependentRangeAxisProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the DependentRangeAxis dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty DependentRangeAxisProperty =\r\n            DependencyProperty.Register(\r\n                \"DependentRangeAxis\",\r\n                typeof(IRangeAxis),\r\n                typeof(BubbleSeries),\r\n                new PropertyMetadata(null, OnDependentRangeAxisPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// DependentRangeAxisProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">BubbleSeries that changed its DependentRangeAxis.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnDependentRangeAxisPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            BubbleSeries source = (BubbleSeries)d;\r\n            IRangeAxis newValue = (IRangeAxis)e.NewValue;\r\n            source.OnDependentRangeAxisPropertyChanged(newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// DependentRangeAxisProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        private void OnDependentRangeAxisPropertyChanged(IRangeAxis newValue)\r\n        {\r\n            this.InternalDependentAxis = (IAxis)newValue;\r\n        }\r\n        #endregion public IRangeAxis DependentRangeAxis\r\n\r\n        /// <summary>\r\n        /// Gets the independent axis as a range axis.\r\n        /// </summary>\r\n        public IAxis ActualIndependentAxis { get { return this.InternalActualIndependentAxis as IAxis; } }\r\n\r\n        #region public IAxis IndependentAxis\r\n        /// <summary>\r\n        /// Gets or sets independent range axis.\r\n        /// </summary>\r\n        public IAxis IndependentAxis\r\n        {\r\n            get { return GetValue(IndependentAxisProperty) as IAxis; }\r\n            set { SetValue(IndependentAxisProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the IndependentAxis dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty IndependentAxisProperty =\r\n            DependencyProperty.Register(\r\n                \"IndependentAxis\",\r\n                typeof(IAxis),\r\n                typeof(BubbleSeries),\r\n                new PropertyMetadata(null, OnIndependentAxisPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// IndependentAxisProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">BubbleSeries that changed its IndependentAxis.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnIndependentAxisPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            BubbleSeries source = (BubbleSeries)d;\r\n            IAxis newValue = (IAxis)e.NewValue;\r\n            source.OnIndependentAxisPropertyChanged(newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// IndependentAxisProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        private void OnIndependentAxisPropertyChanged(IAxis newValue)\r\n        {\r\n            this.InternalIndependentAxis = (IAxis)newValue;\r\n        }\r\n        #endregion public IAxis IndependentAxis\r\n\r\n        /// <summary>\r\n        /// The margins required for each value.\r\n        /// </summary>\r\n        /// <param name=\"consumer\">The consumer to return the value margins for.</param>\r\n        /// <returns>A sequence of margins for each value.</returns>\r\n        protected override IEnumerable<ValueMargin> GetValueMargins(IValueMarginConsumer consumer)\r\n        {\r\n            IAxis axis = consumer as IAxis;\r\n            if (axis != null)\r\n            {\r\n                return ActiveDataPoints.Select(dataPoint =>\r\n                {\r\n                    double margin = dataPoint.GetMargin(axis);\r\n                    return new ValueMargin(\r\n                        GetActualDataPointAxisValue(dataPoint, axis), \r\n                        margin,\r\n                        margin);\r\n                });\r\n            }\r\n\r\n            return Enumerable.Empty<ValueMargin>();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/CandlestickSeries.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    [StyleTypedProperty(Property = \"DataPointStyle\", StyleTargetType = typeof(CandlestickDataPoint))]\r\n    [StyleTypedProperty(Property = \"LegendItemStyle\", StyleTargetType = typeof(LegendItem))]\r\n    public sealed partial class CandlestickSeries : DataPointSingleSeriesWithAxes\r\n    {\r\n        public Binding OpenValueBinding { get; set; }\r\n        public Binding CloseValueBinding { get; set; }\r\n        public Binding HighValueBinding { get; set; }\r\n        public Binding LowValueBinding { get; set; }\r\n        \r\n        public CandlestickSeries()\r\n        { }\r\n\r\n        /// <summary>\r\n        /// Gets the dependent axis as a range axis.\r\n        /// </summary>\r\n        public IRangeAxis ActualDependentRangeAxis { get { return this.InternalActualDependentAxis as IRangeAxis; } }\r\n\r\n        #region public IRangeAxis DependentRangeAxis\r\n        /// <summary>\r\n        /// Gets or sets the dependent range axis.\r\n        /// </summary>\r\n        public IRangeAxis DependentRangeAxis\r\n        {\r\n            get { return GetValue(DependentRangeAxisProperty) as IRangeAxis; }\r\n            set { SetValue(DependentRangeAxisProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the DependentRangeAxis dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty DependentRangeAxisProperty =\r\n            DependencyProperty.Register(\r\n                \"DependentRangeAxis\",\r\n                typeof(IRangeAxis),\r\n                typeof(CandlestickSeries),\r\n                new PropertyMetadata(null, OnDependentRangeAxisPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// DependentRangeAxisProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">CandlestickSeries that changed its DependentRangeAxis.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnDependentRangeAxisPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            CandlestickSeries source = (CandlestickSeries)d;\r\n            IRangeAxis newValue = (IRangeAxis)e.NewValue;\r\n            source.OnDependentRangeAxisPropertyChanged(newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// DependentRangeAxisProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"newValue\">New value.</param>        \r\n        private void OnDependentRangeAxisPropertyChanged(IRangeAxis newValue)\r\n        {\r\n            this.InternalDependentAxis = (IAxis)newValue;\r\n        }\r\n        #endregion public IRangeAxis DependentRangeAxis\r\n\r\n        /// <summary>\r\n        /// Gets the independent axis as a range axis.\r\n        /// </summary>\r\n        public IRangeAxis ActualIndependentRangeAxis { get { return this.InternalActualIndependentAxis as IRangeAxis; } }\r\n\r\n        #region public IRangeAxis IndependentRangeAxis\r\n        /// <summary>\r\n        /// Gets or sets the independent range axis.\r\n        /// </summary>\r\n        public IRangeAxis IndependentRangeAxis\r\n        {\r\n            get { return GetValue(IndependentRangeAxisProperty) as IRangeAxis; }\r\n            set { SetValue(IndependentRangeAxisProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the IndependentRangeAxis dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty IndependentRangeAxisProperty =\r\n            DependencyProperty.Register(\r\n                \"IndependentRangeAxis\",\r\n                typeof(IRangeAxis),\r\n                typeof(CandlestickSeries),\r\n                new PropertyMetadata(null, OnIndependentRangeAxisPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// IndependentRangeAxisProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">CandlestickSeries that changed its IndependentRangeAxis.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnIndependentRangeAxisPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            CandlestickSeries source = (CandlestickSeries)d;\r\n            IRangeAxis newValue = (IRangeAxis)e.NewValue;\r\n            source.OnIndependentRangeAxisPropertyChanged(newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// IndependentRangeAxisProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"newValue\">New value.</param>        \r\n        private void OnIndependentRangeAxisPropertyChanged(IRangeAxis newValue)\r\n        {\r\n            this.InternalIndependentAxis = (IAxis)newValue;\r\n        }\r\n        #endregion public IRangeAxis IndependentRangeAxis\r\n\r\n        /// <summary>\r\n        /// Acquire a horizontal linear axis and a vertical linear axis.\r\n        /// </summary>\r\n        /// <param name=\"firstDataPoint\">The first data point.</param>\r\n        //protected override void GetAxes(DataPoint firstDataPoint)\r\n        //{           \r\n        //    GetRangeAxis(\r\n        //        InternalIndependentAxis,\r\n        //        firstDataPoint,\r\n        //        AxisOrientation.Horizontal,\r\n        //        () => CreateRangeAxisFromData(firstDataPoint.IndependentValue),\r\n        //        () => InternalActualIndependentAxis as IRangeAxis,\r\n        //        (value) => { InternalActualIndependentAxis = (IAxis)value; },\r\n        //        (dataPoint) => dataPoint.IndependentValue);\r\n\r\n        //    GetRangeAxis(\r\n        //        InternalDependentAxis,\r\n        //        firstDataPoint,\r\n        //        AxisOrientation.Vertical,\r\n        //        () =>\r\n        //        {\r\n        //            HybridAxis axis = (HybridAxis)CreateRangeAxisFromData(firstDataPoint.DependentValue);\r\n        //            axis.ShowGridLines = true;\r\n        //            return (IRangeAxis)axis;\r\n        //        },\r\n        //        () => InternalActualDependentAxis as IRangeAxis,\r\n        //        (value) => { InternalActualDependentAxis = (IAxis)value; },\r\n        //        (dataPoint) => dataPoint.DependentValue);\r\n        //}\r\n        protected override void GetAxes(DataPoint firstDataPoint)\r\n        {\r\n            GetAxes(\r\n                firstDataPoint,\r\n                (axis) => axis.Orientation == AxisOrientation.X,\r\n                () =>\r\n                {\r\n                    IAxis axis = CreateRangeAxisFromData(firstDataPoint.IndependentValue);\r\n                    if (axis == null)\r\n                    {\r\n                        axis = new CategoryAxis();\r\n                    }\r\n                    axis.Orientation = AxisOrientation.X;\r\n                    return axis;\r\n                },\r\n                (axis) => axis.Orientation == AxisOrientation.Y && axis is IRangeAxis,\r\n                () =>\r\n                {\r\n                    DisplayAxis axis = (DisplayAxis)CreateRangeAxisFromData(firstDataPoint.DependentValue);\r\n                    if (axis == null)\r\n                    {\r\n                        throw new InvalidOperationException(Properties.Resources.DataPointSeriesWithAxes_NoSuitableAxisAvailableForPlottingDependentValue);\r\n                    }\r\n                    axis.ShowGridLines = true;\r\n                    axis.Orientation = AxisOrientation.Y;\r\n                    return axis;\r\n                });\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the custom ResourceDictionary to use for necessary resources.\r\n        /// </summary>\r\n        /// <returns>\r\n        /// ResourceDictionary to use for necessary resources.\r\n        /// </returns>\r\n        protected override IEnumerator<ResourceDictionary> GetResourceDictionaryEnumeratorFromHost()\r\n        {\r\n            return GetResourceDictionaryWithTargetType(SeriesHost, typeof(CandlestickDataPoint), true);\r\n        }\r\n\r\n        protected override void PrepareDataPoint(DataPoint dataPoint, object dataContext)\r\n        {\r\n            base.PrepareDataPoint(dataPoint, dataContext);\r\n\r\n            CandlestickDataPoint candlestickDataPoint = (CandlestickDataPoint)dataPoint;\r\n            candlestickDataPoint.SetBinding(CandlestickDataPoint.OpenProperty, OpenValueBinding);\r\n            candlestickDataPoint.SetBinding(CandlestickDataPoint.CloseProperty, CloseValueBinding);\r\n            candlestickDataPoint.SetBinding(CandlestickDataPoint.HighProperty, HighValueBinding);\r\n            candlestickDataPoint.SetBinding(CandlestickDataPoint.LowProperty, LowValueBinding);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates a new Candlestick data point.\r\n        /// </summary>\r\n        /// <returns>A Candlestick data point.</returns>\r\n        protected override DataPoint CreateDataPoint()\r\n        {\r\n            return new CandlestickDataPoint();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the style to use for all data points.\r\n        /// </summary>\r\n        /// <returns>The style to use for all data points.</returns>\r\n        //protected override Style GetDataPointStyleFromHost()\r\n        //{\r\n        //    return SeriesHost.NextStyle(typeof(CandlestickDataPoint), true);\r\n        //}\r\n\r\n        /// <summary>\r\n        /// This method updates a single data point.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point to update.</param>\r\n        protected override void UpdateDataPoint(DataPoint dataPoint)\r\n        {\r\n            CandlestickDataPoint candlestickDataPoint = (CandlestickDataPoint)dataPoint;\r\n\r\n            double PlotAreaHeight = ActualDependentRangeAxis.GetPlotAreaCoordinate(ActualDependentRangeAxis.Range.Maximum).Value;\r\n            double dataPointX = ActualIndependentRangeAxis.GetPlotAreaCoordinate(dataPoint.ActualIndependentValue).Value;\r\n            double highPointY = ActualDependentRangeAxis.GetPlotAreaCoordinate(ValueHelper.ToDouble(candlestickDataPoint.High)).Value;\r\n            double lowPointY = ActualDependentRangeAxis.GetPlotAreaCoordinate(ValueHelper.ToDouble(candlestickDataPoint.Low)).Value;\r\n            double openPointY = ActualDependentRangeAxis.GetPlotAreaCoordinate(ValueHelper.ToDouble(candlestickDataPoint.Open)).Value;\r\n            double closePointY = ActualDependentRangeAxis.GetPlotAreaCoordinate(ValueHelper.ToDouble(candlestickDataPoint.Close)).Value;\r\n\r\n            candlestickDataPoint.UpdateBody(ActualDependentRangeAxis);\r\n\r\n            if (ValueHelper.CanGraph(dataPointX))\r\n            {\r\n                dataPoint.Height = Math.Abs(highPointY - lowPointY);\r\n                dataPoint.Width = 5.0;\r\n\r\n                if (dataPoint.ActualWidth == 0.0 || dataPoint.ActualHeight == 0.0)\r\n                    dataPoint.UpdateLayout();\r\n\r\n                Canvas.SetLeft(dataPoint,\r\n                    Math.Round(dataPointX - (dataPoint.ActualWidth / 2)));\r\n                Canvas.SetTop(dataPoint,\r\n                    Math.Round(PlotAreaHeight - highPointY));\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/ColumnBarBaseSeries.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// This series serves as the base class for the column and bar series.\r\n    /// </summary>\r\n    /// <typeparam name=\"T\">The type of the data point.</typeparam>\r\n    public abstract class ColumnBarBaseSeries<T> : DataPointSingleSeriesWithAxes, IAnchoredToOrigin\r\n        where T : DataPoint, new()\r\n    {\r\n        #region public IRangeAxis DependentRangeAxis\r\n        /// <summary>\r\n        /// Gets or sets the dependent range axis.\r\n        /// </summary>\r\n        public IRangeAxis DependentRangeAxis\r\n        {\r\n            get { return GetValue(DependentRangeAxisProperty) as IRangeAxis; }\r\n            set { SetValue(DependentRangeAxisProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the DependentRangeAxis dependency property.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1000:DoNotDeclareStaticMembersOnGenericTypes\", Justification = \"This member is necessary because child classes need to share this dependency property.\")]\r\n        public static readonly DependencyProperty DependentRangeAxisProperty =\r\n            DependencyProperty.Register(\r\n                \"DependentRangeAxis\",\r\n                typeof(IRangeAxis),\r\n                typeof(ColumnBarBaseSeries<T>),\r\n                new PropertyMetadata(null, OnDependentRangeAxisPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// DependentRangeAxisProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">ColumnBarBaseSeries that changed its DependentRangeAxis.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnDependentRangeAxisPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            ColumnBarBaseSeries<T> source = (ColumnBarBaseSeries<T>)d;\r\n            IRangeAxis newValue = (IRangeAxis)e.NewValue;\r\n            source.OnDependentRangeAxisPropertyChanged(newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// DependentRangeAxisProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        private void OnDependentRangeAxisPropertyChanged(IRangeAxis newValue)\r\n        {\r\n            InternalDependentAxis = (IAxis)newValue;\r\n        }\r\n        #endregion public IRangeAxis DependentRangeAxis\r\n\r\n        #region public IAxis IndependentAxis\r\n        /// <summary>\r\n        /// Gets or sets the independent category axis.\r\n        /// </summary>\r\n        public IAxis IndependentAxis\r\n        {\r\n            get { return GetValue(IndependentAxisProperty) as IAxis; }\r\n            set { SetValue(IndependentAxisProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the IndependentAxis dependency property.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1000:DoNotDeclareStaticMembersOnGenericTypes\", Justification = \"This member is necessary because child classes need to share this dependency property.\")]\r\n        public static readonly DependencyProperty IndependentAxisProperty =\r\n            DependencyProperty.Register(\r\n                \"IndependentAxis\",\r\n                typeof(IAxis),\r\n                typeof(ColumnBarBaseSeries<T>),\r\n                new PropertyMetadata(null, OnIndependentAxisPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// IndependentAxisProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">ColumnBarBaseSeries that changed its IndependentAxis.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnIndependentAxisPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            ColumnBarBaseSeries<T> source = (ColumnBarBaseSeries<T>)d;\r\n            IAxis newValue = (IAxis)e.NewValue;\r\n            source.OnIndependentAxisPropertyChanged(newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// IndependentAxisProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        private void OnIndependentAxisPropertyChanged(IAxis newValue)\r\n        {\r\n            InternalIndependentAxis = (IAxis)newValue;\r\n        }\r\n        #endregion public IAxis IndependentAxis\r\n\r\n        /// <summary>\r\n        /// Keeps a list of DataPoints that share the same category.\r\n        /// </summary>\r\n        private IDictionary<object, IGrouping<object, DataPoint>> _categoriesWithMultipleDataPoints;\r\n\r\n        /// <summary>\r\n        /// Returns the group of data points in a given category.\r\n        /// </summary>\r\n        /// <param name=\"category\">The category for which to return the data\r\n        /// point group.</param>\r\n        /// <returns>The group of data points in a given category.</returns>\r\n        protected IGrouping<object, DataPoint> GetDataPointGroup(object category)\r\n        {\r\n            return _categoriesWithMultipleDataPoints[category];\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a value indicating whether a data point corresponding to\r\n        /// a category is grouped.\r\n        /// </summary>\r\n        /// <param name=\"category\">The category.</param>\r\n        /// <returns>A value indicating whether a data point corresponding to\r\n        /// a category is grouped.</returns>\r\n        protected bool GetIsDataPointGrouped(object category)\r\n        {\r\n            return _categoriesWithMultipleDataPoints.ContainsKey(category);\r\n        }\r\n\r\n        /// <summary>\r\n        /// The length of each data point.\r\n        /// </summary>\r\n        private double? _dataPointlength;\r\n\r\n        /// <summary>\r\n        /// Gets the dependent axis as a range axis.\r\n        /// </summary>\r\n        public IRangeAxis ActualDependentRangeAxis { get { return this.InternalActualDependentAxis as IRangeAxis; } }\r\n\r\n        /// <summary>\r\n        /// Gets the independent axis as a category axis.\r\n        /// </summary>\r\n        public IAxis ActualIndependentAxis { get { return this.InternalActualIndependentAxis; } }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the ColumnBarBaseSeries class.\r\n        /// </summary>\r\n        protected ColumnBarBaseSeries()\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Method run before DataPoints are updated.\r\n        /// </summary>\r\n        protected override void OnBeforeUpdateDataPoints()\r\n        {\r\n            base.OnBeforeUpdateDataPoints();\r\n\r\n            CalculateDataPointLength();\r\n\r\n            // Update the list of DataPoints with the same category\r\n            _categoriesWithMultipleDataPoints = ActiveDataPoints\r\n                .Where(point => null != point.IndependentValue)\r\n                .OrderBy(point => point.DependentValue)\r\n                .GroupBy(point => point.IndependentValue)\r\n                .Where(grouping => 1 < grouping.Count())\r\n                .ToDictionary(grouping => grouping.Key);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the custom ResourceDictionary to use for necessary resources.\r\n        /// </summary>\r\n        /// <returns>\r\n        /// ResourceDictionary to use for necessary resources.\r\n        /// </returns>\r\n        protected override IEnumerator<ResourceDictionary> GetResourceDictionaryEnumeratorFromHost()\r\n        {\r\n            return GetResourceDictionaryWithTargetType(SeriesHost, typeof(T), true);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates a data point when its actual dependent value has changed.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point.</param>\r\n        /// <param name=\"oldValue\">The old value.</param>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        protected override void OnDataPointActualDependentValueChanged(DataPoint dataPoint, IComparable oldValue, IComparable newValue)\r\n        {\r\n            UpdateDataPoint(dataPoint);\r\n            base.OnDataPointActualDependentValueChanged(dataPoint, oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Redraws other column series to assure they allocate the right amount\r\n        /// of space for their columns.\r\n        /// </summary>\r\n        /// <param name=\"seriesHost\">The series host to update.</param>\r\n        protected void RedrawOtherSeries(ISeriesHost seriesHost)\r\n        {\r\n            Type thisType = typeof(ColumnBarBaseSeries<T>);\r\n\r\n            // redraw all other column series to ensure they make space for new one\r\n            foreach (ColumnBarBaseSeries<T> series in seriesHost.Series.Where(series => thisType.IsAssignableFrom(series.GetType())).OfType<ColumnBarBaseSeries<T>>().Where(series => series != this))\r\n            {\r\n                series.UpdateDataPoints(series.ActiveDataPoints);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called after data points have been loaded from the items source.\r\n        /// </summary>\r\n        /// <param name=\"newDataPoints\">New active data points.</param>\r\n        /// <param name=\"oldDataPoints\">Old inactive data points.</param>\r\n        protected override void OnDataPointsChanged(IList<DataPoint> newDataPoints, IList<DataPoint> oldDataPoints)\r\n        {\r\n            base.OnDataPointsChanged(newDataPoints, oldDataPoints);\r\n\r\n            CalculateDataPointLength();\r\n\r\n            if (this.SeriesHost != null)\r\n            {\r\n                RedrawOtherSeries(this.SeriesHost);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Redraw other column series when removed from a series host.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">The old value of the series host property.</param>\r\n        /// <param name=\"newValue\">The new value of the series host property.</param>\r\n        protected override void OnSeriesHostPropertyChanged(ISeriesHost oldValue, ISeriesHost newValue)\r\n        {\r\n            base.OnSeriesHostPropertyChanged(oldValue, newValue);\r\n\r\n            // If being removed from series host, redraw all column series.\r\n            if (newValue == null || oldValue != null)\r\n            {\r\n                RedrawOtherSeries(oldValue);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates the bar data point.\r\n        /// </summary>\r\n        /// <returns>A bar data point.</returns>\r\n        protected override DataPoint CreateDataPoint()\r\n        {\r\n            return new T();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Calculates the length of the data points.\r\n        /// </summary>\r\n        protected void CalculateDataPointLength()\r\n        {\r\n            if (!(ActualIndependentAxis is ICategoryAxis))\r\n            {\r\n                IEnumerable<UnitValue> values =\r\n                    ActiveDataPoints\r\n                        .Select(dataPoint => ActualIndependentAxis.GetPlotAreaCoordinate(dataPoint.ActualIndependentValue))\r\n                        .Where(value => ValueHelper.CanGraph(value.Value))\r\n                        .OrderBy(value => value.Value)\r\n                        .ToList();\r\n\r\n                _dataPointlength =\r\n                    EnumerableFunctions.Zip(\r\n                        values,\r\n                        values.Skip(1),\r\n                        (left, right) => new Range<double>(left.Value, right.Value))\r\n                        .Select(range => range.Maximum - range.Minimum)\r\n                        .MinOrNullable();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the value margins for a given axis.\r\n        /// </summary>\r\n        /// <param name=\"consumer\">The axis to retrieve the value margins for.\r\n        /// </param>\r\n        /// <returns>A sequence of value margins.</returns>\r\n        protected override IEnumerable<ValueMargin> GetValueMargins(IValueMarginConsumer consumer)\r\n        {\r\n            double dependentValueMargin = this.ActualHeight / 10;\r\n            IAxis axis = consumer as IAxis;\r\n            if (axis != null && ActiveDataPoints.Any())\r\n            {\r\n                Func<DataPoint, IComparable> selector = null;\r\n                if (axis == InternalActualIndependentAxis)\r\n                {\r\n                    selector = (dataPoint) => (IComparable)dataPoint.ActualIndependentValue;\r\n\r\n                    DataPoint minimumPoint = ActiveDataPoints.MinOrNull(selector);\r\n                    DataPoint maximumPoint = ActiveDataPoints.MaxOrNull(selector);\r\n\r\n                    double minimumMargin = minimumPoint.GetMargin(axis);\r\n                    yield return new ValueMargin(selector(minimumPoint), minimumMargin, minimumMargin);\r\n\r\n                    double maximumMargin = maximumPoint.GetMargin(axis);\r\n                    yield return new ValueMargin(selector(maximumPoint), maximumMargin, maximumMargin);\r\n                }\r\n                else if (axis == InternalActualDependentAxis)\r\n                {\r\n                    selector = (dataPoint) => (IComparable)dataPoint.ActualDependentValue;\r\n\r\n                    DataPoint minimumPoint = ActiveDataPoints.MinOrNull(selector);\r\n                    DataPoint maximumPoint = ActiveDataPoints.MaxOrNull(selector);\r\n\r\n                    yield return new ValueMargin(selector(minimumPoint), dependentValueMargin, dependentValueMargin);\r\n                    yield return new ValueMargin(selector(maximumPoint), dependentValueMargin, dependentValueMargin);\r\n                }\r\n            }\r\n            else\r\n            {\r\n                yield break;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a range in which to render a data point.\r\n        /// </summary>\r\n        /// <param name=\"category\">The category to retrieve the range for.\r\n        /// </param>\r\n        /// <returns>The range in which to render a data point.</returns>\r\n        protected Range<UnitValue> GetCategoryRange(object category)\r\n        {\r\n            ICategoryAxis categoryAxis = ActualIndependentAxis as CategoryAxis;\r\n            if (categoryAxis != null)\r\n            {\r\n                return categoryAxis.GetPlotAreaCoordinateRange(category);\r\n            }\r\n            else\r\n            {\r\n                UnitValue unitValue = ActualIndependentAxis.GetPlotAreaCoordinate(category);\r\n                if (ValueHelper.CanGraph(unitValue.Value) && _dataPointlength.HasValue)\r\n                {\r\n                    double halfLength = _dataPointlength.Value / 2.0;\r\n\r\n                    return new Range<UnitValue>(\r\n                        new UnitValue(unitValue.Value - halfLength, unitValue.Unit),\r\n                        new UnitValue(unitValue.Value + halfLength, unitValue.Unit));\r\n                }\r\n\r\n                return new Range<UnitValue>();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the axis to which the data is anchored.\r\n        /// </summary>\r\n        IRangeAxis IAnchoredToOrigin.AnchoredAxis\r\n        {\r\n            get { return this.ActualDependentRangeAxis; }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/ColumnSeries.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\n\r\n#if !DEFINITION_SERIES_COMPATIBILITY_MODE\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Represents a control that contains a data series to be rendered in column format.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    [SuppressMessage(\"Microsoft.Maintainability\", \"CA1501:AvoidExcessiveInheritance\", Justification = \"Depth of hierarchy is necessary to avoid code duplication.\")]\r\n    [StyleTypedProperty(Property = DataPointStyleName, StyleTargetType = typeof(ColumnDataPoint))]\r\n    [StyleTypedProperty(Property = \"LegendItemStyle\", StyleTargetType = typeof(LegendItem))]\r\n    [TemplatePart(Name = DataPointSeries.PlotAreaName, Type = typeof(Canvas))]\r\n    public partial class ColumnSeries : ColumnBarBaseSeries<ColumnDataPoint>\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the ColumnSeries class.\r\n        /// </summary>\r\n        public ColumnSeries()\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Acquire a horizontal category axis and a vertical linear axis.\r\n        /// </summary>\r\n        /// <param name=\"firstDataPoint\">The first data point.</param>\r\n        protected override void GetAxes(DataPoint firstDataPoint)\r\n        {\r\n            GetAxes(\r\n                firstDataPoint,\r\n                (axis) => axis.Orientation == AxisOrientation.X,\r\n                () => new CategoryAxis { Orientation = AxisOrientation.X },\r\n                (axis) =>\r\n                {\r\n                    IRangeAxis rangeAxis = axis as IRangeAxis;\r\n                    return rangeAxis != null && rangeAxis.Origin != null && axis.Orientation == AxisOrientation.Y;\r\n                },\r\n                () =>\r\n                {\r\n                    IRangeAxis rangeAxis = CreateRangeAxisFromData(firstDataPoint.DependentValue);\r\n                    rangeAxis.Orientation = AxisOrientation.Y;\r\n                    if (rangeAxis == null || rangeAxis.Origin == null)\r\n                    {\r\n                        throw new InvalidOperationException(Properties.Resources.DataPointSeriesWithAxes_NoSuitableAxisAvailableForPlottingDependentValue);\r\n                    }\r\n                    DisplayAxis axis = rangeAxis as DisplayAxis;\r\n                    if (axis != null)\r\n                    {\r\n                        axis.ShowGridLines = true;\r\n                    }\r\n                    return rangeAxis;\r\n                });\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates each point.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point to update.</param>\r\n        protected override void UpdateDataPoint(DataPoint dataPoint)\r\n        {\r\n            if (SeriesHost == null || PlotArea == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            object category = dataPoint.ActualIndependentValue ?? (this.ActiveDataPoints.IndexOf(dataPoint) + 1);\r\n            Range<UnitValue> coordinateRange = GetCategoryRange(category);\r\n\r\n            if (!coordinateRange.HasData)\r\n            {\r\n                return;\r\n            }\r\n            else if (coordinateRange.Maximum.Unit != Unit.Pixels || coordinateRange.Minimum.Unit != Unit.Pixels)\r\n            {\r\n                throw new InvalidOperationException(Properties.Resources.DataPointSeriesWithAxes_ThisSeriesDoesNotSupportRadialAxes);\r\n            }\r\n\r\n            double minimum = (double)coordinateRange.Minimum.Value;\r\n            double maximum = (double)coordinateRange.Maximum.Value;\r\n\r\n            double plotAreaHeight = ActualDependentRangeAxis.GetPlotAreaCoordinate(ActualDependentRangeAxis.Range.Maximum).Value;\r\n            IEnumerable<ColumnSeries> columnSeries = SeriesHost.Series.OfType<ColumnSeries>().Where(series => series.ActualIndependentAxis == ActualIndependentAxis);\r\n            int numberOfSeries = columnSeries.Count();\r\n            double coordinateRangeWidth = (maximum - minimum);\r\n            double segmentWidth = coordinateRangeWidth * 0.8;\r\n            double columnWidth = segmentWidth / numberOfSeries;\r\n            int seriesIndex = columnSeries.IndexOf(this);\r\n\r\n            double dataPointY = ActualDependentRangeAxis.GetPlotAreaCoordinate(ValueHelper.ToDouble(dataPoint.ActualDependentValue)).Value;\r\n            double zeroPointY = ActualDependentRangeAxis.GetPlotAreaCoordinate(ActualDependentRangeAxis.Origin).Value;\r\n\r\n            double offset = seriesIndex * Math.Round(columnWidth) + coordinateRangeWidth * 0.1;\r\n            double dataPointX = minimum + offset;\r\n\r\n            if (GetIsDataPointGrouped(category))\r\n            {\r\n                // Multiple DataPoints share this category; offset and overlap them appropriately\r\n                IGrouping<object, DataPoint> categoryGrouping = GetDataPointGroup(category);\r\n                int index = categoryGrouping.IndexOf(dataPoint);\r\n                dataPointX += (index * (columnWidth * 0.2)) / (categoryGrouping.Count() - 1);\r\n                columnWidth *= 0.8;\r\n                Canvas.SetZIndex(dataPoint, -index);\r\n            }\r\n\r\n            if (ValueHelper.CanGraph(dataPointY) && ValueHelper.CanGraph(dataPointX) && ValueHelper.CanGraph(zeroPointY))\r\n            {\r\n                dataPoint.Visibility = Visibility.Visible;\r\n\r\n                double left = Math.Round(dataPointX);\r\n                double width = Math.Round(columnWidth);\r\n\r\n                double top = Math.Round(plotAreaHeight - Math.Max(dataPointY, zeroPointY) + 0.5);\r\n                double bottom = Math.Round(plotAreaHeight - Math.Min(dataPointY, zeroPointY) + 0.5);\r\n                double height = bottom - top + 1;\r\n\r\n                Canvas.SetLeft(dataPoint, left);\r\n                Canvas.SetTop(dataPoint, top);\r\n                dataPoint.Width = width;\r\n                dataPoint.Height = height;\r\n            }\r\n            else\r\n            {\r\n                dataPoint.Visibility = Visibility.Collapsed;\r\n            }\r\n        }\r\n    }\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/Compatible/AreaSeries.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Shapes;\r\n\r\n#if DEFINITION_SERIES_COMPATIBILITY_MODE\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n#else\r\nnamespace System.Windows.Controls.DataVisualization.Charting.Compatible\r\n#endif\r\n{\r\n    /// <summary>\r\n    /// Control that displays values as an area chart visualization.\r\n    /// </summary>\r\n    /// <remarks>\r\n    /// Based on the DefinitionSeries hierarchy.\r\n    /// </remarks>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    [StyleTypedProperty(Property = DataPointStyleName, StyleTargetType = typeof(AreaDataPoint))]\r\n    [StyleTypedProperty(Property = LegendItemStyleName, StyleTargetType = typeof(LegendItem))]\r\n    [StyleTypedProperty(Property = PathStyleName, StyleTargetType = typeof(Path))]\r\n    public class AreaSeries : StackedAreaSeries\r\n    {\r\n        /// <summary>\r\n        /// Name of the DataPointStyle property.\r\n        /// </summary>\r\n        private const string DataPointStyleName = \"DataPointStyle\";\r\n\r\n        /// <summary>\r\n        /// Name of the LegendItemStyle property.\r\n        /// </summary>\r\n        private const string LegendItemStyleName = \"LegendItemStyle\";\r\n\r\n        /// <summary>\r\n        /// Name of the PathStyle property.\r\n        /// </summary>\r\n        private const string PathStyleName = \"PathStyle\";\r\n\r\n        /// <summary>\r\n        /// Field storing the single SeriesDefinition used by the series.\r\n        /// </summary>\r\n        private SeriesDefinition _definition;\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the AreaSeries class.\r\n        /// </summary>\r\n        public AreaSeries()\r\n        {\r\n            SetBinding(DefinitionSeries.DependentAxisProperty, new Binding(\"DependentRangeAxis\") { Source = this });\r\n            SetBinding(DefinitionSeries.SelectionModeProperty, new Binding(\"IsSelectionEnabled\") { Source = this, Converter = new System.Windows.Controls.DataVisualization.Charting.Compatible.SelectionEnabledToSelectionModeConverter() });\r\n            _definition = new SeriesDefinition();\r\n            _definition.SetBinding(SeriesDefinition.ItemsSourceProperty, new Binding(\"ItemsSource\") { Source = this });\r\n            _definition.SetBinding(SeriesDefinition.TitleProperty, new Binding(\"Title\") { Source = this });\r\n            _definition.SetBinding(SeriesDefinition.DataPointStyleProperty, new Binding(DataPointStyleName) { Source = this });\r\n            _definition.SetBinding(SeriesDefinition.LegendItemStyleProperty, new Binding(LegendItemStyleName) { Source = this });\r\n            _definition.SetBinding(SeriesDefinition.DataShapeStyleProperty, new Binding(PathStyleName) { Source = this });\r\n            _definition.SetBinding(SeriesDefinition.TransitionDurationProperty, new Binding(\"TransitionDuration\") { Source = this });\r\n#if !NO_EASING_FUNCTIONS\r\n            _definition.SetBinding(SeriesDefinition.TransitionEasingFunctionProperty, new Binding(\"TransitionEasingFunction\") { Source = this });\r\n#endif\r\n            // For compatibility\r\n            DependentValueBinding = new Binding();\r\n            IndependentValueBinding = new Binding();\r\n            SeriesDefinitions.Add(_definition);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a sequence of IndependentValueGroups.\r\n        /// </summary>\r\n        protected override IEnumerable<IndependentValueGroup> IndependentValueGroups\r\n        {\r\n            get\r\n            {\r\n                // Base implementation groups by independent value; when plotting a single series in isolation, that's not desirable\r\n                return DataItems\r\n                    .Select(di => new IndependentValueGroup(di.ActualIndependentValue, new DataItem[] { di }));\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a sequence that provides the content of the series.\r\n        /// </summary>\r\n        public IEnumerable ItemsSource\r\n        {\r\n            get { return (IEnumerable)GetValue(ItemsSourceProperty); }\r\n            set { SetValue(ItemsSourceProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ItemsSource dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ItemsSourceProperty =\r\n            DependencyProperty.Register(\"ItemsSource\", typeof(IEnumerable), typeof(AreaSeries), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Binding that identifies the dependent values of the series.\r\n        /// </summary>\r\n        public Binding DependentValueBinding\r\n        {\r\n            get { return _definition.DependentValueBinding; }\r\n            set { _definition.DependentValueBinding = value; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Binding path that identifies the dependent values of the series.\r\n        /// </summary>\r\n        public string DependentValuePath\r\n        {\r\n            get { return _definition.DependentValuePath; }\r\n            set { _definition.DependentValuePath = value; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Binding that identifies the independent values of the series.\r\n        /// </summary>\r\n        public Binding IndependentValueBinding\r\n        {\r\n            get { return _definition.IndependentValueBinding; }\r\n            set { _definition.IndependentValueBinding = value; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Binding path that identifies the independent values of the series.\r\n        /// </summary>\r\n        public string IndependentValuePath\r\n        {\r\n            get { return _definition.IndependentValuePath; }\r\n            set { _definition.IndependentValuePath = value; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the IRangeAxis to use as the dependent axis of the series.\r\n        /// </summary>\r\n        public IRangeAxis DependentRangeAxis\r\n        {\r\n            get { return (IRangeAxis)GetValue(DependentRangeAxisProperty); }\r\n            set { SetValue(DependentRangeAxisProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the DependentRangeAxis dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty DependentRangeAxisProperty =\r\n            DependencyProperty.Register(\"DependentRangeAxis\", typeof(IRangeAxis), typeof(AreaSeries), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets the title of the series.\r\n        /// </summary>\r\n        public object Title\r\n        {\r\n            get { return (object)GetValue(TitleProperty); }\r\n            set { SetValue(TitleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Title dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty TitleProperty =\r\n            DependencyProperty.Register(\"Title\", typeof(object), typeof(AreaSeries), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Style to use for the DataPoints of the series.\r\n        /// </summary>\r\n        public Style DataPointStyle\r\n        {\r\n            get { return (Style)GetValue(DataPointStyleProperty); }\r\n            set { SetValue(DataPointStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the DataPointStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty DataPointStyleProperty =\r\n            DependencyProperty.Register(DataPointStyleName, typeof(Style), typeof(AreaSeries), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Style to use for the LegendItem of the series.\r\n        /// </summary>\r\n        public Style LegendItemStyle\r\n        {\r\n            get { return (Style)GetValue(LegendItemStyleProperty); }\r\n            set { SetValue(LegendItemStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the LegendItemStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty LegendItemStyleProperty =\r\n            DependencyProperty.Register(LegendItemStyleName, typeof(Style), typeof(AreaSeries), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether selection is enabled.\r\n        /// </summary>\r\n        public bool IsSelectionEnabled\r\n        {\r\n            get { return (bool)GetValue(IsSelectionEnabledProperty); }\r\n            set { SetValue(IsSelectionEnabledProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the IsSelectionEnabled dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty IsSelectionEnabledProperty =\r\n            DependencyProperty.Register(\"IsSelectionEnabled\", typeof(bool), typeof(AreaSeries), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Style to use for the Path of the series.\r\n        /// </summary>\r\n        public Style PathStyle\r\n        {\r\n            get { return (Style)GetValue(PathStyleProperty); }\r\n            set { SetValue(PathStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the PathStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty PathStyleProperty =\r\n            DependencyProperty.Register(PathStyleName, typeof(Style), typeof(AreaSeries), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets the TimeSpan to use for the duration of data transitions.\r\n        /// </summary>\r\n        public TimeSpan TransitionDuration\r\n        {\r\n            get { return (TimeSpan)GetValue(TransitionDurationProperty); }\r\n            set { SetValue(TransitionDurationProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the TransitionDuration dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty TransitionDurationProperty =\r\n            DependencyProperty.Register(\"TransitionDuration\", typeof(TimeSpan), typeof(AreaSeries), new PropertyMetadata(TimeSpan.FromSeconds(0.5)));\r\n\r\n#if !NO_EASING_FUNCTIONS\r\n        /// <summary>\r\n        /// Gets or sets the IEasingFunction to use for data transitions.\r\n        /// </summary>\r\n        public IEasingFunction TransitionEasingFunction\r\n        {\r\n            get { return (IEasingFunction)GetValue(TransitionEasingFunctionProperty); }\r\n            set { SetValue(TransitionEasingFunctionProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the TransitionEasingFunction dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty TransitionEasingFunctionProperty =\r\n            DependencyProperty.Register(\"TransitionEasingFunction\", typeof(IEasingFunction), typeof(AreaSeries), new PropertyMetadata(new QuadraticEase { EasingMode = EasingMode.EaseInOut }));\r\n#else\r\n        /// <summary>\r\n        /// Gets or sets a placeholder for the TransitionEasingFunction dependency property.\r\n        /// </summary>\r\n        internal IEasingFunction TransitionEasingFunction { get; set; }\r\n#endif\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/Compatible/BarSeries.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media.Animation;\r\n\r\n#if DEFINITION_SERIES_COMPATIBILITY_MODE\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n#else\r\nnamespace System.Windows.Controls.DataVisualization.Charting.Compatible\r\n#endif\r\n{\r\n    /// <summary>\r\n    /// Control that displays values as a bar chart visualization.\r\n    /// </summary>\r\n    /// <remarks>\r\n    /// Based on the DefinitionSeries hierarchy.\r\n    /// </remarks>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    [StyleTypedProperty(Property = DataPointStyleName, StyleTargetType = typeof(BarDataPoint))]\r\n    [StyleTypedProperty(Property = LegendItemStyleName, StyleTargetType = typeof(LegendItem))]\r\n    public class BarSeries : StackedBarSeries\r\n    {\r\n        /// <summary>\r\n        /// Name of the DataPointStyle property.\r\n        /// </summary>\r\n        private const string DataPointStyleName = \"DataPointStyle\";\r\n\r\n        /// <summary>\r\n        /// Name of the LegendItemStyle property.\r\n        /// </summary>\r\n        private const string LegendItemStyleName = \"LegendItemStyle\";\r\n\r\n        /// <summary>\r\n        /// Field storing the single SeriesDefinition used by the series.\r\n        /// </summary>\r\n        private SeriesDefinition _definition;\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the BarSeries class.\r\n        /// </summary>\r\n        public BarSeries()\r\n        {\r\n            SetBinding(DefinitionSeries.DependentAxisProperty, new Binding(\"DependentRangeAxis\") { Source = this });\r\n            SetBinding(DefinitionSeries.SelectionModeProperty, new Binding(\"IsSelectionEnabled\") { Source = this, Converter = new System.Windows.Controls.DataVisualization.Charting.Compatible.SelectionEnabledToSelectionModeConverter() });\r\n            _definition = new SeriesDefinition();\r\n            _definition.SetBinding(SeriesDefinition.ItemsSourceProperty, new Binding(\"ItemsSource\") { Source = this });\r\n            _definition.SetBinding(SeriesDefinition.TitleProperty, new Binding(\"Title\") { Source = this });\r\n            _definition.SetBinding(SeriesDefinition.DataPointStyleProperty, new Binding(DataPointStyleName) { Source = this });\r\n            _definition.SetBinding(SeriesDefinition.LegendItemStyleProperty, new Binding(LegendItemStyleName) { Source = this });\r\n            _definition.SetBinding(SeriesDefinition.TransitionDurationProperty, new Binding(\"TransitionDuration\") { Source = this });\r\n#if !NO_EASING_FUNCTIONS\r\n            _definition.SetBinding(SeriesDefinition.TransitionEasingFunctionProperty, new Binding(\"TransitionEasingFunction\") { Source = this });\r\n#endif\r\n            // For compatibility\r\n            DependentValueBinding = new Binding();\r\n            IndependentValueBinding = new Binding();\r\n            SeriesDefinitions.Add(_definition);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a sequence that provides the content of the series.\r\n        /// </summary>\r\n        public IEnumerable ItemsSource\r\n        {\r\n            get { return (IEnumerable)GetValue(ItemsSourceProperty); }\r\n            set { SetValue(ItemsSourceProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ItemsSource dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ItemsSourceProperty =\r\n            DependencyProperty.Register(\"ItemsSource\", typeof(IEnumerable), typeof(BarSeries), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Binding that identifies the dependent values of the series.\r\n        /// </summary>\r\n        public Binding DependentValueBinding\r\n        {\r\n            get { return _definition.DependentValueBinding; }\r\n            set { _definition.DependentValueBinding = value; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Binding path that identifies the dependent values of the series.\r\n        /// </summary>\r\n        public string DependentValuePath\r\n        {\r\n            get { return _definition.DependentValuePath; }\r\n            set { _definition.DependentValuePath = value; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Binding that identifies the independent values of the series.\r\n        /// </summary>\r\n        public Binding IndependentValueBinding\r\n        {\r\n            get { return _definition.IndependentValueBinding; }\r\n            set { _definition.IndependentValueBinding = value; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Binding path that identifies the independent values of the series.\r\n        /// </summary>\r\n        public string IndependentValuePath\r\n        {\r\n            get { return _definition.IndependentValuePath; }\r\n            set { _definition.IndependentValuePath = value; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the IRangeAxis to use as the dependent axis of the series.\r\n        /// </summary>\r\n        public IRangeAxis DependentRangeAxis\r\n        {\r\n            get { return (IRangeAxis)GetValue(DependentRangeAxisProperty); }\r\n            set { SetValue(DependentRangeAxisProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the DependentRangeAxis dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty DependentRangeAxisProperty =\r\n            DependencyProperty.Register(\"DependentRangeAxis\", typeof(IRangeAxis), typeof(BarSeries), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets the title of the series.\r\n        /// </summary>\r\n        public object Title\r\n        {\r\n            get { return (object)GetValue(TitleProperty); }\r\n            set { SetValue(TitleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Title dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty TitleProperty =\r\n            DependencyProperty.Register(\"Title\", typeof(object), typeof(BarSeries), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Style to use for the DataPoints of the series.\r\n        /// </summary>\r\n        public Style DataPointStyle\r\n        {\r\n            get { return (Style)GetValue(DataPointStyleProperty); }\r\n            set { SetValue(DataPointStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the DataPointStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty DataPointStyleProperty =\r\n            DependencyProperty.Register(DataPointStyleName, typeof(Style), typeof(BarSeries), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Style to use for the LegendItem of the series.\r\n        /// </summary>\r\n        public Style LegendItemStyle\r\n        {\r\n            get { return (Style)GetValue(LegendItemStyleProperty); }\r\n            set { SetValue(LegendItemStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the LegendItemStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty LegendItemStyleProperty =\r\n            DependencyProperty.Register(LegendItemStyleName, typeof(Style), typeof(BarSeries), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether selection is enabled.\r\n        /// </summary>\r\n        public bool IsSelectionEnabled\r\n        {\r\n            get { return (bool)GetValue(IsSelectionEnabledProperty); }\r\n            set { SetValue(IsSelectionEnabledProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the IsSelectionEnabled dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty IsSelectionEnabledProperty =\r\n            DependencyProperty.Register(\"IsSelectionEnabled\", typeof(bool), typeof(BarSeries), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets the TimeSpan to use for the duration of data transitions.\r\n        /// </summary>\r\n        public TimeSpan TransitionDuration\r\n        {\r\n            get { return (TimeSpan)GetValue(TransitionDurationProperty); }\r\n            set { SetValue(TransitionDurationProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the TransitionDuration dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty TransitionDurationProperty =\r\n            DependencyProperty.Register(\"TransitionDuration\", typeof(TimeSpan), typeof(BarSeries), new PropertyMetadata(TimeSpan.FromSeconds(0.5)));\r\n\r\n#if !NO_EASING_FUNCTIONS\r\n        /// <summary>\r\n        /// Gets or sets the IEasingFunction to use for data transitions.\r\n        /// </summary>\r\n        public IEasingFunction TransitionEasingFunction\r\n        {\r\n            get { return (IEasingFunction)GetValue(TransitionEasingFunctionProperty); }\r\n            set { SetValue(TransitionEasingFunctionProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the TransitionEasingFunction dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty TransitionEasingFunctionProperty =\r\n            DependencyProperty.Register(\"TransitionEasingFunction\", typeof(IEasingFunction), typeof(BarSeries), new PropertyMetadata(new QuadraticEase { EasingMode = EasingMode.EaseInOut }));\r\n#else\r\n        /// <summary>\r\n        /// Gets or sets a placeholder for the TransitionEasingFunction dependency property.\r\n        /// </summary>\r\n        internal IEasingFunction TransitionEasingFunction { get; set; }\r\n#endif\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/Compatible/ColumnSeries.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media.Animation;\r\n\r\n#if DEFINITION_SERIES_COMPATIBILITY_MODE\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n#else\r\nnamespace System.Windows.Controls.DataVisualization.Charting.Compatible\r\n#endif\r\n{\r\n    /// <summary>\r\n    /// Control that displays values as a column chart visualization.\r\n    /// </summary>\r\n    /// <remarks>\r\n    /// Based on the DefinitionSeries hierarchy.\r\n    /// </remarks>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    [StyleTypedProperty(Property = DataPointStyleName, StyleTargetType = typeof(ColumnDataPoint))]\r\n    [StyleTypedProperty(Property = LegendItemStyleName, StyleTargetType = typeof(LegendItem))]\r\n    public class ColumnSeries : StackedColumnSeries\r\n    {\r\n        /// <summary>\r\n        /// Name of the DataPointStyle property.\r\n        /// </summary>\r\n        private const string DataPointStyleName = \"DataPointStyle\";\r\n\r\n        /// <summary>\r\n        /// Name of the LegendItemStyle property.\r\n        /// </summary>\r\n        private const string LegendItemStyleName = \"LegendItemStyle\";\r\n\r\n        /// <summary>\r\n        /// Field storing the single SeriesDefinition used by the series.\r\n        /// </summary>\r\n        private SeriesDefinition _definition;\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the ColumnSeries class.\r\n        /// </summary>\r\n        public ColumnSeries()\r\n        {\r\n            SetBinding(DefinitionSeries.DependentAxisProperty, new Binding(\"DependentRangeAxis\") { Source = this });\r\n            SetBinding(DefinitionSeries.SelectionModeProperty, new Binding(\"IsSelectionEnabled\") { Source = this, Converter = new System.Windows.Controls.DataVisualization.Charting.Compatible.SelectionEnabledToSelectionModeConverter() });\r\n            _definition = new SeriesDefinition();\r\n            _definition.SetBinding(SeriesDefinition.ItemsSourceProperty, new Binding(\"ItemsSource\") { Source = this });\r\n            _definition.SetBinding(SeriesDefinition.TitleProperty, new Binding(\"Title\") { Source = this });\r\n            _definition.SetBinding(SeriesDefinition.DataPointStyleProperty, new Binding(DataPointStyleName) { Source = this });\r\n            _definition.SetBinding(SeriesDefinition.LegendItemStyleProperty, new Binding(LegendItemStyleName) { Source = this });\r\n            _definition.SetBinding(SeriesDefinition.TransitionDurationProperty, new Binding(\"TransitionDuration\") { Source = this });\r\n#if !NO_EASING_FUNCTIONS\r\n            _definition.SetBinding(SeriesDefinition.TransitionEasingFunctionProperty, new Binding(\"TransitionEasingFunction\") { Source = this });\r\n#endif\r\n            // For compatibility\r\n            DependentValueBinding = new Binding();\r\n            IndependentValueBinding = new Binding();\r\n            SeriesDefinitions.Add(_definition);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a sequence that provides the content of the series.\r\n        /// </summary>\r\n        public IEnumerable ItemsSource\r\n        {\r\n            get { return (IEnumerable)GetValue(ItemsSourceProperty); }\r\n            set { SetValue(ItemsSourceProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ItemsSource dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ItemsSourceProperty =\r\n            DependencyProperty.Register(\"ItemsSource\", typeof(IEnumerable), typeof(ColumnSeries), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Binding that identifies the dependent values of the series.\r\n        /// </summary>\r\n        public Binding DependentValueBinding\r\n        {\r\n            get { return _definition.DependentValueBinding; }\r\n            set { _definition.DependentValueBinding = value; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Binding path that identifies the dependent values of the series.\r\n        /// </summary>\r\n        public string DependentValuePath\r\n        {\r\n            get { return _definition.DependentValuePath; }\r\n            set { _definition.DependentValuePath = value; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Binding that identifies the independent values of the series.\r\n        /// </summary>\r\n        public Binding IndependentValueBinding\r\n        {\r\n            get { return _definition.IndependentValueBinding; }\r\n            set { _definition.IndependentValueBinding = value; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Binding path that identifies the independent values of the series.\r\n        /// </summary>\r\n        public string IndependentValuePath\r\n        {\r\n            get { return _definition.IndependentValuePath; }\r\n            set { _definition.IndependentValuePath = value; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the IRangeAxis to use as the dependent axis of the series.\r\n        /// </summary>\r\n        public IRangeAxis DependentRangeAxis\r\n        {\r\n            get { return (IRangeAxis)GetValue(DependentRangeAxisProperty); }\r\n            set { SetValue(DependentRangeAxisProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the DependentRangeAxis dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty DependentRangeAxisProperty =\r\n            DependencyProperty.Register(\"DependentRangeAxis\", typeof(IRangeAxis), typeof(ColumnSeries), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets the title of the series.\r\n        /// </summary>\r\n        public object Title\r\n        {\r\n            get { return (object)GetValue(TitleProperty); }\r\n            set { SetValue(TitleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Title dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty TitleProperty =\r\n            DependencyProperty.Register(\"Title\", typeof(object), typeof(ColumnSeries), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Style to use for the DataPoints of the series.\r\n        /// </summary>\r\n        public Style DataPointStyle\r\n        {\r\n            get { return (Style)GetValue(DataPointStyleProperty); }\r\n            set { SetValue(DataPointStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the DataPointStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty DataPointStyleProperty =\r\n            DependencyProperty.Register(DataPointStyleName, typeof(Style), typeof(ColumnSeries), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Style to use for the LegendItem of the series.\r\n        /// </summary>\r\n        public Style LegendItemStyle\r\n        {\r\n            get { return (Style)GetValue(LegendItemStyleProperty); }\r\n            set { SetValue(LegendItemStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the LegendItemStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty LegendItemStyleProperty =\r\n            DependencyProperty.Register(LegendItemStyleName, typeof(Style), typeof(ColumnSeries), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether selection is enabled.\r\n        /// </summary>\r\n        public bool IsSelectionEnabled\r\n        {\r\n            get { return (bool)GetValue(IsSelectionEnabledProperty); }\r\n            set { SetValue(IsSelectionEnabledProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the IsSelectionEnabled dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty IsSelectionEnabledProperty =\r\n            DependencyProperty.Register(\"IsSelectionEnabled\", typeof(bool), typeof(ColumnSeries), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets the TimeSpan to use for the duration of data transitions.\r\n        /// </summary>\r\n        public TimeSpan TransitionDuration\r\n        {\r\n            get { return (TimeSpan)GetValue(TransitionDurationProperty); }\r\n            set { SetValue(TransitionDurationProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the TransitionDuration dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty TransitionDurationProperty =\r\n            DependencyProperty.Register(\"TransitionDuration\", typeof(TimeSpan), typeof(ColumnSeries), new PropertyMetadata(TimeSpan.FromSeconds(0.5)));\r\n\r\n#if !NO_EASING_FUNCTIONS\r\n        /// <summary>\r\n        /// Gets or sets the IEasingFunction to use for data transitions.\r\n        /// </summary>\r\n        public IEasingFunction TransitionEasingFunction\r\n        {\r\n            get { return (IEasingFunction)GetValue(TransitionEasingFunctionProperty); }\r\n            set { SetValue(TransitionEasingFunctionProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the TransitionEasingFunction dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty TransitionEasingFunctionProperty =\r\n            DependencyProperty.Register(\"TransitionEasingFunction\", typeof(IEasingFunction), typeof(ColumnSeries), new PropertyMetadata(new QuadraticEase { EasingMode = EasingMode.EaseInOut }));\r\n#else\r\n        /// <summary>\r\n        /// Gets or sets a placeholder for the TransitionEasingFunction dependency property.\r\n        /// </summary>\r\n        internal IEasingFunction TransitionEasingFunction { get; set; }\r\n#endif\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/Compatible/LineSeries.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Shapes;\r\n\r\n#if DEFINITION_SERIES_COMPATIBILITY_MODE\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n#else\r\nnamespace System.Windows.Controls.DataVisualization.Charting.Compatible\r\n#endif\r\n{\r\n    /// <summary>\r\n    /// Control that displays values as an line chart visualization.\r\n    /// </summary>\r\n    /// <remarks>\r\n    /// Based on the DefinitionSeries hierarchy.\r\n    /// </remarks>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    [StyleTypedProperty(Property = DataPointStyleName, StyleTargetType = typeof(LineDataPoint))]\r\n    [StyleTypedProperty(Property = LegendItemStyleName, StyleTargetType = typeof(LegendItem))]\r\n    [StyleTypedProperty(Property = PolylineStyleName, StyleTargetType = typeof(Polyline))]\r\n    public class LineSeries : StackedLineSeries\r\n    {\r\n        /// <summary>\r\n        /// Name of the DataPointStyle property.\r\n        /// </summary>\r\n        private const string DataPointStyleName = \"DataPointStyle\";\r\n\r\n        /// <summary>\r\n        /// Name of the LegendItemStyle property.\r\n        /// </summary>\r\n        private const string LegendItemStyleName = \"LegendItemStyle\";\r\n\r\n        /// <summary>\r\n        /// Name of the PolylineStyle property.\r\n        /// </summary>\r\n        private const string PolylineStyleName = \"PolylineStyle\";\r\n\r\n        /// <summary>\r\n        /// Field storing the single SeriesDefinition used by the series.\r\n        /// </summary>\r\n        private SeriesDefinition _definition;\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the LineSeries class.\r\n        /// </summary>\r\n        public LineSeries()\r\n        {\r\n            SetBinding(DefinitionSeries.DependentAxisProperty, new Binding(\"DependentRangeAxis\") { Source = this });\r\n            SetBinding(DefinitionSeries.SelectionModeProperty, new Binding(\"IsSelectionEnabled\") { Source = this, Converter = new System.Windows.Controls.DataVisualization.Charting.Compatible.SelectionEnabledToSelectionModeConverter() });\r\n            _definition = new SeriesDefinition();\r\n            _definition.SetBinding(SeriesDefinition.ItemsSourceProperty, new Binding(\"ItemsSource\") { Source = this });\r\n            _definition.SetBinding(SeriesDefinition.TitleProperty, new Binding(\"Title\") { Source = this });\r\n            _definition.SetBinding(SeriesDefinition.DataPointStyleProperty, new Binding(DataPointStyleName) { Source = this });\r\n            _definition.SetBinding(SeriesDefinition.LegendItemStyleProperty, new Binding(LegendItemStyleName) { Source = this });\r\n            _definition.SetBinding(SeriesDefinition.DataShapeStyleProperty, new Binding(PolylineStyleName) { Source = this });\r\n            _definition.SetBinding(SeriesDefinition.TransitionDurationProperty, new Binding(\"TransitionDuration\") { Source = this });\r\n#if !NO_EASING_FUNCTIONS\r\n            _definition.SetBinding(SeriesDefinition.TransitionEasingFunctionProperty, new Binding(\"TransitionEasingFunction\") { Source = this });\r\n#endif\r\n            // For compatibility\r\n            DependentValueBinding = new Binding();\r\n            IndependentValueBinding = new Binding();\r\n            SeriesDefinitions.Add(_definition);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a sequence of IndependentValueGroups.\r\n        /// </summary>\r\n        protected override IEnumerable<IndependentValueGroup> IndependentValueGroups\r\n        {\r\n            get\r\n            {\r\n                // Base implementation groups by independent value; when plotting a single series in isolation, that's not desirable\r\n                return DataItems\r\n                    .Select(di => new IndependentValueGroup(di.ActualIndependentValue, new DataItem[] { di }));\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a sequence that provides the content of the series.\r\n        /// </summary>\r\n        public IEnumerable ItemsSource\r\n        {\r\n            get { return (IEnumerable)GetValue(ItemsSourceProperty); }\r\n            set { SetValue(ItemsSourceProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ItemsSource dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ItemsSourceProperty =\r\n            DependencyProperty.Register(\"ItemsSource\", typeof(IEnumerable), typeof(LineSeries), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Binding that identifies the dependent values of the series.\r\n        /// </summary>\r\n        public Binding DependentValueBinding\r\n        {\r\n            get { return _definition.DependentValueBinding; }\r\n            set { _definition.DependentValueBinding = value; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Binding path that identifies the dependent values of the series.\r\n        /// </summary>\r\n        public string DependentValuePath\r\n        {\r\n            get { return _definition.DependentValuePath; }\r\n            set { _definition.DependentValuePath = value; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Binding that identifies the independent values of the series.\r\n        /// </summary>\r\n        public Binding IndependentValueBinding\r\n        {\r\n            get { return _definition.IndependentValueBinding; }\r\n            set { _definition.IndependentValueBinding = value; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Binding path that identifies the independent values of the series.\r\n        /// </summary>\r\n        public string IndependentValuePath\r\n        {\r\n            get { return _definition.IndependentValuePath; }\r\n            set { _definition.IndependentValuePath = value; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the IRangeAxis to use as the dependent axis of the series.\r\n        /// </summary>\r\n        public IRangeAxis DependentRangeAxis\r\n        {\r\n            get { return (IRangeAxis)GetValue(DependentRangeAxisProperty); }\r\n            set { SetValue(DependentRangeAxisProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the DependentRangeAxis dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty DependentRangeAxisProperty =\r\n            DependencyProperty.Register(\"DependentRangeAxis\", typeof(IRangeAxis), typeof(LineSeries), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets the title of the series.\r\n        /// </summary>\r\n        public object Title\r\n        {\r\n            get { return (object)GetValue(TitleProperty); }\r\n            set { SetValue(TitleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Title dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty TitleProperty =\r\n            DependencyProperty.Register(\"Title\", typeof(object), typeof(LineSeries), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Style to use for the DataPoints of the series.\r\n        /// </summary>\r\n        public Style DataPointStyle\r\n        {\r\n            get { return (Style)GetValue(DataPointStyleProperty); }\r\n            set { SetValue(DataPointStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the DataPointStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty DataPointStyleProperty =\r\n            DependencyProperty.Register(DataPointStyleName, typeof(Style), typeof(LineSeries), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Style to use for the LegendItem of the series.\r\n        /// </summary>\r\n        public Style LegendItemStyle\r\n        {\r\n            get { return (Style)GetValue(LegendItemStyleProperty); }\r\n            set { SetValue(LegendItemStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the LegendItemStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty LegendItemStyleProperty =\r\n            DependencyProperty.Register(LegendItemStyleName, typeof(Style), typeof(LineSeries), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether selection is enabled.\r\n        /// </summary>\r\n        public bool IsSelectionEnabled\r\n        {\r\n            get { return (bool)GetValue(IsSelectionEnabledProperty); }\r\n            set { SetValue(IsSelectionEnabledProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the IsSelectionEnabled dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty IsSelectionEnabledProperty =\r\n            DependencyProperty.Register(\"IsSelectionEnabled\", typeof(bool), typeof(LineSeries), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Style to use for the Path of the series.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Polyline\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.Compatible.LineSeries.#PolylineStyle\", Justification = \"Matches spelling of same-named framework class.\")]\r\n        public Style PolylineStyle\r\n        {\r\n            get { return (Style)GetValue(PolylineStyleProperty); }\r\n            set { SetValue(PolylineStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the PolylineStyle dependency property.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Polyline\", Justification = \"Matches spelling of same-named framework class.\")]\r\n        public static readonly DependencyProperty PolylineStyleProperty =\r\n            DependencyProperty.Register(PolylineStyleName, typeof(Style), typeof(LineSeries), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets the TimeSpan to use for the duration of data transitions.\r\n        /// </summary>\r\n        public TimeSpan TransitionDuration\r\n        {\r\n            get { return (TimeSpan)GetValue(TransitionDurationProperty); }\r\n            set { SetValue(TransitionDurationProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the TransitionDuration dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty TransitionDurationProperty =\r\n            DependencyProperty.Register(\"TransitionDuration\", typeof(TimeSpan), typeof(LineSeries), new PropertyMetadata(TimeSpan.FromSeconds(0.5)));\r\n\r\n#if !NO_EASING_FUNCTIONS\r\n        /// <summary>\r\n        /// Gets or sets the IEasingFunction to use for data transitions.\r\n        /// </summary>\r\n        public IEasingFunction TransitionEasingFunction\r\n        {\r\n            get { return (IEasingFunction)GetValue(TransitionEasingFunctionProperty); }\r\n            set { SetValue(TransitionEasingFunctionProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the TransitionEasingFunction dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty TransitionEasingFunctionProperty =\r\n            DependencyProperty.Register(\"TransitionEasingFunction\", typeof(IEasingFunction), typeof(LineSeries), new PropertyMetadata(new QuadraticEase { EasingMode = EasingMode.EaseInOut }));\r\n#else\r\n        /// <summary>\r\n        /// Gets or sets a placeholder for the TransitionEasingFunction dependency property.\r\n        /// </summary>\r\n        internal IEasingFunction TransitionEasingFunction { get; set; }\r\n#endif\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/Compatible/ScatterSeries.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media.Animation;\r\n\r\n#if DEFINITION_SERIES_COMPATIBILITY_MODE\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n#else\r\nnamespace System.Windows.Controls.DataVisualization.Charting.Compatible\r\n#endif\r\n{\r\n    /// <summary>\r\n    /// Control that displays values as a scatter chart visualization.\r\n    /// </summary>\r\n    /// <remarks>\r\n    /// Based on the DefinitionSeries hierarchy.\r\n    /// </remarks>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    [StyleTypedProperty(Property = DataPointStyleName, StyleTargetType = typeof(ScatterDataPoint))]\r\n    [StyleTypedProperty(Property = LegendItemStyleName, StyleTargetType = typeof(LegendItem))]\r\n    public class ScatterSeries : StackedLineSeries\r\n    {\r\n        /// <summary>\r\n        /// Name of the DataPointStyle property.\r\n        /// </summary>\r\n        private const string DataPointStyleName = \"DataPointStyle\";\r\n\r\n        /// <summary>\r\n        /// Name of the LegendItemStyle property.\r\n        /// </summary>\r\n        private const string LegendItemStyleName = \"LegendItemStyle\";\r\n\r\n        /// <summary>\r\n        /// Field storing the single SeriesDefinition used by the series.\r\n        /// </summary>\r\n        private SeriesDefinition _definition;\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the ScatterSeries class.\r\n        /// </summary>\r\n        public ScatterSeries()\r\n        {\r\n            SetBinding(DefinitionSeries.DependentAxisProperty, new Binding(\"DependentRangeAxis\") { Source = this });\r\n            SetBinding(DefinitionSeries.SelectionModeProperty, new Binding(\"IsSelectionEnabled\") { Source = this, Converter = new System.Windows.Controls.DataVisualization.Charting.Compatible.SelectionEnabledToSelectionModeConverter() });\r\n            _definition = new SeriesDefinition();\r\n            _definition.SetBinding(SeriesDefinition.ItemsSourceProperty, new Binding(\"ItemsSource\") { Source = this });\r\n            _definition.SetBinding(SeriesDefinition.TitleProperty, new Binding(\"Title\") { Source = this });\r\n            _definition.SetBinding(SeriesDefinition.DataPointStyleProperty, new Binding(DataPointStyleName) { Source = this });\r\n            _definition.SetBinding(SeriesDefinition.LegendItemStyleProperty, new Binding(LegendItemStyleName) { Source = this });\r\n            _definition.SetBinding(SeriesDefinition.TransitionDurationProperty, new Binding(\"TransitionDuration\") { Source = this });\r\n#if !NO_EASING_FUNCTIONS\r\n            _definition.SetBinding(SeriesDefinition.TransitionEasingFunctionProperty, new Binding(\"TransitionEasingFunction\") { Source = this });\r\n#endif\r\n            // For compatibility\r\n            DependentValueBinding = new Binding();\r\n            IndependentValueBinding = new Binding();\r\n            SeriesDefinitions.Add(_definition);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates a DataPoint for the series.\r\n        /// </summary>\r\n        /// <returns>Series-appropriate DataPoint instance.</returns>\r\n        protected override DataPoint CreateDataPoint()\r\n        {\r\n            return new ScatterDataPoint();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the shape for the series.\r\n        /// </summary>\r\n        /// <param name=\"definitionPoints\">Locations of the points of each SeriesDefinition in the series.</param>\r\n        protected override void UpdateShape(IList<IEnumerable<Point>> definitionPoints)\r\n        {\r\n            // Do not call base class implementation; leave shape empty for an easy way to use StackedLineSeries for ScatterSeries\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a sequence of IndependentValueGroups.\r\n        /// </summary>\r\n        protected override IEnumerable<IndependentValueGroup> IndependentValueGroups\r\n        {\r\n            get\r\n            {\r\n                // Base implementation groups by independent value; when plotting a single series in isolation, that's not desirable\r\n                return DataItems\r\n                    .Select(di => new IndependentValueGroup(di.ActualIndependentValue, new DataItem[] { di }));\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a sequence that provides the content of the series.\r\n        /// </summary>\r\n        public IEnumerable ItemsSource\r\n        {\r\n            get { return (IEnumerable)GetValue(ItemsSourceProperty); }\r\n            set { SetValue(ItemsSourceProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ItemsSource dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ItemsSourceProperty =\r\n            DependencyProperty.Register(\"ItemsSource\", typeof(IEnumerable), typeof(ScatterSeries), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Binding that identifies the dependent values of the series.\r\n        /// </summary>\r\n        public Binding DependentValueBinding\r\n        {\r\n            get { return _definition.DependentValueBinding; }\r\n            set { _definition.DependentValueBinding = value; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Binding path that identifies the dependent values of the series.\r\n        /// </summary>\r\n        public string DependentValuePath\r\n        {\r\n            get { return _definition.DependentValuePath; }\r\n            set { _definition.DependentValuePath = value; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Binding that identifies the independent values of the series.\r\n        /// </summary>\r\n        public Binding IndependentValueBinding\r\n        {\r\n            get { return _definition.IndependentValueBinding; }\r\n            set { _definition.IndependentValueBinding = value; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Binding path that identifies the independent values of the series.\r\n        /// </summary>\r\n        public string IndependentValuePath\r\n        {\r\n            get { return _definition.IndependentValuePath; }\r\n            set { _definition.IndependentValuePath = value; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the IRangeAxis to use as the dependent axis of the series.\r\n        /// </summary>\r\n        public IRangeAxis DependentRangeAxis\r\n        {\r\n            get { return (IRangeAxis)GetValue(DependentRangeAxisProperty); }\r\n            set { SetValue(DependentRangeAxisProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the DependentRangeAxis dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty DependentRangeAxisProperty =\r\n            DependencyProperty.Register(\"DependentRangeAxis\", typeof(IRangeAxis), typeof(ScatterSeries), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets the title of the series.\r\n        /// </summary>\r\n        public object Title\r\n        {\r\n            get { return (object)GetValue(TitleProperty); }\r\n            set { SetValue(TitleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Title dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty TitleProperty =\r\n            DependencyProperty.Register(\"Title\", typeof(object), typeof(ScatterSeries), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Style to use for the DataPoints of the series.\r\n        /// </summary>\r\n        public Style DataPointStyle\r\n        {\r\n            get { return (Style)GetValue(DataPointStyleProperty); }\r\n            set { SetValue(DataPointStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the DataPointStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty DataPointStyleProperty =\r\n            DependencyProperty.Register(DataPointStyleName, typeof(Style), typeof(ScatterSeries), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Style to use for the LegendItem of the series.\r\n        /// </summary>\r\n        public Style LegendItemStyle\r\n        {\r\n            get { return (Style)GetValue(LegendItemStyleProperty); }\r\n            set { SetValue(LegendItemStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the LegendItemStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty LegendItemStyleProperty =\r\n            DependencyProperty.Register(LegendItemStyleName, typeof(Style), typeof(ScatterSeries), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether selection is enabled.\r\n        /// </summary>\r\n        public bool IsSelectionEnabled\r\n        {\r\n            get { return (bool)GetValue(IsSelectionEnabledProperty); }\r\n            set { SetValue(IsSelectionEnabledProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the IsSelectionEnabled dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty IsSelectionEnabledProperty =\r\n            DependencyProperty.Register(\"IsSelectionEnabled\", typeof(bool), typeof(ScatterSeries), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets the TimeSpan to use for the duration of data transitions.\r\n        /// </summary>\r\n        public TimeSpan TransitionDuration\r\n        {\r\n            get { return (TimeSpan)GetValue(TransitionDurationProperty); }\r\n            set { SetValue(TransitionDurationProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the TransitionDuration dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty TransitionDurationProperty =\r\n            DependencyProperty.Register(\"TransitionDuration\", typeof(TimeSpan), typeof(ScatterSeries), new PropertyMetadata(TimeSpan.FromSeconds(0.5)));\r\n\r\n#if !NO_EASING_FUNCTIONS\r\n        /// <summary>\r\n        /// Gets or sets the IEasingFunction to use for data transitions.\r\n        /// </summary>\r\n        public IEasingFunction TransitionEasingFunction\r\n        {\r\n            get { return (IEasingFunction)GetValue(TransitionEasingFunctionProperty); }\r\n            set { SetValue(TransitionEasingFunctionProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the TransitionEasingFunction dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty TransitionEasingFunctionProperty =\r\n            DependencyProperty.Register(\"TransitionEasingFunction\", typeof(IEasingFunction), typeof(ScatterSeries), new PropertyMetadata(new QuadraticEase { EasingMode = EasingMode.EaseInOut }));\r\n#else\r\n        /// <summary>\r\n        /// Gets or sets a placeholder for the TransitionEasingFunction dependency property.\r\n        /// </summary>\r\n        internal IEasingFunction TransitionEasingFunction { get; set; }\r\n#endif\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/Compatible/SelectionEnabledToSelectionModeConverter.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Globalization;\r\nusing System.Windows.Data;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting.Compatible\r\n{\r\n    /// <summary>\r\n    /// Converts from a true/false value indicating whether selection is enabled to a SeriesSelectionMode.\r\n    /// </summary>\r\n    internal class SelectionEnabledToSelectionModeConverter : IValueConverter\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the SelectionEnabledToSelectionModeConverter class.\r\n        /// </summary>\r\n        public SelectionEnabledToSelectionModeConverter()\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Converts a value.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value produced by the binding source.</param>\r\n        /// <param name=\"targetType\">The type of the binding target property.</param>\r\n        /// <param name=\"parameter\">The converter parameter to use.</param>\r\n        /// <param name=\"culture\">The culture to use in the converter.</param>\r\n        /// <returns>Converted value.</returns>\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            SeriesSelectionMode selectionMode = SeriesSelectionMode.None;\r\n            if ((value is bool) && (bool)value)\r\n            {\r\n                selectionMode = SeriesSelectionMode.Single;\r\n            }\r\n            return selectionMode;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Converts a value back.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value produced by the binding source.</param>\r\n        /// <param name=\"targetType\">The type of the binding target property.</param>\r\n        /// <param name=\"parameter\">The converter parameter to use.</param>\r\n        /// <param name=\"culture\">The culture to use in the converter.</param>\r\n        /// <returns>Converted value.</returns>\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/DataPointSeries.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Collections.Specialized;\r\nusing System.Linq;\r\nusing System.Windows.Controls.DataVisualization.Collections;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Diagnostics.CodeAnalysis;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Represents a control that contains a dynamic data series.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public abstract partial class DataPointSeries : Series\r\n    {\r\n        /// <summary>\r\n        /// The name of the template part with the plot area.\r\n        /// </summary>\r\n        protected const string PlotAreaName = \"PlotArea\";\r\n\r\n        /// <summary>\r\n        /// The name of the DataPointStyle property and ResourceDictionary entry.\r\n        /// </summary>\r\n        protected const string DataPointStyleName = \"DataPointStyle\";\r\n\r\n        /// <summary>\r\n        /// The name of the LegendItemStyle property and ResourceDictionary entry.\r\n        /// </summary>\r\n        protected const string LegendItemStyleName = \"LegendItemStyle\";\r\n\r\n        /// <summary>\r\n        /// The name of the ActualLegendItemStyle property.\r\n        /// </summary>\r\n        protected internal const string ActualLegendItemStyleName = \"ActualLegendItemStyle\";\r\n\r\n        /// <summary>\r\n        /// Event that is raised when selection is changed.\r\n        /// </summary>\r\n        public static readonly RoutedEvent SelectionChangedEvent =\r\n            EventManager.RegisterRoutedEvent(\r\n                \"SelectionChanged\",\r\n                RoutingStrategy.Bubble,\r\n                typeof(SelectionChangedEventHandler),\r\n                typeof(DataPointSeries));\r\n\r\n        /// <summary>\r\n        /// Queue of hide/reveal storyboards to play.\r\n        /// </summary>\r\n        private StoryboardQueue _storyBoardQueue = new StoryboardQueue();\r\n\r\n        /// <summary>\r\n        /// The binding used to identify the dependent value binding.\r\n        /// </summary>\r\n        private Binding _dependentValueBinding;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Binding to use for identifying the dependent value.\r\n        /// </summary>\r\n        public Binding DependentValueBinding\r\n        {\r\n            get\r\n            {\r\n                return _dependentValueBinding;\r\n            }\r\n            set\r\n            {\r\n                if (value != _dependentValueBinding)\r\n                {\r\n                    _dependentValueBinding = value;\r\n                    Refresh();\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Data points collection sorted by object.\r\n        /// </summary>\r\n        private MultipleDictionary<object, DataPoint> _dataPointsByObject = \r\n            new MultipleDictionary<object, DataPoint>(\r\n                true,\r\n                new GenericEqualityComparer<object>(\r\n                    (left, right) =>\r\n                        left.Equals(right),\r\n                    (obj) => obj.GetHashCode()),\r\n                new GenericEqualityComparer<DataPoint>(\r\n                    (left, right) =>\r\n                        object.ReferenceEquals(left, right),\r\n                    (obj) => obj.GetHashCode()));\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Binding Path to use for identifying the dependent value.\r\n        /// </summary>\r\n        public string DependentValuePath\r\n        {\r\n            get\r\n            {\r\n                return (null != DependentValueBinding) ? DependentValueBinding.Path.Path : null;\r\n            }\r\n            set\r\n            {\r\n                if (null == value)\r\n                {\r\n                    DependentValueBinding = null;\r\n                }\r\n                else\r\n                {\r\n                    DependentValueBinding = new Binding(value);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// The binding used to identify the independent value binding.\r\n        /// </summary>\r\n        private Binding _independentValueBinding;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Binding to use for identifying the independent value.\r\n        /// </summary>\r\n        public Binding IndependentValueBinding\r\n        {\r\n            get\r\n            {\r\n                return _independentValueBinding;\r\n            }\r\n            set\r\n            {\r\n                if (_independentValueBinding != value)\r\n                {\r\n                    _independentValueBinding = value;\r\n                    Refresh();\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Binding Path to use for identifying the independent value.\r\n        /// </summary>\r\n        public string IndependentValuePath\r\n        {\r\n            get\r\n            {\r\n                return (null != IndependentValueBinding) ? IndependentValueBinding.Path.Path : null;\r\n            }\r\n            set\r\n            {\r\n                if (null == value)\r\n                {\r\n                    IndependentValueBinding = null;\r\n                }\r\n                else\r\n                {\r\n                    IndependentValueBinding = new Binding(value);\r\n                }\r\n            }\r\n        }\r\n\r\n        #region public IEnumerable ItemsSource\r\n        /// <summary>\r\n        /// Gets or sets a collection used to contain the data points of the Series.\r\n        /// </summary>\r\n        public IEnumerable ItemsSource\r\n        {\r\n            get { return (IEnumerable)GetValue(ItemsSourceProperty); }\r\n            set { SetValue(ItemsSourceProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ItemsSource dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ItemsSourceProperty =\r\n            DependencyProperty.Register(\r\n                \"ItemsSource\",\r\n                typeof(IEnumerable),\r\n                typeof(DataPointSeries),\r\n                new PropertyMetadata(OnItemsSourceChanged));\r\n\r\n        /// <summary>\r\n        /// ItemsSourceProperty property changed callback.\r\n        /// </summary>\r\n        /// <param name=\"o\">Series for which the ItemsSource changed.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnItemsSourceChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            ((DataPointSeries)o).OnItemsSourceChanged((IEnumerable)e.OldValue, (IEnumerable)e.NewValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the ItemsSource property changes.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value of the ItemsSource property.</param>\r\n        /// <param name=\"newValue\">New value of the ItemsSource property.</param>\r\n        protected virtual void OnItemsSourceChanged(IEnumerable oldValue, IEnumerable newValue)\r\n        {\r\n            // Remove handler for oldValue.CollectionChanged (if present)\r\n            INotifyCollectionChanged oldValueINotifyCollectionChanged = oldValue as INotifyCollectionChanged;\r\n            if (null != oldValueINotifyCollectionChanged)\r\n            {\r\n                // Detach the WeakEventListener\r\n                if (null != _weakEventListener)\r\n                {\r\n                    _weakEventListener.Detach();\r\n                    _weakEventListener = null;\r\n                }\r\n            }\r\n\r\n            // Add handler for newValue.CollectionChanged (if possible)\r\n            INotifyCollectionChanged newValueINotifyCollectionChanged = newValue as INotifyCollectionChanged;\r\n            if (null != newValueINotifyCollectionChanged)\r\n            {\r\n                // Use a WeakEventListener so that the backwards reference doesn't keep this object alive\r\n                _weakEventListener = new WeakEventListener<DataPointSeries, object, NotifyCollectionChangedEventArgs>(this);\r\n                _weakEventListener.OnEventAction = (instance, source, eventArgs) => instance.ItemsSourceCollectionChanged(source, eventArgs);\r\n                _weakEventListener.OnDetachAction = (weakEventListener) => newValueINotifyCollectionChanged.CollectionChanged -= weakEventListener.OnEvent;\r\n                newValueINotifyCollectionChanged.CollectionChanged += _weakEventListener.OnEvent;\r\n            }\r\n\r\n            if (TemplateApplied)\r\n            {\r\n                Refresh();\r\n            }\r\n        }\r\n        #endregion public IEnumerable ItemsSource\r\n\r\n        #region public AnimationSequence AnimationSequence\r\n        /// <summary>\r\n        /// Gets or sets the animation sequence to use for the DataPoints of the Series.\r\n        /// </summary>\r\n        public AnimationSequence AnimationSequence\r\n        {\r\n            get { return (AnimationSequence)GetValue(AnimationSequenceProperty); }\r\n            set { SetValue(AnimationSequenceProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a stream of the active data points in the plot area.\r\n        /// </summary>\r\n        protected virtual IEnumerable<DataPoint> ActiveDataPoints\r\n        {\r\n            get\r\n            {\r\n                return (null != PlotArea) ?\r\n                    PlotArea.Children.OfType<DataPoint>().Where(dataPoint => dataPoint.IsActive) :\r\n                    Enumerable.Empty<DataPoint>();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the number of active data points in the plot area.\r\n        /// </summary>\r\n        protected int ActiveDataPointCount { get; private set; }\r\n\r\n        #region public bool IsSelectionEnabled\r\n\r\n        #region public IEasingFunction TransitionEasingFunction\r\n        /// <summary>\r\n        /// Gets or sets the easing function to use when transitioning the\r\n        /// data points.\r\n        /// </summary>\r\n#if !NO_EASING_FUNCTIONS\r\n        public IEasingFunction TransitionEasingFunction\r\n        {\r\n            get { return GetValue(TransitionEasingFunctionProperty) as IEasingFunction; }\r\n            set { SetValue(TransitionEasingFunctionProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the TransitionEasingFunction dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty TransitionEasingFunctionProperty =\r\n            DependencyProperty.Register(\r\n                \"TransitionEasingFunction\",\r\n                typeof(IEasingFunction),\r\n                typeof(DataPointSeries),\r\n                new PropertyMetadata(new QuadraticEase { EasingMode = EasingMode.EaseInOut }));\r\n#else\r\n        internal IEasingFunction TransitionEasingFunction { get; set; }\r\n#endif\r\n        #endregion public IEasingFunction TransitionEasingFunction\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether elements in the series can\r\n        /// be selected.\r\n        /// </summary>\r\n        public bool IsSelectionEnabled\r\n        {\r\n            get { return (bool)GetValue(IsSelectionEnabledProperty); }\r\n            set { SetValue(IsSelectionEnabledProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the IsSelectionEnabled dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty IsSelectionEnabledProperty =\r\n            DependencyProperty.Register(\r\n                \"IsSelectionEnabled\",\r\n                typeof(bool),\r\n                typeof(DataPointSeries),\r\n                new PropertyMetadata(false, OnIsSelectionEnabledPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// IsSelectionEnabledProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">DynamicSeries that changed its IsSelectionEnabled.\r\n        /// </param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnIsSelectionEnabledPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DataPointSeries source = (DataPointSeries)d;\r\n            bool oldValue = (bool)e.OldValue;\r\n            bool newValue = (bool)e.NewValue;\r\n            source.OnIsSelectionEnabledPropertyChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// IsSelectionEnabledProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        protected virtual void OnIsSelectionEnabledPropertyChanged(bool oldValue, bool newValue)\r\n        {\r\n            foreach (DataPoint dataPoint in ActiveDataPoints)\r\n            {\r\n                dataPoint.IsSelectionEnabled = newValue;\r\n            }\r\n        }\r\n        #endregion public bool IsSelectionEnabled\r\n\r\n        /// <summary>\r\n        /// Identifies the AnimationSequence dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty AnimationSequenceProperty =\r\n            DependencyProperty.Register(\r\n                \"AnimationSequence\",\r\n                typeof(AnimationSequence),\r\n                typeof(DataPointSeries),\r\n                new PropertyMetadata(AnimationSequence.Simultaneous));\r\n        #endregion public AnimationSequence AnimationSequence\r\n\r\n        /// <summary>\r\n        /// WeakEventListener used to handle INotifyCollectionChanged events.\r\n        /// </summary>\r\n        private WeakEventListener<DataPointSeries, object, NotifyCollectionChangedEventArgs> _weakEventListener;\r\n\r\n        /// <summary>\r\n        /// The plot area canvas.\r\n        /// </summary>\r\n        private Panel _plotArea;\r\n\r\n        /// <summary>\r\n        /// Gets the plot area canvas.\r\n        /// </summary>\r\n        internal Panel PlotArea\r\n        {\r\n            get\r\n            {\r\n                return _plotArea;\r\n            }\r\n            private set\r\n            {\r\n                Panel oldValue = _plotArea;\r\n                _plotArea = value;\r\n                if (_plotArea != oldValue)\r\n                {\r\n                    OnPlotAreaChanged(oldValue, value);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the size of the plot area.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// Use this method instead of PlotArea.ActualWidth/ActualHeight\r\n        /// because the ActualWidth and ActualHeight properties are set after\r\n        /// the SizeChanged handler runs.\r\n        /// </remarks>\r\n        protected Size PlotAreaSize { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Event raised when selection has changed.\r\n        /// </summary>\r\n        public event SelectionChangedEventHandler SelectionChanged\r\n        {\r\n            add { AddHandler(SelectionChangedEvent, value); }\r\n            remove { RemoveHandler(SelectionChangedEvent, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Tracks whether a call to OnSelectedItemPropertyChanged is already in progress.\r\n        /// </summary>\r\n        private bool _processingOnSelectedItemPropertyChanged;\r\n\r\n        #region public object SelectedItem\r\n        /// <summary>\r\n        /// Gets or sets the selected item.\r\n        /// </summary>\r\n        public object SelectedItem\r\n        {\r\n            get { return GetValue(SelectedItemProperty) as object; }\r\n            set { SetValue(SelectedItemProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the SelectedItem dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty SelectedItemProperty =\r\n            DependencyProperty.Register(\r\n                \"SelectedItem\",\r\n                typeof(object),\r\n                typeof(DataPointSeries),\r\n                new PropertyMetadata(null, OnSelectedItemPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// Called when the value of the SelectedItem property changes.\r\n        /// </summary>\r\n        /// <param name=\"d\">DynamicSeries that changed its SelectedItem.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnSelectedItemPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DataPointSeries source = (DataPointSeries)d;\r\n            object oldValue = (object)e.OldValue;\r\n            object newValue = (object)e.NewValue;\r\n            source.OnSelectedItemPropertyChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the value of the SelectedItem property changes.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">The old selected index.</param>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        protected virtual void OnSelectedItemPropertyChanged(object oldValue, object newValue)\r\n        {\r\n            DataPoint dataPoint = null;\r\n            if (null != newValue)\r\n            {\r\n                // Find the corresponding Control\r\n                dataPoint = _dataPointsByObject[newValue].Where(dp => object.Equals(newValue, dp.DataContext) && dp.IsActive).FirstOrDefault();\r\n                if (null == dataPoint)\r\n                {\r\n                    // None; clear SelectedItem\r\n                    try\r\n                    {\r\n                        _processingOnSelectedItemPropertyChanged = true;\r\n                        SelectedItem = null;\r\n                        // Clear newValue so the SelectionChanged event will be correct (or suppressed)\r\n                        newValue = null;\r\n                    }\r\n                    finally\r\n                    {\r\n                        _processingOnSelectedItemPropertyChanged = false;\r\n                    }\r\n                }\r\n            }\r\n            // Unselect everything else\r\n            foreach (DataPoint dataPointUnselect in ActiveDataPoints.Where(activeDataPoint => (activeDataPoint != dataPoint) && activeDataPoint.IsSelected))\r\n            {\r\n                dataPointUnselect.IsSelectedChanged -= OnDataPointIsSelectedChanged;\r\n                dataPointUnselect.IsSelected = false;\r\n                dataPointUnselect.IsSelectedChanged += OnDataPointIsSelectedChanged;\r\n            }\r\n            if ((null != dataPoint) && !dataPoint.IsSelected)\r\n            {\r\n                // Select the new data point\r\n                dataPoint.IsSelectedChanged -= OnDataPointIsSelectedChanged;\r\n                dataPoint.IsSelected = true;\r\n                dataPoint.IsSelectedChanged += OnDataPointIsSelectedChanged;\r\n            }\r\n\r\n            // Fire SelectionChanged (if appropriate)\r\n            if (!_processingOnSelectedItemPropertyChanged && (oldValue != newValue))\r\n            {\r\n                IList oldValues = new List<object>();\r\n                if (oldValue != null)\r\n                {\r\n                    oldValues.Add(oldValue);\r\n                }\r\n                IList newValues = new List<object>();\r\n                if (newValue != null)\r\n                {\r\n                    newValues.Add(newValue);\r\n                }\r\n                RaiseEvent(new SelectionChangedEventArgs(SelectionChangedEvent, oldValues, newValues));\r\n            }\r\n        }\r\n        #endregion public object SelectedItem\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether the template has been\r\n        /// applied.\r\n        /// </summary>\r\n        private bool TemplateApplied { get; set; }\r\n\r\n        #region public Style DataPointStyle\r\n        /// <summary>\r\n        /// Gets or sets the style to use for the data points.\r\n        /// </summary>\r\n        public Style DataPointStyle\r\n        {\r\n            get { return GetValue(DataPointStyleProperty) as Style; }\r\n            set { SetValue(DataPointStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the DataPointStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty DataPointStyleProperty =\r\n            DependencyProperty.Register(\r\n                DataPointStyleName,\r\n                typeof(Style),\r\n                typeof(DataPointSeries),\r\n                new PropertyMetadata(null, OnDataPointStylePropertyChanged));\r\n\r\n        /// <summary>\r\n        /// DataPointStyleProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">DataPointSingleSeriesWithAxes that changed its DataPointStyle.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnDataPointStylePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            ((DataPointSeries)d).OnDataPointStylePropertyChanged((Style)e.OldValue, (Style)e.NewValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// DataPointStyleProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        protected virtual void OnDataPointStylePropertyChanged(Style oldValue, Style newValue)\r\n        {\r\n            foreach (LegendItem legendItem in LegendItems.OfType<LegendItem>())\r\n            {\r\n                // Silverlight requires the following to pick up the new Style for the LegendItem marker\r\n                object dataContext = legendItem.DataContext;\r\n                legendItem.DataContext = null;\r\n                legendItem.DataContext = dataContext;\r\n            }\r\n        }\r\n        #endregion public Style DataPointStyle\r\n\r\n        #region public Style LegendItemStyle\r\n        /// <summary>\r\n        /// Gets or sets the style to use for the legend items.\r\n        /// </summary>\r\n        public Style LegendItemStyle\r\n        {\r\n            get { return GetValue(LegendItemStyleProperty) as Style; }\r\n            set { SetValue(LegendItemStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the LegendItemStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty LegendItemStyleProperty =\r\n            DependencyProperty.Register(\r\n                LegendItemStyleName,\r\n                typeof(Style),\r\n                typeof(DataPointSeries),\r\n                new PropertyMetadata(null, OnLegendItemStylePropertyChanged));\r\n\r\n        /// <summary>\r\n        /// LegendItemStyleProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">DataPointSeries that changed its LegendItemStyle.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnLegendItemStylePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DataPointSeries source = (DataPointSeries)d;\r\n            source.OnLegendItemStylePropertyChanged((Style)e.OldValue, (Style)e.NewValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the value of the LegendItemStyle property changes.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        protected virtual void OnLegendItemStylePropertyChanged(Style oldValue, Style newValue)\r\n        {\r\n        }\r\n        #endregion public Style LegendItemStyle\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Geometry used to clip DataPoints to the PlotArea bounds.\r\n        /// </summary>\r\n        private RectangleGeometry ClipGeometry { get; set; }\r\n\r\n        /// <summary>\r\n        /// Indicates whether a call to Refresh is required when the control's\r\n        /// size changes.\r\n        /// </summary>\r\n        private bool _needRefreshWhenSizeChanged = true;\r\n\r\n        #region public TimeSpan TransitionDuration\r\n        /// <summary>\r\n        /// Gets or sets the duration of the value Transition animation.\r\n        /// </summary>\r\n        public TimeSpan TransitionDuration\r\n        {\r\n            get { return (TimeSpan)GetValue(TransitionDurationProperty); }\r\n            set { SetValue(TransitionDurationProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the TransitionDuration dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty TransitionDurationProperty =\r\n            DependencyProperty.Register(\r\n                \"TransitionDuration\",\r\n                typeof(TimeSpan),\r\n                typeof(DataPointSeries),\r\n                new PropertyMetadata(TimeSpan.FromSeconds(0.5)));\r\n        #endregion public TimeSpan TransitionDuration\r\n\r\n        /// <summary>\r\n        /// Initializes the static members of the DataPointSeries class.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1810:InitializeReferenceTypeStaticFieldsInline\", Justification = \"Dependency properties are initialized in-line.\")]\r\n        static DataPointSeries()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(DataPointSeries), new FrameworkPropertyMetadata(typeof(DataPointSeries)));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the DataPointSeries class.\r\n        /// </summary>\r\n        protected DataPointSeries()\r\n        {\r\n            ClipGeometry = new RectangleGeometry();\r\n            Clip = ClipGeometry;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Adds an object to the series host by creating a corresponding data point\r\n        /// for it.\r\n        /// </summary>\r\n        /// <param name=\"dataContext\">The object to add to the series host.</param>\r\n        /// <returns>The data point created for the object.</returns>\r\n        protected virtual DataPoint AddObject(object dataContext)\r\n        {\r\n            if (ShouldCreateDataPoint(dataContext))\r\n            {\r\n                DataPoint dataPoint = CreateAndPrepareDataPoint(dataContext);\r\n                _dataPointsByObject.Add(dataContext, dataPoint);\r\n                AddDataPoint(dataPoint);\r\n                return dataPoint;\r\n            }\r\n            return null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns whether a data point should be created for the data context.\r\n        /// </summary>\r\n        /// <param name=\"dataContext\">The data context that will be used for the\r\n        /// data point.</param>\r\n        /// <returns>A value indicating whether a data point should be created\r\n        /// for the data context.</returns>\r\n        protected virtual bool ShouldCreateDataPoint(object dataContext)\r\n        {\r\n            return true;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the index at which to insert data point in the plot area\r\n        /// child collection.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point to retrieve the insertion\r\n        /// index for.</param>\r\n        /// <returns>The insertion index.</returns>\r\n        protected virtual int GetInsertionIndex(DataPoint dataPoint)\r\n        {\r\n            return PlotArea.Children.Count;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Adds a data point to the plot area.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point to add to the plot area.\r\n        /// </param>\r\n        protected virtual void AddDataPoint(DataPoint dataPoint)\r\n        {\r\n            if (dataPoint.IsSelected)\r\n            {\r\n                Select(dataPoint);\r\n            }\r\n\r\n            if (PlotArea != null)\r\n            {\r\n                // Positioning data point outside the visible area.\r\n                Canvas.SetLeft(dataPoint, float.MinValue);\r\n                Canvas.SetTop(dataPoint, float.MinValue);\r\n                dataPoint.IsSelectionEnabled = IsSelectionEnabled;\r\n                AttachEventHandlersToDataPoint(dataPoint);\r\n                PlotArea.Children.Insert(GetInsertionIndex(dataPoint), dataPoint);\r\n                ActiveDataPointCount++;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Retrieves the data point corresponding to the object passed as the\r\n        /// parameter.\r\n        /// </summary>\r\n        /// <param name=\"dataContext\">The data context used for the point.\r\n        /// </param>\r\n        /// <returns>The data point associated with the object.</returns>\r\n        protected virtual DataPoint GetDataPoint(object dataContext)\r\n        {\r\n            DataPoint dataPoint = _dataPointsByObject[dataContext].Where(dp => object.Equals(dataContext, dp.DataContext)).FirstOrDefault();\r\n            return dataPoint;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates and prepares a data point.\r\n        /// </summary>\r\n        /// <param name=\"dataContext\">The object to use as the data context\r\n        /// of the data point.</param>\r\n        /// <returns>The newly created data point.</returns>\r\n        private DataPoint CreateAndPrepareDataPoint(object dataContext)\r\n        {\r\n            DataPoint dataPoint = CreateDataPoint();\r\n            PrepareDataPoint(dataPoint, dataContext);\r\n            return dataPoint;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a Control suitable for the Series.\r\n        /// </summary>\r\n        /// <returns>The DataPoint instance.</returns>\r\n        protected abstract DataPoint CreateDataPoint();\r\n\r\n        /// <summary>\r\n        /// Creates a legend item.\r\n        /// </summary>\r\n        /// <returns>A legend item for insertion in the legend items collection.\r\n        /// </returns>\r\n        /// <param name=\"owner\">The owner of the new LegendItem.</param>\r\n        protected virtual LegendItem CreateLegendItem(DataPointSeries owner)\r\n        {\r\n            LegendItem legendItem = new LegendItem() { Owner = owner };\r\n            legendItem.SetBinding(LegendItem.StyleProperty, new Binding(ActualLegendItemStyleName) { Source = this });\r\n            legendItem.SetBinding(LegendItem.ContentProperty, new Binding(TitleName) { Source = this });\r\n            legendItem.SetBinding(LegendItem.VisibilityProperty, new Binding(VisibilityName) { Source = this });\r\n            return legendItem;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Method that handles the ObservableCollection.CollectionChanged event for the ItemsSource property.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The object that raised the event.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void ItemsSourceCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)\r\n        {\r\n            // Pass notification on\r\n            OnItemsSourceCollectionChanged(ItemsSource, e);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates data points collection with items retrieved from items\r\n        /// source and removes the old items.\r\n        /// </summary>\r\n        /// <param name=\"newItems\">The items to load.</param>\r\n        /// <param name=\"oldItems\">The items to remove.</param>\r\n        protected void LoadDataPoints(IEnumerable newItems, IEnumerable oldItems)\r\n        {\r\n            if ((PlotArea != null) && (SeriesHost != null))\r\n            {\r\n                IList<DataPoint> removedDataPoints = new List<DataPoint>();\r\n                if (oldItems != null)\r\n                {\r\n                    if (oldItems != null)\r\n                    {\r\n                        // Remove existing objects from internal collections.\r\n                        foreach (object dataContext in oldItems)\r\n                        {\r\n                            DataPoint removedDataPoint = RemoveObject(dataContext);\r\n                            _dataPointsByObject.Remove(dataContext, removedDataPoint);\r\n                            if (removedDataPoint != null)\r\n                            {\r\n                                removedDataPoints.Add(removedDataPoint);\r\n                            }\r\n                        }\r\n                    }\r\n                    StaggeredStateChange(removedDataPoints, removedDataPoints.Count, DataPointState.Hiding);\r\n                }\r\n\r\n                IList<DataPoint> addedDataPoints = new List<DataPoint>();\r\n                if (newItems != null)\r\n                {\r\n                    foreach (object dataContext in newItems)\r\n                    {\r\n                        DataPoint dataPoint = AddObject(dataContext);\r\n                        if (dataPoint != null)\r\n                        {\r\n                            addedDataPoints.Add(dataPoint);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                OnDataPointsChanged(addedDataPoints, removedDataPoints);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Attaches handler plot area after loading it from XAML.\r\n        /// </summary>\r\n        public override void OnApplyTemplate()\r\n        {\r\n            base.OnApplyTemplate();\r\n\r\n            // Get reference to new ChartArea and hook its SizeChanged event\r\n            PlotArea = GetTemplateChild(PlotAreaName) as Panel;\r\n\r\n            if (!TemplateApplied)\r\n            {\r\n                TemplateApplied = true;\r\n                SizeChanged += new SizeChangedEventHandler(OnSizeChanged);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Invokes an action when the plot area's layout is updated.\r\n        /// </summary>\r\n        /// <param name=\"action\">The action to execute.</param>\r\n        internal void InvokeOnLayoutUpdated(Action action)\r\n        {\r\n            EventHandler handler = null;\r\n            handler = delegate\r\n            {\r\n                this.PlotArea.LayoutUpdated -= handler;\r\n                action();\r\n            };\r\n\r\n            this.PlotArea.LayoutUpdated += handler;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles changes to the SeriesHost property.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        protected override void OnSeriesHostPropertyChanged(ISeriesHost oldValue, ISeriesHost newValue)\r\n        {\r\n            base.OnSeriesHostPropertyChanged(oldValue, newValue);\r\n\r\n            if (null == newValue)\r\n            {\r\n                // Reset flag to prepare for next addition to a series host\r\n                _needRefreshWhenSizeChanged = true;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called after data points have been loaded from the items source.\r\n        /// </summary>\r\n        /// <param name=\"newDataPoints\">New active data points.</param>\r\n        /// <param name=\"oldDataPoints\">Old inactive data points.</param>\r\n        protected virtual void OnDataPointsChanged(IList<DataPoint> newDataPoints, IList<DataPoint> oldDataPoints)\r\n        {\r\n            StaggeredStateChange(newDataPoints, newDataPoints.Count(), DataPointState.Showing);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Method called when the ItemsSource collection changes.\r\n        /// </summary>\r\n        /// <param name=\"collection\">New value of the collection.</param>\r\n        /// <param name=\"e\">Information about the change.</param>\r\n        protected virtual void OnItemsSourceCollectionChanged(IEnumerable collection, NotifyCollectionChangedEventArgs e)\r\n        {\r\n            if (e.Action == NotifyCollectionChangedAction.Replace)\r\n            {\r\n                IList<DataPoint> updatedDataPoints = new List<DataPoint>();\r\n\r\n                for (int index = 0; index < e.OldItems.Count; index++)\r\n                {\r\n                    DataPoint dataPointToUpdate = _dataPointsByObject[e.OldItems[index]].Where(dp => object.Equals(e.OldItems[index], dp.DataContext)).Except(updatedDataPoints).FirstOrDefault();\r\n                    if (null != dataPointToUpdate)\r\n                    {\r\n                        updatedDataPoints.Add(dataPointToUpdate);\r\n                        dataPointToUpdate.DataContext = e.NewItems[index];\r\n                        _dataPointsByObject.Remove(e.OldItems[index], dataPointToUpdate);\r\n                        _dataPointsByObject.Add(e.NewItems[index], dataPointToUpdate);\r\n                    }\r\n                }\r\n            }\r\n            else if (e.Action == NotifyCollectionChangedAction.Add || e.Action == NotifyCollectionChangedAction.Remove)\r\n            {\r\n                LoadDataPoints(\r\n                    e.NewItems,\r\n                    e.OldItems);\r\n            }\r\n            else\r\n            {\r\n                Refresh();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes items from the existing plot area and adds items to new\r\n        /// plot area.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">The previous plot area.</param>\r\n        /// <param name=\"newValue\">The new plot area.</param>\r\n        protected virtual void OnPlotAreaChanged(Panel oldValue, Panel newValue)\r\n        {\r\n            if (oldValue != null)\r\n            {\r\n                foreach (DataPoint dataPoint in ActiveDataPoints)\r\n                {\r\n                    oldValue.Children.Remove(dataPoint);\r\n                }\r\n            }\r\n\r\n            if (newValue != null)\r\n            {\r\n                foreach (DataPoint dataPoint in ActiveDataPoints)\r\n                {\r\n                    newValue.Children.Add(dataPoint);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the visual appearance of all the data points when the size\r\n        /// changes.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source of the event.</param>\r\n        /// <param name=\"e\">Information about the event.</param>\r\n        private void OnSizeChanged(object sender, SizeChangedEventArgs e)\r\n        {\r\n            PlotAreaSize = e.NewSize;\r\n            ClipGeometry.Rect = new Rect(0, 0, PlotAreaSize.Width, PlotAreaSize.Height);\r\n            if (null != PlotArea)\r\n            {\r\n                PlotArea.Width = PlotAreaSize.Width;\r\n                PlotArea.Height = PlotAreaSize.Height;\r\n\r\n                if (_needRefreshWhenSizeChanged)\r\n                {\r\n                    _needRefreshWhenSizeChanged = false;\r\n                    Refresh();\r\n                }\r\n                else\r\n                {\r\n                    UpdateDataPoints(ActiveDataPoints);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Refreshes data from data source and renders the series.\r\n        /// </summary>\r\n        public void Refresh()\r\n        {\r\n            try\r\n            {\r\n                IEnumerable itemsSource = ItemsSource;\r\n                LoadDataPoints(itemsSource, ActiveDataPoints.Select(dataPoint => dataPoint.DataContext));\r\n            }\r\n            catch\r\n            {\r\n                if (DesignerProperties.GetIsInDesignMode(this))\r\n                {\r\n                    // Suppress exception to improve the design-time experience\r\n                }\r\n                else\r\n                {\r\n                    throw;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes an object from the series host by removing its corresponding\r\n        /// data point.\r\n        /// </summary>\r\n        /// <param name=\"dataContext\">The object to remove from the series data\r\n        /// source.</param>\r\n        /// <returns>The data point corresponding to the removed object.\r\n        /// </returns>\r\n        protected virtual DataPoint RemoveObject(object dataContext)\r\n        {\r\n            DataPoint dataPoint = GetDataPoint(dataContext);\r\n\r\n            if (dataPoint != null)\r\n            {\r\n                RemoveDataPoint(dataPoint);\r\n            }\r\n            return dataPoint;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes a data point from the plot area.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point to remove.</param>\r\n        protected virtual void RemoveDataPoint(DataPoint dataPoint)\r\n        {\r\n            if (dataPoint.IsSelected)\r\n            {\r\n                Unselect(dataPoint);\r\n            }\r\n\r\n            ActiveDataPointCount--;\r\n\r\n            // Cancel any Storyboards that might be holding the State property's value\r\n            dataPoint.BeginAnimation(DataPoint.StateProperty, null);\r\n            dataPoint.State = DataPointState.PendingRemoval;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether all data points are being\r\n        /// updated.\r\n        /// </summary>\r\n        protected bool UpdatingDataPoints { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Updates the visual representation of all data points in the plot\r\n        /// area.\r\n        /// </summary>\r\n        /// <param name=\"dataPoints\">A sequence of data points to update.\r\n        /// </param>\r\n        protected virtual void UpdateDataPoints(IEnumerable<DataPoint> dataPoints)\r\n        {\r\n            UpdatingDataPoints = true;\r\n\r\n            DetachEventHandlersFromDataPoints(dataPoints);\r\n            try\r\n            {\r\n                OnBeforeUpdateDataPoints();\r\n\r\n                foreach (DataPoint dataPoint in dataPoints)\r\n                {\r\n                    UpdateDataPoint(dataPoint);\r\n                }\r\n\r\n                OnAfterUpdateDataPoints();\r\n            }\r\n            finally\r\n            {\r\n                AttachEventHandlersToDataPoints(dataPoints);\r\n                UpdatingDataPoints = false;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Attaches event handlers to the data points.\r\n        /// </summary>\r\n        /// <param name=\"dataPoints\">A sequence of data points.</param>\r\n        private void AttachEventHandlersToDataPoints(IEnumerable<DataPoint> dataPoints)\r\n        {\r\n            foreach (DataPoint dataPoint in dataPoints)\r\n            {\r\n                AttachEventHandlersToDataPoint(dataPoint);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Detaches event handlers from the data points.\r\n        /// </summary>\r\n        /// <param name=\"dataPoints\">A sequence of data points.</param>\r\n        private void DetachEventHandlersFromDataPoints(IEnumerable<DataPoint> dataPoints)\r\n        {\r\n            foreach (DataPoint dataPoint in dataPoints)\r\n            {\r\n                DetachEventHandlersFromDataPoint(dataPoint);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Attaches event handlers to a data point.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point.</param>\r\n        protected virtual void AttachEventHandlersToDataPoint(DataPoint dataPoint)\r\n        {\r\n            dataPoint.IsSelectedChanged += OnDataPointIsSelectedChanged;\r\n            dataPoint.ActualDependentValueChanged += OnDataPointActualDependentValueChanged;\r\n            dataPoint.ActualIndependentValueChanged += OnDataPointActualIndependentValueChanged;\r\n            dataPoint.DependentValueChanged += OnDataPointDependentValueChanged;\r\n            dataPoint.IndependentValueChanged += OnDataPointIndependentValueChanged;\r\n            dataPoint.StateChanged += OnDataPointStateChanged;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Unselects a data point.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point to unselect.</param>\r\n        private void Unselect(DataPoint dataPoint)\r\n        {\r\n            if (dataPoint.DataContext.Equals(SelectedItem))\r\n            {\r\n                SelectedItem = null;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Selects a data point.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point to select.</param>\r\n        private void Select(DataPoint dataPoint)\r\n        {\r\n            SelectedItem = dataPoint.DataContext;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Method executed when a data point is either selected or unselected.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source of the event.</param>\r\n        /// <param name=\"e\">Information about the event.</param>\r\n        private void OnDataPointIsSelectedChanged(object sender, RoutedPropertyChangedEventArgs<bool> e)\r\n        {\r\n            DataPoint dataPoint = sender as DataPoint;\r\n\r\n            if (e.NewValue)\r\n            {\r\n                Select(dataPoint);\r\n            }\r\n            else\r\n            {\r\n                Unselect(dataPoint);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Detaches event handlers from a data point.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point.</param>\r\n        protected virtual void DetachEventHandlersFromDataPoint(DataPoint dataPoint)\r\n        {\r\n            dataPoint.IsSelectedChanged -= OnDataPointIsSelectedChanged;\r\n            dataPoint.ActualDependentValueChanged -= OnDataPointActualDependentValueChanged;\r\n            dataPoint.ActualIndependentValueChanged -= OnDataPointActualIndependentValueChanged;\r\n            dataPoint.DependentValueChanged -= OnDataPointDependentValueChanged;\r\n            dataPoint.IndependentValueChanged -= OnDataPointIndependentValueChanged;\r\n            dataPoint.StateChanged -= OnDataPointStateChanged;\r\n        }\r\n\r\n        /// <summary>\r\n        /// This method that executes before data points are updated.\r\n        /// </summary>\r\n        protected virtual void OnBeforeUpdateDataPoints()\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// This method that executes after data points are updated.\r\n        /// </summary>\r\n        protected virtual void OnAfterUpdateDataPoints()\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the visual representation of a single data point in the plot\r\n        /// area.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point to update.</param>\r\n        protected abstract void UpdateDataPoint(DataPoint dataPoint);\r\n\r\n        /// <summary>\r\n        /// Prepares a data point by extracting binding it to a data context\r\n        /// object.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">A data point.</param>\r\n        /// <param name=\"dataContext\">A data context object.</param>\r\n        protected virtual void PrepareDataPoint(DataPoint dataPoint, object dataContext)\r\n        {\r\n            // Create a Control with DataContext set to the data source\r\n            dataPoint.DataContext = dataContext;\r\n\r\n            // Set bindings for IndependentValue/DependentValue\r\n            if (IndependentValueBinding != null)\r\n            {\r\n                dataPoint.SetBinding(DataPoint.IndependentValueProperty, IndependentValueBinding);\r\n            }\r\n\r\n            if (DependentValueBinding == null)\r\n            {\r\n                dataPoint.SetBinding(DataPoint.DependentValueProperty, new Binding());\r\n            }\r\n            else\r\n            {\r\n                dataPoint.SetBinding(DataPoint.DependentValueProperty, DependentValueBinding);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Reveals data points using a storyboard.\r\n        /// </summary>\r\n        /// <param name=\"dataPoints\">The data points to change the state of.\r\n        /// </param>\r\n        /// <param name=\"dataPointCount\">The number of data points in the sequence.</param>\r\n        /// <param name=\"newState\">The state to change to.</param>\r\n        private void StaggeredStateChange(IEnumerable<DataPoint> dataPoints, int dataPointCount, DataPointState newState)\r\n        {\r\n            if (PlotArea == null || dataPointCount == 0)\r\n            {\r\n                return;\r\n            }\r\n\r\n            Storyboard stateChangeStoryBoard = new Storyboard();\r\n\r\n            dataPoints.ForEachWithIndex((dataPoint, count) =>\r\n            {\r\n                // Create an Animation\r\n                ObjectAnimationUsingKeyFrames objectAnimationUsingKeyFrames = new ObjectAnimationUsingKeyFrames();\r\n                Storyboard.SetTarget(objectAnimationUsingKeyFrames, dataPoint);\r\n                Storyboard.SetTargetProperty(objectAnimationUsingKeyFrames, new PropertyPath(\"State\"));\r\n\r\n                // Create a key frame\r\n                DiscreteObjectKeyFrame discreteObjectKeyFrame = new DiscreteObjectKeyFrame();\r\n                discreteObjectKeyFrame.Value = newState;\r\n\r\n                // Create the specified animation type\r\n                switch (AnimationSequence)\r\n                {\r\n                    case AnimationSequence.Simultaneous:\r\n                        discreteObjectKeyFrame.KeyTime = TimeSpan.Zero;\r\n                        break;\r\n                    case AnimationSequence.FirstToLast:\r\n                        discreteObjectKeyFrame.KeyTime = TimeSpan.FromMilliseconds(1000 * ((double)count / dataPointCount));\r\n                        break;\r\n                    case AnimationSequence.LastToFirst:\r\n                        discreteObjectKeyFrame.KeyTime = TimeSpan.FromMilliseconds(1000 * ((double)(dataPointCount - count - 1) / dataPointCount));\r\n                        break;\r\n                }\r\n\r\n                // Add the Animation to the Storyboard\r\n                objectAnimationUsingKeyFrames.KeyFrames.Add(discreteObjectKeyFrame);\r\n                stateChangeStoryBoard.Children.Add(objectAnimationUsingKeyFrames);\r\n            });\r\n            stateChangeStoryBoard.Duration = new Duration(AnimationSequence.Simultaneous == AnimationSequence ?\r\n                TimeSpan.FromTicks(1) :\r\n                TimeSpan.FromMilliseconds(1001));\r\n\r\n            _storyBoardQueue.Enqueue(\r\n                stateChangeStoryBoard,\r\n                (sender, args) =>\r\n                {\r\n                    stateChangeStoryBoard.Stop();\r\n                });\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles data point state property change.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The data point.</param>\r\n        /// <param name=\"args\">Information about the event.</param>\r\n        private void OnDataPointStateChanged(object sender, RoutedPropertyChangedEventArgs<DataPointState> args)\r\n        {\r\n            OnDataPointStateChanged(sender as DataPoint, args.OldValue, args.NewValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles data point state property change.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point.</param>\r\n        /// <param name=\"oldValue\">The old value.</param>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        protected virtual void OnDataPointStateChanged(DataPoint dataPoint, DataPointState oldValue, DataPointState newValue)\r\n        {\r\n            if (dataPoint.State == DataPointState.Hidden)\r\n            {\r\n                DetachEventHandlersFromDataPoint(dataPoint);\r\n                PlotArea.Children.Remove(dataPoint);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles data point actual dependent value property changes.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The data point.</param>\r\n        /// <param name=\"args\">Information about the event.</param>\r\n        private void OnDataPointActualDependentValueChanged(object sender, RoutedPropertyChangedEventArgs<IComparable> args)\r\n        {\r\n            OnDataPointActualDependentValueChanged(sender as DataPoint, args.OldValue, args.NewValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles data point actual dependent value property change.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point.</param>\r\n        /// <param name=\"oldValue\">The old value.</param>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        protected virtual void OnDataPointActualDependentValueChanged(DataPoint dataPoint, IComparable oldValue, IComparable newValue)\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles data point actual independent value property changes.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The data point.</param>\r\n        /// <param name=\"args\">Information about the event.</param>\r\n        private void OnDataPointActualIndependentValueChanged(object sender, RoutedPropertyChangedEventArgs<object> args)\r\n        {\r\n            OnDataPointActualIndependentValueChanged(sender as DataPoint, args.OldValue, args.NewValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles data point actual independent value property change.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point.</param>\r\n        /// <param name=\"oldValue\">The old value.</param>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        protected virtual void OnDataPointActualIndependentValueChanged(DataPoint dataPoint, object oldValue, object newValue)\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles data point dependent value property changes.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The data point.</param>\r\n        /// <param name=\"args\">Information about the event.</param>\r\n        private void OnDataPointDependentValueChanged(object sender, RoutedPropertyChangedEventArgs<IComparable> args)\r\n        {\r\n            OnDataPointDependentValueChanged(sender as DataPoint, args.OldValue, args.NewValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles data point dependent value property change.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point.</param>\r\n        /// <param name=\"oldValue\">The old value.</param>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        protected virtual void OnDataPointDependentValueChanged(DataPoint dataPoint, IComparable oldValue, IComparable newValue)\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles data point independent value property changes.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The data point.</param>\r\n        /// <param name=\"args\">Information about the event.</param>\r\n        private void OnDataPointIndependentValueChanged(object sender, RoutedPropertyChangedEventArgs<object> args)\r\n        {\r\n            OnDataPointIndependentValueChanged(sender as DataPoint, args.OldValue, args.NewValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles data point independent value property change.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point.</param>\r\n        /// <param name=\"oldValue\">The old value.</param>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        protected virtual void OnDataPointIndependentValueChanged(DataPoint dataPoint, object oldValue, object newValue)\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a ResourceDictionaryEnumerator that returns ResourceDictionaries with a\r\n        /// DataPointStyle having the specified TargetType or with a TargetType that is an\r\n        /// ancestor of the specified type.\r\n        /// </summary>\r\n        /// <param name=\"dispenser\">The ResourceDictionaryDispenser.</param>\r\n        /// <param name=\"targetType\">The TargetType.</param>\r\n        /// <param name=\"takeAncestors\">A value indicating whether to accept ancestors of the TargetType.</param>\r\n        /// <returns>A ResourceDictionary enumerator.</returns>\r\n        internal static IEnumerator<ResourceDictionary> GetResourceDictionaryWithTargetType(IResourceDictionaryDispenser dispenser, Type targetType, bool takeAncestors)\r\n        {\r\n            return dispenser.GetResourceDictionariesWhere(dictionary =>\r\n            {\r\n                Style style = dictionary[DataPointStyleName] as Style;\r\n                if (null != style)\r\n                {\r\n                    return (null != style.TargetType) &&\r\n                           ((targetType == style.TargetType) || (takeAncestors && style.TargetType.IsAssignableFrom(targetType)));\r\n                }\r\n                return false;\r\n            });\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/DataPointSeriesWithAxes.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Controls.DataVisualization;\r\nusing System.Windows.Controls.DataVisualization.Collections;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Represents a dynamic series that uses axes to display data points.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public abstract class DataPointSeriesWithAxes : DataPointSeries, IDataProvider, IRangeProvider, IAxisListener, IValueMarginProvider\r\n    {\r\n        /// <summary>\r\n        /// Gets or sets the data points by dependent value.\r\n        /// </summary>\r\n        private OrderedMultipleDictionary<IComparable, DataPoint> DataPointsByActualDependentValue { get; set; }\r\n\r\n        /// <summary>\r\n        /// Creates the correct range axis based on the data.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value to evaluate to determine which type of\r\n        /// axis to create.</param>\r\n        /// <returns>The range axis appropriate that can plot the provided\r\n        /// value.</returns>\r\n        protected static IRangeAxis CreateRangeAxisFromData(object value)\r\n        {\r\n            double doubleValue;\r\n            DateTime dateTime;\r\n            if (ValueHelper.TryConvert(value, out doubleValue))\r\n            {\r\n                return new LinearAxis();\r\n            }\r\n            else if (ValueHelper.TryConvert(value, out dateTime))\r\n            {\r\n                return new DateTimeAxis();\r\n            }\r\n            else\r\n            {\r\n                return null;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Retrieves the value for a given access from a data point.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point to retrieve the value from.</param>\r\n        /// <param name=\"axis\">The axis to retrieve the value for.</param>\r\n        /// <returns>A function that returns a value appropriate for the axis\r\n        /// when provided a DataPoint.</returns>\r\n        protected virtual object GetActualDataPointAxisValue(DataPoint dataPoint, IAxis axis)\r\n        {\r\n            if (axis == InternalActualIndependentAxis)\r\n            {\r\n                return dataPoint.ActualIndependentValue;\r\n            }\r\n            else if (axis == InternalActualDependentAxis)\r\n            {\r\n                return dataPoint.ActualDependentValue;\r\n            }\r\n            return null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the actual dependent axis.\r\n        /// </summary>\r\n        protected IAxis InternalActualDependentAxis { get; set; }\r\n\r\n        #region public Axis InternalDependentAxis\r\n\r\n        /// <summary>\r\n        /// Stores the internal dependent axis.\r\n        /// </summary>\r\n        private IAxis _internalDependentAxis;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the value of the internal dependent axis.\r\n        /// </summary>\r\n        protected IAxis InternalDependentAxis\r\n        {\r\n            get { return _internalDependentAxis; }\r\n            set \r\n            {\r\n                if (_internalDependentAxis != value)\r\n                {\r\n                    IAxis oldValue = _internalDependentAxis;\r\n                    _internalDependentAxis = value;\r\n                    OnInternalDependentAxisPropertyChanged(oldValue, value);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// DependentAxisProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        protected virtual void OnInternalDependentAxisPropertyChanged(IAxis oldValue, IAxis newValue)\r\n        {\r\n            if (newValue != null \r\n                && InternalActualDependentAxis != null \r\n                && InternalActualDependentAxis != newValue \r\n                && InternalActualDependentAxis.RegisteredListeners.Contains(this))\r\n            {\r\n                InternalActualDependentAxis.RegisteredListeners.Remove(this);\r\n                InternalActualDependentAxis = null;\r\n                GetAxes();\r\n            }\r\n        }\r\n        #endregion public Axis InternalDependentAxis\r\n\r\n        /// <summary>\r\n        /// Gets or sets the actual independent axis value.\r\n        /// </summary>\r\n        protected IAxis InternalActualIndependentAxis { get; set; }\r\n\r\n        #region protected Axis InternalIndependentAxis\r\n\r\n        /// <summary>\r\n        /// The internal independent axis.\r\n        /// </summary>\r\n        private IAxis _internalIndependentAxis;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the value of the internal independent axis.\r\n        /// </summary>\r\n        protected IAxis InternalIndependentAxis\r\n        {\r\n            get { return _internalIndependentAxis; }\r\n            set \r\n            {\r\n                if (value != _internalIndependentAxis)\r\n                {\r\n                    IAxis oldValue = _internalIndependentAxis;\r\n                    _internalIndependentAxis = value;\r\n                    OnInternalIndependentAxisPropertyChanged(oldValue, value);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// IndependentAxisProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        protected virtual void OnInternalIndependentAxisPropertyChanged(IAxis oldValue, IAxis newValue)\r\n        {\r\n            if (newValue != null\r\n                && InternalActualIndependentAxis != null\r\n                && InternalActualIndependentAxis != newValue\r\n                && InternalActualIndependentAxis.RegisteredListeners.Contains(this))\r\n            {\r\n                InternalActualIndependentAxis.RegisteredListeners.Remove(this);\r\n                InternalActualIndependentAxis = null;\r\n                GetAxes();\r\n            }\r\n        }\r\n        #endregion protected Axis IndependentAxis\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the DataPointSeriesWithAxes class.\r\n        /// </summary>\r\n        protected DataPointSeriesWithAxes()\r\n        {\r\n            this.DataPointsByActualDependentValue =\r\n                new OrderedMultipleDictionary<IComparable, DataPoint>(\r\n                    false,\r\n                    (left, right) => \r\n                        left.CompareTo(right),\r\n                    (leftDataPoint, rightDataPoint) => \r\n                        RuntimeHelpers.GetHashCode(leftDataPoint).CompareTo(RuntimeHelpers.GetHashCode(rightDataPoint)));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Update the axes when the specified data point's ActualDependentValue property changes.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point.</param>\r\n        /// <param name=\"oldValue\">The old value.</param>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        protected override void OnDataPointActualDependentValueChanged(DataPoint dataPoint, IComparable oldValue, IComparable newValue)\r\n        {\r\n            if (oldValue != null)\r\n            {\r\n                bool removed = DataPointsByActualDependentValue.Remove(oldValue, dataPoint);\r\n                if (removed)\r\n                {\r\n                    DataPointsByActualDependentValue.Add(newValue, dataPoint);\r\n                }\r\n            }\r\n\r\n            UpdateActualDependentAxis();\r\n            UpdateDataPoint(dataPoint);\r\n            base.OnDataPointActualDependentValueChanged(dataPoint, oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Update the axes when the specified data point's DependentValue property changes.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point.</param>\r\n        /// <param name=\"oldValue\">The old value.</param>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        protected override void OnDataPointDependentValueChanged(DataPoint dataPoint, IComparable oldValue, IComparable newValue)\r\n        {\r\n            if ((null != InternalActualDependentAxis))\r\n            {\r\n                dataPoint.BeginAnimation(DataPoint.ActualDependentValueProperty, \"ActualDependentValue\", newValue, this.TransitionDuration, this.TransitionEasingFunction);\r\n            }\r\n            else\r\n            {\r\n                dataPoint.ActualDependentValue = newValue;\r\n            }\r\n            base.OnDataPointDependentValueChanged(dataPoint, oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Update axes when the specified data point's effective dependent value changes.\r\n        /// </summary>\r\n        private void UpdateActualDependentAxis()\r\n        {\r\n            if (InternalActualDependentAxis != null)\r\n            {\r\n                IDataConsumer dataConsumer = InternalActualDependentAxis as IDataConsumer;\r\n                if (dataConsumer != null)\r\n                {\r\n                    IDataProvider categoryInformationProvider = (IDataProvider)this;\r\n                    dataConsumer.DataChanged(categoryInformationProvider, categoryInformationProvider.GetData(dataConsumer));\r\n                }\r\n\r\n                IRangeConsumer rangeAxis = InternalActualDependentAxis as IRangeConsumer;\r\n                if (rangeAxis != null)\r\n                {\r\n                    IRangeProvider rangeInformationProvider = (IRangeProvider)this;\r\n                    rangeAxis.RangeChanged(rangeInformationProvider, rangeInformationProvider.GetRange(rangeAxis));\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Update axes when the specified data point's actual independent value changes.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point.</param>\r\n        /// <param name=\"oldValue\">The old value.</param>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        protected override void OnDataPointActualIndependentValueChanged(DataPoint dataPoint, object oldValue, object newValue)\r\n        {\r\n            UpdateActualIndependentAxis();\r\n            UpdateDataPoint(dataPoint);\r\n            base.OnDataPointActualIndependentValueChanged(dataPoint, oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Update axes when the specified data point's independent value changes.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point.</param>\r\n        /// <param name=\"oldValue\">The old value.</param>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        protected override void OnDataPointIndependentValueChanged(DataPoint dataPoint, object oldValue, object newValue)\r\n        {\r\n            if ((null != InternalActualIndependentAxis) && (InternalActualIndependentAxis is IRangeAxis))\r\n            {\r\n                dataPoint.BeginAnimation(DataPoint.ActualIndependentValueProperty, \"ActualIndependentValue\", newValue, this.TransitionDuration, this.TransitionEasingFunction);\r\n            }\r\n            else\r\n            {\r\n                dataPoint.ActualIndependentValue = newValue;\r\n            }\r\n            base.OnDataPointIndependentValueChanged(dataPoint, oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Update axes when a data point's effective independent value changes.\r\n        /// </summary>\r\n        private void UpdateActualIndependentAxis()\r\n        {\r\n            if (InternalActualIndependentAxis != null)\r\n            {\r\n                ICategoryAxis categoryAxis = InternalActualIndependentAxis as ICategoryAxis;\r\n                if (categoryAxis != null)\r\n                {\r\n                    IDataProvider categoryInformationProvider = (IDataProvider)this;\r\n                    categoryAxis.DataChanged(categoryInformationProvider, categoryInformationProvider.GetData(categoryAxis));\r\n                }\r\n                IRangeConsumer rangeAxis = InternalActualIndependentAxis as IRangeConsumer;\r\n                if (rangeAxis != null)\r\n                {\r\n                    IRangeProvider rangeInformationProvider = (IRangeProvider)this;\r\n                    rangeAxis.RangeChanged(rangeInformationProvider, rangeInformationProvider.GetRange(rangeAxis));\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called after data points have been loaded from the items source.\r\n        /// </summary>\r\n        /// <param name=\"newDataPoints\">New active data points.</param>\r\n        /// <param name=\"oldDataPoints\">Old inactive data points.</param>\r\n        protected override void OnDataPointsChanged(IList<DataPoint> newDataPoints, IList<DataPoint> oldDataPoints)\r\n        {\r\n            foreach (DataPoint dataPoint in newDataPoints)\r\n            {\r\n                DataPointsByActualDependentValue.Add(dataPoint.ActualDependentValue, dataPoint);\r\n            }\r\n\r\n            foreach (DataPoint dataPoint in oldDataPoints)\r\n            {\r\n                DataPointsByActualDependentValue.Remove(dataPoint.ActualDependentValue, dataPoint);\r\n            }\r\n\r\n            GetAxes();\r\n\r\n            if (InternalActualDependentAxis != null && InternalActualIndependentAxis != null)\r\n            {\r\n                Action action = () =>\r\n                    {\r\n                        AxesInvalidated = false;\r\n                        UpdatingAllAxes = true;\r\n                        try\r\n                        {\r\n                            UpdateActualIndependentAxis();\r\n                            UpdateActualDependentAxis();\r\n                        }\r\n                        finally\r\n                        {\r\n                            UpdatingAllAxes = false;\r\n                        }\r\n\r\n                        if (AxesInvalidated)\r\n                        {\r\n                            UpdateDataPoints(ActiveDataPoints);\r\n                        }\r\n                        else\r\n                        {\r\n                            UpdateDataPoints(newDataPoints);\r\n                        }\r\n\r\n                        AxesInvalidated = false;\r\n                    };\r\n\r\n                InvokeOnLayoutUpdated(action);\r\n            }\r\n\r\n            base.OnDataPointsChanged(newDataPoints, oldDataPoints);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether to the axes are being \r\n        /// updated.\r\n        /// </summary>\r\n        private bool UpdatingAllAxes { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether the axes have been \r\n        /// invalidated.\r\n        /// </summary>\r\n        private bool AxesInvalidated { get; set; }\r\n\r\n        /// <summary>\r\n        /// Only updates all data points if series has axes.\r\n        /// </summary>\r\n        /// <param name=\"dataPoints\">A sequence of data points to update.\r\n        /// </param>\r\n        protected override void UpdateDataPoints(IEnumerable<DataPoint> dataPoints)\r\n        {\r\n            if (InternalActualIndependentAxis != null && InternalActualDependentAxis != null)\r\n            {\r\n                base.UpdateDataPoints(dataPoints);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Method called to get series to acquire the axes it needs.  Acquires\r\n        /// no axes by default.\r\n        /// </summary>\r\n        private void GetAxes()\r\n        {\r\n            if (SeriesHost != null)\r\n            {\r\n                DataPoint firstDataPoint = ActiveDataPoints.FirstOrDefault();\r\n                if (firstDataPoint == null)\r\n                {\r\n                    return;\r\n                }\r\n\r\n                GetAxes(firstDataPoint);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Method called to get series to acquire the axes it needs.  Acquires\r\n        /// no axes by default.\r\n        /// </summary>\r\n        /// <param name=\"firstDataPoint\">The first data point.</param>\r\n        protected abstract void GetAxes(DataPoint firstDataPoint);\r\n\r\n        /// <summary>\r\n        /// Method called to get the axes that the series needs.\r\n        /// </summary>\r\n        /// <param name=\"firstDataPoint\">The first data point.</param>\r\n        /// <param name=\"independentAxisPredicate\">A predicate that returns\r\n        /// a value indicating whether an axis is an acceptable candidate for\r\n        /// the series independent axis.</param>\r\n        /// <param name=\"independentAxisFactory\">A function that creates an\r\n        /// acceptable independent axis.</param>\r\n        /// <param name=\"dependentAxisPredicate\">A predicate that returns\r\n        /// a value indicating whether an axis is an acceptable candidate for\r\n        /// the series dependent axis.</param>\r\n        /// <param name=\"dependentAxisFactory\">A function that creates an\r\n        /// acceptable dependent axis.</param>\r\n        protected virtual void GetAxes(DataPoint firstDataPoint, Func<IAxis, bool> independentAxisPredicate, Func<IAxis> independentAxisFactory, Func<IAxis, bool> dependentAxisPredicate, Func<IAxis> dependentAxisFactory)\r\n        {\r\n            Func<IAxis, bool> actualIndependentAxisPredicate = (axis) => independentAxisPredicate(axis) && axis.CanPlot(firstDataPoint.IndependentValue);\r\n            IAxis workingIndependentAxis = null;\r\n            if (this.InternalActualIndependentAxis == null)\r\n            {\r\n                if (this.InternalIndependentAxis != null)\r\n                {\r\n                    if (actualIndependentAxisPredicate(this.InternalIndependentAxis))\r\n                    {\r\n                        workingIndependentAxis = this.InternalIndependentAxis;\r\n                    }\r\n                    else\r\n                    {\r\n                        throw new InvalidOperationException(Properties.Resources.DataPointSeriesWithAxes_GetAxes_AssignedIndependentAxisCannotBeUsed);\r\n                    }\r\n                }\r\n\r\n                if (workingIndependentAxis == null)\r\n                {\r\n                    workingIndependentAxis = this.SeriesHost.Axes.FirstOrDefault(actualIndependentAxisPredicate);\r\n                }\r\n\r\n                if (workingIndependentAxis == null)\r\n                {\r\n                    workingIndependentAxis = independentAxisFactory();\r\n                }\r\n\r\n                this.InternalActualIndependentAxis = workingIndependentAxis;\r\n\r\n                if (!workingIndependentAxis.RegisteredListeners.Contains(this))\r\n                {\r\n                    workingIndependentAxis.RegisteredListeners.Add(this);\r\n                }\r\n                if (!this.SeriesHost.Axes.Contains(workingIndependentAxis))\r\n                {\r\n                    this.SeriesHost.Axes.Add(workingIndependentAxis);\r\n                }\r\n            }\r\n\r\n            Func<IAxis, bool> actualDependentAxisPredicate = (axis) => dependentAxisPredicate(axis) && axis.CanPlot(firstDataPoint.DependentValue);\r\n            IAxis workingDependentAxis = null;\r\n            if (this.InternalActualDependentAxis == null)\r\n            {\r\n                if (this.InternalDependentAxis != null)\r\n                {\r\n                    if (actualDependentAxisPredicate(this.InternalDependentAxis))\r\n                    {\r\n                        workingDependentAxis = this.InternalDependentAxis;\r\n                    }\r\n                    else\r\n                    {\r\n                        throw new InvalidOperationException(Properties.Resources.DataPointSeriesWithAxes_GetAxes_AssignedDependentAxisCannotBeUsed);\r\n                    }\r\n                }\r\n\r\n                if (workingDependentAxis == null)\r\n                {\r\n                    workingDependentAxis = InternalActualIndependentAxis.DependentAxes.Concat(this.SeriesHost.Axes).FirstOrDefault(actualDependentAxisPredicate);\r\n                }\r\n\r\n                if (workingDependentAxis == null)\r\n                {\r\n                    workingDependentAxis = dependentAxisFactory();\r\n                }\r\n\r\n                this.InternalActualDependentAxis = workingDependentAxis;\r\n\r\n                if (!workingDependentAxis.RegisteredListeners.Contains(this))\r\n                {\r\n                    workingDependentAxis.RegisteredListeners.Add(this);\r\n                }\r\n\r\n                // Only add axis to the axes collection of the series host if \r\n                // it is not a dependent axis belonging to the acquired \r\n                // independent axis.\r\n                if (!this.SeriesHost.Axes.Contains(workingDependentAxis) && !InternalActualIndependentAxis.DependentAxes.Contains(workingDependentAxis))\r\n                {\r\n                    this.SeriesHost.Axes.Add(workingDependentAxis);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates data points when the axis is invalidated.\r\n        /// </summary>\r\n        /// <param name=\"axis\">The axis that was invalidated.</param>\r\n        void IAxisListener.AxisInvalidated(IAxis axis)\r\n        {\r\n            if (InternalActualDependentAxis != null && InternalActualIndependentAxis != null && PlotArea != null)\r\n            {\r\n                if (!UpdatingAllAxes)\r\n                {\r\n                    UpdateDataPoints(ActiveDataPoints);\r\n                }\r\n                else\r\n                {\r\n                    AxesInvalidated = true;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the actual range of data for a given axis.\r\n        /// </summary>\r\n        /// <param name=\"consumer\">The axis to retrieve the range for.</param>\r\n        /// <returns>The actual range of data.</returns>\r\n        protected virtual Range<IComparable> GetRange(IRangeConsumer consumer)\r\n        {\r\n            if (consumer == null)\r\n            {\r\n                throw new ArgumentNullException(\"consumer\");\r\n            }\r\n\r\n            if (consumer == InternalActualDependentAxis)\r\n            {\r\n                if (this.DataPointsByActualDependentValue.Count > 0)\r\n                {\r\n                    return this.DataPointsByActualDependentValue.GetKeyRange();\r\n                }\r\n            }\r\n\r\n            IAxis axis = consumer as IAxis;\r\n            return (axis != null)\r\n                ? ActiveDataPoints.Select(dataPoint => (IComparable)GetActualDataPointAxisValue(dataPoint, axis)).GetRange() \r\n                : new Range<IComparable>();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the value margins for a given axis.\r\n        /// </summary>\r\n        /// <param name=\"consumer\">The axis to retrieve the value margins for.\r\n        /// </param>\r\n        /// <returns>A sequence of value margins.</returns>\r\n        protected virtual IEnumerable<ValueMargin> GetValueMargins(IValueMarginConsumer consumer)\r\n        {\r\n            IAxis axis = consumer as IAxis;\r\n            if (axis != null && ActiveDataPoints.Any())\r\n            {\r\n                Func<DataPoint, IComparable> selector = null;\r\n                DataPoint minimumPoint = null;\r\n                DataPoint maximumPoint = null;\r\n                double margin = 0.0;\r\n                if (axis == InternalActualIndependentAxis)\r\n                {\r\n                    selector = (dataPoint) => (IComparable)dataPoint.ActualIndependentValue;\r\n\r\n                    minimumPoint = ActiveDataPoints.MinOrNull(selector);\r\n                    maximumPoint = ActiveDataPoints.MaxOrNull(selector);\r\n                    margin = minimumPoint.GetActualMargin(this.InternalActualIndependentAxis);\r\n                }\r\n                else if (axis == InternalActualDependentAxis)\r\n                {\r\n                    selector = (dataPoint) => (IComparable)dataPoint.ActualDependentValue;\r\n\r\n                    Tuple<DataPoint, DataPoint> largestAndSmallestValues = this.DataPointsByActualDependentValue.GetLargestAndSmallestValues();\r\n                    minimumPoint = largestAndSmallestValues.Item1;\r\n                    maximumPoint = largestAndSmallestValues.Item2;\r\n                    margin = minimumPoint.GetActualMargin(this.InternalActualDependentAxis);\r\n                }\r\n                \r\n                yield return new ValueMargin(selector(minimumPoint), margin, margin);\r\n                yield return new ValueMargin(selector(maximumPoint), margin, margin);\r\n            }\r\n            else\r\n            {\r\n                yield break;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns data to a data consumer.\r\n        /// </summary>\r\n        /// <param name=\"dataConsumer\">The data consumer requesting the data.\r\n        /// </param>\r\n        /// <returns>The data for a given data consumer.</returns>\r\n        IEnumerable<object> IDataProvider.GetData(IDataConsumer dataConsumer)\r\n        {\r\n            IAxis axis = (IAxis)dataConsumer;\r\n            if (axis == null)\r\n            {\r\n                throw new ArgumentNullException(\"dataConsumer\");\r\n            }\r\n\r\n            Func<DataPoint, object> selector = null;\r\n            if (axis == InternalActualIndependentAxis)\r\n            {\r\n                if (IndependentValueBinding == null)\r\n                {\r\n                    return Enumerable.Range(1, ActiveDataPointCount).CastWrapper<object>();\r\n                }\r\n                selector = (dataPoint) => dataPoint.ActualIndependentValue ?? dataPoint.ActualDependentValue;\r\n            }\r\n            else if (axis == InternalActualDependentAxis)\r\n            {\r\n                selector = (dataPoint) => dataPoint.ActualDependentValue;\r\n            }\r\n\r\n            return ActiveDataPoints.Select(selector).Distinct();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the value of the SeriesHost property changes.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">The value to be replaced.</param>\r\n        /// <param name=\"newValue\">The new series host value.</param>\r\n        protected override void OnSeriesHostPropertyChanged(ISeriesHost oldValue, ISeriesHost newValue)\r\n        {\r\n            if (oldValue != null)\r\n            {\r\n                if (InternalActualIndependentAxis != null)\r\n                {\r\n                    InternalActualIndependentAxis.RegisteredListeners.Remove(this);\r\n                    InternalActualIndependentAxis = null;\r\n                }\r\n                if (InternalActualDependentAxis != null)\r\n                {\r\n                    InternalActualDependentAxis.RegisteredListeners.Remove(this);\r\n                    InternalActualDependentAxis = null;\r\n                }\r\n            }\r\n\r\n            base.OnSeriesHostPropertyChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the data range.\r\n        /// </summary>\r\n        /// <param name=\"rangeConsumer\">The consumer requesting the range.</param>\r\n        /// <returns>The data range.</returns>\r\n        Range<IComparable> IRangeProvider.GetRange(IRangeConsumer rangeConsumer)\r\n        {\r\n            return GetRange(rangeConsumer);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the value margins for a given axis.\r\n        /// </summary>\r\n        /// <param name=\"axis\">The axis to retrieve the value margins for.\r\n        /// </param>\r\n        /// <returns>A sequence of value margins.</returns>\r\n        IEnumerable<ValueMargin> IValueMarginProvider.GetValueMargins(IValueMarginConsumer axis)\r\n        {\r\n            return GetValueMargins(axis);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/DataPointSingleSeriesWithAxes.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Globalization;\r\nusing System.Windows.Data;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// A dynamic series with axes and only one legend item and style for all \r\n    /// data points.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public abstract class DataPointSingleSeriesWithAxes : DataPointSeriesWithAxes, IRequireGlobalSeriesIndex\r\n    {\r\n        /// <summary>\r\n        /// Name of the ActualDataPointStyle property.\r\n        /// </summary>\r\n        protected const string ActualDataPointStyleName = \"ActualDataPointStyle\";\r\n\r\n        /// <summary>\r\n        /// Gets the single legend item associated with the series.\r\n        /// </summary>\r\n        protected LegendItem LegendItem\r\n        {\r\n            get\r\n            {\r\n                if (null == _legendItem)\r\n                {\r\n                    _legendItem = CreateLegendItem(this);\r\n                    LegendItems.Add(_legendItem);\r\n                }\r\n                return _legendItem;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Stores the LegendItem for the series.\r\n        /// </summary>\r\n        private LegendItem _legendItem;\r\n\r\n        /// <summary>\r\n        /// Gets the Palette-dispensed ResourceDictionary for the Series.\r\n        /// </summary>\r\n        protected ResourceDictionary PaletteResources { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether a custom title is in use.\r\n        /// </summary>\r\n        private bool CustomTitleInUse { get; set; }\r\n\r\n        /// <summary>\r\n        /// DataPointStyleProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        protected override void OnDataPointStylePropertyChanged(Style oldValue, Style newValue)\r\n        {\r\n            // Propagate change\r\n            ActualDataPointStyle = newValue;\r\n            base.OnDataPointStylePropertyChanged(oldValue, newValue);\r\n        }\r\n\r\n        #region protected Style ActualDataPointStyle\r\n        /// <summary>\r\n        /// Gets or sets the actual style used for the data points.\r\n        /// </summary>\r\n        protected Style ActualDataPointStyle\r\n        {\r\n            get { return GetValue(ActualDataPointStyleProperty) as Style; }\r\n            set { SetValue(ActualDataPointStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ActualDataPointStyle dependency property.\r\n        /// </summary>\r\n        protected static readonly DependencyProperty ActualDataPointStyleProperty =\r\n            DependencyProperty.Register(\r\n                ActualDataPointStyleName,\r\n                typeof(Style),\r\n                typeof(DataPointSingleSeriesWithAxes),\r\n                null);\r\n        #endregion protected Style ActualDataPointStyle\r\n\r\n        #region protected Style ActualLegendItemStyle\r\n        /// <summary>\r\n        /// Gets or sets the actual style used for the legend item.\r\n        /// </summary>\r\n        protected Style ActualLegendItemStyle\r\n        {\r\n            get { return GetValue(ActualLegendItemStyleProperty) as Style; }\r\n            set { SetValue(ActualLegendItemStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ActualLegendItemStyle dependency property.\r\n        /// </summary>\r\n        protected static readonly DependencyProperty ActualLegendItemStyleProperty =\r\n            DependencyProperty.Register(\r\n                ActualLegendItemStyleName,\r\n                typeof(Style),\r\n                typeof(DataPointSeries),\r\n                null);\r\n        #endregion protected Style ActualLegendItemStyle\r\n\r\n        /// <summary>\r\n        /// Called when the value of the LegendItemStyle property changes.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        protected override void OnLegendItemStylePropertyChanged(Style oldValue, Style newValue)\r\n        {\r\n            // Propagate change\r\n            ActualLegendItemStyle = newValue;\r\n            base.OnLegendItemStylePropertyChanged(oldValue, newValue);\r\n        }\r\n\r\n        #region public int? GlobalSeriesIndex\r\n        /// <summary>\r\n        /// Gets the index of the series in the Parent's series collection.\r\n        /// </summary>\r\n        public int? GlobalSeriesIndex\r\n        {\r\n            get { return (int?)GetValue(GlobalSeriesIndexProperty); }\r\n            private set { SetValue(GlobalSeriesIndexProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the GlobalSeriesIndex dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty GlobalSeriesIndexProperty =\r\n            DependencyProperty.Register(\r\n                \"GlobalSeriesIndex\",\r\n                typeof(int?),\r\n                typeof(Series),\r\n                new PropertyMetadata(new int?(), OnGlobalSeriesIndexPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// GlobalSeriesIndexProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">Series that changed its Index.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnGlobalSeriesIndexPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DataPointSingleSeriesWithAxes source = (DataPointSingleSeriesWithAxes)d;\r\n            int? oldValue = (int?)e.OldValue;\r\n            int? newValue = (int?)e.NewValue;\r\n            source.OnGlobalSeriesIndexPropertyChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// GlobalSeriesIndexProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA2233:OperationsShouldNotOverflow\", MessageId = \"newValue+1\", Justification = \"Impractical to add as many Series as it would take to overflow.\")]\r\n        protected virtual void OnGlobalSeriesIndexPropertyChanged(int? oldValue, int? newValue)\r\n        {\r\n            if (!CustomTitleInUse && (null == GetBindingExpression(TitleProperty)))\r\n            {\r\n                Title = newValue.HasValue ? string.Format(CultureInfo.CurrentCulture, Properties.Resources.Series_OnGlobalSeriesIndexPropertyChanged_UntitledSeriesFormatString, newValue.Value + 1) : null;\r\n                // Setting Title will set CustomTitleInUse; reset it now\r\n                CustomTitleInUse = false;\r\n            }\r\n        }\r\n        #endregion public int? GlobalSeriesIndex\r\n\r\n        /// <summary>\r\n        /// Called when the Title property changes.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value of the Title property.</param>\r\n        /// <param name=\"newValue\">New value of the Title property.</param>\r\n        protected override void OnTitleChanged(object oldValue, object newValue)\r\n        {\r\n            // Title property is being set, so a custom Title is in use\r\n            CustomTitleInUse = true;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the DataPointSingleSeriesWithAxes class.\r\n        /// </summary>\r\n        protected DataPointSingleSeriesWithAxes()\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the custom ResourceDictionary to use for necessary resources.\r\n        /// </summary>\r\n        /// <returns>\r\n        /// ResourceDictionary to use for necessary resources.\r\n        /// </returns>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1024:UsePropertiesWhereAppropriate\", Justification = \"This property does more work than get functions typically do.\")]\r\n        protected abstract IEnumerator<ResourceDictionary> GetResourceDictionaryEnumeratorFromHost();\r\n\r\n        /// <summary>\r\n        /// Insert grid containing data point used for legend item into the \r\n        /// plot area.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">The old plot area.</param>\r\n        /// <param name=\"newValue\">The new plot area.</param>\r\n        protected override void OnPlotAreaChanged(Panel oldValue, Panel newValue)\r\n        {\r\n            if (newValue != null)\r\n            {\r\n                CreateLegendItemDataPoint();\r\n            }\r\n            base.OnPlotAreaChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// When the series host property is set retrieves a style to use for all the\r\n        /// data points.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">The old series host value.</param>\r\n        /// <param name=\"newValue\">The new series host value.</param>\r\n        protected override void OnSeriesHostPropertyChanged(ISeriesHost oldValue, ISeriesHost newValue)\r\n        {\r\n            base.OnSeriesHostPropertyChanged(oldValue, newValue);\r\n\r\n            if (oldValue != null)\r\n            {\r\n                oldValue.ResourceDictionariesChanged -= new EventHandler(SeriesHostResourceDictionariesChanged);\r\n            }\r\n\r\n            if (newValue != null)\r\n            {\r\n                newValue.ResourceDictionariesChanged += new EventHandler(SeriesHostResourceDictionariesChanged);                \r\n            }\r\n\r\n            DispensedResourcesChanging();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates the LegendItem Control if conditions are right.\r\n        /// </summary>\r\n        private void CreateLegendItemDataPoint()\r\n        {\r\n            DataPoint dataPoint = CreateDataPoint();\r\n            if (null != PlotArea)\r\n            {\r\n                // Bounce into the visual tree to get default Style applied\r\n                PlotArea.Children.Add(dataPoint);\r\n                PlotArea.Children.Remove(dataPoint);\r\n            }\r\n            dataPoint.SetBinding(DataPoint.StyleProperty, new Binding(ActualDataPointStyleName) { Source = this });\r\n            // Start DataContext null to avoid Binding warnings in the output window\r\n            LegendItem.DataContext = null;\r\n            if (null == LegendItem.Parent)\r\n            {\r\n                LegendItem.Loaded += delegate\r\n                {\r\n                    // Wait for Loaded to set the DataPoint\r\n                    LegendItem.DataContext = dataPoint;\r\n                };\r\n            }\r\n            else\r\n            {\r\n                LegendItem.DataContext = dataPoint;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called after data points have been loaded from the items source.\r\n        /// </summary>\r\n        /// <param name=\"newDataPoints\">New active data points.</param>\r\n        /// <param name=\"oldDataPoints\">Old inactive data points.</param>\r\n        protected override void OnDataPointsChanged(IList<DataPoint> newDataPoints, IList<DataPoint> oldDataPoints)\r\n        {\r\n            base.OnDataPointsChanged(newDataPoints, oldDataPoints);\r\n\r\n            if (null != PlotArea)\r\n            {\r\n                // Create the Control for use by LegendItem\r\n                // Add it to the visual tree so that its style will be applied\r\n                if (null != LegendItem.DataContext)\r\n                {\r\n                    PlotArea.Children.Remove(LegendItem.DataContext as UIElement);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Sets the style of the data point to the single style used for all\r\n        /// data points.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point to apply the style to.\r\n        /// </param>\r\n        /// <param name=\"dataContext\">The object associated with the data point.\r\n        /// </param>\r\n        protected override void PrepareDataPoint(DataPoint dataPoint, object dataContext)\r\n        {\r\n            dataPoint.SetBinding(DataPoint.StyleProperty, new Binding(ActualDataPointStyleName) { Source = this });\r\n            base.PrepareDataPoint(dataPoint, dataContext);\r\n        }\r\n\r\n        /// <summary>\r\n        /// This method updates the global series index property.\r\n        /// </summary>\r\n        /// <param name=\"globalIndex\">The global index of the series.</param>\r\n        public void GlobalSeriesIndexChanged(int? globalIndex)\r\n        {\r\n            this.GlobalSeriesIndex = globalIndex;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the SeriesHost's ResourceDictionariesChanged event.\r\n        /// </summary>\r\n        /// <param name=\"sender\">ISeriesHost instance.</param>\r\n        /// <param name=\"e\">Event args.</param>\r\n        private void SeriesHostResourceDictionariesChanged(object sender, EventArgs e)\r\n        {\r\n            DispensedResourcesChanging();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Processes the change of the DispensedResources property.\r\n        /// </summary>\r\n        private void DispensedResourcesChanging()\r\n        {\r\n            if (null != PaletteResources)\r\n            {\r\n                Resources.MergedDictionaries.Remove(PaletteResources);\r\n                PaletteResources = null;\r\n            }\r\n            if (SeriesHost != null)\r\n            {\r\n                using (IEnumerator<ResourceDictionary> enumerator = GetResourceDictionaryEnumeratorFromHost())\r\n                {\r\n                    if (enumerator.MoveNext())\r\n                    {\r\n                        PaletteResources = enumerator.Current;\r\n                        Resources.MergedDictionaries.Add(PaletteResources);\r\n                    }\r\n                }\r\n            }\r\n            CreateLegendItemDataPoint();\r\n            ActualDataPointStyle = DataPointStyle ?? (Resources[DataPointStyleName] as Style);\r\n            ActualLegendItemStyle = LegendItemStyle ?? (Resources[LegendItemStyleName] as Style);\r\n            Refresh();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/DefinitionSeries.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Collections.Specialized;\r\nusing System.Diagnostics;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Windows.Controls.DataVisualization.Charting.Primitives;\r\nusing System.Windows.Controls.Primitives;\r\nusing System.Windows.Data;\r\nusing System.Windows.Markup;\r\nusing System.Windows.Media;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Implements a series that is defined by one or more instances of the DefinitionSeries class.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    [ContentProperty(\"SeriesDefinitions\")]\r\n    [TemplatePart(Name = SeriesAreaName, Type = typeof(Grid))]\r\n    [TemplatePart(Name = ItemContainerName, Type = typeof(DelegatingListBox))]\r\n    [SuppressMessage(\"Microsoft.Maintainability\", \"CA1506:AvoidExcessiveClassCoupling\", Justification = \"Class is maintainable.\")]\r\n    public abstract class DefinitionSeries : Control, ISeries, IAxisListener, IRangeProvider, IValueMarginProvider, IDataProvider, ISeriesHost\r\n    {\r\n        /// <summary>\r\n        /// Name of the SeriesArea property.\r\n        /// </summary>\r\n        private const string SeriesAreaName = \"SeriesArea\";\r\n\r\n        /// <summary>\r\n        /// Name of the ItemContainer property.\r\n        /// </summary>\r\n        private const string ItemContainerName = \"ItemContainer\";\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether the series is 100% stacked (versus normally stacked).\r\n        /// </summary>\r\n        protected bool IsStacked100 { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets the collection of DataItems representing the data of the series.\r\n        /// </summary>\r\n        protected ObservableCollection<DataItem> DataItems { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Gets the SeriesArea template part instance.\r\n        /// </summary>\r\n        protected Panel SeriesArea { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Stores an aggregated collection of legend items from the series definitions.\r\n        /// </summary>\r\n        private readonly AggregatedObservableCollection<object> _legendItems = new AggregatedObservableCollection<object>();\r\n\r\n        /// <summary>\r\n        /// Stores the collection of SeriesDefinitions that define the series.\r\n        /// </summary>\r\n        private readonly ObservableCollection<SeriesDefinition> _seriesDefinitions = new UniqueObservableCollection<SeriesDefinition>();\r\n\r\n        /// <summary>\r\n        /// Stores a mirror collection of ISeries corresponding directly to the collection of SeriesDefinitions.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// Not using ObservableCollectionListAdapter because of race condition on ItemsChanged event\r\n        /// </remarks>\r\n        private readonly ObservableCollection<ISeries> _seriesDefinitionsAsISeries = new ObservableCollection<ISeries>();\r\n\r\n        /// <summary>\r\n        /// Keeps the SeriesDefinitions collection synchronized with the Children collection of the SeriesArea.\r\n        /// </summary>\r\n        private readonly ObservableCollectionListAdapter<UIElement> _seriesAreaChildrenListAdapter = new ObservableCollectionListAdapter<UIElement>();\r\n\r\n        /// <summary>\r\n        /// Stores the clip geometry for the ItemContainer.\r\n        /// </summary>\r\n        private readonly RectangleGeometry _clipGeometry = new RectangleGeometry();\r\n\r\n        /// <summary>\r\n        /// Stores a reference to the ItemContainer template part.\r\n        /// </summary>\r\n        private DelegatingListBox _itemContainer;\r\n\r\n        /// <summary>\r\n        /// Tracks the collection of DataItem that are queued for update.\r\n        /// </summary>\r\n        private readonly List<DataItem> _queueUpdateDataItemPlacement_DataItems = new List<DataItem>();\r\n\r\n        /// <summary>\r\n        /// Tracks whether the dependent axis values changed for the next update.\r\n        /// </summary>\r\n        private bool _queueUpdateDataItemPlacement_DependentAxisValuesChanged;\r\n\r\n        /// <summary>\r\n        /// Tracks whether the independent axis values changed for the next update.\r\n        /// </summary>\r\n        private bool _queueUpdateDataItemPlacement_IndependentAxisValuesChanged;\r\n\r\n        /// <summary>\r\n        /// Stores a reference to the backing collection for the SelectedItems property.\r\n        /// </summary>\r\n        private ObservableCollection<object> _selectedItems = new ObservableCollection<object>();\r\n\r\n        /// <summary>\r\n        /// Tracks whether the SelectedItems collection is being synchronized (to prevent reentrancy).\r\n        /// </summary>\r\n        private bool _synchronizingSelectedItems;\r\n\r\n        /// <summary>\r\n        /// Performs one-time initialization of DefinitionSeries data.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1810:InitializeReferenceTypeStaticFieldsInline\", Justification = \"Dependency properties are initialized in-line.\")]\r\n        static DefinitionSeries()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(DefinitionSeries), new FrameworkPropertyMetadata(typeof(DefinitionSeries)));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the DefinitionSeries class.\r\n        /// </summary>\r\n        protected DefinitionSeries()\r\n        {\r\n            _seriesDefinitions.CollectionChanged += new NotifyCollectionChangedEventHandler(SeriesDefinitionsCollectionChanged);\r\n            _seriesAreaChildrenListAdapter.Collection = _seriesDefinitions;\r\n            _selectedItems.CollectionChanged += new NotifyCollectionChangedEventHandler(SelectedItemsCollectionChanged);\r\n            DataItems = new ObservableCollection<DataItem>();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the dependent axis of the series.\r\n        /// </summary>\r\n        public IAxis DependentAxis\r\n        {\r\n            get { return (IAxis)GetValue(DependentAxisProperty); }\r\n            set { SetValue(DependentAxisProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the DependentAxis dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty DependentAxisProperty =\r\n            DependencyProperty.Register(\"DependentAxis\", typeof(IAxis), typeof(DefinitionSeries), new PropertyMetadata(OnDependentAxisChanged));\r\n\r\n        /// <summary>\r\n        /// Handles changes to the DependentAxis dependency property.\r\n        /// </summary>\r\n        /// <param name=\"o\">DependencyObject that changed.</param>\r\n        /// <param name=\"e\">Event data for the DependencyPropertyChangedEvent.</param>\r\n        private static void OnDependentAxisChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            ((DefinitionSeries)o).OnDependentAxisChanged((IAxis)e.OldValue, (IAxis)e.NewValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles changes to the DependentAxis property.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA1801:ReviewUnusedParameters\", MessageId = \"oldValue\", Justification = \"Parameter is part of the pattern for DependencyProperty change handlers.\")]\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA1801:ReviewUnusedParameters\", MessageId = \"newValue\", Justification = \"Parameter is part of the pattern for DependencyProperty change handlers.\")]\r\n        private void OnDependentAxisChanged(IAxis oldValue, IAxis newValue)\r\n        {\r\n            if (null != ActualDependentAxis)\r\n            {\r\n                EnsureAxes(true, false, false);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the independent axis of the series.\r\n        /// </summary>\r\n        public IAxis IndependentAxis\r\n        {\r\n            get { return (IAxis)GetValue(IndependentAxisProperty); }\r\n            set { SetValue(IndependentAxisProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the IndependentAxis dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty IndependentAxisProperty =\r\n            DependencyProperty.Register(\"IndependentAxis\", typeof(IAxis), typeof(DefinitionSeries), new PropertyMetadata(OnIndependentAxisChanged));\r\n\r\n        /// <summary>\r\n        /// Handles changes to the IndependentAxis dependency property.\r\n        /// </summary>\r\n        /// <param name=\"o\">DependencyObject that changed.</param>\r\n        /// <param name=\"e\">Event data for the DependencyPropertyChangedEvent.</param>\r\n        private static void OnIndependentAxisChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            ((DefinitionSeries)o).OnIndependentAxisChanged((IAxis)e.OldValue, (IAxis)e.NewValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles changes to the IndependentAxis property.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA1801:ReviewUnusedParameters\", MessageId = \"oldValue\", Justification = \"Parameter is part of the pattern for DependencyProperty change handlers.\")]\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA1801:ReviewUnusedParameters\", MessageId = \"newValue\", Justification = \"Parameter is part of the pattern for DependencyProperty change handlers.\")]\r\n        private void OnIndependentAxisChanged(IAxis oldValue, IAxis newValue)\r\n        {\r\n            if (null != ActualIndependentAxis)\r\n            {\r\n                EnsureAxes(false, true, false);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the rendered dependent axis of the series.\r\n        /// </summary>\r\n        public IAxis ActualDependentAxis\r\n        {\r\n            get { return (IAxis)GetValue(ActualDependentAxisProperty); }\r\n            protected set { SetValue(ActualDependentAxisProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ActualDependentAxis dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ActualDependentAxisProperty =\r\n            DependencyProperty.Register(\"ActualDependentAxis\", typeof(IAxis), typeof(DefinitionSeries), null);\r\n\r\n        /// <summary>\r\n        /// Gets the rendered independent axis of the series.\r\n        /// </summary>\r\n        public IAxis ActualIndependentAxis\r\n        {\r\n            get { return (IAxis)GetValue(ActualIndependentAxisProperty); }\r\n            protected set { SetValue(ActualIndependentAxisProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ActualIndependentAxis dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ActualIndependentAxisProperty =\r\n            DependencyProperty.Register(\"ActualIndependentAxis\", typeof(IAxis), typeof(DefinitionSeries), null);\r\n\r\n        /// <summary>\r\n        /// Gets the ActualDependentAxis as an IRangeAxis instance.\r\n        /// </summary>\r\n        protected IRangeAxis ActualDependentRangeAxis\r\n        {\r\n            get { return (IRangeAxis)ActualDependentAxis; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the collection of legend items for the series.\r\n        /// </summary>\r\n        public ObservableCollection<object> LegendItems\r\n        {\r\n            get { return _legendItems; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the SeriesHost for the series.\r\n        /// </summary>\r\n        public ISeriesHost SeriesHost\r\n        {\r\n            get { return _seriesHost; }\r\n            set\r\n            {\r\n                if (null != _seriesHost)\r\n                {\r\n                    _seriesHost.ResourceDictionariesChanged -= new EventHandler(SeriesHostResourceDictionariesChanged);\r\n\r\n                    if (null != ActualDependentAxis)\r\n                    {\r\n                        ActualDependentAxis.RegisteredListeners.Remove(this);\r\n                        ActualDependentAxis = null;\r\n                    }\r\n                    if (null != ActualIndependentAxis)\r\n                    {\r\n                        ActualIndependentAxis.RegisteredListeners.Remove(this);\r\n                        ActualIndependentAxis = null;\r\n                    }\r\n\r\n                    foreach (SeriesDefinition definition in SeriesDefinitions)\r\n                    {\r\n                        SeriesDefinitionItemsSourceChanged(definition, definition.ItemsSource, null);\r\n                    }\r\n                }\r\n                _seriesHost = value;\r\n                SeriesHostResourceDictionariesChanged(null, null);\r\n                if (null != _seriesHost)\r\n                {\r\n                    _seriesHost.ResourceDictionariesChanged += new EventHandler(SeriesHostResourceDictionariesChanged);\r\n                    foreach (SeriesDefinition definition in SeriesDefinitions)\r\n                    {\r\n                        SeriesDefinitionItemsSourceChanged(definition, null, definition.ItemsSource);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Stores the SeriesHost for the series.\r\n        /// </summary>\r\n        private ISeriesHost _seriesHost;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the collection of SeriesDefinitions that define the series.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA2227:CollectionPropertiesShouldBeReadOnly\", Justification = \"Setter is public to work around a limitation with the XAML editing tools.\")]\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA1801:ReviewUnusedParameters\", MessageId = \"value\", Justification = \"Setter is public to work around a limitation with the XAML editing tools.\")]\r\n        public Collection<SeriesDefinition> SeriesDefinitions\r\n        {\r\n            get { return _seriesDefinitions; }\r\n            set { throw new NotSupportedException(Properties.Resources.DefinitionSeries_SeriesDefinitions_SetterNotSupported); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the SelectionMode property.\r\n        /// </summary>\r\n        public SeriesSelectionMode SelectionMode\r\n        {\r\n            get { return (SeriesSelectionMode)GetValue(SelectionModeProperty); }\r\n            set { SetValue(SelectionModeProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the SelectionMode dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty SelectionModeProperty =\r\n            DependencyProperty.Register(\"SelectionMode\", typeof(SeriesSelectionMode), typeof(DefinitionSeries), new PropertyMetadata(SeriesSelectionMode.None, OnSelectionModeChanged));\r\n\r\n        /// <summary>\r\n        /// Handles changes to the SelectionMode dependency property.\r\n        /// </summary>\r\n        /// <param name=\"o\">DependencyObject that changed.</param>\r\n        /// <param name=\"e\">Event data for the DependencyPropertyChangedEvent.</param>\r\n        private static void OnSelectionModeChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            ((DefinitionSeries)o).OnSelectionModeChanged((SeriesSelectionMode)e.OldValue, (SeriesSelectionMode)e.NewValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles changes to the SelectionMode property.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA1801:ReviewUnusedParameters\", MessageId = \"oldValue\", Justification = \"Parameter is part of the pattern for DependencyProperty change handlers.\")]\r\n        private void OnSelectionModeChanged(SeriesSelectionMode oldValue, SeriesSelectionMode newValue)\r\n        {\r\n            if (null != _itemContainer)\r\n            {\r\n                switch (newValue)\r\n                {\r\n                    case SeriesSelectionMode.None:\r\n                        _itemContainer.SelectedItem = null;\r\n                        _itemContainer.SelectionMode = Controls.SelectionMode.Single;\r\n                        break;\r\n                    case SeriesSelectionMode.Single:\r\n                        _itemContainer.SelectionMode = Controls.SelectionMode.Single;\r\n                        break;\r\n                    case SeriesSelectionMode.Multiple:\r\n                        _itemContainer.SelectionMode = Controls.SelectionMode.Multiple;\r\n                        break;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the SelectedIndex property.\r\n        /// </summary>\r\n        public int SelectedIndex\r\n        {\r\n            get { return (int)GetValue(SelectedIndexProperty); }\r\n            set { SetValue(SelectedIndexProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the SelectedIndex dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty SelectedIndexProperty =\r\n            DependencyProperty.Register(\"SelectedIndex\", typeof(int), typeof(DefinitionSeries), new PropertyMetadata(-1));\r\n\r\n        /// <summary>\r\n        /// Gets or sets the SelectedItem property.\r\n        /// </summary>\r\n        public object SelectedItem\r\n        {\r\n            get { return (object)GetValue(SelectedItemProperty); }\r\n            set { SetValue(SelectedItemProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the SelectedItem dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty SelectedItemProperty =\r\n            DependencyProperty.Register(\"SelectedItem\", typeof(object), typeof(DefinitionSeries), null);\r\n\r\n        /// <summary>\r\n        /// Gets the currently selected items.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// This property is meant to be used when SelectionMode is Multiple. If the selection mode is Single the correct property to use is SelectedItem.\r\n        /// </remarks>\r\n        public IList SelectedItems\r\n        {\r\n            get { return _selectedItems; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the CollectionChanged event of the SelectedItems collection.\r\n        /// </summary>\r\n        /// <param name=\"sender\">Event source.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private void SelectedItemsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)\r\n        {\r\n            if (!_synchronizingSelectedItems)\r\n            {\r\n                try\r\n                {\r\n                    _synchronizingSelectedItems = true;\r\n\r\n                    // Synchronize the SelectedItems collection\r\n                    if (null != _itemContainer)\r\n                    {\r\n                        if (NotifyCollectionChangedAction.Reset == e.Action)\r\n                        {\r\n                            if (0 < _itemContainer.SelectedItems.Count)\r\n                            {\r\n                                _itemContainer.SelectedItems.Clear();\r\n                            }\r\n                            foreach (DataItem dataItem in _selectedItems.SelectMany(v => DataItems.Where(di => object.Equals(di.Value, v))))\r\n                            {\r\n                                _itemContainer.SelectedItems.Add(dataItem);\r\n                            }\r\n                        }\r\n                        else\r\n                        {\r\n                            if (null != e.OldItems)\r\n                            {\r\n                                foreach (DataItem dataItem in e.OldItems.CastWrapper<object>().SelectMany(v => DataItems.Where(di => object.Equals(di.Value, v))))\r\n                                {\r\n                                    _itemContainer.SelectedItems.Remove(dataItem);\r\n                                }\r\n                            }\r\n                            if (null != e.NewItems)\r\n                            {\r\n                                foreach (DataItem dataItem in e.NewItems.CastWrapper<object>().SelectMany(v => DataItems.Where(di => object.Equals(di.Value, v))))\r\n                                {\r\n                                    _itemContainer.SelectedItems.Add(dataItem);\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                finally\r\n                {\r\n                    _synchronizingSelectedItems = false;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the SelectionChanged event of the ItemContainer class.\r\n        /// </summary>\r\n        /// <param name=\"sender\">Event source.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private void ItemContainerSelectionChanged(object sender, SelectionChangedEventArgs e)\r\n        {\r\n            DataItem[] removedDataItems = e.RemovedItems.CastWrapper<DataItem>().ToArray();\r\n            DataItem[] addedDataItems = e.AddedItems.CastWrapper<DataItem>().ToArray();\r\n\r\n            if (!_synchronizingSelectedItems)\r\n            {\r\n                try\r\n                {\r\n                    _synchronizingSelectedItems = true;\r\n\r\n                    // Synchronize the SelectedItems collection\r\n                    foreach (object obj in removedDataItems.Select(di => di.Value))\r\n                    {\r\n                        _selectedItems.Remove(obj);\r\n                    }\r\n                    foreach (object obj in addedDataItems.Select(di => di.Value))\r\n                    {\r\n                        _selectedItems.Add(obj);\r\n                    }\r\n                }\r\n                finally\r\n                {\r\n                    _synchronizingSelectedItems = false;\r\n                }\r\n            }\r\n\r\n            // Pass the SelectionChanged event on to any listeners\r\n            IList removedItems = removedDataItems.Select(di => di.Value).ToArray();\r\n            IList addedItems = addedDataItems.Select(di => di.Value).ToArray();\r\n            RaiseEvent(new SelectionChangedEventArgs(SelectionChangedEvent, removedItems, addedItems));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Occurs when the selection of a DefinitionSeries changes.\r\n        /// </summary>\r\n        public event SelectionChangedEventHandler SelectionChanged\r\n        {\r\n            add { AddHandler(SelectionChangedEvent, value); }\r\n            remove { RemoveHandler(SelectionChangedEvent, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the SelectionChanged routed event.\r\n        /// </summary>\r\n        public static readonly RoutedEvent SelectionChangedEvent =\r\n            EventManager.RegisterRoutedEvent(\"SelectionChanged\", RoutingStrategy.Bubble, typeof(SelectionChangedEventHandler), typeof(DefinitionSeries));\r\n\r\n        /// <summary>\r\n        /// Builds the visual tree for the control when a new template is applied.\r\n        /// </summary>\r\n        public override void OnApplyTemplate()\r\n        {\r\n            if (null != _itemContainer)\r\n            {\r\n                _itemContainer.PrepareContainerForItem = null;\r\n                _itemContainer.ClearContainerForItem = null;\r\n                _itemContainer.ItemsSource = null;\r\n                _itemContainer.Clip = null;\r\n                _itemContainer.SizeChanged -= new SizeChangedEventHandler(ItemContainerSizeChanged);\r\n                _itemContainer.SelectionChanged -= new SelectionChangedEventHandler(ItemContainerSelectionChanged);\r\n                _itemContainer.ClearValue(Selector.SelectedIndexProperty);\r\n                _itemContainer.ClearValue(Selector.SelectedItemProperty);\r\n            }\r\n\r\n            base.OnApplyTemplate();\r\n\r\n            SeriesArea = GetTemplateChild(SeriesAreaName) as Panel;\r\n            if (null != SeriesArea)\r\n            {\r\n                _seriesAreaChildrenListAdapter.TargetList = SeriesArea.Children;\r\n                _seriesAreaChildrenListAdapter.Populate();\r\n            }\r\n\r\n            _itemContainer = GetTemplateChild(ItemContainerName) as DelegatingListBox;\r\n            if (null != _itemContainer)\r\n            {\r\n                _itemContainer.PrepareContainerForItem = PrepareContainerForItem;\r\n                _itemContainer.ClearContainerForItem = ClearContainerForItem;\r\n                _itemContainer.ItemsSource = DataItems;\r\n                _itemContainer.Clip = _clipGeometry;\r\n                _itemContainer.SizeChanged += new SizeChangedEventHandler(ItemContainerSizeChanged);\r\n                _itemContainer.SelectionChanged += new SelectionChangedEventHandler(ItemContainerSelectionChanged);\r\n                _itemContainer.SetBinding(Selector.SelectedIndexProperty, new Binding(\"SelectedIndex\") { Source = this, Mode = BindingMode.TwoWay });\r\n                _itemContainer.SetBinding(Selector.SelectedItemProperty, new Binding(\"SelectedItem\") { Source = this, Mode = BindingMode.TwoWay, Converter = new SelectedItemToDataItemConverter(DataItems) });\r\n            }\r\n\r\n            // Synchronize selection state with new ItemContainer\r\n            OnSelectionModeChanged(SeriesSelectionMode.None, SelectionMode);\r\n            SelectedItemsCollectionChanged(null, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Prepares the specified element to display the specified item.\r\n        /// </summary>\r\n        /// <param name=\"element\">The element used to display the specified item.</param>\r\n        /// <param name=\"item\">The item to display.</param>\r\n        private void PrepareContainerForItem(DependencyObject element, object item)\r\n        {\r\n            DataItem dataItem = (DataItem)item;\r\n            DataPoint dataPoint = CreateDataPoint();\r\n            dataItem.DataPoint = dataPoint;\r\n            dataPoint.DataContext = dataItem.Value;\r\n            dataPoint.SetBinding(DataPoint.DependentValueProperty, dataItem.SeriesDefinition.DependentValueBinding);\r\n            dataPoint.SetBinding(DataPoint.IndependentValueProperty, dataItem.SeriesDefinition.IndependentValueBinding);\r\n            dataPoint.SetBinding(DataPoint.StyleProperty, new Binding(\"ActualDataPointStyle\") { Source = dataItem.SeriesDefinition });\r\n            dataPoint.DependentValueChanged += new RoutedPropertyChangedEventHandler<IComparable>(DataPointDependentValueChanged);\r\n            dataPoint.ActualDependentValueChanged += new RoutedPropertyChangedEventHandler<IComparable>(DataPointActualDependentValueChanged);\r\n            dataPoint.IndependentValueChanged += new RoutedPropertyChangedEventHandler<object>(DataPointIndependentValueChanged);\r\n            dataPoint.ActualIndependentValueChanged += new RoutedPropertyChangedEventHandler<object>(DataPointActualIndependentValueChanged);\r\n            dataPoint.StateChanged += new RoutedPropertyChangedEventHandler<DataPointState>(DataPointStateChanged);\r\n            dataPoint.DefinitionSeriesIsSelectionEnabledHandling = true;\r\n            ContentControl container = (ContentControl)element;\r\n            dataItem.Container = container;\r\n            Binding selectionEnabledBinding = new Binding(\"SelectionMode\") { Source = this, Converter = new SelectionModeToSelectionEnabledConverter() };\r\n            container.SetBinding(ContentControl.IsTabStopProperty, selectionEnabledBinding);\r\n            dataPoint.SetBinding(DataPoint.IsSelectionEnabledProperty, selectionEnabledBinding);\r\n            dataPoint.SetBinding(DataPoint.IsSelectedProperty, new Binding(\"IsSelected\") { Source = container, Mode = BindingMode.TwoWay });\r\n            dataPoint.Visibility = Visibility.Collapsed;\r\n            dataPoint.State = DataPointState.Showing;\r\n            PrepareDataPoint(dataPoint);\r\n            container.Content = dataPoint;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Undoes the effects of the PrepareContainerForItemOverride method.\r\n        /// </summary>\r\n        /// <param name=\"element\">The container element.</param>\r\n        /// <param name=\"item\">The item to display.</param>\r\n        private void ClearContainerForItem(DependencyObject element, object item)\r\n        {\r\n            DataItem dataItem = (DataItem)item;\r\n            DataPoint dataPoint = dataItem.DataPoint;\r\n            dataPoint.DependentValueChanged -= new RoutedPropertyChangedEventHandler<IComparable>(DataPointDependentValueChanged);\r\n            dataPoint.ActualDependentValueChanged -= new RoutedPropertyChangedEventHandler<IComparable>(DataPointActualDependentValueChanged);\r\n            dataPoint.IndependentValueChanged -= new RoutedPropertyChangedEventHandler<object>(DataPointIndependentValueChanged);\r\n            dataPoint.ActualIndependentValueChanged -= new RoutedPropertyChangedEventHandler<object>(DataPointActualIndependentValueChanged);\r\n            dataPoint.StateChanged -= new RoutedPropertyChangedEventHandler<DataPointState>(DataPointStateChanged);\r\n            dataPoint.ClearValue(DataPoint.DependentValueProperty);\r\n            dataPoint.ClearValue(DataPoint.IndependentValueProperty);\r\n            dataPoint.ClearValue(DataPoint.StyleProperty);\r\n            dataPoint.ClearValue(DataPoint.IsSelectionEnabledProperty);\r\n            dataPoint.ClearValue(DataPoint.IsSelectedProperty);\r\n            ContentControl container = (ContentControl)dataItem.Container;\r\n            container.ClearValue(ContentControl.IsTabStopProperty);\r\n            dataPoint.DataContext = null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Prepares a DataPoint for use.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">DataPoint instance.</param>\r\n        protected virtual void PrepareDataPoint(DataPoint dataPoint) { }\r\n\r\n        /// <summary>\r\n        /// Creates a DataPoint for the series.\r\n        /// </summary>\r\n        /// <returns>Series-appropriate DataPoint instance.</returns>\r\n        protected abstract DataPoint CreateDataPoint();\r\n\r\n        /// <summary>\r\n        /// Provides an internally-accessible wrapper for calling CreateDataPoint.\r\n        /// </summary>\r\n        /// <returns>Series-appropriate DataPoint instance.</returns>\r\n        internal DataPoint InternalCreateDataPoint()\r\n        {\r\n            return CreateDataPoint();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the SizeChanged event of the ItemContainer.\r\n        /// </summary>\r\n        /// <param name=\"sender\">Event source.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private void ItemContainerSizeChanged(object sender, SizeChangedEventArgs e)\r\n        {\r\n            _clipGeometry.Rect = new Rect(0, 0, e.NewSize.Width, e.NewSize.Height);\r\n            QueueUpdateDataItemPlacement(false, false, DataItems);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the DataItem corresponding to the specified DataPoint.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">Specified DataPoint.</param>\r\n        /// <returns>Corresponding DataItem.</returns>\r\n        protected DataItem DataItemFromDataPoint(DataPoint dataPoint)\r\n        {\r\n            return DataItems.Where(di => di.DataPoint == dataPoint).Single();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the DependentValueChanged event of a DataPoint.\r\n        /// </summary>\r\n        /// <param name=\"sender\">Event source.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private void DataPointDependentValueChanged(object sender, RoutedPropertyChangedEventArgs<IComparable> e)\r\n        {\r\n            DataPoint dataPoint = (DataPoint)sender;\r\n            SeriesDefinition definition = DataItemFromDataPoint(dataPoint).SeriesDefinition;\r\n            TimeSpan transitionDuration = definition.TransitionDuration;\r\n            if (0 < transitionDuration.TotalMilliseconds)\r\n            {\r\n                dataPoint.BeginAnimation(DataPoint.ActualDependentValueProperty, \"ActualDependentValue\", e.NewValue, definition.TransitionDuration, definition.TransitionEasingFunction);\r\n            }\r\n            else\r\n            {\r\n                dataPoint.ActualDependentValue = e.NewValue;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the ActualDependentValueChanged event of a DataPoint.\r\n        /// </summary>\r\n        /// <param name=\"sender\">Event source.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private void DataPointActualDependentValueChanged(object sender, RoutedPropertyChangedEventArgs<IComparable> e)\r\n        {\r\n            DataPoint dataPoint = (DataPoint)sender;\r\n            QueueUpdateDataItemPlacement(true, false, DataItems.Where(di => di.DataPoint == dataPoint));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the IndependentValueChanged event of a DataPoint.\r\n        /// </summary>\r\n        /// <param name=\"sender\">Event source.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private void DataPointIndependentValueChanged(object sender, RoutedPropertyChangedEventArgs<object> e)\r\n        {\r\n            DataPoint dataPoint = (DataPoint)sender;\r\n            SeriesDefinition definition = DataItemFromDataPoint(dataPoint).SeriesDefinition;\r\n            TimeSpan transitionDuration = definition.TransitionDuration;\r\n            if (0 < transitionDuration.TotalMilliseconds)\r\n            {\r\n                dataPoint.BeginAnimation(DataPoint.ActualIndependentValueProperty, \"ActualIndependentValue\", e.NewValue, definition.TransitionDuration, definition.TransitionEasingFunction);\r\n            }\r\n            else\r\n            {\r\n                dataPoint.ActualIndependentValue = e.NewValue;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the ActualIndependentValueChanged event of a DataPoint.\r\n        /// </summary>\r\n        /// <param name=\"sender\">Event source.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private void DataPointActualIndependentValueChanged(object sender, RoutedPropertyChangedEventArgs<object> e)\r\n        {\r\n            DataPoint dataPoint = (DataPoint)sender;\r\n            QueueUpdateDataItemPlacement(false, true, DataItems.Where(di => di.DataPoint == dataPoint));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the StateChanged event of a DataPoint.\r\n        /// </summary>\r\n        /// <param name=\"sender\">Event source.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private void DataPointStateChanged(object sender, RoutedPropertyChangedEventArgs<DataPointState> e)\r\n        {\r\n            DataPoint dataPoint = (DataPoint)sender;\r\n            if (DataPointState.Hidden == dataPoint.State)\r\n            {\r\n                DataItems.Remove(DataItems.Where(di => di.DataPoint == dataPoint).Single());\r\n                RemovedDataItems();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Notifies the specified axis of changes to values plotting against it.\r\n        /// </summary>\r\n        /// <param name=\"axis\">Specified axis.</param>\r\n        protected void NotifyAxisValuesChanged(IAxis axis)\r\n        {\r\n            if (null != axis)\r\n            {\r\n                IRangeConsumer rangeConsumer = axis as IRangeConsumer;\r\n                if (null != rangeConsumer)\r\n                {\r\n                    IRangeProvider rangeProvider = (IRangeProvider)this;\r\n                    rangeConsumer.RangeChanged(rangeProvider, new Range<IComparable>() /*rangeProvider.GetRange(rangeConsumer)*/);\r\n                }\r\n                IDataConsumer dataConsumer = axis as IDataConsumer;\r\n                if (null != dataConsumer)\r\n                {\r\n                    IDataProvider dataProvider = (IDataProvider)this;\r\n                    dataConsumer.DataChanged(dataProvider, null /*dataProvider.GetData(dataConsumer)*/);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Notifies the specified axis of changes to value margins plotting against it.\r\n        /// </summary>\r\n        /// <param name=\"axis\">Specified axis.</param>\r\n        /// <param name=\"valueMargins\">Sequence of value margins that have changed.</param>\r\n        protected void NotifyValueMarginsChanged(IAxis axis, IEnumerable<ValueMargin> valueMargins)\r\n        {\r\n            if (null != axis)\r\n            {\r\n                IValueMarginConsumer valueMarginConsumer = axis as IValueMarginConsumer;\r\n                if (null != valueMarginConsumer)\r\n                {\r\n                    IValueMarginProvider valueMarginProvider = (IValueMarginProvider)this;\r\n                    valueMarginConsumer.ValueMarginsChanged(valueMarginProvider, valueMargins);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the CollectionChanged event of the SeriesDefinitions collection.\r\n        /// </summary>\r\n        /// <param name=\"sender\">Event source.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private void SeriesDefinitionsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)\r\n        {\r\n            SeriesDefinitionsCollectionChanged(e.Action, e.OldItems, e.OldStartingIndex, e.NewItems, e.NewStartingIndex);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the CollectionChanged event of the SeriesDefinitions collection.\r\n        /// </summary>\r\n        /// <param name=\"action\">Type of change.</param>\r\n        /// <param name=\"oldItems\">Sequence of old items.</param>\r\n        /// <param name=\"oldStartingIndex\">Starting index of old items.</param>\r\n        /// <param name=\"newItems\">Sequence of new items.</param>\r\n        /// <param name=\"newStartingIndex\">Starting index of new items.</param>\r\n        protected virtual void SeriesDefinitionsCollectionChanged(NotifyCollectionChangedAction action, IList oldItems, int oldStartingIndex, IList newItems, int newStartingIndex)\r\n        {\r\n            if (null != oldItems)\r\n            {\r\n                foreach (SeriesDefinition oldDefinition in oldItems.CastWrapper<SeriesDefinition>())\r\n                {\r\n                    ISeries oldSeries = (ISeries)oldDefinition;\r\n                    SeriesDefinitionItemsSourceChanged(oldDefinition, oldDefinition.ItemsSource, null);\r\n                    _seriesDefinitionsAsISeries.Remove(oldDefinition);\r\n                    _legendItems.ChildCollections.Remove(oldSeries.LegendItems);\r\n                    UpdatePaletteProperties(oldDefinition);\r\n                    oldSeries.SeriesHost = null;\r\n                    oldDefinition.Index = -1;\r\n                }\r\n            }\r\n            if (null != newItems)\r\n            {\r\n                int index = newStartingIndex;\r\n                foreach (SeriesDefinition newDefinition in newItems.CastWrapper<SeriesDefinition>())\r\n                {\r\n                    ISeries newSeries = (ISeries)newDefinition;\r\n                    newSeries.SeriesHost = this;\r\n                    UpdatePaletteProperties(newDefinition);\r\n                    _legendItems.ChildCollections.Add(newSeries.LegendItems);\r\n                    _seriesDefinitionsAsISeries.Add(newDefinition);\r\n                    newDefinition.Index = index;\r\n                    SeriesDefinitionItemsSourceChanged(newDefinition, null, newDefinition.ItemsSource);\r\n                    index++;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the palette properties of the specified SeriesDefinition.\r\n        /// </summary>\r\n        /// <param name=\"definition\">Specified SeriesDefinition.</param>\r\n        private void UpdatePaletteProperties(SeriesDefinition definition)\r\n        {\r\n            ResourceDictionary resources = null;\r\n            if (null != SeriesHost)\r\n            {\r\n                Type dataPointType = CreateDataPoint().GetType();\r\n                using (IEnumerator<ResourceDictionary> enumerator = SeriesHost.GetResourceDictionariesWhere(dictionary =>\r\n                {\r\n                    Style style = dictionary[\"DataPointStyle\"] as Style;\r\n                    if (null != style)\r\n                    {\r\n                        return (null != style.TargetType) && (style.TargetType.IsAssignableFrom(dataPointType));\r\n                    }\r\n                    return false;\r\n                }))\r\n                {\r\n                    if (enumerator.MoveNext())\r\n                    {\r\n                        resources = enumerator.Current;\r\n                    }\r\n                }\r\n            }\r\n            definition.PaletteDataPointStyle = (null != resources) ? resources[\"DataPointStyle\"] as Style : null;\r\n            definition.PaletteDataShapeStyle = (null != resources) ? resources[\"DataShapeStyle\"] as Style : null;\r\n            definition.PaletteLegendItemStyle = (null != resources) ? resources[\"LegendItemStyle\"] as Style : null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles changes to the ItemsSource of a SeriesDefinition.\r\n        /// </summary>\r\n        /// <param name=\"definition\">SeriesDefinition owner.</param>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        internal void SeriesDefinitionItemsSourceChanged(SeriesDefinition definition, IEnumerable oldValue, IEnumerable newValue)\r\n        {\r\n            if (null != oldValue)\r\n            {\r\n                foreach (DataItem dataItem in DataItems.Where(di => di.SeriesDefinition == definition).ToArray())\r\n                {\r\n                    DataItems.Remove(dataItem);\r\n                }\r\n                RemovedDataItems();\r\n            }\r\n            if (null != newValue)\r\n            {\r\n                // No need to add items if SeriesHost null; setting SeriesHost will take care of that\r\n                if (null != SeriesHost)\r\n                {\r\n                    AddDataItems(definition, newValue.CastWrapper<object>(), 0);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles changes to the ItemsSource collection  of a SeriesDefinition.\r\n        /// </summary>\r\n        /// <param name=\"definition\">SeriesDefinition owner.</param>\r\n        /// <param name=\"action\">Type of change.</param>\r\n        /// <param name=\"oldItems\">Sequence of old items.</param>\r\n        /// <param name=\"oldStartingIndex\">Starting index of old items.</param>\r\n        /// <param name=\"newItems\">Sequence of new items.</param>\r\n        /// <param name=\"newStartingIndex\">Starting index of new items.</param>\r\n        [SuppressMessage(\"Microsoft.Maintainability\", \"CA1502:AvoidExcessiveComplexity\", Justification = \"Linq is artificially increasing the rating.\")]\r\n        internal void SeriesDefinitionItemsSourceCollectionChanged(SeriesDefinition definition, NotifyCollectionChangedAction action, IList oldItems, int oldStartingIndex, IList newItems, int newStartingIndex)\r\n        {\r\n            if (NotifyCollectionChangedAction.Replace == action)\r\n            {\r\n                // Perform in-place replacements\r\n                foreach (DataItem dataItem in DataItems.Where(di => (di.SeriesDefinition == definition) && (newStartingIndex <= di.Index) && (di.Index < newStartingIndex + newItems.Count)))\r\n                {\r\n                    dataItem.Value = newItems[dataItem.Index - newStartingIndex];\r\n                }\r\n            }\r\n            else\r\n            {\r\n                if (NotifyCollectionChangedAction.Reset == action)\r\n                {\r\n                    // Set up parameters to allow normal old/new item handling to be used\r\n                    Debug.Assert(null == oldItems, \"Reset action with non-null oldItems.\");\r\n                    oldItems = DataItems.Where(di => (di.SeriesDefinition == definition)).ToArray();\r\n                    oldStartingIndex = 0;\r\n                    newItems = definition.ItemsSource.CastWrapper<object>().ToArray();\r\n                    newStartingIndex = 0;\r\n                }\r\n                if (null != oldItems)\r\n                {\r\n                    // Get rid of old items\r\n                    foreach (DataItem oldDataItem in DataItems.Where(di => (di.SeriesDefinition == definition) && (oldStartingIndex <= di.Index) && (di.Index < oldStartingIndex + oldItems.Count)))\r\n                    {\r\n                        oldDataItem.Index = -1;\r\n                        if (null != oldDataItem.DataPoint)\r\n                        {\r\n                            oldDataItem.DataPoint.State = DataPointState.Hiding;\r\n                        }\r\n                    }\r\n                    // Adjust index of shifted items\r\n                    foreach (DataItem dataItem in DataItems.Where(di => (di.SeriesDefinition == definition) && (oldStartingIndex + oldItems.Count <= di.Index)))\r\n                    {\r\n                        dataItem.Index -= oldItems.Count;\r\n                    }\r\n                }\r\n                if (null != newItems)\r\n                {\r\n                    // Adjust index of shifted items\r\n                    foreach (DataItem dataItem in DataItems.Where(di => (di.SeriesDefinition == definition) && (newStartingIndex <= di.Index)))\r\n                    {\r\n                        dataItem.Index += newItems.Count;\r\n                    }\r\n                    // Add new items\r\n                    AddDataItems(definition, newItems.CastWrapper<object>(), newStartingIndex);\r\n                }\r\n            }\r\n#if DEBUG\r\n            // Validate all DataItem index and value properties\r\n            foreach (var group in DataItems.Where(di => 0 <= di.Index).OrderBy(di => di.Index).GroupBy(di => di.SeriesDefinition))\r\n            {\r\n                object[] items = group.Key.ItemsSource.CastWrapper<object>().ToArray();\r\n                int i = 0;\r\n                foreach (DataItem dataItem in group)\r\n                {\r\n                    Debug.Assert(i == dataItem.Index, \"DataItem index mis-match.\");\r\n                    Debug.Assert(dataItem.Value.Equals(items[i]), \"DataItem value mis-match.\");\r\n                    i++;\r\n                }\r\n            }\r\n#endif\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the ResourceDictionariesChanged event of the SeriesHost owner.\r\n        /// </summary>\r\n        /// <param name=\"sender\">Event source.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private void SeriesHostResourceDictionariesChanged(object sender, EventArgs e)\r\n        {\r\n            foreach (SeriesDefinition definition in SeriesDefinitions)\r\n            {\r\n                UpdatePaletteProperties(definition);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates and adds DataItems for the specified SeriesDefinition's items.\r\n        /// </summary>\r\n        /// <param name=\"definition\">Specified SeriesDefinition.</param>\r\n        /// <param name=\"items\">Sequence of items.</param>\r\n        /// <param name=\"startingIndex\">Starting index.</param>\r\n        private void AddDataItems(SeriesDefinition definition, IEnumerable<object> items, int startingIndex)\r\n        {\r\n            int index = startingIndex;\r\n            foreach (object item in items)\r\n            {\r\n                DataItems.Add(new DataItem(definition) { Value = item, Index = index });\r\n                index++;\r\n            }\r\n            // Because properties (like DependentValueBinding) may still be getting set\r\n            Dispatcher.BeginInvoke((Action)AddedDataItems);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the axes after DataItems have been added.\r\n        /// </summary>\r\n        private void AddedDataItems()\r\n        {\r\n            EnsureAxes(false, false, true);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Notifies the axes after DataItems have been removed.\r\n        /// </summary>\r\n        private void RemovedDataItems()\r\n        {\r\n            NotifyAxisValuesChanged(ActualIndependentAxis);\r\n            NotifyAxisValuesChanged(ActualDependentAxis);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Ensures that suitable axes are present and registered.\r\n        /// </summary>\r\n        /// <param name=\"updateDependentAxis\">True if the dependent axis needs to be updated.</param>\r\n        /// <param name=\"updateIndependentAxis\">True if the independent axis needs to be updated.</param>\r\n        /// <param name=\"unconditionallyNotifyAxes\">True if both axis are to be notified unconditionally.</param>\r\n        private void EnsureAxes(bool updateDependentAxis, bool updateIndependentAxis, bool unconditionallyNotifyAxes)\r\n        {\r\n            foreach (SeriesDefinition definition in SeriesDefinitions)\r\n            {\r\n                if (null == definition.DependentValueBinding)\r\n                {\r\n                    throw new InvalidOperationException(Properties.Resources.DefinitionSeries_EnsureAxes_MissingDependentValueBinding);\r\n                }\r\n                if (null == definition.IndependentValueBinding)\r\n                {\r\n                    throw new InvalidOperationException(Properties.Resources.DefinitionSeries_EnsureAxes_MissingIndependentValueBinding);\r\n                }\r\n            }\r\n            if ((null != SeriesHost) && DataItems.Any())\r\n            {\r\n                // Ensure a dependent axis is present or updated\r\n                bool changedActualDependentAxis = false;\r\n                if (updateDependentAxis && (null != ActualDependentAxis))\r\n                {\r\n                    ActualDependentAxis.RegisteredListeners.Remove(this);\r\n                    ActualDependentAxis = null;\r\n                }\r\n                if (null == ActualDependentAxis)\r\n                {\r\n                    ActualDependentAxis = DependentAxis ?? AcquireDependentAxis();\r\n                    ActualDependentAxis.RegisteredListeners.Add(this);\r\n                    if (!SeriesHost.Axes.Contains(ActualDependentAxis))\r\n                    {\r\n                        SeriesHost.Axes.Add(ActualDependentAxis);\r\n                    }\r\n                    changedActualDependentAxis = true;\r\n                }\r\n                // Ensure an independent axis is present or updated\r\n                bool changedActualIndependentAxis = false;\r\n                if (updateIndependentAxis && (null != ActualIndependentAxis))\r\n                {\r\n                    ActualIndependentAxis.RegisteredListeners.Remove(this);\r\n                    ActualIndependentAxis = null;\r\n                }\r\n                if (null == ActualIndependentAxis)\r\n                {\r\n                    ActualIndependentAxis = IndependentAxis ?? AcquireIndependentAxis();\r\n                    ActualIndependentAxis.RegisteredListeners.Add(this);\r\n                    if (!SeriesHost.Axes.Contains(ActualIndependentAxis))\r\n                    {\r\n                        SeriesHost.Axes.Add(ActualIndependentAxis);\r\n                    }\r\n                    changedActualIndependentAxis = true;\r\n                }\r\n                // Queue an update if necessary or requested\r\n                if (changedActualDependentAxis || changedActualIndependentAxis || unconditionallyNotifyAxes)\r\n                {\r\n                    QueueUpdateDataItemPlacement(changedActualDependentAxis || unconditionallyNotifyAxes, changedActualIndependentAxis || unconditionallyNotifyAxes, DataItems);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Acquires a dependent axis suitable for use with the data values of the series.\r\n        /// </summary>\r\n        /// <returns>Axis instance.</returns>\r\n        protected abstract IAxis AcquireDependentAxis();\r\n\r\n        /// <summary>\r\n        /// Acquires an independent axis suitable for use with the data values of the series.\r\n        /// </summary>\r\n        /// <returns>Axis instance.</returns>\r\n        protected abstract IAxis AcquireIndependentAxis();\r\n\r\n        /// <summary>\r\n        /// Handles notification of the invalidation of an axis.\r\n        /// </summary>\r\n        /// <param name=\"axis\">Invalidated axis.</param>\r\n        void IAxisListener.AxisInvalidated(IAxis axis)\r\n        {\r\n            QueueUpdateDataItemPlacement(false, false, DataItems);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Queues an update of DataItem placement for the next update opportunity.\r\n        /// </summary>\r\n        /// <param name=\"dependentAxisValuesChanged\">True if the dependent axis values have changed.</param>\r\n        /// <param name=\"independentAxisValuesChanged\">True if the independent axis values have changed.</param>\r\n        /// <param name=\"dataItems\">Sequence of DataItems to update.</param>\r\n        private void QueueUpdateDataItemPlacement(bool dependentAxisValuesChanged, bool independentAxisValuesChanged, IEnumerable<DataItem> dataItems)\r\n        {\r\n            _queueUpdateDataItemPlacement_DependentAxisValuesChanged |= dependentAxisValuesChanged;\r\n            _queueUpdateDataItemPlacement_IndependentAxisValuesChanged |= independentAxisValuesChanged;\r\n            _queueUpdateDataItemPlacement_DataItems.AddRange(dataItems);\r\n            InvalidateArrange();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the control needs to arrange its children.\r\n        /// </summary>\r\n        /// <param name=\"arrangeBounds\">Bounds to arrange within.</param>\r\n        /// <returns>Arranged size.</returns>\r\n        /// <remarks>\r\n        /// Used as a good place to dequeue queued work.\r\n        /// </remarks>\r\n        protected override Size ArrangeOverride(Size arrangeBounds)\r\n        {\r\n            Size arrangedSize = base.ArrangeOverride(arrangeBounds);\r\n            if (_queueUpdateDataItemPlacement_DependentAxisValuesChanged)\r\n            {\r\n                NotifyAxisValuesChanged(ActualDependentAxis);\r\n                _queueUpdateDataItemPlacement_DependentAxisValuesChanged = false;\r\n            }\r\n            if (_queueUpdateDataItemPlacement_IndependentAxisValuesChanged)\r\n            {\r\n                NotifyAxisValuesChanged(ActualIndependentAxis);\r\n                _queueUpdateDataItemPlacement_IndependentAxisValuesChanged = false;\r\n            }\r\n            UpdateDataItemPlacement(_queueUpdateDataItemPlacement_DataItems.Distinct());\r\n            _queueUpdateDataItemPlacement_DataItems.Clear();\r\n            return arrangedSize;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the placement of the DataItems (data points) of the series.\r\n        /// </summary>\r\n        /// <param name=\"dataItems\">DataItems in need of an update.</param>\r\n        protected abstract void UpdateDataItemPlacement(IEnumerable<DataItem> dataItems);\r\n\r\n        /// <summary>\r\n        /// Returns the range for the data points of the series.\r\n        /// </summary>\r\n        /// <param name=\"rangeConsumer\">Consumer of the range.</param>\r\n        /// <returns>Range of values.</returns>\r\n        Range<IComparable> IRangeProvider.GetRange(IRangeConsumer rangeConsumer)\r\n        {\r\n            return IRangeProviderGetRange(rangeConsumer);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the range for the data points of the series.\r\n        /// </summary>\r\n        /// <param name=\"rangeConsumer\">Consumer of the range.</param>\r\n        /// <returns>Range of values.</returns>\r\n        protected virtual Range<IComparable> IRangeProviderGetRange(IRangeConsumer rangeConsumer)\r\n        {\r\n            if (rangeConsumer == ActualIndependentAxis)\r\n            {\r\n                if (ActualIndependentAxis.CanPlot(0.0))\r\n                {\r\n                    return IndependentValueGroups\r\n                        .Select(g => ValueHelper.ToDouble(g.IndependentValue))\r\n                        .Where(d => ValueHelper.CanGraph(d))\r\n                        .DefaultIfEmpty()\r\n                        .CastWrapper<IComparable>()\r\n                        .GetRange();\r\n                }\r\n                else\r\n                {\r\n                    return IndependentValueGroups\r\n                        .Select(g => ValueHelper.ToDateTime(g.IndependentValue))\r\n                        .DefaultIfEmpty()\r\n                        .CastWrapper<IComparable>()\r\n                        .GetRange();\r\n                }\r\n            }\r\n            throw new NotSupportedException();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the value margins for the data points of the series.\r\n        /// </summary>\r\n        /// <param name=\"valueMarginConsumer\">Consumer of the value margins.</param>\r\n        /// <returns>Sequence of value margins.</returns>\r\n        IEnumerable<ValueMargin> IValueMarginProvider.GetValueMargins(IValueMarginConsumer valueMarginConsumer)\r\n        {\r\n            return IValueMarginProviderGetValueMargins(valueMarginConsumer);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the value margins for the data points of the series.\r\n        /// </summary>\r\n        /// <param name=\"valueMarginConsumer\">Consumer of the value margins.</param>\r\n        /// <returns>Sequence of value margins.</returns>\r\n        protected virtual IEnumerable<ValueMargin> IValueMarginProviderGetValueMargins(IValueMarginConsumer valueMarginConsumer)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the data for the data points of the series.\r\n        /// </summary>\r\n        /// <param name=\"dataConsumer\">Consumer of the data.</param>\r\n        /// <returns>Sequence of data.</returns>\r\n        IEnumerable<object> IDataProvider.GetData(IDataConsumer dataConsumer)\r\n        {\r\n            return IDataProviderGetData(dataConsumer);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the data for the data points of the series.\r\n        /// </summary>\r\n        /// <param name=\"dataConsumer\">Consumer of the data.</param>\r\n        /// <returns>Sequence of data.</returns>\r\n        protected virtual IEnumerable<object> IDataProviderGetData(IDataConsumer dataConsumer)\r\n        {\r\n            if (dataConsumer == ActualIndependentAxis)\r\n            {\r\n                return IndependentValueGroups.Select(cg => cg.IndependentValue).Distinct();\r\n            }\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a sequence of IndependentValueGroups.\r\n        /// </summary>\r\n        protected virtual IEnumerable<IndependentValueGroup> IndependentValueGroups\r\n        {\r\n            get\r\n            {\r\n                return DataItems\r\n                    .GroupBy(di => di.ActualIndependentValue)\r\n                    .Select(g => new IndependentValueGroup(g.Key, g.OrderBy(di => di.SeriesDefinition.Index)));\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a sequence of IndependentValueGroups ordered by independent value.\r\n        /// </summary>\r\n        protected IEnumerable<IndependentValueGroup> IndependentValueGroupsOrderedByIndependentValue\r\n        {\r\n            get\r\n            {\r\n                return IndependentValueGroups\r\n                    .OrderBy(g => g.IndependentValue);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a sequence of sequences of the dependent values associated with each independent value.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1006:DoNotNestGenericTypesInMemberSignatures\", Justification = \"Nesting reflects the actual hierarchy of the data.\")]\r\n        protected IEnumerable<IEnumerable<double>> IndependentValueDependentValues\r\n        {\r\n            get\r\n            {\r\n                return IndependentValueGroups\r\n                    .Select(g =>\r\n                    {\r\n                        g.Denominator = IsStacked100 ?\r\n                            g.DataItems.Sum(di => Math.Abs(ValueHelper.ToDouble(di.ActualDependentValue))) :\r\n                            1;\r\n                        if (0 == g.Denominator)\r\n                        {\r\n                            g.Denominator = 1;\r\n                        }\r\n                        return g;\r\n                    })\r\n                    .Select(g => g.DataItems\r\n                        .Select(di => ValueHelper.ToDouble(di.ActualDependentValue) * (IsStacked100 ? (100 / g.Denominator) : 1)));\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Represents an independent value and the dependent values that are associated with it.\r\n        /// </summary>\r\n        protected class IndependentValueGroup\r\n        {\r\n            /// <summary>\r\n            /// Initializes a new instance of the IndependentValueGroup class.\r\n            /// </summary>\r\n            /// <param name=\"independentValue\">Independent value.</param>\r\n            /// <param name=\"dataItems\">Associated DataItems.</param>\r\n            public IndependentValueGroup(object independentValue, IEnumerable<DataItem> dataItems)\r\n            {\r\n                IndependentValue = independentValue;\r\n                DataItems = dataItems;\r\n            }\r\n\r\n            /// <summary>\r\n            /// Gets the independent value.\r\n            /// </summary>\r\n            public object IndependentValue { get; private set; }\r\n\r\n            /// <summary>\r\n            /// Gets a sequence of DataItems associated with the independent value.\r\n            /// </summary>\r\n            public IEnumerable<DataItem> DataItems { get; private set; }\r\n\r\n            /// <summary>\r\n            /// Gets or sets the denominator to use when computing with this instance.\r\n            /// </summary>\r\n            /// <remarks>\r\n            /// Exists here purely to simplify the the corresponding algorithm.\r\n            /// </remarks>\r\n            public double Denominator { get; set; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Represents a single data value from a SeriesDefinition's ItemsSource.\r\n        /// </summary>\r\n        protected class DataItem\r\n        {\r\n            /// <summary>\r\n            /// Stores a reference to a shared BindingHelper instance.\r\n            /// </summary>\r\n            private static readonly BindingHelper _bindingHelper = new BindingHelper();\r\n\r\n            /// <summary>\r\n            /// Initializes a new instance of the DataItem class.\r\n            /// </summary>\r\n            /// <param name=\"seriesDefinition\">SeriesDefinition owner.</param>\r\n            public DataItem(SeriesDefinition seriesDefinition)\r\n            {\r\n                SeriesDefinition = seriesDefinition;\r\n                CenterPoint = new Point(double.NaN, double.NaN);\r\n            }\r\n\r\n            /// <summary>\r\n            /// Gets the SeriesDefinition owner of the DataItem.\r\n            /// </summary>\r\n            public SeriesDefinition SeriesDefinition { get; private set; }\r\n\r\n            /// <summary>\r\n            /// Gets or sets the value of the DataItem.\r\n            /// </summary>\r\n            public object Value\r\n            {\r\n                get { return _value; }\r\n                set\r\n                {\r\n                    _value = value;\r\n                    if (null != DataPoint)\r\n                    {\r\n                        DataPoint.DataContext = value;\r\n                    }\r\n                }\r\n            }\r\n\r\n            /// <summary>\r\n            /// Stores the value of the DataItem.\r\n            /// </summary>\r\n            private object _value;\r\n\r\n            /// <summary>\r\n            /// Gets or sets the index of the DataItem.\r\n            /// </summary>\r\n            public int Index { get; set; }\r\n\r\n            /// <summary>\r\n            /// Gets or sets the DataPoint associated with the DataItem.\r\n            /// </summary>\r\n            public DataPoint DataPoint { get; set; }\r\n\r\n            /// <summary>\r\n            /// Gets or sets the container for the DataPoint within its parent ItemsControl.\r\n            /// </summary>\r\n            public UIElement Container { get; set; }\r\n\r\n            /// <summary>\r\n            /// Gets the ActualDependentValue of the DataPoint (or its equivalent).\r\n            /// </summary>\r\n            public IComparable ActualDependentValue\r\n            {\r\n                get\r\n                {\r\n                    if (null != DataPoint)\r\n                    {\r\n                        return DataPoint.ActualDependentValue;\r\n                    }\r\n                    else\r\n                    {\r\n                        return (IComparable)_bindingHelper.EvaluateBinding(SeriesDefinition.DependentValueBinding, Value);\r\n                    }\r\n                }\r\n            }\r\n\r\n            /// <summary>\r\n            /// Gets the ActualIndependentValue of the DataPoint (or its equivalent).\r\n            /// </summary>\r\n            public object ActualIndependentValue\r\n            {\r\n                get\r\n                {\r\n                    if (null != DataPoint)\r\n                    {\r\n                        return DataPoint.ActualIndependentValue;\r\n                    }\r\n                    else\r\n                    {\r\n                        return _bindingHelper.EvaluateBinding(SeriesDefinition.IndependentValueBinding, Value);\r\n                    }\r\n                }\r\n            }\r\n\r\n            /// <summary>\r\n            /// Gets or sets the ActualDependentValue of the DataPoint after adjusting for applicable stacking.\r\n            /// </summary>\r\n            public double ActualStackedDependentValue { get; set; }\r\n\r\n            /// <summary>\r\n            /// Gets or sets the center-point of the DataPoint in plot area coordinates (if relevant).\r\n            /// </summary>\r\n            public Point CenterPoint { get; set; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Provides an easy way to evaluate a Binding against a source instance.\r\n        /// </summary>\r\n        private class BindingHelper : FrameworkElement\r\n        {\r\n            /// <summary>\r\n            /// Initializes a new instance of the BindingHelper class.\r\n            /// </summary>\r\n            public BindingHelper()\r\n            {\r\n            }\r\n\r\n            /// <summary>\r\n            /// Identifies the Result dependency property.\r\n            /// </summary>\r\n            private static readonly DependencyProperty ResultProperty =\r\n                DependencyProperty.Register(\"Result\", typeof(object), typeof(BindingHelper), null);\r\n\r\n            /// <summary>\r\n            /// Evaluates a Binding against a source instance.\r\n            /// </summary>\r\n            /// <param name=\"binding\">Binding to evaluate.</param>\r\n            /// <param name=\"instance\">Source instance.</param>\r\n            /// <returns>Result of Binding on source instance.</returns>\r\n            public object EvaluateBinding(Binding binding, object instance)\r\n            {\r\n                DataContext = instance;\r\n                SetBinding(ResultProperty, binding);\r\n                object result = GetValue(ResultProperty);\r\n                ClearValue(ResultProperty);\r\n                DataContext = null;\r\n                return result;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Converts from a selected item to the corresponding DataItem.\r\n        /// </summary>\r\n        private class SelectedItemToDataItemConverter : IValueConverter\r\n        {\r\n            /// <summary>\r\n            /// Stores a reference to the DataItem collection.\r\n            /// </summary>\r\n            private ObservableCollection<DataItem> _dataItems;\r\n\r\n            /// <summary>\r\n            /// Initializes a new instance of the SelectedItemToDataItemConverter class.\r\n            /// </summary>\r\n            /// <param name=\"dataItems\">Collection of DataItems.</param>\r\n            public SelectedItemToDataItemConverter(ObservableCollection<DataItem> dataItems)\r\n            {\r\n                _dataItems = dataItems;\r\n            }\r\n\r\n            /// <summary>\r\n            /// Converts a value.\r\n            /// </summary>\r\n            /// <param name=\"value\">The value produced by the binding source.</param>\r\n            /// <param name=\"targetType\">The type of the binding target property.</param>\r\n            /// <param name=\"parameter\">The converter parameter to use.</param>\r\n            /// <param name=\"culture\">The culture to use in the converter.</param>\r\n            /// <returns>Converted value.</returns>\r\n            public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n            {\r\n                return _dataItems.Where(di => di.Value == value).FirstOrDefault();\r\n            }\r\n\r\n            /// <summary>\r\n            /// Converts a value back.\r\n            /// </summary>\r\n            /// <param name=\"value\">The value produced by the binding source.</param>\r\n            /// <param name=\"targetType\">The type of the binding target property.</param>\r\n            /// <param name=\"parameter\">The converter parameter to use.</param>\r\n            /// <param name=\"culture\">The culture to use in the converter.</param>\r\n            /// <returns>Converted value.</returns>\r\n            public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n            {\r\n                DataItem dataItem = value as DataItem;\r\n                return (null != dataItem) ? dataItem.Value : null;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Converts from a SeriesSelectionMode to a true/false value indicating whether selection is enabled.\r\n        /// </summary>\r\n        private class SelectionModeToSelectionEnabledConverter : IValueConverter\r\n        {\r\n            /// <summary>\r\n            /// Initializes a new instance of the SelectionModeToSelectionEnabledConverter class.\r\n            /// </summary>\r\n            public SelectionModeToSelectionEnabledConverter()\r\n            {\r\n            }\r\n\r\n            /// <summary>\r\n            /// Converts a value.\r\n            /// </summary>\r\n            /// <param name=\"value\">The value produced by the binding source.</param>\r\n            /// <param name=\"targetType\">The type of the binding target property.</param>\r\n            /// <param name=\"parameter\">The converter parameter to use.</param>\r\n            /// <param name=\"culture\">The culture to use in the converter.</param>\r\n            /// <returns>Converted value.</returns>\r\n            public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n            {\r\n                bool isSelectionEnabled = false;\r\n                if (value is SeriesSelectionMode)\r\n                {\r\n                    isSelectionEnabled = !(SeriesSelectionMode.None == (SeriesSelectionMode)value);\r\n                }\r\n                return isSelectionEnabled;\r\n            }\r\n\r\n            /// <summary>\r\n            /// Converts a value back.\r\n            /// </summary>\r\n            /// <param name=\"value\">The value produced by the binding source.</param>\r\n            /// <param name=\"targetType\">The type of the binding target property.</param>\r\n            /// <param name=\"parameter\">The converter parameter to use.</param>\r\n            /// <param name=\"culture\">The culture to use in the converter.</param>\r\n            /// <returns>Converted value.</returns>\r\n            public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n            {\r\n                throw new NotImplementedException();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the axes for the series as a series host.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1065:DoNotRaiseExceptionsInUnexpectedLocations\", Justification = \"Property exists as an interface requirement; implementation is unnecessary.\")]\r\n        ObservableCollection<IAxis> ISeriesHost.Axes\r\n        {\r\n            get { throw new NotImplementedException(); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the series for the series as a series host.\r\n        /// </summary>\r\n        ObservableCollection<ISeries> ISeriesHost.Series\r\n        {\r\n            get { return _seriesDefinitionsAsISeries; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the foreground elements for the series as a series host.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1065:DoNotRaiseExceptionsInUnexpectedLocations\", Justification = \"Property exists as an interface requirement; implementation is unnecessary.\")]\r\n        ObservableCollection<UIElement> ISeriesHost.ForegroundElements\r\n        {\r\n            get { throw new NotImplementedException(); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the background elements for the series as a series host.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1065:DoNotRaiseExceptionsInUnexpectedLocations\", Justification = \"Property exists as an interface requirement; implementation is unnecessary.\")]\r\n        ObservableCollection<UIElement> ISeriesHost.BackgroundElements\r\n        {\r\n            get { throw new NotImplementedException(); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a IResourceDictionaryDispenser for the series as a series host.\r\n        /// </summary>\r\n        /// <param name=\"predicate\">Predicate function.</param>\r\n        /// <returns>Sequence of ResourceDictionaries.</returns>\r\n        IEnumerator<ResourceDictionary> IResourceDictionaryDispenser.GetResourceDictionariesWhere(Func<ResourceDictionary, bool> predicate)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Event that is triggered when the available ResourceDictionaries change.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1065:DoNotRaiseExceptionsInUnexpectedLocations\", Justification = \"Property exists as an interface requirement; implementation is unnecessary.\")]\r\n        event EventHandler IResourceDictionaryDispenser.ResourceDictionariesChanged\r\n        {\r\n            add { throw new NotImplementedException(); }\r\n            remove { throw new NotImplementedException(); }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/IRequireGlobalSeriesIndex.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Defines methods on classes that contain a global index.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public interface IRequireGlobalSeriesIndex\r\n    {\r\n        /// <summary>\r\n        /// Occurs when a global series index changes.\r\n        /// </summary>\r\n        /// <param name=\"globalIndex\">The global index that has changed.\r\n        /// </param>\r\n        void GlobalSeriesIndexChanged(int? globalIndex);\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/ISeries.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.ObjectModel;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Represents a series in a chart.\r\n    /// </summary>\r\n    public interface ISeries : IRequireSeriesHost\r\n    {\r\n        /// <summary>\r\n        /// Gets a list of the legend items associated with the object.\r\n        /// </summary>\r\n        ObservableCollection<object> LegendItems { get; }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/LabeledPieSeries.cs",
    "content": "﻿using System.Windows.Data;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n\tpublic class LabeledPieSeries : PieSeries\r\n\t{\r\n\t\t/// <summary>\r\n\t\t/// PieChartLabelStyle DP - The style to be applied to each PieChartLabel.\r\n\t\t/// </summary>\r\n\t\tpublic Style PieChartLabelStyle\r\n\t\t{\r\n\t\t\tget { return (Style)this.GetValue(PieChartLabelStyleProperty); }\r\n\t\t\tset { this.SetValue(PieChartLabelStyleProperty, value); }\r\n\t\t}\r\n\r\n\t\tpublic static readonly DependencyProperty PieChartLabelStyleProperty =\r\n\t\t\tDependencyProperty.Register(\"PieChartLabelStyle\", typeof(Style), typeof(LabeledPieSeries));\r\n\r\n\t\t/// <summary>\r\n\t\t/// PieChartLabelItemTemplate DP - The DataTemplate to be applied to each PieChartLabel.\r\n\t\t/// </summary>\r\n\t\tpublic DataTemplate PieChartLabelItemTemplate\r\n\t\t{\r\n\t\t\tget { return (DataTemplate)this.GetValue(PieChartLabelItemTemplateProperty); }\r\n\t\t\tset { this.SetValue(PieChartLabelItemTemplateProperty, value); }\r\n\t\t}\r\n\r\n\t\tpublic static readonly DependencyProperty PieChartLabelItemTemplateProperty =\r\n\t\t\tDependencyProperty.Register(\"PieChartLabelItemTemplate\", typeof(DataTemplate), typeof(LabeledPieSeries));\r\n\r\n\t\t/// <summary>\r\n\t\t/// LabelDisplayMode DP - Controls the mode in which the labels should appear.\r\n\t\t/// </summary>\r\n\t\tpublic DisplayMode LabelDisplayMode\r\n\t\t{\r\n\t\t\tget { return (DisplayMode)this.GetValue(LabelDisplayModeProperty); }\r\n\t\t\tset { this.SetValue(LabelDisplayModeProperty, value); }\r\n\t\t}\r\n\r\n\t\tpublic static readonly DependencyProperty LabelDisplayModeProperty =\r\n\t\t\tDependencyProperty.Register(\"LabelDisplayMode\", typeof(DisplayMode), typeof(LabeledPieSeries), new PropertyMetadata(DisplayMode.AutoMixed));\r\n\r\n\t\t/// <summary>\r\n\t\t/// Adds the labels to each of its PieDataPoints.\r\n\t\t/// </summary>\r\n\t\tprotected override void OnAfterUpdateDataPoints()\r\n\t\t{\r\n\t\t\tvar chart = this.SeriesHost as Chart;\r\n\t\t\tif (chart != null)\r\n\t\t\t{\r\n\t\t\t\tCanvas labelArea = chart.Template.FindName(\"LabelArea_PART\", chart) as Canvas;\r\n\t\t\t\tif (labelArea != null && this.ItemsSource != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tforeach (object dataItem in this.ItemsSource)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tPieDataPoint pieDataPoint = this.GetDataPoint(dataItem) as PieDataPoint;\r\n\t\t\t\t\t\tif (pieDataPoint != null)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tthis.AddLabelPieDataPoint(pieDataPoint, labelArea);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/// <summary>\r\n\t\t/// Creates a new PieChartLabel control and adds it to the \"LabelArea_PART\" canvas.\r\n\t\t/// </summary>\r\n\t\t/// <param name=\"pieDataPoint\">PieDataPoint that corresponds to PieChartLabel.</param>\r\n\t\t/// <param name=\"labelStyle\">The style to be applied to the PieChartLabel.</param>\r\n\t\t/// <param name=\"labelArea\">The canvas where PieChartLabel will be added.</param>\r\n\t\tprivate void AddLabelPieDataPoint(PieDataPoint pieDataPoint, Canvas labelArea)\r\n\t\t{\r\n\t\t\tPieChartLabel label = new PieChartLabel();\r\n\t\t\tlabel.Style = this.PieChartLabelStyle;\r\n\t\t\tlabel.ContentTemplate = this.PieChartLabelItemTemplate;\r\n\r\n\t\t\tBinding contentBinding = new Binding(\"DataContext\") { Source = pieDataPoint };\r\n\t\t\tlabel.SetBinding(ContentControl.ContentProperty, contentBinding);\r\n\r\n\t\t\tBinding dataContextBinding = new Binding(\"DataContext\") { Source = pieDataPoint };\r\n\t\t\tlabel.SetBinding(ContentControl.DataContextProperty, contentBinding);\r\n\r\n\t\t\tBinding formattedRatioBinding = new Binding(\"FormattedRatio\") { Source = pieDataPoint };\r\n\t\t\tlabel.SetBinding(PieChartLabel.FormattedRatioProperty, formattedRatioBinding);\r\n\r\n\t\t\tBinding visibilityBinding = new Binding(\"Ratio\") { Source = pieDataPoint, Converter = new DoubleToVisibilityConverter() };\r\n\t\t\tlabel.SetBinding(PieChartLabel.VisibilityProperty, visibilityBinding);\r\n\r\n\t\t\tBinding geometryBinding = new Binding(\"Geometry\") { Source = pieDataPoint };\r\n\t\t\tlabel.SetBinding(PieChartLabel.GeometryProperty, geometryBinding);\r\n\r\n\t\t\tBinding displayModeBinding = new Binding(\"LabelDisplayMode\") { Source = this };\r\n\t\t\tlabel.SetBinding(PieChartLabel.DisplayModeProperty, displayModeBinding);\r\n\r\n\t\t\tlabelArea.Children.Add(label);\r\n\t\t\tpieDataPoint.Unloaded += delegate\r\n\t\t\t{\r\n\t\t\t\tlabelArea.Children.Remove(label);\r\n\t\t\t};\r\n\r\n\t\t\tpieDataPoint.Loaded += delegate\r\n\t\t\t{\r\n\t\t\t\tif (label.Parent == null)\r\n\t\t\t\t{\r\n\t\t\t\t\tlabelArea.Children.Add(label);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/LegendItem.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Represents an item used by a Series in the Legend of a Chart.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public class LegendItem : ContentControl\r\n    {\r\n        /// <summary>\r\n        /// Gets or sets the owner of the LegendItem.\r\n        /// </summary>\r\n        public object Owner { get; set; }\r\n\r\n        /// <summary>\r\n        /// Initializes the static members of the LegendItem class.\r\n        /// </summary>\r\n        static LegendItem()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(LegendItem), new FrameworkPropertyMetadata(typeof(LegendItem)));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the LegendItem class.\r\n        /// </summary>\r\n        public LegendItem()\r\n        {\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/LineAreaBaseSeries.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Windows.Controls.DataVisualization.Collections;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// A base class that contains methods used by both the line and area series.\r\n    /// </summary>\r\n    /// <typeparam name=\"T\">The type of data point used by the series.</typeparam>\r\n    public abstract class LineAreaBaseSeries<T> : DataPointSingleSeriesWithAxes\r\n        where T : DataPoint, new()\r\n    {\r\n        #region public IRangeAxis DependentRangeAxis\r\n        /// <summary>\r\n        /// Gets or sets the dependent range axis.\r\n        /// </summary>\r\n        public IRangeAxis DependentRangeAxis\r\n        {\r\n            get { return GetValue(DependentRangeAxisProperty) as IRangeAxis; }\r\n            set { SetValue(DependentRangeAxisProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the DependentRangeAxis dependency property.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1000:DoNotDeclareStaticMembersOnGenericTypes\", Justification = \"This member is necessary because child classes need to share this dependency property.\")]\r\n        public static readonly DependencyProperty DependentRangeAxisProperty =\r\n            DependencyProperty.Register(\r\n                \"DependentRangeAxis\",\r\n                typeof(IRangeAxis),\r\n                typeof(LineAreaBaseSeries<T>),\r\n                new PropertyMetadata(null, OnDependentRangeAxisPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// DependentRangeAxisProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">LineAreaBaseSeries that changed its DependentRangeAxis.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnDependentRangeAxisPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            LineAreaBaseSeries<T> source = (LineAreaBaseSeries<T>)d;\r\n            IRangeAxis newValue = (IRangeAxis)e.NewValue;\r\n            source.OnDependentRangeAxisPropertyChanged(newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// DependentRangeAxisProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        private void OnDependentRangeAxisPropertyChanged(IRangeAxis newValue)\r\n        {\r\n            this.InternalDependentAxis = (IAxis)newValue;\r\n        }\r\n        #endregion public IRangeAxis DependentRangeAxis\r\n\r\n        #region public IAxis IndependentAxis\r\n        /// <summary>\r\n        /// Gets or sets the independent range axis.\r\n        /// </summary>\r\n        public IAxis IndependentAxis\r\n        {\r\n            get { return GetValue(IndependentAxisProperty) as IAxis; }\r\n            set { SetValue(IndependentAxisProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the IndependentAxis dependency property.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1000:DoNotDeclareStaticMembersOnGenericTypes\", Justification = \"This member is necessary because child classes need to share this dependency property.\")]\r\n        public static readonly DependencyProperty IndependentAxisProperty =\r\n            DependencyProperty.Register(\r\n                \"IndependentAxis\",\r\n                typeof(IAxis),\r\n                typeof(LineAreaBaseSeries<T>),\r\n                new PropertyMetadata(null, OnIndependentAxisPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// IndependentAxisProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">LineAreaBaseSeries that changed its IndependentAxis.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnIndependentAxisPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            LineAreaBaseSeries<T> source = (LineAreaBaseSeries<T>)d;\r\n            IAxis newValue = (IAxis)e.NewValue;\r\n            source.OnIndependentAxisPropertyChanged(newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// IndependentAxisProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        private void OnIndependentAxisPropertyChanged(IAxis newValue)\r\n        {\r\n            this.InternalIndependentAxis = (IAxis)newValue;\r\n        }\r\n        #endregion public IAxis IndependentAxis\r\n\r\n        /// <summary>\r\n        /// Gets data points collection sorted by independent value.\r\n        /// </summary>\r\n        internal OrderedMultipleDictionary<IComparable, DataPoint> DataPointsByIndependentValue { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Gets the independent axis as a range axis.\r\n        /// </summary>\r\n        public IAxis ActualIndependentAxis { get { return this.InternalActualIndependentAxis as IAxis; } }\r\n\r\n        /// <summary>\r\n        /// Gets the dependent axis as a range axis.\r\n        /// </summary>\r\n        public IRangeAxis ActualDependentRangeAxis { get { return this.InternalActualDependentAxis as IRangeAxis; } }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the LineAreaBaseSeries class.\r\n        /// </summary>\r\n        protected LineAreaBaseSeries()\r\n        {\r\n            DataPointsByIndependentValue =\r\n                new OrderedMultipleDictionary<IComparable, DataPoint>(\r\n                    false,\r\n                    (left, right) =>\r\n                        left.CompareTo(right),\r\n                    (leftDataPoint, rightDataPoint) =>\r\n                            RuntimeHelpers.GetHashCode(leftDataPoint).CompareTo(RuntimeHelpers.GetHashCode(rightDataPoint)));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates a DataPoint for determining the line color.\r\n        /// </summary>\r\n        public override void OnApplyTemplate()\r\n        {\r\n            base.OnApplyTemplate();\r\n            if (null != PlotArea)\r\n            {\r\n                Grid grid = new Grid();\r\n                DataPoint dataPoint = CreateDataPoint();\r\n                dataPoint.Visibility = Visibility.Collapsed;\r\n                dataPoint.Loaded += delegate\r\n                {\r\n                    dataPoint.SetStyle(ActualDataPointStyle);\r\n                    Background = dataPoint.Background;\r\n                    if (null != PlotArea)\r\n                    {\r\n                        PlotArea.Children.Remove(grid);\r\n                    }\r\n                };\r\n                grid.Children.Add(dataPoint);\r\n                PlotArea.Children.Add(grid);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called after data points have been loaded from the items source.\r\n        /// </summary>\r\n        /// <param name=\"newDataPoints\">New active data points.</param>\r\n        /// <param name=\"oldDataPoints\">Old inactive data points.</param>\r\n        protected override void OnDataPointsChanged(IList<DataPoint> newDataPoints, IList<DataPoint> oldDataPoints)\r\n        {\r\n            base.OnDataPointsChanged(newDataPoints, oldDataPoints);\r\n\r\n            if (ActualIndependentAxis is IRangeAxis)\r\n            {\r\n                foreach (DataPoint dataPoint in oldDataPoints)\r\n                {\r\n                    DataPointsByIndependentValue.Remove((IComparable)dataPoint.IndependentValue, dataPoint);\r\n                }\r\n\r\n                foreach (DataPoint dataPoint in newDataPoints)\r\n                {\r\n                    DataPointsByIndependentValue.Add((IComparable)dataPoint.IndependentValue, dataPoint);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// This method executes after all data points have been updated.\r\n        /// </summary>\r\n        protected override void OnAfterUpdateDataPoints()\r\n        {\r\n            if (InternalActualDependentAxis != null && InternalActualIndependentAxis != null)\r\n            {\r\n                UpdateShape();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Repositions line data point in the sorted collection if the actual \r\n        /// independent axis is a range axis.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point that has changed.</param>\r\n        /// <param name=\"oldValue\">The old value.</param>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        protected override void OnDataPointIndependentValueChanged(DataPoint dataPoint, object oldValue, object newValue)\r\n        {\r\n            if (ActualIndependentAxis is IRangeAxis && !oldValue.Equals(newValue))\r\n            {\r\n                bool removed = DataPointsByIndependentValue.Remove((IComparable)oldValue, dataPoint);\r\n                if (removed)\r\n                {\r\n                    DataPointsByIndependentValue.Add((IComparable)newValue, dataPoint);\r\n                }\r\n            }\r\n\r\n            base.OnDataPointIndependentValueChanged(dataPoint, oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates a new line data point.\r\n        /// </summary>\r\n        /// <returns>A line data point.</returns>\r\n        protected override DataPoint CreateDataPoint()\r\n        {\r\n            return new T();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the custom ResourceDictionary to use for necessary resources.\r\n        /// </summary>\r\n        /// <returns>\r\n        /// ResourceDictionary to use for necessary resources.\r\n        /// </returns>\r\n        protected override IEnumerator<ResourceDictionary> GetResourceDictionaryEnumeratorFromHost()\r\n        {\r\n            return GetResourceDictionaryWithTargetType(SeriesHost, typeof(T), true);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the visual representation of the data point.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point to update.</param>\r\n        protected override void UpdateDataPoint(DataPoint dataPoint)\r\n        {\r\n            double maximum = ActualDependentRangeAxis.GetPlotAreaCoordinate(ActualDependentRangeAxis.Range.Maximum).Value;\r\n            if (ValueHelper.CanGraph(maximum))\r\n            {\r\n                double x = ActualIndependentAxis.GetPlotAreaCoordinate(dataPoint.ActualIndependentValue).Value;\r\n                double y = ActualDependentRangeAxis.GetPlotAreaCoordinate(dataPoint.ActualDependentValue).Value;\r\n\r\n                if (ValueHelper.CanGraph(x) && ValueHelper.CanGraph(y))\r\n                {\r\n                    dataPoint.Visibility = Visibility.Visible;\r\n\r\n                    double coordinateY = Math.Round(maximum - (y + (dataPoint.ActualHeight / 2)));\r\n                    Canvas.SetTop(dataPoint, coordinateY);\r\n                    double coordinateX = Math.Round(x - (dataPoint.ActualWidth / 2));\r\n                    Canvas.SetLeft(dataPoint, coordinateX);\r\n                }\r\n                else\r\n                {\r\n                    dataPoint.Visibility = Visibility.Collapsed;\r\n                }\r\n            }\r\n\r\n            if (!UpdatingDataPoints)\r\n            {\r\n                UpdateShape();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the Series shape object.\r\n        /// </summary>\r\n        protected virtual void UpdateShape()\r\n        {\r\n            double maximum = ActualDependentRangeAxis.GetPlotAreaCoordinate(ActualDependentRangeAxis.Range.Maximum).Value;\r\n\r\n            Func<DataPoint, Point> createPoint =\r\n                dataPoint =>\r\n                    new Point(\r\n                        ActualIndependentAxis.GetPlotAreaCoordinate(dataPoint.ActualIndependentValue).Value,\r\n                        maximum - ActualDependentRangeAxis.GetPlotAreaCoordinate(dataPoint.ActualDependentValue).Value);\r\n\r\n            IEnumerable<Point> points = Enumerable.Empty<Point>();\r\n            if (ValueHelper.CanGraph(maximum))\r\n            {\r\n                if (ActualIndependentAxis is IRangeAxis)\r\n                {\r\n                    points = DataPointsByIndependentValue.Select(createPoint);\r\n                }\r\n                else\r\n                {\r\n                    points =\r\n                        ActiveDataPoints\r\n                            .Select(createPoint)\r\n                            .OrderBy(point => point.X);\r\n                }\r\n            }\r\n            UpdateShapeFromPoints(points);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the Series shape object from a collection of Points.\r\n        /// </summary>\r\n        /// <param name=\"points\">Collection of Points.</param>\r\n        protected abstract void UpdateShapeFromPoints(IEnumerable<Point> points);\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/LineSeries.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\nusing System.Windows.Media;\r\nusing System.Windows.Shapes;\r\n\r\n#if !DEFINITION_SERIES_COMPATIBILITY_MODE\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Represents a control that contains a data series to be rendered in X/Y \r\n    /// line format.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    [StyleTypedProperty(Property = DataPointStyleName, StyleTargetType = typeof(LineDataPoint))]\r\n    [StyleTypedProperty(Property = \"LegendItemStyle\", StyleTargetType = typeof(LegendItem))]\r\n    [StyleTypedProperty(Property = \"PolylineStyle\", StyleTargetType = typeof(Polyline))]\r\n    [TemplatePart(Name = DataPointSeries.PlotAreaName, Type = typeof(Canvas))]\r\n    [SuppressMessage(\"Microsoft.Maintainability\", \"CA1501:AvoidExcessiveInheritance\", Justification = \"Depth of hierarchy is necessary to avoid code duplication.\")]\r\n    public partial class LineSeries : LineAreaBaseSeries<LineDataPoint>\r\n    {\r\n        #region public PointCollection Points\r\n        /// <summary>\r\n        /// Gets the collection of points that make up the line.\r\n        /// </summary>\r\n        public PointCollection Points\r\n        {\r\n            get { return GetValue(PointsProperty) as PointCollection; }\r\n            private set { SetValue(PointsProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Points dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty PointsProperty =\r\n            DependencyProperty.Register(\r\n                \"Points\",\r\n                typeof(PointCollection),\r\n                typeof(LineSeries),\r\n                null);\r\n        #endregion public PointCollection Points\r\n\r\n        #region public Style PolylineStyle\r\n        /// <summary>\r\n        /// Gets or sets the style of the Polyline object that follows the data \r\n        /// points.\r\n        /// </summary>\r\n        [System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Polyline\", Justification = \"Matches System.Windows.Shapes.Polyline.\")]\r\n        public Style PolylineStyle\r\n        {\r\n            get { return GetValue(PolylineStyleProperty) as Style; }\r\n            set { SetValue(PolylineStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the PolylineStyle dependency property.\r\n        /// </summary>\r\n        [System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Polyline\", Justification = \"Matches System.Windows.Shapes.Polyline.\")]\r\n        public static readonly DependencyProperty PolylineStyleProperty =\r\n            DependencyProperty.Register(\r\n                \"PolylineStyle\",\r\n                typeof(Style),\r\n                typeof(LineSeries),\r\n                null);\r\n        #endregion public Style PolylineStyle\r\n\r\n        /// <summary>\r\n        /// Initializes the static members of the LineSeries class.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1810:InitializeReferenceTypeStaticFieldsInline\", Justification = \"Dependency properties are initialized in-line.\")]\r\n        static LineSeries()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(LineSeries), new FrameworkPropertyMetadata(typeof(LineSeries)));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the LineSeries class.\r\n        /// </summary>\r\n        public LineSeries()\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Acquire a horizontal linear axis and a vertical linear axis.\r\n        /// </summary>\r\n        /// <param name=\"firstDataPoint\">The first data point.</param>\r\n        protected override void GetAxes(DataPoint firstDataPoint)\r\n        {\r\n            GetAxes(\r\n                firstDataPoint,\r\n                (axis) => axis.Orientation == AxisOrientation.X,\r\n                () =>\r\n                {\r\n                    IAxis axis = CreateRangeAxisFromData(firstDataPoint.IndependentValue);\r\n                    if (axis == null)\r\n                    {\r\n                        axis = new CategoryAxis();\r\n                    }\r\n                    axis.Orientation = AxisOrientation.X;\r\n                    return axis;\r\n                },\r\n                (axis) => axis.Orientation == AxisOrientation.Y && axis is IRangeAxis,\r\n                () =>\r\n                {\r\n                    DisplayAxis axis = (DisplayAxis)CreateRangeAxisFromData(firstDataPoint.DependentValue);\r\n                    if (axis == null)\r\n                    {\r\n                        throw new InvalidOperationException(Properties.Resources.DataPointSeriesWithAxes_NoSuitableAxisAvailableForPlottingDependentValue);\r\n                    }\r\n                    axis.ShowGridLines = true;\r\n                    axis.Orientation = AxisOrientation.Y;\r\n                    return axis;\r\n                });\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the Series shape object from a collection of Points.\r\n        /// </summary>\r\n        /// <param name=\"points\">Collection of Points.</param>\r\n        protected override void UpdateShapeFromPoints(IEnumerable<Point> points)\r\n        {\r\n            if (points.Any())\r\n            {\r\n                PointCollection pointCollection = new PointCollection();\r\n                foreach (Point point in points)\r\n                {\r\n                    pointCollection.Add(point);\r\n                }\r\n                Points = pointCollection;\r\n            }\r\n            else\r\n            {\r\n                Points = null;\r\n            }\r\n        }\r\n    }\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/PieSeries.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Represents a control that contains a data series to be rendered in pie\r\n    /// format.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    [StyleTypedProperty(Property = DataPointStyleName, StyleTargetType = typeof(PieDataPoint))]\r\n    [StyleTypedProperty(Property = \"LegendItemStyle\", StyleTargetType = typeof(LegendItem))]\r\n    [TemplatePart(Name = DataPointSeries.PlotAreaName, Type = typeof(Canvas))]\r\n    public partial class PieSeries : DataPointSeries, IResourceDictionaryDispenser, IRequireGlobalSeriesIndex\r\n    {\r\n        #region public Collection<ResourceDictionary> Palette\r\n        /// <summary>\r\n        /// Gets or sets a palette of ResourceDictionaries used by the series.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA2227:CollectionPropertiesShouldBeReadOnly\", Justification = \"Want to allow this to be set from XAML.\")]\r\n        public Collection<ResourceDictionary> Palette\r\n        {\r\n            get { return GetValue(PaletteProperty) as Collection<ResourceDictionary>; }\r\n            set { SetValue(PaletteProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Palette dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty PaletteProperty =\r\n            DependencyProperty.Register(\r\n                \"Palette\",\r\n                typeof(Collection<ResourceDictionary>),\r\n                typeof(Series),\r\n                new PropertyMetadata(OnPalettePropertyChanged));\r\n\r\n        /// <summary>\r\n        /// PaletteProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">Parent that changed its Palette.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnPalettePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            PieSeries source = d as PieSeries;\r\n            Collection<ResourceDictionary> newValue = e.NewValue as Collection<ResourceDictionary>;\r\n            source.OnPalettePropertyChanged(newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// PaletteProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        private void OnPalettePropertyChanged(Collection<ResourceDictionary> newValue)\r\n        {\r\n            ResourceDictionaryDispenser.ResourceDictionaries = newValue;\r\n        }\r\n        #endregion public Collection<ResourceDictionary> Palette\r\n\r\n        /// <summary>\r\n        /// The pie data point style enumerator.\r\n        /// </summary>\r\n        private IEnumerator<ResourceDictionary> _resourceDictionaryEnumerator;\r\n\r\n        /// <summary>\r\n        /// Initializes the static members of the PieSeries class.\r\n        /// </summary>\r\n        static PieSeries()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(PieSeries), new FrameworkPropertyMetadata(typeof(PieSeries)));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the PieSeries class.\r\n        /// </summary>\r\n        public PieSeries()\r\n        {\r\n            this.ResourceDictionaryDispenser = new ResourceDictionaryDispenser();\r\n            ResourceDictionaryDispenser.ResourceDictionariesChanged += delegate\r\n            {\r\n                OnResourceDictionariesChanged(EventArgs.Empty);\r\n            };\r\n        }\r\n\r\n        /// <summary>\r\n        /// Invokes the ResourceDictionariesChanged event.\r\n        /// </summary>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        protected virtual void OnResourceDictionariesChanged(EventArgs e)\r\n        {\r\n            // Update with new styles\r\n            Refresh();\r\n\r\n            // Forward event on to listeners\r\n            EventHandler handler = ResourceDictionariesChanged;\r\n            if (null != handler)\r\n            {\r\n                handler.Invoke(this, e);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// A dictionary that links data points to their legend items.\r\n        /// </summary>\r\n        private Dictionary<DataPoint, LegendItem> _dataPointLegendItems = new Dictionary<DataPoint, LegendItem>();\r\n\r\n        /// <summary>\r\n        /// Accepts a ratio of a full rotation, the x and y length and returns\r\n        /// the 2D point using trigonometric functions.\r\n        /// </summary>\r\n        /// <param name=\"ratio\">The ratio of a full rotation [0..1].</param>\r\n        /// <param name=\"radiusX\">The x radius.</param>\r\n        /// <param name=\"radiusY\">The y radius.</param>\r\n        /// <returns>The corresponding 2D point.</returns>\r\n        private static Point ConvertRatioOfRotationToPoint(double ratio, double radiusX, double radiusY)\r\n        {\r\n            double radians = (((ratio * 360) - 90) * (Math.PI / 180));\r\n            return new Point(radiusX * Math.Cos(radians), radiusY * Math.Sin(radians));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates a legend item for each data point.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point added.</param>\r\n        protected override void AddDataPoint(DataPoint dataPoint)\r\n        {\r\n            base.AddDataPoint(dataPoint);\r\n            PieDataPoint pieDataPoint = (PieDataPoint)dataPoint;\r\n\r\n            int index = ActiveDataPoints.IndexOf(dataPoint) + 1;\r\n            LegendItem legendItem = CreatePieLegendItem(dataPoint, index);\r\n\r\n            // Grab a style enumerator if we don't have one already.\r\n            if (_resourceDictionaryEnumerator == null)\r\n            {\r\n                _resourceDictionaryEnumerator = GetResourceDictionaryWithTargetType(this, typeof(PieDataPoint), true);\r\n            }\r\n\r\n            if (_resourceDictionaryEnumerator.MoveNext())\r\n            {\r\n                ResourceDictionary paletteResources = _resourceDictionaryEnumerator.Current;\r\n                pieDataPoint.PaletteResources = paletteResources;\r\n                pieDataPoint.Resources.MergedDictionaries.Add(paletteResources);\r\n            }\r\n            else\r\n            {\r\n                pieDataPoint.PaletteResources = null;\r\n            }\r\n            pieDataPoint.ActualDataPointStyle = DataPointStyle ?? pieDataPoint.Resources[DataPointStyleName] as Style;\r\n            pieDataPoint.SetBinding(PieDataPoint.StyleProperty, new Binding(PieDataPoint.ActualDataPointStyleName) { Source = pieDataPoint });\r\n            pieDataPoint.ActualLegendItemStyle = LegendItemStyle ?? (pieDataPoint.Resources[LegendItemStyleName] as Style);\r\n            legendItem.SetBinding(LegendItem.StyleProperty, new Binding(ActualLegendItemStyleName) { Source = pieDataPoint });\r\n\r\n            _dataPointLegendItems[dataPoint] = legendItem;\r\n            LegendItems.Add(legendItem);\r\n            UpdateLegendItemIndexes();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes data point's legend item when the data point is removed.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point to remove.</param>\r\n        protected override void RemoveDataPoint(DataPoint dataPoint)\r\n        {\r\n            base.RemoveDataPoint(dataPoint);\r\n            if (dataPoint != null)\r\n            {\r\n                LegendItem legendItem = _dataPointLegendItems[dataPoint];\r\n                _dataPointLegendItems.Remove(dataPoint);\r\n\r\n                LegendItems.Remove(legendItem);\r\n                UpdateLegendItemIndexes();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates a data point.\r\n        /// </summary>\r\n        /// <returns>A data point.</returns>\r\n        protected override DataPoint CreateDataPoint()\r\n        {\r\n            return new PieDataPoint();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the active pie data points.\r\n        /// </summary>\r\n        private IEnumerable<PieDataPoint> ActivePieDataPoints\r\n        {\r\n            get { return ActiveDataPoints.OfType<PieDataPoint>(); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates all ratios before data points are updated.\r\n        /// </summary>\r\n        protected override void OnBeforeUpdateDataPoints()\r\n        {\r\n            UpdateRatios();\r\n\r\n            base.OnBeforeUpdateDataPoints();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called after data points have been loaded from the items source.\r\n        /// </summary>\r\n        /// <param name=\"newDataPoints\">New active data points.</param>\r\n        /// <param name=\"oldDataPoints\">Old inactive data points.</param>\r\n        protected override void OnDataPointsChanged(IList<DataPoint> newDataPoints, IList<DataPoint> oldDataPoints)\r\n        {\r\n            UpdateDataPoints(newDataPoints);\r\n            base.OnDataPointsChanged(newDataPoints, oldDataPoints);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the indexes of all legend items when a change is made to the collection.\r\n        /// </summary>\r\n        private void UpdateLegendItemIndexes()\r\n        {\r\n            int index = 0;\r\n            foreach (DataPoint dataPoint in ActiveDataPoints)\r\n            {\r\n                LegendItem legendItem = _dataPointLegendItems[dataPoint];\r\n                legendItem.Content = dataPoint.IndependentValue ?? (index + 1);\r\n                index++;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the ratios of each data point.\r\n        /// </summary>\r\n        private void UpdateRatios()\r\n        {\r\n            double sum = ActivePieDataPoints.Select(pieDataPoint => Math.Abs(ValueHelper.ToDouble(pieDataPoint.DependentValue))).Sum();\r\n\r\n            // Priming the loop by calculating initial value of \r\n            // offset ratio and its corresponding points.\r\n            double offsetRatio = 0;\r\n            foreach (PieDataPoint dataPoint in ActivePieDataPoints)\r\n            {\r\n                double dependentValue = Math.Abs(ValueHelper.ToDouble(dataPoint.DependentValue));\r\n                double ratio = dependentValue / sum;\r\n                if (!ValueHelper.CanGraph(ratio))\r\n                {\r\n                    ratio = 0.0;\r\n                }\r\n                dataPoint.Ratio = ratio;\r\n                dataPoint.OffsetRatio = offsetRatio;\r\n                offsetRatio += ratio;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates a data point.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point to update.</param>\r\n        protected override void UpdateDataPoint(DataPoint dataPoint)\r\n        {\r\n            PieDataPoint pieDataPoint = (PieDataPoint) dataPoint;\r\n            pieDataPoint.Width = ActualWidth;\r\n            pieDataPoint.Height = ActualHeight;\r\n            UpdatePieDataPointGeometry(pieDataPoint, ActualWidth, ActualHeight);\r\n            Canvas.SetLeft(pieDataPoint, 0);\r\n            Canvas.SetTop(pieDataPoint, 0);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the PieDataPoint's Geometry property.\r\n        /// </summary>\r\n        /// <param name=\"pieDataPoint\">PieDataPoint instance.</param>\r\n        /// <param name=\"plotAreaWidth\">PlotArea width.</param>\r\n        /// <param name=\"plotAreaHeight\">PlotArea height.</param>\r\n        internal static void UpdatePieDataPointGeometry(PieDataPoint pieDataPoint, double plotAreaWidth, double plotAreaHeight)\r\n        {\r\n            double diameter = (plotAreaWidth < plotAreaHeight) ? plotAreaWidth : plotAreaHeight;\r\n            diameter *= 0.95;\r\n            double plotAreaRadius = diameter / 2;\r\n            double maxDistanceFromCenter = 0.0;\r\n            double sliceRadius = plotAreaRadius - maxDistanceFromCenter;\r\n\r\n            Point translatePoint = new Point(plotAreaWidth / 2, plotAreaHeight / 2);\r\n\r\n            if (pieDataPoint.ActualRatio == 1)\r\n            {\r\n                foreach (DependencyProperty dependencyProperty in new DependencyProperty[] { PieDataPoint.GeometryProperty, PieDataPoint.GeometrySelectionProperty, PieDataPoint.GeometryHighlightProperty })\r\n                {\r\n                    Geometry geometry =\r\n                        new EllipseGeometry\r\n                        {\r\n                            Center = translatePoint,\r\n                            RadiusX = sliceRadius,\r\n                            RadiusY = sliceRadius\r\n                        };\r\n                    pieDataPoint.SetValue(dependencyProperty, geometry);\r\n                }\r\n            }\r\n            else\r\n            {\r\n                if (pieDataPoint.ActualRatio == 0.0)\r\n                {\r\n                    pieDataPoint.Geometry = null;\r\n                    pieDataPoint.GeometryHighlight = null;\r\n                    pieDataPoint.GeometrySelection = null;\r\n                }\r\n                else\r\n                {\r\n                    double ratio = pieDataPoint.ActualRatio;\r\n                    double offsetRatio = pieDataPoint.ActualOffsetRatio;\r\n                    double currentRatio = offsetRatio + ratio;\r\n\r\n                    Point offsetRatioPoint = ConvertRatioOfRotationToPoint(offsetRatio, sliceRadius, sliceRadius);\r\n\r\n                    Point adjustedOffsetRatioPoint = offsetRatioPoint.Translate(translatePoint);\r\n\r\n                    // Calculate the last clockwise point in the pie slice\r\n                    Point currentRatioPoint =\r\n                        ConvertRatioOfRotationToPoint(currentRatio, sliceRadius, sliceRadius);\r\n\r\n                    // Adjust point using center of plot area as origin\r\n                    // instead of 0,0\r\n                    Point adjustedCurrentRatioPoint =\r\n                        currentRatioPoint.Translate(translatePoint);\r\n\r\n                    foreach (DependencyProperty dependencyProperty in new DependencyProperty[] { PieDataPoint.GeometryProperty, PieDataPoint.GeometrySelectionProperty, PieDataPoint.GeometryHighlightProperty })\r\n                    {\r\n                        // Creating the pie slice geometry object\r\n                        PathFigure pathFigure = new PathFigure { IsClosed = true };\r\n                        pathFigure.StartPoint = translatePoint;\r\n                        pathFigure.Segments.Add(new LineSegment { Point = adjustedOffsetRatioPoint });\r\n                        bool isLargeArc = (currentRatio - offsetRatio) > 0.5;\r\n                        pathFigure.Segments.Add(\r\n                            new ArcSegment\r\n                            {\r\n                                Point = adjustedCurrentRatioPoint,\r\n                                IsLargeArc = isLargeArc,\r\n                                Size = new Size(sliceRadius, sliceRadius),\r\n                                SweepDirection = SweepDirection.Clockwise\r\n                            });\r\n\r\n                        PathGeometry pathGeometry = new PathGeometry();\r\n                        pathGeometry.Figures.Add(pathFigure);\r\n                        pieDataPoint.SetValue(dependencyProperty, pathGeometry);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates a legend item from a data point.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point to use to create the legend item.</param>\r\n        /// <param name=\"index\">The 1-based index of the Control.</param>\r\n        /// <returns>The series host legend item.</returns>\r\n        protected virtual LegendItem CreatePieLegendItem(DataPoint dataPoint, int index)\r\n        {\r\n            LegendItem legendItem = CreateLegendItem(this);\r\n            // Set the Content of the LegendItem\r\n            legendItem.Content = dataPoint.IndependentValue ?? index;\r\n            // Create a representative DataPoint for access to styled properties\r\n            DataPoint legendDataPoint = CreateDataPoint();\r\n            legendDataPoint.DataContext = dataPoint.DataContext;\r\n            if (null != PlotArea)\r\n            {\r\n                // Bounce into the visual tree to get default Style applied\r\n                PlotArea.Children.Add(legendDataPoint);\r\n                PlotArea.Children.Remove(legendDataPoint);\r\n            }\r\n            legendDataPoint.SetBinding(DataPoint.StyleProperty, new Binding(PieDataPoint.ActualDataPointStyleName) { Source = dataPoint });\r\n            legendItem.DataContext = legendDataPoint;\r\n            return legendItem;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Attach event handlers to a data point.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point.</param>\r\n        protected override void AttachEventHandlersToDataPoint(DataPoint dataPoint)\r\n        {\r\n            PieDataPoint pieDataPoint = dataPoint as PieDataPoint;\r\n\r\n            pieDataPoint.ActualRatioChanged += OnPieDataPointActualRatioChanged;\r\n            pieDataPoint.ActualOffsetRatioChanged += OnPieDataPointActualOffsetRatioChanged;\r\n            pieDataPoint.RatioChanged += OnPieDataPointRatioChanged;\r\n            pieDataPoint.OffsetRatioChanged += OnPieDataPointOffsetRatioChanged;\r\n\r\n            base.AttachEventHandlersToDataPoint(dataPoint);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Detaches event handlers from a data point.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point.</param>\r\n        protected override void DetachEventHandlersFromDataPoint(DataPoint dataPoint)\r\n        {\r\n            PieDataPoint pieDataPoint = dataPoint as PieDataPoint;\r\n\r\n            pieDataPoint.ActualRatioChanged -= OnPieDataPointActualRatioChanged;\r\n            pieDataPoint.ActualOffsetRatioChanged -= OnPieDataPointActualOffsetRatioChanged;\r\n            pieDataPoint.RatioChanged -= OnPieDataPointRatioChanged;\r\n            pieDataPoint.OffsetRatioChanged -= OnPieDataPointOffsetRatioChanged;\r\n\r\n            base.DetachEventHandlersFromDataPoint(dataPoint);\r\n        }\r\n\r\n        /// <summary>\r\n        /// This method updates the global series index property.\r\n        /// </summary>\r\n        /// <param name=\"globalIndex\">The global index of the series.</param>\r\n        public void GlobalSeriesIndexChanged(int? globalIndex)\r\n        {\r\n            // Do nothing because we want to use up an index but do nothing \r\n            // with it.\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the data point when the dependent value is changed.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point.</param>\r\n        /// <param name=\"oldValue\">The old value.</param>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        protected override void OnDataPointDependentValueChanged(DataPoint dataPoint, IComparable oldValue, IComparable newValue)\r\n        {\r\n            UpdateRatios();\r\n            base.OnDataPointDependentValueChanged(dataPoint, oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the data point when the independent value is changed.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point.</param>\r\n        /// <param name=\"oldValue\">The old value.</param>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        protected override void OnDataPointIndependentValueChanged(DataPoint dataPoint, object oldValue, object newValue)\r\n        {\r\n            _dataPointLegendItems[dataPoint].Content = newValue;\r\n            base.OnDataPointIndependentValueChanged(dataPoint, oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the data point when the pie data point's actual ratio is\r\n        /// changed.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source of the event.</param>\r\n        /// <param name=\"args\">Information about the event.</param>\r\n        private void OnPieDataPointActualRatioChanged(object sender, RoutedPropertyChangedEventArgs<double> args)\r\n        {\r\n            UpdateDataPoint(sender as DataPoint);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the data point when the pie data point's actual offset ratio\r\n        /// is changed.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source of the event.</param>\r\n        /// <param name=\"args\">Information about the event.</param>\r\n        private void OnPieDataPointActualOffsetRatioChanged(object sender, RoutedPropertyChangedEventArgs<double> args)\r\n        {\r\n            UpdateDataPoint(sender as DataPoint);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the data point when the pie data point's ratio is changed.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source of the event.</param>\r\n        /// <param name=\"args\">Information about the event.</param>\r\n        private void OnPieDataPointRatioChanged(object sender, RoutedPropertyChangedEventArgs<double> args)\r\n        {\r\n            DataPoint dataPoint = sender as DataPoint;\r\n            dataPoint.BeginAnimation(PieDataPoint.ActualRatioProperty, \"ActualRatio\", args.NewValue, TransitionDuration, this.TransitionEasingFunction);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the data point when the pie data point's offset ratio is \r\n        /// changed.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source of the event.</param>\r\n        /// <param name=\"args\">Information about the event.</param>\r\n        private void OnPieDataPointOffsetRatioChanged(object sender, RoutedPropertyChangedEventArgs<double> args)\r\n        {\r\n            DataPoint dataPoint = sender as DataPoint;\r\n            dataPoint.BeginAnimation(PieDataPoint.ActualOffsetRatioProperty, \"ActualOffsetRatio\", args.NewValue, TransitionDuration, this.TransitionEasingFunction);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets an object used to dispense styles from the style \r\n        /// palette.\r\n        /// </summary>\r\n        private ResourceDictionaryDispenser ResourceDictionaryDispenser { get; set; }\r\n\r\n        /// <summary>\r\n        /// Event that is invoked when the ResourceDictionaryDispenser's collection has changed.\r\n        /// </summary>\r\n        public event EventHandler ResourceDictionariesChanged;\r\n\r\n        /// <summary>\r\n        /// Returns a rotating enumerator of ResourceDictionary objects that coordinates\r\n        /// with the dispenser object to ensure that no two enumerators are on the same\r\n        /// item. If the dispenser is reset or its collection is changed then the\r\n        /// enumerators are also reset.\r\n        /// </summary>\r\n        /// <param name=\"predicate\">A predicate that returns a value indicating\r\n        /// whether to return an item.</param>\r\n        /// <returns>An enumerator of ResourceDictionaries.</returns>\r\n        public IEnumerator<ResourceDictionary> GetResourceDictionariesWhere(Func<ResourceDictionary, bool> predicate)\r\n        {\r\n            return ResourceDictionaryDispenser.GetResourceDictionariesWhere(predicate);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the value of the SeriesHost property changes.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">The value to be replaced.</param>\r\n        /// <param name=\"newValue\">The new series host value.</param>\r\n        protected override void OnSeriesHostPropertyChanged(ISeriesHost oldValue, ISeriesHost newValue)\r\n        {\r\n            base.OnSeriesHostPropertyChanged(oldValue, newValue);\r\n\r\n            if (null != oldValue)\r\n            {\r\n                oldValue.ResourceDictionariesChanged -= new EventHandler(SeriesHostResourceDictionariesChanged);\r\n            }\r\n\r\n            if (null != newValue)\r\n            {\r\n                newValue.ResourceDictionariesChanged += new EventHandler(SeriesHostResourceDictionariesChanged);\r\n            }\r\n            else\r\n            {\r\n                // Dispose of the enumerator.\r\n                if (null != _resourceDictionaryEnumerator)\r\n                {\r\n                    _resourceDictionaryEnumerator.Dispose();\r\n                    _resourceDictionaryEnumerator = null;\r\n                }\r\n            }\r\n\r\n            this.ResourceDictionaryDispenser.Parent = newValue;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the SeriesHost's ResourceDictionariesChanged event.\r\n        /// </summary>\r\n        /// <param name=\"sender\">ISeriesHost instance.</param>\r\n        /// <param name=\"e\">Event args.</param>\r\n        private void SeriesHostResourceDictionariesChanged(object sender, EventArgs e)\r\n        {\r\n            Refresh();\r\n        }\r\n\r\n        /// <summary>\r\n        /// DataPointStyleProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        protected override void OnDataPointStylePropertyChanged(Style oldValue, Style newValue)\r\n        {\r\n            // Propagate change\r\n            foreach (PieDataPoint pieDataPoint in ActiveDataPoints)\r\n            {\r\n                pieDataPoint.ActualDataPointStyle = newValue ?? (pieDataPoint.Resources[DataPointStyleName] as Style);\r\n            }\r\n            base.OnDataPointStylePropertyChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the value of the LegendItemStyle property changes.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        protected override void OnLegendItemStylePropertyChanged(Style oldValue, Style newValue)\r\n        {\r\n            // Propagate change\r\n            foreach (PieDataPoint pieDataPoint in ActiveDataPoints)\r\n            {\r\n                pieDataPoint.ActualLegendItemStyle = newValue ?? (pieDataPoint.Resources[LegendItemStyleName] as Style);\r\n            }\r\n            base.OnLegendItemStylePropertyChanged(oldValue, newValue);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/ScatterSeries.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\n\r\n#if !DEFINITION_SERIES_COMPATIBILITY_MODE\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Represents a control that contains a data series to be rendered in X/Y scatter format.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    [StyleTypedProperty(Property = DataPointStyleName, StyleTargetType = typeof(ScatterDataPoint))]\r\n    [StyleTypedProperty(Property = \"LegendItemStyle\", StyleTargetType = typeof(LegendItem))]\r\n    [TemplatePart(Name = DataPointSeries.PlotAreaName, Type = typeof(Canvas))]\r\n    public partial class ScatterSeries : DataPointSingleSeriesWithAxes\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the ScatterSeries class.\r\n        /// </summary>\r\n        public ScatterSeries()\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the dependent axis as a range axis.\r\n        /// </summary>\r\n        public IRangeAxis ActualDependentRangeAxis { get { return this.InternalActualDependentAxis as IRangeAxis; } }\r\n\r\n        #region public IRangeAxis DependentRangeAxis\r\n        /// <summary>\r\n        /// Gets or sets the dependent range axis.\r\n        /// </summary>\r\n        public IRangeAxis DependentRangeAxis\r\n        {\r\n            get { return GetValue(DependentRangeAxisProperty) as IRangeAxis; }\r\n            set { SetValue(DependentRangeAxisProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the DependentRangeAxis dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty DependentRangeAxisProperty =\r\n            DependencyProperty.Register(\r\n                \"DependentRangeAxis\",\r\n                typeof(IRangeAxis),\r\n                typeof(ScatterSeries),\r\n                new PropertyMetadata(null, OnDependentRangeAxisPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// DependentRangeAxisProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">ScatterSeries that changed its DependentRangeAxis.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnDependentRangeAxisPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            ScatterSeries source = (ScatterSeries)d;\r\n            IRangeAxis newValue = (IRangeAxis)e.NewValue;\r\n            source.OnDependentRangeAxisPropertyChanged(newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// DependentRangeAxisProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        private void OnDependentRangeAxisPropertyChanged(IRangeAxis newValue)\r\n        {\r\n            this.InternalDependentAxis = (IAxis)newValue;\r\n        }\r\n        #endregion public IRangeAxis DependentRangeAxis\r\n\r\n        /// <summary>\r\n        /// Gets the independent axis as a range axis.\r\n        /// </summary>\r\n        public IAxis ActualIndependentAxis { get { return this.InternalActualIndependentAxis as IAxis; } }\r\n\r\n        #region public IAxis IndependentAxis\r\n        /// <summary>\r\n        /// Gets or sets the independent range axis.\r\n        /// </summary>\r\n        public IAxis IndependentAxis\r\n        {\r\n            get { return GetValue(IndependentAxisProperty) as IAxis; }\r\n            set { SetValue(IndependentAxisProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the IndependentAxis dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty IndependentAxisProperty =\r\n            DependencyProperty.Register(\r\n                \"IndependentAxis\",\r\n                typeof(IAxis),\r\n                typeof(ScatterSeries),\r\n                new PropertyMetadata(null, OnIndependentAxisPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// IndependentAxisProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">ScatterSeries that changed its IndependentAxis.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnIndependentAxisPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            ScatterSeries source = (ScatterSeries)d;\r\n            IAxis newValue = (IAxis)e.NewValue;\r\n            source.OnIndependentAxisPropertyChanged(newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// IndependentAxisProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        private void OnIndependentAxisPropertyChanged(IAxis newValue)\r\n        {\r\n            this.InternalIndependentAxis = (IAxis)newValue;\r\n        }\r\n        #endregion public IAxis IndependentAxis\r\n\r\n        /// <summary>\r\n        /// Acquire a horizontal linear axis and a vertical linear axis.\r\n        /// </summary>\r\n        /// <param name=\"firstDataPoint\">The first data point.</param>\r\n        protected override void GetAxes(DataPoint firstDataPoint)\r\n        {\r\n            GetAxes(\r\n                firstDataPoint,\r\n                (axis) => axis.Orientation == AxisOrientation.X,\r\n                () =>\r\n                {\r\n                    IAxis axis = CreateRangeAxisFromData(firstDataPoint.IndependentValue);\r\n                    if (axis == null)\r\n                    {\r\n                        axis = new CategoryAxis();\r\n                    }\r\n                    axis.Orientation = AxisOrientation.X;\r\n                    return axis;\r\n                },\r\n                (axis) => axis.Orientation == AxisOrientation.Y && axis is IRangeAxis,\r\n                () =>\r\n                {\r\n                    DisplayAxis axis = (DisplayAxis)CreateRangeAxisFromData(firstDataPoint.DependentValue);\r\n                    if (axis == null)\r\n                    {\r\n                        throw new InvalidOperationException(Properties.Resources.DataPointSeriesWithAxes_NoSuitableAxisAvailableForPlottingDependentValue);\r\n                    }\r\n                    axis.ShowGridLines = true;\r\n                    axis.Orientation = AxisOrientation.Y;\r\n                    return axis;\r\n                });\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates a new scatter data point.\r\n        /// </summary>\r\n        /// <returns>A scatter data point.</returns>\r\n        protected override DataPoint CreateDataPoint()\r\n        {\r\n            return new ScatterDataPoint();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the custom ResourceDictionary to use for necessary resources.\r\n        /// </summary>\r\n        /// <returns>\r\n        /// ResourceDictionary to use for necessary resources.\r\n        /// </returns>\r\n        protected override IEnumerator<ResourceDictionary> GetResourceDictionaryEnumeratorFromHost()\r\n        {\r\n            return GetResourceDictionaryWithTargetType(SeriesHost, typeof(ScatterDataPoint), true);\r\n        }\r\n\r\n        /// <summary>\r\n        /// This method updates a single data point.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">The data point to update.</param>\r\n        protected override void UpdateDataPoint(DataPoint dataPoint)\r\n        {\r\n            double PlotAreaHeight = ActualDependentRangeAxis.GetPlotAreaCoordinate(ActualDependentRangeAxis.Range.Maximum).Value;\r\n            double dataPointX = ActualIndependentAxis.GetPlotAreaCoordinate(dataPoint.ActualIndependentValue).Value;\r\n            double dataPointY = ActualDependentRangeAxis.GetPlotAreaCoordinate(dataPoint.ActualDependentValue).Value;\r\n\r\n            if (ValueHelper.CanGraph(dataPointX) && ValueHelper.CanGraph(dataPointY))\r\n            {\r\n                dataPoint.Visibility = Visibility.Visible;\r\n\r\n                // Set the Position\r\n                Canvas.SetLeft(\r\n                    dataPoint,\r\n                    Math.Round(dataPointX - (dataPoint.ActualWidth / 2)));\r\n                Canvas.SetTop(\r\n                    dataPoint,\r\n                    Math.Round(PlotAreaHeight - (dataPointY + (dataPoint.ActualHeight / 2))));\r\n            }\r\n            else\r\n            {\r\n                dataPoint.Visibility = Visibility.Collapsed;\r\n            }\r\n        }\r\n    }\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/Series.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.ObjectModel;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Represents a control that contains a data series.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public abstract partial class Series : Control, ISeries, IRequireSeriesHost\r\n    {\r\n        /// <summary>\r\n        /// The name of the Title property.\r\n        /// </summary>\r\n        protected const string TitleName = \"Title\";\r\n\r\n        /// <summary>\r\n        /// The name of the Visibility property.\r\n        /// </summary>\r\n        protected const string VisibilityName = \"Visibility\";\r\n\r\n        #region public ISeriesHost SeriesHost\r\n        /// <summary>\r\n        /// Gets or sets the parent instance the Series belongs to.\r\n        /// </summary>\r\n        public ISeriesHost SeriesHost\r\n        {\r\n            get { return _seriesHost; }\r\n            set\r\n            {\r\n                ISeriesHost oldValue = _seriesHost;\r\n                _seriesHost = value;\r\n                if (oldValue != _seriesHost)\r\n                {\r\n                    OnSeriesHostPropertyChanged(oldValue, _seriesHost);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Stores the Parent instance the Series belongs to.\r\n        /// </summary>\r\n        private ISeriesHost _seriesHost;\r\n\r\n        /// <summary>\r\n        /// Called when the value of the SeriesHost property changes.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">The value to be replaced.</param>\r\n        /// <param name=\"newValue\">The new series host value.</param>\r\n        protected virtual void OnSeriesHostPropertyChanged(ISeriesHost oldValue, ISeriesHost newValue)\r\n        {\r\n            if (newValue != null && oldValue != null)\r\n            {\r\n                throw new InvalidOperationException(Properties.Resources.Series_SeriesHost_SeriesHostPropertyNotNull);\r\n            }\r\n        }\r\n        #endregion public ISeriesHost SeriesHost\r\n\r\n        #region public ObservableCollection<object> LegendItems\r\n        /// <summary>\r\n        /// Gets the legend items to be added to the legend.\r\n        /// </summary>\r\n        public ObservableCollection<object> LegendItems { get; private set; }\r\n        #endregion public ObservableCollection<object> LegendItems\r\n\r\n        #region public object Title\r\n        /// <summary>\r\n        /// Gets or sets the title content of the Series.\r\n        /// </summary>\r\n        public object Title\r\n        {\r\n            get { return GetValue(TitleProperty); }\r\n            set { SetValue(TitleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Title dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty TitleProperty =\r\n            DependencyProperty.Register(\r\n                TitleName,\r\n                typeof(object),\r\n                typeof(Series),\r\n                new PropertyMetadata(OnTitleChanged));\r\n\r\n        /// <summary>\r\n        /// TitleProperty property changed callback.\r\n        /// </summary>\r\n        /// <param name=\"o\">Series for which the Title changed.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnTitleChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            ((Series)o).OnTitleChanged(e.OldValue, e.NewValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the Title property changes.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">The old value of the Title property.</param>\r\n        /// <param name=\"newValue\">The new value of the Title property.</param>\r\n        protected virtual void OnTitleChanged(object oldValue, object newValue)\r\n        {\r\n        }\r\n        #endregion public object Title\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the Series class.\r\n        /// </summary>\r\n        protected Series()\r\n        {\r\n            LegendItems = new NoResetObservableCollection<object>();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/SeriesDefinition.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections;\r\nusing System.Collections.ObjectModel;\r\nusing System.Collections.Specialized;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Globalization;\r\nusing System.Windows.Controls.Primitives;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Shapes;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Defines the attributes of a series that is to be rendered by the DefinitionSeries class.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    [StyleTypedProperty(Property = DataPointStyleName, StyleTargetType = typeof(DataPoint))]\r\n    [StyleTypedProperty(Property = LegendItemStyleName, StyleTargetType = typeof(LegendItem))]\r\n    [StyleTypedProperty(Property = DataShapeStyleName, StyleTargetType = typeof(Shape))]\r\n    public class SeriesDefinition : FrameworkElement, ISeries, IRequireGlobalSeriesIndex\r\n    {\r\n        /// <summary>\r\n        /// Name of the DataPointStyle property.\r\n        /// </summary>\r\n        private const string DataPointStyleName = \"DataPointStyle\";\r\n\r\n        /// <summary>\r\n        /// Name of the LegendItemStyle property.\r\n        /// </summary>\r\n        private const string LegendItemStyleName = \"LegendItemStyle\";\r\n\r\n        /// <summary>\r\n        /// Name of the DataShapeStyle property.\r\n        /// </summary>\r\n        private const string DataShapeStyleName = \"DataShapeStyle\";\r\n\r\n        /// <summary>\r\n        /// Provides the store for the ISeries.LegendItems property.\r\n        /// </summary>\r\n        private readonly ObservableCollection<object> _legendItems = new ObservableCollection<object>();\r\n\r\n        /// <summary>\r\n        /// Represents the single LegendItem corresponding to the SeriesDefinition.\r\n        /// </summary>\r\n        private readonly LegendItem _legendItem;\r\n\r\n        /// <summary>\r\n        /// Keeps a reference to the WeakEventListener used to prevent leaks of collections assigned to the ItemsSource property.\r\n        /// </summary>\r\n        private WeakEventListener<SeriesDefinition, object, NotifyCollectionChangedEventArgs> _weakEventListener;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the index of the series definition.\r\n        /// </summary>\r\n        internal int Index { get; set; }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the SeriesDefinition class.\r\n        /// </summary>\r\n        public SeriesDefinition()\r\n        {\r\n            _legendItem = new LegendItem { Owner = this };\r\n            _legendItem.SetBinding(LegendItem.ContentProperty, new Binding(\"ActualTitle\") { Source = this });\r\n            _legendItem.SetBinding(LegendItem.StyleProperty, new Binding(\"ActualLegendItemStyle\") { Source = this });\r\n            _legendItems.Add(_legendItem);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a sequence that provides the content of the series.\r\n        /// </summary>\r\n        public IEnumerable ItemsSource\r\n        {\r\n            get { return (IEnumerable)GetValue(ItemsSourceProperty); }\r\n            set { SetValue(ItemsSourceProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ItemsSource dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ItemsSourceProperty =\r\n            DependencyProperty.Register(\"ItemsSource\", typeof(IEnumerable), typeof(SeriesDefinition), new PropertyMetadata(OnItemsSourceChanged));\r\n\r\n        /// <summary>\r\n        /// Handles changes to the ItemsSource dependency property.\r\n        /// </summary>\r\n        /// <param name=\"o\">DependencyObject that changed.</param>\r\n        /// <param name=\"e\">Event data for the DependencyPropertyChangedEvent.</param>\r\n        private static void OnItemsSourceChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            ((SeriesDefinition)o).OnItemsSourceChanged((IEnumerable)e.OldValue, (IEnumerable)e.NewValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles changes to the ItemsSource property.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        private void OnItemsSourceChanged(IEnumerable oldValue, IEnumerable newValue)\r\n        {\r\n            // Remove handler for oldValue.CollectionChanged (if present)\r\n            INotifyCollectionChanged oldValueINotifyCollectionChanged = oldValue as INotifyCollectionChanged;\r\n            if (null != oldValueINotifyCollectionChanged)\r\n            {\r\n                // Detach the WeakEventListener\r\n                if (null != _weakEventListener)\r\n                {\r\n                    _weakEventListener.Detach();\r\n                    _weakEventListener = null;\r\n                }\r\n            }\r\n\r\n            // Add handler for newValue.CollectionChanged (if possible)\r\n            INotifyCollectionChanged newValueINotifyCollectionChanged = newValue as INotifyCollectionChanged;\r\n            if (null != newValueINotifyCollectionChanged)\r\n            {\r\n                // Use a WeakEventListener so that the backwards reference doesn't keep this object alive\r\n                _weakEventListener = new WeakEventListener<SeriesDefinition, object, NotifyCollectionChangedEventArgs>(this);\r\n                _weakEventListener.OnEventAction = (instance, source, eventArgs) => instance.ItemsSourceCollectionChanged(source, eventArgs);\r\n                _weakEventListener.OnDetachAction = (weakEventListener) => newValueINotifyCollectionChanged.CollectionChanged -= weakEventListener.OnEvent;\r\n                newValueINotifyCollectionChanged.CollectionChanged += _weakEventListener.OnEvent;\r\n            }\r\n\r\n            if (null != ParentDefinitionSeries)\r\n            {\r\n                ParentDefinitionSeries.SeriesDefinitionItemsSourceChanged(this, oldValue, newValue);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the CollectionChanged event for the ItemsSource property.\r\n        /// </summary>\r\n        /// <param name=\"sender\">Event source.</param>\r\n        /// <param name=\"e\">Event arguments..</param>\r\n        private void ItemsSourceCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)\r\n        {\r\n            if (null != ParentDefinitionSeries)\r\n            {\r\n                ParentDefinitionSeries.SeriesDefinitionItemsSourceCollectionChanged(this, e.Action, e.OldItems, e.OldStartingIndex, e.NewItems, e.NewStartingIndex);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the automatic title of the series definition.\r\n        /// </summary>\r\n        private object AutomaticTitle\r\n        {\r\n            get { return _automaticTitle; }\r\n            set\r\n            {\r\n                _automaticTitle = value;\r\n                ActualTitle = Title ?? _automaticTitle;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Stores the automatic title of the series definition.\r\n        /// </summary>\r\n        private object _automaticTitle;\r\n\r\n        /// <summary>\r\n        ///  Gets or sets the Title of the series definition.\r\n        /// </summary>\r\n        public object Title\r\n        {\r\n            get { return (object)GetValue(TitleProperty); }\r\n            set { SetValue(TitleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Title dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty TitleProperty =\r\n            DependencyProperty.Register(\"Title\", typeof(object), typeof(SeriesDefinition), new PropertyMetadata(OnTitleChanged));\r\n\r\n        /// <summary>\r\n        /// Handles changes to the Title dependency property.\r\n        /// </summary>\r\n        /// <param name=\"o\">DependencyObject that changed.</param>\r\n        /// <param name=\"e\">Event data for the DependencyPropertyChangedEvent.</param>\r\n        private static void OnTitleChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            ((SeriesDefinition)o).OnTitleChanged((object)e.OldValue, (object)e.NewValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles changes to the Title property.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA1801:ReviewUnusedParameters\", MessageId = \"oldValue\", Justification = \"Parameter is part of the pattern for DependencyProperty change handlers.\")]\r\n        private void OnTitleChanged(object oldValue, object newValue)\r\n        {\r\n            ActualTitle = newValue ?? _automaticTitle;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the rendered Title of the series definition.\r\n        /// </summary>\r\n        public object ActualTitle\r\n        {\r\n            get { return (object)GetValue(ActualTitleProperty); }\r\n            protected set { SetValue(ActualTitleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ActualTitle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ActualTitleProperty =\r\n            DependencyProperty.Register(\"ActualTitle\", typeof(object), typeof(SeriesDefinition), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets the DataPoint Style from the SeriesHost's Palette.\r\n        /// </summary>\r\n        internal Style PaletteDataPointStyle\r\n        {\r\n            get { return _paletteDataPointStyle; }\r\n            set\r\n            {\r\n                _paletteDataPointStyle = value;\r\n                ActualDataPointStyle = DataPointStyle ?? _paletteDataPointStyle;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Stores the DataPoint Style from the SeriesHost's Palette.\r\n        /// </summary>\r\n        private Style _paletteDataPointStyle;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the DataPoint Style for the series definition.\r\n        /// </summary>\r\n        public Style DataPointStyle\r\n        {\r\n            get { return (Style)GetValue(DataPointStyleProperty); }\r\n            set { SetValue(DataPointStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the DataPointStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty DataPointStyleProperty =\r\n            DependencyProperty.Register(DataPointStyleName, typeof(Style), typeof(SeriesDefinition), new PropertyMetadata(OnDataPointStyleChanged));\r\n\r\n        /// <summary>\r\n        /// Handles changes to the DataPointStyle dependency property.\r\n        /// </summary>\r\n        /// <param name=\"o\">DependencyObject that changed.</param>\r\n        /// <param name=\"e\">Event data for the DependencyPropertyChangedEvent.</param>\r\n        private static void OnDataPointStyleChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            ((SeriesDefinition)o).OnDataPointStyleChanged((Style)e.OldValue, (Style)e.NewValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles changes to the DataPointStyle property.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA1801:ReviewUnusedParameters\", MessageId = \"oldValue\", Justification = \"Parameter is part of the pattern for DependencyProperty change handlers.\")]\r\n        private void OnDataPointStyleChanged(Style oldValue, Style newValue)\r\n        {\r\n            ActualDataPointStyle = newValue ?? _paletteDataPointStyle;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the rendered DataPoint Style for the series definition.\r\n        /// </summary>\r\n        public Style ActualDataPointStyle\r\n        {\r\n            get { return (Style)GetValue(ActualDataPointStyleProperty); }\r\n            protected set { SetValue(ActualDataPointStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ActualDataPointStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ActualDataPointStyleProperty =\r\n            DependencyProperty.Register(\"ActualDataPointStyle\", typeof(Style), typeof(SeriesDefinition), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets the LegendItem Style from the SeriesHost's Palette.\r\n        /// </summary>\r\n        internal Style PaletteLegendItemStyle\r\n        {\r\n            get { return _paletteLegendItemStyle; }\r\n            set\r\n            {\r\n                _paletteLegendItemStyle = value;\r\n                ActualLegendItemStyle = LegendItemStyle ?? _paletteLegendItemStyle;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Stores the LegendItem Style from the SeriesHost's Palette.\r\n        /// </summary>\r\n        private Style _paletteLegendItemStyle;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the LegendItem Style for the series definition.\r\n        /// </summary>\r\n        public Style LegendItemStyle\r\n        {\r\n            get { return (Style)GetValue(LegendItemStyleProperty); }\r\n            set { SetValue(LegendItemStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the LegendItemStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty LegendItemStyleProperty =\r\n            DependencyProperty.Register(LegendItemStyleName, typeof(Style), typeof(SeriesDefinition), new PropertyMetadata(OnLegendItemStyleChanged));\r\n\r\n        /// <summary>\r\n        /// Handles changes to the LegendItemStyle dependency property.\r\n        /// </summary>\r\n        /// <param name=\"o\">DependencyObject that changed.</param>\r\n        /// <param name=\"e\">Event data for the DependencyPropertyChangedEvent.</param>\r\n        private static void OnLegendItemStyleChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            ((SeriesDefinition)o).OnLegendItemStyleChanged((Style)e.OldValue, (Style)e.NewValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles changes to the LegendItemStyle property.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA1801:ReviewUnusedParameters\", MessageId = \"oldValue\", Justification = \"Parameter is part of the pattern for DependencyProperty change handlers.\")]\r\n        private void OnLegendItemStyleChanged(Style oldValue, Style newValue)\r\n        {\r\n            ActualLegendItemStyle = newValue ?? _paletteLegendItemStyle;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the rendered LegendItem Style for the series definition.\r\n        /// </summary>\r\n        public Style ActualLegendItemStyle\r\n        {\r\n            get { return (Style)GetValue(ActualLegendItemStyleProperty); }\r\n            protected set { SetValue(ActualLegendItemStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ActualDataPointStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ActualLegendItemStyleProperty =\r\n            DependencyProperty.Register(\"ActualLegendItemStyle\", typeof(Style), typeof(SeriesDefinition), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets the DataShape Style from the SeriesHost's Palette.\r\n        /// </summary>\r\n        internal Style PaletteDataShapeStyle\r\n        {\r\n            get { return _paletteDataShapeStyle; }\r\n            set\r\n            {\r\n                _paletteDataShapeStyle = value;\r\n                ActualDataShapeStyle = DataShapeStyle ?? _paletteDataShapeStyle;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Stores the DataShape Style from the SeriesHost's Palette.\r\n        /// </summary>\r\n        private Style _paletteDataShapeStyle;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the DataShape Style for the series definition.\r\n        /// </summary>\r\n        public Style DataShapeStyle\r\n        {\r\n            get { return (Style)GetValue(DataShapeStyleProperty); }\r\n            set { SetValue(DataShapeStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the DataShapeStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty DataShapeStyleProperty =\r\n            DependencyProperty.Register(DataShapeStyleName, typeof(Style), typeof(SeriesDefinition), new PropertyMetadata(OnDataShapeStyleChanged));\r\n\r\n        /// <summary>\r\n        /// Handles changes to the DataShapeStyle dependency property.\r\n        /// </summary>\r\n        /// <param name=\"o\">DependencyObject that changed.</param>\r\n        /// <param name=\"e\">Event data for the DependencyPropertyChangedEvent.</param>\r\n        private static void OnDataShapeStyleChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            ((SeriesDefinition)o).OnDataShapeStyleChanged((Style)e.OldValue, (Style)e.NewValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles changes to the DataShapeStyle property.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA1801:ReviewUnusedParameters\", MessageId = \"oldValue\", Justification = \"Parameter is part of the pattern for DependencyProperty change handlers.\")]\r\n        private void OnDataShapeStyleChanged(Style oldValue, Style newValue)\r\n        {\r\n            ActualDataShapeStyle = newValue ?? _paletteDataShapeStyle;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the rendered DataShape Style for the series definition.\r\n        /// </summary>\r\n        public Style ActualDataShapeStyle\r\n        {\r\n            get { return (Style)GetValue(ActualDataShapeStyleProperty); }\r\n            protected set { SetValue(ActualDataShapeStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ActualDataShapeStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ActualDataShapeStyleProperty =\r\n            DependencyProperty.Register(\"ActualDataShapeStyle\", typeof(Style), typeof(SeriesDefinition), null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Binding to use for identifying the dependent value.\r\n        /// </summary>\r\n        public Binding DependentValueBinding\r\n        {\r\n            get\r\n            {\r\n                return _dependentValueBinding;\r\n            }\r\n            set\r\n            {\r\n                if (value != _dependentValueBinding)\r\n                {\r\n                    _dependentValueBinding = value;\r\n                    Reset();\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// The binding used to identify the dependent value binding.\r\n        /// </summary>\r\n        private Binding _dependentValueBinding;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Binding Path to use for identifying the dependent value.\r\n        /// </summary>\r\n        public string DependentValuePath\r\n        {\r\n            get\r\n            {\r\n                return (null != DependentValueBinding) ? DependentValueBinding.Path.Path : null;\r\n            }\r\n            set\r\n            {\r\n                if (null == value)\r\n                {\r\n                    DependentValueBinding = null;\r\n                }\r\n                else\r\n                {\r\n                    DependentValueBinding = new Binding(value);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Binding to use for identifying the independent value.\r\n        /// </summary>\r\n        public Binding IndependentValueBinding\r\n        {\r\n            get\r\n            {\r\n                return _independentValueBinding;\r\n            }\r\n            set\r\n            {\r\n                if (_independentValueBinding != value)\r\n                {\r\n                    _independentValueBinding = value;\r\n                    Reset();\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// The binding used to identify the independent value binding.\r\n        /// </summary>\r\n        private Binding _independentValueBinding;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Binding Path to use for identifying the independent value.\r\n        /// </summary>\r\n        public string IndependentValuePath\r\n        {\r\n            get\r\n            {\r\n                return (null != IndependentValueBinding) ? IndependentValueBinding.Path.Path : null;\r\n            }\r\n            set\r\n            {\r\n                if (null == value)\r\n                {\r\n                    IndependentValueBinding = null;\r\n                }\r\n                else\r\n                {\r\n                    IndependentValueBinding = new Binding(value);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Resets the display of the series definition.\r\n        /// </summary>\r\n        private void Reset()\r\n        {\r\n            if (null != ParentDefinitionSeries)\r\n            {\r\n                ParentDefinitionSeries.SeriesDefinitionItemsSourceChanged(this, ItemsSource, ItemsSource);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the SeriesHost as a DefinitionSeries instance.\r\n        /// </summary>\r\n        private DefinitionSeries ParentDefinitionSeries\r\n        {\r\n            get { return (DefinitionSeries)((ISeries)this).SeriesHost; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the collection of legend items for the series definition.\r\n        /// </summary>\r\n        ObservableCollection<object> ISeries.LegendItems\r\n        {\r\n            get { return _legendItems; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the SeriesHost for the series definition.\r\n        /// </summary>\r\n        ISeriesHost IRequireSeriesHost.SeriesHost\r\n        {\r\n            get { return _seriesHost; }\r\n            set\r\n            {\r\n                _seriesHost = value;\r\n                if (!(_seriesHost is DefinitionSeries) && (null != value))\r\n                {\r\n                    throw new NotSupportedException(Properties.Resources.SeriesDefinition_SeriesHost_InvalidParent);\r\n                }\r\n\r\n                if (null != _seriesHost)\r\n                {\r\n                    DataPoint legendItemDataPoint = ((DefinitionSeries)_seriesHost).InternalCreateDataPoint();\r\n\r\n                    // Apply default style (easy)\r\n                    ContentControl contentControl = new ContentControl();\r\n                    contentControl.Content = legendItemDataPoint;\r\n                    contentControl.Content = null;\r\n\r\n                    legendItemDataPoint.SetBinding(DataPoint.StyleProperty, new Binding(\"ActualDataPointStyle\") { Source = this });\r\n                    _legendItem.DataContext = legendItemDataPoint;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Stores the SeriesHost for the series definition.\r\n        /// </summary>\r\n        private ISeriesHost _seriesHost;\r\n\r\n        /// <summary>\r\n        /// Handles changes to the global series index of the series definition.\r\n        /// </summary>\r\n        /// <param name=\"globalIndex\">New index.</param>\r\n        void IRequireGlobalSeriesIndex.GlobalSeriesIndexChanged(int? globalIndex)\r\n        {\r\n            if (globalIndex.HasValue)\r\n            {\r\n                AutomaticTitle = string.Format(CultureInfo.CurrentCulture, Properties.Resources.Series_OnGlobalSeriesIndexPropertyChanged_UntitledSeriesFormatString, globalIndex + 1);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the TimeSpan to use for the duration of data transitions.\r\n        /// </summary>\r\n        public TimeSpan TransitionDuration\r\n        {\r\n            get { return (TimeSpan)GetValue(TransitionDurationProperty); }\r\n            set { SetValue(TransitionDurationProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the TransitionDuration dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty TransitionDurationProperty =\r\n            DependencyProperty.Register(\"TransitionDuration\", typeof(TimeSpan), typeof(SeriesDefinition), new PropertyMetadata(TimeSpan.FromSeconds(0.5)));\r\n\r\n#if !NO_EASING_FUNCTIONS\r\n        /// <summary>\r\n        /// Gets or sets the IEasingFunction to use for data transitions.\r\n        /// </summary>\r\n        public IEasingFunction TransitionEasingFunction\r\n        {\r\n            get { return (IEasingFunction)GetValue(TransitionEasingFunctionProperty); }\r\n            set { SetValue(TransitionEasingFunctionProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the TransitionEasingFunction dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty TransitionEasingFunctionProperty =\r\n            DependencyProperty.Register(\"TransitionEasingFunction\", typeof(IEasingFunction), typeof(SeriesDefinition), new PropertyMetadata(new QuadraticEase { EasingMode = EasingMode.EaseInOut }));\r\n#else\r\n        /// <summary>\r\n        /// Gets or sets a placeholder for the TransitionEasingFunction dependency property.\r\n        /// </summary>\r\n        internal IEasingFunction TransitionEasingFunction { get; set; }\r\n#endif\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/SeriesSelectionMode.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Defines the selection behavior for a series.\r\n    /// </summary>\r\n    public enum SeriesSelectionMode\r\n    {\r\n        /// <summary>\r\n        /// Selection is disabled.\r\n        /// </summary>\r\n        None,\r\n\r\n        /// <summary>\r\n        /// The user can select only one item at a time.\r\n        /// </summary>\r\n        Single,\r\n\r\n        /// <summary>\r\n        /// The user can select multiple items without holding down a modifier key.\r\n        /// </summary>\r\n        Multiple,\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/SplineSeries.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\nusing System.Windows.Media;\r\nusing System.Windows.Shapes;\r\n\r\n#if !DEFINITION_SERIES_COMPATIBILITY_MODE\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Represents a control that contains a data series to be rendered in X/Y \r\n    /// line format.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    [StyleTypedProperty(Property = DataPointStyleName, StyleTargetType = typeof(LineDataPoint))]\r\n    [StyleTypedProperty(Property = \"LegendItemStyle\", StyleTargetType = typeof(LegendItem))]\r\n    [StyleTypedProperty(Property = \"PathStyle\", StyleTargetType = typeof(Path))]\r\n    [TemplatePart(Name = DataPointSeries.PlotAreaName, Type = typeof(Canvas))]\r\n    [SuppressMessage(\"Microsoft.Maintainability\", \"CA1501:AvoidExcessiveInheritance\", Justification = \"Depth of hierarchy is necessary to avoid code duplication.\")]\r\n    public partial class SplineSeries : LineAreaBaseSeries<LineDataPoint>\r\n    {\r\n        #region public PointCollection Points\r\n        /// <summary>\r\n        /// Gets the collection of points that make up the spline.\r\n        /// </summary>\r\n        public PointCollection Points\r\n        {\r\n            get { return GetValue(PointsProperty) as PointCollection; }\r\n            private set { SetValue(PointsProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Points dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty PointsProperty =\r\n            DependencyProperty.Register(\r\n                \"Points\",\r\n                typeof(PointCollection),\r\n                typeof(SplineSeries),\r\n                null);\r\n        #endregion public PointCollection Points\r\n\r\n        #region public PathGeometry SplinePoints\r\n        /// <summary>\r\n        /// Gets the collection of points that make up the line.\r\n        /// </summary>\r\n        public PathGeometry SplinePoints\r\n        {\r\n            get { return GetValue(SplinePointsProperty) as PathGeometry; }\r\n            private set { SetValue(SplinePointsProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the SplinePoints dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty SplinePointsProperty =\r\n            DependencyProperty.Register(\r\n                \"SplinePoints\",\r\n                typeof(PathGeometry),\r\n                typeof(SplineSeries),\r\n                null);\r\n        #endregion public PathGeometry SplinePoints\r\n\r\n        #region public double SplineTension\r\n\r\n        /// <summary>\r\n        /// Gets or sets the tension in the beziers that make up the spline.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// The greater the tension, the more straight/linear the spline will look.\r\n        /// Less tension creates a more curvy spline.\r\n        /// </remarks>\r\n        public double SplineTension\r\n        {\r\n            get { return (double)GetValue(SplineTensionProperty); }\r\n            set { SetValue(SplineTensionProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the SplineTension dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty SplineTensionProperty =\r\n            DependencyProperty.Register(\r\n                \"SplineTension\",\r\n                typeof(double),\r\n                typeof(SplineSeries),\r\n                new PropertyMetadata(2.5));\r\n        #endregion public double SplineTension\r\n\r\n        #region public Style PathStyle\r\n        /// <summary>\r\n        /// Gets or sets the style of the Path object that follows the data \r\n        /// points.\r\n        /// </summary>\r\n        [System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Path\", Justification = \"Matches System.Windows.Shapes.Path.\")]\r\n        public Style PathStyle\r\n        {\r\n            get { return GetValue(PathStyleProperty) as Style; }\r\n            set { SetValue(PathStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the PathStyle dependency property.\r\n        /// </summary>\r\n        [System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Path\", Justification = \"Matches System.Windows.Shapes.Path.\")]\r\n        public static readonly DependencyProperty PathStyleProperty =\r\n            DependencyProperty.Register(\r\n                \"PathStyle\",\r\n                typeof(Style),\r\n                typeof(SplineSeries),\r\n                null);\r\n        #endregion public Style PathStyle\r\n\r\n        /// <summary>\r\n        /// Initializes the static members of the LineSeries class.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1810:InitializeReferenceTypeStaticFieldsInline\", Justification = \"Dependency properties are initialized in-line.\")]\r\n        static SplineSeries()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(SplineSeries), new FrameworkPropertyMetadata(typeof(SplineSeries)));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the LineSeries class.\r\n        /// </summary>\r\n        public SplineSeries()\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Acquire a horizontal linear axis and a vertical linear axis.\r\n        /// </summary>\r\n        /// <param name=\"firstDataPoint\">The first data point.</param>\r\n        protected override void GetAxes(DataPoint firstDataPoint)\r\n        {\r\n            GetAxes(\r\n                firstDataPoint,\r\n                (axis) => axis.Orientation == AxisOrientation.X,\r\n                () =>\r\n                {\r\n                    IAxis axis = CreateRangeAxisFromData(firstDataPoint.IndependentValue);\r\n                    if (axis == null)\r\n                    {\r\n                        axis = new CategoryAxis();\r\n                    }\r\n                    axis.Orientation = AxisOrientation.X;\r\n                    return axis;\r\n                },\r\n                (axis) => axis.Orientation == AxisOrientation.Y && axis is IRangeAxis,\r\n                () =>\r\n                {\r\n                    DisplayAxis axis = (DisplayAxis)CreateRangeAxisFromData(firstDataPoint.DependentValue);\r\n                    if (axis == null)\r\n                    {\r\n                        throw new InvalidOperationException(Properties.Resources.DataPointSeriesWithAxes_NoSuitableAxisAvailableForPlottingDependentValue);\r\n                    }\r\n                    axis.ShowGridLines = true;\r\n                    axis.Orientation = AxisOrientation.Y;\r\n                    return axis;\r\n                });\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the Series shape object from a collection of Points.\r\n        /// </summary>\r\n        /// <param name=\"points\">Collection of Points.</param>\r\n        protected override void UpdateShapeFromPoints(IEnumerable<Point> points)\r\n        {\r\n            if (points.Any())\r\n            {\r\n                PointCollection pointCollection = new PointCollection();\r\n                foreach (Point point in points)\r\n                {\r\n                    pointCollection.Add(point);\r\n                }\r\n\r\n                //At least two points are necessary to generate a proper spline\r\n                if (pointCollection.Count >= 2)\r\n                {\r\n                    PathGeometry geometry = new PathGeometry();\r\n                    PathFigure figure = new PathFigure();\r\n\r\n                    PointCollection bezierPoints = GetBezierPoints(pointCollection);\r\n\r\n                    figure.StartPoint = bezierPoints[0];\r\n                    for (int i = 1; i < bezierPoints.Count; i += 3)\r\n                    {\r\n                        figure.Segments.Add(new BezierSegment()\r\n                        {\r\n                            Point1 = bezierPoints[i],\r\n                            Point2 = bezierPoints[i + 1],\r\n                            Point3 = bezierPoints[i + 2]\r\n                        });\r\n                    }\r\n\r\n                    geometry.Figures.Add(figure);\r\n                    SplinePoints = geometry;\r\n                }\r\n                else\r\n                {\r\n                    SplinePoints = null;\r\n                }\r\n\r\n                Points = pointCollection;\r\n            }\r\n            else\r\n            {\r\n                Points = null;\r\n                SplinePoints = null;\r\n            }\r\n        }\r\n\r\n        #region Bezier Curve Building\r\n\r\n        /*\r\n         * Formulas and code pulled from Kerem Kat's MapBezier example:\r\n         * http://www.codeproject.com/KB/silverlight/MapBezier.aspx\r\n         */\r\n\r\n        private PointCollection GetBezierPoints(PointCollection pts)\r\n        {\r\n            PointCollection ret = new PointCollection();\r\n\r\n            for (int i = 0; i < pts.Count; i++)\r\n            {\r\n                // for first point append as is.\r\n                if (i == 0)\r\n                {\r\n                    ret.Add(pts[0]);\r\n                    continue;\r\n                }\r\n\r\n                // for each point except first and last get B1, B2. next point. \r\n                // Last point do not have a next point.\r\n                ret.Add(GetB1(pts, i - 1, SplineTension));\r\n                ret.Add(GetB2(pts, i - 1, SplineTension));\r\n                ret.Add(pts[i]);\r\n            }\r\n\r\n            return ret;\r\n        }\r\n\r\n        private Point GetB1(PointCollection pts, int i, double a)\r\n        {\r\n            Point derivedPoint = GetDerivative(pts, i, a);\r\n            return new Point(pts[i].X + derivedPoint.X / 3, pts[i].Y + derivedPoint.Y / 3);\r\n        }\r\n\r\n        private Point GetB2(PointCollection pts, int i, double a)\r\n        {\r\n            Point derivedPoint = GetDerivative(pts, i + 1, a);\r\n            return new Point(pts[i + 1].X - derivedPoint.X / 3, pts[i + 1].Y - derivedPoint.Y / 3);\r\n        }\r\n\r\n        private Point GetDerivative(PointCollection pts, int i, double a)\r\n        {\r\n            if (pts.Count < 2)\r\n                throw new ArgumentOutOfRangeException(\"pts\", \"Data must contain at least two points.\");\r\n\r\n            if (i == 0)\r\n            {\r\n                // First point.\r\n                return new Point((pts[1].X - pts[0].X) / a, (pts[1].Y - pts[0].Y) / a);\r\n            }\r\n            if (i == pts.Count - 1)\r\n            {\r\n                // Last point.\r\n                return new Point((pts[i].X - pts[i - 1].X) / a, (pts[i].Y - pts[i - 1].Y) / a);\r\n            }\r\n\r\n            return new Point((pts[i + 1].X - pts[i - 1].X) / a, (pts[i + 1].Y - pts[i - 1].Y) / a);\r\n        }\r\n        #endregion\r\n    }\r\n}\r\n\r\n#endif\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/Stacked100AreaSeries.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Control that displays values as a 100% stacked area chart visualization.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public class Stacked100AreaSeries : StackedAreaSeries\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the Stacked100AreaSeries class.\r\n        /// </summary>\r\n        public Stacked100AreaSeries()\r\n        {\r\n            IsStacked100 = true;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/Stacked100BarSeries.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Control that displays values as a 100% stacked bar chart visualization.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public class Stacked100BarSeries : StackedBarSeries\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the Stacked100BarSeries class.\r\n        /// </summary>\r\n        public Stacked100BarSeries()\r\n        {\r\n            IsStacked100 = true;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/Stacked100ColumnSeries.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Control that displays values as a 100% stacked column chart visualization.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public class Stacked100ColumnSeries : StackedColumnSeries\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the Stacked100ColumnSeries class.\r\n        /// </summary>\r\n        public Stacked100ColumnSeries()\r\n        {\r\n            IsStacked100 = true;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/Stacked100LineSeries.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Control that displays values as a 100% stacked line chart visualization.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public class Stacked100LineSeries : StackedLineSeries\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the Stacked100LineSeries class.\r\n        /// </summary>\r\n        public Stacked100LineSeries()\r\n        {\r\n            IsStacked100 = true;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/StackedAreaLineSeries.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Collections.Specialized;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media;\r\nusing System.Windows.Shapes;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Control base class for displaying values as a stacked area/line chart visualization.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public abstract class StackedAreaLineSeries : DefinitionSeries\r\n    {\r\n        /// <summary>\r\n        /// Gets the Shapes corresponding to each SeriesDefinition.\r\n        /// </summary>\r\n        protected Dictionary<SeriesDefinition, Shape> SeriesDefinitionShapes { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the StackedAreaLineSeries class.\r\n        /// </summary>\r\n        protected StackedAreaLineSeries()\r\n        {\r\n            SeriesDefinitionShapes = new Dictionary<SeriesDefinition, Shape>();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Builds the visual tree for the control when a new template is applied.\r\n        /// </summary>\r\n        public override void OnApplyTemplate()\r\n        {\r\n            SynchronizeSeriesDefinitionShapes(SeriesDefinitions, null);\r\n            base.OnApplyTemplate();\r\n            SynchronizeSeriesDefinitionShapes(null, SeriesDefinitions);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the SeriesDefinitions collection changes.\r\n        /// </summary>\r\n        /// <param name=\"action\">Type of change.</param>\r\n        /// <param name=\"oldItems\">Sequence of old items.</param>\r\n        /// <param name=\"oldStartingIndex\">Starting index of old items.</param>\r\n        /// <param name=\"newItems\">Sequence of new items.</param>\r\n        /// <param name=\"newStartingIndex\">Starting index of new items.</param>\r\n        protected override void SeriesDefinitionsCollectionChanged(NotifyCollectionChangedAction action, IList oldItems, int oldStartingIndex, IList newItems, int newStartingIndex)\r\n        {\r\n            base.SeriesDefinitionsCollectionChanged(action, oldItems, oldStartingIndex, newItems, newStartingIndex);\r\n            if (null != oldItems)\r\n            {\r\n                SynchronizeSeriesDefinitionShapes(oldItems.CastWrapper<SeriesDefinition>(), null);\r\n                foreach (SeriesDefinition oldDefinition in oldItems.CastWrapper<SeriesDefinition>())\r\n                {\r\n                    SeriesDefinitionShapes.Remove(oldDefinition);\r\n                }\r\n            }\r\n            if (null != newItems)\r\n            {\r\n                foreach (SeriesDefinition newDefinition in newItems.CastWrapper<SeriesDefinition>())\r\n                {\r\n                    Shape dataShape = CreateDataShape();\r\n                    dataShape.SetBinding(Shape.StyleProperty, new Binding(\"ActualDataShapeStyle\") { Source = newDefinition });\r\n                    SeriesDefinitionShapes[newDefinition] = dataShape;\r\n                }\r\n                SynchronizeSeriesDefinitionShapes(null, newItems.CastWrapper<SeriesDefinition>());\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Acquires a dependent axis suitable for use with the data values of the series.\r\n        /// </summary>\r\n        /// <returns>Axis instance.</returns>\r\n        protected override IAxis AcquireDependentAxis()\r\n        {\r\n            IAxis dependentAxis = SeriesHost.Axes\r\n                .Where(a => (a.Orientation == AxisOrientation.Y) && (a is IRangeAxis) && DataItems.Any() && (a.CanPlot(DataItems.First().ActualDependentValue)))\r\n                .FirstOrDefault();\r\n            if (null == dependentAxis)\r\n            {\r\n                LinearAxis linearAxis = new LinearAxis { Orientation = AxisOrientation.Y, ShowGridLines = true };\r\n                if (IsStacked100)\r\n                {\r\n                    Style style = new Style(typeof(AxisLabel));\r\n                    style.Setters.Add(new Setter(AxisLabel.StringFormatProperty, \"{0}%\"));\r\n                    linearAxis.AxisLabelStyle = style;\r\n                }\r\n                dependentAxis = linearAxis;\r\n            }\r\n            return dependentAxis;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Acquires an independent axis suitable for use with the data values of the series.\r\n        /// </summary>\r\n        /// <returns>Axis instance.</returns>\r\n        protected override IAxis AcquireIndependentAxis()\r\n        {\r\n            IAxis independentAxis = SeriesHost.Axes\r\n                .Where(a => (a.Orientation == AxisOrientation.X) && ((a is IRangeAxis) || (a is ICategoryAxis)) && DataItems.Any() && (a.CanPlot(DataItems.First().ActualIndependentValue)))\r\n                .FirstOrDefault();\r\n            if (null == independentAxis)\r\n            {\r\n                object probeValue = DataItems.Any() ? DataItems.First().ActualIndependentValue : null;\r\n                double convertedDouble;\r\n                DateTime convertedDateTime;\r\n                if ((null != probeValue) && ValueHelper.TryConvert(probeValue, out convertedDouble))\r\n                {\r\n                    independentAxis = new LinearAxis();\r\n                }\r\n                else if ((null != probeValue) && ValueHelper.TryConvert(probeValue, out convertedDateTime))\r\n                {\r\n                    independentAxis = new DateTimeAxis();\r\n                }\r\n                else\r\n                {\r\n                    independentAxis = new CategoryAxis();\r\n                }\r\n                independentAxis.Orientation = AxisOrientation.X;\r\n            }\r\n            return independentAxis;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Prepares a DataPoint for use.\r\n        /// </summary>\r\n        /// <param name=\"dataPoint\">DataPoint instance.</param>\r\n        protected override void PrepareDataPoint(DataPoint dataPoint)\r\n        {\r\n            base.PrepareDataPoint(dataPoint);\r\n            dataPoint.SizeChanged += new SizeChangedEventHandler(DataPointSizeChanged);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the SizeChanged event of a DataPoint to update the value margins for the series.\r\n        /// </summary>\r\n        /// <param name=\"sender\">Event source.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private void DataPointSizeChanged(object sender, SizeChangedEventArgs e)\r\n        {\r\n            DataPoint dataPoint = (DataPoint)sender;\r\n            DataItem dataItem = DataItemFromDataPoint(dataPoint);\r\n\r\n            // Update placement\r\n            double newWidth = e.NewSize.Width;\r\n            double newHeight = e.NewSize.Height;\r\n            Canvas.SetLeft(dataItem.Container, Math.Round(dataItem.CenterPoint.X - (newWidth / 2)));\r\n            Canvas.SetTop(dataItem.Container, Math.Round(dataItem.CenterPoint.Y - (newHeight / 2)));\r\n\r\n            // Update value margins\r\n            double heightMargin = newHeight * (3.0 / 4.0);\r\n            NotifyValueMarginsChanged(ActualDependentAxis, new ValueMargin[] { new ValueMargin(dataItem.ActualStackedDependentValue, heightMargin, heightMargin) });\r\n            double widthMargin = newWidth * (3.0 / 4.0);\r\n            NotifyValueMarginsChanged(ActualIndependentAxis, new ValueMargin[] { new ValueMargin(dataPoint.ActualIndependentValue, widthMargin, widthMargin) });\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates a series-appropriate Shape for connecting the points of the series.\r\n        /// </summary>\r\n        /// <returns>Shape instance.</returns>\r\n        protected abstract Shape CreateDataShape();\r\n\r\n        /// <summary>\r\n        /// Synchronizes the SeriesDefinitionShapes dictionary with the contents of the SeriesArea Panel.\r\n        /// </summary>\r\n        /// <param name=\"oldDefinitions\">SeriesDefinition being removed.</param>\r\n        /// <param name=\"newDefinitions\">SeriesDefinition being added.</param>\r\n        private void SynchronizeSeriesDefinitionShapes(IEnumerable<SeriesDefinition> oldDefinitions, IEnumerable<SeriesDefinition> newDefinitions)\r\n        {\r\n            if (null != SeriesArea)\r\n            {\r\n                if (null != oldDefinitions)\r\n                {\r\n                    foreach (SeriesDefinition oldDefinition in oldDefinitions)\r\n                    {\r\n                        SeriesArea.Children.Remove(SeriesDefinitionShapes[oldDefinition]);\r\n                    }\r\n                }\r\n                if (null != newDefinitions)\r\n                {\r\n                    foreach (SeriesDefinition newDefinition in newDefinitions.OrderBy(sd => sd.Index))\r\n                    {\r\n                        SeriesArea.Children.Insert(newDefinition.Index, SeriesDefinitionShapes[newDefinition]);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the range for the data points of the series.\r\n        /// </summary>\r\n        /// <param name=\"rangeConsumer\">Consumer of the range.</param>\r\n        /// <returns>Range of values.</returns>\r\n        protected override Range<IComparable> IRangeProviderGetRange(IRangeConsumer rangeConsumer)\r\n        {\r\n            if (rangeConsumer == ActualDependentAxis)\r\n            {\r\n                IEnumerable<Range<double>> dependentValueRangesByIndependentValue = IndependentValueDependentValues\r\n                    .Select(g => g.Where(d => ValueHelper.CanGraph(d)))\r\n                    .Select(g => g.Scan(0.0, (s, t) => s + t).Skip(1).GetRange())\r\n                    .DefaultIfEmpty(new Range<double>(0, 0))\r\n                    .ToArray();\r\n                double minimum = dependentValueRangesByIndependentValue.Min(r => r.Minimum);\r\n                double maximum = dependentValueRangesByIndependentValue.Max(r => r.Maximum);\r\n\r\n                if (IsStacked100)\r\n                {\r\n                    minimum = Math.Min(minimum, 0);\r\n                    maximum = Math.Max(maximum, 0);\r\n                }\r\n\r\n                return new Range<IComparable>(minimum, maximum);\r\n            }\r\n            else\r\n            {\r\n                return base.IRangeProviderGetRange(rangeConsumer);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the value margins for the data points of the series.\r\n        /// </summary>\r\n        /// <param name=\"valueMarginConsumer\">Consumer of the value margins.</param>\r\n        /// <returns>Sequence of value margins.</returns>\r\n        protected override IEnumerable<ValueMargin> IValueMarginProviderGetValueMargins(IValueMarginConsumer valueMarginConsumer)\r\n        {\r\n            if (IsStacked100 && (valueMarginConsumer == ActualDependentAxis))\r\n            {\r\n                return Enumerable.Empty<ValueMargin>();\r\n            }\r\n            else if ((valueMarginConsumer == ActualDependentAxis) || (valueMarginConsumer == ActualIndependentAxis))\r\n            {\r\n                Range<IComparable> range = IRangeProviderGetRange((IRangeConsumer)valueMarginConsumer);\r\n                double margin = DataItems\r\n                    .Select(di =>\r\n                    {\r\n                        return (null != di.DataPoint) ?\r\n                            (valueMarginConsumer == ActualDependentAxis) ? di.DataPoint.ActualHeight : di.DataPoint.ActualWidth :\r\n                            0;\r\n                    })\r\n                    .Average() * (3.0 / 4.0);\r\n                return new ValueMargin[]\r\n                {\r\n                    new ValueMargin(range.Minimum, margin, margin),\r\n                    new ValueMargin(range.Maximum, margin, margin),\r\n                };\r\n            }\r\n            else\r\n            {\r\n                return base.IValueMarginProviderGetValueMargins(valueMarginConsumer);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the placement of the DataItems (data points) of the series.\r\n        /// </summary>\r\n        /// <param name=\"dataItems\">DataItems in need of an update.</param>\r\n        protected override void UpdateDataItemPlacement(IEnumerable<DefinitionSeries.DataItem> dataItems)\r\n        {\r\n            if ((null != ActualDependentAxis) && (null != ActualIndependentAxis))\r\n            {\r\n                double plotAreaMaximumDependentCoordinate = ActualDependentAxis.GetPlotAreaCoordinate(ActualDependentRangeAxis.Range.Maximum).Value;\r\n                double lineTopBuffer = 1;\r\n                List<Point>[] points = new List<Point>[SeriesDefinitions.Count];\r\n                for (int i = 0; i < points.Length; i++)\r\n                {\r\n                    points[i] = new List<Point>();\r\n                }\r\n                foreach (IndependentValueGroup group in IndependentValueGroupsOrderedByIndependentValue)\r\n                {\r\n                    double sum = IsStacked100 ?\r\n                        group.DataItems.Sum(di => Math.Abs(ValueHelper.ToDouble(di.DataPoint.ActualDependentValue))) :\r\n                        1;\r\n                    if (0 == sum)\r\n                    {\r\n                        sum = 1;\r\n                    }\r\n                    double x = ActualIndependentAxis.GetPlotAreaCoordinate(group.IndependentValue).Value;\r\n                    if (ValueHelper.CanGraph(x))\r\n                    {\r\n                        double lastValue = 0;\r\n                        Point lastPoint = new Point(x, Math.Max(plotAreaMaximumDependentCoordinate - ActualDependentRangeAxis.GetPlotAreaCoordinate(lastValue).Value, lineTopBuffer));\r\n                        int i = -1;\r\n                        SeriesDefinition lastDefinition = null;\r\n                        foreach (DataItem dataItem in group.DataItems)\r\n                        {\r\n                            if (lastDefinition != dataItem.SeriesDefinition)\r\n                            {\r\n                                i++;\r\n                            }\r\n\r\n                            while (dataItem.SeriesDefinition != SeriesDefinitions[i])\r\n                            {\r\n                                points[i].Add(lastPoint);\r\n                                i++;\r\n                            }\r\n\r\n                            DataPoint dataPoint = dataItem.DataPoint;\r\n                            double value = IsStacked100 ?\r\n                                (ValueHelper.ToDouble(dataItem.DataPoint.ActualDependentValue) * (100 / sum)) :\r\n                                ValueHelper.ToDouble(dataItem.DataPoint.ActualDependentValue);\r\n                            if (ValueHelper.CanGraph(value))\r\n                            {\r\n                                value += lastValue;\r\n                                dataItem.ActualStackedDependentValue = value;\r\n                                double y = ActualDependentRangeAxis.GetPlotAreaCoordinate(value).Value;\r\n                                lastValue = value;\r\n                                lastPoint.Y = Math.Max(plotAreaMaximumDependentCoordinate - y, lineTopBuffer);\r\n                                points[i].Add(lastPoint);\r\n\r\n                                dataItem.CenterPoint = new Point(x, plotAreaMaximumDependentCoordinate - y);\r\n                                double left = dataItem.CenterPoint.X - (dataPoint.ActualWidth / 2);\r\n                                double top = dataItem.CenterPoint.Y - (dataPoint.ActualHeight / 2);\r\n\r\n                                Canvas.SetLeft(dataItem.Container, Math.Round(left));\r\n                                Canvas.SetTop(dataItem.Container, Math.Round(top));\r\n                                dataPoint.Visibility = Visibility.Visible;\r\n                            }\r\n                            else\r\n                            {\r\n                                points[i].Add(lastPoint);\r\n                                dataPoint.Visibility = Visibility.Collapsed;\r\n                            }\r\n\r\n                            lastDefinition = dataItem.SeriesDefinition;\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        foreach (DataPoint dataPoint in group.DataItems.Select(di => di.DataPoint))\r\n                        {\r\n                            dataPoint.Visibility = Visibility.Collapsed;\r\n                        }\r\n                    }\r\n                }\r\n                UpdateShape(points);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the Shape for the series.\r\n        /// </summary>\r\n        /// <param name=\"definitionPoints\">Locations of the points of each SeriesDefinition in the series.</param>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1006:DoNotNestGenericTypesInMemberSignatures\", Justification = \"Nesting is convenient way to represent data.\")]\r\n        protected abstract void UpdateShape(IList<IEnumerable<Point>> definitionPoints);\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/StackedAreaSeries.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\nusing System.Windows.Media;\r\nusing System.Windows.Shapes;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Control that displays values as a stacked area chart visualization.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public class StackedAreaSeries : StackedAreaLineSeries, IAnchoredToOrigin\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the StackedAreaSeries class.\r\n        /// </summary>\r\n        public StackedAreaSeries()\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates a DataPoint for the series.\r\n        /// </summary>\r\n        /// <returns>Series-appropriate DataPoint instance.</returns>\r\n        protected override DataPoint CreateDataPoint()\r\n        {\r\n            return new AreaDataPoint();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates a series-appropriate Shape for connecting the points of the series.\r\n        /// </summary>\r\n        /// <returns>Shape instance.</returns>\r\n        protected override Shape CreateDataShape()\r\n        {\r\n            return new Polygon();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the Shape for the series.\r\n        /// </summary>\r\n        /// <param name=\"definitionPoints\">Locations of the points of each SeriesDefinition in the series.</param>\r\n        protected override void UpdateShape(IList<IEnumerable<Point>> definitionPoints)\r\n        {\r\n            for (int i = SeriesDefinitions.Count - 1; 0 < i; i--)\r\n            {\r\n                PointCollection pointCollection = new PointCollection();\r\n                IEnumerable<Point> topPoints = (ActualIndependentAxis is ICategoryAxis) ? definitionPoints[i].OrderBy(p => p.X) : definitionPoints[i];\r\n                foreach (Point p in topPoints)\r\n                {\r\n                    pointCollection.Add(p);\r\n                }\r\n                IEnumerable<Point> bottomPoints = (ActualIndependentAxis is ICategoryAxis) ? definitionPoints[i - 1].OrderByDescending(p => p.X) : definitionPoints[i - 1].Reverse();\r\n                foreach (Point p in bottomPoints)\r\n                {\r\n                    pointCollection.Add(p);\r\n                }\r\n                SetPolygonPointsProperty((Polygon)SeriesDefinitionShapes[SeriesDefinitions[i]], pointCollection);\r\n            }\r\n            if (1 <= SeriesDefinitions.Count)\r\n            {\r\n                double plotAreaMaximumDependentCoordinate = ActualDependentAxis.GetPlotAreaCoordinate(ActualDependentRangeAxis.Range.Maximum).Value;\r\n                IComparable zeroValue = ActualDependentRangeAxis.Origin ?? 0.0;\r\n                if (zeroValue.CompareTo(ActualDependentRangeAxis.Range.Minimum) < 0)\r\n                {\r\n                    zeroValue = ActualDependentRangeAxis.Range.Minimum;\r\n                }\r\n                if (0 < zeroValue.CompareTo(ActualDependentRangeAxis.Range.Maximum))\r\n                {\r\n                    zeroValue = ActualDependentRangeAxis.Range.Maximum;\r\n                }\r\n                double zeroCoordinate = ActualDependentAxis.GetPlotAreaCoordinate(zeroValue).Value;\r\n                PointCollection pointCollection = new PointCollection();\r\n                Point[] topPoints = ((ActualIndependentAxis is ICategoryAxis) ? definitionPoints[0].OrderBy(p => p.X) : definitionPoints[0]).ToArray();\r\n                foreach (Point p in topPoints)\r\n                {\r\n                    pointCollection.Add(p);\r\n                }\r\n                if (0 < topPoints.Length)\r\n                {\r\n                    Point firstPoint = topPoints[0];\r\n                    Point lastPoint = topPoints[topPoints.Length - 1];\r\n                    pointCollection.Add(new Point(lastPoint.X, plotAreaMaximumDependentCoordinate - zeroCoordinate));\r\n                    pointCollection.Add(new Point(firstPoint.X, plotAreaMaximumDependentCoordinate - zeroCoordinate));\r\n                }\r\n                SetPolygonPointsProperty((Polygon)SeriesDefinitionShapes[SeriesDefinitions[0]], pointCollection);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Sets the Points property of a Polygon to the specified PointCollection.\r\n        /// </summary>\r\n        /// <param name=\"polygon\">Polygon to set the Points property of.</param>\r\n        /// <param name=\"pointCollection\">Specified PointCollection.</param>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1822:MarkMembersAsStatic\", Justification = \"Silverlight implementation is not static.\")]\r\n        protected void SetPolygonPointsProperty(Polygon polygon, PointCollection pointCollection)\r\n        {\r\n            polygon.Points = pointCollection;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the value margins for the data points of the series.\r\n        /// </summary>\r\n        /// <param name=\"valueMarginConsumer\">Consumer of the value margins.</param>\r\n        /// <returns>Sequence of value margins.</returns>\r\n        protected override IEnumerable<ValueMargin> IValueMarginProviderGetValueMargins(IValueMarginConsumer valueMarginConsumer)\r\n        {\r\n            if (valueMarginConsumer == ActualIndependentAxis)\r\n            {\r\n                return Enumerable.Empty<ValueMargin>();\r\n            }\r\n            else\r\n            {\r\n                return base.IValueMarginProviderGetValueMargins(valueMarginConsumer);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the anchored axis for the series.\r\n        /// </summary>\r\n        IRangeAxis IAnchoredToOrigin.AnchoredAxis\r\n        {\r\n            get { return ActualDependentRangeAxis; }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/StackedBarColumnSeries.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Control base class for displaying values as a stacked bar/column chart visualization.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public abstract class StackedBarColumnSeries : DefinitionSeries, IAnchoredToOrigin\r\n    {\r\n        /// <summary>\r\n        /// Gets or sets the orientation of the dependent axis.\r\n        /// </summary>\r\n        protected AxisOrientation DependentAxisOrientation { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the orientation of the independent axis.\r\n        /// </summary>\r\n        protected AxisOrientation IndependentAxisOrientation { get; set; }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the StackedBarColumnSeries class.\r\n        /// </summary>\r\n        protected StackedBarColumnSeries()\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Acquires a dependent axis suitable for use with the data values of the series.\r\n        /// </summary>\r\n        /// <returns>Axis instance.</returns>\r\n        protected override IAxis AcquireDependentAxis()\r\n        {\r\n            IAxis dependentAxis = SeriesHost.Axes\r\n                .Where(a => (a.Orientation == DependentAxisOrientation) && (a is IRangeAxis) && DataItems.Any() && (a.CanPlot(DataItems.First().ActualDependentValue)))\r\n                .FirstOrDefault();\r\n            if (null == dependentAxis)\r\n            {\r\n                LinearAxis linearAxis = new LinearAxis { Orientation = DependentAxisOrientation, ShowGridLines = true };\r\n                if (IsStacked100)\r\n                {\r\n                    Style style = new Style(typeof(AxisLabel));\r\n                    style.Setters.Add(new Setter(AxisLabel.StringFormatProperty, \"{0}%\"));\r\n                    linearAxis.AxisLabelStyle = style;\r\n                }\r\n                dependentAxis = linearAxis;\r\n            }\r\n            return dependentAxis;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Acquires an independent axis suitable for use with the data values of the series.\r\n        /// </summary>\r\n        /// <returns>Axis instance.</returns>\r\n        protected override IAxis AcquireIndependentAxis()\r\n        {\r\n            IAxis independentAxis = SeriesHost.Axes\r\n                .Where(a => (a.Orientation == IndependentAxisOrientation) && ((a is ICategoryAxis) || (a is IRangeAxis)) && DataItems.Any() && (a.CanPlot(DataItems.First().ActualIndependentValue)))\r\n                .FirstOrDefault();\r\n            if (null == independentAxis)\r\n            {\r\n                independentAxis = new CategoryAxis { Orientation = IndependentAxisOrientation };\r\n            }\r\n            return independentAxis;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the range for the data points of the series.\r\n        /// </summary>\r\n        /// <param name=\"rangeConsumer\">Consumer of the range.</param>\r\n        /// <returns>Range of values.</returns>\r\n        [SuppressMessage(\"Microsoft.Maintainability\", \"CA1502:AvoidExcessiveComplexity\", Justification = \"Linq is artificially increasing the rating.\")]\r\n        protected override Range<IComparable> IRangeProviderGetRange(IRangeConsumer rangeConsumer)\r\n        {\r\n            if (rangeConsumer == ActualDependentAxis)\r\n            {\r\n                var dependentValuesByIndependentValue = IndependentValueDependentValues.Select(e => e.ToArray()).ToArray();\r\n\r\n                var mostNegative = dependentValuesByIndependentValue\r\n                    .Select(g => g.Where(v => v < 0)\r\n                        .Sum())\r\n                    .Where(v => v < 0)\r\n                    .ToArray();\r\n                var leastNegative = dependentValuesByIndependentValue\r\n                    .Select(g => g.Where(v => v <= 0)\r\n                        .DefaultIfEmpty(1.0)\r\n                        .First())\r\n                    .Where(v => v <= 0)\r\n                    .ToArray();\r\n                var mostPositive = dependentValuesByIndependentValue\r\n                    .Select(g => g.Where(v => 0 < v)\r\n                        .Sum())\r\n                    .Where(v => 0 < v)\r\n                    .ToArray();\r\n                var leastPositive = dependentValuesByIndependentValue\r\n                    .Select(g => g.Where(v => 0 <= v)\r\n                        .DefaultIfEmpty(-1.0)\r\n                        .First())\r\n                    .Where(v => 0 <= v)\r\n                    .ToArray();\r\n\r\n                // Compute minimum\r\n                double minimum = 0;\r\n                if (mostNegative.Any())\r\n                {\r\n                    minimum = mostNegative.Min();\r\n                }\r\n                else if (leastPositive.Any())\r\n                {\r\n                    minimum = leastPositive.Min();\r\n                }\r\n\r\n                // Compute maximum\r\n                double maximum = 0;\r\n                if (mostPositive.Any())\r\n                {\r\n                    maximum = mostPositive.Max();\r\n                }\r\n                else if (leastNegative.Any())\r\n                {\r\n                    maximum = leastNegative.Max();\r\n                }\r\n\r\n                if (IsStacked100)\r\n                {\r\n                    minimum = Math.Min(minimum, 0);\r\n                    maximum = Math.Max(maximum, 0);\r\n                }\r\n\r\n                return new Range<IComparable>(minimum, maximum);\r\n            }\r\n            else if (rangeConsumer == ActualIndependentAxis)\r\n            {\r\n                // Using a non-ICategoryAxis for the independent axis\r\n                // Need to specifically adjust for slot size of bars/columns so they don't overlap\r\n                // Note: Calculation for slotSize is not perfect, but it's quick, close, and errs on the safe side\r\n                Range<IComparable> range = base.IRangeProviderGetRange(rangeConsumer);\r\n                int count = Math.Max(IndependentValueGroups.Count(), 1);\r\n                if (ActualIndependentAxis.CanPlot(0.0))\r\n                {\r\n                    double minimum = ValueHelper.ToDouble(range.Minimum);\r\n                    double maximum = ValueHelper.ToDouble(range.Maximum);\r\n                    double slotSize = (maximum - minimum) / count;\r\n                    return new Range<IComparable>(minimum - slotSize, maximum + slotSize);\r\n                }\r\n                else\r\n                {\r\n                    DateTime minimum = ValueHelper.ToDateTime(range.Minimum);\r\n                    DateTime maximum = ValueHelper.ToDateTime(range.Maximum);\r\n                    TimeSpan slotSize = TimeSpan.FromTicks((maximum - minimum).Ticks / count);\r\n                    return new Range<IComparable>(minimum - slotSize, maximum + slotSize);\r\n                }\r\n            }\r\n            else\r\n            {\r\n                return base.IRangeProviderGetRange(rangeConsumer);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the value margins for the data points of the series.\r\n        /// </summary>\r\n        /// <param name=\"valueMarginConsumer\">Consumer of the value margins.</param>\r\n        /// <returns>Sequence of value margins.</returns>\r\n        protected override IEnumerable<ValueMargin> IValueMarginProviderGetValueMargins(IValueMarginConsumer valueMarginConsumer)\r\n        {\r\n            if (valueMarginConsumer == ActualDependentAxis)\r\n            {\r\n                if (IsStacked100)\r\n                {\r\n                    return Enumerable.Empty<ValueMargin>();\r\n                }\r\n                else\r\n                {\r\n                    Range<IComparable> range = IRangeProviderGetRange((IRangeConsumer)ActualDependentAxis);\r\n                    double margin = ((AxisOrientation.Y == ActualDependentAxis.Orientation) ? ActualHeight : ActualWidth) / 10;\r\n                    return new ValueMargin[]\r\n                    {\r\n                        new ValueMargin(range.Minimum, margin, margin),\r\n                        new ValueMargin(range.Maximum, margin, margin),\r\n                    };\r\n                }\r\n            }\r\n            else if (valueMarginConsumer == ActualIndependentAxis)\r\n            {\r\n                // Using a non-ICategoryAxis for the independent axis\r\n                // Relevant space already accounted for by IRangeProviderGetRange\r\n                return Enumerable.Empty<ValueMargin>();\r\n            }\r\n            else\r\n            {\r\n                return base.IValueMarginProviderGetValueMargins(valueMarginConsumer);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the placement of the DataItems (data points) of the series.\r\n        /// </summary>\r\n        /// <param name=\"dataItems\">DataItems in need of an update.</param>\r\n        [SuppressMessage(\"Microsoft.Maintainability\", \"CA1502:AvoidExcessiveComplexity\", Justification = \"Linq is artificially increasing the rating.\")]\r\n        protected override void UpdateDataItemPlacement(IEnumerable<DefinitionSeries.DataItem> dataItems)\r\n        {\r\n            IAxis actualIndependentAxis = ActualIndependentAxis;\r\n            if ((null != ActualDependentAxis) && (null != actualIndependentAxis))\r\n            {\r\n                double plotAreaMaximumDependentCoordinate = ActualDependentAxis.GetPlotAreaCoordinate(ActualDependentRangeAxis.Range.Maximum).Value;\r\n                double zeroCoordinate = ActualDependentAxis.GetPlotAreaCoordinate(ActualDependentRangeAxis.Origin ?? 0.0).Value;\r\n                ICategoryAxis actualIndependentCategoryAxis = actualIndependentAxis as ICategoryAxis;\r\n                double nonCategoryAxisRangeMargin = (null != actualIndependentCategoryAxis) ? 0 : GetMarginForNonCategoryAxis(actualIndependentAxis);\r\n                foreach (IndependentValueGroup group in IndependentValueGroups)\r\n                {\r\n                    Range<UnitValue> categoryRange = new Range<UnitValue>();\r\n                    if (null != actualIndependentCategoryAxis)\r\n                    {\r\n                        categoryRange = actualIndependentCategoryAxis.GetPlotAreaCoordinateRange(group.IndependentValue);\r\n                    }\r\n                    else\r\n                    {\r\n                        UnitValue independentValueCoordinate = actualIndependentAxis.GetPlotAreaCoordinate(group.IndependentValue);\r\n                        if (ValueHelper.CanGraph(independentValueCoordinate.Value))\r\n                        {\r\n                            categoryRange = new Range<UnitValue>(new UnitValue(independentValueCoordinate.Value - nonCategoryAxisRangeMargin, independentValueCoordinate.Unit), new UnitValue(independentValueCoordinate.Value + nonCategoryAxisRangeMargin, independentValueCoordinate.Unit));\r\n                        }\r\n                    }\r\n                    if (categoryRange.HasData)\r\n                    {\r\n                        double categoryMinimumCoordinate = categoryRange.Minimum.Value;\r\n                        double categoryMaximumCoordinate = categoryRange.Maximum.Value;\r\n                        double padding = 0.1 * (categoryMaximumCoordinate - categoryMinimumCoordinate);\r\n                        categoryMinimumCoordinate += padding;\r\n                        categoryMaximumCoordinate -= padding;\r\n\r\n                        double sum = IsStacked100 ?\r\n                            group.DataItems.Sum(di => Math.Abs(ValueHelper.ToDouble(di.DataPoint.ActualDependentValue))) :\r\n                            1;\r\n                        if (0 == sum)\r\n                        {\r\n                            sum = 1;\r\n                        }\r\n                        double ceiling = 0;\r\n                        double floor = 0;\r\n                        foreach (DataItem dataItem in group.DataItems)\r\n                        {\r\n                            DataPoint dataPoint = dataItem.DataPoint;\r\n                            double value = IsStacked100 ? (ValueHelper.ToDouble(dataPoint.ActualDependentValue) * (100 / sum)) : ValueHelper.ToDouble(dataPoint.ActualDependentValue);\r\n                            if (ValueHelper.CanGraph(value))\r\n                            {\r\n                                double valueCoordinate = ActualDependentAxis.GetPlotAreaCoordinate(value).Value;\r\n                                double fillerCoordinate = (0 <= value) ? ceiling : floor;\r\n\r\n                                double topCoordinate = 0, leftCoordinate = 0, height = 0, width = 0, deltaCoordinate = 0;\r\n                                if (AxisOrientation.Y == ActualDependentAxis.Orientation)\r\n                                {\r\n                                    topCoordinate = plotAreaMaximumDependentCoordinate - Math.Max(valueCoordinate + fillerCoordinate, zeroCoordinate + fillerCoordinate);\r\n                                    double bottomCoordinate = plotAreaMaximumDependentCoordinate - Math.Min(valueCoordinate + fillerCoordinate, zeroCoordinate + fillerCoordinate);\r\n                                    deltaCoordinate = bottomCoordinate - topCoordinate;\r\n                                    height = (0 < deltaCoordinate) ? deltaCoordinate + 1 : 0;\r\n                                    leftCoordinate = categoryMinimumCoordinate;\r\n                                    width = categoryMaximumCoordinate - categoryMinimumCoordinate + 1;\r\n                                }\r\n                                else\r\n                                {\r\n                                    leftCoordinate = Math.Min(valueCoordinate + fillerCoordinate, zeroCoordinate + fillerCoordinate);\r\n                                    double rightCoordinate = Math.Max(valueCoordinate + fillerCoordinate, zeroCoordinate + fillerCoordinate);\r\n                                    deltaCoordinate = rightCoordinate - leftCoordinate;\r\n                                    width = (0 < deltaCoordinate) ? deltaCoordinate + 1 : 0;\r\n                                    topCoordinate = categoryMinimumCoordinate;\r\n                                    height = categoryMaximumCoordinate - categoryMinimumCoordinate + 1;\r\n                                }\r\n\r\n                                double roundedTopCoordinate = Math.Round(topCoordinate);\r\n                                Canvas.SetTop(dataItem.Container, roundedTopCoordinate);\r\n                                dataPoint.Height = Math.Round(topCoordinate + height - roundedTopCoordinate);\r\n                                double roundedLeftCoordinate = Math.Round(leftCoordinate);\r\n                                Canvas.SetLeft(dataItem.Container, roundedLeftCoordinate);\r\n                                dataPoint.Width = Math.Round(leftCoordinate + width - roundedLeftCoordinate);\r\n                                dataPoint.Visibility = Visibility.Visible;\r\n\r\n                                if (0 <= value)\r\n                                {\r\n                                    ceiling += deltaCoordinate;\r\n                                }\r\n                                else\r\n                                {\r\n                                    floor -= deltaCoordinate;\r\n                                }\r\n                            }\r\n                            else\r\n                            {\r\n                                dataPoint.Visibility = Visibility.Collapsed;\r\n                            }\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        foreach (DataPoint dataPoint in group.DataItems.Select(di => di.DataPoint))\r\n                        {\r\n                            dataPoint.Visibility = Visibility.Collapsed;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the margin to use for an independent axis that does not implement ICategoryAxis.\r\n        /// </summary>\r\n        /// <param name=\"axis\">Axis to get the margin for.</param>\r\n        /// <returns>Margin for axis.</returns>\r\n        private double GetMarginForNonCategoryAxis(IAxis axis)\r\n        {\r\n            Debug.Assert(!(axis is ICategoryAxis), \"This method is unnecessary for ICategoryAxis.\");\r\n\r\n            // Find the smallest distance between two independent value plot area coordinates\r\n            double smallestDistance = double.MaxValue;\r\n            double lastCoordinate = double.NaN;\r\n            foreach (double coordinate in\r\n                IndependentValueGroupsOrderedByIndependentValue\r\n                    .Select(g => axis.GetPlotAreaCoordinate(g.IndependentValue).Value)\r\n                    .Where(v => ValueHelper.CanGraph(v)))\r\n            {\r\n                if (!double.IsNaN(lastCoordinate))\r\n                {\r\n                    double distance = coordinate - lastCoordinate;\r\n                    if (distance < smallestDistance)\r\n                    {\r\n                        smallestDistance = distance;\r\n                    }\r\n                }\r\n                lastCoordinate = coordinate;\r\n            }\r\n            // Return the margin\r\n            if (double.MaxValue == smallestDistance)\r\n            {\r\n                // No smallest distance because <= 1 independent values to plot\r\n                FrameworkElement element = axis as FrameworkElement;\r\n                if (null != element)\r\n                {\r\n                    // Use width of provided axis so single column scenario looks good\r\n                    return element.GetMargin(axis);\r\n                }\r\n                else\r\n                {\r\n                    // No information to work with; no idea what margin to return\r\n                    throw new NotSupportedException();\r\n                }\r\n            }\r\n            else\r\n            {\r\n                // Found the smallest distance; margin is half of that\r\n                return smallestDistance / 2;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the anchored axis for the series.\r\n        /// </summary>\r\n        IRangeAxis IAnchoredToOrigin.AnchoredAxis\r\n        {\r\n            get { return ActualDependentRangeAxis; }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/StackedBarSeries.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Control that displays values as a stacked bar chart visualization.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public class StackedBarSeries : StackedBarColumnSeries\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the StackedBarSeries class.\r\n        /// </summary>\r\n        public StackedBarSeries()\r\n        {\r\n            DependentAxisOrientation = AxisOrientation.X;\r\n            IndependentAxisOrientation = AxisOrientation.Y;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates a DataPoint for the series.\r\n        /// </summary>\r\n        /// <returns>Series-appropriate DataPoint instance.</returns>\r\n        protected override DataPoint CreateDataPoint()\r\n        {\r\n            return new BarDataPoint();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/StackedColumnSeries.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Control that displays values as a stacked column chart visualization.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public class StackedColumnSeries : StackedBarColumnSeries\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the StackedColumnSeries class.\r\n        /// </summary>\r\n        public StackedColumnSeries()\r\n        {\r\n            DependentAxisOrientation = AxisOrientation.Y;\r\n            IndependentAxisOrientation = AxisOrientation.X;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates a DataPoint for the series.\r\n        /// </summary>\r\n        /// <returns>Series-appropriate DataPoint instance.</returns>\r\n        protected override DataPoint CreateDataPoint()\r\n        {\r\n            return new ColumnDataPoint();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/Series/StackedLineSeries.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\nusing System.Windows.Media;\r\nusing System.Windows.Shapes;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// Control that displays values as a stacked line chart visualization.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public class StackedLineSeries : StackedAreaLineSeries\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the StackedLineSeries class.\r\n        /// </summary>\r\n        public StackedLineSeries()\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates a DataPoint for the series.\r\n        /// </summary>\r\n        /// <returns>Series-appropriate DataPoint instance.</returns>\r\n        protected override DataPoint CreateDataPoint()\r\n        {\r\n            return new LineDataPoint();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates a series-appropriate Shape for connecting the points of the series.\r\n        /// </summary>\r\n        /// <returns>Shape instance.</returns>\r\n        protected override Shape CreateDataShape()\r\n        {\r\n            return new Polyline { Fill = null };\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the shape for the series.\r\n        /// </summary>\r\n        /// <param name=\"definitionPoints\">Locations of the points of each SeriesDefinition in the series.</param>\r\n        protected override void UpdateShape(IList<IEnumerable<Point>> definitionPoints)\r\n        {\r\n            for (int i = 0; i < SeriesDefinitions.Count; i++)\r\n            {\r\n                PointCollection pointCollection = new PointCollection();\r\n                foreach (Point p in ((ActualIndependentAxis is ICategoryAxis) ? definitionPoints[i].OrderBy(p => p.X) : definitionPoints[i]))\r\n                {\r\n                    pointCollection.Add(p);\r\n                }\r\n                SetPolylinePointsProperty((Polyline)SeriesDefinitionShapes[SeriesDefinitions[i]], pointCollection);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Sets the Points property of a Polyline to the specified PointCollection.\r\n        /// </summary>\r\n        /// <param name=\"polyline\">Polyline to set the Points property of.</param>\r\n        /// <param name=\"pointCollection\">Specified PointCollection.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Polyline\", Justification = \"Matches spelling of same-named framework class.\")]\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"polyline\", Justification = \"Matches spelling of same-named framework class.\")]\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1822:MarkMembersAsStatic\", Justification = \"Silverlight implementation is not static.\")]\r\n        protected void SetPolylinePointsProperty(Polyline polyline, PointCollection pointCollection)\r\n        {\r\n            polyline.Points = pointCollection;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Charting/ValueMarginCoordinateAndOverlap.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Charting\r\n{\r\n    /// <summary>\r\n    /// A class used to calculate axis range. \r\n    /// </summary>\r\n    internal class ValueMarginCoordinateAndOverlap\r\n    {\r\n        /// <summary>\r\n        /// Gets or sets the value margin object.\r\n        /// </summary>\r\n        public ValueMargin ValueMargin { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the coordinate.\r\n        /// </summary>\r\n        public double Coordinate { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the left overlap.\r\n        /// </summary>\r\n        public double LeftOverlap { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the right overlap.\r\n        /// </summary>\r\n        public double RightOverlap { get; set; }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the ValueMarginCoordinateAndOverlap \r\n        /// class.\r\n        /// </summary>\r\n        public ValueMarginCoordinateAndOverlap()\r\n        {\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Collections/LeftLeaningRedBlackTree.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\n// Uncomment this to enable the following debugging aids:\r\n//   LeftLeaningRedBlackTree.HtmlFragment\r\n//   LeftLeaningRedBlackTree.Node.HtmlFragment\r\n//   LeftLeaningRedBlackTree.AssertInvariants\r\n// #define DEBUGGING\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Diagnostics.CodeAnalysis;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Collections\r\n{\r\n    /// <summary>\r\n    /// Implements a left-leaning red-black tree.\r\n    /// </summary>\r\n    /// <remarks>\r\n    /// Based on the research paper \"Left-leaning Red-Black Trees\"\r\n    /// by Robert Sedgewick. More information available at:\r\n    /// http://www.cs.princeton.edu/~rs/talks/LLRB/RedBlack.pdf\r\n    /// http://www.cs.princeton.edu/~rs/talks/LLRB/08Penn.pdf\r\n    /// </remarks>\r\n    /// <typeparam name=\"TKey\">Type of keys.</typeparam>\r\n    /// <typeparam name=\"TValue\">Type of values.</typeparam>\r\n    internal class LeftLeaningRedBlackTree<TKey, TValue>\r\n    {\r\n        /// <summary>\r\n        /// Stores the key comparison function.\r\n        /// </summary>\r\n        private Comparison<TKey> _keyComparison;\r\n\r\n        /// <summary>\r\n        /// Stores the value comparison function.\r\n        /// </summary>\r\n        private Comparison<TValue> _valueComparison;\r\n\r\n        /// <summary>\r\n        /// Stores the root node of the tree.\r\n        /// </summary>\r\n        private Node _rootNode;\r\n\r\n        /// <summary>\r\n        /// Represents a node of the tree.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// Using fields instead of properties drops execution time by about 40%.\r\n        /// </remarks>\r\n        [DebuggerDisplay(\"Key={Key}, Value={Value}, Siblings={Siblings}\")]\r\n        private class Node\r\n        {\r\n            /// <summary>\r\n            /// Gets or sets the node's key.\r\n            /// </summary>\r\n            public TKey Key;\r\n\r\n            /// <summary>\r\n            /// Gets or sets the node's value.\r\n            /// </summary>\r\n            public TValue Value;\r\n\r\n            /// <summary>\r\n            /// Gets or sets the left node.\r\n            /// </summary>\r\n            public Node Left;\r\n\r\n            /// <summary>\r\n            /// Gets or sets the right node.\r\n            /// </summary>\r\n            public Node Right;\r\n\r\n            /// <summary>\r\n            /// Gets or sets the color of the node.\r\n            /// </summary>\r\n            public bool IsBlack;\r\n\r\n            /// <summary>\r\n            /// Gets or sets the number of \"siblings\" (nodes with the same key/value).\r\n            /// </summary>\r\n            public int Siblings;\r\n\r\n#if DEBUGGING\r\n        /// <summary>\r\n        /// Gets an HTML fragment representing the node and its children.\r\n        /// </summary>\r\n        public string HtmlFragment\r\n        {\r\n            get\r\n            {\r\n                return\r\n                    \"<table border='1'>\" +\r\n                        \"<tr>\" +\r\n                            \"<td colspan='2' align='center' bgcolor='\" + (IsBlack ? \"gray\" : \"red\") + \"'>\" + Key + \", \" + Value + \" [\" + Siblings + \"]</td>\" +\r\n                        \"</tr>\" +\r\n                        \"<tr>\" +\r\n                            \"<td valign='top'>\" + (null != Left ? Left.HtmlFragment : \"[null]\") + \"</td>\" +\r\n                            \"<td valign='top'>\" + (null != Right ? Right.HtmlFragment : \"[null]\") + \"</td>\" +\r\n                        \"</tr>\" +\r\n                    \"</table>\";\r\n            }\r\n        }\r\n#endif\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the LeftLeaningRedBlackTree class implementing a normal dictionary.\r\n        /// </summary>\r\n        /// <param name=\"keyComparison\">The key comparison function.</param>\r\n        public LeftLeaningRedBlackTree(Comparison<TKey> keyComparison)\r\n        {\r\n            if (null == keyComparison)\r\n            {\r\n                throw new ArgumentNullException(\"keyComparison\");\r\n            }\r\n            _keyComparison = keyComparison;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the LeftLeaningRedBlackTree class implementing an ordered multi-dictionary.\r\n        /// </summary>\r\n        /// <param name=\"keyComparison\">The key comparison function.</param>\r\n        /// <param name=\"valueComparison\">The value comparison function.</param>\r\n        public LeftLeaningRedBlackTree(Comparison<TKey> keyComparison, Comparison<TValue> valueComparison)\r\n            : this(keyComparison)\r\n        {\r\n            if (null == valueComparison)\r\n            {\r\n                throw new ArgumentNullException(\"valueComparison\");\r\n            }\r\n            _valueComparison = valueComparison;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether the tree is acting as an ordered multi-dictionary.\r\n        /// </summary>\r\n        private bool IsMultiDictionary\r\n        {\r\n            get { return null != _valueComparison; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Adds a key/value pair to the tree.\r\n        /// </summary>\r\n        /// <param name=\"key\">Key to add.</param>\r\n        /// <param name=\"value\">Value to add.</param>\r\n        public void Add(TKey key, TValue value)\r\n        {\r\n            _rootNode = Add(_rootNode, key, value);\r\n            _rootNode.IsBlack = true;\r\n#if DEBUGGING\r\n            AssertInvariants();\r\n#endif\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes a key (and its associated value) from a normal (non-multi) dictionary.\r\n        /// </summary>\r\n        /// <param name=\"key\">Key to remove.</param>\r\n        /// <returns>True if key present and removed.</returns>\r\n        public bool Remove(TKey key)\r\n        {\r\n            if (IsMultiDictionary)\r\n            {\r\n                throw new InvalidOperationException(\"Remove is only supported when acting as a normal (non-multi) dictionary.\");\r\n            }\r\n            return Remove(key, default(TValue));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes a key/value pair from the tree.\r\n        /// </summary>\r\n        /// <param name=\"key\">Key to remove.</param>\r\n        /// <param name=\"value\">Value to remove.</param>\r\n        /// <returns>True if key/value present and removed.</returns>\r\n        public bool Remove(TKey key, TValue value)\r\n        {\r\n            int initialCount = Count;\r\n            if (null != _rootNode)\r\n            {\r\n                _rootNode = Remove(_rootNode, key, value);\r\n                if (null != _rootNode)\r\n                {\r\n                    _rootNode.IsBlack = true;\r\n                }\r\n            }\r\n#if DEBUGGING\r\n            AssertInvariants();\r\n#endif\r\n            return initialCount != Count;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes all nodes in the tree.\r\n        /// </summary>\r\n        public void Clear()\r\n        {\r\n            _rootNode = null;\r\n            Count = 0;\r\n#if DEBUGGING\r\n            AssertInvariants();\r\n#endif\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a sorted list of keys in the tree.\r\n        /// </summary>\r\n        /// <returns>Sorted list of keys.</returns>\r\n        public IEnumerable<TKey> GetKeys()\r\n        {\r\n            TKey lastKey = default(TKey);\r\n            bool lastKeyValid = false;\r\n            return Traverse(\r\n                _rootNode,\r\n                n => !lastKeyValid || !object.Equals(lastKey, n.Key),\r\n                n =>\r\n                {\r\n                    lastKey = n.Key;\r\n                    lastKeyValid = true;\r\n                    return lastKey;\r\n                });\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the value associated with the specified key in a normal (non-multi) dictionary.\r\n        /// </summary>\r\n        /// <param name=\"key\">Specified key.</param>\r\n        /// <returns>Value associated with the specified key.</returns>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA2204:Literals should be spelled correctly\", MessageId = \"GetValueForKey\", Justification = \"Method name.\")]\r\n        public TValue GetValueForKey(TKey key)\r\n        {\r\n            if (IsMultiDictionary)\r\n            {\r\n                throw new InvalidOperationException(\"GetValueForKey is only supported when acting as a normal (non-multi) dictionary.\");\r\n            }\r\n            Node node = GetNodeForKey(key);\r\n            if (null != node)\r\n            {\r\n                return node.Value;\r\n            }\r\n            else\r\n            {\r\n                throw new KeyNotFoundException();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a sequence of the values associated with the specified key.\r\n        /// </summary>\r\n        /// <param name=\"key\">Specified key.</param>\r\n        /// <returns>Sequence of values.</returns>\r\n        public IEnumerable<TValue> GetValuesForKey(TKey key)\r\n        {\r\n            return Traverse(GetNodeForKey(key), n => 0 == _keyComparison(n.Key, key), n => n.Value);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a sequence of all the values in the tree.\r\n        /// </summary>\r\n        /// <returns>Sequence of all values.</returns>\r\n        public IEnumerable<TValue> GetValuesForAllKeys()\r\n        {\r\n            return Traverse(_rootNode, n => true, n => n.Value);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the count of key/value pairs in the tree.\r\n        /// </summary>\r\n        public int Count { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Gets the minimum key in the tree.\r\n        /// </summary>\r\n        public TKey MinimumKey\r\n        {\r\n            get { return GetExtreme(_rootNode, n => n.Left, n => n.Key); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the maximum key in the tree.\r\n        /// </summary>\r\n        public TKey MaximumKey\r\n        {\r\n            get { return GetExtreme(_rootNode, n => n.Right, n => n.Key); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the minimum key's minimum value.\r\n        /// </summary>\r\n        public TValue MinimumValue\r\n        {\r\n            get { return GetExtreme(_rootNode, n => n.Left, n => n.Value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the maximum key's maximum value.\r\n        /// </summary>\r\n        public TValue MaximumValue\r\n        {\r\n            get { return GetExtreme(_rootNode, n => n.Right, n => n.Value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns true if the specified node is red.\r\n        /// </summary>\r\n        /// <param name=\"node\">Specified node.</param>\r\n        /// <returns>True if specified node is red.</returns>\r\n        private static bool IsRed(Node node)\r\n        {\r\n            if (null == node)\r\n            {\r\n                // \"Virtual\" leaf nodes are always black\r\n                return false;\r\n            }\r\n            return !node.IsBlack;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Adds the specified key/value pair below the specified root node.\r\n        /// </summary>\r\n        /// <param name=\"node\">Specified node.</param>\r\n        /// <param name=\"key\">Key to add.</param>\r\n        /// <param name=\"value\">Value to add.</param>\r\n        /// <returns>New root node.</returns>\r\n        private Node Add(Node node, TKey key, TValue value)\r\n        {\r\n            if (null == node)\r\n            {\r\n                // Insert new node\r\n                Count++;\r\n                return new Node { Key = key, Value = value };\r\n            }\r\n\r\n            if (IsRed(node.Left) && IsRed(node.Right))\r\n            {\r\n                // Split node with two red children\r\n                FlipColor(node);\r\n            }\r\n\r\n            // Find right place for new node\r\n            int comparisonResult = KeyAndValueComparison(key, value, node.Key, node.Value);\r\n            if (comparisonResult < 0)\r\n            {\r\n                node.Left = Add(node.Left, key, value);\r\n            }\r\n            else if (0 < comparisonResult)\r\n            {\r\n                node.Right = Add(node.Right, key, value);\r\n            }\r\n            else\r\n            {\r\n                if (IsMultiDictionary)\r\n                {\r\n                    // Store the presence of a \"duplicate\" node\r\n                    node.Siblings++;\r\n                    Count++;\r\n                }\r\n                else\r\n                {\r\n                    // Replace the value of the existing node\r\n                    node.Value = value;\r\n                }\r\n            }\r\n\r\n            if (IsRed(node.Right))\r\n            {\r\n                // Rotate to prevent red node on right\r\n                node = RotateLeft(node);\r\n            }\r\n\r\n            if (IsRed(node.Left) && IsRed(node.Left.Left))\r\n            {\r\n                // Rotate to prevent consecutive red nodes\r\n                node = RotateRight(node);\r\n            }\r\n\r\n            return node;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes the specified key/value pair from below the specified node.\r\n        /// </summary>\r\n        /// <param name=\"node\">Specified node.</param>\r\n        /// <param name=\"key\">Key to remove.</param>\r\n        /// <param name=\"value\">Value to remove.</param>\r\n        /// <returns>True if key/value present and removed.</returns>\r\n        private Node Remove(Node node, TKey key, TValue value)\r\n        {\r\n            int comparisonResult = KeyAndValueComparison(key, value, node.Key, node.Value);\r\n            if (comparisonResult < 0)\r\n            {\r\n                // * Continue search if left is present\r\n                if (null != node.Left)\r\n                {\r\n                    if (!IsRed(node.Left) && !IsRed(node.Left.Left))\r\n                    {\r\n                        // Move a red node over\r\n                        node = MoveRedLeft(node);\r\n                    }\r\n\r\n                    // Remove from left\r\n                    node.Left = Remove(node.Left, key, value);\r\n                }\r\n            }\r\n            else\r\n            {\r\n                if (IsRed(node.Left))\r\n                {\r\n                    // Flip a 3 node or unbalance a 4 node\r\n                    node = RotateRight(node);\r\n                }\r\n                if ((0 == KeyAndValueComparison(key, value, node.Key, node.Value)) && (null == node.Right))\r\n                {\r\n                    // Remove leaf node\r\n                    Debug.Assert(null == node.Left, \"About to remove an extra node.\");\r\n                    Count--;\r\n                    if (0 < node.Siblings)\r\n                    {\r\n                        // Record the removal of the \"duplicate\" node\r\n                        Debug.Assert(IsMultiDictionary, \"Should not have siblings if tree is not a multi-dictionary.\");\r\n                        node.Siblings--;\r\n                        return node;\r\n                    }\r\n                    else\r\n                    {\r\n                        // Leaf node is gone\r\n                        return null;\r\n                    }\r\n                }\r\n                // * Continue search if right is present\r\n                if (null != node.Right)\r\n                {\r\n                    if (!IsRed(node.Right) && !IsRed(node.Right.Left))\r\n                    {\r\n                        // Move a red node over\r\n                        node = MoveRedRight(node);\r\n                    }\r\n                    if (0 == KeyAndValueComparison(key, value, node.Key, node.Value))\r\n                    {\r\n                        // Remove leaf node\r\n                        Count--;\r\n                        if (0 < node.Siblings)\r\n                        {\r\n                            // Record the removal of the \"duplicate\" node\r\n                            Debug.Assert(IsMultiDictionary, \"Should not have siblings if tree is not a multi-dictionary.\");\r\n                            node.Siblings--;\r\n                        }\r\n                        else\r\n                        {\r\n                            // Find the smallest node on the right, swap, and remove it\r\n                            Node m = GetExtreme(node.Right, n => n.Left, n => n);\r\n                            node.Key = m.Key;\r\n                            node.Value = m.Value;\r\n                            node.Siblings = m.Siblings;\r\n                            node.Right = DeleteMinimum(node.Right);\r\n                        }\r\n                    }\r\n                    else\r\n                    {\r\n                        // Remove from right\r\n                        node.Right = Remove(node.Right, key, value);\r\n                    }\r\n                }\r\n            }\r\n\r\n            // Maintain invariants\r\n            return FixUp(node);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Flip the colors of the specified node and its direct children.\r\n        /// </summary>\r\n        /// <param name=\"node\">Specified node.</param>\r\n        private static void FlipColor(Node node)\r\n        {\r\n            node.IsBlack = !node.IsBlack;\r\n            node.Left.IsBlack = !node.Left.IsBlack;\r\n            node.Right.IsBlack = !node.Right.IsBlack;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Rotate the specified node \"left\".\r\n        /// </summary>\r\n        /// <param name=\"node\">Specified node.</param>\r\n        /// <returns>New root node.</returns>\r\n        private static Node RotateLeft(Node node)\r\n        {\r\n            Node x = node.Right;\r\n            node.Right = x.Left;\r\n            x.Left = node;\r\n            x.IsBlack = node.IsBlack;\r\n            node.IsBlack = false;\r\n            return x;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Rotate the specified node \"right\".\r\n        /// </summary>\r\n        /// <param name=\"node\">Specified node.</param>\r\n        /// <returns>New root node.</returns>\r\n        private static Node RotateRight(Node node)\r\n        {\r\n            Node x = node.Left;\r\n            node.Left = x.Right;\r\n            x.Right = node;\r\n            x.IsBlack = node.IsBlack;\r\n            node.IsBlack = false;\r\n            return x;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Moves a red node from the right child to the left child.\r\n        /// </summary>\r\n        /// <param name=\"node\">Parent node.</param>\r\n        /// <returns>New root node.</returns>\r\n        private static Node MoveRedLeft(Node node)\r\n        {\r\n            FlipColor(node);\r\n            if (IsRed(node.Right.Left))\r\n            {\r\n                node.Right = RotateRight(node.Right);\r\n                node = RotateLeft(node);\r\n                FlipColor(node);\r\n\r\n                // * Avoid creating right-leaning nodes\r\n                if (IsRed(node.Right.Right))\r\n                {\r\n                    node.Right = RotateLeft(node.Right);\r\n                }\r\n            }\r\n            return node;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Moves a red node from the left child to the right child.\r\n        /// </summary>\r\n        /// <param name=\"node\">Parent node.</param>\r\n        /// <returns>New root node.</returns>\r\n        private static Node MoveRedRight(Node node)\r\n        {\r\n            FlipColor(node);\r\n            if (IsRed(node.Left.Left))\r\n            {\r\n                node = RotateRight(node);\r\n                FlipColor(node);\r\n            }\r\n            return node;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Deletes the minimum node under the specified node.\r\n        /// </summary>\r\n        /// <param name=\"node\">Specified node.</param>\r\n        /// <returns>New root node.</returns>\r\n        private Node DeleteMinimum(Node node)\r\n        {\r\n            if (null == node.Left)\r\n            {\r\n                // Nothing to do\r\n                return null;\r\n            }\r\n\r\n            if (!IsRed(node.Left) && !IsRed(node.Left.Left))\r\n            {\r\n                // Move red node left\r\n                node = MoveRedLeft(node);\r\n            }\r\n\r\n            // Recursively delete\r\n            node.Left = DeleteMinimum(node.Left);\r\n\r\n            // Maintain invariants\r\n            return FixUp(node);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Maintains invariants by adjusting the specified nodes children.\r\n        /// </summary>\r\n        /// <param name=\"node\">Specified node.</param>\r\n        /// <returns>New root node.</returns>\r\n        private static Node FixUp(Node node)\r\n        {\r\n            if (IsRed(node.Right))\r\n            {\r\n                // Avoid right-leaning node\r\n                node = RotateLeft(node);\r\n            }\r\n\r\n            if (IsRed(node.Left) && IsRed(node.Left.Left))\r\n            {\r\n                // Balance 4-node\r\n                node = RotateRight(node);\r\n            }\r\n\r\n            if (IsRed(node.Left) && IsRed(node.Right))\r\n            {\r\n                // Push red up\r\n                FlipColor(node);\r\n            }\r\n\r\n            // * Avoid leaving behind right-leaning nodes\r\n            if ((null != node.Left) && IsRed(node.Left.Right) && !IsRed(node.Left.Left))\r\n            {\r\n                node.Left = RotateLeft(node.Left);\r\n                if (IsRed(node.Left))\r\n                {\r\n                    // Balance 4-node\r\n                    node = RotateRight(node);\r\n                }\r\n            }\r\n\r\n            return node;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the (first) node corresponding to the specified key.\r\n        /// </summary>\r\n        /// <param name=\"key\">Key to search for.</param>\r\n        /// <returns>Corresponding node or null if none found.</returns>\r\n        private Node GetNodeForKey(TKey key)\r\n        {\r\n            // Initialize\r\n            Node node = _rootNode;\r\n            while (null != node)\r\n            {\r\n                // Compare keys and go left/right\r\n                int comparisonResult = _keyComparison(key, node.Key);\r\n                if (comparisonResult < 0)\r\n                {\r\n                    node = node.Left;\r\n                }\r\n                else if (0 < comparisonResult)\r\n                {\r\n                    node = node.Right;\r\n                }\r\n                else\r\n                {\r\n                    // Match; return node\r\n                    return node;\r\n                }\r\n            }\r\n\r\n            // No match found\r\n            return null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets an extreme (ex: minimum/maximum) value.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">Type of value.</typeparam>\r\n        /// <param name=\"node\">Node to start from.</param>\r\n        /// <param name=\"successor\">Successor function.</param>\r\n        /// <param name=\"selector\">Selector function.</param>\r\n        /// <returns>Extreme value.</returns>\r\n        private static T GetExtreme<T>(Node node, Func<Node, Node> successor, Func<Node, T> selector)\r\n        {\r\n            // Initialize\r\n            T extreme = default(T);\r\n            Node current = node;\r\n            while (null != current)\r\n            {\r\n                // Go to extreme\r\n                extreme = selector(current);\r\n                current = successor(current);\r\n            }\r\n            return extreme;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Traverses a subset of the sequence of nodes in order and selects the specified nodes.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">Type of elements.</typeparam>\r\n        /// <param name=\"node\">Starting node.</param>\r\n        /// <param name=\"condition\">Condition method.</param>\r\n        /// <param name=\"selector\">Selector method.</param>\r\n        /// <returns>Sequence of selected nodes.</returns>\r\n        private IEnumerable<T> Traverse<T>(Node node, Func<Node, bool> condition, Func<Node, T> selector)\r\n        {\r\n            // Create a stack to avoid recursion\r\n            Stack<Node> stack = new Stack<Node>();\r\n            Node current = node;\r\n            while (null != current)\r\n            {\r\n                if (null != current.Left)\r\n                {\r\n                    // Save current state and go left\r\n                    stack.Push(current);\r\n                    current = current.Left;\r\n                }\r\n                else\r\n                {\r\n                    do\r\n                    {\r\n                        for (int i = 0; i <= current.Siblings; i++)\r\n                        {\r\n                            // Select current node if relevant\r\n                            if (condition(current))\r\n                            {\r\n                                yield return selector(current);\r\n                            }\r\n                        }\r\n                        // Go right - or up if nothing to the right\r\n                        current = current.Right;\r\n                    }\r\n                    while ((null == current) &&\r\n                           (0 < stack.Count) &&\r\n                           (null != (current = stack.Pop())));\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Compares the specified keys (primary) and values (secondary).\r\n        /// </summary>\r\n        /// <param name=\"leftKey\">The left key.</param>\r\n        /// <param name=\"leftValue\">The left value.</param>\r\n        /// <param name=\"rightKey\">The right key.</param>\r\n        /// <param name=\"rightValue\">The right value.</param>\r\n        /// <returns>CompareTo-style results: -1 if left is less, 0 if equal, and 1 if greater than right.</returns>\r\n        private int KeyAndValueComparison(TKey leftKey, TValue leftValue, TKey rightKey, TValue rightValue)\r\n        {\r\n            // Compare keys\r\n            int comparisonResult = _keyComparison(leftKey, rightKey);\r\n            if ((0 == comparisonResult) && (null != _valueComparison))\r\n            {\r\n                // Keys match; compare values\r\n                comparisonResult = _valueComparison(leftValue, rightValue);\r\n            }\r\n            return comparisonResult;\r\n        }\r\n\r\n#if DEBUGGING\r\n        /// <summary>\r\n        /// Asserts that tree invariants are not violated.\r\n        /// </summary>\r\n        private void AssertInvariants()\r\n        {\r\n            // Root is black\r\n            Debug.Assert((null == _rootNode) || _rootNode.IsBlack, \"Root is not black\");\r\n            // Every path contains the same number of black nodes\r\n            Dictionary<Node, Node> parents = new Dictionary<LeftLeaningRedBlackTree<TKey, TValue>.Node, LeftLeaningRedBlackTree<TKey, TValue>.Node>();\r\n            foreach (Node node in Traverse(_rootNode, n => true, n => n))\r\n            {\r\n                if (null != node.Left)\r\n                {\r\n                    parents[node.Left] = node;\r\n                }\r\n                if (null != node.Right)\r\n                {\r\n                    parents[node.Right] = node;\r\n                }\r\n            }\r\n            if (null != _rootNode)\r\n            {\r\n                parents[_rootNode] = null;\r\n            }\r\n            int treeCount = -1;\r\n            foreach (Node node in Traverse(_rootNode, n => (null == n.Left) || (null == n.Right), n => n))\r\n            {\r\n                int pathCount = 0;\r\n                Node current = node;\r\n                while (null != current)\r\n                {\r\n                    if (current.IsBlack)\r\n                    {\r\n                        pathCount++;\r\n                    }\r\n                    current = parents[current];\r\n                }\r\n                Debug.Assert((-1 == treeCount) || (pathCount == treeCount), \"Not all paths have the same number of black nodes.\");\r\n                treeCount = pathCount;\r\n            }\r\n            // Verify node properties...\r\n            foreach (Node node in Traverse(_rootNode, n => true, n => n))\r\n            {\r\n                // Left node is less\r\n                if (null != node.Left)\r\n                {\r\n                    Debug.Assert(0 > KeyAndValueComparison(node.Left.Key, node.Left.Value, node.Key, node.Value), \"Left node is greater than its parent.\");\r\n                }\r\n                // Right node is greater\r\n                if (null != node.Right)\r\n                {\r\n                    Debug.Assert(0 < KeyAndValueComparison(node.Right.Key, node.Right.Value, node.Key, node.Value), \"Right node is less than its parent.\");\r\n                }\r\n                // Both children of a red node are black\r\n                Debug.Assert(!IsRed(node) || (!IsRed(node.Left) && !IsRed(node.Right)), \"Red node has a red child.\");\r\n                // Always left-leaning\r\n                Debug.Assert(!IsRed(node.Right) || IsRed(node.Left), \"Node is not left-leaning.\");\r\n                // No consecutive reds (subset of previous rule)\r\n                //Debug.Assert(!(IsRed(node) && IsRed(node.Left)));\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets an HTML fragment representing the tree.\r\n        /// </summary>\r\n        public string HtmlDocument\r\n        {\r\n            get\r\n            {\r\n                return\r\n                    \"<html>\" +\r\n                        \"<body>\" +\r\n                            (null != _rootNode ? _rootNode.HtmlFragment : \"[null]\") +\r\n                        \"</body>\" +\r\n                    \"</html>\";\r\n            }\r\n        }\r\n#endif\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Collections/MultipleDictionary.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Collections\r\n{\r\n    /// <summary>\r\n    /// Implements a dictionary that can store multiple values for the same key.\r\n    /// </summary>\r\n    /// <typeparam name=\"TKey\">Type for keys.</typeparam>\r\n    /// <typeparam name=\"TValue\">Type for values.</typeparam>\r\n    internal class MultipleDictionary<TKey, TValue>\r\n    {\r\n        /// <summary>\r\n        /// Gets or sets the BinaryTree instance used to store the dictionary values.\r\n        /// </summary>\r\n        protected LeftLeaningRedBlackTree<TKey, TValue> BinaryTree { get; set; }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the MultipleDictionary class.\r\n        /// </summary>\r\n        protected MultipleDictionary()\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the MultipleDictionary class.\r\n        /// </summary>\r\n        /// <param name=\"allowDuplicateValues\">The parameter is not used.</param>\r\n        /// <param name=\"keyEqualityComparer\">The parameter is not used.</param>\r\n        /// <param name=\"valueEqualityComparer\">The parameter is not used.</param>\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA1801:ReviewUnusedParameters\", MessageId = \"allowDuplicateValues\", Justification = \"Unused parameter exists for API compatibility.\")]\r\n        public MultipleDictionary(bool allowDuplicateValues, IEqualityComparer<TKey> keyEqualityComparer, IEqualityComparer<TValue> valueEqualityComparer)\r\n        {\r\n            Debug.Assert(null != keyEqualityComparer, \"keyEqualityComparer must not be null.\");\r\n            Debug.Assert(null != valueEqualityComparer, \"valueEqualityComparer must not be null.\");\r\n            BinaryTree = new LeftLeaningRedBlackTree<TKey, TValue>(\r\n                (left, right) => keyEqualityComparer.GetHashCode(left).CompareTo(keyEqualityComparer.GetHashCode(right)),\r\n                (left, right) => valueEqualityComparer.GetHashCode(left).CompareTo(valueEqualityComparer.GetHashCode(right)));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Adds a key/value pair to the dictionary.\r\n        /// </summary>\r\n        /// <param name=\"key\">Key to add.</param>\r\n        /// <param name=\"value\">Value to add.</param>\r\n        public void Add(TKey key, TValue value)\r\n        {\r\n            BinaryTree.Add(key, value);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes a key/value pair from the dictionary.\r\n        /// </summary>\r\n        /// <param name=\"key\">Key to remove.</param>\r\n        /// <param name=\"value\">Value to remove.</param>\r\n        /// <returns>True if the value was present and removed.</returns>\r\n        public bool Remove(TKey key, TValue value)\r\n        {\r\n            return BinaryTree.Remove(key, value);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the count of values in the dictionary.\r\n        /// </summary>\r\n        public int Count\r\n        {\r\n            get\r\n            {\r\n                return BinaryTree.Count;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the collection of values corresponding to a key.\r\n        /// </summary>\r\n        /// <param name=\"key\">Specified key.</param>\r\n        /// <returns>Collection of values.</returns>\r\n        public ICollection<TValue> this[TKey key]\r\n        {\r\n            get\r\n            {\r\n                return BinaryTree.GetValuesForKey(key).ToList();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Clears the items in the dictionary.\r\n        /// </summary>\r\n        public void Clear()\r\n        {\r\n            BinaryTree.Clear();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Collections/OrderedMultipleDictionary.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Collections\r\n{\r\n    /// <summary>\r\n    /// Implements a dictionary that can store multiple values for the same key and sorts the values.\r\n    /// </summary>\r\n    /// <typeparam name=\"TKey\">Type for keys.</typeparam>\r\n    /// <typeparam name=\"TValue\">Type for values.</typeparam>\r\n    internal class OrderedMultipleDictionary<TKey, TValue> : MultipleDictionary<TKey, TValue>, IEnumerable<TValue>\r\n        where TKey : IComparable\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the MultipleDictionary class.\r\n        /// </summary>\r\n        /// <param name=\"allowDuplicateValues\">The parameter is not used.</param>\r\n        /// <param name=\"keyComparison\">Key comparison class.</param>\r\n        /// <param name=\"valueComparison\">Value comparison class.</param>\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA1801:ReviewUnusedParameters\", MessageId = \"allowDuplicateValues\", Justification = \"Unused parameter exists for API compatibility.\")]\r\n        public OrderedMultipleDictionary(bool allowDuplicateValues, Comparison<TKey> keyComparison, Comparison<TValue> valueComparison)\r\n        {\r\n            Debug.Assert(null != keyComparison, \"keyComparison must not be null.\");\r\n            Debug.Assert(null != valueComparison, \"valueComparison must not be null.\");\r\n            BinaryTree = new LeftLeaningRedBlackTree<TKey, TValue>(keyComparison, valueComparison);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a Range corresponding to the keys in the dictionary.\r\n        /// </summary>\r\n        /// <returns>Range of keys.</returns>\r\n        public Range<TKey> GetKeyRange()\r\n        {\r\n            if (0 < BinaryTree.Count)\r\n            {\r\n                return new Range<TKey>(BinaryTree.MinimumKey, BinaryTree.MaximumKey);\r\n            }\r\n            else\r\n            {\r\n                return new Range<TKey>();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the largest and smallest key's extreme values from the dictionary.\r\n        /// </summary>\r\n        /// <returns>Tuple of the largest and smallest values.</returns>\r\n        public Tuple<TValue, TValue> GetLargestAndSmallestValues()\r\n        {\r\n            if (0 < BinaryTree.Count)\r\n            {\r\n                return new Tuple<TValue, TValue>(BinaryTree.MinimumValue, BinaryTree.MaximumValue);\r\n            }\r\n            else\r\n            {\r\n                return null;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets an enumerator for the values in the dictionary.\r\n        /// </summary>\r\n        /// <returns>Enumerator for values.</returns>\r\n        public IEnumerator<TValue> GetEnumerator()\r\n        {\r\n            return BinaryTree.GetValuesForAllKeys().GetEnumerator();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets an enumerator for the values in the dictionary.\r\n        /// </summary>\r\n        /// <returns>Enumerator for the values.</returns>\r\n        IEnumerator IEnumerable.GetEnumerator()\r\n        {\r\n            return BinaryTree.GetValuesForAllKeys().GetEnumerator();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/ColorExtensions.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Windows.Media;\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Contains extensions to Color structure for HSL  color mode.\r\n    /// </summary>\r\n    internal static class ColorExtensions\r\n    {\r\n        /// <summary>\r\n        /// Gets the color component (R,G or B) with maximal value.\r\n        /// </summary>\r\n        /// <param name=\"red\">The red component value for the Color. Valid values are 0 through 255.</param>\r\n        /// <param name=\"green\">The green component value for the Color. Valid values are 0 through 255.</param>\r\n        /// <param name=\"blue\">The blue component value for the Color. Valid values are 0 through 255.</param>\r\n        /// <returns>Component with maximal value.</returns>\r\n        private static byte MaxColor(byte red, byte green, byte blue)\r\n        {\r\n            return Math.Max(red, Math.Max(green, blue));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the color component (R,G or B) with minimal value.\r\n        /// </summary>\r\n        /// <param name=\"red\">The red component value for the Color. Valid values are 0 through 255.</param>\r\n        /// <param name=\"green\">The green component value for the Color. Valid values are 0 through 255.</param>\r\n        /// <param name=\"blue\">The blue component value for the Color. Valid values are 0 through 255.</param>\r\n        /// <returns>Component with minimal value.</returns>\r\n        private static byte MinColor(byte red, byte green, byte blue)\r\n        {\r\n            return Math.Min(red, Math.Min(green, blue));\r\n        }\r\n\r\n        /// <summary>\r\n        /// The hue, in degrees, of the Color. \r\n        /// The hue is measured in degrees, ranging from 0.0 through 360.0, \r\n        /// in HSL  color space.\r\n        /// </summary>\r\n        /// <param name=\"color\">The Color structure that this method uses.</param>\r\n        /// <returns>\r\n        /// The hue, in degrees, of the Color structure. The hue is \r\n        /// measured in degrees, ranging from 0.0 through 360.0, in HSL color \r\n        /// space.\r\n        /// </returns>\r\n        public static float GetHue(this Color color)\r\n        {\r\n            float hue;\r\n\r\n            int max = MaxColor(color.R, color.G, color.B);\r\n            int min = MinColor(color.R, color.G, color.B);\r\n            int denominator = max - min;\r\n\r\n            if (denominator == 0)\r\n            {\r\n                return 0f;\r\n            }\r\n\r\n            if (color.R == max)\r\n            {\r\n                hue = (float)(color.G - color.B) / denominator;\r\n            }\r\n            else if (color.G == max)\r\n            {\r\n                hue = 2f + ((float)(color.B - color.R) / denominator);\r\n            }\r\n            else\r\n            {\r\n                // if (color.B == max)\r\n                hue = 4f + ((float)(color.R - color.G) / denominator);\r\n            }\r\n\r\n            hue *= 60f;\r\n            if (hue < 0f)\r\n            {\r\n                hue += 360f;\r\n            }\r\n            return hue;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the hue-saturation-brightness (HSL ) saturation value for the \r\n        /// Color structure.\r\n        /// </summary>\r\n        /// <param name=\"color\">The Color structure that this method uses.</param>\r\n        /// <returns>\r\n        /// The saturation of the Color structure. The saturation ranges from \r\n        /// 0.0 through 1.0, where 0.0 is grayscale and 1.0 is the most saturate.\r\n        /// </returns>\r\n        public static float GetSaturation(this Color color)\r\n        {\r\n            float max = MaxColor(color.R, color.G, color.B) / 255f;\r\n            float min = MinColor(color.R, color.G, color.B) / 255f;\r\n\r\n            if (max - min == 0)\r\n            {\r\n                return 0f;\r\n            }\r\n\r\n            float median = (max + min) / 2f;\r\n            if (median <= 0.5)\r\n            {\r\n                return (float)(max - min) / (max + min);\r\n            }\r\n            return (max - min) / ((2f - max) - min);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the hue-saturation-lightness (HSL) lightness value for the \r\n        /// Color structure.\r\n        /// </summary>\r\n        /// <param name=\"color\">The Color structure that this method uses.</param>\r\n        /// <returns>\r\n        /// The brightness of the Color. The brightness ranges from 0.0 through \r\n        /// 1.0, where 0.0 represents black and 1.0 represents white.\r\n        /// </returns>\r\n        public static float GetLightness(this Color color)\r\n        {\r\n            float max = MaxColor(color.R, color.G, color.B) / 255f;\r\n            float min = MinColor(color.R, color.G, color.B) / 255f;\r\n\r\n            return (max + min) / 2f;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates a new color from HSL  parameters.\r\n        /// </summary>\r\n        /// <param name=\"color\">The Color structure that this method uses.</param>\r\n        /// <param name=\"a\">The alpha component. Valid values are 0 through 255.</param>\r\n        /// <param name=\"h\">The hue component. Valid values are [0, 360).</param>\r\n        /// <param name=\"s\">The saturation component. Valid values are [0, 1].</param>\r\n        /// <param name=\"l\">The brightness component. Valid values are [0, 1].</param>\r\n        /// <returns>A newly created color structure.</returns>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", Justification = \"Following FromArgb convention.\")]\r\n        public static Color FromAhsl(this Color color, byte a, double h, double s, double l)\r\n        {\r\n            double[] t = new double[3];\r\n\r\n            // normalize hue\r\n            h = h / 360;\r\n\r\n            double q = l < 0.5 ? l * (1 + s) : l + s - (l * s);\r\n            double p = (2 * l) - q;\r\n            t[0] = h + (1.0 / 3.0);\r\n            t[1] = h;\r\n            t[2] = h - (1.0 / 3.0);\r\n\r\n            for (int i = 0; i < 3; i++)\r\n            {\r\n                // t(c)\r\n                if (t[i] < 0)\r\n                {\r\n                    t[i] += 1.0;\r\n                }\r\n                else if (t[i] > 1)\r\n                {\r\n                    t[i] -= 1.0;\r\n                }\r\n\r\n                // Calculate Color(c)\r\n                if (t[i] * 6.0 < 1.0)\r\n                {\r\n                    t[i] = p + ((q - p) * 6 * t[i]);\r\n                }\r\n                else if (t[i] * 2.0 < 1.0)\r\n                {\r\n                    t[i] = q;\r\n                }\r\n                else if (t[i] * 3.0 < 2.0)\r\n                {\r\n                    t[i] = p + ((q - p) * 6 * ((2.0 / 3.0) - t[i]));\r\n                }\r\n                else\r\n                {\r\n                    t[i] = p;\r\n                }\r\n            }\r\n\r\n            color.A = a;\r\n\r\n            // Denormalize RGB\r\n            color.R = (byte)Math.Round(t[0] * 255);\r\n            color.G = (byte)Math.Round(t[1] * 255);\r\n            color.B = (byte)Math.Round(t[2] * 255);\r\n\r\n            return color;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/DependencyPropertyAnimationHelper.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Media.Animation;\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// Represents a control that can animate the transitions between its specified\r\n    /// dependency property.\r\n    /// </summary>\r\n    internal static class DependencyPropertyAnimationHelper\r\n    {\r\n        /// <summary>\r\n        /// Number of key frames per second to generate the date time animations.\r\n        /// </summary>\r\n        public const int KeyFramesPerSecond = 20;\r\n\r\n        /// <summary>\r\n        /// The pattern used to ensure unique keys for the storyboards stored in\r\n        /// a framework element's resource dictionary.\r\n        /// </summary>\r\n        private const string StoryboardKeyPattern = \"__{0}__\";\r\n\r\n        /// <summary>\r\n        /// Returns a unique key for a storyboard.\r\n        /// </summary>\r\n        /// <param name=\"propertyPath\">The property path of the property that \r\n        /// the storyboard animates.</param>\r\n        /// <returns>A unique key for a storyboard.</returns>\r\n        private static string GetStoryboardKey(string propertyPath)\r\n        {\r\n            return string.Format(CultureInfo.InvariantCulture, StoryboardKeyPattern, propertyPath);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Starts animating a dependency property of a framework element to a \r\n        /// target value.\r\n        /// </summary>\r\n        /// <param name=\"target\">The element to animate.</param>\r\n        /// <param name=\"animatingDependencyProperty\">The dependency property to\r\n        /// animate.</param>\r\n        /// <param name=\"propertyPath\">The path of the dependency property to \r\n        /// animate.</param>\r\n        /// <param name=\"targetValue\">The value to animate the dependency\r\n        /// property to.</param>\r\n        /// <param name=\"timeSpan\">The duration of the animation.</param>\r\n        /// <param name=\"easingFunction\">The easing function to uses to\r\n        /// transition the data points.</param>\r\n        public static void BeginAnimation(\r\n            this FrameworkElement target,\r\n            DependencyProperty animatingDependencyProperty,\r\n            string propertyPath,\r\n            object targetValue,\r\n            TimeSpan timeSpan,\r\n            IEasingFunction easingFunction)\r\n        {\r\n            Storyboard storyBoard = target.Resources[GetStoryboardKey(propertyPath)] as Storyboard;\r\n\r\n            if (storyBoard != null)\r\n            {\r\n                storyBoard.Stop();\r\n                target.Resources.Remove(GetStoryboardKey(propertyPath));\r\n            }\r\n\r\n            storyBoard = CreateStoryboard(target, animatingDependencyProperty, propertyPath, ref targetValue, timeSpan, easingFunction);\r\n\r\n            storyBoard.Completed += \r\n                (source, args) =>\r\n                    {\r\n                        storyBoard.Stop();\r\n                        target.SetValue(animatingDependencyProperty, targetValue);\r\n                        target.Resources.Remove(GetStoryboardKey(propertyPath));\r\n                    };\r\n\r\n            target.Resources.Add(GetStoryboardKey(propertyPath), storyBoard);\r\n            storyBoard.Begin();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates a story board that animates a dependency property to a \r\n        /// value.\r\n        /// </summary>\r\n        /// <param name=\"target\">The element that is the target of the \r\n        /// storyboard.</param>\r\n        /// <param name=\"animatingDependencyProperty\">The dependency property\r\n        /// to animate.</param>\r\n        /// <param name=\"propertyPath\">The property path of the dependency\r\n        /// property to animate.</param>\r\n        /// <param name=\"toValue\">The value to animate the dependency property\r\n        /// to.</param>\r\n        /// <param name=\"durationTimeSpan\">The duration of the animation.\r\n        /// </param>\r\n        /// <param name=\"easingFunction\">The easing function to use to\r\n        /// transition the data points.</param>\r\n        /// <returns>The story board that animates the property.</returns>\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA1801:ReviewUnusedParameters\", MessageId = \"easingFunction\", Justification = \"This parameter is used in Silverlight.\")]\r\n        private static Storyboard CreateStoryboard(\r\n            FrameworkElement target,\r\n            DependencyProperty animatingDependencyProperty,\r\n            string propertyPath,\r\n            ref object toValue,\r\n            TimeSpan durationTimeSpan,\r\n            IEasingFunction easingFunction)\r\n        {\r\n            object fromValue = target.GetValue(animatingDependencyProperty);\r\n\r\n            double fromDoubleValue;\r\n            double toDoubleValue;\r\n\r\n            DateTime fromDateTime;\r\n            DateTime toDateTime;\r\n\r\n            Storyboard storyBoard = new Storyboard();\r\n            Storyboard.SetTarget(storyBoard, target);\r\n            Storyboard.SetTargetProperty(storyBoard, new PropertyPath(propertyPath));\r\n\r\n            if ((fromValue != null && toValue != null))\r\n            {\r\n                if (ValueHelper.TryConvert(fromValue, out fromDoubleValue) && ValueHelper.TryConvert(toValue, out toDoubleValue))\r\n                {\r\n                    DoubleAnimation doubleAnimation = new DoubleAnimation();\r\n#if !NO_EASING_FUNCTIONS\r\n                    doubleAnimation.EasingFunction = easingFunction;\r\n#endif\r\n                    doubleAnimation.Duration = durationTimeSpan;\r\n                    doubleAnimation.To = ValueHelper.ToDouble(toValue);\r\n                    toValue = doubleAnimation.To;\r\n\r\n                    storyBoard.Children.Add(doubleAnimation);\r\n                }\r\n                else if (ValueHelper.TryConvert(fromValue, out fromDateTime) && ValueHelper.TryConvert(toValue, out toDateTime))\r\n                {\r\n                    ObjectAnimationUsingKeyFrames keyFrameAnimation = new ObjectAnimationUsingKeyFrames();\r\n                    keyFrameAnimation.Duration = durationTimeSpan;\r\n\r\n                    long intervals = (long)(durationTimeSpan.TotalSeconds * KeyFramesPerSecond);\r\n                    if (intervals < 2L)\r\n                    {\r\n                        intervals = 2L;\r\n                    }\r\n\r\n                    IEnumerable<TimeSpan> timeSpanIntervals =\r\n                        ValueHelper.GetTimeSpanIntervalsInclusive(durationTimeSpan, intervals);\r\n\r\n                    IEnumerable<DateTime> dateTimeIntervals =\r\n                        ValueHelper.GetDateTimesBetweenInclusive(fromDateTime, toDateTime, intervals);\r\n\r\n                    IEnumerable<DiscreteObjectKeyFrame> keyFrames =\r\n                        EnumerableFunctions.Zip(\r\n                            dateTimeIntervals,\r\n                            timeSpanIntervals,\r\n                            (dateTime, timeSpan) => new DiscreteObjectKeyFrame() { Value = dateTime, KeyTime = timeSpan });\r\n\r\n                    foreach (DiscreteObjectKeyFrame keyFrame in keyFrames)\r\n                    {\r\n                        keyFrameAnimation.KeyFrames.Add(keyFrame);\r\n                        toValue = keyFrame.Value;\r\n                    }\r\n\r\n                    storyBoard.Children.Add(keyFrameAnimation);\r\n                }\r\n            }\r\n\r\n            if (storyBoard.Children.Count == 0)\r\n            {\r\n                ObjectAnimationUsingKeyFrames keyFrameAnimation = new ObjectAnimationUsingKeyFrames();\r\n                DiscreteObjectKeyFrame endFrame = new DiscreteObjectKeyFrame() { Value = toValue, KeyTime = new TimeSpan(0, 0, 0) };\r\n                keyFrameAnimation.KeyFrames.Add(endFrame);\r\n\r\n                storyBoard.Children.Add(keyFrameAnimation);\r\n            }\r\n\r\n           return storyBoard;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/DesignerProperties.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Diagnostics.CodeAnalysis;\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Provides a custom implementation of DesignerProperties.GetIsInDesignMode\r\n    /// to work around an issue.\r\n    /// </summary>\r\n    internal static class DesignerProperties\r\n    {\r\n        /// <summary>\r\n        /// Returns whether the control is in design mode (running under Blend\r\n        /// or Visual Studio).\r\n        /// </summary>\r\n        /// <param name=\"element\">The element from which the property value is\r\n        /// read.</param>\r\n        /// <returns>True if in design mode.</returns>\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA1801:ReviewUnusedParameters\", MessageId = \"element\", Justification = \"Matching declaration of System.ComponentModel.DesignerProperties.GetIsInDesignMode (which has a bug and is not reliable).\")]\r\n        public static bool GetIsInDesignMode(DependencyObject element)\r\n        {\r\n            if (!_isInDesignMode.HasValue)\r\n            {\r\n                _isInDesignMode = System.ComponentModel.DesignerProperties.GetIsInDesignMode(element);\r\n            }\r\n            return _isInDesignMode.Value;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Stores the computed InDesignMode value.\r\n        /// </summary>\r\n        private static bool? _isInDesignMode;\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/DotNetProjects.DataVisualization.Toolkit.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\r\n    <PropertyGroup>\r\n        <RootNamespace>System.Windows.Controls.DataVisualization</RootNamespace>\r\n        <TargetFrameworks>net5.0-windows;net6.0-windows;net4</TargetFrameworks>\r\n        <UseWPF>true</UseWPF>\r\n        <SignAssembly>true</SignAssembly>\r\n        <AssemblyOriginatorKeyFile>DotNetProjects.snk</AssemblyOriginatorKeyFile>\r\n        <Description>WPF Toolkit Data Visualization Controls</Description>\r\n        <GeneratePackageOnBuild>true</GeneratePackageOnBuild>\r\n        <PackageId>DotNetProjects.WpfToolkit.DataVisualization</PackageId>\r\n        <Authors>DotNetProjects</Authors>\r\n        <Company>DotNetProjects</Company>\r\n        <Product>DotNetProjects.WPF Toolkit</Product>\r\n        <Copyright>2021 DotNetProjects</Copyright>\r\n        <Version>1.0.0</Version>\r\n        <AssemblyVersion>1.0.0.0</AssemblyVersion>\r\n        <FileVersion>1.0.0.0</FileVersion>\r\n        <PackageLicenseExpression>MS-PL</PackageLicenseExpression>\r\n    </PropertyGroup>\r\n    <ItemGroup>\r\n        <EmbeddedResource Include=\"System.Windows.Controls.DataVisualization\\**\\*.png\" /> \r\n    </ItemGroup>\r\n</Project>\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/EnumerableExtensions.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// A set of extension methods for the sequence class.\r\n    /// </summary>\r\n    internal static class EnumerableExtensions\r\n    {\r\n        /// <summary>\r\n        /// Produces a sequence of items using a seed value and iteration \r\n        /// method.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The type of the sequence.</typeparam>\r\n        /// <param name=\"value\">The initial value.</param>\r\n        /// <param name=\"next\">The iteration function.</param>\r\n        /// <returns>A sequence of items using a seed value and iteration \r\n        /// method.</returns>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Used by at least one consumer of this class.\")]\r\n        public static IEnumerable<T> Iterate<T>(T value, Func<T, T> next)\r\n        {\r\n            do\r\n            {\r\n                yield return value;\r\n                value = next(value);\r\n            }\r\n            while (true);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Prepend an item to a sequence.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The type of the sequence.</typeparam>\r\n        /// <param name=\"that\">The sequence to append the item to.</param>\r\n        /// <param name=\"value\">The item to append to the sequence.</param>\r\n        /// <returns>A new sequence.</returns>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Code is linked into multiple projects.\")]\r\n        public static IEnumerable<T> Prepend<T>(this IEnumerable<T> that, T value)\r\n        {\r\n            if (that == null)\r\n            {\r\n                throw new ArgumentNullException(\"that\");\r\n            }\r\n\r\n            yield return value;\r\n            foreach (T item in that)\r\n            {\r\n                yield return item;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Accepts two sequences and applies a function to the corresponding \r\n        /// values in the two sequences.\r\n        /// </summary>\r\n        /// <typeparam name=\"T0\">The type of the first sequence.</typeparam>\r\n        /// <typeparam name=\"T1\">The type of the second sequence.</typeparam>\r\n        /// <typeparam name=\"R\">The return type of the function.</typeparam>\r\n        /// <param name=\"enumerable0\">The first sequence.</param>\r\n        /// <param name=\"enumerable1\">The second sequence.</param>\r\n        /// <param name=\"func\">The function to apply to the corresponding values\r\n        /// from the two sequences.</param>\r\n        /// <returns>A sequence of transformed values from both sequences.</returns>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Code is linked into multiple projects.\")]\r\n        public static IEnumerable<R> Zip<T0, T1, R>(IEnumerable<T0> enumerable0, IEnumerable<T1> enumerable1, Func<T0, T1, R> func)\r\n        {\r\n            IEnumerator<T0> enumerator0 = enumerable0.GetEnumerator();\r\n            IEnumerator<T1> enumerator1 = enumerable1.GetEnumerator();\r\n            while (enumerator0.MoveNext() && enumerator1.MoveNext())\r\n            {\r\n                yield return func(enumerator0.Current, enumerator1.Current);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the maximum value in the stream based on the result of a\r\n        /// project function.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The stream type.</typeparam>\r\n        /// <param name=\"that\">The stream.</param>\r\n        /// <param name=\"projectionFunction\">The function that transforms the\r\n        /// item.</param>\r\n        /// <returns>The maximum value or null.</returns>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Used by at least one consumer of this class.\")]\r\n        public static T MaxOrNull<T>(this IEnumerable<T> that, Func<T, IComparable> projectionFunction)\r\n            where T : struct\r\n        {\r\n            IComparable result = null;\r\n            T maximum = default(T);\r\n            if (!that.Any())\r\n            {\r\n                return maximum;\r\n            }\r\n\r\n            maximum = that.First();\r\n            result = projectionFunction(maximum);\r\n            foreach (T item in that.Skip(1))\r\n            {\r\n                IComparable currentResult = projectionFunction(item);\r\n                if (result.CompareTo(currentResult) < 0)\r\n                {\r\n                    result = currentResult;\r\n                    maximum = item;\r\n                }\r\n            }\r\n\r\n            return maximum;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the maximum value or null if sequence is empty.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The type of the sequence.</typeparam>\r\n        /// <param name=\"that\">The sequence to retrieve the maximum value from.\r\n        /// </param>\r\n        /// <returns>The maximum value or null.</returns>\r\n        public static T? MaxOrNullable<T>(this IEnumerable<T> that)\r\n            where T : struct, IComparable\r\n        {\r\n            if (!that.Any())\r\n            {\r\n                return null;\r\n            }\r\n            return that.Max();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the minimum value or null if sequence is empty.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The type of the sequence.</typeparam>\r\n        /// <param name=\"that\">The sequence to retrieve the minimum value from.\r\n        /// </param>\r\n        /// <returns>The minimum value or null.</returns>\r\n        public static T? MinOrNullable<T>(this IEnumerable<T> that)\r\n            where T : struct, IComparable\r\n        {\r\n            if (!that.Any())\r\n            {\r\n                return null;\r\n            }\r\n            return that.Min();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/EnumerableFunctions.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\nusing System.Reflection;\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// This class contains general purpose functions to manipulate the generic\r\n    /// IEnumerable type.\r\n    /// </summary>\r\n    internal static class EnumerableFunctions\r\n    {\r\n        /// <summary>\r\n        /// Attempts to cast IEnumerable to a list in order to retrieve a count \r\n        /// in order one.  It attempts to cast fail the sequence is enumerated.\r\n        /// </summary>\r\n        /// <param name=\"that\">The sequence.</param>\r\n        /// <returns>The number of elements in the sequence.</returns>\r\n        public static int FastCount(this IEnumerable that)\r\n        {\r\n            IList list = that as IList;\r\n            if (list != null)\r\n            {\r\n                return list.Count;\r\n            }\r\n            return that.CastWrapper<object>().Count();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the minimum value in the stream based on the result of a\r\n        /// project function.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The stream type.</typeparam>\r\n        /// <param name=\"that\">The stream.</param>\r\n        /// <param name=\"projectionFunction\">The function that transforms the\r\n        /// item.</param>\r\n        /// <returns>The minimum value or null.</returns>\r\n        public static T MinOrNull<T>(this IEnumerable<T> that, Func<T, IComparable> projectionFunction)\r\n            where T : class\r\n        {\r\n            IComparable result = null;\r\n            T minimum = default(T);\r\n            if (!that.Any())\r\n            {\r\n                return minimum;\r\n            }\r\n\r\n            minimum = that.First();\r\n            result = projectionFunction(minimum);\r\n            foreach (T item in that.Skip(1))\r\n            {\r\n                IComparable currentResult = projectionFunction(item);\r\n                if (result.CompareTo(currentResult) > 0)\r\n                {\r\n                    result = currentResult;\r\n                    minimum = item;\r\n                }\r\n            }\r\n\r\n            return minimum;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the sum of all values in the sequence or the default value.\r\n        /// </summary>\r\n        /// <param name=\"that\">The stream.</param>\r\n        /// <returns>The sum of all values or the default value.</returns>\r\n        public static double SumOrDefault(this IEnumerable<double> that)\r\n        {\r\n            if (!that.Any())\r\n            {\r\n                return 0.0;\r\n            }\r\n            else\r\n            {\r\n                return that.Sum();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the maximum value in the stream based on the result of a\r\n        /// project function.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The stream type.</typeparam>\r\n        /// <param name=\"that\">The stream.</param>\r\n        /// <param name=\"projectionFunction\">The function that transforms the\r\n        /// item.</param>\r\n        /// <returns>The maximum value or null.</returns>\r\n        public static T MaxOrNull<T>(this IEnumerable<T> that, Func<T, IComparable> projectionFunction)\r\n            where T : class\r\n        {\r\n            IComparable result = null;\r\n            T maximum = default(T);\r\n            if (!that.Any())\r\n            {\r\n                return maximum;\r\n            }\r\n\r\n            maximum = that.First();\r\n            result = projectionFunction(maximum);\r\n            foreach (T item in that.Skip(1))\r\n            {\r\n                IComparable currentResult = projectionFunction(item);\r\n                if (result.CompareTo(currentResult) < 0)\r\n                {\r\n                    result = currentResult;\r\n                    maximum = item;\r\n                }\r\n            }\r\n\r\n            return maximum;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Accepts two sequences and applies a function to the corresponding \r\n        /// values in the two sequences.\r\n        /// </summary>\r\n        /// <typeparam name=\"T0\">The type of the first sequence.</typeparam>\r\n        /// <typeparam name=\"T1\">The type of the second sequence.</typeparam>\r\n        /// <typeparam name=\"R\">The return type of the function.</typeparam>\r\n        /// <param name=\"enumerable0\">The first sequence.</param>\r\n        /// <param name=\"enumerable1\">The second sequence.</param>\r\n        /// <param name=\"func\">The function to apply to the corresponding values\r\n        /// from the two sequences.</param>\r\n        /// <returns>A sequence of transformed values from both sequences.</returns>\r\n        public static IEnumerable<R> Zip<T0, T1, R>(IEnumerable<T0> enumerable0, IEnumerable<T1> enumerable1, Func<T0, T1, R> func)\r\n        {\r\n            IEnumerator<T0> enumerator0 = enumerable0.GetEnumerator();\r\n            IEnumerator<T1> enumerator1 = enumerable1.GetEnumerator();\r\n            while (enumerator0.MoveNext() && enumerator1.MoveNext())\r\n            {\r\n                yield return func(enumerator0.Current, enumerator1.Current);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates a sequence of values by accepting an initial value, an \r\n        /// iteration function, and apply the iteration function recursively.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The type of the sequence.</typeparam>\r\n        /// <param name=\"value\">The initial value.</param>\r\n        /// <param name=\"nextFunction\">The function to apply to the value.\r\n        /// </param>\r\n        /// <returns>A sequence of the iterated values.</returns>\r\n        public static IEnumerable<T> Iterate<T>(T value, Func<T, T> nextFunction)\r\n        {\r\n            yield return value;\r\n            while (true)\r\n            {\r\n                value = nextFunction(value);\r\n                yield return value;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the index of an item in a sequence.\r\n        /// </summary>\r\n        /// <param name=\"that\">The sequence.</param>\r\n        /// <param name=\"value\">The item to search for.</param>\r\n        /// <returns>The index of the item or -1 if not found.</returns>\r\n        public static int IndexOf(this IEnumerable that, object value)\r\n        {\r\n            int index = 0;\r\n            foreach (object item in that)\r\n            {\r\n                if (object.ReferenceEquals(value, item) || value.Equals(item))\r\n                {\r\n                    return index;\r\n                }\r\n                index++;\r\n            }\r\n            return -1;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Executes an action for each item and a sequence, passing in the \r\n        /// index of that item to the action procedure.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The type of the sequence.</typeparam>\r\n        /// <param name=\"that\">The sequence.</param>\r\n        /// <param name=\"action\">A function that accepts a sequence item and its\r\n        /// index in the sequence.</param>\r\n        public static void ForEachWithIndex<T>(this IEnumerable<T> that, Action<T, int> action)\r\n        {\r\n            int index = 0;\r\n            foreach (T item in that)\r\n            {\r\n                action(item, index);\r\n                index++;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the maximum value or null if sequence is empty.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The type of the sequence.</typeparam>\r\n        /// <param name=\"that\">The sequence to retrieve the maximum value from.\r\n        /// </param>\r\n        /// <returns>The maximum value or null.</returns>\r\n        public static T? MaxOrNullable<T>(this IEnumerable<T> that)\r\n            where T : struct, IComparable\r\n        {\r\n            if (!that.Any())\r\n            {\r\n                return null;\r\n            }\r\n            return that.Max();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the minimum value or null if sequence is empty.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The type of the sequence.</typeparam>\r\n        /// <param name=\"that\">The sequence to retrieve the minimum value from.\r\n        /// </param>\r\n        /// <returns>The minimum value or null.</returns>\r\n        public static T? MinOrNullable<T>(this IEnumerable<T> that)\r\n            where T : struct, IComparable\r\n        {\r\n            if (!that.Any())\r\n            {\r\n                return null;\r\n            }\r\n            return that.Min();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Attempts to retrieve an element at an index by testing whether a \r\n        /// sequence is randomly accessible.  If not, performance degrades to a \r\n        /// linear search.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The type of the elements in the sequence.</typeparam>\r\n        /// <param name=\"that\">The sequence.</param>\r\n        /// <param name=\"index\">The index of the element in the sequence.</param>\r\n        /// <returns>The element at the given index.</returns>\r\n        public static T FastElementAt<T>(this IEnumerable that, int index)\r\n        {\r\n            {\r\n                IList<T> list = that as IList<T>;\r\n                if (list != null)\r\n                {\r\n                    return list[index];\r\n                }\r\n            }\r\n            {\r\n                IList list = that as IList;\r\n                if (list != null)\r\n                {\r\n                    return (T) list[index];\r\n                }\r\n            }\r\n            return that.CastWrapper<T>().ElementAt(index);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Applies an accumulator function over a sequence and returns each intermediate result.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">Type of elements in source sequence.</typeparam>\r\n        /// <typeparam name=\"S\">Type of elements in result sequence.</typeparam>\r\n        /// <param name=\"that\">Sequence to scan.</param>\r\n        /// <param name=\"seed\">Initial accumulator value.</param>\r\n        /// <param name=\"accumulator\">Function used to generate the result sequence.</param>\r\n        /// <returns>Sequence of intermediate results.</returns>\r\n        public static IEnumerable<S> Scan<T, S>(this IEnumerable<T> that, S seed, Func<S, T, S> accumulator)\r\n        {\r\n            S value = seed;\r\n            yield return seed;\r\n            foreach (T t in that)\r\n            {\r\n                value = accumulator(value, t);\r\n                yield return value;\r\n            }\r\n            yield break;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Converts the elements of an System.Collections.IEnumerable to the specified type.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// A wrapper for the Enumerable.Cast(T) method that works around a limitation on some platforms.\r\n        /// </remarks>\r\n        /// <typeparam name=\"TResult\">The type to convert the elements of source to.</typeparam>\r\n        /// <param name=\"source\">The System.Collections.IEnumerable that contains the elements to be converted.</param>\r\n        /// <returns>\r\n        /// An System.Collections.Generic.IEnumerable(T) that contains each element of the source sequence converted to the specified type.\r\n        /// </returns>\r\n        public static IEnumerable<TResult> CastWrapper<TResult>(this IEnumerable source)\r\n        {\r\n            // No issues on this platform - call directly through to Cast<T>\r\n            return source.Cast<TResult>();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/GenericEqualityComparer.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// A generic equality comparer.\r\n    /// </summary>\r\n    /// <typeparam name=\"T\">The type of the objects being compared.</typeparam>\r\n    internal class GenericEqualityComparer<T> : EqualityComparer<T>\r\n    {\r\n        /// <summary>\r\n        /// Gets or sets a function which determines whether two items are equal.\r\n        /// </summary>\r\n        public Func<T, T, bool> EqualityFunction { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a function that returns a hash code for an object.\r\n        /// </summary>\r\n        public Func<T, int> HashCodeFunction { get; set; }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the GenericEqualityComparer class.\r\n        /// </summary>\r\n        /// <param name=\"equalityFunction\">A function which determines whether \r\n        /// two items are equal.</param>\r\n        /// <param name=\"hashCodeFunction\">A function that returns a hash code \r\n        /// for an object.</param>\r\n        public GenericEqualityComparer(Func<T, T, bool> equalityFunction, Func<T, int> hashCodeFunction)\r\n        {\r\n            this.EqualityFunction = equalityFunction;\r\n            this.HashCodeFunction = hashCodeFunction;\r\n        }\r\n\r\n        /// <summary>\r\n        /// A function which determines whether two items are equal.\r\n        /// </summary>\r\n        /// <param name=\"x\">The left object.</param>\r\n        /// <param name=\"y\">The right object.</param>\r\n        /// <returns>A value indicating whether the objects. are equal.</returns>\r\n        public override bool Equals(T x, T y)\r\n        {\r\n            return EqualityFunction(x, y);\r\n        }\r\n\r\n        /// <summary>\r\n        /// A function that returns a hash code for an object.\r\n        /// </summary>\r\n        /// <param name=\"obj\">The object to returns a hash code for.</param>\r\n        /// <returns>The hash code for the object.</returns>\r\n        public override int GetHashCode(T obj)\r\n        {\r\n            return HashCodeFunction(obj);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/GlobalSuppressions.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Diagnostics.CodeAnalysis;\r\n\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA2210:AssembliesShouldHaveValidStrongNames\", Justification = \"Unofficial release.\")]\r\n\r\n[assembly: SuppressMessage(\"General\", \"SWC1001:XmlDocumentationCommentShouldBeSpelledCorrectly\", MessageId = \"Headered\", Justification = \"Part of HeaderedItemsControl.\")]\r\n[assembly: SuppressMessage(\"General\", \"SWC1001:XmlDocumentationCommentShouldBeSpelledCorrectly\", MessageId = \"Polyline\", Justification = \"Matches System.Windows.Shapes.Polyline.\")]\r\n[assembly: SuppressMessage(\"General\", \"SWC1001:XmlDocumentationCommentShouldBeSpelledCorrectly\", MessageId = \"Intelli\", Justification = \"Part of IntelliSense.\")]\r\n[assembly: SuppressMessage(\"General\", \"SWC1001:XmlDocumentationCommentShouldBeSpelledCorrectly\", MessageId = \"Silverlight\", Justification = \"Product name.\")]\r\n[assembly: SuppressMessage(\"General\", \"SWC1001:XmlDocumentationCommentShouldBeSpelledCorrectly\", MessageId = \"tuple's\", Justification = \"Consistent with MSDN documentation for .NET 4.\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.RangeAxis.#System.Windows.Controls.DataVisualization.Charting.IRangeAxis.ActualMaximum\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.RangeAxis.#System.Windows.Controls.DataVisualization.Charting.IRangeAxis.ActualMinimum\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.RangeAxis.#System.Windows.Controls.DataVisualization.Charting.IRangeAxis.GetPlotAreaCoordinate(System.IComparable)\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.RangeAxis.#System.Windows.Controls.DataVisualization.Charting.IRangeAxis.RangeChanged(System.Windows.Controls.DataVisualization.Charting.IRangeAxisInformationProvider,System.Windows.Controls.DataVisualization.Range`1<System.IComparable>)\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.RangeAxis.#System.Windows.Controls.DataVisualization.Charting.IRangeAxis.GetPlotAreaCoordinateValueRange(System.Double)\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.DataPointSeriesWithAxes.#System.Windows.Controls.DataVisualization.Charting.ICategoryAxisInformationProvider.GetCategories(System.Windows.Controls.DataVisualization.Charting.ICategoryAxis)\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.DataPointSeriesWithAxes.#System.Windows.Controls.DataVisualization.Charting.IRangeAxisInformationProvider.GetActualRange(System.Windows.Controls.DataVisualization.Charting.IRangeAxis)\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.DataPointSeriesWithAxes.#System.Windows.Controls.DataVisualization.Charting.IRangeAxisInformationProvider.GetDesiredRange(System.Windows.Controls.DataVisualization.Charting.IRangeAxis)\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.Axis.#System.Windows.Controls.DataVisualization.Charting.IAxis.Register(System.Object)\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.Axis.#System.Windows.Controls.DataVisualization.Charting.IAxis.Unregister(System.Object)\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.RangeAxis.#System.Windows.Controls.DataVisualization.Charting.IRangeAxis.Range\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.DataPointSeriesWithAxes.#System.Windows.Controls.DataVisualization.Charting.IAxisListener.AxisInvalidated(System.Windows.Controls.DataVisualization.Charting.IAxis)\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.DataPointSeriesWithAxes.#System.Windows.Controls.DataVisualization.Charting.IDataProvider.GetData(System.Windows.Controls.DataVisualization.Charting.IDataConsumer)\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.DataPointSeriesWithAxes.#System.Windows.Controls.DataVisualization.Charting.IRangeProvider.GetRange(System.Windows.Controls.DataVisualization.Charting.IRangeConsumer)\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.CollectionBase`1.#System.Collections.ICollection.SyncRoot\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.CollectionBase`1.#System.Collections.Generic.ICollection`1<!0>.IsReadOnly\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.ListBaseCollection`1.#System.Collections.IList.IsFixedSize\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.ListBaseCollection`1.#System.Collections.IList.IsReadOnly\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.CollectionBase`1.#System.Collections.ICollection.IsSynchronized\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.ColumnBarBaseSeries`1.#System.Windows.Controls.DataVisualization.Charting.IAnchoredToOrigin.AnchoredAxis\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.RangeAxis.#System.Windows.Controls.DataVisualization.Charting.IRangeConsumer.RangeChanged(System.Windows.Controls.DataVisualization.Charting.IRangeProvider,System.Windows.Controls.DataVisualization.Range`1<System.IComparable>)\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.RangeAxis.#System.Windows.Controls.DataVisualization.Charting.IValueMarginConsumer.ValueMarginsChanged(System.Windows.Controls.DataVisualization.Charting.IValueMarginProvider,System.Collections.Generic.IEnumerable`1<System.Windows.Controls.DataVisualization.Charting.ValueMargin>)\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.DefinitionSeries.#System.Windows.Controls.DataVisualization.Charting.IAxisListener.AxisInvalidated(System.Windows.Controls.DataVisualization.Charting.IAxis)\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.DefinitionSeries.#System.Windows.Controls.DataVisualization.Charting.IRangeProvider.GetRange(System.Windows.Controls.DataVisualization.Charting.IRangeConsumer)\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.DefinitionSeries.#System.Windows.Controls.DataVisualization.IResourceDictionaryDispenser.GetResourceDictionariesWhere(System.Func`2<System.Windows.ResourceDictionary,System.Boolean>)\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.DefinitionSeries.#System.Windows.Controls.DataVisualization.IResourceDictionaryDispenser.ResourceDictionariesChanged\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.DefinitionSeries.#System.Windows.Controls.DataVisualization.IResourceDictionaryDispenser.ResourceDictionariesChanged\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.DefinitionSeries.#System.Windows.Controls.DataVisualization.Charting.ISeriesHost.Axes\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.DefinitionSeries.#System.Windows.Controls.DataVisualization.Charting.ISeriesHost.BackgroundElements\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.DefinitionSeries.#System.Windows.Controls.DataVisualization.Charting.ISeriesHost.ForegroundElements\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.DefinitionSeries.#System.Windows.Controls.DataVisualization.Charting.ISeriesHost.Series\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.DefinitionSeries.#System.Windows.Controls.DataVisualization.Charting.IValueMarginProvider.GetValueMargins(System.Windows.Controls.DataVisualization.Charting.IValueMarginConsumer)\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.SeriesDefinition.#System.Windows.Controls.DataVisualization.Charting.IRequireGlobalSeriesIndex.GlobalSeriesIndexChanged(System.Nullable`1<System.Int32>)\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.SeriesDefinition.#System.Windows.Controls.DataVisualization.Charting.IRequireSeriesHost.SeriesHost\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.SeriesDefinition.#System.Windows.Controls.DataVisualization.Charting.IRequireSeriesHost.SeriesHost\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.SeriesDefinition.#System.Windows.Controls.DataVisualization.Charting.ISeries.LegendItems\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.StackedAreaSeries.#System.Windows.Controls.DataVisualization.Charting.IAnchoredToOrigin.AnchoredAxis\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.StackedBarColumnSeries.#System.Windows.Controls.DataVisualization.Charting.IAnchoredToOrigin.AnchoredAxis\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.StackedBarColumnSeries.#System.Windows.Controls.DataVisualization.Charting.IDataProvider.GetData(System.Windows.Controls.DataVisualization.Charting.IDataConsumer)\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.DefinitionSeries.#System.Windows.Controls.DataVisualization.Charting.IDataProvider.GetData(System.Windows.Controls.DataVisualization.Charting.IDataConsumer)\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1810:InitializeReferenceTypeStaticFieldsInline\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.PieSeries.#.cctor()\")]\r\n[assembly: SuppressMessage(\"Microsoft.Usage\", \"CA2214:DoNotCallOverridableMethodsInConstructors\", Scope = \"member\", Target = \"System.Windows.Controls.DataVisualization.Charting.SeriesHostAxesCollection.#.ctor(System.Windows.Controls.DataVisualization.Charting.ISeriesHost)\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1020:AvoidNamespacesWithFewTypes\", Scope = \"namespace\", Target = \"XamlGeneratedNamespace\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1020:AvoidNamespacesWithFewTypes\", Scope = \"namespace\", Target = \"System.Windows.Controls.DataVisualization.Charting.Primitives\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1020:AvoidNamespacesWithFewTypes\", Scope = \"namespace\", Target = \"System.Windows.Controls.DataVisualization.Charting.Compatible\")]\r\n\r\n// Suppress \"Silverlight-only class or assembly\" warning for all DataVisualization classes because there is currently no corresponding WPF implementation.\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.AnimationSequence\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.Axis\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.AxisLabel\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.AxisLocation\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.AxisOrientation\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.BarDataPoint\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.BarSeries\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.BubbleDataPoint\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.BubbleSeries\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.CategoryAxis\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.CategorySortOrder\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.Chart\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.ColumnDataPoint\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.ColumnSeries\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.DataPoint\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.DataPointSeries\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.DataPointSeriesWithAxes\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.DataPointSingleSeriesWithAxes\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.DataPointState\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.DateTimeAxis\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.DateTimeAxisLabel\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.DateTimeIntervalType\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.IAxis\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.IAxisGridLinesElementProvider\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.ICategoryAxis\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.ICategoryAxisInformationProvider\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.IRangeAxis\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.IRangeAxisInformationProvider\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.IRequireGlobalSeriesIndex\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.ISeriesHost\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.LegendItem\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.LineDataPoint\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.LineSeries\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.LinearAxis\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.NumericAxis\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.NumericAxisLabel\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.PieDataPoint\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.PieSeries\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.RangeAxis\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.ScatterDataPoint\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.ScatterSeries\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.Series\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.IStyleDispenser\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Legend\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Range`1\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.StringFormatConverter\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.ResourceDictionaryCollection\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Title\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.ColumnBarBaseSeries`1\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.DisplayAxis\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.IAnnotationProvider\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.IAxisListener\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.IDataConsumer\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.IDataProvider\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.IRangeConsumer\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.IRangeProvider\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.IRequireSeriesHost\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.IScrollService\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.IValueMarginConsumer\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.IValueMarginProvider\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.PointOrientedPanel\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.RadialPanel\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.ValueMargin\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.IScrollServiceInformationProvider\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Unit\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.UnitValue\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.ListBaseCollection`1\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.CollectionBase`1\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.Primitives.Edge\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DataVisualization.Charting.Primitives.EdgePanel\")]\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/GridExtensions.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// A set of extension methods for the Grid container.\r\n    /// </summary>\r\n    internal static class GridExtensions\r\n    {\r\n        /// <summary>\r\n        /// Mirrors the grid either horizontally or vertically.\r\n        /// </summary>\r\n        /// <param name=\"grid\">The grid to mirror.</param>\r\n        /// <param name=\"orientation\">The orientation to mirror the grid along.\r\n        /// </param>\r\n        public static void Mirror(this Grid grid, Orientation orientation)\r\n        {\r\n            if (orientation == Orientation.Horizontal)\r\n            {\r\n                IList<RowDefinition> rows = grid.RowDefinitions.Reverse().ToList();\r\n                grid.RowDefinitions.Clear();\r\n                foreach (FrameworkElement child in grid.Children.OfType<FrameworkElement>())\r\n                {\r\n                    Grid.SetRow(child, (rows.Count - 1) - Grid.GetRow(child));\r\n                }\r\n                foreach (RowDefinition row in rows)\r\n                {\r\n                    grid.RowDefinitions.Add(row);\r\n                }\r\n            }\r\n            else if (orientation == Orientation.Vertical)\r\n            {\r\n                IList<ColumnDefinition> columns = grid.ColumnDefinitions.Reverse().ToList();\r\n                grid.ColumnDefinitions.Clear();\r\n                foreach (FrameworkElement child in grid.Children.OfType<FrameworkElement>())\r\n                {\r\n                    Grid.SetColumn(child, (columns.Count - 1) - Grid.GetColumn(child));\r\n                }\r\n                foreach (ColumnDefinition column in columns)\r\n                {\r\n                    grid.ColumnDefinitions.Add(column);\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/IResourceDictionaryDispenser.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// Represents a service that dispenses ResourceDictionaries.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public interface IResourceDictionaryDispenser\r\n    {\r\n        /// <summary>\r\n        /// Returns a rotating enumerator of ResourceDictionaries coordinated with\r\n        /// the style dispenser object to ensure that no two enumerators are\r\n        /// currently on the same one if possible.  If the dispenser is reset or\r\n        /// its collection is changed then the enumerators will also be reset.\r\n        /// </summary>\r\n        /// <param name=\"predicate\">A predicate that returns a value\r\n        /// indicating whether to return a ResourceDictionary.</param>\r\n        /// <returns>An enumerator of ResourceDictionaries.</returns>\r\n        IEnumerator<ResourceDictionary> GetResourceDictionariesWhere(Func<ResourceDictionary, bool> predicate);\r\n\r\n        /// <summary>\r\n        /// Event that is invoked when the StyleDispenser's ResourceDictionaries have changed.\r\n        /// </summary>\r\n        event EventHandler ResourceDictionariesChanged;\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/LayoutTransformControl.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Markup;\r\nusing System.Windows.Media;\r\nusing System.IO;\r\nusing System.Text;\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// Control that implements support for transformations as if applied by\r\n    /// LayoutTransform (which does not exist in Silverlight).\r\n    /// </summary>\r\n    [ContentProperty(\"Child\")]\r\n    internal class LayoutTransformControl : Control\r\n    {\r\n        #region public FrameworkElement Child\r\n        /// <summary>\r\n        /// Gets or sets the single child of the LayoutTransformControl.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// Corresponds to Windows Presentation Foundation's Decorator.Child \r\n        /// property.\r\n        /// </remarks>\r\n        public FrameworkElement Child\r\n        {\r\n            get { return (FrameworkElement)GetValue(ContentProperty); }\r\n            set { SetValue(ContentProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ContentProperty.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ContentProperty = DependencyProperty.Register(\r\n            \"Child\", typeof(FrameworkElement), typeof(LayoutTransformControl), new PropertyMetadata(ChildChanged));\r\n        #endregion public FrameworkElement Child\r\n\r\n        #region public Transform Transform\r\n        /// <summary>\r\n        /// Gets or sets the Transform of the LayoutTransformControl.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// Corresponds to UIElement.RenderTransform.\r\n        /// </remarks>\r\n        public Transform Transform\r\n        {\r\n            get { return (Transform)GetValue(TransformProperty); }\r\n            set { SetValue(TransformProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the TransformProperty dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty TransformProperty = DependencyProperty.Register(\r\n            \"Transform\", typeof(Transform), typeof(LayoutTransformControl), new PropertyMetadata(TransformChanged));\r\n        #endregion\r\n\r\n        /// <summary>\r\n        /// Value used to work around double arithmetic rounding issues in \r\n        /// Silverlight.\r\n        /// </summary>\r\n        private const double AcceptableDelta = 0.0001;\r\n\r\n        /// <summary>\r\n        /// Value used to work around double arithmetic rounding issues in \r\n        /// Silverlight.\r\n        /// </summary>\r\n        private const int DecimalsAfterRound = 4;\r\n\r\n        /// <summary>\r\n        /// Host panel for Child element.\r\n        /// </summary>\r\n        private Panel _layoutRoot;\r\n\r\n        /// <summary>\r\n        /// RenderTransform/MatrixTransform applied to layout root.\r\n        /// </summary>\r\n        private MatrixTransform _matrixTransform;\r\n\r\n        /// <summary>\r\n        /// Transformation matrix corresponding to matrix transform.\r\n        /// </summary>\r\n        private Matrix _transformation;\r\n\r\n        /// <summary>\r\n        /// Actual DesiredSize of Child element.\r\n        /// </summary>\r\n        private Size _childActualSize = Size.Empty;\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the LayoutTransformControl class.\r\n        /// </summary>\r\n        public LayoutTransformControl()\r\n        {\r\n            // Can't tab to LayoutTransformControl\r\n            IsTabStop = false;\r\n\r\n            // Hard coded template is never meant to be changed and avoids the \r\n            // need for generic.xaml.\r\n            string templateXaml =\r\n                @\"<ControlTemplate \" +\r\n                    \"xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' \" +\r\n                    \"xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>\" +\r\n                    \"<Grid x:Name='LayoutRoot'>\" +\r\n                        \"<Grid.RenderTransform>\" +\r\n                            \"<MatrixTransform x:Name='MatrixTransform'/>\" +\r\n                        \"</Grid.RenderTransform>\" +\r\n                    \"</Grid>\" +\r\n                \"</ControlTemplate>\";\r\n            using (MemoryStream stream = new MemoryStream(Encoding.UTF8.GetBytes(templateXaml)))\r\n            {\r\n                Template = (ControlTemplate)XamlReader.Load(stream);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called whenever the control's template changes.\r\n        /// </summary>\r\n        public override void OnApplyTemplate()\r\n        {\r\n            // Save existing content and remove it from the visual tree\r\n            FrameworkElement savedContent = Child;\r\n            Child = null;\r\n            // Apply new template\r\n            base.OnApplyTemplate();\r\n            // Find template parts\r\n            _layoutRoot = GetTemplateChild(\"LayoutRoot\") as Panel;\r\n            _matrixTransform = GetTemplateChild(\"MatrixTransform\") as MatrixTransform;\r\n            // Restore saved content\r\n            Child = savedContent;\r\n            // Apply the current transform\r\n            TransformUpdated();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handle changes to the child dependency property.\r\n        /// </summary>\r\n        /// <param name=\"o\">The source of the event.</param>\r\n        /// <param name=\"e\">Information about the event.</param>\r\n        private static void ChildChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            // Casts are safe because Silverlight is enforcing the types\r\n            ((LayoutTransformControl)o).OnChildChanged((FrameworkElement)e.NewValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates content when the child property is changed.\r\n        /// </summary>\r\n        /// <param name=\"newContent\">The new child.</param>\r\n        private void OnChildChanged(FrameworkElement newContent)\r\n        {\r\n            if (null != _layoutRoot)\r\n            {\r\n                // Clear current child\r\n                _layoutRoot.Children.Clear();\r\n                if (null != newContent)\r\n                {\r\n                    // Add the new child to the tree\r\n                    _layoutRoot.Children.Add(newContent);\r\n                }\r\n                // New child means re-layout is necessary\r\n                InvalidateMeasure();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles changes to the Transform DependencyProperty.\r\n        /// </summary>\r\n        /// <param name=\"o\">The source of the event.</param>\r\n        /// <param name=\"e\">Information about the event.</param>\r\n        private static void TransformChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            // Casts are safe because Silverlight is enforcing the types\r\n            ((LayoutTransformControl)o).OnTransformChanged((Transform)e.NewValue);\r\n        }\r\n        \r\n        /// <summary>\r\n        /// Processes the transform when the transform is changed.\r\n        /// </summary>\r\n        /// <param name=\"newValue\">The transform to process.</param>\r\n        private void OnTransformChanged(Transform newValue)\r\n        {\r\n            ProcessTransform(newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Notifies the LayoutTransformControl that some aspect of its \r\n        /// Transform property has changed.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// Call this to update the LayoutTransform in cases where \r\n        /// LayoutTransformControl wouldn't otherwise know to do so.\r\n        /// </remarks>\r\n        public void TransformUpdated()\r\n        {\r\n            ProcessTransform(Transform);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Processes the current transform to determine the corresponding \r\n        /// matrix.\r\n        /// </summary>\r\n        /// <param name=\"transform\">The transform to use to determine the \r\n        /// matrix.</param>\r\n        private void ProcessTransform(Transform transform)\r\n        {\r\n            // Get the transform matrix and apply it\r\n            _transformation = RoundMatrix(GetTransformMatrix(transform), DecimalsAfterRound);\r\n            if (null != _matrixTransform)\r\n            {\r\n                _matrixTransform.Matrix = _transformation;\r\n            }\r\n            // New transform means re-layout is necessary\r\n            InvalidateMeasure();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Walks the Transform and returns the corresponding matrix.\r\n        /// </summary>\r\n        /// <param name=\"transform\">The transform to create a matrix for.\r\n        /// </param>\r\n        /// <returns>The matrix calculated from the transform.</returns>\r\n        private Matrix GetTransformMatrix(Transform transform)\r\n        {\r\n            if (null != transform)\r\n            {\r\n                // WPF equivalent of this entire method:\r\n                // return transform.Value;\r\n\r\n                // Process the TransformGroup\r\n                TransformGroup transformGroup = transform as TransformGroup;\r\n                if (null != transformGroup)\r\n                {\r\n                    Matrix groupMatrix = Matrix.Identity;\r\n                    foreach (Transform child in transformGroup.Children)\r\n                    {\r\n                        groupMatrix = MatrixMultiply(groupMatrix, GetTransformMatrix(child));\r\n                    }\r\n                    return groupMatrix;\r\n                }\r\n\r\n                // Process the RotateTransform\r\n                RotateTransform rotateTransform = transform as RotateTransform;\r\n                if (null != rotateTransform)\r\n                {\r\n                    double angle = rotateTransform.Angle;\r\n                    double angleRadians = (2 * Math.PI * angle) / 360;\r\n                    double sine = Math.Sin(angleRadians);\r\n                    double cosine = Math.Cos(angleRadians);\r\n                    return new Matrix(cosine, sine, -sine, cosine, 0, 0);\r\n                }\r\n\r\n                // Process the ScaleTransform\r\n                ScaleTransform scaleTransform = transform as ScaleTransform;\r\n                if (null != scaleTransform)\r\n                {\r\n                    double scaleX = scaleTransform.ScaleX;\r\n                    double scaleY = scaleTransform.ScaleY;\r\n                    return new Matrix(scaleX, 0, 0, scaleY, 0, 0);\r\n                }\r\n\r\n                // Process the SkewTransform\r\n                SkewTransform skewTransform = transform as SkewTransform;\r\n                if (null != skewTransform)\r\n                {\r\n                    double angleX = skewTransform.AngleX;\r\n                    double angleY = skewTransform.AngleY;\r\n                    double angleXRadians = (2 * Math.PI * angleX) / 360;\r\n                    double angleYRadians = (2 * Math.PI * angleY) / 360;\r\n                    return new Matrix(1, angleYRadians, angleXRadians, 1, 0, 0);\r\n                }\r\n\r\n                // Process the MatrixTransform\r\n                MatrixTransform matrixTransform = transform as MatrixTransform;\r\n                if (null != matrixTransform)\r\n                {\r\n                    return matrixTransform.Matrix;\r\n                }\r\n\r\n                // TranslateTransform has no effect in LayoutTransform\r\n            }\r\n\r\n            // Fall back to no-op transformation\r\n            return Matrix.Identity;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Provides the behavior for the \"Measure\" pass of layout.\r\n        /// </summary>\r\n        /// <param name=\"availableSize\">The available size that this element can\r\n        /// give to child elements. Infinity can be specified as a value to \r\n        /// indicate that the element will size to whatever content is \r\n        /// available.</param>\r\n        /// <returns>The size that this element determines it needs during \r\n        /// layout, based on its calculations of child element sizes.</returns>\r\n        protected override Size MeasureOverride(Size availableSize)\r\n        {\r\n            FrameworkElement child = Child;\r\n            if ((null == _layoutRoot) || (null == child))\r\n            {\r\n                // No content, no size\r\n                return Size.Empty;\r\n            }\r\n\r\n            Size measureSize;\r\n            if (_childActualSize == Size.Empty)\r\n            {\r\n                // Determine the largest size after the transformation\r\n                measureSize = ComputeLargestTransformedSize(availableSize);\r\n            }\r\n            else\r\n            {\r\n                // Previous measure/arrange pass determined that \r\n                // Child.DesiredSize was larger than believed.\r\n                measureSize = _childActualSize;\r\n            }\r\n\r\n            // Perform a mesaure on the _layoutRoot (containing Child)\r\n            _layoutRoot.Measure(measureSize);\r\n\r\n            // WPF equivalent of _childActualSize technique (much simpler, but \r\n            // doesn't work on Silverlight 2). If the child is going to render \r\n            // larger than the available size, re-measure according to that size.\r\n            ////child.Arrange(new Rect());\r\n            ////if (child.RenderSize != child.DesiredSize)\r\n            ////{\r\n            ////    _layoutRoot.Measure(child.RenderSize);\r\n            ////}\r\n\r\n            // Transform DesiredSize to find its width/height\r\n            Rect transformedDesiredRect = RectTransform(new Rect(0, 0, _layoutRoot.DesiredSize.Width, _layoutRoot.DesiredSize.Height), _transformation);\r\n            Size transformedDesiredSize = new Size(transformedDesiredRect.Width, transformedDesiredRect.Height);\r\n\r\n            // Return result to allocate enough space for the transformation\r\n            return transformedDesiredSize;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Provides the behavior for the \"Arrange\" pass of layout.\r\n        /// </summary>\r\n        /// <param name=\"finalSize\">The final area within the parent that this \r\n        /// element should use to arrange itself and its children.</param>\r\n        /// <returns>The actual size used.</returns>\r\n        /// <remarks>\r\n        /// Using the WPF paramater name finalSize instead of Silverlight's \r\n        /// finalSize for clarity.\r\n        /// </remarks>\r\n        protected override Size ArrangeOverride(Size finalSize)\r\n        {\r\n            FrameworkElement child = Child;\r\n            if ((null == _layoutRoot) || (null == child))\r\n            {\r\n                // No child, use whatever was given\r\n                return finalSize;\r\n            }\r\n\r\n            // Determine the largest available size after the transformation\r\n            Size finalSizeTransformed = ComputeLargestTransformedSize(finalSize);\r\n            if (IsSizeSmaller(finalSizeTransformed, _layoutRoot.DesiredSize))\r\n            {\r\n                // Some elements do not like being given less space than they asked for (ex: TextBlock)\r\n                // Bump the working size up to do the right thing by them\r\n                finalSizeTransformed = _layoutRoot.DesiredSize;\r\n            }\r\n\r\n            // Transform the working size to find its width/height\r\n            Rect transformedRect = RectTransform(new Rect(0, 0, finalSizeTransformed.Width, finalSizeTransformed.Height), _transformation);\r\n            // Create the Arrange rect to center the transformed content\r\n            Rect finalRect = new Rect(\r\n                -transformedRect.Left + ((finalSize.Width - transformedRect.Width) / 2),\r\n                -transformedRect.Top + ((finalSize.Height - transformedRect.Height) / 2),\r\n                finalSizeTransformed.Width,\r\n                finalSizeTransformed.Height);\r\n\r\n            // Perform an Arrange on _layoutRoot (containing Child)\r\n            _layoutRoot.Arrange(finalRect);\r\n\r\n            // This is the first opportunity under Silverlight to find out the Child's true DesiredSize\r\n            if (IsSizeSmaller(finalSizeTransformed, child.RenderSize) && (Size.Empty == _childActualSize))\r\n            {\r\n                // Unfortunately, all the work so far is invalid because the wrong DesiredSize was used\r\n                // Make a note of the actual DesiredSize\r\n                _childActualSize = new Size(child.ActualWidth, child.ActualHeight);\r\n\r\n                // Force a new measure/arrange pass\r\n                InvalidateMeasure();\r\n            }\r\n            else\r\n            {\r\n                // Clear the \"need to measure/arrange again\" flag\r\n                _childActualSize = Size.Empty;\r\n            }\r\n\r\n            // Return result to perform the transformation\r\n            return finalSize;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Computes the largest usable size after applying the transformation \r\n        /// to the specified bounds.\r\n        /// </summary>\r\n        /// <param name=\"arrangeBounds\">The size to arrange within.</param>\r\n        /// <returns>The size required.</returns>\r\n        [System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Maintainability\", \"CA1502:AvoidExcessiveComplexity\", Justification = \"Closely corresponds to WPF's FrameworkElement.FindMaximalAreaLocalSpaceRect.\")]\r\n        private Size ComputeLargestTransformedSize(Size arrangeBounds)\r\n        {\r\n            // Computed largest transformed size\r\n            Size computedSize = Size.Empty;\r\n\r\n            // Detect infinite bounds and constrain the scenario\r\n            bool infiniteWidth = double.IsInfinity(arrangeBounds.Width);\r\n            if (infiniteWidth)\r\n            {\r\n                arrangeBounds.Width = arrangeBounds.Height;\r\n            }\r\n            bool infiniteHeight = double.IsInfinity(arrangeBounds.Height);\r\n            if (infiniteHeight)\r\n            {\r\n                arrangeBounds.Height = arrangeBounds.Width;\r\n            }\r\n\r\n            // Capture the matrix parameters\r\n            double a = _transformation.M11;\r\n            double b = _transformation.M12;\r\n            double c = _transformation.M21;\r\n            double d = _transformation.M22;\r\n\r\n            // Compute maximum possible transformed width/height based on starting width/height\r\n            // These constraints define two lines in the positive x/y quadrant\r\n            double maxWidthFromWidth = Math.Abs(arrangeBounds.Width / a);\r\n            double maxHeightFromWidth = Math.Abs(arrangeBounds.Width / c);\r\n            double maxWidthFromHeight = Math.Abs(arrangeBounds.Height / b);\r\n            double maxHeightFromHeight = Math.Abs(arrangeBounds.Height / d);\r\n\r\n            // The transformed width/height that maximize the area under each segment is its midpoint\r\n            // At most one of the two midpoints will satisfy both constraints\r\n            double idealWidthFromWidth = maxWidthFromWidth / 2;\r\n            double idealHeightFromWidth = maxHeightFromWidth / 2;\r\n            double idealWidthFromHeight = maxWidthFromHeight / 2;\r\n            double idealHeightFromHeight = maxHeightFromHeight / 2;\r\n\r\n            // Compute slope of both constraint lines\r\n            double slopeFromWidth = -(maxHeightFromWidth / maxWidthFromWidth);\r\n            double slopeFromHeight = -(maxHeightFromHeight / maxWidthFromHeight);\r\n\r\n            if ((0 == arrangeBounds.Width) || (0 == arrangeBounds.Height))\r\n            {\r\n                // Check for empty bounds\r\n                computedSize = new Size(0, 0);\r\n            }\r\n            else if (infiniteWidth && infiniteHeight)\r\n            {\r\n                // Check for completely unbound scenario\r\n                computedSize = new Size(double.PositiveInfinity, double.PositiveInfinity);\r\n            }\r\n            else if (!MatrixHasInverse(_transformation))\r\n            {\r\n                // Check for singular matrix\r\n                computedSize = new Size(0, 0);\r\n            }\r\n            else if ((0 == b) || (0 == c))\r\n            {\r\n                // Check for 0/180 degree special cases\r\n                double maxHeight = (infiniteHeight ? double.PositiveInfinity : maxHeightFromHeight);\r\n                double maxWidth = (infiniteWidth ? double.PositiveInfinity : maxWidthFromWidth);\r\n\r\n                if ((0 == b) && (0 == c))\r\n                {\r\n                    // No constraints\r\n                    computedSize = new Size(maxWidth, maxHeight);\r\n                }\r\n                else if (0 == b)\r\n                {\r\n                    // Constrained by width\r\n                    double computedHeight = Math.Min(idealHeightFromWidth, maxHeight);\r\n                    computedSize = new Size(\r\n                        maxWidth - Math.Abs((c * computedHeight) / a),\r\n                        computedHeight);\r\n                }\r\n                else if (0 == c)\r\n                {\r\n                    // Constrained by height\r\n                    double computedWidth = Math.Min(idealWidthFromHeight, maxWidth);\r\n                    computedSize = new Size(\r\n                        computedWidth,\r\n                        maxHeight - Math.Abs((b * computedWidth) / d));\r\n                }\r\n            }\r\n            else if ((0 == a) || (0 == d))\r\n            {\r\n                // Check for 90/270 degree special cases\r\n\r\n                double maxWidth = (infiniteHeight ? double.PositiveInfinity : maxWidthFromHeight);\r\n                double maxHeight = (infiniteWidth ? double.PositiveInfinity : maxHeightFromWidth);\r\n\r\n                if ((0 == a) && (0 == d))\r\n                {\r\n                    // No constraints\r\n                    computedSize = new Size(maxWidth, maxHeight);\r\n                }\r\n                else if (0 == a)\r\n                {\r\n                    // Constrained by width\r\n                    double computedHeight = Math.Min(idealHeightFromHeight, maxHeight);\r\n                    computedSize = new Size(\r\n                        maxWidth - Math.Abs((d * computedHeight) / b),\r\n                        computedHeight);\r\n                }\r\n                else if (0 == d)\r\n                {\r\n                    // Constrained by height.\r\n                    double computedWidth = Math.Min(idealWidthFromWidth, maxWidth);\r\n                    computedSize = new Size(\r\n                        computedWidth,\r\n                        maxHeight - Math.Abs((a * computedWidth) / c));\r\n                }\r\n            }\r\n            else if (idealHeightFromWidth <= ((slopeFromHeight * idealWidthFromWidth) + maxHeightFromHeight))\r\n            {\r\n                // Check the width midpoint for viability (by being below the \r\n                // height constraint line).\r\n                computedSize = new Size(idealWidthFromWidth, idealHeightFromWidth);\r\n            }\r\n            else if (idealHeightFromHeight <= ((slopeFromWidth * idealWidthFromHeight) + maxHeightFromWidth))\r\n            {\r\n                // Check the height midpoint for viability (by being below the \r\n                // width constraint line).\r\n                computedSize = new Size(idealWidthFromHeight, idealHeightFromHeight);\r\n            }\r\n            else\r\n            {\r\n                // Neither midpoint is viable; use the intersection of the two \r\n                // constraint lines instead.\r\n\r\n                // Compute width by setting heights equal (m1*x+c1=m2*x+c2).\r\n                double computedWidth = (maxHeightFromHeight - maxHeightFromWidth) / (slopeFromWidth - slopeFromHeight);\r\n                // Compute height from width constraint line (y=m*x+c; using \r\n                // height would give same result).\r\n                computedSize = new Size(\r\n                    computedWidth,\r\n                    (slopeFromWidth * computedWidth) + maxHeightFromWidth);\r\n            }\r\n\r\n            return computedSize;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Return true if Size a is smaller than Size b in either dimension.\r\n        /// </summary>\r\n        /// <param name=\"a\">The left size.</param>\r\n        /// <param name=\"b\">The right size.</param>\r\n        /// <returns>A value indicating whether the left size is smaller than\r\n        /// the right.</returns>\r\n        private static bool IsSizeSmaller(Size a, Size b)\r\n        {\r\n            // WPF equivalent of following code:\r\n            // return ((a.Width < b.Width) || (a.Height < b.Height));\r\n            return ((a.Width + AcceptableDelta < b.Width) || (a.Height + AcceptableDelta < b.Height));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Rounds the non-offset elements of a matrix to avoid issues due to \r\n        /// floating point imprecision.\r\n        /// </summary>\r\n        /// <param name=\"matrix\">The matrix to round.</param>\r\n        /// <param name=\"decimalsAfterRound\">The number of decimals after the\r\n        /// round.</param>\r\n        /// <returns>The rounded matrix.</returns>\r\n        private static Matrix RoundMatrix(Matrix matrix, int decimalsAfterRound)\r\n        {\r\n            return new Matrix(\r\n                Math.Round(matrix.M11, decimalsAfterRound),\r\n                Math.Round(matrix.M12, decimalsAfterRound),\r\n                Math.Round(matrix.M21, decimalsAfterRound),\r\n                Math.Round(matrix.M22, decimalsAfterRound),\r\n                matrix.OffsetX,\r\n                matrix.OffsetY);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Implement Windows Presentation Foundation's Rect.Transform on \r\n        /// Silverlight.\r\n        /// </summary>\r\n        /// <param name=\"rectangle\">The rectangle to transform.</param>\r\n        /// <param name=\"matrix\">The matrix to use to transform the rectangle.\r\n        /// </param>\r\n        /// <returns>The transformed rectangle.</returns>\r\n        private static Rect RectTransform(Rect rectangle, Matrix matrix)\r\n        {\r\n            // WPF equivalent of following code:\r\n            // var rectTransformed = Rect.Transform(rect, matrix);\r\n            Point leftTop = matrix.Transform(new Point(rectangle.Left, rectangle.Top));\r\n            Point rightTop = matrix.Transform(new Point(rectangle.Right, rectangle.Top));\r\n            Point leftBottom = matrix.Transform(new Point(rectangle.Left, rectangle.Bottom));\r\n            Point rightBottom = matrix.Transform(new Point(rectangle.Right, rectangle.Bottom));\r\n            double left = Math.Min(Math.Min(leftTop.X, rightTop.X), Math.Min(leftBottom.X, rightBottom.X));\r\n            double top = Math.Min(Math.Min(leftTop.Y, rightTop.Y), Math.Min(leftBottom.Y, rightBottom.Y));\r\n            double right = Math.Max(Math.Max(leftTop.X, rightTop.X), Math.Max(leftBottom.X, rightBottom.X));\r\n            double bottom = Math.Max(Math.Max(leftTop.Y, rightTop.Y), Math.Max(leftBottom.Y, rightBottom.Y));\r\n            Rect rectTransformed = new Rect(left, top, right - left, bottom - top);\r\n            return rectTransformed;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Implements Windows Presentation Foundation's Matrix.Multiply on \r\n        /// Silverlight.\r\n        /// </summary>\r\n        /// <param name=\"matrix1\">The left matrix.</param>\r\n        /// <param name=\"matrix2\">The right matrix.</param>\r\n        /// <returns>The product of the two matrices.</returns>\r\n        private static Matrix MatrixMultiply(Matrix matrix1, Matrix matrix2)\r\n        {\r\n            // WPF equivalent of following code:\r\n            // return Matrix.Multiply(matrix1, matrix2);\r\n            return new Matrix(\r\n                (matrix1.M11 * matrix2.M11) + (matrix1.M12 * matrix2.M21),\r\n                (matrix1.M11 * matrix2.M12) + (matrix1.M12 * matrix2.M22),\r\n                (matrix1.M21 * matrix2.M11) + (matrix1.M22 * matrix2.M21),\r\n                (matrix1.M21 * matrix2.M12) + (matrix1.M22 * matrix2.M22),\r\n                ((matrix1.OffsetX * matrix2.M11) + (matrix1.OffsetY * matrix2.M21)) + matrix2.OffsetX,\r\n                ((matrix1.OffsetX * matrix2.M12) + (matrix1.OffsetY * matrix2.M22)) + matrix2.OffsetY);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Implements Windows Presentation Foundation's Matrix.HasInverse on\r\n        /// Silverlight.\r\n        /// </summary>\r\n        /// <param name=\"matrix\">The matrix.</param>\r\n        /// <returns>True if matrix has an inverse.</returns>\r\n        private static bool MatrixHasInverse(Matrix matrix)\r\n        {\r\n            // WPF equivalent of following code:\r\n            // return matrix.HasInverse;\r\n            return (0 != ((matrix.M11 * matrix.M22) - (matrix.M12 * matrix.M21)));\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Legend/Legend.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Specialized;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Windows.Data;\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// Represents a control that displays a list of items and has a title.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    [StyleTypedProperty(Property = \"ItemContainerStyle\", StyleTargetType = typeof(ContentPresenter))]\r\n    [StyleTypedProperty(Property = \"TitleStyle\", StyleTargetType = typeof(Title))]\r\n    public partial class Legend : HeaderedItemsControl\r\n    {\r\n#if !SILVERLIGHT\r\n        /// <summary>\r\n        /// Initializes the static members of the Legend class.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1810:InitializeReferenceTypeStaticFieldsInline\", Justification = \"Dependency properties are initialized in-line.\")]\r\n        static Legend()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(Legend), new FrameworkPropertyMetadata(typeof(Legend)));\r\n        }\r\n\r\n#endif\r\n        /// <summary>\r\n        /// Initializes a new instance of the Legend class.\r\n        /// </summary>\r\n        public Legend()\r\n        {\r\n#if SILVERLIGHT\r\n            DefaultStyleKey = typeof(Legend);\r\n#endif\r\n            // By default, the Visibility property should follow ContentVisibility - but users can override it\r\n            SetBinding(VisibilityProperty, new Binding(\"ContentVisibility\") { Source = this });\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Style of the ISeriesHost's Title.\r\n        /// </summary>\r\n        public Style TitleStyle\r\n        {\r\n            get { return GetValue(TitleStyleProperty) as Style; }\r\n            set { SetValue(TitleStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the TitleStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty TitleStyleProperty =\r\n            DependencyProperty.Register(\r\n                \"TitleStyle\",\r\n                typeof(Style),\r\n                typeof(Legend),\r\n                null);\r\n\r\n        /// <summary>\r\n        /// Gets the Visibility of the Legend's content (title and items).\r\n        /// </summary>\r\n        public Visibility ContentVisibility\r\n        {\r\n            get { return (Visibility)GetValue(ContentVisibilityProperty); }\r\n            protected set { SetValue(ContentVisibilityProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ContentVisibility dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ContentVisibilityProperty =\r\n            DependencyProperty.Register(\r\n                \"ContentVisibility\",\r\n                typeof(Visibility),\r\n                typeof(Legend),\r\n                null);\r\n\r\n        /// <summary>\r\n        /// Handles the OnHeaderChanged event for HeaderedItemsControl.\r\n        /// </summary>\r\n        /// <param name=\"oldHeader\">Old header.</param>\r\n        /// <param name=\"newHeader\">New header.</param>\r\n        protected override void OnHeaderChanged(object oldHeader, object newHeader)\r\n        {\r\n            base.OnHeaderChanged(oldHeader, newHeader);\r\n            UpdateContentVisibility();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the CollectionChanged event for HeaderedItemsControl's ItemsSource.\r\n        /// </summary>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)\r\n        {\r\n            base.OnItemsChanged(e);\r\n            UpdateContentVisibility();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the ContentVisibility property to reflect the presence of content.\r\n        /// </summary>\r\n        private void UpdateContentVisibility()\r\n        {\r\n            ContentVisibility = (Header != null || Items.Count > 0) ? Visibility.Visible : Visibility.Collapsed;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/NoResetObservableCollection.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Collections.Specialized;\r\nusing System.Collections;\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// An observable collection that cannot be reset.  When clear is called\r\n    /// items are removed individually, giving listeners the chance to detect\r\n    /// each remove event and perform operations such as unhooking event \r\n    /// handlers.\r\n    /// </summary>\r\n    /// <typeparam name=\"T\">The type of item in the collection.</typeparam>\r\n    internal class NoResetObservableCollection<T> : ObservableCollection<T>\r\n    {\r\n        /// <summary>\r\n        /// Instantiates a new instance of the NoResetObservableCollection \r\n        /// class.\r\n        /// </summary>\r\n        public NoResetObservableCollection()\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Clears all items in the collection by removing them individually.\r\n        /// </summary>\r\n        protected override void ClearItems()\r\n        {\r\n            IList<T> items = new List<T>(this);\r\n            foreach (T item in items)\r\n            {\r\n                Remove(item);\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/ObjectPool.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// A pool of objects that can be reused.\r\n    /// </summary>\r\n    /// <typeparam name=\"T\">The type of object in the pool.</typeparam>\r\n    internal class ObjectPool<T>\r\n    {\r\n        /// <summary>\r\n        /// The default minimum number objects to keep in the pool.\r\n        /// </summary>\r\n        private const int DefaultMinimumObjectsInThePool = 10;\r\n\r\n#if DEBUG\r\n        /// <summary>\r\n        /// A value indicating whether the pool is being traversed.\r\n        /// </summary>\r\n        private bool _traversing = false;\r\n\r\n#endif\r\n        /// <summary>\r\n        /// A function which creates objects.\r\n        /// </summary>\r\n        private Func<T> _createObject;\r\n\r\n        /// <summary>\r\n        /// The list of objects.\r\n        /// </summary>\r\n        private List<T> _objects;\r\n\r\n        /// <summary>\r\n        /// The index of the current item in the list.\r\n        /// </summary>\r\n        private int currentIndex = 0;\r\n\r\n        /// <summary>\r\n        /// The minimum number of objects to keep in the pool.\r\n        /// </summary>\r\n        private int minimumObjectsInThePool;\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the ObjectPool class.\r\n        /// </summary>\r\n        /// <param name=\"minimumObjectsInThePool\">The minimum number of objects\r\n        /// to keep in the pool.</param>\r\n        /// <param name=\"createObject\">The function that creates the objects.\r\n        /// </param>\r\n        public ObjectPool(\r\n            int minimumObjectsInThePool,\r\n            Func<T> createObject)\r\n        {\r\n            this._objects = new List<T>(minimumObjectsInThePool);\r\n            this.minimumObjectsInThePool = minimumObjectsInThePool;\r\n            this._createObject = createObject;\r\n\r\n            Reset();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the ObjectPool class.\r\n        /// </summary>\r\n        /// <param name=\"createObject\">The function that creates the objects.\r\n        /// </param>\r\n        public ObjectPool(Func<T> createObject)\r\n            : this(DefaultMinimumObjectsInThePool, createObject)\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Performs an operation on the subsequent, already-created objects\r\n        /// in the pool.\r\n        /// </summary>\r\n        /// <param name=\"action\">The action to perform on the remaining objects.\r\n        /// </param>\r\n        public void ForEachRemaining(Action<T> action)\r\n        {\r\n            for (var cnt = currentIndex; cnt < _objects.Count; cnt++)\r\n            {\r\n                action(_objects[cnt]);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates a new object or reuses an existing object in the pool.\r\n        /// </summary>\r\n        /// <returns>A new or existing object in the pool.</returns>\r\n        public T Next()\r\n        {\r\n            if (currentIndex == _objects.Count)\r\n            {\r\n                _objects.Add(_createObject());\r\n            }\r\n            T item = _objects[currentIndex];\r\n            currentIndex++;\r\n            return item;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Resets the pool of objects.\r\n        /// </summary>\r\n        public void Reset()\r\n        {\r\n#if DEBUG\r\n            _traversing = true;\r\n#endif\r\n            currentIndex = 0;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Finishes the object creation process.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// If there are substantially more remaining objects in the pool those\r\n        /// objects may be removed.\r\n        /// </remarks>\r\n        public void Done()\r\n        {\r\n#if DEBUG\r\n            _traversing = false;\r\n#endif\r\n            // Remove the rest of the objects if we are using less than \r\n            // half of the pool.\r\n            if (currentIndex != 0 && _objects.Count > 0 && currentIndex >= minimumObjectsInThePool && currentIndex < _objects.Count / 2)\r\n            {\r\n                _objects.RemoveRange(currentIndex, _objects.Count - currentIndex);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes the objects from the pool.\r\n        /// </summary>\r\n        public void Clear()\r\n        {\r\n#if DEBUG\r\n            System.Diagnostics.Debug.Assert(!_traversing, \"Cannot clear an object pool while it is being traversed.\");\r\n#endif\r\n            _objects.Clear();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/ObservableCollectionListAdapter.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Collections.Specialized;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// An object that synchronizes changes in an observable collection to \r\n    /// a list.\r\n    /// </summary>\r\n    /// <typeparam name=\"T\">The type of the objects in the collection.\r\n    /// </typeparam>\r\n    internal class ObservableCollectionListAdapter<T>\r\n        where T : class\r\n    {\r\n        /// <summary>\r\n        /// The collection to synchronize with a list.\r\n        /// </summary>\r\n        private IEnumerable _collection;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the collection to synchronize with a list.\r\n        /// </summary>\r\n        public IEnumerable Collection\r\n        {\r\n            get\r\n            {\r\n                return _collection;\r\n            }\r\n            set\r\n            {\r\n                IEnumerable oldValue = _collection;\r\n                INotifyCollectionChanged oldObservableCollection = oldValue as INotifyCollectionChanged;\r\n                INotifyCollectionChanged newObservableCollection = value as INotifyCollectionChanged;\r\n                _collection = value;\r\n\r\n                if (oldObservableCollection != null)\r\n                {\r\n                    oldObservableCollection.CollectionChanged -= OnCollectionChanged;\r\n                }\r\n\r\n                if (value == null && TargetList != null)\r\n                {\r\n                    TargetList.Clear();\r\n                }\r\n                if (newObservableCollection != null)\r\n                {\r\n                    newObservableCollection.CollectionChanged += OnCollectionChanged;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the panel to synchronize with the collection.\r\n        /// </summary>\r\n        public IList TargetList { get; set; }\r\n\r\n        /// <summary>\r\n        /// Method that synchronizes the panel's child collection with the \r\n        /// contents of the observable collection when it changes.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source of the event.</param>\r\n        /// <param name=\"e\">Information about the event.</param>\r\n        public void OnCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)\r\n        {\r\n            if (TargetList != null)\r\n            {\r\n                if (e.Action == NotifyCollectionChangedAction.Reset)\r\n                {\r\n                    TargetList.Clear();\r\n                }\r\n                else if (e.Action == NotifyCollectionChangedAction.Replace)\r\n                {\r\n                    for (int cnt = 0; cnt < e.OldItems.Count; cnt++)\r\n                    {\r\n                        T oldItem = e.OldItems[cnt] as T;\r\n                        T newItem = e.NewItems[cnt] as T;\r\n\r\n                        int index = TargetList.IndexOf(oldItem);\r\n\r\n                        if (index != -1)\r\n                        {\r\n                            TargetList[index] = newItem;\r\n                        }\r\n                        else\r\n                        {\r\n                            TargetList.Remove(oldItem);\r\n                            TargetList.Add(newItem);\r\n                        }\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    if (e.Action == NotifyCollectionChangedAction.Remove && e.OldItems != null)\r\n                    {\r\n                        foreach (T element in e.OldItems)\r\n                        {\r\n                            TargetList.Remove(element);\r\n                        }\r\n                    }\r\n                    else if (e.Action == NotifyCollectionChangedAction.Add && e.NewItems != null)\r\n                    {\r\n                        int startingIndex = e.NewStartingIndex;\r\n                        if (startingIndex != 0)\r\n                        {\r\n                            T previousElement = Collection.FastElementAt<T>(startingIndex - 1);\r\n                            int targetListIndex = TargetList.IndexOf(previousElement);\r\n                            if (targetListIndex != -1)\r\n                            {\r\n                                startingIndex = targetListIndex + 1;\r\n                            }\r\n                        }\r\n                        else if (Collection.FastCount() > 1)\r\n                        {\r\n                            T nextElement = Collection.FastElementAt<T>(startingIndex + 1);\r\n                            int targetListIndex = TargetList.IndexOf(nextElement);\r\n                            if (targetListIndex == -1)\r\n                            {\r\n                                startingIndex = 0;\r\n                            }\r\n                            else\r\n                            {\r\n                                startingIndex = targetListIndex;\r\n                            }\r\n                        }\r\n\r\n                        e.NewItems\r\n                            .OfType<T>()\r\n                            .ForEachWithIndex((item, index) =>\r\n                                {\r\n                                    TargetList.Insert(startingIndex + index, item);\r\n                                });\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// A method that populates a panel with the items in the collection.\r\n        /// </summary>\r\n        public void Populate()\r\n        {\r\n            if (TargetList != null)\r\n            {\r\n                if (Collection != null)\r\n                {\r\n                    foreach (T item in Collection)\r\n                    {\r\n                        TargetList.Add(item);\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    TargetList.Clear();\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes the items in the adapted list from the target list.\r\n        /// </summary>\r\n        public void ClearItems()\r\n        {\r\n            foreach (T item in this.Collection)\r\n            {\r\n                this.TargetList.Remove(item);\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/OrientedPanel.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media;\r\nusing System.Windows.Shapes;\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// A panel that plots elements on a one dimensional plane.  In order to \r\n    /// minimize collisions it moves elements further and further from the edge \r\n    /// of the plane based on their priority.  Elements that have the same\r\n    /// priority level are always the same distance from the edge.\r\n    /// </summary>\r\n    internal class OrientedPanel : Panel\r\n    {\r\n        #region public double ActualMinimumDistanceBetweenChildren\r\n        /// <summary>\r\n        /// Gets the actual minimum distance between children.\r\n        /// </summary>\r\n        public double ActualMinimumDistanceBetweenChildren\r\n        {\r\n            get { return (double)GetValue(ActualMinimumDistanceBetweenChildrenProperty); }\r\n            private set { SetValue(ActualMinimumDistanceBetweenChildrenProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ActualMinimumDistanceBetweenChildren dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ActualMinimumDistanceBetweenChildrenProperty =\r\n            DependencyProperty.Register(\r\n                \"ActualMinimumDistanceBetweenChildren\",\r\n                typeof(double),\r\n                typeof(OrientedPanel),\r\n                new PropertyMetadata(0.0));\r\n\r\n        #endregion public double ActualMinimumDistanceBetweenChildren\r\n\r\n        #region public double MinimumDistanceBetweenChildren\r\n        /// <summary>\r\n        /// Gets or sets the minimum distance between children.\r\n        /// </summary>\r\n        public double MinimumDistanceBetweenChildren\r\n        {\r\n            get { return (double)GetValue(MinimumDistanceBetweenChildrenProperty); }\r\n            set { SetValue(MinimumDistanceBetweenChildrenProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the MinimumDistanceBetweenChildren dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty MinimumDistanceBetweenChildrenProperty =\r\n            DependencyProperty.Register(\r\n                \"MinimumDistanceBetweenChildren\",\r\n                typeof(double),\r\n                typeof(OrientedPanel),\r\n                new PropertyMetadata(0.0, OnMinimumDistanceBetweenChildrenPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// MinimumDistanceBetweenChildrenProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">OrientedPanel that changed its MinimumDistanceBetweenChildren.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnMinimumDistanceBetweenChildrenPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            OrientedPanel source = (OrientedPanel)d;\r\n            double oldValue = (double)e.OldValue;\r\n            double newValue = (double)e.NewValue;\r\n            source.OnMinimumDistanceBetweenChildrenPropertyChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// MinimumDistanceBetweenChildrenProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>        \r\n        protected virtual void OnMinimumDistanceBetweenChildrenPropertyChanged(double oldValue, double newValue)\r\n        {\r\n            InvalidateMeasure();\r\n        }\r\n        #endregion public double MinimumDistanceBetweenChildren\r\n\r\n        #region public double ActualLength\r\n        /// <summary>\r\n        /// Gets the actual length of the panel.\r\n        /// </summary>\r\n        public double ActualLength\r\n        {\r\n            get { return (double)GetValue(ActualLengthProperty); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ActualLength dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ActualLengthProperty =\r\n            DependencyProperty.Register(\r\n                \"ActualLength\",\r\n                typeof(double),\r\n                typeof(OrientedPanel),\r\n                new PropertyMetadata(0.0));\r\n        #endregion public double ActualLength\r\n\r\n        #region public attached double CenterCoordinate\r\n        /// <summary>\r\n        /// Gets the value of the CenterCoordinate attached property for a specified UIElement.\r\n        /// </summary>\r\n        /// <param name=\"element\">The UIElement from which the property value is read.</param>\r\n        /// <returns>The CenterCoordinate property value for the UIElement.</returns>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\", Justification = \"This is an attached property and is only intended to be set on UIElement's\")]\r\n        public static double GetCenterCoordinate(UIElement element)\r\n        {\r\n            if (element == null)\r\n            {\r\n                throw new ArgumentNullException(\"element\");\r\n            }\r\n            return (double) element.GetValue(CenterCoordinateProperty);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Sets the value of the CenterCoordinate attached property to a specified UIElement.\r\n        /// </summary>\r\n        /// <param name=\"element\">The UIElement to which the attached property is written.</param>\r\n        /// <param name=\"value\">The needed CenterCoordinate value.</param>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\", Justification = \"This is an attached property and is only intended to be set on UIElement's\")]\r\n        public static void SetCenterCoordinate(UIElement element, double value)\r\n        {\r\n            if (element == null)\r\n            {\r\n                throw new ArgumentNullException(\"element\");\r\n            }\r\n            element.SetValue(CenterCoordinateProperty, value);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the CenterCoordinate dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty CenterCoordinateProperty =\r\n            DependencyProperty.RegisterAttached(\r\n                \"CenterCoordinate\",\r\n                typeof(double),\r\n                typeof(OrientedPanel),\r\n                new PropertyMetadata(OnCenterCoordinatePropertyChanged));\r\n\r\n        /// <summary>\r\n        /// CenterCoordinateProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"dependencyObject\">UIElement that changed its CenterCoordinate.</param>\r\n        /// <param name=\"eventArgs\">Event arguments.</param>\r\n        public static void OnCenterCoordinatePropertyChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs eventArgs)\r\n        {\r\n            UIElement source = dependencyObject as UIElement;\r\n            if (source == null)\r\n            {\r\n                throw new ArgumentNullException(\"dependencyObject\");\r\n            }\r\n            OrientedPanel parent = VisualTreeHelper.GetParent(source) as OrientedPanel;\r\n            if (parent != null)\r\n            {\r\n                parent.InvalidateMeasure();\r\n            }\r\n        }\r\n        #endregion public attached double CenterCoordinate\r\n\r\n        #region public double OffsetPadding\r\n        /// <summary>\r\n        /// Gets or sets the amount of offset padding to add between items.\r\n        /// </summary>\r\n        public double OffsetPadding\r\n        {\r\n            get { return (double)GetValue(OffsetPaddingProperty); }\r\n            set { SetValue(OffsetPaddingProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the OffsetPadding dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty OffsetPaddingProperty =\r\n            DependencyProperty.Register(\r\n                \"OffsetPadding\",\r\n                typeof(double),\r\n                typeof(OrientedPanel),\r\n                new PropertyMetadata(0.0, OnOffsetPaddingPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// OffsetPaddingProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">OrientedPanel that changed its OffsetPadding.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnOffsetPaddingPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            OrientedPanel source = (OrientedPanel)d;\r\n            double oldValue = (double)e.OldValue;\r\n            double newValue = (double)e.NewValue;\r\n            source.OnOffsetPaddingPropertyChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// OffsetPaddingProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>        \r\n        protected virtual void OnOffsetPaddingPropertyChanged(double oldValue, double newValue)\r\n        {\r\n            this.InvalidateMeasure();\r\n        }\r\n        #endregion public double OffsetPadding\r\n\r\n        #region public attached int Priority\r\n        /// <summary>\r\n        /// Gets the value of the Priority attached property for a specified UIElement.\r\n        /// </summary>\r\n        /// <param name=\"element\">The UIElement from which the property value is read.</param>\r\n        /// <returns>The Priority property value for the UIElement.</returns>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\", Justification = \"This is an attached property and is only intended to be set on UIElement's\")]\r\n        public static int GetPriority(UIElement element)\r\n        {\r\n            if (element == null)\r\n            {\r\n                throw new ArgumentNullException(\"element\");\r\n            }\r\n            return (int) element.GetValue(PriorityProperty);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Sets the value of the Priority attached property to a specified UIElement.\r\n        /// </summary>\r\n        /// <param name=\"element\">The UIElement to which the attached property is written.</param>\r\n        /// <param name=\"value\">The needed Priority value.</param>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\", Justification = \"This is an attached property and is only intended to be set on UIElement's\")]\r\n        public static void SetPriority(UIElement element, int value)\r\n        {\r\n            if (element == null)\r\n            {\r\n                throw new ArgumentNullException(\"element\");\r\n            }\r\n            element.SetValue(PriorityProperty, value);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Priority dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty PriorityProperty =\r\n            DependencyProperty.RegisterAttached(\r\n                \"Priority\",\r\n                typeof(int),\r\n                typeof(OrientedPanel),\r\n                new PropertyMetadata(OnPriorityPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// PriorityProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"dependencyObject\">UIElement that changed its Priority.</param>\r\n        /// <param name=\"eventArgs\">Event arguments.</param>\r\n        public static void OnPriorityPropertyChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs eventArgs)\r\n        {\r\n            UIElement source = dependencyObject as UIElement;\r\n            if (source == null)\r\n            {\r\n                throw new ArgumentNullException(\"dependencyObject\");\r\n            }\r\n            OrientedPanel parent = VisualTreeHelper.GetParent(source) as OrientedPanel;\r\n            if (parent != null)\r\n            {\r\n                parent.InvalidateMeasure();\r\n            }\r\n        }\r\n        #endregion public attached int Priority\r\n\r\n        #region public bool IsInverted\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether the panel is inverted.\r\n        /// </summary>\r\n        public bool IsInverted\r\n        {\r\n            get { return (bool)GetValue(IsInvertedProperty); }\r\n            set { SetValue(IsInvertedProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the IsInverted dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty IsInvertedProperty =\r\n            DependencyProperty.Register(\r\n                \"IsInverted\",\r\n                typeof(bool),\r\n                typeof(OrientedPanel),\r\n                new PropertyMetadata(false, OnIsInvertedPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// IsInvertedProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">OrientedPanel that changed its IsInverted.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnIsInvertedPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            OrientedPanel source = (OrientedPanel)d;\r\n            bool oldValue = (bool)e.OldValue;\r\n            bool newValue = (bool)e.NewValue;\r\n            source.OnIsInvertedPropertyChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// IsInvertedProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>        \r\n        protected virtual void OnIsInvertedPropertyChanged(bool oldValue, bool newValue)\r\n        {\r\n            InvalidateMeasure();\r\n        }\r\n        #endregion public bool IsInverted\r\n\r\n        #region public bool IsReversed\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether the direction is reversed. \r\n        /// </summary>\r\n        public bool IsReversed\r\n        {\r\n            get { return (bool)GetValue(IsReversedProperty); }\r\n            set { SetValue(IsReversedProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the IsReversed dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty IsReversedProperty =\r\n            DependencyProperty.Register(\r\n                \"IsReversed\",\r\n                typeof(bool),\r\n                typeof(OrientedPanel),\r\n                new PropertyMetadata(false, OnIsReversedPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// IsReversedProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">OrientedPanel that changed its IsReversed.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnIsReversedPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            OrientedPanel source = (OrientedPanel)d;\r\n            bool oldValue = (bool)e.OldValue;\r\n            bool newValue = (bool)e.NewValue;\r\n            source.OnIsReversedPropertyChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// IsReversedProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>        \r\n        protected virtual void OnIsReversedPropertyChanged(bool oldValue, bool newValue)\r\n        {\r\n            InvalidateMeasure();\r\n        }\r\n        #endregion public bool IsReversed\r\n\r\n        #region public Orientation Orientation\r\n        /// <summary>\r\n        /// Gets or sets the orientation of the panel.\r\n        /// </summary>\r\n        public Orientation Orientation\r\n        {\r\n            get { return (Orientation)GetValue(OrientationProperty); }\r\n            set { SetValue(OrientationProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Orientation dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty OrientationProperty =\r\n            DependencyProperty.Register(\r\n                \"Orientation\",\r\n                typeof(Orientation),\r\n                typeof(OrientedPanel),\r\n                new PropertyMetadata(Orientation.Horizontal, OnOrientationPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// OrientationProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">OrientedPanel that changed its Orientation.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnOrientationPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            OrientedPanel source = (OrientedPanel)d;\r\n            Orientation newValue = (Orientation)e.NewValue;\r\n            source.OnOrientationPropertyChanged(newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// OrientationProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"newValue\">New value.</param>        \r\n        protected virtual void OnOrientationPropertyChanged(Orientation newValue)\r\n        {\r\n            UpdateActualLength();\r\n            InvalidateMeasure();\r\n        }\r\n        #endregion public Orientation Orientation\r\n\r\n        /// <summary>\r\n        /// Gets or sets the offset of the edge to use for each priority group.\r\n        /// </summary>\r\n        private IDictionary<int, double> PriorityOffsets { get; set; }\r\n\r\n        /// <summary>\r\n        /// Instantiates a new instance of the OrientedPanel class.\r\n        /// </summary>\r\n        public OrientedPanel()\r\n        {\r\n            UpdateActualLength();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the actual length property.\r\n        /// </summary>\r\n        private void UpdateActualLength()\r\n        {\r\n            this.SetBinding(ActualLengthProperty, new Binding((Orientation == Orientation.Horizontal) ? \"ActualWidth\" : \"ActualHeight\") { Source = this });\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a sequence of ranges for a given sequence of children and a\r\n        /// length selector.\r\n        /// </summary>\r\n        /// <param name=\"children\">A sequence of children.</param>\r\n        /// <param name=\"lengthSelector\">A function that returns a length given\r\n        /// a UIElement.</param>\r\n        /// <returns>A sequence of ranges.</returns>\r\n        private static IEnumerable<Range<double>> GetRanges(IEnumerable<UIElement> children, Func<UIElement, double> lengthSelector)\r\n        {\r\n            return \r\n                children\r\n                    .Select(child =>\r\n                    {\r\n                        double centerCoordinate = GetCenterCoordinate(child);\r\n                        double halfLength = lengthSelector(child) / 2;\r\n                        return new Range<double>(centerCoordinate - halfLength, centerCoordinate + halfLength);\r\n                    });\r\n        }\r\n\r\n        /// <summary>\r\n        /// Measures children and determines necessary size.\r\n        /// </summary>\r\n        /// <param name=\"availableSize\">The available size.</param>\r\n        /// <returns>The necessary size.</returns>\r\n        [SuppressMessage(\"Microsoft.Maintainability\", \"CA1502:AvoidExcessiveComplexity\", Justification = \"Linq use artificially increases cyclomatic complexity.  Linq functions are well-understood.\")]\r\n        protected override Size MeasureOverride(Size availableSize)\r\n        {\r\n            double offset = 0.0;\r\n            if (Children.Count > 0)\r\n            {\r\n                Size totalSize = new Size(double.PositiveInfinity, double.PositiveInfinity);\r\n                foreach (UIElement child in this.Children)\r\n                {\r\n                    child.Measure(totalSize);\r\n                }\r\n\r\n                Func<UIElement, double> lengthSelector = null;\r\n                Func<UIElement, double> offsetSelector = null;\r\n\r\n                if (Orientation == Orientation.Horizontal)\r\n                {\r\n                    lengthSelector = child => GetCorrectedDesiredSize(child).Width;\r\n                    offsetSelector = child => GetCorrectedDesiredSize(child).Height;\r\n                }\r\n                else\r\n                {\r\n                    lengthSelector = child => GetCorrectedDesiredSize(child).Height;\r\n                    offsetSelector = child => GetCorrectedDesiredSize(child).Width;\r\n                }\r\n\r\n                IEnumerable<IGrouping<int, UIElement>> priorityGroups =\r\n                    from child in Children.CastWrapper<UIElement>()\r\n                    group child by GetPriority(child) into priorityGroup\r\n                    select priorityGroup;\r\n\r\n                ActualMinimumDistanceBetweenChildren =\r\n                    (from priorityGroup in priorityGroups\r\n                     let orderedElements =\r\n                         (from element in priorityGroup\r\n                          orderby GetCenterCoordinate(element) ascending\r\n                          select element).ToList()\r\n                     where orderedElements.Count >= 2\r\n                     select\r\n                         (EnumerableFunctions.Zip(\r\n                             orderedElements,\r\n                             orderedElements.Skip(1),\r\n                             (leftElement, rightElement) =>\r\n                             {\r\n                                 double halfLeftLength = lengthSelector(leftElement) / 2;\r\n                                 double leftCenterCoordinate = GetCenterCoordinate(leftElement);\r\n\r\n                                 double halfRightLength = lengthSelector(rightElement) / 2;\r\n                                 double rightCenterCoordinate = GetCenterCoordinate(rightElement);\r\n\r\n                                 return (rightCenterCoordinate - halfRightLength) - (leftCenterCoordinate + halfLeftLength);\r\n                             }))\r\n                             .Min())\r\n                        .MinOrNullable() ?? MinimumDistanceBetweenChildren;\r\n\r\n                IEnumerable<int> priorities =\r\n                    Children\r\n                        .CastWrapper<UIElement>()\r\n                        .Select(child => GetPriority(child)).Distinct().OrderBy(priority => priority).ToList();\r\n\r\n                PriorityOffsets = new Dictionary<int, double>();\r\n                foreach (int priority in priorities)\r\n                {\r\n                    PriorityOffsets[priority] = 0.0;\r\n                }\r\n\r\n                IEnumerable<Tuple<int, int>> priorityPairs =\r\n                    EnumerableFunctions.Zip(priorities, priorities.Skip(1), (previous, next) => new Tuple<int, int>(previous, next));\r\n\r\n                foreach (Tuple<int, int> priorityPair in priorityPairs)\r\n                {\r\n                    IEnumerable<UIElement> currentPriorityChildren = Children.CastWrapper<UIElement>().Where(child => GetPriority(child) == priorityPair.Item1).ToList();\r\n\r\n                    IEnumerable<Range<double>> currentPriorityRanges =\r\n                        GetRanges(currentPriorityChildren, lengthSelector);\r\n\r\n                    IEnumerable<UIElement> nextPriorityChildren = Children.CastWrapper<UIElement>().Where(child => GetPriority(child) == priorityPair.Item2).ToList();\r\n\r\n                    IEnumerable<Range<double>> nextPriorityRanges =\r\n                        GetRanges(nextPriorityChildren, lengthSelector);\r\n\r\n                    bool intersects =\r\n                        (from currentPriorityRange in currentPriorityRanges\r\n                         from nextPriorityRange in nextPriorityRanges\r\n                         select currentPriorityRange.IntersectsWith(nextPriorityRange))\r\n                            .Any(value => value);\r\n\r\n                    if (intersects)\r\n                    {\r\n                        double maxCurrentPriorityChildOffset =\r\n                            currentPriorityChildren\r\n                                .Select(child => offsetSelector(child))\r\n                                .MaxOrNullable() ?? 0.0;\r\n\r\n                        offset += maxCurrentPriorityChildOffset + OffsetPadding;\r\n                    }\r\n                    PriorityOffsets[priorityPair.Item2] = offset;\r\n                }\r\n\r\n                offset =\r\n                    (Children\r\n                        .CastWrapper<UIElement>()\r\n                        .GroupBy(child => GetPriority(child))\r\n                        .Select(\r\n                            group =>\r\n                                group\r\n                                    .Select(child => PriorityOffsets[group.Key] + offsetSelector(child))\r\n                                    .MaxOrNullable()))\r\n                    .Where(num => num.HasValue)\r\n                    .Select(num => num.Value)\r\n                    .MaxOrNullable() ?? 0.0;\r\n            }\r\n\r\n            if (Orientation == Orientation.Horizontal)\r\n            {\r\n                return new Size(0, offset);\r\n            }\r\n            else\r\n            {\r\n                return new Size(offset, 0);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Arranges items according to position and priority.\r\n        /// </summary>\r\n        /// <param name=\"finalSize\">The final size of the panel.</param>\r\n        /// <returns>The final size of the control.</returns>\r\n        protected override Size ArrangeOverride(Size finalSize)\r\n        {\r\n            foreach (UIElement child in Children)\r\n            {\r\n                double x = 0.0;\r\n                double y = 0.0;\r\n\r\n                x = GetCenterCoordinate(child);\r\n                y = PriorityOffsets[GetPriority(child)];\r\n\r\n                double totalLength = 0.0;\r\n                double totalOffsetLength = 0.0;\r\n                double length = 0.0;\r\n                double offsetLength = 0.0;\r\n                Size childCorrectedDesiredSize = GetCorrectedDesiredSize(child);\r\n                if (Orientation == Orientation.Horizontal)\r\n                {\r\n                    totalLength = finalSize.Width;\r\n                    length = childCorrectedDesiredSize.Width;\r\n                    offsetLength = childCorrectedDesiredSize.Height;\r\n                    totalOffsetLength = finalSize.Height;\r\n                }\r\n                else if (Orientation == Orientation.Vertical)\r\n                {\r\n                    totalLength = finalSize.Height;\r\n                    length = childCorrectedDesiredSize.Height;\r\n                    offsetLength = childCorrectedDesiredSize.Width;\r\n                    totalOffsetLength = finalSize.Width;\r\n                }\r\n\r\n                double halfLength = length / 2;\r\n\r\n                double left = 0.0;\r\n                double top = 0.0;\r\n                if (!IsReversed)\r\n                {\r\n                    left = x - halfLength;\r\n                }\r\n                else\r\n                {\r\n                    left = totalLength - Math.Round(x + halfLength);\r\n                }\r\n                if (!IsInverted)\r\n                {\r\n                    top = y;\r\n                }\r\n                else\r\n                {\r\n                    top = totalOffsetLength - Math.Round(y + offsetLength);\r\n                }\r\n\r\n                left = Math.Min(Math.Round(left), totalLength - 1);\r\n                top = Math.Round(top);\r\n                if (Orientation == Orientation.Horizontal)\r\n                {\r\n                    child.Arrange(new Rect(left, top, length, offsetLength));\r\n                }\r\n                else if (Orientation == Orientation.Vertical)\r\n                {\r\n                    child.Arrange(new Rect(top, left, offsetLength, length));\r\n                }\r\n            }\r\n\r\n            return finalSize;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the \"corrected\" DesiredSize (for Line instances); one that is\r\n        /// more consistent with how the elements actually render.\r\n        /// </summary>\r\n        /// <param name=\"element\">UIElement to get the size for.</param>\r\n        /// <returns>Corrected size.</returns>\r\n        private static Size GetCorrectedDesiredSize(UIElement element)\r\n        {\r\n            Line elementAsLine = element as Line;\r\n            if (null != elementAsLine)\r\n            {\r\n                return new Size(\r\n                    Math.Max(elementAsLine.StrokeThickness, elementAsLine.X2 - elementAsLine.X1),\r\n                    Math.Max(elementAsLine.StrokeThickness, elementAsLine.Y2 - elementAsLine.Y1));\r\n            }\r\n            else\r\n            {\r\n                return element.DesiredSize;\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Properties/AssemblyInfo.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Security;\r\nusing System.Windows;\r\n\r\n// WPF-only settings\r\n[assembly: ThemeInfo(\r\n    ResourceDictionaryLocation.None,\r\n    ResourceDictionaryLocation.SourceAssembly)]\r\n\r\n// WPF Toolkit settings\r\n[assembly: AllowPartiallyTrustedCallers]\r\n//[assembly: SecurityCritical]\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Properties/Resources.Designer.cs",
    "content": "﻿//------------------------------------------------------------------------------\r\n// <auto-generated>\r\n//     This code was generated by a tool.\r\n//     Runtime Version:4.0.21006.1\r\n//\r\n//     Changes to this file may cause incorrect behavior and will be lost if\r\n//     the code is regenerated.\r\n// </auto-generated>\r\n//------------------------------------------------------------------------------\r\n\r\nnamespace System.Windows.Controls.DataVisualization.Properties {\r\n    using System;\r\n    \r\n    \r\n    /// <summary>\r\n    ///   A strongly-typed resource class, for looking up localized strings, etc.\r\n    /// </summary>\r\n    // This class was auto-generated by the StronglyTypedResourceBuilder\r\n    // class via a tool like ResGen or Visual Studio.\r\n    // To add or remove a member, edit your .ResX file then rerun ResGen\r\n    // with the /str option, or rebuild your VS project.\r\n    [global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Resources.Tools.StronglyTypedResourceBuilder\", \"4.0.0.0\")]\r\n    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r\n    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\r\n    internal class Resources {\r\n        \r\n        private static global::System.Resources.ResourceManager resourceMan;\r\n        \r\n        private static global::System.Globalization.CultureInfo resourceCulture;\r\n        \r\n        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\")]\r\n        internal Resources() {\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Returns the cached ResourceManager instance used by this class.\r\n        /// </summary>\r\n        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\r\n        internal static global::System.Resources.ResourceManager ResourceManager {\r\n            get {\r\n                if (object.ReferenceEquals(resourceMan, null)) {\r\n                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager(\"System.Windows.Controls.DataVisualization.Properties.Resources\", typeof(Resources).Assembly);\r\n                    resourceMan = temp;\r\n                }\r\n                return resourceMan;\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Overrides the current thread's CurrentUICulture property for all\r\n        ///   resource lookups using this strongly typed resource class.\r\n        /// </summary>\r\n        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\r\n        internal static global::System.Globalization.CultureInfo Culture {\r\n            get {\r\n                return resourceCulture;\r\n            }\r\n            set {\r\n                resourceCulture = value;\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Changing the Chart&apos;s Axes property is not supported; changes to the collection should be made with its .Add/.Remove methods instead..\r\n        /// </summary>\r\n        internal static string Chart_Axes_SetterNotSupported {\r\n            get {\r\n                return ResourceManager.GetString(\"Chart_Axes_SetterNotSupported\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Axis location cannot be changed to auto when hosted inside of a series host..\r\n        /// </summary>\r\n        internal static string Chart_AxisLocationChanged_CantBeChangedToAutoWhenHostedInsideOfASeriesHost {\r\n            get {\r\n                return ResourceManager.GetString(\"Chart_AxisLocationChanged_CantBeChangedToAutoWhenHostedInsideOfASeriesHost\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Changing the Chart&apos;s Series property is not supported; changes to the collection should be made with its .Add/.Remove methods instead..\r\n        /// </summary>\r\n        internal static string Chart_Series_SetterNotSupported {\r\n            get {\r\n                return ResourceManager.GetString(\"Chart_Series_SetterNotSupported\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to The content property must be set to a Chart object..\r\n        /// </summary>\r\n        internal static string DataPointSeriesDropTarget_set_Content_ContentMustBeAChart {\r\n            get {\r\n                return ResourceManager.GetString(\"DataPointSeriesDropTarget_set_Content_ContentMustBeAChart\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Assigned dependent axis cannot be used. This may be due to an unset Orientation property for the axis or a type mismatch between the values being plotted and those supported by the axis..\r\n        /// </summary>\r\n        internal static string DataPointSeriesWithAxes_GetAxes_AssignedDependentAxisCannotBeUsed {\r\n            get {\r\n                return ResourceManager.GetString(\"DataPointSeriesWithAxes_GetAxes_AssignedDependentAxisCannotBeUsed\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Assigned independent axis cannot be used. This may be due to an unset Orientation property for the axis..\r\n        /// </summary>\r\n        internal static string DataPointSeriesWithAxes_GetAxes_AssignedIndependentAxisCannotBeUsed {\r\n            get {\r\n                return ResourceManager.GetString(\"DataPointSeriesWithAxes_GetAxes_AssignedIndependentAxisCannotBeUsed\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to No suitable axis is available for plotting the dependent value..\r\n        /// </summary>\r\n        internal static string DataPointSeriesWithAxes_NoSuitableAxisAvailableForPlottingDependentValue {\r\n            get {\r\n                return ResourceManager.GetString(\"DataPointSeriesWithAxes_NoSuitableAxisAvailableForPlottingDependentValue\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to This series does not support radial axes..\r\n        /// </summary>\r\n        internal static string DataPointSeriesWithAxes_ThisSeriesDoesNotSupportRadialAxes {\r\n            get {\r\n                return ResourceManager.GetString(\"DataPointSeriesWithAxes_ThisSeriesDoesNotSupportRadialAxes\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to A SeriesDefinition does not have its DependentValueBinding or DependentValuePath properties set; unable to determine the source for dependent values. Please use either of these properties to identify the data model property corresponding to the dependent values..\r\n        /// </summary>\r\n        internal static string DefinitionSeries_EnsureAxes_MissingDependentValueBinding {\r\n            get {\r\n                return ResourceManager.GetString(\"DefinitionSeries_EnsureAxes_MissingDependentValueBinding\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to A SeriesDefinition does not have its IndependentValueBinding or IndependentValuePath properties set; unable to determine the source for independent values. Please use either of these properties to identify the data model property corresponding to the independent values..\r\n        /// </summary>\r\n        internal static string DefinitionSeries_EnsureAxes_MissingIndependentValueBinding {\r\n            get {\r\n                return ResourceManager.GetString(\"DefinitionSeries_EnsureAxes_MissingIndependentValueBinding\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Changing the SeriesDefinitions property of a DefinitionSeries is not supported; changes to the collection should be made with its .Add/.Remove methods instead..\r\n        /// </summary>\r\n        internal static string DefinitionSeries_SeriesDefinitions_SetterNotSupported {\r\n            get {\r\n                return ResourceManager.GetString(\"DefinitionSeries_SeriesDefinitions_SetterNotSupported\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Cannot determine the size of an axis without an orientation..\r\n        /// </summary>\r\n        internal static string DisplayAxis_GetLength_CannotDetermineTheLengthOfAnAxisWithAnOrientationOfNone {\r\n            get {\r\n                return ResourceManager.GetString(\"DisplayAxis_GetLength_CannotDetermineTheLengthOfAnAxisWithAnOrientationOfNone\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Attempt to set Edge property to an invalid value..\r\n        /// </summary>\r\n        internal static string EdgePanel_OnEdgePropertyChanged {\r\n            get {\r\n                return ResourceManager.GetString(\"EdgePanel_OnEdgePropertyChanged\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to The DataRangeBinding property of the Interpolator must be bound to an IConvertible object..\r\n        /// </summary>\r\n        internal static string Interpolator_IncludeInRange_DataRangeBindingNotIConvertible {\r\n            get {\r\n                return ResourceManager.GetString(\"Interpolator_IncludeInRange_DataRangeBindingNotIConvertible\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to The maximum value must be larger than or equal to the minimum value..\r\n        /// </summary>\r\n        internal static string Range_ctor_MaximumValueMustBeLargerThanOrEqualToMinimumValue {\r\n            get {\r\n                return ResourceManager.GetString(\"Range_ctor_MaximumValueMustBeLargerThanOrEqualToMinimumValue\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to &quot;Cannot read the Maximum of an empty range.&quot;.\r\n        /// </summary>\r\n        internal static string Range_get_Maximum_CannotReadTheMaximumOfAnEmptyRange {\r\n            get {\r\n                return ResourceManager.GetString(\"Range_get_Maximum_CannotReadTheMaximumOfAnEmptyRange\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to &quot;Cannot read the Minimum of an empty range.&quot;.\r\n        /// </summary>\r\n        internal static string Range_get_Minimum_CannotReadTheMinimumOfAnEmptyRange {\r\n            get {\r\n                return ResourceManager.GetString(\"Range_get_Minimum_CannotReadTheMinimumOfAnEmptyRange\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to [{0},{1}].\r\n        /// </summary>\r\n        internal static string Range_ToString_Data {\r\n            get {\r\n                return ResourceManager.GetString(\"Range_ToString_Data\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to No Data..\r\n        /// </summary>\r\n        internal static string Range_ToString_NoData {\r\n            get {\r\n                return ResourceManager.GetString(\"Range_ToString_NoData\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to The maximum value must be larger than or equal to the minimum value..\r\n        /// </summary>\r\n        internal static string RangeAxis_MaximumValueMustBeLargerThanOrEqualToMinimumValue {\r\n            get {\r\n                return ResourceManager.GetString(\"RangeAxis_MaximumValueMustBeLargerThanOrEqualToMinimumValue\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to The minimum value must be smaller than or equal to the maximum value..\r\n        /// </summary>\r\n        internal static string RangeAxis_MinimumValueMustBeLargerThanOrEqualToMaximumValue {\r\n            get {\r\n                return ResourceManager.GetString(\"RangeAxis_MinimumValueMustBeLargerThanOrEqualToMaximumValue\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Collection is read-only..\r\n        /// </summary>\r\n        internal static string ReadOnlyObservableCollection_CollectionIsReadOnly {\r\n            get {\r\n                return ResourceManager.GetString(\"ReadOnlyObservableCollection_CollectionIsReadOnly\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Cannot reset a ResourceDictionaryEnumerator; reset the ResourceDictionaryDispenser instead..\r\n        /// </summary>\r\n        internal static string ResourceDictionaryEnumerator_CantResetEnumeratorResetDispenserInstead {\r\n            get {\r\n                return ResourceManager.GetString(\"ResourceDictionaryEnumerator_CantResetEnumeratorResetDispenserInstead\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Series {0}.\r\n        /// </summary>\r\n        internal static string Series_OnGlobalSeriesIndexPropertyChanged_UntitledSeriesFormatString {\r\n            get {\r\n                return ResourceManager.GetString(\"Series_OnGlobalSeriesIndexPropertyChanged_UntitledSeriesFormatString\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to A series cannot be added to more than one series host..\r\n        /// </summary>\r\n        internal static string Series_SeriesHost_SeriesHostPropertyNotNull {\r\n            get {\r\n                return ResourceManager.GetString(\"Series_SeriesHost_SeriesHostPropertyNotNull\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to A SeriesDefinition instance&apos;s SeriesHost property may only be set to an instance of the DefinitionSeries class; other SeriesHost types are not supported..\r\n        /// </summary>\r\n        internal static string SeriesDefinition_SeriesHost_InvalidParent {\r\n            get {\r\n                return ResourceManager.GetString(\"SeriesDefinition_SeriesHost_InvalidParent\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Invalid attempt to remove permanent axis from axis collection..\r\n        /// </summary>\r\n        internal static string SeriesHostAxesCollection_InvalidAttemptToRemovePermanentAxisFromSeriesHost {\r\n            get {\r\n                return ResourceManager.GetString(\"SeriesHostAxesCollection_InvalidAttemptToRemovePermanentAxisFromSeriesHost\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to An axis cannot be removed from a series host when one or more hosted series is listening to it..\r\n        /// </summary>\r\n        internal static string SeriesHostAxesCollection_RemoveItem_AxisCannotBeRemovedFromASeriesHostWhenOneOrMoreSeriesAreListeningToIt {\r\n            get {\r\n                return ResourceManager.GetString(\"SeriesHostAxesCollection_RemoveItem_AxisCannotBeRemovedFromASeriesHostWhenOneOrMo\" +\r\n                        \"reSeriesAreListeningToIt\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Either ItemTemplate must be set or TreeMapItemDefinitionSelector must return a non-null template..\r\n        /// </summary>\r\n        internal static string TreeMap_BuildTreeMapTree_TemplateNotSet {\r\n            get {\r\n                return ResourceManager.GetString(\"TreeMap_BuildTreeMapTree_TemplateNotSet\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to The value of PropertyBinding property of an interpolator cannot be null..\r\n        /// </summary>\r\n        internal static string TreeMap_CreateChildren_InterpolatorBindingNotSet {\r\n            get {\r\n                return ResourceManager.GetString(\"TreeMap_CreateChildren_InterpolatorBindingNotSet\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Changing the TreeMap&apos;s Interpolators Property is not supported; changes to the collection should be made with its .Add/.Remove methods instead..\r\n        /// </summary>\r\n        internal static string TreeMap_Interpolators_SetterNotSupported {\r\n            get {\r\n                return ResourceManager.GetString(\"TreeMap_Interpolators_SetterNotSupported\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Invalid attempt to insert a duplicate item..\r\n        /// </summary>\r\n        internal static string UniqueObservableCollection_InvalidAttemptToInsertADuplicateItem {\r\n            get {\r\n                return ResourceManager.GetString(\"UniqueObservableCollection_InvalidAttemptToInsertADuplicateItem\", resourceCulture);\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Properties/Resources.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n  <!-- \r\n    Microsoft ResX Schema \r\n    \r\n    Version 2.0\r\n    \r\n    The primary goals of this format is to allow a simple XML format \r\n    that is mostly human readable. The generation and parsing of the \r\n    various data types are done through the TypeConverter classes \r\n    associated with the data types.\r\n    \r\n    Example:\r\n    \r\n    ... ado.net/XML headers & schema ...\r\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\r\n    <resheader name=\"version\">2.0</resheader>\r\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\r\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\r\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\r\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\r\n    </data>\r\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\r\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r\n        <comment>This is a comment</comment>\r\n    </data>\r\n                \r\n    There are any number of \"resheader\" rows that contain simple \r\n    name/value pairs.\r\n    \r\n    Each data row contains a name, and value. The row also contains a \r\n    type or mimetype. Type corresponds to a .NET class that support \r\n    text/value conversion through the TypeConverter architecture. \r\n    Classes that don't support this are serialized and stored with the \r\n    mimetype set.\r\n    \r\n    The mimetype is used for serialized objects, and tells the \r\n    ResXResourceReader how to depersist the object. This is currently not \r\n    extensible. For a given mimetype the value must be set accordingly:\r\n    \r\n    Note - application/x-microsoft.net.object.binary.base64 is the format \r\n    that the ResXResourceWriter will generate, however the reader can \r\n    read any of the formats listed below.\r\n    \r\n    mimetype: application/x-microsoft.net.object.binary.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r\n            : and then encoded with base64 encoding.\r\n    \r\n    mimetype: application/x-microsoft.net.object.soap.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r\n            : and then encoded with base64 encoding.\r\n\r\n    mimetype: application/x-microsoft.net.object.bytearray.base64\r\n    value   : The object must be serialized into a byte array \r\n            : using a System.ComponentModel.TypeConverter\r\n            : and then encoded with base64 encoding.\r\n    -->\r\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\r\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\r\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\r\n      <xsd:complexType>\r\n        <xsd:choice maxOccurs=\"unbounded\">\r\n          <xsd:element name=\"metadata\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"assembly\">\r\n            <xsd:complexType>\r\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"data\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"resheader\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n        </xsd:choice>\r\n      </xsd:complexType>\r\n    </xsd:element>\r\n  </xsd:schema>\r\n  <resheader name=\"resmimetype\">\r\n    <value>text/microsoft-resx</value>\r\n  </resheader>\r\n  <resheader name=\"version\">\r\n    <value>2.0</value>\r\n  </resheader>\r\n  <resheader name=\"reader\">\r\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <resheader name=\"writer\">\r\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <data name=\"Chart_Axes_SetterNotSupported\" xml:space=\"preserve\">\r\n    <value>Changing the Chart's Axes property is not supported; changes to the collection should be made with its .Add/.Remove methods instead.</value>\r\n    <comment>Setter is public to work around a limitation with the XAML editing tools.</comment>\r\n  </data>\r\n  <data name=\"Chart_Series_SetterNotSupported\" xml:space=\"preserve\">\r\n    <value>Changing the Chart's Series property is not supported; changes to the collection should be made with its .Add/.Remove methods instead.</value>\r\n    <comment>Setter is public to work around a limitation with the XAML editing tools.</comment>\r\n  </data>\r\n  <data name=\"DataPointSeriesWithAxes_GetAxes_AssignedDependentAxisCannotBeUsed\" xml:space=\"preserve\">\r\n    <value>Assigned dependent axis cannot be used. This may be due to an unset Orientation property for the axis or a type mismatch between the values being plotted and those supported by the axis.</value>\r\n    <comment>Exception message.</comment>\r\n  </data>\r\n  <data name=\"DataPointSeriesWithAxes_GetAxes_AssignedIndependentAxisCannotBeUsed\" xml:space=\"preserve\">\r\n    <value>Assigned independent axis cannot be used. This may be due to an unset Orientation property for the axis.</value>\r\n    <comment>Exception message.</comment>\r\n  </data>\r\n  <data name=\"DataPointSeriesWithAxes_ThisSeriesDoesNotSupportRadialAxes\" xml:space=\"preserve\">\r\n    <value>This series does not support radial axes.</value>\r\n    <comment>Exception message.</comment>\r\n  </data>\r\n  <data name=\"DataPointSeriesWithAxes_NoSuitableAxisAvailableForPlottingDependentValue\" xml:space=\"preserve\">\r\n    <value>No suitable axis is available for plotting the dependent value.</value>\r\n    <comment>Exception message.</comment>\r\n  </data>\r\n  <data name=\"RangeAxis_MaximumValueMustBeLargerThanOrEqualToMinimumValue\" xml:space=\"preserve\">\r\n    <value>The maximum value must be larger than or equal to the minimum value.</value>\r\n    <comment>Exception message.</comment>\r\n  </data>\r\n  <data name=\"RangeAxis_MinimumValueMustBeLargerThanOrEqualToMaximumValue\" xml:space=\"preserve\">\r\n    <value>The minimum value must be smaller than or equal to the maximum value.</value>\r\n    <comment>Exception message.</comment>\r\n  </data>\r\n  <data name=\"Range_ctor_MaximumValueMustBeLargerThanOrEqualToMinimumValue\" xml:space=\"preserve\">\r\n    <value>The maximum value must be larger than or equal to the minimum value.</value>\r\n    <comment>Exception message.</comment>\r\n  </data>\r\n  <data name=\"Range_get_Maximum_CannotReadTheMaximumOfAnEmptyRange\" xml:space=\"preserve\">\r\n    <value>\"Cannot read the Maximum of an empty range.\"</value>\r\n    <comment>Exception message.</comment>\r\n  </data>\r\n  <data name=\"Range_get_Minimum_CannotReadTheMinimumOfAnEmptyRange\" xml:space=\"preserve\">\r\n    <value>\"Cannot read the Minimum of an empty range.\"</value>\r\n    <comment>Exception message.</comment>\r\n  </data>\r\n  <data name=\"Range_ToString_Data\" xml:space=\"preserve\">\r\n    <value>[{0},{1}]</value>\r\n    <comment>Range text for ToString method when data is present.</comment>\r\n  </data>\r\n  <data name=\"Range_ToString_NoData\" xml:space=\"preserve\">\r\n    <value>No Data.</value>\r\n    <comment>Range text for ToString method when no data is present.</comment>\r\n  </data>\r\n  <data name=\"ReadOnlyObservableCollection_CollectionIsReadOnly\" xml:space=\"preserve\">\r\n    <value>Collection is read-only.</value>\r\n    <comment>Exception message.</comment>\r\n  </data>\r\n  <data name=\"SeriesHostAxesCollection_InvalidAttemptToRemovePermanentAxisFromSeriesHost\" xml:space=\"preserve\">\r\n    <value>Invalid attempt to remove permanent axis from axis collection.</value>\r\n    <comment>Exception message.</comment>\r\n  </data>\r\n  <data name=\"SeriesHostAxesCollection_RemoveItem_AxisCannotBeRemovedFromASeriesHostWhenOneOrMoreSeriesAreListeningToIt\" xml:space=\"preserve\">\r\n    <value>An axis cannot be removed from a series host when one or more hosted series is listening to it.</value>\r\n    <comment>Exception message.</comment>\r\n  </data>\r\n  <data name=\"Series_OnGlobalSeriesIndexPropertyChanged_UntitledSeriesFormatString\" xml:space=\"preserve\">\r\n    <value>Series {0}</value>\r\n    <comment>Used to format the string returned by the Title property if a Title is not specified.</comment>\r\n  </data>\r\n  <data name=\"UniqueObservableCollection_InvalidAttemptToInsertADuplicateItem\" xml:space=\"preserve\">\r\n    <value>Invalid attempt to insert a duplicate item.</value>\r\n    <comment>Exception message.</comment>\r\n  </data>\r\n  <data name=\"Series_SeriesHost_SeriesHostPropertyNotNull\" xml:space=\"preserve\">\r\n    <value>A series cannot be added to more than one series host.</value>\r\n    <comment>Exception message.</comment>\r\n  </data>\r\n  <data name=\"EdgePanel_OnEdgePropertyChanged\" xml:space=\"preserve\">\r\n    <value>Attempt to set Edge property to an invalid value.</value>\r\n    <comment>Exception message.</comment>\r\n  </data>\r\n  <data name=\"Chart_AxisLocationChanged_CantBeChangedToAutoWhenHostedInsideOfASeriesHost\" xml:space=\"preserve\">\r\n    <value>Axis location cannot be changed to auto when hosted inside of a series host.</value>\r\n    <comment>Exception message.</comment>\r\n  </data>\r\n  <data name=\"DisplayAxis_GetLength_CannotDetermineTheLengthOfAnAxisWithAnOrientationOfNone\" xml:space=\"preserve\">\r\n    <value>Cannot determine the size of an axis without an orientation.</value>\r\n    <comment>Exception message.</comment>\r\n  </data>\r\n  <data name=\"ResourceDictionaryEnumerator_CantResetEnumeratorResetDispenserInstead\" xml:space=\"preserve\">\r\n    <value>Cannot reset a ResourceDictionaryEnumerator; reset the ResourceDictionaryDispenser instead.</value>\r\n    <comment>Exception message.</comment>\r\n  </data>\r\n  <data name=\"TreeMap_BuildTreeMapTree_TemplateNotSet\" xml:space=\"preserve\">\r\n    <value>Either ItemTemplate must be set or TreeMapItemDefinitionSelector must return a non-null template.</value>\r\n    <comment>Exception thrown when the template for the current item is null.</comment>\r\n  </data>\r\n  <data name=\"TreeMap_CreateChildren_InterpolatorBindingNotSet\" xml:space=\"preserve\">\r\n    <value>The value of PropertyBinding property of an interpolator cannot be null.</value>\r\n    <comment>Exception thrown when the PropertyBinding property of one of the interpolators is null.</comment>\r\n  </data>\r\n  <data name=\"Interpolator_IncludeInRange_DataRangeBindingNotIConvertible\" xml:space=\"preserve\">\r\n    <value>The DataRangeBinding property of the Interpolator must be bound to an IConvertible object.</value>\r\n    <comment>Exception thrown when an interpolator is bound to a value which is not IConvertible.</comment>\r\n  </data>\r\n  <data name=\"TreeMap_Interpolators_SetterNotSupported\" xml:space=\"preserve\">\r\n    <value>Changing the TreeMap's Interpolators Property is not supported; changes to the collection should be made with its .Add/.Remove methods instead.</value>\r\n    <comment>Setter is public to work around a limitation with the XAML editing tools.</comment>\r\n  </data>\r\n  <data name=\"DataPointSeriesDropTarget_set_Content_ContentMustBeAChart\" xml:space=\"preserve\">\r\n    <value>The content property must be set to a Chart object.</value>\r\n    <comment>Exception message.</comment>\r\n  </data>\r\n  <data name=\"DefinitionSeries_EnsureAxes_MissingDependentValueBinding\" xml:space=\"preserve\">\r\n    <value>A SeriesDefinition does not have its DependentValueBinding or DependentValuePath properties set; unable to determine the source for dependent values. Please use either of these properties to identify the data model property corresponding to the dependent values.</value>\r\n    <comment>Exception message.</comment>\r\n  </data>\r\n  <data name=\"DefinitionSeries_EnsureAxes_MissingIndependentValueBinding\" xml:space=\"preserve\">\r\n    <value>A SeriesDefinition does not have its IndependentValueBinding or IndependentValuePath properties set; unable to determine the source for independent values. Please use either of these properties to identify the data model property corresponding to the independent values.</value>\r\n    <comment>Exception message.</comment>\r\n  </data>\r\n  <data name=\"DefinitionSeries_SeriesDefinitions_SetterNotSupported\" xml:space=\"preserve\">\r\n    <value>Changing the SeriesDefinitions property of a DefinitionSeries is not supported; changes to the collection should be made with its .Add/.Remove methods instead.</value>\r\n    <comment>Setter is public to work around a limitation with the XAML editing tools.</comment>\r\n  </data>\r\n  <data name=\"SeriesDefinition_SeriesHost_InvalidParent\" xml:space=\"preserve\">\r\n    <value>A SeriesDefinition instance's SeriesHost property may only be set to an instance of the DefinitionSeries class; other SeriesHost types are not supported.</value>\r\n    <comment>Exception message.</comment>\r\n  </data>\r\n</root>"
  },
  {
    "path": "WpfToolkit/DataVisualization/Range.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// A range of values.\r\n    /// </summary>\r\n    /// <typeparam name=\"T\">The type of the values.</typeparam>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public struct Range<T>\r\n        where T : IComparable\r\n    {\r\n        /// <summary>\r\n        /// A flag that determines whether the range is empty or not.\r\n        /// </summary>\r\n        private bool _hasData;\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether the range is empty or not.\r\n        /// </summary>\r\n        public bool HasData\r\n        {\r\n            get\r\n            {\r\n                return _hasData;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// The maximum value in the range.\r\n        /// </summary>\r\n        private T _maximum;\r\n\r\n        /// <summary>\r\n        /// Gets the maximum value in the range.\r\n        /// </summary>\r\n        public T Maximum\r\n        {\r\n            get\r\n            {\r\n                if (!HasData)\r\n                {\r\n                    throw new InvalidOperationException(Properties.Resources.Range_get_Maximum_CannotReadTheMaximumOfAnEmptyRange);\r\n                }\r\n                return _maximum;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// The minimum value in the range.\r\n        /// </summary>\r\n        private T _minimum;\r\n\r\n        /// <summary>\r\n        /// Gets the minimum value in the range.\r\n        /// </summary>\r\n        public T Minimum\r\n        {\r\n            get\r\n            {\r\n                if (!HasData)\r\n                {\r\n                    throw new InvalidOperationException(Properties.Resources.Range_get_Minimum_CannotReadTheMinimumOfAnEmptyRange);\r\n                }\r\n                return _minimum;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the Range class.\r\n        /// </summary>\r\n        /// <param name=\"minimum\">The minimum value.</param>\r\n        /// <param name=\"maximum\">The maximum value.</param>\r\n        public Range(T minimum, T maximum)\r\n        {\r\n            if (minimum == null)\r\n            {\r\n                throw new ArgumentNullException(\"minimum\");\r\n            }\r\n            if (maximum == null)\r\n            {\r\n                throw new ArgumentNullException(\"maximum\");\r\n            }\r\n\r\n            _hasData = true;\r\n            _minimum = minimum;\r\n            _maximum = maximum;\r\n\r\n            int compareValue = ValueHelper.Compare(minimum, maximum);\r\n            if (compareValue == 1)\r\n            {\r\n                throw new InvalidOperationException(Properties.Resources.Range_ctor_MaximumValueMustBeLargerThanOrEqualToMinimumValue);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Compare two ranges and return a value indicating whether they are\r\n        /// equal.\r\n        /// </summary>\r\n        /// <param name=\"leftRange\">Left-hand side range.</param>\r\n        /// <param name=\"rightRange\">Right-hand side range.</param>\r\n        /// <returns>A value indicating whether the ranges are equal.</returns>\r\n        public static bool operator ==(Range<T> leftRange, Range<T> rightRange)\r\n        {\r\n            if (!leftRange.HasData)\r\n            {\r\n                return !rightRange.HasData;\r\n            }\r\n            if (!rightRange.HasData)\r\n            {\r\n                return !leftRange.HasData;\r\n            }\r\n\r\n            return leftRange.Minimum.Equals(rightRange.Minimum) && leftRange.Maximum.Equals(rightRange.Maximum);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Compare two ranges and return a value indicating whether they are\r\n        /// not equal.\r\n        /// </summary>\r\n        /// <param name=\"leftRange\">Left-hand side range.</param>\r\n        /// <param name=\"rightRange\">Right-hand side range.</param>\r\n        /// <returns>A value indicating whether the ranges are not equal.\r\n        /// </returns>\r\n        public static bool operator !=(Range<T> leftRange, Range<T> rightRange)\r\n        {\r\n            return !(leftRange == rightRange);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Adds a range to the current range.\r\n        /// </summary>\r\n        /// <param name=\"range\">A range to add to the current range.</param>\r\n        /// <returns>A new range that encompasses the instance range and the\r\n        /// range parameter.</returns>\r\n        public Range<T> Add(Range<T> range)\r\n        {\r\n            if (!this.HasData)\r\n            {\r\n                return range;\r\n            }\r\n            else if (!range.HasData)\r\n            {\r\n                return this;\r\n            }\r\n            T minimum = ValueHelper.Compare(this.Minimum, range.Minimum) == -1 ? this.Minimum : range.Minimum;\r\n            T maximum = ValueHelper.Compare(this.Maximum, range.Maximum) == 1 ? this.Maximum : range.Maximum;\r\n            return new Range<T>(minimum, maximum);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Compares the range to another range.\r\n        /// </summary>\r\n        /// <param name=\"range\">A different range.</param>\r\n        /// <returns>A value indicating whether the ranges are equal.</returns>\r\n        public bool Equals(Range<T> range)\r\n        {\r\n            return this == range;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Compares the range to an object.\r\n        /// </summary>\r\n        /// <param name=\"obj\">Another object.</param>\r\n        /// <returns>A value indicating whether the other object is a range,\r\n        /// and if so, whether that range is equal to the instance range.\r\n        /// </returns>\r\n        public override bool Equals(object obj)\r\n        {\r\n            Range<T> range = (Range<T>)obj;\r\n            if (range == null)\r\n            {\r\n                return false;\r\n            }\r\n            return this == range;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a value indicating whether a value is within a range.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value.</param>\r\n        /// <returns>Whether the value is within the range.</returns>\r\n        public bool Contains(T value)\r\n        {\r\n            return ValueHelper.Compare(Minimum, value) <= 0 && ValueHelper.Compare(value, Maximum) <= 0;\r\n        }\r\n\r\n        /////// <summary>\r\n        /////// Returns a new range that contains the value.\r\n        /////// </summary>\r\n        /////// <param name=\"value\">The value to extend the range to.</param>\r\n        /////// <returns>The range which contains the value.</returns>\r\n        ////public Range<T> ExtendTo(T value)\r\n        ////{\r\n        ////    if (!HasData)\r\n        ////    {\r\n        ////        return new Range<T>(value, value);\r\n        ////    }\r\n\r\n        ////    if (ValueHelper.Compare(Minimum, value) > 0)\r\n        ////    {\r\n        ////        return new Range<T>(value, Maximum);\r\n        ////    }\r\n        ////    else if (ValueHelper.Compare(Maximum, value) < 0)\r\n        ////    {\r\n        ////        return new Range<T>(Minimum, value);\r\n        ////    }\r\n\r\n        ////    return this;\r\n        ////}\r\n\r\n        /// <summary>\r\n        /// Returns a value indicating whether two ranges intersect.\r\n        /// </summary>\r\n        /// <param name=\"range\">The range to compare against this range.</param>\r\n        /// <returns>A value indicating whether the ranges intersect.</returns>\r\n        public bool IntersectsWith(Range<T> range)\r\n        {\r\n            if (!this.HasData || !range.HasData)\r\n            {\r\n                return false;\r\n            }\r\n\r\n            Func<Range<T>, Range<T>, bool> rightCollidesWithLeft =\r\n                (leftRange, rightRange) =>\r\n                    (ValueHelper.Compare(rightRange.Minimum, leftRange.Maximum) <= 0 && ValueHelper.Compare(rightRange.Minimum, leftRange.Minimum) >= 0)\r\n                    || (ValueHelper.Compare(leftRange.Minimum, rightRange.Maximum) <= 0 && ValueHelper.Compare(leftRange.Minimum, rightRange.Minimum) >= 0);\r\n\r\n            return rightCollidesWithLeft(this, range) || rightCollidesWithLeft(range, this);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Computes a hash code value.\r\n        /// </summary>\r\n        /// <returns>A hash code value.</returns>\r\n        public override int GetHashCode()\r\n        {\r\n            if (!HasData)\r\n            {\r\n                return 0;\r\n            }\r\n\r\n            int num = 0x5374e861;\r\n            num = (-1521134295 * num) + EqualityComparer<T>.Default.GetHashCode(Minimum);\r\n            return ((-1521134295 * num) + EqualityComparer<T>.Default.GetHashCode(Maximum));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the string representation of the range.\r\n        /// </summary>\r\n        /// <returns>The string representation of the range.</returns>\r\n        public override string ToString()\r\n        {\r\n            if (!this.HasData)\r\n            {\r\n                return Properties.Resources.Range_ToString_NoData;\r\n            }\r\n            else\r\n            {\r\n                return string.Format(CultureInfo.CurrentCulture, Properties.Resources.Range_ToString_Data, this.Minimum, this.Maximum);\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/RangeEnumerableFunctions.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// Collection of functions that manipulate streams of ranges.\r\n    /// </summary>\r\n    internal static class RangeEnumerableExtensions\r\n    {\r\n        /// <summary>\r\n        /// Returns the minimum and maximum values in a stream.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The type of the stream.</typeparam>\r\n        /// <param name=\"that\">The stream.</param>\r\n        /// <returns>The range of values in the stream.</returns>\r\n        public static Range<T> GetRange<T>(this IEnumerable<T> that)\r\n            where T : IComparable\r\n        {\r\n            IEnumerator<T> enumerator = that.GetEnumerator();\r\n            if (!enumerator.MoveNext())\r\n            {\r\n                return new Range<T>();\r\n            }\r\n            T minimum = enumerator.Current;\r\n            T maximum = minimum;\r\n            while (enumerator.MoveNext())\r\n            {\r\n                T current = enumerator.Current;\r\n                if (ValueHelper.Compare(minimum, current) == 1)\r\n                {\r\n                    minimum = current;\r\n                }\r\n                if (ValueHelper.Compare(maximum, current) == -1)\r\n                {\r\n                    maximum = current;\r\n                }\r\n            }\r\n            return new Range<T>(minimum, maximum);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a range encompassing all ranges in a stream.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The type of the minimum and maximum values.\r\n        /// </typeparam>\r\n        /// <param name=\"that\">The stream.</param>\r\n        /// <returns>A range encompassing all ranges in a stream.</returns>\r\n        [System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Design\", \"CA1006:DoNotNestGenericTypesInMemberSignatures\", Justification = \"Nesting necessary to provide method for use with all types of Range<T>.\")]\r\n        public static Range<T> Sum<T>(this IEnumerable<Range<T>> that)\r\n            where T : IComparable\r\n        {\r\n            Range<T> sum = new Range<T>();\r\n            IEnumerator<Range<T>> enumerator = that.GetEnumerator();\r\n            while (enumerator.MoveNext())\r\n            {\r\n                sum = sum.Add(enumerator.Current);\r\n            }\r\n            return sum;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/ReadOnlyObservableCollection.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections.ObjectModel;\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// An observable collection that can only be written to by internal \r\n    /// classes.\r\n    /// </summary>\r\n    /// <typeparam name=\"T\">The type of object in the observable collection.\r\n    /// </typeparam>\r\n    internal class ReadOnlyObservableCollection<T> : NoResetObservableCollection<T>\r\n    {\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether the owner is writing to the \r\n        /// collection.\r\n        /// </summary>\r\n        private bool IsMutating { get; set; }\r\n\r\n        /// <summary>\r\n        /// A method that mutates the collection.\r\n        /// </summary>\r\n        /// <param name=\"action\">The action to mutate the collection.</param>\r\n        public void Mutate(Action<ReadOnlyObservableCollection<T>> action)\r\n        {\r\n            IsMutating = true;\r\n            try\r\n            {\r\n                action(this);\r\n            }\r\n            finally\r\n            {\r\n                IsMutating = false;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes an item from the collection at an index.\r\n        /// </summary>\r\n        /// <param name=\"index\">The index to remove.</param>\r\n        protected override void RemoveItem(int index)\r\n        {\r\n            if (!IsMutating)\r\n            {\r\n                throw new NotSupportedException(Properties.Resources.ReadOnlyObservableCollection_CollectionIsReadOnly);\r\n            }\r\n            else\r\n            {\r\n                base.RemoveItem(index);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Sets an item at a particular location in the collection.\r\n        /// </summary>\r\n        /// <param name=\"index\">The location to set an item.</param>\r\n        /// <param name=\"item\">The item to set.</param>\r\n        protected override void SetItem(int index, T item)\r\n        {\r\n            if (!IsMutating)\r\n            {\r\n                throw new NotSupportedException(Properties.Resources.ReadOnlyObservableCollection_CollectionIsReadOnly);\r\n            }\r\n            else\r\n            {\r\n                base.SetItem(index, item);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Inserts an item in the collection.\r\n        /// </summary>\r\n        /// <param name=\"index\">The index at which to insert the item.</param>\r\n        /// <param name=\"item\">The item to insert.</param>\r\n        protected override void InsertItem(int index, T item)\r\n        {\r\n            if (!IsMutating)\r\n            {\r\n                throw new NotSupportedException(Properties.Resources.ReadOnlyObservableCollection_CollectionIsReadOnly);\r\n            }\r\n            else\r\n            {\r\n                base.InsertItem(index, item);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Clears the items from the collection.\r\n        /// </summary>\r\n        protected override void ClearItems()\r\n        {\r\n            if (!IsMutating)\r\n            {\r\n                throw new NotSupportedException(Properties.Resources.ReadOnlyObservableCollection_CollectionIsReadOnly);\r\n            }\r\n            else\r\n            {\r\n                base.ClearItems();\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/ResourceDictionaryCollection.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.ObjectModel;\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// Represents a collection of ResourceDictionary objects.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public partial class ResourceDictionaryCollection : Collection<ResourceDictionary>\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the ResourceDictionaryCollection class.\r\n        /// </summary>\r\n        public ResourceDictionaryCollection()\r\n        {\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/StoryboardQueue.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Windows.Media.Animation;\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// Represents a storyboard queue that plays storyboards in sequence.\r\n    /// </summary>\r\n    internal class StoryboardQueue\r\n    {\r\n        /// <summary>\r\n        /// A queue of the storyboards.\r\n        /// </summary>\r\n        private Queue<Storyboard> _storyBoards = new Queue<Storyboard>();\r\n\r\n        /// <summary>\r\n        /// Accepts a new storyboard to play in sequence.\r\n        /// </summary>\r\n        /// <param name=\"storyBoard\">The storyboard to play.</param>\r\n        /// <param name=\"completedAction\">An action to execute when the \r\n        /// storyboard completes.</param>\r\n        public void Enqueue(Storyboard storyBoard, EventHandler completedAction)\r\n        {\r\n            storyBoard.Completed +=\r\n                (sender, args) =>\r\n                {\r\n                    if (completedAction != null)\r\n                    {\r\n                        completedAction(sender, args);\r\n                    }\r\n\r\n                    _storyBoards.Dequeue();\r\n                    Dequeue();\r\n                };\r\n\r\n            _storyBoards.Enqueue(storyBoard);\r\n\r\n            if (_storyBoards.Count == 1)\r\n            {\r\n                Dequeue();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes the next storyboard in the queue and plays it.\r\n        /// </summary>\r\n        private void Dequeue()\r\n        {\r\n            if (_storyBoards.Count > 0)\r\n            {\r\n                Storyboard storyboard = _storyBoards.Peek();\r\n                storyboard.Begin();\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/StringFormatConverter.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows.Data;\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// Converts a value to a string using a format string.\r\n    /// </summary>\r\n    public class StringFormatConverter : IValueConverter\r\n    {\r\n        /// <summary>\r\n        /// Converts a value to a string by formatting it.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value to convert.</param>\r\n        /// <param name=\"targetType\">The target type of the conversion.</param>\r\n        /// <param name=\"parameter\">The format string.</param>\r\n        /// <param name=\"culture\">The culture to use for conversion.</param>\r\n        /// <returns>The formatted string.</returns>\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            if (value == null)\r\n            {\r\n                return string.Empty;\r\n            }\r\n\r\n            return string.Format(CultureInfo.CurrentCulture, (parameter as string) ?? \"{0}\", value);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Converts a value from a string to a target type.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value to convert to a string.</param>\r\n        /// <param name=\"targetType\">The target type of the conversion.</param>\r\n        /// <param name=\"parameter\">A parameter used during the conversion\r\n        /// process.</param>\r\n        /// <param name=\"culture\">The culture to use for the conversion.</param>\r\n        /// <returns>The converted object.</returns>\r\n        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)\r\n        {\r\n            throw new NotSupportedException();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Themes/generic.xaml",
    "content": "﻿\r\n<!--\r\n    // (c) Copyright Microsoft Corporation.\r\n    // This source is subject to the Microsoft Public License (Ms-PL).\r\n    // Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n    // All other rights reserved.\r\n-->\r\n\r\n<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n                    xmlns:charting=\"clr-namespace:System.Windows.Controls.DataVisualization.Charting\"\r\n                    xmlns:chartingprimitives=\"clr-namespace:System.Windows.Controls.DataVisualization.Charting.Primitives\"\r\n                    xmlns:datavis=\"clr-namespace:System.Windows.Controls.DataVisualization\">\r\n\r\n    <!--  charting:AreaDataPoint  -->\r\n    <Style TargetType=\"charting:AreaDataPoint\">\r\n        <Setter Property=\"Background\" Value=\"Orange\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"Gray\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"Width\" Value=\"4\" />\r\n        <Setter Property=\"Height\" Value=\"4\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"charting:AreaDataPoint\">\r\n                    <Grid x:Name=\"Root\" Opacity=\"0\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                                       Duration=\"00:00:00.0010000\"\r\n                                                                       Storyboard.TargetName=\"MouseOverHighlight\"\r\n                                                                       Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.24\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Unselected\" />\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                                       Duration=\"00:00:00.0010000\"\r\n                                                                       Storyboard.TargetName=\"SelectionHighlight\"\r\n                                                                       Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.18\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"RevealStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.5\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Shown\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\"\r\n                                                         Storyboard.TargetName=\"Root\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\"\r\n                                                         To=\"1\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Hidden\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\"\r\n                                                         Storyboard.TargetName=\"Root\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\"\r\n                                                         To=\"0\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <ToolTipService.ToolTip>\r\n                            <ContentControl Content=\"{TemplateBinding FormattedDependentValue}\" />\r\n                        </ToolTipService.ToolTip>\r\n                        <Ellipse Fill=\"{TemplateBinding Background}\" Stroke=\"{TemplateBinding BorderBrush}\" />\r\n                        <Ellipse RenderTransformOrigin=\"0.661,0.321\">\r\n                            <Ellipse.Fill>\r\n                                <RadialGradientBrush GradientOrigin=\"0.681,0.308\">\r\n                                    <GradientStop Color=\"#00FFFFFF\" />\r\n                                    <GradientStop Offset=\"1\" Color=\"#FF3D3A3A\" />\r\n                                </RadialGradientBrush>\r\n                            </Ellipse.Fill>\r\n                        </Ellipse>\r\n                        <Ellipse x:Name=\"SelectionHighlight\"\r\n                                 Fill=\"Red\"\r\n                                 Opacity=\"0\" />\r\n                        <Ellipse x:Name=\"MouseOverHighlight\"\r\n                                 Fill=\"White\"\r\n                                 Opacity=\"0\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  charting:AreaSeries  -->\r\n    <Style TargetType=\"charting:AreaSeries\">\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"PathStyle\">\r\n            <Setter.Value>\r\n                <Style TargetType=\"Path\">\r\n                    <Setter Property=\"Opacity\" Value=\"0.6\" />\r\n                </Style>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"charting:AreaSeries\">\r\n                    <Canvas x:Name=\"PlotArea\">\r\n                        <Path Data=\"{TemplateBinding Geometry}\"\r\n                              Fill=\"{TemplateBinding Background}\"\r\n                              Style=\"{TemplateBinding PathStyle}\" />\r\n                    </Canvas>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  charting:AxisLabel  -->\r\n    <Style TargetType=\"charting:AxisLabel\">\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"StringFormat\" Value=\"{}{0}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"charting:AxisLabel\">\r\n                    <TextBlock Text=\"{TemplateBinding FormattedContent}\" />\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  charting:BarDataPoint  -->\r\n    <Style TargetType=\"charting:BarDataPoint\">\r\n        <Setter Property=\"Background\" Value=\"Orange\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"Black\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"charting:BarDataPoint\">\r\n                    <Border x:Name=\"Root\"\r\n                            BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                            BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                            Opacity=\"0\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\"\r\n                                                         Storyboard.TargetName=\"MouseOverHighlight\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\"\r\n                                                         To=\"0.6\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Unselected\" />\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\"\r\n                                                         Storyboard.TargetName=\"SelectionHighlight\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\"\r\n                                                         To=\"0.6\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"RevealStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.5\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Shown\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\"\r\n                                                         Storyboard.TargetName=\"Root\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\"\r\n                                                         To=\"1\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Hidden\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\"\r\n                                                         Storyboard.TargetName=\"Root\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\"\r\n                                                         To=\"0\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid Background=\"{TemplateBinding Background}\">\r\n                            <Rectangle>\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush>\r\n                                        <GradientStop Offset=\"0\" Color=\"#77ffffff\" />\r\n                                        <GradientStop Offset=\"1\" Color=\"#00ffffff\" />\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                            <Border BorderBrush=\"#ccffffff\" BorderThickness=\"1\">\r\n                                <Border BorderBrush=\"#77ffffff\" BorderThickness=\"1\" />\r\n                            </Border>\r\n                            <Rectangle x:Name=\"SelectionHighlight\"\r\n                                       Fill=\"Red\"\r\n                                       Opacity=\"0\" />\r\n                            <Rectangle x:Name=\"MouseOverHighlight\"\r\n                                       Fill=\"White\"\r\n                                       Opacity=\"0\" />\r\n                        </Grid>\r\n                        <ToolTipService.ToolTip>\r\n                            <ContentControl Content=\"{TemplateBinding FormattedDependentValue}\" />\r\n                        </ToolTipService.ToolTip>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  charting:BubbleDataPoint  -->\r\n    <Style TargetType=\"charting:BubbleDataPoint\">\r\n        <Setter Property=\"Background\" Value=\"Orange\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"Black\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"charting:BubbleDataPoint\">\r\n                    <Grid x:Name=\"Root\" Opacity=\"0\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\"\r\n                                                         Storyboard.TargetName=\"MouseOverHighlight\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\"\r\n                                                         To=\"0.6\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Unselected\" />\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\"\r\n                                                         Storyboard.TargetName=\"SelectionHighlight\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\"\r\n                                                         To=\"0.6\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"RevealStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.5\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Shown\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\"\r\n                                                         Storyboard.TargetName=\"Root\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\"\r\n                                                         To=\"1\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Hidden\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\"\r\n                                                         Storyboard.TargetName=\"Root\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\"\r\n                                                         To=\"0\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Ellipse Fill=\"{TemplateBinding Background}\"\r\n                                 Stroke=\"{TemplateBinding BorderBrush}\"\r\n                                 StrokeThickness=\"{TemplateBinding BorderThickness}\" />\r\n                        <Ellipse>\r\n                            <Ellipse.Fill>\r\n                                <LinearGradientBrush>\r\n                                    <GradientStop Offset=\"0\" Color=\"#77ffffff\" />\r\n                                    <GradientStop Offset=\"1\" Color=\"#00ffffff\" />\r\n                                </LinearGradientBrush>\r\n                            </Ellipse.Fill>\r\n                        </Ellipse>\r\n                        <Ellipse x:Name=\"SelectionHighlight\"\r\n                                 Fill=\"Red\"\r\n                                 Opacity=\"0\" />\r\n                        <Ellipse x:Name=\"MouseOverHighlight\"\r\n                                 Fill=\"White\"\r\n                                 Opacity=\"0\" />\r\n                        <ToolTipService.ToolTip>\r\n                            <ContentControl Content=\"{TemplateBinding FormattedDependentValue}\" />\r\n                        </ToolTipService.ToolTip>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  PieChartLabel Style  -->\r\n\r\n    <Style TargetType=\"charting:PieChartLabel\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"charting:PieChartLabel\">\r\n                    <Canvas Name=\"Canvas_PART\">\r\n                        <ContentPresenter Name=\"Content_PART\" />\r\n                    </Canvas>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"ContentTemplate\">\r\n            <Setter.Value>\r\n                <DataTemplate>\r\n                    <StackPanel Background=\"LightGray\">\r\n                        <TextBlock Margin=\"5,0,5,0\"\r\n                                   VerticalAlignment=\"Center\"\r\n                                   Text=\"{Binding RelativeSource={RelativeSource AncestorType={x:Type charting:PieChartLabel}},\r\n                                                  Path=FormattedRatio}\" />\r\n                    </StackPanel>\r\n                </DataTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"LocationLegendStyle\" TargetType=\"Border\">\r\n        <Setter Property=\"Background\" Value=\"White\"/>\r\n        <Setter Property=\"HorizontalAlignment\" Value=\"Right\"/>\r\n        <Setter Property=\"VerticalAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"DarkGray\"/>\r\n        <Setter Property=\"CornerRadius\" Value=\"5\"/>\r\n        <Setter Property=\"Margin\" Value=\"5\"/>\r\n    </Style>\r\n\r\n    <!--  charting:Chart  -->\r\n    <Style TargetType=\"charting:Chart\">\r\n        <Setter Property=\"BorderBrush\" Value=\"Black\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"Padding\" Value=\"10\" />\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"True\" />\r\n        <Setter Property=\"Palette\">\r\n            <Setter.Value>\r\n                <datavis:ResourceDictionaryCollection>\r\n                    <!--  Blue  -->\r\n                    <ResourceDictionary>\r\n                        <RadialGradientBrush x:Key=\"Background\" Center=\"0.075,0.015\" GradientOrigin=\"-0.1,-0.1\" RadiusX=\"1.05\" RadiusY=\"0.9\">\r\n                            <GradientStop Color=\"#FFB9D6F7\" />\r\n                            <GradientStop Offset=\"1\" Color=\"#FF284B70\" />\r\n                        </RadialGradientBrush>\r\n                        <Style x:Key=\"DataPointStyle\" TargetType=\"Control\">\r\n                            <Setter Property=\"Background\" Value=\"{StaticResource Background}\" />\r\n                        </Style>\r\n                        <Style x:Key=\"DataShapeStyle\" TargetType=\"Shape\">\r\n                            <Setter Property=\"Stroke\" Value=\"{StaticResource Background}\" />\r\n                            <Setter Property=\"StrokeThickness\" Value=\"2\" />\r\n                            <Setter Property=\"StrokeMiterLimit\" Value=\"1\" />\r\n                            <Setter Property=\"Fill\" Value=\"{StaticResource Background}\" />\r\n                        </Style>\r\n                    </ResourceDictionary>\r\n                    <!--  Red  -->\r\n                    <ResourceDictionary>\r\n                        <RadialGradientBrush x:Key=\"Background\" Center=\"0.075,0.015\" GradientOrigin=\"-0.1,-0.1\" RadiusX=\"1.05\" RadiusY=\"0.9\">\r\n                            <GradientStop Color=\"#FFFBB7B5\" />\r\n                            <GradientStop Offset=\"1\" Color=\"#FF702828\" />\r\n                        </RadialGradientBrush>\r\n                        <Style x:Key=\"DataPointStyle\" TargetType=\"Control\">\r\n                            <Setter Property=\"Background\" Value=\"{StaticResource Background}\" />\r\n                        </Style>\r\n                        <Style x:Key=\"DataShapeStyle\" TargetType=\"Shape\">\r\n                            <Setter Property=\"Stroke\" Value=\"{StaticResource Background}\" />\r\n                            <Setter Property=\"StrokeThickness\" Value=\"2\" />\r\n                            <Setter Property=\"StrokeMiterLimit\" Value=\"1\" />\r\n                            <Setter Property=\"Fill\" Value=\"{StaticResource Background}\" />\r\n                        </Style>\r\n                    </ResourceDictionary>\r\n                    <!--  Light Green  -->\r\n                    <ResourceDictionary>\r\n                        <RadialGradientBrush x:Key=\"Background\" Center=\"0.075,0.015\" GradientOrigin=\"-0.1,-0.1\" RadiusX=\"1.05\" RadiusY=\"0.9\">\r\n                            <GradientStop Color=\"#FFB8C0AC\" />\r\n                            <GradientStop Offset=\"1\" Color=\"#FF5F7143\" />\r\n                        </RadialGradientBrush>\r\n                        <Style x:Key=\"DataPointStyle\" TargetType=\"Control\">\r\n                            <Setter Property=\"Background\" Value=\"{StaticResource Background}\" />\r\n                        </Style>\r\n                        <Style x:Key=\"DataShapeStyle\" TargetType=\"Shape\">\r\n                            <Setter Property=\"Stroke\" Value=\"{StaticResource Background}\" />\r\n                            <Setter Property=\"StrokeThickness\" Value=\"2\" />\r\n                            <Setter Property=\"StrokeMiterLimit\" Value=\"1\" />\r\n                            <Setter Property=\"Fill\" Value=\"{StaticResource Background}\" />\r\n                        </Style>\r\n                    </ResourceDictionary>\r\n                    <!--  Yellow  -->\r\n                    <ResourceDictionary>\r\n                        <RadialGradientBrush x:Key=\"Background\" Center=\"0.075,0.015\" GradientOrigin=\"-0.1,-0.1\" RadiusX=\"1.05\" RadiusY=\"0.9\">\r\n                            <GradientStop Color=\"#FFFDE79C\" />\r\n                            <GradientStop Offset=\"1\" Color=\"#FFF6BC0C\" />\r\n                        </RadialGradientBrush>\r\n                        <Style x:Key=\"DataPointStyle\" TargetType=\"Control\">\r\n                            <Setter Property=\"Background\" Value=\"{StaticResource Background}\" />\r\n                        </Style>\r\n                        <Style x:Key=\"DataShapeStyle\" TargetType=\"Shape\">\r\n                            <Setter Property=\"Stroke\" Value=\"{StaticResource Background}\" />\r\n                            <Setter Property=\"StrokeThickness\" Value=\"2\" />\r\n                            <Setter Property=\"StrokeMiterLimit\" Value=\"1\" />\r\n                            <Setter Property=\"Fill\" Value=\"{StaticResource Background}\" />\r\n                        </Style>\r\n                    </ResourceDictionary>\r\n                    <!--  Indigo  -->\r\n                    <ResourceDictionary>\r\n                        <RadialGradientBrush x:Key=\"Background\" Center=\"0.075,0.015\" GradientOrigin=\"-0.1,-0.1\" RadiusX=\"1.05\" RadiusY=\"0.9\">\r\n                            <GradientStop Color=\"#FFA9A3BD\" />\r\n                            <GradientStop Offset=\"1\" Color=\"#FF382C6C\" />\r\n                        </RadialGradientBrush>\r\n                        <Style x:Key=\"DataPointStyle\" TargetType=\"Control\">\r\n                            <Setter Property=\"Background\" Value=\"{StaticResource Background}\" />\r\n                        </Style>\r\n                        <Style x:Key=\"DataShapeStyle\" TargetType=\"Shape\">\r\n                            <Setter Property=\"Stroke\" Value=\"{StaticResource Background}\" />\r\n                            <Setter Property=\"StrokeThickness\" Value=\"2\" />\r\n                            <Setter Property=\"StrokeMiterLimit\" Value=\"1\" />\r\n                            <Setter Property=\"Fill\" Value=\"{StaticResource Background}\" />\r\n                        </Style>\r\n                    </ResourceDictionary>\r\n                    <!--  Magenta  -->\r\n                    <ResourceDictionary>\r\n                        <RadialGradientBrush x:Key=\"Background\" Center=\"0.075,0.015\" GradientOrigin=\"-0.1,-0.1\" RadiusX=\"1.05\" RadiusY=\"0.9\">\r\n                            <GradientStop Color=\"#FFB1A1B1\" />\r\n                            <GradientStop Offset=\"1\" Color=\"#FF50224F\" />\r\n                        </RadialGradientBrush>\r\n                        <Style x:Key=\"DataPointStyle\" TargetType=\"Control\">\r\n                            <Setter Property=\"Background\" Value=\"{StaticResource Background}\" />\r\n                        </Style>\r\n                        <Style x:Key=\"DataShapeStyle\" TargetType=\"Shape\">\r\n                            <Setter Property=\"Stroke\" Value=\"{StaticResource Background}\" />\r\n                            <Setter Property=\"StrokeThickness\" Value=\"2\" />\r\n                            <Setter Property=\"StrokeMiterLimit\" Value=\"1\" />\r\n                            <Setter Property=\"Fill\" Value=\"{StaticResource Background}\" />\r\n                        </Style>\r\n                    </ResourceDictionary>\r\n                    <!--  Dark Green  -->\r\n                    <ResourceDictionary>\r\n                        <RadialGradientBrush x:Key=\"Background\" Center=\"0.075,0.015\" GradientOrigin=\"-0.1,-0.1\" RadiusX=\"1.05\" RadiusY=\"0.9\">\r\n                            <GradientStop Color=\"#FF9DC2B3\" />\r\n                            <GradientStop Offset=\"1\" Color=\"#FF1D7554\" />\r\n                        </RadialGradientBrush>\r\n                        <Style x:Key=\"DataPointStyle\" TargetType=\"Control\">\r\n                            <Setter Property=\"Background\" Value=\"{StaticResource Background}\" />\r\n                        </Style>\r\n                        <Style x:Key=\"DataShapeStyle\" TargetType=\"Shape\">\r\n                            <Setter Property=\"Stroke\" Value=\"{StaticResource Background}\" />\r\n                            <Setter Property=\"StrokeThickness\" Value=\"2\" />\r\n                            <Setter Property=\"StrokeMiterLimit\" Value=\"1\" />\r\n                            <Setter Property=\"Fill\" Value=\"{StaticResource Background}\" />\r\n                        </Style>\r\n                    </ResourceDictionary>\r\n                    <!--  Gray Shade  -->\r\n                    <ResourceDictionary>\r\n                        <RadialGradientBrush x:Key=\"Background\" Center=\"0.075,0.015\" GradientOrigin=\"-0.1,-0.1\" RadiusX=\"1.05\" RadiusY=\"0.9\">\r\n                            <GradientStop Color=\"#FFB5B5B5\" />\r\n                            <GradientStop Offset=\"1\" Color=\"#FF4C4C4C\" />\r\n                        </RadialGradientBrush>\r\n                        <Style x:Key=\"DataPointStyle\" TargetType=\"Control\">\r\n                            <Setter Property=\"Background\" Value=\"{StaticResource Background}\" />\r\n                        </Style>\r\n                        <Style x:Key=\"DataShapeStyle\" TargetType=\"Shape\">\r\n                            <Setter Property=\"Stroke\" Value=\"{StaticResource Background}\" />\r\n                            <Setter Property=\"StrokeThickness\" Value=\"2\" />\r\n                            <Setter Property=\"StrokeMiterLimit\" Value=\"1\" />\r\n                            <Setter Property=\"Fill\" Value=\"{StaticResource Background}\" />\r\n                        </Style>\r\n                    </ResourceDictionary>\r\n                    <!--  Blue  -->\r\n                    <ResourceDictionary>\r\n                        <RadialGradientBrush x:Key=\"Background\" Center=\"0.075,0.015\" GradientOrigin=\"-0.1,-0.1\" RadiusX=\"1.05\" RadiusY=\"0.9\">\r\n                            <GradientStop Color=\"#FF98C1DC\" />\r\n                            <GradientStop Offset=\"1\" Color=\"#FF0271AE\" />\r\n                        </RadialGradientBrush>\r\n                        <Style x:Key=\"DataPointStyle\" TargetType=\"Control\">\r\n                            <Setter Property=\"Background\" Value=\"{StaticResource Background}\" />\r\n                        </Style>\r\n                        <Style x:Key=\"DataShapeStyle\" TargetType=\"Shape\">\r\n                            <Setter Property=\"Stroke\" Value=\"{StaticResource Background}\" />\r\n                            <Setter Property=\"StrokeThickness\" Value=\"2\" />\r\n                            <Setter Property=\"StrokeMiterLimit\" Value=\"1\" />\r\n                            <Setter Property=\"Fill\" Value=\"{StaticResource Background}\" />\r\n                        </Style>\r\n                    </ResourceDictionary>\r\n                    <!--  Brown  -->\r\n                    <ResourceDictionary>\r\n                        <RadialGradientBrush x:Key=\"Background\" Center=\"0.075,0.015\" GradientOrigin=\"-0.1,-0.1\" RadiusX=\"1.05\" RadiusY=\"0.9\">\r\n                            <GradientStop Color=\"#FFC1C0AE\" />\r\n                            <GradientStop Offset=\"1\" Color=\"#FF706E41\" />\r\n                        </RadialGradientBrush>\r\n                        <Style x:Key=\"DataPointStyle\" TargetType=\"Control\">\r\n                            <Setter Property=\"Background\" Value=\"{StaticResource Background}\" />\r\n                        </Style>\r\n                        <Style x:Key=\"DataShapeStyle\" TargetType=\"Shape\">\r\n                            <Setter Property=\"Stroke\" Value=\"{StaticResource Background}\" />\r\n                            <Setter Property=\"StrokeThickness\" Value=\"2\" />\r\n                            <Setter Property=\"StrokeMiterLimit\" Value=\"1\" />\r\n                            <Setter Property=\"Fill\" Value=\"{StaticResource Background}\" />\r\n                        </Style>\r\n                    </ResourceDictionary>\r\n                    <!--  Cyan  -->\r\n                    <ResourceDictionary>\r\n                        <RadialGradientBrush x:Key=\"Background\" Center=\"0.075,0.015\" GradientOrigin=\"-0.1,-0.1\" RadiusX=\"1.05\" RadiusY=\"0.9\">\r\n                            <GradientStop Color=\"#FFADBDC0\" />\r\n                            <GradientStop Offset=\"1\" Color=\"#FF446A73\" />\r\n                        </RadialGradientBrush>\r\n                        <Style x:Key=\"DataPointStyle\" TargetType=\"Control\">\r\n                            <Setter Property=\"Background\" Value=\"{StaticResource Background}\" />\r\n                        </Style>\r\n                        <Style x:Key=\"DataShapeStyle\" TargetType=\"Shape\">\r\n                            <Setter Property=\"Stroke\" Value=\"{StaticResource Background}\" />\r\n                            <Setter Property=\"StrokeThickness\" Value=\"2\" />\r\n                            <Setter Property=\"StrokeMiterLimit\" Value=\"1\" />\r\n                            <Setter Property=\"Fill\" Value=\"{StaticResource Background}\" />\r\n                        </Style>\r\n                    </ResourceDictionary>\r\n                    <!--  Special Blue  -->\r\n                    <ResourceDictionary>\r\n                        <RadialGradientBrush x:Key=\"Background\" Center=\"0.075,0.015\" GradientOrigin=\"-0.1,-0.1\" RadiusX=\"1.05\" RadiusY=\"0.9\">\r\n                            <GradientStop Color=\"#FF2F8CE2\" />\r\n                            <GradientStop Offset=\"1\" Color=\"#FF0C3E69\" />\r\n                        </RadialGradientBrush>\r\n                        <Style x:Key=\"DataPointStyle\" TargetType=\"Control\">\r\n                            <Setter Property=\"Background\" Value=\"{StaticResource Background}\" />\r\n                        </Style>\r\n                        <Style x:Key=\"DataShapeStyle\" TargetType=\"Shape\">\r\n                            <Setter Property=\"Stroke\" Value=\"{StaticResource Background}\" />\r\n                            <Setter Property=\"StrokeThickness\" Value=\"2\" />\r\n                            <Setter Property=\"StrokeMiterLimit\" Value=\"1\" />\r\n                            <Setter Property=\"Fill\" Value=\"{StaticResource Background}\" />\r\n                        </Style>\r\n                    </ResourceDictionary>\r\n                    <!--  Gray Shade 2  -->\r\n                    <ResourceDictionary>\r\n                        <RadialGradientBrush x:Key=\"Background\" Center=\"0.075,0.015\" GradientOrigin=\"-0.1,-0.1\" RadiusX=\"1.05\" RadiusY=\"0.9\">\r\n                            <GradientStop Color=\"#FFDCDCDC\" />\r\n                            <GradientStop Offset=\"1\" Color=\"#FF757575\" />\r\n                        </RadialGradientBrush>\r\n                        <Style x:Key=\"DataPointStyle\" TargetType=\"Control\">\r\n                            <Setter Property=\"Background\" Value=\"{StaticResource Background}\" />\r\n                        </Style>\r\n                        <Style x:Key=\"DataShapeStyle\" TargetType=\"Shape\">\r\n                            <Setter Property=\"Stroke\" Value=\"{StaticResource Background}\" />\r\n                            <Setter Property=\"StrokeThickness\" Value=\"2\" />\r\n                            <Setter Property=\"StrokeMiterLimit\" Value=\"1\" />\r\n                            <Setter Property=\"Fill\" Value=\"{StaticResource Background}\" />\r\n                        </Style>\r\n                    </ResourceDictionary>\r\n                    <!--  Gray Shade 3  -->\r\n                    <ResourceDictionary>\r\n                        <RadialGradientBrush x:Key=\"Background\" Center=\"0.075,0.015\" GradientOrigin=\"-0.1,-0.1\" RadiusX=\"1.05\" RadiusY=\"0.9\">\r\n                            <GradientStop Color=\"#FFF4F4F4\" />\r\n                            <GradientStop Offset=\"1\" Color=\"#FFB7B7B7\" />\r\n                        </RadialGradientBrush>\r\n                        <Style x:Key=\"DataPointStyle\" TargetType=\"Control\">\r\n                            <Setter Property=\"Background\" Value=\"{StaticResource Background}\" />\r\n                        </Style>\r\n                        <Style x:Key=\"DataShapeStyle\" TargetType=\"Shape\">\r\n                            <Setter Property=\"Stroke\" Value=\"{StaticResource Background}\" />\r\n                            <Setter Property=\"StrokeThickness\" Value=\"2\" />\r\n                            <Setter Property=\"StrokeMiterLimit\" Value=\"1\" />\r\n                            <Setter Property=\"Fill\" Value=\"{StaticResource Background}\" />\r\n                        </Style>\r\n                    </ResourceDictionary>\r\n                    <!--  Gray Shade 4  -->\r\n                    <ResourceDictionary>\r\n                        <RadialGradientBrush x:Key=\"Background\" Center=\"0.075,0.015\" GradientOrigin=\"-0.1,-0.1\" RadiusX=\"1.05\" RadiusY=\"0.9\">\r\n                            <GradientStop Color=\"#FFF4F4F4\" />\r\n                            <GradientStop Offset=\"1\" Color=\"#FFA3A3A3\" />\r\n                        </RadialGradientBrush>\r\n                        <Style x:Key=\"DataPointStyle\" TargetType=\"Control\">\r\n                            <Setter Property=\"Background\" Value=\"{StaticResource Background}\" />\r\n                        </Style>\r\n                        <Style x:Key=\"DataShapeStyle\" TargetType=\"Shape\">\r\n                            <Setter Property=\"Stroke\" Value=\"{StaticResource Background}\" />\r\n                            <Setter Property=\"StrokeThickness\" Value=\"2\" />\r\n                            <Setter Property=\"StrokeMiterLimit\" Value=\"1\" />\r\n                            <Setter Property=\"Fill\" Value=\"{StaticResource Background}\" />\r\n                        </Style>\r\n                    </ResourceDictionary>\r\n                </datavis:ResourceDictionaryCollection>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"TitleStyle\">\r\n            <Setter.Value>\r\n                <Style TargetType=\"datavis:Title\">\r\n                    <Setter Property=\"FontSize\" Value=\"16\" />\r\n                    <Setter Property=\"HorizontalAlignment\" Value=\"Center\" />\r\n                    <Setter Property=\"Margin\" Value=\"0,10,0,10\" />\r\n                </Style>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"LegendStyle\">\r\n            <Setter.Value>\r\n                <Style TargetType=\"datavis:Legend\">\r\n                    <Setter Property=\"Margin\" Value=\"15,0,15,0\" />\r\n                    <Setter Property=\"VerticalAlignment\" Value=\"Center\" />\r\n                    <Setter Property=\"BorderBrush\" Value=\"#FFDBDBDB\" />\r\n                    <Setter Property=\"Background\">\r\n                        <Setter.Value>\r\n                            <LinearGradientBrush StartPoint=\"0.558,0.995\" EndPoint=\"0.442,0.005\">\r\n                                <GradientStop Color=\"#FFDBDBDB\" />\r\n                                <GradientStop Offset=\"1\" Color=\"#FFFFFFFF\" />\r\n                            </LinearGradientBrush>\r\n                        </Setter.Value>\r\n                    </Setter>\r\n                </Style>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"ChartAreaStyle\">\r\n            <Setter.Value>\r\n                <Style TargetType=\"Panel\">\r\n                    <Setter Property=\"MinWidth\" Value=\"100\" />\r\n                    <Setter Property=\"MinHeight\" Value=\"75\" />\r\n                </Style>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"PlotAreaStyle\">\r\n            <Setter.Value>\r\n                <Style TargetType=\"Grid\">\r\n                    <Setter Property=\"Background\">\r\n                        <Setter.Value>\r\n                            <LinearGradientBrush StartPoint=\"0.459,1.296\" EndPoint=\"0.457,0.296\">\r\n                                <GradientStop Color=\"#FFCBCBCB\" />\r\n                                <GradientStop Offset=\"1\" Color=\"#FFFFFFFF\" />\r\n                            </LinearGradientBrush>\r\n                        </Setter.Value>\r\n                    </Setter>\r\n                </Style>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"charting:Chart\">\r\n                    <Border Background=\"{TemplateBinding Background}\"\r\n                            BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                            BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                            Padding=\"{TemplateBinding Padding}\">\r\n                        <Grid>\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\" />\r\n                                <RowDefinition Height=\"*\" />\r\n                            </Grid.RowDefinitions>\r\n\r\n                            <datavis:Title Content=\"{TemplateBinding Title}\" Style=\"{TemplateBinding TitleStyle}\" />\r\n\r\n                            <!--  Use a nested Grid to avoid possible clipping behavior resulting from ColumnSpan+Width=Auto  -->\r\n                            <Grid Grid.Row=\"1\" Margin=\"0,15,0,15\">\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"*\" />\r\n                                    <ColumnDefinition Width=\"Auto\" />\r\n                                </Grid.ColumnDefinitions>\r\n\r\n                                <datavis:Legend x:Name=\"Legend\"\r\n                                                Grid.Column=\"1\"\r\n                                                Header=\"{TemplateBinding LegendTitle}\"\r\n                                                Style=\"{TemplateBinding LegendStyle}\" />\r\n\r\n                                <chartingprimitives:EdgePanel x:Name=\"ChartArea\" Style=\"{TemplateBinding ChartAreaStyle}\">\r\n                                    <Grid x:Name=\"PlotArea\"\r\n                                          Canvas.ZIndex=\"-1\"\r\n                                          Style=\"{TemplateBinding PlotAreaStyle}\" />\r\n                                    <Border BorderBrush=\"#FF919191\"\r\n                                            BorderThickness=\"1\"\r\n                                            Canvas.ZIndex=\"10\" />\r\n\r\n                                    <!--  a location crosshair  -->\r\n                                    <Grid Name=\"PART_CrosshairContainer\" Visibility=\"{TemplateBinding CrosshairVisibility}\" Background=\"Transparent\" Canvas.ZIndex=\"1\">\r\n                                        <Grid Name=\"PART_Crosshair\">\r\n                                            <Line Name=\"Vertical\" Stroke=\"Black\" X1=\"{Binding Path=X}\" X2=\"{Binding Path=X}\" Y1=\"0\" Y2=\"{Binding ActualHeight, RelativeSource={RelativeSource Self}}\" />\r\n                                            <Line Name=\"Horizontal\" Stroke=\"Black\" X1=\"0\" X2=\"{Binding ActualWidth, RelativeSource={RelativeSource Self}}\" Y1=\"{Binding Path=Y}\" Y2=\"{Binding Path=Y}\" />\r\n                                        </Grid>\r\n                                    </Grid>\r\n\r\n                                    <!-- a location 'legend' -->\r\n                                    <Border IsHitTestVisible=\"False\" Canvas.ZIndex=\"2\" Name=\"PART_LocationIndicator\" Visibility=\"Collapsed\" Style=\"{StaticResource LocationLegendStyle}\">\r\n                                        <StackPanel IsHitTestVisible=\"False\" Orientation=\"Horizontal\" Margin=\"5\">\r\n                                            <TextBlock IsHitTestVisible=\"False\" Text=\"Location: \"/>\r\n                                            <TextBlock IsHitTestVisible=\"False\" Text=\"{Binding Path=Key}\"/>\r\n                                            <TextBlock IsHitTestVisible=\"False\" Text=\", \"/>\r\n                                            <TextBlock IsHitTestVisible=\"False\" Text=\"{Binding Path=Value}\"/>\r\n                                        </StackPanel>\r\n                                    </Border>\r\n                                    \r\n                                    <Canvas x:Name=\"SelectionArea\" Background=\"Transparent\" />\r\n                                    <charting:PieChartLabelArea x:Name=\"LabelArea_PART\"\r\n                                                                Margin=\"10\"\r\n                                                                Canvas.ZIndex=\"11\"\r\n                                                                SnapsToDevicePixels=\"True\" />\r\n\r\n                                </chartingprimitives:EdgePanel>\r\n                            </Grid>\r\n                        </Grid>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  charting:CandlestickDataPoint  -->\r\n    <Style TargetType=\"charting:CandlestickDataPoint\">\r\n        <Setter Property=\"Background\" Value=\"Orange\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"Black\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"charting:CandlestickDataPoint\">\r\n                    <Border x:Name=\"Root\"\r\n                            BorderBrush=\"{x:Null}\"\r\n                            BorderThickness=\"0\"\r\n                            Opacity=\"1\"\r\n                            RenderTransformOrigin=\"0.5,0.5\">\r\n                        <!--  Removed the VSM stuff for brevity  -->\r\n                        <Grid>\r\n                            <Grid x:Name=\"PART_Shadow\">\r\n                                <Rectangle Width=\"1\" Fill=\"Black\" />\r\n                            </Grid>\r\n                            <Grid x:Name=\"PART_Body\"\r\n                                  Margin=\"0,5,0,5\"\r\n                                  Background=\"{TemplateBinding Background}\">\r\n                                <Rectangle Fill=\"{TemplateBinding Background}\" />\r\n                                <Rectangle>\r\n                                    <Rectangle.Fill>\r\n                                        <LinearGradientBrush StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n                                            <GradientStop Color=\"#64686868\" />\r\n                                            <GradientStop Offset=\"0.996\" Color=\"#FF4D4C4C\" />\r\n                                        </LinearGradientBrush>\r\n                                    </Rectangle.Fill>\r\n                                </Rectangle>\r\n                                <Rectangle Margin=\"19,19,17,17\"\r\n                                           Opacity=\"0.245\"\r\n                                           RenderTransformOrigin=\"0.5,0.5\">\r\n                                    <Rectangle.Fill>\r\n                                        <LinearGradientBrush StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n                                            <GradientStop Color=\"#FF919191\" />\r\n                                            <GradientStop Offset=\"1\" Color=\"#FFFFFFFF\" />\r\n                                        </LinearGradientBrush>\r\n                                    </Rectangle.Fill>\r\n                                    <Rectangle.RenderTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform />\r\n                                            <SkewTransform />\r\n                                            <RotateTransform />\r\n                                            <TranslateTransform X=\"0.5\" Y=\"0.5\" />\r\n                                        </TransformGroup>\r\n                                    </Rectangle.RenderTransform>\r\n                                </Rectangle>\r\n                                <Rectangle x:Name=\"MouseOverHighlight\"\r\n                                           Fill=\"#FF9B1C1C\"\r\n                                           Opacity=\"0\"\r\n                                           Stroke=\"#FF000000\" />\r\n                                <Rectangle x:Name=\"SelectionHighlight\"\r\n                                           Fill=\"#3EF0F0F0\"\r\n                                           Opacity=\"0\" />\r\n                            </Grid>\r\n                        </Grid>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  charting:ColumnDataPoint  -->\r\n    <Style TargetType=\"charting:ColumnDataPoint\">\r\n        <Setter Property=\"Background\" Value=\"Orange\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"Black\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"charting:ColumnDataPoint\">\r\n                    <Border x:Name=\"Root\"\r\n                            BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                            BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                            Opacity=\"0\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\"\r\n                                                         Storyboard.TargetName=\"MouseOverHighlight\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\"\r\n                                                         To=\"0.6\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Unselected\" />\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\"\r\n                                                         Storyboard.TargetName=\"SelectionHighlight\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\"\r\n                                                         To=\"0.6\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"RevealStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.5\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Shown\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\"\r\n                                                         Storyboard.TargetName=\"Root\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\"\r\n                                                         To=\"1\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Hidden\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\"\r\n                                                         Storyboard.TargetName=\"Root\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\"\r\n                                                         To=\"0\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid Background=\"{TemplateBinding Background}\">\r\n                            <Rectangle>\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush>\r\n                                        <GradientStop Offset=\"0\" Color=\"#77ffffff\" />\r\n                                        <GradientStop Offset=\"1\" Color=\"#00ffffff\" />\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                            <Border BorderBrush=\"#ccffffff\" BorderThickness=\"1\">\r\n                                <Border BorderBrush=\"#77ffffff\" BorderThickness=\"1\" />\r\n                            </Border>\r\n                            <Rectangle x:Name=\"SelectionHighlight\"\r\n                                       Fill=\"Red\"\r\n                                       Opacity=\"0\" />\r\n                            <Rectangle x:Name=\"MouseOverHighlight\"\r\n                                       Fill=\"White\"\r\n                                       Opacity=\"0\" />\r\n                        </Grid>\r\n                        <ToolTipService.ToolTip>\r\n                            <ContentControl Content=\"{TemplateBinding FormattedDependentValue}\" />\r\n                        </ToolTipService.ToolTip>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  charting:DataPointSeries  -->\r\n    <Style TargetType=\"charting:DataPointSeries\">\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"charting:DataPointSeries\">\r\n                    <Canvas x:Name=\"PlotArea\" />\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  charting:DateTimeAxisLabel  -->\r\n    <Style TargetType=\"charting:DateTimeAxisLabel\">\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"YearsIntervalStringFormat\" Value=\"{}{0:yyyy}\" />\r\n        <Setter Property=\"MonthsIntervalStringFormat\" Value=\"{}{0:d}\" />\r\n        <Setter Property=\"WeeksIntervalStringFormat\" Value=\"{}{0:d}\" />\r\n        <Setter Property=\"DaysIntervalStringFormat\" Value=\"{}{0:d}\" />\r\n        <Setter Property=\"HoursIntervalStringFormat\" Value=\"{}{0:t}\" />\r\n        <Setter Property=\"MinutesIntervalStringFormat\" Value=\"{}{0:t}\" />\r\n        <Setter Property=\"SecondsIntervalStringFormat\" Value=\"{}{0:T}\" />\r\n        <Setter Property=\"MillisecondsIntervalStringFormat\" Value=\"{}{0:mm:ss.fff}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"charting:DateTimeAxisLabel\">\r\n                    <TextBlock Text=\"{TemplateBinding FormattedContent}\" />\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  charting:DefinitionSeries  -->\r\n    <Style TargetType=\"charting:DefinitionSeries\">\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"charting:DefinitionSeries\">\r\n                    <Grid x:Name=\"SeriesArea\" Background=\"{TemplateBinding Background}\">\r\n                        <chartingprimitives:DelegatingListBox x:Name=\"ItemContainer\"\r\n                                                              Background=\"Transparent\"\r\n                                                              BorderThickness=\"0\">\r\n                            <chartingprimitives:DelegatingListBox.ItemsPanel>\r\n                                <ItemsPanelTemplate>\r\n                                    <Canvas />\r\n                                </ItemsPanelTemplate>\r\n                            </chartingprimitives:DelegatingListBox.ItemsPanel>\r\n                            <chartingprimitives:DelegatingListBox.ItemContainerStyle>\r\n                                <Style TargetType=\"ListBoxItem\">\r\n                                    <Setter Property=\"Template\">\r\n                                        <Setter.Value>\r\n                                            <ControlTemplate TargetType=\"ListBoxItem\">\r\n                                                <ContentPresenter Content=\"{TemplateBinding Content}\" />\r\n                                            </ControlTemplate>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                </Style>\r\n                            </chartingprimitives:DelegatingListBox.ItemContainerStyle>\r\n                        </chartingprimitives:DelegatingListBox>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  charting:DisplayAxis  -->\r\n    <Style TargetType=\"charting:DisplayAxis\">\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"TitleStyle\">\r\n            <Setter.Value>\r\n                <Style TargetType=\"datavis:Title\">\r\n                    <Setter Property=\"FontStyle\" Value=\"Italic\" />\r\n                </Style>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"MajorTickMarkStyle\">\r\n            <Setter.Value>\r\n                <Style TargetType=\"Line\">\r\n                    <Setter Property=\"Stroke\" Value=\"Black\" />\r\n                    <Setter Property=\"X2\" Value=\"4\" />\r\n                    <Setter Property=\"Y2\" Value=\"4\" />\r\n                </Style>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"GridLineStyle\">\r\n            <Setter.Value>\r\n                <Style TargetType=\"Line\">\r\n                    <Setter Property=\"Stroke\" Value=\"Gray\" />\r\n                </Style>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"charting:DisplayAxis\">\r\n                    <Grid x:Name=\"AxisGrid\" Background=\"{TemplateBinding Background}\">\r\n                        <datavis:Title x:Name=\"AxisTitle\" Style=\"{TemplateBinding TitleStyle}\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  charting:LegendItem  -->\r\n    <Style TargetType=\"charting:LegendItem\">\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"charting:LegendItem\">\r\n                    <Border Background=\"{TemplateBinding Background}\"\r\n                            BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                            BorderThickness=\"{TemplateBinding BorderThickness}\">\r\n                        <StackPanel Orientation=\"Horizontal\">\r\n                            <Rectangle Width=\"8\"\r\n                                       Height=\"8\"\r\n                                       Margin=\"0,0,3,0\"\r\n                                       Fill=\"{Binding Background}\"\r\n                                       Stroke=\"{Binding BorderBrush}\"\r\n                                       StrokeThickness=\"1\" />\r\n                            <datavis:Title Content=\"{TemplateBinding Content}\" />\r\n                        </StackPanel>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  charting:LineDataPoint  -->\r\n    <Style TargetType=\"charting:LineDataPoint\">\r\n        <Setter Property=\"Background\" Value=\"Orange\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"Gray\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"Width\" Value=\"8\" />\r\n        <Setter Property=\"Height\" Value=\"8\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"charting:LineDataPoint\">\r\n                    <Grid x:Name=\"Root\" Opacity=\"0\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                                       Duration=\"00:00:00.0010000\"\r\n                                                                       Storyboard.TargetName=\"MouseOverHighlight\"\r\n                                                                       Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.24\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Unselected\" />\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                                       Duration=\"00:00:00.0010000\"\r\n                                                                       Storyboard.TargetName=\"SelectionHighlight\"\r\n                                                                       Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.18\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"RevealStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.5\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Shown\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\"\r\n                                                         Storyboard.TargetName=\"Root\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\"\r\n                                                         To=\"1\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Hidden\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\"\r\n                                                         Storyboard.TargetName=\"Root\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\"\r\n                                                         To=\"0\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <ToolTipService.ToolTip>\r\n                            <ContentControl Content=\"{TemplateBinding FormattedDependentValue}\" />\r\n                        </ToolTipService.ToolTip>\r\n                        <Ellipse Fill=\"{TemplateBinding Background}\" Stroke=\"{TemplateBinding BorderBrush}\" />\r\n                        <Ellipse RenderTransformOrigin=\"0.661,0.321\">\r\n                            <Ellipse.Fill>\r\n                                <RadialGradientBrush GradientOrigin=\"0.681,0.308\">\r\n                                    <GradientStop Color=\"#00FFFFFF\" />\r\n                                    <GradientStop Offset=\"1\" Color=\"#FF3D3A3A\" />\r\n                                </RadialGradientBrush>\r\n                            </Ellipse.Fill>\r\n                        </Ellipse>\r\n                        <Ellipse x:Name=\"SelectionHighlight\"\r\n                                 Fill=\"Red\"\r\n                                 Opacity=\"0\" />\r\n                        <Ellipse x:Name=\"MouseOverHighlight\"\r\n                                 Fill=\"White\"\r\n                                 Opacity=\"0\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  charting:LineSeries  -->\r\n    <Style TargetType=\"charting:LineSeries\">\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"PolylineStyle\">\r\n            <Setter.Value>\r\n                <Style TargetType=\"Polyline\">\r\n                    <Setter Property=\"StrokeThickness\" Value=\"2\" />\r\n                    <Setter Property=\"StrokeMiterLimit\" Value=\"1\" />\r\n                </Style>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"charting:LineSeries\">\r\n                    <Canvas x:Name=\"PlotArea\">\r\n                        <Polyline Points=\"{TemplateBinding Points}\"\r\n                                  Stroke=\"{TemplateBinding Background}\"\r\n                                  Style=\"{TemplateBinding PolylineStyle}\" />\r\n                    </Canvas>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  charting:SplineSeries  -->\r\n    <Style TargetType=\"charting:SplineSeries\">\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"PathStyle\">\r\n            <Setter.Value>\r\n                <Style TargetType=\"Path\">\r\n                    <Setter Property=\"StrokeThickness\" Value=\"2\" />\r\n                    <Setter Property=\"StrokeMiterLimit\" Value=\"1\" />\r\n                </Style>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"charting:SplineSeries\">\r\n                    <Canvas x:Name=\"PlotArea\">\r\n                        <Path Data=\"{TemplateBinding SplinePoints}\"\r\n                              Stroke=\"{TemplateBinding Background}\"\r\n                              Style=\"{TemplateBinding PathStyle}\" />\r\n                        <Polyline Points=\"{TemplateBinding Points}\" />\r\n                    </Canvas>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  charting:NumericAxisLabel  -->\r\n    <Style TargetType=\"charting:NumericAxisLabel\">\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"StringFormat\" Value=\"{}{0:0.##}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"charting:NumericAxisLabel\">\r\n                    <TextBlock Text=\"{TemplateBinding FormattedContent}\" />\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  charting:PieDataPoint  -->\r\n    <Style TargetType=\"charting:PieDataPoint\">\r\n        <Setter Property=\"Background\" Value=\"Orange\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"White\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"RatioStringFormat\" Value=\"{}{0:p2}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"charting:PieDataPoint\">\r\n                    <Grid x:Name=\"Root\" Opacity=\"0\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\"\r\n                                                         Storyboard.TargetName=\"MouseOverHighlight\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\"\r\n                                                         To=\"0.6\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Unselected\" />\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\"\r\n                                                         Storyboard.TargetName=\"SelectionHighlight\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\"\r\n                                                         To=\"0.6\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"RevealStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.5\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Shown\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\"\r\n                                                         Storyboard.TargetName=\"Root\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\"\r\n                                                         To=\"1\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Hidden\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\"\r\n                                                         Storyboard.TargetName=\"Root\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\"\r\n                                                         To=\"0\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Path x:Name=\"Slice\"\r\n                              Data=\"{TemplateBinding Geometry}\"\r\n                              Fill=\"{TemplateBinding Background}\"\r\n                              Stroke=\"{TemplateBinding BorderBrush}\"\r\n                              StrokeMiterLimit=\"1\">\r\n                            <ToolTipService.ToolTip>\r\n                                <StackPanel>\r\n                                    <ContentControl Content=\"{TemplateBinding FormattedDependentValue}\" />\r\n                                    <ContentControl Content=\"{TemplateBinding FormattedRatio}\" />\r\n                                </StackPanel>\r\n                            </ToolTipService.ToolTip>\r\n                        </Path>\r\n                        <Path x:Name=\"SelectionHighlight\"\r\n                              Data=\"{TemplateBinding GeometrySelection}\"\r\n                              Fill=\"Red\"\r\n                              IsHitTestVisible=\"False\"\r\n                              Opacity=\"0\"\r\n                              StrokeMiterLimit=\"1\" />\r\n                        <Path x:Name=\"MouseOverHighlight\"\r\n                              Data=\"{TemplateBinding GeometryHighlight}\"\r\n                              Fill=\"White\"\r\n                              IsHitTestVisible=\"False\"\r\n                              Opacity=\"0\"\r\n                              StrokeMiterLimit=\"1\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  charting:PieSeries  -->\r\n    <Style TargetType=\"charting:PieSeries\">\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"Margin\" Value=\"10,10,10,10\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"charting:PieSeries\">\r\n                    <Canvas x:Name=\"PlotArea\" />\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  charting:RangeAxis  -->\r\n    <Style TargetType=\"charting:RangeAxis\">\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"TitleStyle\">\r\n            <Setter.Value>\r\n                <Style TargetType=\"datavis:Title\">\r\n                    <Setter Property=\"FontStyle\" Value=\"Italic\" />\r\n                </Style>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"MajorTickMarkStyle\">\r\n            <Setter.Value>\r\n                <Style TargetType=\"Line\">\r\n                    <Setter Property=\"Stroke\" Value=\"Black\" />\r\n                    <Setter Property=\"X2\" Value=\"4\" />\r\n                    <Setter Property=\"Y2\" Value=\"4\" />\r\n                </Style>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"MinorTickMarkStyle\">\r\n            <Setter.Value>\r\n                <Style TargetType=\"Line\">\r\n                    <Setter Property=\"Stroke\" Value=\"Gray\" />\r\n                    <Setter Property=\"X2\" Value=\"2\" />\r\n                    <Setter Property=\"Y2\" Value=\"2\" />\r\n                </Style>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"GridLineStyle\">\r\n            <Setter.Value>\r\n                <Style TargetType=\"Line\">\r\n                    <Setter Property=\"Stroke\" Value=\"Gray\" />\r\n                </Style>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"charting:RangeAxis\">\r\n                    <Grid x:Name=\"AxisGrid\" Background=\"{TemplateBinding Background}\">\r\n                        <datavis:Title x:Name=\"AxisTitle\" Style=\"{TemplateBinding TitleStyle}\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  charting:ScatterDataPoint  -->\r\n    <Style TargetType=\"charting:ScatterDataPoint\">\r\n        <Setter Property=\"Background\" Value=\"Orange\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"#FF686868\" />\r\n        <Setter Property=\"Width\" Value=\"8\" />\r\n        <Setter Property=\"Height\" Value=\"8\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"charting:ScatterDataPoint\">\r\n                    <Grid x:Name=\"Root\" Opacity=\"0\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                                       Duration=\"00:00:00.0010000\"\r\n                                                                       Storyboard.TargetName=\"MouseOverHighlight\"\r\n                                                                       Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.3\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Unselected\" />\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                                       Duration=\"00:00:00.0010000\"\r\n                                                                       Storyboard.TargetName=\"SelectionHighlight\"\r\n                                                                       Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.185\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"RevealStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.5\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Shown\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                                       Duration=\"00:00:00.0010000\"\r\n                                                                       Storyboard.TargetName=\"Root\"\r\n                                                                       Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Hidden\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\"\r\n                                                         Storyboard.TargetName=\"Root\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\"\r\n                                                         To=\"0\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <ToolTipService.ToolTip>\r\n                            <ContentControl Content=\"{TemplateBinding FormattedDependentValue}\" />\r\n                        </ToolTipService.ToolTip>\r\n                        <Path Data=\"F1 M 0,50L 50,0 100,50 50,100L 0,50 Z \"\r\n                              Fill=\"{TemplateBinding Background}\"\r\n                              Stretch=\"Fill\"\r\n                              Stroke=\"{TemplateBinding BorderBrush}\"\r\n                              StrokeLineJoin=\"Round\"\r\n                              StrokeThickness=\"1\" />\r\n                        <Path x:Name=\"MouseOverHighlight\"\r\n                              Data=\"F1 M 0,50L 50,0 100,50 50,100L 0,50 Z  \"\r\n                              Fill=\"White\"\r\n                              Opacity=\"0\"\r\n                              Stretch=\"Fill\"\r\n                              Stroke=\"{x:Null}\"\r\n                              StrokeLineJoin=\"Round\"\r\n                              StrokeThickness=\"1\" />\r\n                        <Path x:Name=\"SelectionHighlight\"\r\n                              Data=\"F1 M 0,50L 50,0 100,50 50,100L 0,50 Z \"\r\n                              Fill=\"Red\"\r\n                              Opacity=\"0\"\r\n                              Stretch=\"Fill\"\r\n                              Stroke=\"{x:Null}\"\r\n                              StrokeLineJoin=\"Round\"\r\n                              StrokeThickness=\"1\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  chartingprimitives:DelegatingListBox  -->\r\n    <Style BasedOn=\"{StaticResource {x:Type ListBox}}\" TargetType=\"chartingprimitives:DelegatingListBox\">\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n    </Style>\r\n\r\n    <!--  datavis:Legend  -->\r\n    <Style TargetType=\"datavis:Legend\">\r\n        <Setter Property=\"BorderBrush\" Value=\"Black\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"TitleStyle\">\r\n            <Setter.Value>\r\n                <Style TargetType=\"datavis:Title\">\r\n                    <Setter Property=\"Margin\" Value=\"0,5,0,10\" />\r\n                    <Setter Property=\"FontWeight\" Value=\"Bold\" />\r\n                    <Setter Property=\"HorizontalAlignment\" Value=\"Center\" />\r\n                </Style>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"datavis:Legend\">\r\n                    <Border Background=\"{TemplateBinding Background}\"\r\n                            BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                            BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                            Padding=\"2\">\r\n                        <Grid>\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\" />\r\n                                <RowDefinition />\r\n                            </Grid.RowDefinitions>\r\n                            <datavis:Title x:Name=\"HeaderContent\"\r\n                                           Grid.Row=\"0\"\r\n                                           Content=\"{TemplateBinding Header}\"\r\n                                           ContentTemplate=\"{TemplateBinding HeaderTemplate}\"\r\n                                           Style=\"{TemplateBinding TitleStyle}\" />\r\n                            <ScrollViewer Grid.Row=\"1\"\r\n                                          BorderThickness=\"0\"\r\n                                          IsTabStop=\"False\"\r\n                                          Padding=\"0\"\r\n                                          VerticalScrollBarVisibility=\"Auto\">\r\n                                <ItemsPresenter x:Name=\"Items\" Margin=\"10,0,10,10\" />\r\n                            </ScrollViewer>\r\n                        </Grid>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  datavis:Title  -->\r\n    <Style TargetType=\"datavis:Title\">\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"datavis:Title\">\r\n                    <Grid Background=\"{TemplateBinding Background}\">\r\n                        <ContentPresenter Margin=\"{TemplateBinding Padding}\"\r\n                                          HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                                          VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                                          Content=\"{TemplateBinding Content}\"\r\n                                          ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                                          Cursor=\"{TemplateBinding Cursor}\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  datavis:TreeMap  -->\r\n    <Style TargetType=\"datavis:TreeMap\">\r\n        <Setter Property=\"IsTabStop\" Value=\"false\" />\r\n        <Setter Property=\"MinWidth\" Value=\"20\" />\r\n        <Setter Property=\"MinHeight\" Value=\"20\" />\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"True\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"datavis:TreeMap\">\r\n                    <Border Background=\"{TemplateBinding Background}\"\r\n                            BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                            BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                            Cursor=\"{TemplateBinding Cursor}\"\r\n                            Opacity=\"{TemplateBinding Opacity}\"\r\n                            OpacityMask=\"{TemplateBinding OpacityMask}\"\r\n                            Padding=\"{TemplateBinding Padding}\">\r\n                        <Canvas x:Name=\"Container\" />\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"ItemDefinition\">\r\n            <Setter.Value>\r\n                <datavis:TreeMapItemDefinition ValueBinding=\"{Binding}\">\r\n                    <datavis:TreeMapItemDefinition.ItemTemplate>\r\n                        <DataTemplate>\r\n                            <Border Background=\"Transparent\"\r\n                                    BorderBrush=\"Black\"\r\n                                    BorderThickness=\"1\"\r\n                                    ToolTipService.ToolTip=\"{Binding}\">\r\n                                <ContentControl HorizontalAlignment=\"Center\"\r\n                                                VerticalAlignment=\"Center\"\r\n                                                Content=\"{Binding}\" />\r\n                            </Border>\r\n                        </DataTemplate>\r\n                    </datavis:TreeMapItemDefinition.ItemTemplate>\r\n                </datavis:TreeMapItemDefinition>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/DataVisualization/Title/Title.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// Represents the title of a data visualization control.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public partial class Title : ContentControl\r\n    {\r\n#if !SILVERLIGHT\r\n        /// <summary>\r\n        /// Initializes the static members of the Title class.\r\n        /// </summary>\r\n        static Title()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(Title), new FrameworkPropertyMetadata(typeof(Title)));\r\n        }\r\n\r\n#endif\r\n        /// <summary>\r\n        /// Initializes a new instance of the Title class.\r\n        /// </summary>\r\n        public Title()\r\n        {\r\n#if SILVERLIGHT\r\n            DefaultStyleKey = typeof(Title);\r\n#endif\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/TreeMap/BindingExtractor.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Windows.Data;\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// Helper class which can extract the value from a source object using a binding path. It \r\n    /// creates a Binding object based on the path, and calls SetBinding to a temporary \r\n    /// FrameworkElement (base class) to extract the value.\r\n    /// </summary>\r\n    internal class BindingExtractor : FrameworkElement\r\n    {\r\n        #region public object Value\r\n        /// <summary>\r\n        /// Gets or sets a generic Value which will be the target of the binding.\r\n        /// </summary>\r\n        private object Value\r\n        {\r\n            get { return (object)GetValue(ValueProperty); }\r\n            set { SetValue(ValueProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Value dependency property.\r\n        /// </summary>\r\n        private static readonly DependencyProperty ValueProperty =\r\n            DependencyProperty.Register(\r\n                \"Value\",\r\n                typeof(object),\r\n                typeof(BindingExtractor),\r\n                null);\r\n        #endregion\r\n\r\n        /// <summary>\r\n        /// Returns the value of the given Binding when applied on the given object instance.\r\n        /// It does that by making a copy of the binding, setting its source to be the object\r\n        /// instance and the target to be the member Value property.\r\n        /// </summary>\r\n        /// <param name=\"instance\">Object instance containing the property.</param>\r\n        /// <param name=\"valueBinding\">Binding to the property to be retrieved.</param>\r\n        /// <returns>The value of the binding.</returns>\r\n        public object RetrieveProperty(object instance, Binding valueBinding)\r\n        {\r\n            // We need to make a new instance each time because you can't change \r\n            // the Source of a Binding once it has been set.\r\n            Binding binding = new Binding()\r\n            {\r\n                BindsDirectlyToSource = valueBinding.BindsDirectlyToSource,\r\n                Converter = valueBinding.Converter,\r\n                ConverterCulture = valueBinding.ConverterCulture,\r\n                ConverterParameter = valueBinding.ConverterParameter,\r\n                Mode = valueBinding.Mode,\r\n                NotifyOnValidationError = valueBinding.NotifyOnValidationError,\r\n                Path = valueBinding.Path,\r\n                Source = instance,\r\n                UpdateSourceTrigger = valueBinding.UpdateSourceTrigger,\r\n                ValidatesOnExceptions = valueBinding.ValidatesOnExceptions,\r\n#if !NO_COMPLETE_BINDING_PROPERTY_LIST\r\n                FallbackValue = valueBinding.FallbackValue,\r\n                StringFormat = valueBinding.StringFormat,\r\n                TargetNullValue = valueBinding.TargetNullValue,\r\n                ValidatesOnDataErrors = valueBinding.ValidatesOnDataErrors,\r\n#endif\r\n//#if !NO_VALIDATESONNOTIFYDATAERRORS\r\n//                ValidatesOnNotifyDataErrors = valueBinding.ValidatesOnNotifyDataErrors,\r\n//#endif\r\n            };\r\n\r\n            SetBinding(BindingExtractor.ValueProperty, binding);\r\n\r\n            // Now this dependency property has been updated.\r\n            return Value;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/TreeMap/Interpolators/DoubleInterpolator.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Globalization;\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// Interpolator which converts a numeric value from its [RangeMinimum, RangeMaximum]\r\n    /// range to another value in the range [From, To].\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public class DoubleInterpolator : RangeInterpolator<double>\r\n    {\r\n        /// <summary>\r\n        /// Interpolates the given value between its [RangeMinimum, RangeMaximum] range\r\n        /// and returns an interpolated value in the range [From, To].\r\n        /// </summary>\r\n        /// <param name=\"value\">Value to interpolate.</param>\r\n        /// <returns>An interpolated value in the range [From, To].</returns>\r\n        public override object Interpolate(double value)\r\n        {\r\n            double result = From;\r\n            if (ActualDataMaximum - ActualDataMinimum != 0)\r\n            {\r\n                double ratio = (value - ActualDataMinimum) / (ActualDataMaximum - ActualDataMinimum);\r\n                result = From + (ratio * (To - From));\r\n            }\r\n\r\n            return result;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/TreeMap/Interpolators/HSLSolidColorBrushInterpolator.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Windows.Controls.DataVisualization;\r\nusing System.Windows.Media;\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// Interpolator which converts a numeric value from its [ActualDataMinimum, ActualDataMaximum]\r\n    /// range to a color in the range [From, To].\r\n    /// </summary>\r\n    /// <QualityBand>Experimental</QualityBand>\r\n    public class HSLSolidColorBrushInterpolator : RangeInterpolator<Color>\r\n    {\r\n        /// <summary>\r\n        /// Interpolates the given value between its [ActualDataMinimum, ActualDataMaximum] range\r\n        /// and returns a color in the range [From, To].\r\n        /// </summary>\r\n        /// <param name=\"value\">Value to interpolate.</param>\r\n        /// <returns>An interpolated color in the range [From, To].</returns>\r\n        public override object Interpolate(double value)\r\n        {\r\n            Color color = From;\r\n            if (ActualDataMaximum - ActualDataMinimum != 0)\r\n            {\r\n                double ratio = (value - ActualDataMinimum) / (ActualDataMaximum - ActualDataMinimum);\r\n\r\n                color = color.FromAhsl(\r\n                    (byte)((double)From.A + (ratio * (double)(To.A - From.A))),\r\n                    From.GetHue() + (ratio * (To.GetHue() - From.GetHue())),\r\n                    From.GetSaturation() + (ratio * (To.GetSaturation() - From.GetSaturation())),\r\n                    From.GetLightness() + (ratio * (To.GetLightness() - From.GetLightness())));\r\n            }\r\n\r\n            return new SolidColorBrush(color);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/TreeMap/Interpolators/InterpolationMode.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// Specifies the supported interpolation modes.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public enum InterpolationMode\r\n    {\r\n        /// <summary>\r\n        /// Interpolation shall be applied to leaf nodes only in the tree.\r\n        /// </summary>\r\n        LeafNodesOnly = 0,\r\n\r\n        /// <summary>\r\n        /// Interpolation shall be applied to all nodes in the tree.\r\n        /// </summary>\r\n        AllNodes = 1,\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/TreeMap/Interpolators/Interpolator.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Globalization;\r\nusing System.Windows.Data;\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// Abstract base class for Interpolator converters.\r\n    /// </summary>\r\n    /// <remarks>\r\n    /// <para>\r\n    /// An Interpolator is used to project a value from a source range \r\n    /// [ActualDataMinimum, ActualDataMaximum] to a target range [From, To]. \r\n    /// The source range can be specified directly by setting the DataMinimum \r\n    /// and/or DataMaximum properties, or indirectly by setting DataRangeBinding.\r\n    /// When the DataRangeBinding property is set,the TreeMap will evaluate the \r\n    /// binding for the entire tree, calculating the minimum and maximum values \r\n    /// automatically. The custom target range and the actual interpolation \r\n    /// logic is defined by sub-classes of this abstract class.\r\n    /// </para>\r\n    /// </remarks>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public abstract class Interpolator : FrameworkElement\r\n    {\r\n        /// <summary>\r\n        /// Holds a helper object used to extract values using a property path.\r\n        /// </summary>\r\n        private BindingExtractor _helper;\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value telling to which tree nodes the interpolation \r\n        /// should be applied to. LeafNodesOnly by default.\r\n        /// </summary>\r\n        public InterpolationMode InterpolationMode { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value representing the x:Name of the element to which\r\n        /// the interpolated value will be applied.\r\n        /// </summary>\r\n        public string TargetName { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value representing the path to a property which will \r\n        /// receive the interpolated value.\r\n        /// </summary>\r\n        public string TargetProperty { get; set; }\r\n\r\n        #region public double DataMinimum\r\n        /// <summary>\r\n        /// Gets or sets a value representing the fixed minimum value across the \r\n        /// entire set. If the value is not set directly or is NaN, the \r\n        /// ActualDataMaximum will be calculated automatically from the data set \r\n        /// by using the DataRangeBinding property.\r\n        /// </summary>\r\n        public double DataMinimum\r\n        {\r\n            get { return (double)GetValue(DataMinimumProperty); }\r\n            set { SetValue(DataMinimumProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the DataMinimum dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty DataMinimumProperty =\r\n            DependencyProperty.Register(\r\n                \"DataMinimum\",\r\n                typeof(double),\r\n                typeof(Interpolator),\r\n                new PropertyMetadata(double.NaN));\r\n        #endregion public double DataMinimum\r\n\r\n        #region public double DataMaximum\r\n        /// <summary>\r\n        /// Gets or sets a value representing the fixed maximum value across the \r\n        /// entire set. If the value is not set directly or is NaN, the \r\n        /// ActualDataMinimum will be calculated automatically from the data set \r\n        /// by using the DataRangeBinding property.\r\n        /// </summary>\r\n        public double DataMaximum\r\n        {\r\n            get { return (double)GetValue(DataMaximumProperty); }\r\n            set { SetValue(DataMaximumProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the DataMaximum dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty DataMaximumProperty =\r\n            DependencyProperty.Register(\r\n                \"DataMaximum\",\r\n                typeof(double),\r\n                typeof(Interpolator),\r\n                new PropertyMetadata(double.NaN));\r\n        #endregion public double DataMaximum\r\n\r\n        /// <summary>\r\n        /// This fields contains the automatically calculated maximal value in \r\n        /// the dataset.\r\n        /// </summary>\r\n        private double _actualDataMaximum;\r\n\r\n        /// <summary>\r\n        /// Gets the value representing the maximal value in the data set. It is\r\n        /// automatically from the data set by using the DataRangeBinding \r\n        /// property if DataMaximum is not set. If it is set, DataMaximum is \r\n        /// returned.\r\n        /// </summary>\r\n        public double ActualDataMaximum\r\n        {\r\n            get\r\n            {\r\n                if (Double.IsNaN(DataMaximum))\r\n                {\r\n                    return _actualDataMaximum;\r\n                }\r\n                else\r\n                {\r\n                    return DataMaximum;\r\n                }\r\n            }\r\n\r\n            internal set\r\n            {\r\n                _actualDataMaximum = value;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// This fields contains the automatically calculated minimal value in \r\n        /// the dataset.\r\n        /// </summary>\r\n        private double _actualDataMinimum;\r\n\r\n        /// <summary>\r\n        /// Gets the value representing the minimal value in the data set. It is\r\n        /// automatically from the data set by using the DataRangeBinding \r\n        /// property if DataMinimum is not set. If it is set, DataMinimum is \r\n        /// returned.\r\n        /// </summary>\r\n        public double ActualDataMinimum\r\n        {\r\n            get\r\n            {\r\n                if (Double.IsNaN(DataMinimum))\r\n                {\r\n                    return _actualDataMinimum;\r\n                }\r\n                else\r\n                {\r\n                    return DataMinimum;\r\n                }\r\n            }\r\n\r\n            internal set\r\n            {\r\n                _actualDataMinimum = value;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a binding to a property which will be examined to retrieve the minimum and maximum range \r\n        /// values across the entire data set. If this value is null then the DataMinimum and DataMaximum values\r\n        /// need be set manually.\r\n        /// </summary>\r\n        public Binding DataRangeBinding { get; set; }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the Interpolator class.\r\n        /// </summary>\r\n        protected Interpolator()\r\n        {\r\n            InterpolationMode = InterpolationMode.LeafNodesOnly;\r\n            ActualDataMinimum = double.PositiveInfinity;\r\n            ActualDataMaximum = double.NegativeInfinity;\r\n            _helper = new BindingExtractor();\r\n        }\r\n\r\n        /// <summary>\r\n        /// If the DataRangeBinding property is set then this method updates the minimum/maximum range\r\n        /// of this object by including the value passed in.\r\n        /// </summary>\r\n        /// <param name=\"data\">Object to extract the value from (the Source of the DataRangeBinding).</param>\r\n        internal virtual void IncludeInRange(object data)\r\n        {\r\n            if (DataRangeBinding != null)\r\n            {\r\n                if (!Double.IsNaN(DataMinimum) && !Double.IsNaN(DataMaximum))\r\n                {\r\n                    return;\r\n                }\r\n\r\n                IConvertible input = _helper.RetrieveProperty(data, DataRangeBinding) as IConvertible;\r\n                if (input == null)\r\n                {\r\n                    throw new ArgumentException(\r\n                        Properties.Resources.Interpolator_IncludeInRange_DataRangeBindingNotIConvertible);\r\n                }\r\n\r\n                double value = input.ToDouble(CultureInfo.InvariantCulture);\r\n                if (Double.IsNaN(DataMinimum) && value < ActualDataMinimum)\r\n                {\r\n                    ActualDataMinimum = value;\r\n                }\r\n\r\n                if (Double.IsNaN(DataMaximum) && value > ActualDataMaximum)\r\n                {\r\n                    ActualDataMaximum = value;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called to interpolate the value of the given object between the DataMinimum and DataMaximum\r\n        /// extremes, and to project it in a specific [From, To] range defined. The target range (and\r\n        /// therefore the implementation of this method) is defined in a specific sub-class.\r\n        /// </summary>\r\n        /// <param name=\"value\">Value to interpolate.</param>\r\n        /// <returns>An interpolated value.</returns>\r\n        public abstract object Interpolate(double value);\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/TreeMap/Interpolators/RangeInterpolator.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// Abstract class representing an interpolator which projects values to\r\n    /// a continuous range defined by the From and To properties.\r\n    /// </summary>\r\n    /// <typeparam name=\"T\">The data type of the values in the target range.</typeparam>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public abstract class RangeInterpolator<T> : Interpolator\r\n    {\r\n        /// <summary>\r\n        /// Gets or sets a value representing the start value of the target range.\r\n        /// </summary>\r\n        public T From { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value representing the end value of the target range.\r\n        /// </summary>\r\n        public T To { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/TreeMap/Interpolators/SolidColorBrushInterpolator.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\nusing System.Windows.Media;\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// Interpolator which converts a numeric value from its [RangeMinimum, RangeMaximum]\r\n    /// range to a color in the range [From, To].\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public class SolidColorBrushInterpolator : RangeInterpolator<Color>\r\n    {\r\n        /// <summary>\r\n        /// Interpolates the given value between its [RangeMinimum, RangeMaximum] range\r\n        /// and returns a color in the range [From, To].\r\n        /// </summary>\r\n        /// <param name=\"value\">Value to interpolate.</param>\r\n        /// <returns>An interpolated color in the range [From, To].</returns>\r\n        public override object Interpolate(double value)\r\n        {\r\n            Color color = From;\r\n            if (ActualDataMaximum - ActualDataMinimum != 0)\r\n            {\r\n                double ratio = (value - ActualDataMinimum) / (ActualDataMaximum \r\n                    - ActualDataMinimum);\r\n\r\n                color = Color.FromArgb(\r\n                    (byte)(From.A + (ratio * (To.A - From.A))),\r\n                    (byte)(From.R + (ratio * (To.R - From.R))),\r\n                    (byte)(From.G + (ratio * (To.G - From.G))),\r\n                    (byte)(From.B + (ratio * (To.B - From.B))));\r\n            }\r\n\r\n            return new SolidColorBrush(color);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/TreeMap/Layout/SquaringAlgorithm.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// Class encapsulating the logic of sub-dividing a parent rectangular area into child rectangles.\r\n    /// It implements the squaring tree map algorithm where all child nodes are allocated\r\n    /// areas proportional to their values, but the aspect ratio of each rectangle is kept \r\n    /// as close as possible to a square.\r\n    /// </summary>\r\n    internal class SquaringAlgorithm\r\n    {\r\n        /// <summary>\r\n        /// Holds the list of nodes being considered by the algorithm.\r\n        /// </summary>\r\n        private IList<TreeMapNode> _areas;\r\n\r\n        /// <summary>\r\n        /// The current rectangle being divided.\r\n        /// </summary>\r\n        private Rect _currentRectangle;\r\n\r\n        /// <summary>\r\n        /// Internal index in the list of nodes being divided.\r\n        /// </summary>\r\n        private int _currentStart;\r\n\r\n        /// <summary>\r\n        /// Temporary variable used during the algorithm. Represents the ratio between \r\n        /// the real area of the rectangle and the virtual value associated with the node.\r\n        /// </summary>\r\n        private double _factor;\r\n\r\n        /// <summary>\r\n        /// Subdivides the parent rectangle using squaring tree map algorithm into\r\n        /// rectangles with areas specified by the children. The areas must add up \r\n        /// to at most the area of the rectangle.\r\n        /// </summary>\r\n        /// <param name=\"parentRectangle\">Total area being split.</param>\r\n        /// <param name=\"parentNode\">The node associated with the total area. The \r\n        /// children of this node will be allocated small chunks of the parent rectangle.</param>\r\n        /// <param name=\"margin\">How much of a gap should be left between the parent rectangle and the children.</param>\r\n        /// <returns>A list of RectangularArea objects describing areas associated with each of the children of parentNode.</returns>\r\n        public IEnumerable<Tuple<Rect, TreeMapNode>> Split(Rect parentRectangle, TreeMapNode parentNode, Thickness margin)\r\n        {\r\n            IEnumerable<Tuple<Rect, TreeMapNode>> retVal;\r\n\r\n            double area = parentNode.Area;\r\n            if (parentNode.Children == null || parentNode.Children.Count() == 0 || area == 0)\r\n            {\r\n                retVal = Enumerable.Empty<Tuple<Rect, TreeMapNode>>();\r\n            }\r\n            else\r\n            {\r\n                if (parentRectangle.Width - margin.Left - margin.Right <= 0 ||\r\n                    parentRectangle.Height - margin.Top - margin.Bottom <= 0)\r\n                {\r\n                    // Margins too big, no more room for children. Returning\r\n                    // zero sized rectangles for all children.\r\n                    retVal = from child in parentNode.Children\r\n                             select new Tuple<Rect, TreeMapNode>(new Rect(0, 0, 0, 0), child);\r\n                }\r\n                else\r\n                {\r\n                    // Leave as much room as specified by the margin\r\n                    _currentRectangle = new Rect(\r\n                        parentRectangle.X + margin.Left,\r\n                        parentRectangle.Y + margin.Top,\r\n                        parentRectangle.Width - margin.Left - margin.Right,\r\n                        parentRectangle.Height - margin.Top - margin.Bottom);\r\n\r\n                    _areas = (from child in parentNode.Children\r\n                             where child.Area != 0\r\n                             orderby child.Area descending\r\n                             select child).ToArray();\r\n\r\n                    // Factor is only computed once and used during the algorithm\r\n                    _factor = _currentRectangle.Width * _currentRectangle.Height / area;\r\n\r\n                    retVal = BuildTreeMap().ToArray();\r\n                }\r\n            }\r\n\r\n            return retVal;\r\n        }\r\n\r\n        /// <summary>\r\n        /// This function returns an IEnumerable over the rectangles associated with the children,\r\n        /// as divided using the tree map algorithm.\r\n        /// </summary>\r\n        /// <returns>A list of RectangularArea objects describing areas associated with each of the children.</returns>\r\n        private IEnumerable<Tuple<Rect, TreeMapNode>> BuildTreeMap()\r\n        {\r\n            _currentStart = 0;\r\n            while (_currentStart < _areas.Count)\r\n            {\r\n                foreach (Tuple<Rect, TreeMapNode> rectangle in BuildTreeMapStep())\r\n                {\r\n                    yield return rectangle;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Performs one step of the body of the squaring tree map algorithm.\r\n        /// </summary>\r\n        /// <returns>List of rectangles calculated by this step.</returns>\r\n        private IEnumerable<Tuple<Rect, TreeMapNode>> BuildTreeMapStep()\r\n        {\r\n            int last = _currentStart;\r\n            double total = 0;\r\n            double prevAspect = double.PositiveInfinity;\r\n            double wh = 0;\r\n            bool horizontal = _currentRectangle.Width > _currentRectangle.Height;\r\n            for (; last < _areas.Count; last++)\r\n            {\r\n                total += GetArea(last);\r\n                wh = total / (horizontal ? _currentRectangle.Height : _currentRectangle.Width);\r\n                double curAspect = Math.Max(GetAspect(_currentStart, wh), GetAspect(last, wh));\r\n                if (curAspect > prevAspect)\r\n                {\r\n                    total -= GetArea(last);\r\n                    wh = total / (horizontal ? _currentRectangle.Height : _currentRectangle.Width);\r\n                    last--;\r\n                    break;\r\n                }\r\n\r\n                prevAspect = curAspect;\r\n            }\r\n\r\n            if (last == _areas.Count)\r\n            {\r\n                last--;\r\n            }\r\n\r\n            double x = _currentRectangle.Left;\r\n            double y = _currentRectangle.Top;\r\n\r\n            for (int i = _currentStart; i <= last; i++)\r\n            {\r\n                if (horizontal)\r\n                {\r\n                    double h = GetArea(i) / wh;\r\n                    Rect rect = new Rect(x, y, wh, h);\r\n                    yield return new Tuple<Rect, TreeMapNode>(rect, _areas[i]);\r\n                    y += h;\r\n                }\r\n                else\r\n                {\r\n                    double w = GetArea(i) / wh;\r\n                    Rect rect = new Rect(x, y, w, wh);\r\n                    yield return new Tuple<Rect, TreeMapNode>(rect, _areas[i]);\r\n                    x += w;\r\n                }\r\n            }\r\n\r\n            _currentStart = last + 1;\r\n\r\n            if (horizontal)\r\n            {\r\n                _currentRectangle = new Rect(_currentRectangle.Left + wh, _currentRectangle.Top, Math.Max(0, _currentRectangle.Width - wh), _currentRectangle.Height);\r\n            }\r\n            else\r\n            {\r\n                _currentRectangle = new Rect(_currentRectangle.Left, _currentRectangle.Top + wh, _currentRectangle.Width, Math.Max(0, _currentRectangle.Height - wh));\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the calculated area of the node at the given index.\r\n        /// </summary>\r\n        /// <param name=\"i\">Index of the node to consider.</param>\r\n        /// <returns>Area of the node, calculated based on the node's value multiplied by the current factor.</returns>\r\n        private double GetArea(int i)\r\n        {\r\n            return _areas[i].Area * _factor;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the aspect ratio of the area associated with the node at the given index.\r\n        /// </summary>\r\n        /// <param name=\"i\">Index of the node to consider.</param>\r\n        /// <param name=\"wh\">Width of the area.</param>\r\n        /// <returns>Positive supra-unitary ratio of the given area.</returns>\r\n        private double GetAspect(int i, double wh)\r\n        {\r\n            double aspect = GetArea(i) / (wh * wh);\r\n            if (aspect < 1)\r\n            {\r\n                aspect = 1.0 / aspect;\r\n            }\r\n\r\n            return aspect;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/TreeMap/Layout/TreeMapNode.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\nusing System.Collections.Specialized;\r\nusing System.Diagnostics.CodeAnalysis;\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// Holds the information needed by the tree map layout algorithm, such as the area\r\n    /// associated with this node and the list of children. The class also contains\r\n    /// an DataContext object which is the real user context, and a reference to the UI\r\n    /// container associated with this node.\r\n    /// </summary>\r\n    internal class TreeMapNode\r\n    {\r\n        /// <summary>\r\n        /// Gets or sets a value representing the area associated with this node.\r\n        /// This value is relative to all the other values in the hierarchy; the layout\r\n        /// algorithm will allocated a real area proportional to this value.\r\n        /// </summary>\r\n        public double Area { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the list of children under this node.\r\n        /// </summary>\r\n        public IEnumerable<TreeMapNode> Children { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value representing the WeakEventListener associated with the\r\n        /// ItemsSource that created the children of this node.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Used by implementation; warning is only for the test project.\")]\r\n        internal WeakEventListener<TreeMap, object, NotifyCollectionChangedEventArgs> WeakEventListener { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value representing a reference to the user's custom data object.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Used by implementation; warning is only for the test project.\")]\r\n        public object DataContext { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value representing the associated Silverlight UI element.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Used by implementation; warning is only for the test project.\")]\r\n        public FrameworkElement Element { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value representing the TreeMapItemDefinition used to describe \r\n        /// properties of this item.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Used by implementation; warning is only for the test project.\")]\r\n        public TreeMapItemDefinition ItemDefinition { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value representing the padding between this node and its children.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Used by implementation; warning is only for the test project.\")]\r\n        public Thickness ChildItemPadding { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value representing the level of this node in the tree (the\r\n        /// root node is at level 0).\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Used by implementation; warning is only for the test project.\")]\r\n        public int Level { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/TreeMap/TreeMap.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Collections.Specialized;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Windows.Data;\r\nusing System.Windows.Markup;\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// Represents a control which can display hierarchical data as a set of nested rectangles. \r\n    /// Each item in the hierarchy is laid out in a rectangular area of a size proportional to \r\n    /// the value associated with the item.\r\n    /// </summary>\r\n    /// <remarks>\r\n    /// You populate a TreeMap by setting its ItemsSource property to the root of the hierarchy \r\n    /// you would like to display. The ItemDefinition property must be set to an instance of a \r\n    /// TreeMapItemDefinition with appropriate bindings for Value (identifying the value to be used\r\n    /// when calculating relative item sizes) and ItemsSource (identifying the collection of \r\n    /// children for each item).\r\n    /// </remarks>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    [TemplatePart(Name = ContainerName, Type = typeof(Canvas))]\r\n    [ContentProperty(\"ItemsSource\")]\r\n    public class TreeMap : Control\r\n    {\r\n        /// <summary>\r\n        /// The name of the Container template part.\r\n        /// </summary>\r\n        private const string ContainerName = \"Container\";\r\n\r\n        #region private object InterpolatorValue\r\n        /// <summary>\r\n        /// Identifies the InterpolatorValue dependency property.\r\n        /// </summary>\r\n        private static readonly DependencyProperty InterpolatorValueProperty =\r\n            DependencyProperty.Register(\r\n                \"InterpolatorValue\",\r\n                typeof(object),\r\n                typeof(TreeMap),\r\n                null);\r\n\r\n        /// <summary>\r\n        /// Gets or sets a generic value used as a temporary storage used as a source for TargetName/TargetProperty binding.\r\n        /// </summary>\r\n        private object InterpolatorValue\r\n        {\r\n            get { return (object)GetValue(InterpolatorValueProperty); }\r\n            set { SetValue(InterpolatorValueProperty, value); }\r\n        }\r\n        #endregion\r\n\r\n        /// <summary>\r\n        /// Holds a helper object used to extract values using a property path.\r\n        /// </summary>\r\n        private BindingExtractor _helper;\r\n\r\n        /// <summary>\r\n        /// The roots of the pre-calculated parallel tree of TreeMapNodes.\r\n        /// </summary>\r\n        private IEnumerable<TreeMapNode> _nodeRoots;\r\n\r\n        /// <summary>\r\n        /// Cached sequence of all TreeMapNodes used by GetTreeMapNodes.\r\n        /// </summary>\r\n        private IEnumerable<TreeMapNode> _getTreeMapNodesCache;\r\n\r\n        #region public TreeMapItemDefinitionSelector TreeMapItemDefinitionSelector\r\n        /// <summary>\r\n        /// Gets or sets the selector used to choose the item template dynamically.\r\n        /// </summary>\r\n        public TreeMapItemDefinitionSelector ItemDefinitionSelector\r\n        {\r\n            get { return (TreeMapItemDefinitionSelector)GetValue(ItemDefinitionSelectorProperty); }\r\n            set { SetValue(ItemDefinitionSelectorProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ItemDefinitionSelector dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ItemDefinitionSelectorProperty = \r\n            DependencyProperty.Register(\r\n                \"ItemDefinitionSelector\",\r\n                typeof(TreeMapItemDefinitionSelector),\r\n                typeof(TreeMap),\r\n                new PropertyMetadata(OnItemDefinitionSelectorPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// Called when the value of the TreeMapItemDefinitionSelectorProperty property changes.\r\n        /// </summary>\r\n        /// <param name=\"d\">Reference to the TreeMap object.</param>\r\n        /// <param name=\"e\">Event handler arguments.</param>\r\n        private static void OnItemDefinitionSelectorPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            TreeMap treeMap = d as TreeMap;\r\n            if (treeMap != null)\r\n            {\r\n                TreeMapItemDefinitionSelector oldValue = e.OldValue as TreeMapItemDefinitionSelector;\r\n                TreeMapItemDefinitionSelector newValue = e.NewValue as TreeMapItemDefinitionSelector;\r\n                treeMap.OnItemDefinitionSelectorPropertyChanged(oldValue, newValue);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the value of the ItemDefinitionSelectorProperty property changes.\r\n        /// Triggers a recalculation of the layout.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">The old selector.</param>\r\n        /// <param name=\"newValue\">The new selector.</param>\r\n        protected virtual void OnItemDefinitionSelectorPropertyChanged(TreeMapItemDefinitionSelector oldValue, TreeMapItemDefinitionSelector newValue)\r\n        {\r\n            RebuildTree();\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region public TreeMapItemDefinition ItemDefinition\r\n        /// <summary>\r\n        /// Gets or sets a value representing the template used to display each item.\r\n        /// </summary>\r\n        public TreeMapItemDefinition ItemDefinition\r\n        {\r\n            get { return (TreeMapItemDefinition)GetValue(ItemDefinitionProperty); }\r\n            set { SetValue(ItemDefinitionProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ItemDefinition dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ItemDefinitionProperty = \r\n            DependencyProperty.Register(\r\n                \"ItemDefinition\",\r\n                typeof(TreeMapItemDefinition),\r\n                typeof(TreeMap),\r\n                new PropertyMetadata(OnItemDefinitionPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// Called when the value of the ItemDefinitionProperty property changes.\r\n        /// </summary>\r\n        /// <param name=\"d\">Reference to the TreeMap object.</param>\r\n        /// <param name=\"e\">Event handler arguments.</param>\r\n        private static void OnItemDefinitionPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            TreeMap treeMap = d as TreeMap;\r\n            if (treeMap != null)\r\n            {\r\n                TreeMapItemDefinition oldValue = e.OldValue as TreeMapItemDefinition;\r\n                TreeMapItemDefinition newValue = e.NewValue as TreeMapItemDefinition;\r\n\r\n                // Unregister old TreeMapItemDefinition\r\n                if (oldValue != null)\r\n                {\r\n                    oldValue.PropertyChanged -= treeMap.OnItemDefinitionPropertyChanged;\r\n                }\r\n\r\n                // Register new TreeMapItemDefinition\r\n                if (newValue != null)\r\n                {\r\n                    newValue.PropertyChanged += treeMap.OnItemDefinitionPropertyChanged;\r\n                }\r\n\r\n                treeMap.OnItemDefinitionPropertyChanged(oldValue, newValue);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// This callback ensures that any change in TreeMapItemDefinition.\r\n        /// </summary>\r\n        /// <param name=\"sender\">Source TreeMapItemDefinition object.</param>\r\n        /// <param name=\"e\">Event handler arguments (parameter name).</param>\r\n        private void OnItemDefinitionPropertyChanged(object sender, PropertyChangedEventArgs e)\r\n        {\r\n            RebuildTree();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the value of the ItemDefinitionProperty property changes.\r\n        /// Triggers a recalculation of the layout.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">The old item definition.</param>\r\n        /// <param name=\"newValue\">The new item definition.</param>\r\n        protected virtual void OnItemDefinitionPropertyChanged(TreeMapItemDefinition oldValue, TreeMapItemDefinition newValue)\r\n        {\r\n            RebuildTree();\r\n        }\r\n        #endregion \r\n\r\n        #region public IEnumerable ItemsSource\r\n        /// <summary>\r\n        /// Gets or sets a value representing the list of hierarchies used to generate\r\n        /// content for the TreeMap.\r\n        /// </summary>\r\n        public IEnumerable ItemsSource\r\n        {\r\n            get { return (IEnumerable)GetValue(ItemsSourceProperty); }\r\n            set { SetValue(ItemsSourceProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ItemsSource dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ItemsSourceProperty = \r\n            DependencyProperty.Register(\r\n                \"ItemsSource\", \r\n                typeof(IEnumerable),\r\n                typeof(TreeMap),\r\n                new PropertyMetadata(OnItemsSourcePropertyChanged));\r\n\r\n        /// <summary>\r\n        /// Called when the value of the ItemsSourceProperty property changes.\r\n        /// </summary>\r\n        /// <param name=\"d\">Reference to the TreeMap object.</param>\r\n        /// <param name=\"e\">Event handler arguments.</param>\r\n        private static void OnItemsSourcePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            TreeMap treeMap = d as TreeMap;\r\n            if (treeMap != null)\r\n            {\r\n                IEnumerable oldValue = e.OldValue as IEnumerable;\r\n                IEnumerable newValue = e.NewValue as IEnumerable;\r\n                treeMap.OnItemsSourcePropertyChanged(oldValue, newValue);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the value of the ItemsSourceProperty property changes.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">The old ItemsSource collection.</param>\r\n        /// <param name=\"newValue\">The new ItemsSource collection.</param>\r\n        protected virtual void OnItemsSourcePropertyChanged(IEnumerable oldValue, IEnumerable newValue)\r\n        {\r\n            // Remove handler for oldValue.CollectionChanged (if present)\r\n            INotifyCollectionChanged oldValueINotifyCollectionChanged = oldValue as INotifyCollectionChanged;\r\n            if (null != oldValueINotifyCollectionChanged)\r\n            {\r\n                // Detach the WeakEventListener\r\n                if (null != _weakEventListener)\r\n                {\r\n                    _weakEventListener.Detach();\r\n                    _weakEventListener = null;\r\n                }\r\n            }\r\n\r\n            // Add handler for newValue.CollectionChanged (if possible)\r\n            INotifyCollectionChanged newValueINotifyCollectionChanged = newValue as INotifyCollectionChanged;\r\n            if (null != newValueINotifyCollectionChanged)\r\n            {\r\n                // Use a WeakEventListener so that the backwards reference doesn't keep this object alive\r\n                _weakEventListener = new WeakEventListener<TreeMap, object, NotifyCollectionChangedEventArgs>(this);\r\n                _weakEventListener.OnEventAction = (instance, source, eventArgs) => instance.ItemsSourceCollectionChanged(source, eventArgs);\r\n                _weakEventListener.OnDetachAction = (weakEventListener) => newValueINotifyCollectionChanged.CollectionChanged -= weakEventListener.OnEvent;\r\n                newValueINotifyCollectionChanged.CollectionChanged += _weakEventListener.OnEvent;\r\n            }\r\n\r\n            // Handle property change\r\n            RebuildTree();\r\n        }\r\n\r\n        /// <summary>\r\n        /// WeakEventListener used to handle INotifyCollectionChanged events.\r\n        /// </summary>\r\n        private WeakEventListener<TreeMap, object, NotifyCollectionChangedEventArgs> _weakEventListener;\r\n\r\n        /// <summary>\r\n        /// Method that handles the ObservableCollection.CollectionChanged event for the ItemsSource property.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The object that raised the event.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void ItemsSourceCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)\r\n        {\r\n            RebuildTree();\r\n        }\r\n        #endregion\r\n\r\n        #region private Collection<Interpolator> Interpolators\r\n        /// <summary>\r\n        /// Gets or sets a value representing a collection of interpolators to use in TreeMap.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA2227:CollectionPropertiesShouldBeReadOnly\", Justification = \"Setter is public to work around a limitation with the XAML editing tools.\")]\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA1801:ReviewUnusedParameters\", MessageId = \"value\", Justification = \"Setter is public to work around a limitation with the XAML editing tools.\")]\r\n        public Collection<Interpolator> Interpolators\r\n        {\r\n            get { return (Collection<Interpolator>)GetValue(InterpolatorsProperty); }\r\n            set { throw new NotSupportedException(Properties.Resources.TreeMap_Interpolators_SetterNotSupported); }\r\n        }\r\n        \r\n        /// <summary>\r\n        /// Identifies the Interpolators dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty InterpolatorsProperty = \r\n            DependencyProperty.Register(\r\n                \"Interpolators\",\r\n                typeof(Collection<Interpolator>),\r\n                typeof(TreeMap),\r\n                new PropertyMetadata(OnInterpolatorsPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// Called when the value of the InterpolatorsProperty property changes.\r\n        /// </summary>\r\n        /// <param name=\"d\">Reference to the TreeMap object.</param>\r\n        /// <param name=\"e\">Event handler arguments.</param>\r\n        private static void OnInterpolatorsPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            TreeMap treeMap = d as TreeMap;\r\n            if (treeMap != null)\r\n            {\r\n                Collection<Interpolator> oldValue = e.OldValue as Collection<Interpolator>;\r\n                Collection<Interpolator> newValue = e.NewValue as Collection<Interpolator>;\r\n                treeMap.OnInterpolatorsPropertyChanged(oldValue, newValue);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the value of the InterpolatorsProperty property changes.\r\n        /// Triggers a recalculation of the layout.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">The old Interpolators collection.</param>\r\n        /// <param name=\"newValue\">The new Interpolators collection.</param>\r\n        protected virtual void OnInterpolatorsPropertyChanged(Collection<Interpolator> oldValue, Collection<Interpolator> newValue)\r\n        {\r\n            RebuildTree();\r\n        }\r\n        #endregion\r\n        \r\n        #region Template Parts\r\n        /// <summary>\r\n        /// The Container template part is used to hold all the items inside\r\n        /// a TreeMap.\r\n        /// </summary>\r\n        private Canvas _containerElement;\r\n\r\n        /// <summary>\r\n        /// Gets the Container template part that is used to hold all the items inside\r\n        /// a TreeMap.\r\n        /// </summary>\r\n        internal Canvas ContainerElement\r\n        {\r\n            get { return _containerElement; }\r\n            private set\r\n            {\r\n                // Detach from the old Container element\r\n                if (_containerElement != null)\r\n                {\r\n                    _containerElement.Children.Clear();\r\n                }\r\n\r\n                // Attach to the new Container element\r\n                _containerElement = value;\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the TreeMap class.\r\n        /// </summary>\r\n        public TreeMap()\r\n        {\r\n            _helper = new BindingExtractor();\r\n\r\n            DefaultStyleKey = typeof(TreeMap);\r\n\r\n            SetValue(InterpolatorsProperty, new ObservableCollection<Interpolator>());\r\n            (Interpolators as ObservableCollection<Interpolator>).CollectionChanged += \r\n                new NotifyCollectionChangedEventHandler(OnInterpolatorsCollectionChanged);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Invoked whenever application code or internal processes call ApplyTemplate. Gets references\r\n        /// to the template parts required by this control.\r\n        /// </summary>\r\n        public override void OnApplyTemplate()\r\n        {\r\n            base.OnApplyTemplate();\r\n\r\n            ContainerElement = GetTemplateChild(ContainerName) as Canvas;\r\n\r\n            RebuildTree();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Constructs a new instance of an element used to display an item in the tree. \r\n        /// </summary>\r\n        /// <remarks>\r\n        /// By default TreeMap will use the template set in its ItemDefinition property, or the value \r\n        /// returned from GetTemplateForItemOverride if overridden. Override this method to build a \r\n        /// custom element.\r\n        /// </remarks>\r\n        /// <param name=\"data\">One of the items in the ItemsSource hierarchy.</param>\r\n        /// <param name=\"level\">The level of the item in the hierarchy.</param>\r\n        /// <returns>A new FrameworkElement which will be added to the TreeMap control. If this\r\n        /// method returns null the TreeMap will create the item using the ItemDefinition property,\r\n        /// or the value returned by TreeMapItemDefinitionSelector if specified.</returns>\r\n        protected virtual FrameworkElement GetContainerForItemOverride(object data, int level)\r\n        {\r\n            return null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Performs the Arrange pass of the layout.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// We round rectangles to snap to nearest pixels. We do that to avoid \r\n        /// anti-aliasing which results in better appearance. Moreover to get\r\n        /// correct layout we would need to use UseLayoutRounding=false which\r\n        /// is Silverlight specific. A side effect is that areas for rectangles \r\n        /// in the visual tree no longer can be used to compare them as dimensions\r\n        /// are not rounded and therefore not precise. \r\n        /// </remarks>\r\n        /// <param name=\"finalSize\">The final area within the parent that this element should use to arrange itself and its children.</param>\r\n        /// <returns>The actual size used.</returns>\r\n        protected override Size ArrangeOverride(Size finalSize)\r\n        {\r\n            // Sets ActualHeight & ActualWidth for the container\r\n            finalSize = base.ArrangeOverride(finalSize);\r\n\r\n            if (_nodeRoots != null && ContainerElement != null)\r\n            {\r\n                // Create a temporary pseudo-root node containing all the top-level nodes\r\n                TreeMapNode root = new TreeMapNode()\r\n                {\r\n                    Area = _nodeRoots.Sum(x => x.Area),\r\n                    Children = _nodeRoots,\r\n                    ChildItemPadding = new Thickness(0)\r\n                };\r\n\r\n                // Calculate associated rectangles. We use ContainerElement, \r\n                // not finalSize so all elements that are above it like border \r\n                // (with padding and border) are taken into account\r\n                IEnumerable<Tuple<Rect, TreeMapNode>> measuredRectangles = ComputeRectangles(\r\n                    root,\r\n                    new Rect(0, 0, ContainerElement.ActualWidth, ContainerElement.ActualHeight));\r\n\r\n                // Position everything\r\n                foreach (Tuple<Rect, TreeMapNode> rectangle in measuredRectangles)\r\n                {\r\n                    FrameworkElement element = rectangle.Item2.Element;\r\n                    if (element != null)\r\n                    {\r\n                        double roundedTop = Math.Round(rectangle.Item1.Top);\r\n                        double roundedLeft = Math.Round(rectangle.Item1.Left);\r\n                        double height = Math.Round(rectangle.Item1.Height + rectangle.Item1.Top) - roundedTop;\r\n                        double width = Math.Round(rectangle.Item1.Width + rectangle.Item1.Left) - roundedLeft;\r\n\r\n                        // Fully specify element location/size (setting size is required on WPF)\r\n                        Canvas.SetLeft(element, roundedLeft);\r\n                        Canvas.SetTop(element, roundedTop);\r\n                        element.Width = width;\r\n                        element.Height = height;\r\n\r\n                        element.Arrange(new Rect(roundedLeft, roundedTop, width, height));\r\n                    }\r\n                }\r\n            }\r\n\r\n            return finalSize;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Triggers a recalculation of the layout when items are added/removed from the Interpolators collection.\r\n        /// </summary>\r\n        /// <param name=\"sender\">Reference to the Interpolators collection.</param>\r\n        /// <param name=\"e\">Event handler arguments.</param>\r\n        private void OnInterpolatorsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)\r\n        {\r\n            RebuildTree();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a sequence of TreeMapNodes in breadth-first order.\r\n        /// </summary>\r\n        /// <returns>Sequence of TreeMapNodes.</returns>\r\n        private IEnumerable<TreeMapNode> GetTreeMapNodes()\r\n        {\r\n            if (_getTreeMapNodesCache == null)\r\n            {\r\n                // Create a new list\r\n                List<TreeMapNode> allNodes = new List<TreeMapNode>();\r\n\r\n                // Seed the queue with the roots\r\n                Queue<TreeMapNode> nodes = new Queue<TreeMapNode>();\r\n                foreach (TreeMapNode node in _nodeRoots ?? Enumerable.Empty<TreeMapNode>())\r\n                {\r\n                    nodes.Enqueue(node);\r\n                }\r\n                // Process the queue in breadth-first order\r\n                while (0 < nodes.Count)\r\n                {\r\n                    TreeMapNode node = nodes.Dequeue();\r\n                    allNodes.Add(node);\r\n                    foreach (TreeMapNode child in node.Children)\r\n                    {\r\n                        nodes.Enqueue(child);\r\n                    }\r\n                }\r\n\r\n                // Cache the list\r\n                _getTreeMapNodesCache = allNodes;\r\n            }\r\n\r\n            // Return the cached sequence\r\n            return _getTreeMapNodesCache;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Recursively computes TreeMap rectangles given the root node and the bounding rectangle as start.\r\n        /// </summary>\r\n        /// <param name=\"root\">Root of the TreeMapNode tree.</param>\r\n        /// <param name=\"boundingRectangle\">Bounding rectangle which will be sub-divided.</param>\r\n        /// <returns>A list of RectangularAreas containing a rectangle for each node in the tree.</returns>\r\n        private IEnumerable<Tuple<Rect, TreeMapNode>> ComputeRectangles(TreeMapNode root, Rect boundingRectangle)\r\n        {\r\n            Queue<Tuple<Rect, TreeMapNode>> treeQueue = new Queue<Tuple<Rect, TreeMapNode>>();\r\n            treeQueue.Enqueue(new Tuple<Rect, TreeMapNode>(boundingRectangle, root));\r\n\r\n            // Perform a breadth-first traversal of the tree\r\n            SquaringAlgorithm algorithm = new SquaringAlgorithm();\r\n            while (treeQueue.Count > 0)\r\n            {\r\n                Tuple<Rect, TreeMapNode> currentParent = treeQueue.Dequeue();\r\n\r\n                yield return currentParent;\r\n\r\n                foreach (Tuple<Rect, TreeMapNode> rectangle in\r\n                    algorithm.Split(currentParent.Item1, currentParent.Item2, currentParent.Item2.ChildItemPadding))\r\n                {\r\n                    treeQueue.Enqueue(rectangle);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Builds the parallel trees of TreeMapNodes with references to the original user's trees.\r\n        /// </summary>\r\n        /// <param name=\"nodes\">The list of roots of the user hierarchies (whatever was passed through ItemsSource).</param>\r\n        /// <param name=\"level\">Level being processed at this recursive call (the root node is at level 0).</param>\r\n        /// <returns>The list of roots of the internal trees of TreeMapNodes.</returns>\r\n        private IEnumerable<TreeMapNode> BuildTreeMapTree(IEnumerable nodes, int level)\r\n        {\r\n            List<TreeMapNode> retList = new List<TreeMapNode>();\r\n\r\n            if (nodes == null)\r\n            {\r\n                return retList;\r\n            }\r\n\r\n            foreach (object root in nodes)\r\n            {\r\n                // Give the template selector a chance to override the template for this item.\r\n                TreeMapItemDefinition template = null;\r\n                if (ItemDefinitionSelector != null)\r\n                {\r\n                    template = ItemDefinitionSelector.SelectItemDefinition(this, root, level);\r\n                }\r\n\r\n                // Use the default otherwise\r\n                if (template == null)\r\n                {\r\n                    template = ItemDefinition;\r\n                }\r\n\r\n                if (template == null)\r\n                {\r\n                    throw new ArgumentException(\r\n                        Properties.Resources.TreeMap_BuildTreeMapTree_TemplateNotSet);\r\n                }\r\n\r\n                // Silently create 0 elements if ValueBinding is set to null \r\n                // in the template\r\n                if (template.ValueBinding != null)\r\n                {\r\n                    IEnumerable objectChildren = (template.ItemsSource != null) ?\r\n                        _helper.RetrieveProperty(root, template.ItemsSource) as IEnumerable :\r\n                        null;\r\n                    IEnumerable<TreeMapNode> children = (objectChildren != null) ?\r\n                        BuildTreeMapTree(objectChildren, level + 1) :\r\n                        children = Enumerable.Empty<TreeMapNode>();\r\n\r\n                    // Subscribe to CollectionChanged for the collection\r\n                    WeakEventListener<TreeMap, object, NotifyCollectionChangedEventArgs> weakEventListener = null;\r\n                    INotifyCollectionChanged objectChildrenINotifyCollectionChanged = objectChildren as INotifyCollectionChanged;\r\n                    if (objectChildrenINotifyCollectionChanged != null)\r\n                    {\r\n                        // Use a WeakEventListener so that the backwards reference doesn't keep this object alive\r\n                        weakEventListener = new WeakEventListener<TreeMap, object, NotifyCollectionChangedEventArgs>(this);\r\n                        weakEventListener.OnEventAction = (instance, source, eventArgs) => instance.ItemsSourceCollectionChanged(source, eventArgs);\r\n                        weakEventListener.OnDetachAction = (wel) => objectChildrenINotifyCollectionChanged.CollectionChanged -= wel.OnEvent;\r\n                        objectChildrenINotifyCollectionChanged.CollectionChanged += weakEventListener.OnEvent;\r\n                    }\r\n\r\n                    // Auto-aggregate children area values\r\n                    double area;\r\n                    if (children.Any())\r\n                    {\r\n                        area = children.Sum(x => x.Area);\r\n                    }\r\n                    else\r\n                    {\r\n                        IConvertible value = _helper.RetrieveProperty(root, template.ValueBinding) as IConvertible;\r\n                        if (value == null)\r\n                        {\r\n                            // Provide a default value so there's something to display\r\n                            value = 1.0;\r\n                        }\r\n\r\n                        area = value.ToDouble(CultureInfo.InvariantCulture);\r\n                    }\r\n\r\n                    // Do not include elements with negative or 0 size in the\r\n                    // VisualTransition tree. We skip interpolation for such\r\n                    // elements as well\r\n                    if (area > 0)\r\n                    {\r\n                        // Calculate ranges for all interpolators, only consider leaf \r\n                        // nodes in the LeafNodesOnly mode, or all nodes in the AllNodes \r\n                        // mode.\r\n                        foreach (Interpolator interpolator in Interpolators)\r\n                        {\r\n                            if (interpolator.InterpolationMode == InterpolationMode.AllNodes || !children.Any())\r\n                            {\r\n                                interpolator.IncludeInRange(root);\r\n                            }\r\n                        }\r\n\r\n                        retList.Add(new TreeMapNode()\r\n                                        {\r\n                                            DataContext = root,\r\n                                            Level = level,\r\n                                            Area = area,\r\n                                            ItemDefinition = template,\r\n                                            ChildItemPadding = template.ChildItemPadding,\r\n                                            Children = children,\r\n                                            WeakEventListener = weakEventListener,\r\n                                        });\r\n                    }\r\n                }\r\n            }\r\n            \r\n            return retList;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Extracts all children from the user's trees (ItemsSource) into a flat list, and \r\n        /// creates UI elements for them.\r\n        /// </summary>\r\n        private void CreateChildren()\r\n        {\r\n            // Breadth-first traversal so elements closer to the root will be added first,\r\n            // so that leaf elements will show on top of them.\r\n            foreach (TreeMapNode current in GetTreeMapNodes())\r\n            {\r\n                // Create the UI element and keep a reference to it in our tree\r\n                FrameworkElement element = GetContainerForItemOverride(current.DataContext, current.Level);\r\n                if (element == null && current.ItemDefinition.ItemTemplate != null)\r\n                {\r\n                    element = current.ItemDefinition.ItemTemplate.LoadContent() as FrameworkElement;\r\n                }\r\n\r\n                // If an element was created\r\n                if (element != null)\r\n                {\r\n                    current.Element = element;\r\n\r\n                    // Apply interpolators to element\r\n                    foreach (Interpolator interpolator in Interpolators)\r\n                    {\r\n                        // Apply interpolators only for leaf nodes in the \r\n                        // LeafNodesOnly mode, or for all nodes in the AllNodes \r\n                        // mode.\r\n                        if (interpolator.InterpolationMode == InterpolationMode.AllNodes || !current.Children.Any())\r\n                        {\r\n                            DependencyObject target = element.FindName(interpolator.TargetName) as DependencyObject;\r\n                            if (target != null)\r\n                            {\r\n                                SetBinding(\r\n                                    InterpolatorValueProperty,\r\n                                    new Binding(interpolator.TargetProperty) { Source = target, Mode = BindingMode.TwoWay });\r\n\r\n                                if (interpolator.DataRangeBinding == null)\r\n                                {\r\n                                    throw new ArgumentException(\r\n                                        Properties.Resources.TreeMap_CreateChildren_InterpolatorBindingNotSet);\r\n                                }\r\n\r\n                                // Extract the current value to interpolate\r\n                                IConvertible value =\r\n                                    _helper.RetrieveProperty(current.DataContext, interpolator.DataRangeBinding) as\r\n                                    IConvertible;\r\n                                if (value == null)\r\n                                {\r\n                                    throw new ArgumentException(\r\n                                        Properties.Resources.Interpolator_IncludeInRange_DataRangeBindingNotIConvertible);\r\n                                }\r\n\r\n                                // This will update the TargetProperty of the TargetName object\r\n                                InterpolatorValue = interpolator.Interpolate(value.ToDouble(CultureInfo.InvariantCulture));\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    // Add new child to the panel\r\n                    element.DataContext = current.DataContext;\r\n                    ContainerElement.Children.Add(element);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called internally whenever a property of TreeMap is changed and the internal \r\n        /// structures need to be rebuilt in order to recalculate the layout.\r\n        /// </summary>\r\n        private void RebuildTree()\r\n        {\r\n            if (ContainerElement != null)\r\n            {\r\n                // Unhook from CollectionChanged\r\n                foreach (TreeMapNode treeMapNode in GetTreeMapNodes().Where(n => n.WeakEventListener != null))\r\n                {\r\n                    treeMapNode.WeakEventListener.Detach();\r\n                }\r\n\r\n                // Reset all interpolators\r\n                foreach (Interpolator interpolator in Interpolators)\r\n                {\r\n                    interpolator.ActualDataMinimum = double.PositiveInfinity;\r\n                    interpolator.ActualDataMaximum = double.NegativeInfinity;\r\n                    interpolator.DataContext = this.DataContext;\r\n                }\r\n\r\n                // Build the parallel tree of TreeMapNodes needed by the algorithm\r\n                _nodeRoots = BuildTreeMapTree(ItemsSource, 0);\r\n\r\n                // Clear cache\r\n                _getTreeMapNodesCache = null;\r\n\r\n                // Populate the TreeMap panel with a flat list of all children\r\n                // in the hierarchy passed in.\r\n                ContainerElement.Children.Clear();\r\n                CreateChildren();\r\n\r\n                // Refresh UI\r\n                InvalidateArrange();\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/TreeMap/TreeMapItemDefinition.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.ComponentModel;\r\nusing System.Windows.Data;\r\nusing System.Windows.Markup;\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// Represents a class that defines various aspects of TreeMap items.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    [ContentProperty(\"ItemTemplate\")]\r\n    public class TreeMapItemDefinition : INotifyPropertyChanged\r\n    {\r\n        /// <summary>\r\n        /// A value representing the DataTemplate to instantiate in \r\n        /// order to create a representation of each TreeMap item.\r\n        /// </summary>\r\n        private DataTemplate _itemTemplate;\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value representing the DataTemplate to instantiate in \r\n        /// order to create a representation of each TreeMap item.\r\n        /// </summary>\r\n        public DataTemplate ItemTemplate\r\n        {\r\n            get { return _itemTemplate; }\r\n            set\r\n            {\r\n                if (value != _itemTemplate)\r\n                {\r\n                    _itemTemplate = value;\r\n                    NotifyPropertyChanged(\"ItemTemplate\");\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// A value representing a binding which can be used \r\n        /// to retrieve the value associated with each item, needed to calculate \r\n        /// relative areas of TreeMap items.        \r\n        /// </summary>\r\n        private Binding _valueBinding;\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value representing a binding which can be used \r\n        /// to retrieve the value associated with each item, needed to calculate \r\n        /// relative areas of TreeMap items.\r\n        /// </summary>\r\n        public Binding ValueBinding\r\n        {\r\n            get { return _valueBinding; }\r\n            set\r\n            {\r\n                if (value != _valueBinding)\r\n                {\r\n                    _valueBinding = value;\r\n                    NotifyPropertyChanged(\"ValueBinding\");\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Value Path used to set ValueBinding for retrieving \r\n        /// the value associated with each item, needed to calculate relative \r\n        /// areas of TreeMap items.\r\n        /// </summary>\r\n        public string ValuePath\r\n        {\r\n            get { return (null != ValueBinding) ? ValueBinding.Path.Path : null; }\r\n            set\r\n            {\r\n                if (value != ValuePath)\r\n                {\r\n                    if (null == value)\r\n                    {\r\n                        ValueBinding = null;\r\n                    }\r\n                    else\r\n                    {\r\n                        ValueBinding = new Binding(value);\r\n                    }\r\n\r\n                    // PropertyChanged(); thru ValueBinding\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// The binding that indicates where to find the collection\r\n        /// that represents the next level in the data hierarchy.\r\n        /// </summary>\r\n        private Binding _itemsSource;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the binding that indicates where to find the collection\r\n        /// that represents the next level in the data hierarchy.\r\n        /// </summary>\r\n        public Binding ItemsSource\r\n        {\r\n            get { return _itemsSource; }\r\n            set\r\n            {\r\n                if (value != _itemsSource)\r\n                {\r\n                    _itemsSource = value;\r\n                    NotifyPropertyChanged(\"ItemsSource\");\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// A property representing the amount of space to leave \r\n        /// between a parent item and its children.\r\n        /// </summary>\r\n        private Thickness _childItemPadding;\r\n\r\n        /// <summary>\r\n        /// Gets or sets a property representing the amount of space to leave \r\n        /// between a parent item and its children.\r\n        /// </summary>\r\n        public Thickness ChildItemPadding\r\n        {\r\n            get { return _childItemPadding; }\r\n            set\r\n            {\r\n                if (value != _childItemPadding)\r\n                {\r\n                    _childItemPadding = value;\r\n                    NotifyPropertyChanged(\"ChildItemPadding\");\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the TreeMapItemDefinition class.\r\n        /// </summary>\r\n        public TreeMapItemDefinition()\r\n        {\r\n            ChildItemPadding = new Thickness(0);\r\n        }\r\n\r\n        /// <summary>\r\n        /// PropertyChanged event required by INotifyPropertyChanged.\r\n        /// </summary>\r\n        public event PropertyChangedEventHandler PropertyChanged;\r\n\r\n        /// <summary>\r\n        /// Updates the TreeMap if one of properties changes.\r\n        /// </summary>\r\n        /// <param name=\"parameterName\">The parameter name.</param>\r\n        protected void NotifyPropertyChanged(string parameterName)\r\n        {\r\n            PropertyChangedEventHandler handler = PropertyChanged;\r\n            if (handler != null)\r\n            {\r\n                handler(this, new PropertyChangedEventArgs(parameterName));\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/TreeMap/TreeMapItemDefinitionSelector.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.ObjectModel;\r\nusing System.Windows.Markup;\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// Provides a way to choose a TreeMapItemDefinition based on the data item and \r\n    /// the level of the item in the tree.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public abstract class TreeMapItemDefinitionSelector\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the TreeMapItemDefinitionSelector class.\r\n        /// </summary>\r\n        protected TreeMapItemDefinitionSelector()\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns an instance of a TreeMapItemDefinition class used to specify properties for the\r\n        /// current item.\r\n        /// </summary>\r\n        /// <param name=\"treeMap\">Reference to the TreeMap class.</param>\r\n        /// <param name=\"item\">One of the nodes in the ItemsSource hierarchy.</param>\r\n        /// <param name=\"level\">The level of the node in the hierarchy.</param>\r\n        /// <returns>The TreeMapItemDefinition to be used for this node. If this method returns null\r\n        /// the TreeMap will use the value of its ItemDefinition property.</returns>\r\n        public abstract TreeMapItemDefinition SelectItemDefinition(TreeMap treeMap, object item, int level);\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DataVisualization/Tuple.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// Represents a 2-tuple, or pair.\r\n    /// </summary>\r\n    /// <typeparam name=\"T1\">The type of the tuple's first component.</typeparam>\r\n    /// <typeparam name=\"T2\">The type of the tuple's second component.</typeparam>\r\n    internal class Tuple<T1, T2>\r\n    {\r\n        /// <summary>\r\n        /// Gets the value of the current Tuple(T1, T2) object's first component.\r\n        /// </summary>\r\n        public T1 Item1 { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Gets the value of the current Tuple(T1, T2) object's second component.\r\n        /// </summary>\r\n        public T2 Item2 { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the Tuple(T1, T2) class.\r\n        /// </summary>\r\n        /// <param name=\"item1\">The value of the tuple's first component.</param>\r\n        /// <param name=\"item2\">The value of the tuple's second component.</param>\r\n        public Tuple(T1 item1, T2 item2)\r\n        {\r\n            Item1 = item1;\r\n            Item2 = item2;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/UniqueObservableCollection.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// An observable collection that does not allow duplicates.\r\n    /// </summary>\r\n    /// <typeparam name=\"T\">The type of items in the collection.</typeparam>\r\n    internal class UniqueObservableCollection<T> : ObservableCollection<T>\r\n    {\r\n        /// <summary>\r\n        /// Inserts an item at an index. Throws if the item already exists in the collection.\r\n        /// </summary>\r\n        /// <param name=\"index\">The index at which to insert the item.</param>\r\n        /// <param name=\"item\">The item to insert.</param>\r\n        protected override void InsertItem(int index, T item)\r\n        {\r\n            if (!this.Contains(item))\r\n            {\r\n                base.InsertItem(index, item);\r\n            }\r\n            else\r\n            {\r\n                throw new InvalidOperationException(Properties.Resources.UniqueObservableCollection_InvalidAttemptToInsertADuplicateItem);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Sets an item at a given index. Throws if the item already exists at another index.\r\n        /// </summary>\r\n        /// <param name=\"index\">The index at which to insert the item.</param>\r\n        /// <param name=\"item\">The item to be inserted.</param>\r\n        protected override void SetItem(int index, T item)\r\n        {\r\n            int newItemIndex = this.IndexOf(item);\r\n            if (newItemIndex != -1 && newItemIndex != index)\r\n            {\r\n                throw new InvalidOperationException(Properties.Resources.UniqueObservableCollection_InvalidAttemptToInsertADuplicateItem);\r\n            }\r\n            else\r\n            {\r\n                base.SetItem(index, item);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Clears all items in the collection by removing them individually.\r\n        /// </summary>\r\n        protected override void ClearItems()\r\n        {\r\n            IList<T> items = new List<T>(this);\r\n            foreach (T item in items)\r\n            {\r\n                Remove(item);\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/Unit.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// Units of measure.\r\n    /// </summary>\r\n    public enum Unit\r\n    {\r\n        /// <summary>\r\n        /// The corresponding value is in pixels.\r\n        /// </summary>\r\n        Pixels,\r\n\r\n        /// <summary>\r\n        /// The corresponding value is in degrees.\r\n        /// </summary>\r\n        Degrees,\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/UnitValue.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// A value in units.\r\n    /// </summary>\r\n    public struct UnitValue : IComparable\r\n    {\r\n        /// <summary>\r\n        /// Returns a UnitValue representing an invalid value.\r\n        /// </summary>\r\n        /// <returns>UnitValue instance.</returns>\r\n        public static UnitValue NaN()\r\n        {\r\n            return new UnitValue { Value = double.NaN };\r\n        }\r\n\r\n        /// <summary>\r\n        /// Instantiates a new instance of the UnitValue struct.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value associated with the units.</param>\r\n        /// <param name=\"unit\">The units associated with the value.</param>\r\n        public UnitValue(double value, Unit unit) : this()\r\n        {\r\n            Value = value;\r\n            Unit = unit;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the value associated with the units.\r\n        /// </summary>\r\n        public double Value { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Gets the units associated with the value.\r\n        /// </summary>\r\n        public Unit Unit { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Compares two unit values to determine if they are equal or not.\r\n        /// </summary>\r\n        /// <param name=\"obj\">The object being compared.</param>\r\n        /// <returns>A number smaller than zero if the obj is larger than this\r\n        /// object.  A number equal to 0 if they are equal.  A number greater \r\n        /// than zero if this unit value is greater than obj.</returns>\r\n        public int CompareTo(object obj)\r\n        {\r\n            UnitValue unitValue = (UnitValue) obj;\r\n\r\n            if (unitValue.Unit != this.Unit)\r\n            {\r\n                throw new InvalidOperationException(\"Cannot compare two unit values with different units.\");\r\n            }\r\n\r\n            return this.Value.CompareTo(unitValue.Value);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Determines if two values are equal.\r\n        /// </summary>\r\n        /// <param name=\"obj\">The other value.</param>\r\n        /// <returns>A value indicating whether values are equal.</returns>\r\n        public override bool Equals(object obj)\r\n        {\r\n            if (!(obj is UnitValue))\r\n            {\r\n                return false;\r\n            }\r\n            UnitValue unitValue = (UnitValue)obj;\r\n\r\n            if ((Object.ReferenceEquals(unitValue.Value, this.Value) || Object.Equals(unitValue.Value, this.Value)) && unitValue.Unit == this.Unit)\r\n            {\r\n                return true;\r\n            }\r\n            return false;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Determines whether two unit value objects are equal.\r\n        /// </summary>\r\n        /// <param name=\"left\">The left unit value.</param>\r\n        /// <param name=\"right\">The right unit value.</param>\r\n        /// <returns>A value indicating  whether two unit value objects are \r\n        /// equal.</returns>\r\n        public static bool operator ==(UnitValue left, UnitValue right)\r\n        {\r\n            return left.Equals(right);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Determines whether two unit value objects are not equal.\r\n        /// </summary>\r\n        /// <param name=\"left\">The left unit value.</param>\r\n        /// <param name=\"right\">The right unit value.</param>\r\n        /// <returns>A value indicating whether two unit value objects are not\r\n        /// equal.</returns>\r\n        public static bool operator !=(UnitValue left, UnitValue right)\r\n        {\r\n            return !left.Equals(right);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Determines whether the left value is smaller than the right.\r\n        /// </summary>\r\n        /// <param name=\"left\">The left unit value.</param>\r\n        /// <param name=\"right\">The right unit value.</param>\r\n        /// <returns>A value indicating whether the left value is smaller than\r\n        /// the right.</returns>\r\n        public static bool operator <(UnitValue left, UnitValue right)\r\n        {\r\n            return left.CompareTo(right) < 0;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Determines whether the left value is larger than the right.\r\n        /// </summary>\r\n        /// <param name=\"left\">The left unit value.</param>\r\n        /// <param name=\"right\">The right unit value.</param>\r\n        /// <returns>A value indicating whether the left value is larger than\r\n        /// the right.</returns>\r\n        public static bool operator >(UnitValue left, UnitValue right)\r\n        {\r\n            return left.CompareTo(right) > 0;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the hash code of the unit value object.\r\n        /// </summary>\r\n        /// <returns>The hash code.</returns>\r\n        public override int GetHashCode()\r\n        {\r\n            unchecked\r\n            {\r\n                return this.Value.GetHashCode() + (int)this.Unit;\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/ValueHelper.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Globalization;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Diagnostics;\r\nusing System.Windows;\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// A set of functions for data conversion operations.\r\n    /// </summary>\r\n    internal static class ValueHelper\r\n    {\r\n        /// <summary>\r\n        /// The value of a single radian.\r\n        /// </summary>\r\n        public const double Radian = Math.PI / 180.0;\r\n\r\n        /// <summary>\r\n        /// Returns a value indicating whether this value can be graphed on a \r\n        /// linear axis.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value to evaluate.</param>\r\n        /// <returns>A value indicating whether this value can be graphed on a \r\n        /// linear axis.</returns>\r\n        public static bool CanGraph(double value)\r\n        {\r\n            return !double.IsNaN(value) && !double.IsNegativeInfinity(value) && !double.IsPositiveInfinity(value) && !double.IsInfinity(value);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Attempts to convert an object into a double.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value to convert.</param>\r\n        /// <param name=\"doubleValue\">The double value.</param>\r\n        /// <returns>A value indicating whether the value can be converted to a \r\n        /// double.</returns>\r\n        public static bool TryConvert(object value, out double doubleValue)\r\n        {\r\n            doubleValue = default(double);\r\n            try\r\n            {\r\n                if (value != null && \r\n                    (value is double\r\n                    || value is int\r\n                    || value is byte\r\n                    || value is short\r\n                    || value is decimal\r\n                    || value is float\r\n                    || value is long\r\n                    || value is uint\r\n                    || value is sbyte\r\n                    || value is ushort\r\n                    || value is ulong))\r\n                {\r\n                    doubleValue = ValueHelper.ToDouble(value);\r\n                    return true;\r\n                }\r\n            }\r\n            catch (FormatException)\r\n            {\r\n            }\r\n            catch (InvalidCastException)\r\n            {\r\n            }\r\n            return false;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Attempts to convert an object into a date time.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value to convert.</param>\r\n        /// <param name=\"dateTimeValue\">The double value.</param>\r\n        /// <returns>A value indicating whether the value can be converted to a \r\n        /// date time.</returns>\r\n        public static bool TryConvert(object value, out DateTime dateTimeValue)\r\n        {\r\n            dateTimeValue = default(DateTime);\r\n            if (value != null && value is DateTime)\r\n            {\r\n                dateTimeValue = (DateTime)value;\r\n                return true;\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        /////// <summary>\r\n        /////// Converts a value in an IComparable.\r\n        /////// </summary>\r\n        /////// <param name=\"value\">The value to convert.</param>\r\n        /////// <returns>The converted value.</returns>\r\n        ////public static IComparable ToComparable(object value)\r\n        ////{\r\n        ////    double doubleValue;\r\n        ////    DateTime dateTimeValue;\r\n        ////    if (TryConvert(value, out doubleValue))\r\n        ////    {\r\n        ////        return doubleValue;\r\n        ////    }\r\n        ////    else if (TryConvert(value, out dateTimeValue))\r\n        ////    {\r\n        ////        return dateTimeValue;\r\n        ////    }\r\n        ////    IComparable comparable = value as IComparable;\r\n        ////    return (comparable != null);\r\n        ////}\r\n\r\n        /// <summary>\r\n        /// Converts an object into a double.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value to convert to a double.</param>\r\n        /// <returns>The converted double value.</returns>\r\n        public static double ToDouble(object value)\r\n        {\r\n            return Convert.ToDouble(value, CultureInfo.InvariantCulture);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Converts a value to a date.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value to convert to a date.</param>\r\n        /// <returns>The converted date value.</returns>\r\n        public static DateTime ToDateTime(object value)\r\n        {\r\n            return Convert.ToDateTime(value, CultureInfo.InvariantCulture);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a sequence of date time values from a start and end date \r\n        /// time inclusive.\r\n        /// </summary>\r\n        /// <param name=\"start\">The start date time.</param>\r\n        /// <param name=\"end\">The end date time.</param>\r\n        /// <param name=\"count\">The number of values to return.</param>\r\n        /// <returns>A sequence of date time values.</returns>\r\n        public static IEnumerable<DateTime> GetDateTimesBetweenInclusive(DateTime start, DateTime end, long count)\r\n        {\r\n            Debug.Assert(count >= 2L, \"Count must be at least 2.\");\r\n\r\n            return GetIntervalsInclusive(start.Ticks, end.Ticks, count).Select(value => new DateTime(value));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a sequence of time span values within a time span inclusive.\r\n        /// </summary>\r\n        /// <param name=\"timeSpan\">The time span to split.</param>\r\n        /// <param name=\"count\">The number of time spans to return.</param>\r\n        /// <returns>A sequence of time spans.</returns>\r\n        public static IEnumerable<TimeSpan> GetTimeSpanIntervalsInclusive(TimeSpan timeSpan, long count)\r\n        {\r\n            Debug.Assert(count >= 2L, \"Count must be at least 2.\");\r\n\r\n            long distance = timeSpan.Ticks;\r\n\r\n            return GetIntervalsInclusive(0, distance, count).Select(value => new TimeSpan(value));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns that intervals between a start and end value, including those\r\n        /// start and end values.\r\n        /// </summary>\r\n        /// <param name=\"start\">The start value.</param>\r\n        /// <param name=\"end\">The end value.</param>\r\n        /// <param name=\"count\">The total number of intervals.</param>\r\n        /// <returns>A sequence of intervals.</returns>\r\n        public static IEnumerable<long> GetIntervalsInclusive(long start, long end, long count)\r\n        {\r\n            Debug.Assert(count >= 2L, \"Count must be at least 2.\");\r\n\r\n            long interval = end - start;\r\n            for (long index = 0; index < count; index++)\r\n            {\r\n                double ratio = (double)index / (double)(count - 1);\r\n                long value = (long)((ratio * interval) + start);\r\n                yield return value;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes the noise from double math.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value.</param>\r\n        /// <returns>A double without a noise.</returns>\r\n        internal static double RemoveNoiseFromDoubleMath(double value)\r\n        {\r\n            if (value == 0.0 || Math.Abs((Math.Log10(Math.Abs(value)))) < 27)\r\n            {\r\n                return (double)((decimal)value);\r\n            }\r\n            return Double.Parse(value.ToString(CultureInfo.InvariantCulture), CultureInfo.InvariantCulture);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Converts a range into a double range.\r\n        /// </summary>\r\n        /// <param name=\"range\">The range to convert.</param>\r\n        /// <returns>A range with its members converted to doubles.</returns>\r\n        public static Range<double> ToDoubleRange(this Range<IComparable> range)\r\n        {\r\n            if (!range.HasData)\r\n            {\r\n                return new Range<double>();\r\n            }\r\n            else\r\n            {\r\n                return new Range<double>((double)range.Minimum, (double)range.Maximum);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Converts a range into a date time range.\r\n        /// </summary>\r\n        /// <param name=\"range\">The range to convert.</param>\r\n        /// <returns>A range with its members converted to date times.\r\n        /// </returns>\r\n        public static Range<DateTime> ToDateTimeRange(this Range<IComparable> range)\r\n        {\r\n            if (!range.HasData)\r\n            {\r\n                return new Range<DateTime>();\r\n            }\r\n            else\r\n            {\r\n                return new Range<DateTime>((DateTime)range.Minimum, (DateTime)range.Maximum);\r\n            }\r\n        }\r\n\r\n        /////// <summary>\r\n        /////// Returns the point given an angle and a distanceFromOrigin.\r\n        /////// </summary>\r\n        /////// <param name=\"angle\">The angle of orientation.</param>\r\n        /////// <param name=\"distanceFromOrigin\">The radius.</param>\r\n        /////// <returns>The point calculated from the angle and radius.</returns>\r\n        ////public static Point GetPoint(double angle, double distanceFromOrigin)\r\n        ////{\r\n        ////    return new Point(Math.Cos(angle * Radian) * distanceFromOrigin, Math.Sin(angle * Radian) * distanceFromOrigin);\r\n        ////}\r\n\r\n        /// <summary>\r\n        /// Compares two IComparables returning -1 if the left is null and 1 if\r\n        /// the right is null.\r\n        /// </summary>\r\n        /// <param name=\"left\">The left comparable.</param>\r\n        /// <param name=\"right\">The right comparable.</param>\r\n        /// <returns>A value indicating which is larger.</returns>\r\n        public static int Compare(IComparable left, IComparable right)\r\n        {\r\n            if (left == null && right == null)\r\n            {\r\n                return 0;\r\n            }\r\n            else if (left == null && right != null)\r\n            {\r\n                return -1;\r\n            }\r\n            else if (left != null && right == null)\r\n            {\r\n                return 1;\r\n            }\r\n            else\r\n            {\r\n                return left.CompareTo(right);\r\n            }    \r\n        }\r\n\r\n        /// <summary>\r\n        /// Applies the translate transform to a point.\r\n        /// </summary>\r\n        /// <param name=\"origin\">The origin point.</param>\r\n        /// <param name=\"offset\">The offset point.</param>\r\n        /// <returns>The translated point.</returns>\r\n        public static Point Translate(this Point origin, Point offset)\r\n        {\r\n            return new Point(origin.X + offset.X, origin.Y + offset.Y);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Converts any range to a range of IComparable.\r\n        /// </summary>\r\n        /// <param name=\"range\">The range to be converted.</param>\r\n        /// <returns>The new range type.</returns>\r\n        public static Range<IComparable> ToComparableRange(this Range<double> range)\r\n        {\r\n            if (range.HasData)\r\n            {\r\n                return new Range<IComparable>(range.Minimum, range.Maximum);\r\n            }\r\n            else\r\n            {\r\n                return new Range<IComparable>();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the left value of the rectangle.\r\n        /// </summary>\r\n        /// <param name=\"rectangle\">The rectangle.</param>\r\n        /// <param name=\"value\">The default value.</param>\r\n        /// <returns>The left value of the rectangle.</returns>\r\n        public static double LeftOrDefault(this Rect rectangle, double value)\r\n        {\r\n            return rectangle.IsEmpty ? value : rectangle.Left;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the right value of the rectangle.\r\n        /// </summary>\r\n        /// <param name=\"rectangle\">The rectangle.</param>\r\n        /// <param name=\"value\">The default value.</param>\r\n        /// <returns>The right value of the rectangle.</returns>\r\n        public static double RightOrDefault(this Rect rectangle, double value)\r\n        {\r\n            return rectangle.IsEmpty ? value : rectangle.Right;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the width value of the rectangle.\r\n        /// </summary>\r\n        /// <param name=\"rectangle\">The rectangle.</param>\r\n        /// <param name=\"value\">The default value.</param>\r\n        /// <returns>The width value of the rectangle.</returns>\r\n        public static double WidthOrDefault(this Rect rectangle, double value)\r\n        {\r\n            return rectangle.IsEmpty ? value : rectangle.Width;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the height value of the rectangle.\r\n        /// </summary>\r\n        /// <param name=\"rectangle\">The rectangle.</param>\r\n        /// <param name=\"value\">The default value.</param>\r\n        /// <returns>The height value of the rectangle.</returns>\r\n        public static double HeightOrDefault(this Rect rectangle, double value)\r\n        {\r\n            return rectangle.IsEmpty ? value : rectangle.Height;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the bottom value of the rectangle.\r\n        /// </summary>\r\n        /// <param name=\"rectangle\">The rectangle.</param>\r\n        /// <param name=\"value\">The default value.</param>\r\n        /// <returns>The bottom value of the rectangle.</returns>\r\n        public static double BottomOrDefault(this Rect rectangle, double value)\r\n        {\r\n            return rectangle.IsEmpty ? value : rectangle.Bottom;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the top value of the rectangle.\r\n        /// </summary>\r\n        /// <param name=\"rectangle\">The rectangle.</param>\r\n        /// <param name=\"value\">The default value.</param>\r\n        /// <returns>The top value of the rectangle.</returns>\r\n        public static double TopOrDefault(this Rect rectangle, double value)\r\n        {\r\n            return rectangle.IsEmpty ? value : rectangle.Top;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Converts any range to a range of IComparable.\r\n        /// </summary>\r\n        /// <param name=\"range\">The range to be converted.</param>\r\n        /// <returns>The new range type.</returns>\r\n        public static Range<IComparable> ToComparableRange(this Range<DateTime> range)\r\n        {\r\n            if (range.HasData)\r\n            {\r\n                return new Range<IComparable>(range.Minimum, range.Maximum);\r\n            }\r\n            else\r\n            {\r\n                return new Range<IComparable>();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the time span of a date range.\r\n        /// </summary>\r\n        /// <param name=\"range\">The range of values.</param>\r\n        /// <returns>The length of the range.</returns>\r\n        public static TimeSpan? GetLength(this Range<DateTime> range)\r\n        {\r\n            return range.HasData ? range.Maximum - range.Minimum : new TimeSpan?();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the time span of a date range.\r\n        /// </summary>\r\n        /// <param name=\"range\">The range of values.</param>\r\n        /// <returns>The length of the range.</returns>\r\n        public static double? GetLength(this Range<double> range)\r\n        {\r\n            return range.HasData ? range.Maximum - range.Minimum : new double?();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a value indicating whether a rectangle is empty or has\r\n        /// no width or height.\r\n        /// </summary>\r\n        /// <param name=\"rect\">The rectangle.</param>\r\n        /// <returns>A value indicating whether a rectangle is empty or has\r\n        /// no width or height.</returns>\r\n        public static bool IsEmptyOrHasNoSize(this Rect rect)\r\n        {\r\n            return rect.IsEmpty || (rect.Width == 0 && rect.Height == 0);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Sets the style property of an element.\r\n        /// </summary>\r\n        /// <param name=\"element\">The element.</param>\r\n        /// <param name=\"style\">The style.</param>\r\n        public static void SetStyle(this FrameworkElement element, Style style)\r\n        {\r\n            element.Style = style;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/WeakEventListener.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Diagnostics.CodeAnalysis;\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Implements a weak event listener that allows the owner to be garbage\r\n    /// collected if its only remaining link is an event handler.\r\n    /// </summary>\r\n    /// <typeparam name=\"TInstance\">Type of instance listening for the event.</typeparam>\r\n    /// <typeparam name=\"TSource\">Type of source for the event.</typeparam>\r\n    /// <typeparam name=\"TEventArgs\">Type of event arguments for the event.</typeparam>\r\n    [SuppressMessage(\"Microsoft.Performance\", \"CA1812:AvoidUninstantiatedInternalClasses\", Justification = \"Used as link target in several projects.\")]\r\n    internal class WeakEventListener<TInstance, TSource, TEventArgs> where TInstance : class\r\n    {\r\n        /// <summary>\r\n        /// WeakReference to the instance listening for the event.\r\n        /// </summary>\r\n        private WeakReference _weakInstance;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the method to call when the event fires.\r\n        /// </summary>\r\n        public Action<TInstance, TSource, TEventArgs> OnEventAction { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the method to call when detaching from the event.\r\n        /// </summary>\r\n        public Action<WeakEventListener<TInstance, TSource, TEventArgs>> OnDetachAction { get; set; }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instances of the WeakEventListener class.\r\n        /// </summary>\r\n        /// <param name=\"instance\">Instance subscribing to the event.</param>\r\n        public WeakEventListener(TInstance instance)\r\n        {\r\n            if (null == instance)\r\n            {\r\n                throw new ArgumentNullException(\"instance\");\r\n            }\r\n            _weakInstance = new WeakReference(instance);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handler for the subscribed event calls OnEventAction to handle it.\r\n        /// </summary>\r\n        /// <param name=\"source\">Event source.</param>\r\n        /// <param name=\"eventArgs\">Event arguments.</param>\r\n        public void OnEvent(TSource source, TEventArgs eventArgs)\r\n        {\r\n            TInstance target = (TInstance)_weakInstance.Target;\r\n            if (null != target)\r\n            {\r\n                // Call registered action\r\n                if (null != OnEventAction)\r\n                {\r\n                    OnEventAction(target, source, eventArgs);\r\n                }\r\n            }\r\n            else\r\n            {\r\n                // Detach from event\r\n                Detach();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Detaches from the subscribed event.\r\n        /// </summary>\r\n        public void Detach()\r\n        {\r\n            if (null != OnDetachAction)\r\n            {\r\n                OnDetachAction(this);\r\n                OnDetachAction = null;\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DataVisualization/WeakReferenceBag.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\n\r\nnamespace System.Windows.Controls.DataVisualization\r\n{\r\n    /// <summary>\r\n    /// A bag of weak references to items.\r\n    /// </summary>\r\n    /// <typeparam name=\"T\">The type of the item.</typeparam>\r\n    internal class WeakReferenceBag<T> : IEnumerable<T>\r\n        where T : class\r\n    {\r\n        /// <summary>\r\n        /// Gets or sets the list of event listeners.\r\n        /// </summary>\r\n        private IList<WeakReference> Items { get; set; }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the WeakEvent class.\r\n        /// </summary>\r\n        public WeakReferenceBag()\r\n        {\r\n            this.Items = new List<WeakReference>();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Adds an item to the bag.\r\n        /// </summary>\r\n        /// <param name=\"item\">The item to add to the bag.</param>\r\n        public void Add(T item)\r\n        {\r\n            Debug.Assert(item != null, \"listener must not be null.\");\r\n            this.Items.Add(new WeakReference(item));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes an item from the bag.\r\n        /// </summary>\r\n        /// <param name=\"item\">The item to remove.</param>\r\n        public void Remove(T item)\r\n        {\r\n            Debug.Assert(item != null, \"listener must not be null.\");\r\n            int count = 0;\r\n            while (count < this.Items.Count)\r\n            {\r\n                object target = this.Items[count].Target;\r\n                if (!this.Items[count].IsAlive || object.ReferenceEquals(target, item))\r\n                {\r\n                    this.Items.RemoveAt(count);\r\n                }\r\n                else\r\n                {\r\n                    count++;\r\n                }\r\n            }\r\n        }\r\n    \r\n        /// <summary>\r\n        /// Returns a sequence of the elements in the bag.\r\n        /// </summary>\r\n        /// <returns>A sequence of the elements in the bag.</returns>\r\n        public IEnumerator<T> GetEnumerator()\r\n        {\r\n            int count = 0;\r\n            while (count < this.Items.Count)\r\n            {\r\n                object target = this.Items[count].Target;\r\n                if (!this.Items[count].IsAlive)\r\n                {\r\n                    this.Items.RemoveAt(count);\r\n                }\r\n                else\r\n                {\r\n                    yield return (T)target;\r\n                    count++;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a sequence of the elements in the bag.\r\n        /// </summary>\r\n        /// <returns>A sequence of the elements in the bag.</returns>\r\n        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()\r\n        {\r\n            return ((IEnumerable<T>) this).GetEnumerator();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/DatePicker/Microsoft/Windows/Automation/Peers/DatePickerAutomationPeer.cs",
    "content": "﻿//---------------------------------------------------------------------------\r\n//\r\n// Copyright (C) Microsoft Corporation.  All rights reserved.\r\n//\r\n//---------------------------------------------------------------------------\r\n\r\nusing System.Windows.Automation;\r\nusing System.Windows.Automation.Peers;\r\nusing System.Windows.Automation.Provider;\r\nusing Microsoft.Windows.Controls;\r\n\r\nnamespace Microsoft.Windows.Automation.Peers\r\n{\r\n    /// <summary>\r\n    /// AutomationPeer for DatePicker Control\r\n    /// </summary>\r\n    public sealed class DatePickerAutomationPeer : FrameworkElementAutomationPeer, IExpandCollapseProvider, IValueProvider\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the AutomationPeer for DatePicker control.\r\n        /// </summary>\r\n        /// <param name=\"owner\">DatePicker</param>\r\n        public DatePickerAutomationPeer(DatePicker owner)\r\n            : base(owner)\r\n        {\r\n        }\r\n\r\n        #region Private Properties\r\n\r\n        private DatePicker OwningDatePicker\r\n        {\r\n            get\r\n            {\r\n                return this.Owner as DatePicker;\r\n            }\r\n        }\r\n\r\n        #endregion Private Properties\r\n\r\n        #region Public Methods\r\n\r\n        /// <summary>\r\n        /// Gets the control pattern that is associated with the specified System.Windows.Automation.Peers.PatternInterface.\r\n        /// </summary>\r\n        /// <param name=\"patternInterface\">A value from the System.Windows.Automation.Peers.PatternInterface enumeration.</param>\r\n        /// <returns>The object that supports the specified pattern, or null if unsupported.</returns>\r\n        public override object GetPattern(PatternInterface patternInterface)\r\n        {\r\n            if (patternInterface == PatternInterface.ExpandCollapse || patternInterface == PatternInterface.Value)\r\n            {\r\n                return this;\r\n            }\r\n\r\n            return base.GetPattern(patternInterface);\r\n        }\r\n\r\n        #endregion Public Methods\r\n\r\n        #region Protected Methods\r\n\r\n        /// <summary>\r\n        /// Gets the control type for the element that is associated with the UI Automation peer.\r\n        /// </summary>\r\n        /// <returns>The control type.</returns>\r\n        protected override AutomationControlType GetAutomationControlTypeCore()\r\n        {\r\n            return AutomationControlType.Custom;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called by GetClassName that gets a human readable name that, in addition to AutomationControlType, \r\n        /// differentiates the control represented by this AutomationPeer.\r\n        /// </summary>\r\n        /// <returns>The string that contains the name.</returns>\r\n        protected override string GetClassNameCore()\r\n        {\r\n            return Owner.GetType().Name;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Overrides the GetLocalizedControlTypeCore method for DatePicker\r\n        /// </summary>\r\n        /// <returns></returns>\r\n        protected override string GetLocalizedControlTypeCore()\r\n        {\r\n            return SR.Get(SRID.DatePickerAutomationPeer_LocalizedControlType);\r\n        }\r\n\r\n        #endregion Protected Methods\r\n\r\n        #region IExpandCollapseProvider\r\n\r\n        ExpandCollapseState IExpandCollapseProvider.ExpandCollapseState\r\n        {\r\n            get\r\n            {\r\n                if (this.OwningDatePicker.IsDropDownOpen)\r\n                {\r\n                    return ExpandCollapseState.Expanded;\r\n                }\r\n                else\r\n                {\r\n                    return ExpandCollapseState.Collapsed;\r\n                }\r\n            }\r\n        }\r\n\r\n        void IExpandCollapseProvider.Collapse()\r\n        {\r\n            this.OwningDatePicker.IsDropDownOpen = false;\r\n        }\r\n\r\n        void IExpandCollapseProvider.Expand()\r\n        {\r\n            this.OwningDatePicker.IsDropDownOpen = true;\r\n        }\r\n\r\n        #endregion IExpandCollapseProvider\r\n\r\n        #region IValueProvider\r\n\r\n        bool IValueProvider.IsReadOnly \r\n        { \r\n            get { return false; } \r\n        }\r\n\r\n        string IValueProvider.Value \r\n        {\r\n            get { return this.OwningDatePicker.ToString(); } \r\n        }\r\n\r\n        void IValueProvider.SetValue(string value)\r\n        {\r\n            this.OwningDatePicker.Text = value;\r\n        }\r\n\r\n        #endregion IValueProvider\r\n\r\n        #region Internal Methods\r\n        // Never inline, as we don't want to unnecessarily link the automation DLL\r\n        [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]\r\n        internal void RaiseValuePropertyChangedEvent(string oldValue, string newValue)\r\n        {\r\n            if (oldValue != newValue)\r\n            {\r\n                RaisePropertyChangedEvent(ValuePatternIdentifiers.ValueProperty, oldValue, newValue);\r\n            }\r\n        }\r\n        #endregion\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DatePicker/Microsoft/Windows/Controls/DatePicker.cs",
    "content": "﻿//---------------------------------------------------------------------------\r\n//\r\n// Copyright (C) Microsoft Corporation.  All rights reserved.\r\n//\r\n//---------------------------------------------------------------------------\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Diagnostics;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Automation.Peers;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Controls.Primitives;\r\nusing System.Windows.Data;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Threading;\r\nusing Microsoft.Windows.Automation.Peers;\r\nusing Microsoft.Windows.Controls.Primitives;\r\n\r\nnamespace Microsoft.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Represents a control that allows the user to select a date.\r\n    /// </summary>\r\n    [TemplatePart(Name = DatePicker.ElementRoot, Type = typeof(Grid))]\r\n    [TemplatePart(Name = DatePicker.ElementTextBox, Type = typeof(DatePickerTextBox))]\r\n    [TemplatePart(Name = DatePicker.ElementButton, Type = typeof(Button))]\r\n    [TemplatePart(Name = DatePicker.ElementPopup, Type = typeof(Popup))]\r\n    [TemplateVisualState(Name = VisualStates.StateNormal, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StateDisabled, GroupName = VisualStates.GroupCommon)]\r\n    public class DatePicker : Control\r\n    {\r\n        #region Constants\r\n\r\n        private const string ElementRoot = \"PART_Root\";\r\n        private const string ElementTextBox = \"PART_TextBox\";\r\n        private const string ElementButton = \"PART_Button\";\r\n        private const string ElementPopup = \"PART_Popup\";\r\n\r\n        #endregion Constants\r\n\r\n        #region Data\r\n\r\n        private Calendar _calendar;\r\n        private string _defaultText;\r\n        private ButtonBase _dropDownButton;\r\n        private Popup _popUp;\r\n        private bool _disablePopupReopen;\r\n        private bool _shouldCoerceText;\r\n        private string _coercedTextValue;\r\n        private DatePickerTextBox _textBox;\r\n        private IDictionary<DependencyProperty, bool> _isHandlerSuspended;\r\n        private DateTime? _originalSelectedDate;\r\n\r\n        #endregion Data\r\n\r\n        #region Public Events\r\n\r\n        public static readonly RoutedEvent SelectedDateChangedEvent = EventManager.RegisterRoutedEvent(\"SelectedDateChanged\", RoutingStrategy.Direct, typeof(EventHandler<SelectionChangedEventArgs>), typeof(DatePicker));\r\n\r\n        /// <summary>\r\n        /// Occurs when the drop-down Calendar is closed.\r\n        /// </summary>\r\n        public event RoutedEventHandler CalendarClosed;\r\n\r\n        /// <summary>\r\n        /// Occurs when the drop-down Calendar is opened.\r\n        /// </summary>\r\n        public event RoutedEventHandler CalendarOpened;\r\n\r\n        /// <summary>\r\n        /// Occurs when text entered into the DatePicker cannot be parsed or the Date is not valid to be selected.\r\n        /// </summary>\r\n        public event EventHandler<DatePickerDateValidationErrorEventArgs> DateValidationError;\r\n\r\n        /// <summary>\r\n        /// Occurs when a date is selected.\r\n        /// </summary>\r\n        public event EventHandler<SelectionChangedEventArgs> SelectedDateChanged\r\n        {\r\n            add { AddHandler(SelectedDateChangedEvent, value); }\r\n            remove { RemoveHandler(SelectedDateChangedEvent, value); }\r\n        }\r\n\r\n        #endregion Public Events\r\n\r\n        /// <summary>\r\n        /// Static constructor\r\n        /// </summary>\r\n        static DatePicker()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(DatePicker), new FrameworkPropertyMetadata(typeof(DatePicker)));\r\n            EventManager.RegisterClassHandler(typeof(DatePicker), UIElement.GotFocusEvent, new RoutedEventHandler(OnGotFocus));\r\n            KeyboardNavigation.TabNavigationProperty.OverrideMetadata(typeof(DatePicker), new FrameworkPropertyMetadata(KeyboardNavigationMode.Once));\r\n            KeyboardNavigation.IsTabStopProperty.OverrideMetadata(typeof(DatePicker), new FrameworkPropertyMetadata(false));\r\n            IsEnabledProperty.OverrideMetadata(typeof(DatePicker), new UIPropertyMetadata(new PropertyChangedCallback(OnIsEnabledChanged)));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the DatePicker class. \r\n        /// </summary>\r\n        public DatePicker()\r\n        {\r\n            InitializeCalendar();\r\n            this._defaultText = string.Empty;\r\n\r\n            // Binding to FirstDayOfWeek and DisplayDate wont work\r\n            this.FirstDayOfWeek = DateTimeHelper.GetCurrentDateFormat().FirstDayOfWeek;\r\n            this.DisplayDate = DateTime.Today;\r\n        }\r\n\r\n        #region Public properties\r\n\r\n        #region BlackoutDates\r\n\r\n        /// <summary>\r\n        /// Gets the days that are not selectable.\r\n        /// </summary>\r\n        public CalendarBlackoutDatesCollection BlackoutDates\r\n        {\r\n            get { return _calendar.BlackoutDates; }\r\n        }\r\n\r\n        #endregion BlackoutDates\r\n\r\n        #region CalendarStyle\r\n\r\n        /// <summary>\r\n        /// Gets or sets the style that is used when rendering the calendar.\r\n        /// </summary>\r\n        public Style CalendarStyle\r\n        {\r\n            get { return (Style)GetValue(CalendarStyleProperty); }\r\n            set { SetValue(CalendarStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the CalendarStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty CalendarStyleProperty =\r\n            DependencyProperty.Register(\r\n            \"CalendarStyle\",\r\n            typeof(Style),\r\n            typeof(DatePicker));\r\n\r\n        #endregion CalendarStyle\r\n\r\n        #region DisplayDate\r\n\r\n        /// <summary>\r\n        /// Gets or sets the date to display.\r\n        /// </summary>\r\n        /// \r\n        public DateTime DisplayDate\r\n        {\r\n            get { return (DateTime)GetValue(DisplayDateProperty); }\r\n            set { SetValue(DisplayDateProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the DisplayDate dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty DisplayDateProperty =\r\n            DependencyProperty.Register(\r\n            \"DisplayDate\",\r\n            typeof(DateTime),\r\n            typeof(DatePicker),\r\n            new FrameworkPropertyMetadata(DateTime.Now, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, null, CoerceDisplayDate));\r\n\r\n        private static object CoerceDisplayDate(DependencyObject d, object value)\r\n        {\r\n            DatePicker dp = d as DatePicker;\r\n\r\n            // We set _calendar.DisplayDate in order to get _calendar to compute the coerced value\r\n            dp._calendar.DisplayDate = (DateTime)value;\r\n            return dp._calendar.DisplayDate;\r\n        }\r\n\r\n        #endregion DisplayDate\r\n\r\n        #region DisplayDateEnd\r\n\r\n        /// <summary>\r\n        /// Gets or sets the last date to be displayed.\r\n        /// </summary>\r\n        /// \r\n        public DateTime? DisplayDateEnd\r\n        {\r\n            get { return (DateTime?)GetValue(DisplayDateEndProperty); }\r\n            set { SetValue(DisplayDateEndProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the DisplayDateEnd dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty DisplayDateEndProperty =\r\n            DependencyProperty.Register(\r\n            \"DisplayDateEnd\",\r\n            typeof(DateTime?),\r\n            typeof(DatePicker),\r\n            new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnDisplayDateEndChanged, CoerceDisplayDateEnd));\r\n\r\n        /// <summary>\r\n        /// DisplayDateEndProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">DatePicker that changed its DisplayDateEnd.</param>\r\n        /// <param name=\"e\">DependencyPropertyChangedEventArgs.</param>\r\n        private static void OnDisplayDateEndChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DatePicker dp = d as DatePicker;\r\n            Debug.Assert(dp != null);\r\n\r\n            dp.CoerceValue(DisplayDateProperty);\r\n        }\r\n\r\n        private static object CoerceDisplayDateEnd(DependencyObject d, object value)\r\n        {\r\n            DatePicker dp = d as DatePicker;\r\n\r\n            // We set _calendar.DisplayDateEnd in order to get _calendar to compute the coerced value\r\n            dp._calendar.DisplayDateEnd = (DateTime?)value;\r\n            return dp._calendar.DisplayDateEnd;\r\n        }\r\n\r\n        #endregion DisplayDateEnd\r\n\r\n        #region DisplayDateStart\r\n\r\n        /// <summary>\r\n        /// Gets or sets the first date to be displayed.\r\n        /// </summary>\r\n        /// \r\n        public DateTime? DisplayDateStart\r\n        {\r\n            get { return (DateTime?)GetValue(DisplayDateStartProperty); }\r\n            set { SetValue(DisplayDateStartProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the DisplayDateStart dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty DisplayDateStartProperty =\r\n            DependencyProperty.Register(\r\n            \"DisplayDateStart\",\r\n            typeof(DateTime?),\r\n            typeof(DatePicker),\r\n            new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnDisplayDateStartChanged, CoerceDisplayDateStart));\r\n\r\n        /// <summary>\r\n        /// DisplayDateStartProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">DatePicker that changed its DisplayDateStart.</param>\r\n        /// <param name=\"e\">DependencyPropertyChangedEventArgs.</param>\r\n        private static void OnDisplayDateStartChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DatePicker dp = d as DatePicker;\r\n            Debug.Assert(dp != null);\r\n\r\n            dp.CoerceValue(DisplayDateEndProperty);\r\n            dp.CoerceValue(DisplayDateProperty);\r\n        }\r\n\r\n        private static object CoerceDisplayDateStart(DependencyObject d, object value)\r\n        {\r\n            DatePicker dp = d as DatePicker;\r\n\r\n            // We set _calendar.DisplayDateStart in order to get _calendar to compute the coerced value\r\n            dp._calendar.DisplayDateStart = (DateTime?)value;\r\n            return dp._calendar.DisplayDateStart;\r\n        }\r\n\r\n        #endregion DisplayDateStart\r\n\r\n        #region FirstDayOfWeek\r\n\r\n        /// <summary>\r\n        /// Gets or sets the day that is considered the beginning of the week.\r\n        /// </summary>\r\n        public DayOfWeek FirstDayOfWeek\r\n        {\r\n            get { return (DayOfWeek)GetValue(FirstDayOfWeekProperty); }\r\n            set { SetValue(FirstDayOfWeekProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the FirstDayOfWeek dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty FirstDayOfWeekProperty =\r\n            DependencyProperty.Register(\r\n            \"FirstDayOfWeek\",\r\n            typeof(DayOfWeek),\r\n            typeof(DatePicker),\r\n            null,\r\n            Calendar.IsValidFirstDayOfWeek);\r\n\r\n        #endregion FirstDayOfWeek\r\n\r\n        #region IsDropDownOpen\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value that indicates whether the drop-down Calendar is open or closed.\r\n        /// </summary>\r\n        public bool IsDropDownOpen\r\n        {\r\n            get { return (bool)GetValue(IsDropDownOpenProperty); }\r\n            set { SetValue(IsDropDownOpenProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the IsDropDownOpen dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty IsDropDownOpenProperty =\r\n            DependencyProperty.Register(\r\n            \"IsDropDownOpen\",\r\n            typeof(bool),\r\n            typeof(DatePicker),\r\n            new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnIsDropDownOpenChanged, OnCoerceIsDropDownOpen));\r\n\r\n        private static object OnCoerceIsDropDownOpen(DependencyObject d, object baseValue)\r\n        {\r\n            DatePicker dp = d as DatePicker;\r\n            Debug.Assert(dp != null);\r\n\r\n            if (!dp.IsEnabled)\r\n            {\r\n                return false;\r\n            }\r\n\r\n            return baseValue;\r\n        }\r\n\r\n        /// <summary>\r\n        /// IsDropDownOpenProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">DatePicker that changed its IsDropDownOpen.</param>\r\n        /// <param name=\"e\">DependencyPropertyChangedEventArgs.</param>\r\n        private static void OnIsDropDownOpenChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DatePicker dp = d as DatePicker;\r\n            Debug.Assert(dp != null);\r\n\r\n            bool newValue = (bool)e.NewValue;\r\n            if (dp._popUp != null && dp._popUp.IsOpen != newValue)\r\n            {\r\n                dp._popUp.IsOpen = newValue;\r\n                if (newValue)\r\n                {\r\n                    dp._originalSelectedDate = dp.SelectedDate;\r\n                    // When the popup is opened set focus to the DisplayDate button. \r\n                    // Do this asynchronously because the IsDropDownOpen could \r\n                    // have been set even before the template for the DatePicker is \r\n                    // applied. And this would mean that the visuals wouldn't be available yet.\r\n\r\n                    dp.Dispatcher.BeginInvoke(DispatcherPriority.Input, (Action)delegate()\r\n                    {\r\n                        \r\n                        // setting the focus to the calendar will focus the correct date.\r\n                        dp._calendar.Focus();\r\n                    });\r\n\r\n                }\r\n            }\r\n        }\r\n\r\n        #endregion IsDropDownOpen\r\n\r\n        #region IsEnabled\r\n\r\n        /// <summary>\r\n        /// Called when the IsEnabled property changes.\r\n        /// </summary>\r\n        private static void OnIsEnabledChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DatePicker dp = d as DatePicker;\r\n            Debug.Assert(dp != null);\r\n\r\n            dp.CoerceValue(IsDropDownOpenProperty);\r\n\r\n            OnVisualStatePropertyChanged(dp);\r\n        }\r\n\r\n        private static void OnVisualStatePropertyChanged(DatePicker dp)\r\n        {\r\n\r\n            if (Validation.GetHasError(dp))\r\n            {\r\n                if (dp.IsKeyboardFocused)\r\n                {\r\n                    VisualStateManager.GoToState(dp, VisualStates.StateInvalidFocused, true);\r\n                }\r\n                else\r\n                {\r\n                    VisualStateManager.GoToState(dp, VisualStates.StateInvalidUnfocused, true);\r\n                }\r\n            }\r\n            else\r\n            {\r\n                VisualStateManager.GoToState(dp, VisualStates.StateValid, true);\r\n            }\r\n        }\r\n\r\n\r\n        #endregion IsEnabled\r\n\r\n        #region IsTodayHighlighted\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value that indicates whether the current date will be highlighted.\r\n        /// </summary>\r\n        public bool IsTodayHighlighted\r\n        {\r\n            get { return (bool)GetValue(IsTodayHighlightedProperty); }\r\n            set { SetValue(IsTodayHighlightedProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the IsTodayHighlighted dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty IsTodayHighlightedProperty =\r\n            DependencyProperty.Register(\r\n            \"IsTodayHighlighted\",\r\n            typeof(bool),\r\n            typeof(DatePicker));\r\n\r\n        #endregion IsTodayHighlighted\r\n\r\n        #region SelectedDate\r\n\r\n        /// <summary>\r\n        /// Gets or sets the currently selected date.\r\n        /// </summary>\r\n        /// \r\n        public DateTime? SelectedDate\r\n        {\r\n            get { return (DateTime?)GetValue(SelectedDateProperty); }\r\n            set { SetValue(SelectedDateProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the SelectedDate dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty SelectedDateProperty =\r\n            DependencyProperty.Register(\r\n            \"SelectedDate\",\r\n            typeof(DateTime?),\r\n            typeof(DatePicker),\r\n            new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault , OnSelectedDateChanged, CoerceSelectedDate));\r\n\r\n        /// <summary>\r\n        /// SelectedDateProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">DatePicker that changed its SelectedDate.</param>\r\n        /// <param name=\"e\">DependencyPropertyChangedEventArgs.</param>\r\n        private static void OnSelectedDateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DatePicker dp = d as DatePicker;\r\n            Debug.Assert(dp != null);\r\n\r\n            Collection<DateTime> addedItems = new Collection<DateTime>();\r\n            Collection<DateTime> removedItems = new Collection<DateTime>();\r\n            DateTime? addedDate;\r\n            DateTime? removedDate;\r\n\r\n            dp.CoerceValue(DisplayDateStartProperty);\r\n            dp.CoerceValue(DisplayDateEndProperty);\r\n            dp.CoerceValue(DisplayDateProperty);\r\n\r\n            addedDate = (DateTime?)e.NewValue;\r\n            removedDate = (DateTime?)e.OldValue;\r\n\r\n            if (dp.SelectedDate.HasValue)\r\n            {\r\n                DateTime day = dp.SelectedDate.Value;\r\n                dp.SetTextInternal(dp.DateTimeToString(day));\r\n\r\n                // When DatePickerDisplayDateFlag is TRUE, the SelectedDate change is coming from the Calendar UI itself,\r\n                // so, we shouldn't change the DisplayDate since it will automatically be changed by the Calendar\r\n                if ((day.Month != dp.DisplayDate.Month || day.Year != dp.DisplayDate.Year) && !dp._calendar.DatePickerDisplayDateFlag)\r\n                {\r\n                    dp.DisplayDate = day;\r\n                }\r\n\r\n                dp._calendar.DatePickerDisplayDateFlag = false;\r\n            }\r\n            else\r\n            {\r\n                dp.SetWaterMarkText();\r\n            }\r\n\r\n            if (addedDate.HasValue)\r\n            {\r\n                addedItems.Add(addedDate.Value);\r\n            }\r\n\r\n            if (removedDate.HasValue)\r\n            {\r\n                removedItems.Add(removedDate.Value);\r\n            }\r\n\r\n            dp.OnSelectedDateChanged(new CalendarSelectionChangedEventArgs(DatePicker.SelectedDateChangedEvent, removedItems, addedItems));\r\n\r\n            DatePickerAutomationPeer peer = UIElementAutomationPeer.FromElement(dp) as DatePickerAutomationPeer;\r\n            // Raise the propetyChangeEvent for Value if Automation Peer exist\r\n            if (peer != null)\r\n            {\r\n                string addedDateString = addedDate.HasValue ? dp.DateTimeToString(addedDate.Value) : \"\";\r\n                string removedDateString = removedDate.HasValue ? dp.DateTimeToString(removedDate.Value) : \"\";\r\n                peer.RaiseValuePropertyChangedEvent(removedDateString, addedDateString);\r\n            }\r\n        }\r\n\r\n        private static object CoerceSelectedDate(DependencyObject d, object value)\r\n        {\r\n            DatePicker dp = d as DatePicker;\r\n\r\n            // We set _calendar.SelectedDate in order to get _calendar to compute the coerced value\r\n            dp._calendar.SelectedDate = (DateTime?)value;\r\n            return dp._calendar.SelectedDate;\r\n        }\r\n\r\n        #endregion SelectedDate\r\n\r\n        #region SelectedDateFormat\r\n\r\n        /// <summary>\r\n        /// Gets or sets the format that is used to display the selected date.\r\n        /// </summary>\r\n        public DatePickerFormat SelectedDateFormat\r\n        {\r\n            get { return (DatePickerFormat)GetValue(SelectedDateFormatProperty); }\r\n            set { SetValue(SelectedDateFormatProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the SelectedDateFormat dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty SelectedDateFormatProperty =\r\n            DependencyProperty.Register(\r\n            \"SelectedDateFormat\",\r\n            typeof(DatePickerFormat),\r\n            typeof(DatePicker),\r\n            new FrameworkPropertyMetadata(DatePickerFormat.Long, OnSelectedDateFormatChanged),\r\n            IsValidSelectedDateFormat);\r\n\r\n        /// <summary>\r\n        /// SelectedDateFormatProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">DatePicker that changed its SelectedDateFormat.</param>\r\n        /// <param name=\"e\">DependencyPropertyChangedEventArgs.</param>\r\n        private static void OnSelectedDateFormatChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DatePicker dp = d as DatePicker;\r\n            Debug.Assert(dp != null);\r\n\r\n            if (dp._textBox != null)\r\n            {\r\n                // Update DatePickerTextBox.Text\r\n                if (string.IsNullOrEmpty(dp._textBox.Text))\r\n                {\r\n                    dp.SetWaterMarkText();\r\n                }\r\n                else\r\n                {\r\n                    DateTime? date = dp.ParseText(dp._textBox.Text);\r\n\r\n                    if (date != null)\r\n                    {\r\n                        dp.SetTextInternal(dp.DateTimeToString((DateTime)date));\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        #endregion SelectedDateFormat\r\n\r\n        #region Text\r\n\r\n        /// <summary>\r\n        /// Gets or sets the text that is displayed by the DatePicker.\r\n        /// </summary>\r\n        public string Text\r\n        {\r\n            get { return (string)GetValue(TextProperty); }\r\n            set { SetValue(TextProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Text dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty TextProperty =\r\n            DependencyProperty.Register(\r\n            \"Text\",\r\n            typeof(string),\r\n            typeof(DatePicker),\r\n            new FrameworkPropertyMetadata(string.Empty, OnTextChanged, OnCoerceText));\r\n\r\n        /// <summary>\r\n        /// TextProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">DatePicker that changed its Text.</param>\r\n        /// <param name=\"e\">DependencyPropertyChangedEventArgs.</param>\r\n        private static void OnTextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            DatePicker dp = d as DatePicker;\r\n            Debug.Assert(dp != null);\r\n\r\n            if (!dp.IsHandlerSuspended(DatePicker.TextProperty))\r\n            {\r\n                string newValue = e.NewValue as string;\r\n\r\n                if (newValue != null)\r\n                {\r\n                    if (dp._textBox != null)\r\n                    {\r\n                        dp._textBox.Text = newValue;\r\n                    }\r\n                    else\r\n                    {\r\n                        dp._defaultText = newValue;\r\n                    }\r\n\r\n                    dp.SetSelectedDate();\r\n                }\r\n                else\r\n                {\r\n                    dp.SetValueNoCallback(DatePicker.SelectedDateProperty, null);\r\n                }\r\n            }\r\n        }\r\n\r\n        private static object OnCoerceText(DependencyObject dObject, object baseValue)\r\n        {\r\n            DatePicker dp = (DatePicker)dObject;\r\n            if (dp._shouldCoerceText)\r\n            {\r\n                dp._shouldCoerceText = false;\r\n                return dp._coercedTextValue;\r\n            }\r\n\r\n            return baseValue;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Sets the local Text property without breaking bindings\r\n        /// </summary>\r\n        /// <param name=\"value\"></param>\r\n        private void SetTextInternal(string value)\r\n        {\r\n            if (BindingOperations.GetBindingExpressionBase(this, DatePicker.TextProperty) != null)\r\n            {\r\n                Text = value;\r\n            }\r\n            else\r\n            {\r\n                _shouldCoerceText = true;\r\n                _coercedTextValue = value;\r\n                CoerceValue(TextProperty);\r\n            }\r\n        }\r\n\r\n        #endregion Text\r\n\r\n        #endregion Public Properties\r\n\r\n        #region Protected properties\r\n\r\n        #endregion Protected Properties\r\n\r\n        #region Internal Properties\r\n\r\n        #endregion Internal Properties\r\n\r\n        #region Private Properties\r\n        #endregion Private Properties\r\n\r\n        #region Public Methods\r\n\r\n        /// <summary>\r\n        /// Builds the visual tree for the DatePicker control when a new template is applied.\r\n        /// </summary>\r\n        public override void OnApplyTemplate()\r\n        {\r\n            if (_popUp != null)\r\n            {\r\n                _popUp.RemoveHandler(PreviewMouseLeftButtonDownEvent, new MouseButtonEventHandler(PopUp_PreviewMouseLeftButtonDown));\r\n                _popUp.Opened -= PopUp_Opened;\r\n                _popUp.Closed -= PopUp_Closed;\r\n                _popUp.Child = null;\r\n            }\r\n\r\n            if (_dropDownButton != null)\r\n            {\r\n                _dropDownButton.Click -= DropDownButton_Click;\r\n                _dropDownButton.RemoveHandler(MouseLeaveEvent, new MouseEventHandler(DropDownButton_MouseLeave));\r\n            }\r\n\r\n            if (_textBox != null)\r\n            {\r\n                _textBox.RemoveHandler(TextBox.KeyDownEvent, new KeyEventHandler(TextBox_KeyDown));\r\n                _textBox.RemoveHandler(TextBox.TextChangedEvent, new TextChangedEventHandler(TextBox_TextChanged));\r\n                _textBox.RemoveHandler(TextBox.LostFocusEvent, new RoutedEventHandler(TextBox_LostFocus));\r\n            }\r\n\r\n            base.OnApplyTemplate();\r\n\r\n            _popUp = GetTemplateChild(ElementPopup) as Popup;\r\n\r\n            if (_popUp != null)\r\n            {\r\n                _popUp.AddHandler(PreviewMouseLeftButtonDownEvent, new MouseButtonEventHandler(PopUp_PreviewMouseLeftButtonDown));\r\n                _popUp.Opened += PopUp_Opened;\r\n                _popUp.Closed += PopUp_Closed;\r\n                _popUp.Child = this._calendar;\r\n\r\n                if (this.IsDropDownOpen)\r\n                {\r\n                    this._popUp.IsOpen = true;\r\n                }\r\n            }\r\n\r\n            _dropDownButton = GetTemplateChild(ElementButton) as Button;\r\n            if (_dropDownButton != null)\r\n            {\r\n                _dropDownButton.Click += DropDownButton_Click;\r\n                _dropDownButton.AddHandler(MouseLeaveEvent, new MouseEventHandler(DropDownButton_MouseLeave), true);\r\n\r\n                // If the user does not provide a Content value in template, we provide a helper text that can be used in Accessibility\r\n                // this text is not shown on the UI, just used for Accessibility purposes\r\n                if (_dropDownButton.Content == null)\r\n                {\r\n                    _dropDownButton.Content = SR.Get(SRID.DatePicker_DropDownButtonName);\r\n                }\r\n            }\r\n\r\n            _textBox = GetTemplateChild(ElementTextBox) as DatePickerTextBox;\r\n\r\n            UpdateDisabledVisual();\r\n            if (this.SelectedDate == null)\r\n            {\r\n                SetWaterMarkText();\r\n            }\r\n\r\n            if (_textBox != null)\r\n            {\r\n                _textBox.AddHandler(TextBox.KeyDownEvent, new KeyEventHandler(TextBox_KeyDown), true);\r\n                _textBox.AddHandler(TextBox.TextChangedEvent, new TextChangedEventHandler(TextBox_TextChanged), true);\r\n                _textBox.AddHandler(TextBox.LostFocusEvent, new RoutedEventHandler(TextBox_LostFocus), true);\r\n\r\n                if (this.SelectedDate == null)\r\n                {\r\n                    if (!string.IsNullOrEmpty(this._defaultText))\r\n                    {\r\n                        _textBox.Text = this._defaultText;\r\n                        SetSelectedDate();\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    _textBox.Text = this.DateTimeToString((DateTime)this.SelectedDate);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Provides a text representation of the selected date.\r\n        /// </summary>\r\n        /// <returns>A text representation of the selected date, or an empty string if SelectedDate is a null reference.</returns>\r\n        public override string ToString()\r\n        {\r\n            if (this.SelectedDate != null)\r\n            {\r\n                return this.SelectedDate.Value.ToString(DateTimeHelper.GetDateFormat(DateTimeHelper.GetCulture(this)));\r\n            }\r\n            else\r\n            {\r\n                return string.Empty;\r\n            }\r\n        }\r\n\r\n        #endregion Public Methods\r\n\r\n        #region Protected Methods\r\n\r\n        /// <summary>\r\n        /// Creates the automation peer for this DatePicker Control.\r\n        /// </summary>\r\n        /// <returns></returns>\r\n        protected override AutomationPeer OnCreateAutomationPeer()\r\n        {\r\n            return new DatePickerAutomationPeer(this);\r\n        }\r\n\r\n        protected virtual void OnCalendarClosed(RoutedEventArgs e)\r\n        {\r\n            RoutedEventHandler handler = this.CalendarClosed;\r\n            if (null != handler)\r\n            {\r\n                handler(this, e);\r\n            }\r\n        }\r\n\r\n        protected virtual void OnCalendarOpened(RoutedEventArgs e)\r\n        {\r\n            RoutedEventHandler handler = this.CalendarOpened;\r\n            if (null != handler)\r\n            {\r\n                handler(this, e);\r\n            }\r\n        }\r\n\r\n        protected virtual void OnSelectedDateChanged(SelectionChangedEventArgs e)\r\n        {\r\n            RaiseEvent(e);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Raises the DateValidationError event.\r\n        /// </summary>\r\n        /// <param name=\"e\">A DatePickerDateValidationErrorEventArgs that contains the event data.</param>\r\n        protected virtual void OnDateValidationError(DatePickerDateValidationErrorEventArgs e)\r\n        {\r\n            EventHandler<DatePickerDateValidationErrorEventArgs> handler = this.DateValidationError;\r\n            if (handler != null)\r\n            {\r\n                handler(this, e);\r\n            }\r\n        }\r\n\r\n        #endregion Protected Methods\r\n\r\n        #region Private Methods\r\n\r\n        /// <summary>\r\n        ///     Called when this element gets focus.\r\n        /// </summary>\r\n        private static void OnGotFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            // When Datepicker gets focus move it to the TextBox\r\n            DatePicker picker = (DatePicker)sender;\r\n            if ((!e.Handled) && (picker._textBox != null))\r\n            {\r\n                if (e.OriginalSource == picker)\r\n                {\r\n                    picker._textBox.Focus();\r\n                    e.Handled = true;\r\n                }\r\n                else if (e.OriginalSource == picker._textBox)\r\n                {\r\n                    picker._textBox.SelectAll();\r\n                    e.Handled = true;\r\n                }\r\n            }\r\n        }\r\n\r\n        private void SetValueNoCallback(DependencyProperty property, object value)\r\n        {\r\n            SetIsHandlerSuspended(property, true);\r\n            try\r\n            {\r\n                SetValue(property, value);\r\n            }\r\n            finally\r\n            {\r\n                SetIsHandlerSuspended(property, false);\r\n            }\r\n        }\r\n\r\n        private bool IsHandlerSuspended(DependencyProperty property)\r\n        {\r\n            return _isHandlerSuspended != null && _isHandlerSuspended.ContainsKey(property);\r\n        }\r\n\r\n        private void SetIsHandlerSuspended(DependencyProperty property, bool value)\r\n        {\r\n            if (value)\r\n            {\r\n                if (_isHandlerSuspended == null)\r\n                {\r\n                    _isHandlerSuspended = new Dictionary<DependencyProperty, bool>(2);\r\n                }\r\n\r\n                _isHandlerSuspended[property] = true;\r\n            }\r\n            else\r\n            {\r\n                if (_isHandlerSuspended != null)\r\n                {\r\n                    _isHandlerSuspended.Remove(property);\r\n                }\r\n            }\r\n        }\r\n\r\n        private void PopUp_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)\r\n        {\r\n            Popup popup = sender as Popup;\r\n            if (popup != null && !popup.StaysOpen)\r\n            {\r\n                if (this._dropDownButton != null)\r\n                {\r\n                    if (this._dropDownButton.InputHitTest(e.GetPosition(this._dropDownButton)) != null)\r\n                    {\r\n                        // This popup is being closed by a mouse press on the drop down button\r\n                        // The following mouse release will cause the closed popup to immediately reopen.\r\n                        // Raise a flag to block reopeneing the popup\r\n                        this._disablePopupReopen = true;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void PopUp_Opened(object sender, EventArgs e)\r\n        {\r\n            if (!this.IsDropDownOpen)\r\n            {\r\n                this.IsDropDownOpen = true;\r\n            }\r\n\r\n            if (this._calendar != null)\r\n            {\r\n                this._calendar.DisplayMode = CalendarMode.Month;\r\n                this._calendar.MoveFocus(new TraversalRequest(FocusNavigationDirection.First));\r\n            }\r\n\r\n            this.OnCalendarOpened(new RoutedEventArgs());\r\n        }\r\n\r\n        private void PopUp_Closed(object sender, EventArgs e)\r\n        {\r\n            if (this.IsDropDownOpen)\r\n            {\r\n                this.IsDropDownOpen = false;\r\n            }\r\n\r\n            if (_calendar.IsKeyboardFocusWithin)\r\n            {\r\n                this.MoveFocus(new TraversalRequest(FocusNavigationDirection.First));\r\n            }\r\n\r\n            OnCalendarClosed(new RoutedEventArgs());\r\n        }\r\n\r\n        private void Calendar_DayButtonMouseUp(object sender, MouseButtonEventArgs e)\r\n        {\r\n            this.IsDropDownOpen = false;\r\n        }\r\n\r\n        private void Calendar_DisplayDateChanged(object sender, CalendarDateChangedEventArgs e)\r\n        {\r\n            if (e.AddedDate != this.DisplayDate)\r\n            {\r\n                SetValue(DisplayDateProperty, (DateTime)e.AddedDate);\r\n            }\r\n        }\r\n\r\n        private void CalendarDayOrMonthButton_PreviewKeyDown(object sender, RoutedEventArgs e)\r\n        {\r\n            Calendar c = sender as Calendar;\r\n            KeyEventArgs args = (KeyEventArgs)e;\r\n\r\n            Debug.Assert(c != null);\r\n            Debug.Assert(args != null);\r\n\r\n            if (args.Key == Key.Escape || ((args.Key == Key.Enter || args.Key == Key.Space) && c.DisplayMode == CalendarMode.Month))\r\n            {\r\n                this.IsDropDownOpen = false;\r\n                if (args.Key == Key.Escape)\r\n                {\r\n                    SelectedDate = _originalSelectedDate;\r\n                }\r\n            }\r\n        }\r\n\r\n        private void Calendar_SelectedDatesChanged(object sender, SelectionChangedEventArgs e)\r\n        {\r\n            Debug.Assert(e.AddedItems.Count < 2);\r\n\r\n            if (e.AddedItems.Count > 0 && this.SelectedDate.HasValue && DateTime.Compare((DateTime)e.AddedItems[0], this.SelectedDate.Value) != 0)\r\n            {\r\n                this.SelectedDate = (DateTime?)e.AddedItems[0];\r\n            }\r\n            else\r\n            {\r\n                if (e.AddedItems.Count == 0)\r\n                {\r\n                    this.SelectedDate = null;\r\n                    return;\r\n                }\r\n\r\n                if (!this.SelectedDate.HasValue)\r\n                {\r\n                    if (e.AddedItems.Count > 0)\r\n                    {\r\n                        this.SelectedDate = (DateTime?)e.AddedItems[0];\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private string DateTimeToString(DateTime d)\r\n        {\r\n            DateTimeFormatInfo dtfi = DateTimeHelper.GetDateFormat(DateTimeHelper.GetCulture(this));\r\n\r\n            switch (this.SelectedDateFormat)\r\n            {\r\n                case DatePickerFormat.Short:\r\n                    {\r\n                        return string.Format(CultureInfo.CurrentCulture, d.ToString(dtfi.ShortDatePattern, dtfi));\r\n                    }\r\n\r\n                case DatePickerFormat.Long:\r\n                    {\r\n                        return string.Format(CultureInfo.CurrentCulture, d.ToString(dtfi.LongDatePattern, dtfi));\r\n                    }\r\n            }      \r\n\r\n            return null;\r\n        }\r\n\r\n        private static DateTime DiscardDayTime(DateTime d)\r\n        {\r\n            int year = d.Year;\r\n            int month = d.Month;\r\n            DateTime newD = new DateTime(year, month, 1, 0, 0, 0);\r\n            return newD;\r\n        }\r\n\r\n        private static DateTime? DiscardTime(DateTime? d)\r\n        {\r\n            if (d == null)\r\n            {\r\n                return null;\r\n            }\r\n            else\r\n            {\r\n                DateTime discarded = (DateTime)d;\r\n                int year = discarded.Year;\r\n                int month = discarded.Month;\r\n                int day = discarded.Day;\r\n                DateTime newD = new DateTime(year, month, day, 0, 0, 0);\r\n                return newD;\r\n            }\r\n        }\r\n\r\n        private void DropDownButton_Click(object sender, RoutedEventArgs e)\r\n        {\r\n            TogglePopUp();\r\n        }\r\n\r\n        private void DropDownButton_MouseLeave(object sender, MouseEventArgs e)\r\n        {\r\n            this._disablePopupReopen = false;\r\n        }\r\n\r\n        private void TogglePopUp()\r\n        {\r\n            if (this.IsDropDownOpen)\r\n            {\r\n                this.IsDropDownOpen = false;\r\n            }\r\n            else\r\n            {\r\n                if (this._disablePopupReopen)\r\n                {\r\n                    this._disablePopupReopen = false;\r\n                }\r\n                else\r\n                {\r\n                    SetSelectedDate();\r\n                    this.IsDropDownOpen = true;\r\n                }\r\n            }\r\n        }\r\n\r\n        private void InitializeCalendar()\r\n        {\r\n            _calendar = new Calendar();\r\n            _calendar.DayButtonMouseUp += new MouseButtonEventHandler(Calendar_DayButtonMouseUp);\r\n            _calendar.DisplayDateChanged += new EventHandler<CalendarDateChangedEventArgs>(Calendar_DisplayDateChanged);\r\n            _calendar.SelectedDatesChanged += new EventHandler<SelectionChangedEventArgs>(Calendar_SelectedDatesChanged);\r\n            _calendar.DayOrMonthPreviewKeyDown += new RoutedEventHandler(CalendarDayOrMonthButton_PreviewKeyDown);\r\n            _calendar.HorizontalAlignment = HorizontalAlignment.Left;\r\n            _calendar.VerticalAlignment = VerticalAlignment.Top;\r\n\r\n            _calendar.SelectionMode = CalendarSelectionMode.SingleDate;\r\n            _calendar.SetBinding(Calendar.ForegroundProperty, GetDatePickerBinding(DatePicker.ForegroundProperty));            \r\n            _calendar.SetBinding(Calendar.StyleProperty, GetDatePickerBinding(DatePicker.CalendarStyleProperty));\r\n            _calendar.SetBinding(Calendar.IsTodayHighlightedProperty, GetDatePickerBinding(DatePicker.IsTodayHighlightedProperty));\r\n            _calendar.SetBinding(Calendar.FirstDayOfWeekProperty, GetDatePickerBinding(DatePicker.FirstDayOfWeekProperty));\r\n        }\r\n\r\n        private BindingBase GetDatePickerBinding(DependencyProperty property)\r\n        {\r\n            Binding binding = new Binding(property.Name);\r\n            binding.Source = this;\r\n            return binding;\r\n        }\r\n\r\n        private static bool IsValidSelectedDateFormat(object value)\r\n        {\r\n            DatePickerFormat format = (DatePickerFormat)value;\r\n\r\n            return format == DatePickerFormat.Long\r\n                || format == DatePickerFormat.Short;\r\n        }\r\n\r\n        // iT SHOULD RETURN NULL IF THE STRING IS NOT VALID, RETURN THE DATETIME VALUE IF IT IS VALID\r\n\r\n        /// <summary>\r\n        /// Input text is parsed in the correct format and changed into a DateTime object.\r\n        /// If the text can not be parsed TextParseError Event is thrown.\r\n        /// </summary>\r\n        private DateTime? ParseText(string text)\r\n        {\r\n            DateTime newSelectedDate;\r\n\r\n            // TryParse is not used in order to be able to pass the exception to the TextParseError event\r\n            try\r\n            {\r\n                newSelectedDate = DateTime.Parse(text, DateTimeHelper.GetDateFormat(DateTimeHelper.GetCulture(this)));\r\n\r\n                if (Calendar.IsValidDateSelection(this._calendar, newSelectedDate))\r\n                {\r\n                    return newSelectedDate;\r\n                }\r\n                else\r\n                {\r\n                    DatePickerDateValidationErrorEventArgs dateValidationError = new DatePickerDateValidationErrorEventArgs(new ArgumentOutOfRangeException(\"text\", SR.Get(SRID.Calendar_OnSelectedDateChanged_InvalidValue)), text);\r\n                    OnDateValidationError(dateValidationError);\r\n\r\n                    if (dateValidationError.ThrowException)\r\n                    {\r\n                        throw dateValidationError.Exception;\r\n                    }\r\n                }\r\n            }\r\n            catch (FormatException ex)\r\n            {\r\n                DatePickerDateValidationErrorEventArgs textParseError = new DatePickerDateValidationErrorEventArgs(ex, text);\r\n                OnDateValidationError(textParseError);\r\n\r\n                if (textParseError.ThrowException && textParseError.Exception != null)\r\n                {\r\n                    throw textParseError.Exception;\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        private bool ProcessDatePickerKey(KeyEventArgs e)\r\n        {\r\n            switch (e.Key)\r\n            {\r\n                case Key.System:\r\n                {\r\n                    switch (e.SystemKey)\r\n                    {\r\n                        case Key.Down:\r\n                        {\r\n                            if ((Keyboard.Modifiers & ModifierKeys.Alt) == ModifierKeys.Alt)\r\n                            {\r\n                                TogglePopUp();\r\n                                return true;\r\n                            }\r\n\r\n                            break;\r\n                        }\r\n                    }\r\n\r\n                    break;\r\n                }\r\n\r\n                case Key.Enter:\r\n                {\r\n                    SetSelectedDate();\r\n                    return true;\r\n                }\r\n            }\r\n\r\n            return false;\r\n        }\r\n\r\n        private void SetSelectedDate()\r\n        {\r\n            if (this._textBox != null)\r\n            {\r\n                if (!string.IsNullOrEmpty(this._textBox.Text))\r\n                {\r\n                    string s = this._textBox.Text;\r\n\r\n                    if (this.SelectedDate != null)\r\n                    {\r\n                        // If the string value of the SelectedDate and the TextBox string value are equal,\r\n                        // we do not parse the string again\r\n                        // if we do an extra parse, we lose data in M/d/yy format\r\n                        // ex: SelectedDate = DateTime(1008,12,19) but when \"12/19/08\" is parsed it is interpreted as DateTime(2008,12,19)\r\n                        string selectedDate = DateTimeToString(this.SelectedDate.Value);\r\n\r\n                        if (selectedDate == s)\r\n                        {\r\n                            return;\r\n                        }\r\n                    }\r\n\r\n                    DateTime? d = SetTextBoxValue(s);\r\n                    if (!this.SelectedDate.Equals(d))\r\n                    {\r\n                        this.SelectedDate = d;\r\n                        this.DisplayDate = d.Value;\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    if (this.SelectedDate != null)\r\n                    {\r\n                        this.SelectedDate = null;\r\n                    }\r\n                }\r\n            }\r\n            else\r\n            {\r\n                DateTime? d = SetTextBoxValue(_defaultText);\r\n                if (!this.SelectedDate.Equals(d))\r\n                {\r\n                    this.SelectedDate = d;\r\n                }\r\n            }\r\n        }\r\n\r\n        private DateTime? SetTextBoxValue(string s)\r\n        {\r\n            if (string.IsNullOrEmpty(s))\r\n            {\r\n                SetValue(TextProperty, s);\r\n                return this.SelectedDate;\r\n            }\r\n            else\r\n            {\r\n                DateTime? d = ParseText(s);\r\n\r\n                if (d != null)\r\n                {\r\n                    SetValue(TextProperty, this.DateTimeToString((DateTime)d));\r\n                    return d;\r\n                }\r\n                else\r\n                {\r\n                    // If parse error:\r\n                    // TextBox should have the latest valid selecteddate value:\r\n                    if (this.SelectedDate != null)\r\n                    {\r\n                        string newtext = this.DateTimeToString((DateTime)this.SelectedDate);\r\n                        SetValue(TextProperty, newtext);\r\n                        return this.SelectedDate;\r\n                    }\r\n                    else\r\n                    {\r\n                        SetWaterMarkText();\r\n                        return null;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void SetWaterMarkText()\r\n        {\r\n            if (this._textBox != null)\r\n            {\r\n                DateTimeFormatInfo dtfi = DateTimeHelper.GetDateFormat(DateTimeHelper.GetCulture(this));\r\n                this.SetTextInternal(string.Empty);\r\n                this._defaultText = string.Empty;\r\n\r\n                switch (this.SelectedDateFormat)\r\n                {\r\n                    case DatePickerFormat.Long:\r\n                        {\r\n                            this._textBox.Watermark = string.Format(CultureInfo.CurrentCulture, SR.Get(SRID.DatePicker_WatermarkText), dtfi.LongDatePattern.ToString());\r\n                            break;\r\n                        }\r\n\r\n                    case DatePickerFormat.Short:\r\n                        {\r\n                            this._textBox.Watermark = string.Format(CultureInfo.CurrentCulture, SR.Get(SRID.DatePicker_WatermarkText), dtfi.ShortDatePattern.ToString());\r\n                            break;\r\n                        }\r\n                }\r\n            }\r\n        }\r\n\r\n        private void TextBox_LostFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            SetSelectedDate();\r\n        }\r\n\r\n        private void TextBox_KeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            e.Handled = ProcessDatePickerKey(e) || e.Handled;            \r\n        }\r\n\r\n        private void TextBox_TextChanged(object sender, TextChangedEventArgs e)\r\n        {\r\n            this.SetValueNoCallback(DatePicker.TextProperty, this._textBox.Text);\r\n        }\r\n\r\n        private void UpdateDisabledVisual()\r\n        {\r\n            if (!IsEnabled)\r\n            {\r\n                VisualStates.GoToState(this, true, VisualStates.StateDisabled, VisualStates.StateNormal);\r\n            }\r\n            else\r\n            {\r\n                VisualStates.GoToState(this, true, VisualStates.StateNormal);\r\n            }\r\n        }\r\n\r\n        #endregion Private Methods\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DatePicker/Microsoft/Windows/Controls/DatePickerDateValidationErrorEventArgs.cs",
    "content": "﻿//---------------------------------------------------------------------------\r\n//\r\n// Copyright (C) Microsoft Corporation.  All rights reserved.\r\n//\r\n//---------------------------------------------------------------------------\r\n\r\nusing System;\r\n\r\nnamespace Microsoft.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Provides data for the DateValidationError event.\r\n    /// </summary>\r\n    public class DatePickerDateValidationErrorEventArgs : EventArgs\r\n    {\r\n        private bool _throwException;\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the DatePickerDateValidationErrorEventArgs class. \r\n        /// </summary>\r\n        /// <param name=\"exception\">The exception that initially triggered the DateValidationError event.</param>\r\n        /// <param name=\"text\">The text being parsed.</param>\r\n        public DatePickerDateValidationErrorEventArgs(Exception exception, string text)\r\n        {\r\n            this.Text = text;\r\n            this.Exception = exception;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the exception that initially triggered the DateValidationError event.\r\n        /// </summary>\r\n        public Exception Exception\r\n        {\r\n            get;\r\n            private set;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the text being parsed when the DateValidationError event was raised.\r\n        /// </summary>\r\n        public string Text\r\n        {\r\n            get;\r\n            private set;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value that indicates whether Exception should be thrown.\r\n        /// </summary>\r\n        public bool ThrowException\r\n        {\r\n            get\r\n            {\r\n                return this._throwException;\r\n            }\r\n\r\n            set\r\n            {\r\n                this._throwException = value;\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DatePicker/Microsoft/Windows/Controls/DatePickerFormat.cs",
    "content": "﻿//---------------------------------------------------------------------------\r\n//\r\n// Copyright (C) Microsoft Corporation.  All rights reserved.\r\n//\r\n//---------------------------------------------------------------------------\r\n\r\nnamespace Microsoft.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Specifies date formats for a DatePicker.\r\n    /// </summary>\r\n    public enum DatePickerFormat\r\n    {\r\n        /// <summary>\r\n        /// Specifies that the date should be displayed using unabbreviated days of the week and month names.\r\n        /// </summary>\r\n        Long = 0,\r\n\r\n        /// <summary>\r\n        /// Specifies that the date should be displayed using abbreviated days of the week and month names.\r\n        /// </summary>\r\n        Short = 1\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/DatePicker/Microsoft/Windows/Controls/DatePickerTextBox.cs",
    "content": "﻿//---------------------------------------------------------------------------\r\n//\r\n// Copyright (C) Microsoft Corporation.  All rights reserved.\r\n//\r\n//---------------------------------------------------------------------------\r\n\r\nusing System.Diagnostics;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\n\r\nnamespace Microsoft.Windows.Controls.Primitives\r\n{\r\n    /// <summary>\r\n    /// DatePickerTextBox is a specialized form of TextBox which displays custom visuals when its contents are empty\r\n    /// </summary>\r\n    [TemplatePart(Name = DatePickerTextBox.ElementContentName, Type = typeof(ContentControl))]\r\n    [TemplateVisualState(Name = VisualStates.StateNormal, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StateMouseOver, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StateDisabled, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StateUnfocused, GroupName = VisualStates.GroupFocus)]\r\n    [TemplateVisualState(Name = VisualStates.StateFocused, GroupName = VisualStates.GroupFocus)]\r\n    [TemplateVisualState(Name = VisualStates.StateUnwatermarked, GroupName = VisualStates.GroupWatermark)]\r\n    [TemplateVisualState(Name = VisualStates.StateWatermarked, GroupName = VisualStates.GroupWatermark)]\r\n    public sealed partial class DatePickerTextBox : TextBox\r\n    {\r\n        #region Constants\r\n        private const string ElementContentName = \"Watermark\";\r\n\r\n        #endregion\r\n\r\n        #region Data\r\n\r\n        private ContentControl elementContent;\r\n        private bool isHovered;\r\n\r\n        #endregion\r\n\r\n        #region Constructor\r\n\r\n        /// <summary>\r\n        /// Static constructor\r\n        /// </summary>\r\n        static DatePickerTextBox()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(DatePickerTextBox), new FrameworkPropertyMetadata(typeof(DatePickerTextBox)));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the <see cref=\"DatePickerTextBox\"/> class.\r\n        /// </summary>\r\n        public DatePickerTextBox()\r\n        {\r\n            this.Watermark = SR.Get(SRID.DatePickerTextBox_DefaultWatermarkText);\r\n            this.Loaded += OnLoaded;\r\n            this.IsEnabledChanged += new DependencyPropertyChangedEventHandler(OnDatePickerTextBoxIsEnabledChanged);\r\n        }\r\n        #endregion\r\n\r\n        #region Public Properties\r\n\r\n        #region Watermark\r\n        /// <summary>\r\n        /// Watermark dependency property\r\n        /// </summary>\r\n        internal static readonly DependencyProperty WatermarkProperty = DependencyProperty.Register(\r\n            \"Watermark\", typeof(object), typeof(DatePickerTextBox), new PropertyMetadata(OnWatermarkPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// Watermark content\r\n        /// </summary>\r\n        /// <value>The watermark.</value>\r\n        internal object Watermark\r\n        {\r\n            get { return (object)GetValue(WatermarkProperty); }\r\n            set { SetValue(WatermarkProperty, value); }\r\n        }\r\n\r\n        #endregion\r\n\r\n        #endregion Public Properties\r\n\r\n        #region Protected\r\n\r\n        /// <summary>\r\n        /// Called when template is applied to the control.\r\n        /// </summary>\r\n        public override void OnApplyTemplate()\r\n        {\r\n            base.OnApplyTemplate();\r\n\r\n            elementContent = ExtractTemplatePart<ContentControl>(ElementContentName);\r\n\r\n            OnWatermarkChanged();\r\n\r\n            ChangeVisualState(false);\r\n        }\r\n\r\n        protected override void OnGotFocus(RoutedEventArgs e)\r\n        {\r\n            base.OnGotFocus(e);\r\n            if (IsEnabled)\r\n            {\r\n                if (!string.IsNullOrEmpty(this.Text))\r\n                {\r\n                    Select(0, this.Text.Length);\r\n                }\r\n\r\n                ChangeVisualState(true);\r\n            }\r\n        }\r\n\r\n        protected override void OnLostFocus(RoutedEventArgs e)\r\n        {\r\n            base.OnLostFocus(e);\r\n            ChangeVisualState(true);\r\n        }\r\n\r\n        protected override void OnMouseEnter(MouseEventArgs e)\r\n        {\r\n            base.OnMouseEnter(e);\r\n\r\n            this.isHovered = true;\r\n\r\n            if (!IsFocused)\r\n            {\r\n                ChangeVisualState(true);\r\n            }\r\n        }\r\n\r\n        protected override void OnMouseLeave(MouseEventArgs e)\r\n        {\r\n            base.OnMouseLeave(e);\r\n\r\n            isHovered = false;\r\n\r\n            if (!IsFocused)\r\n            {\r\n                ChangeVisualState(true);\r\n            }\r\n        }\r\n\r\n        protected override void OnTextChanged(TextChangedEventArgs e)\r\n        {\r\n            base.OnTextChanged(e);\r\n\r\n            ChangeVisualState(true);\r\n        }\r\n\r\n        #endregion Protected\r\n\r\n        #region Private\r\n\r\n        private void OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            ApplyTemplate();\r\n            ChangeVisualState(false);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Change to the correct visual state for the textbox.\r\n        /// </summary>\r\n        /// <param name=\"useTransitions\">\r\n        /// true to use transitions when updating the visual state, false to\r\n        /// snap directly to the new visual state.\r\n        /// </param>\r\n        private void ChangeVisualState(bool useTransitions)\r\n        {\r\n            // Update the CommonStates group\r\n            if (!IsEnabled)\r\n            {\r\n                VisualStates.GoToState(this, useTransitions, VisualStates.StateDisabled, VisualStates.StateNormal);\r\n            }\r\n            else if (isHovered)\r\n            {\r\n                VisualStates.GoToState(this, useTransitions, VisualStates.StateMouseOver, VisualStates.StateNormal);\r\n            }\r\n            else\r\n            {\r\n                VisualStates.GoToState(this, useTransitions, VisualStates.StateNormal);\r\n            }\r\n\r\n            // Update the FocusStates group\r\n            if (IsFocused && IsEnabled)\r\n            {\r\n                VisualStates.GoToState(this, useTransitions, VisualStates.StateFocused, VisualStates.StateUnfocused);\r\n            }\r\n            else\r\n            {\r\n                VisualStates.GoToState(this, useTransitions, VisualStates.StateUnfocused);\r\n            }\r\n\r\n            // Update the WatermarkStates group\r\n            if (this.Watermark != null && string.IsNullOrEmpty(this.Text))\r\n            {\r\n                VisualStates.GoToState(this, useTransitions, VisualStates.StateWatermarked, VisualStates.StateUnwatermarked);\r\n            }\r\n            else\r\n            {\r\n                VisualStates.GoToState(this, useTransitions, VisualStates.StateUnwatermarked);\r\n            }\r\n        }\r\n\r\n        private T ExtractTemplatePart<T>(string partName) where T : DependencyObject\r\n        {\r\n            DependencyObject obj = GetTemplateChild(partName);\r\n            return ExtractTemplatePart<T>(partName, obj);\r\n        }\r\n\r\n        private static T ExtractTemplatePart<T>(string partName, DependencyObject obj) where T : DependencyObject\r\n        {\r\n            Debug.Assert(\r\n                obj == null || typeof(T).IsInstanceOfType(obj),\r\n                string.Format(CultureInfo.InvariantCulture, SR.Get(SRID.DatePickerTextBox_TemplatePartIsOfIncorrectType), partName, typeof(T).Name));\r\n            return obj as T;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the IsEnabled property changes.\r\n        /// </summary>\r\n        /// <param name=\"sender\">Sender object</param>\r\n        /// <param name=\"e\">Property changed args</param>\r\n        private void OnDatePickerTextBoxIsEnabledChanged(object sender, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            Debug.Assert(e.NewValue is bool);\r\n            bool isEnabled = (bool)e.NewValue;\r\n\r\n            IsReadOnly = !isEnabled;\r\n\r\n            ChangeVisualState(true);\r\n        }\r\n\r\n        private void OnWatermarkChanged()\r\n        {\r\n            if (elementContent != null)\r\n            {\r\n                Control watermarkControl = this.Watermark as Control;\r\n                if (watermarkControl != null)\r\n                {\r\n                    watermarkControl.IsTabStop = false;\r\n                    watermarkControl.IsHitTestVisible = false;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when watermark property is changed.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The sender.</param>\r\n        /// <param name=\"args\">The <see cref=\"System.Windows.DependencyPropertyChangedEventArgs\"/> instance containing the event data.</param>\r\n        private static void OnWatermarkPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)\r\n        {\r\n            DatePickerTextBox datePickerTextBox = sender as DatePickerTextBox;\r\n            Debug.Assert(datePickerTextBox != null, \"The source is not an instance of a DatePickerTextBox!\");\r\n            datePickerTextBox.OnWatermarkChanged();\r\n            datePickerTextBox.ChangeVisualState(true);\r\n        }\r\n\r\n        #endregion Private\r\n    }\r\n}\r\n\r\n"
  },
  {
    "path": "WpfToolkit/DatePicker/Themes/Aero.NormalColor.xaml",
    "content": "﻿<!--=================================================================\r\nCopyright (C) Microsoft Corporation.  All rights reserved.\r\n==================================================================-->\r\n\r\n<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n                    xmlns:local=\"clr-namespace:Microsoft.Windows.Controls\"\r\n                    xmlns:sys=\"clr-namespace:System;assembly=mscorlib\">\r\n\r\n  <sys:String x:Key=\"{ComponentResourceKey TypeInTargetAssembly={x:Type local:DatePicker},ResourceId=Theme}\">Aero.NormalColor</sys:String>\r\n\r\n</ResourceDictionary>\r\n"
  },
  {
    "path": "WpfToolkit/DatePicker/Themes/Classic.xaml",
    "content": "﻿<!--=================================================================\r\nCopyright (C) Microsoft Corporation.  All rights reserved.\r\n==================================================================-->\r\n\r\n<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n                    xmlns:local=\"clr-namespace:Microsoft.Windows.Controls\"\r\n                    xmlns:sys=\"clr-namespace:System;assembly=mscorlib\">\r\n\r\n  <sys:String x:Key=\"{ComponentResourceKey TypeInTargetAssembly={x:Type local:DatePicker}, ResourceId=Theme}\">Classic</sys:String>\r\n\r\n</ResourceDictionary>\r\n"
  },
  {
    "path": "WpfToolkit/DatePicker/Themes/Generic.xaml",
    "content": "﻿<!--=================================================================\r\nCopyright (C) Microsoft Corporation.  All rights reserved.\r\n==================================================================-->\r\n\r\n<ResourceDictionary \r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:local=\"clr-namespace:Microsoft.Windows.Controls\"\r\n    xmlns:primitives=\"clr-namespace:Microsoft.Windows.Controls.Primitives\"\r\n    xmlns:vsm=\"clr-namespace:System.Windows\">\r\n\r\n    <!-- Button Template -->\r\n    <ControlTemplate x:Key=\"DropDownButtonTemplate\" TargetType=\"Button\">\r\n        <Grid>\r\n            <vsm:VisualStateManager.VisualStateGroups>\r\n                <vsm:VisualStateGroup x:Name=\"CommonStates\">\r\n                    <vsm:VisualStateGroup.Transitions>\r\n                        <vsm:VisualTransition GeneratedDuration=\"0\" />\r\n                        <vsm:VisualTransition To=\"MouseOver\" GeneratedDuration=\"0:0:0.1\" />\r\n                        <vsm:VisualTransition To=\"Pressed\" GeneratedDuration=\"0:0:0.1\" />\r\n                    </vsm:VisualStateGroup.Transitions>\r\n                    <vsm:VisualState x:Name=\"Normal\" />\r\n                    <vsm:VisualState x:Name=\"MouseOver\">\r\n                        <Storyboard>\r\n                            <ColorAnimation Duration=\"0\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Border.Background).(SolidColorBrush.Color)\" To=\"#FF448DCA\"/>\r\n                            <ColorAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"00:00:00.001\" Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Border.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                <SplineColorKeyFrame KeyTime=\"0\" Value=\"#7FFFFFFF\"/>\r\n                            </ColorAnimationUsingKeyFrames>\r\n                            <ColorAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"00:00:00.001\" Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                <SplineColorKeyFrame KeyTime=\"0\" Value=\"#CCFFFFFF\"/>\r\n                            </ColorAnimationUsingKeyFrames>\r\n                            <ColorAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"00:00:00.001\" Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F2FFFFFF\"/>\r\n                            </ColorAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </vsm:VisualState>\r\n                    <vsm:VisualState x:Name=\"Pressed\">\r\n                        <Storyboard>\r\n                            <ColorAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"00:00:00.001\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Border.Background).(SolidColorBrush.Color)\">\r\n                                <SplineColorKeyFrame KeyTime=\"0\" Value=\"#FF448DCA\"/>\r\n                            </ColorAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"00:00:00.001\" Storyboard.TargetName=\"Highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <ColorAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"00:00:00.001\" Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                <SplineColorKeyFrame KeyTime=\"0\" Value=\"#EAFFFFFF\"/>\r\n                            </ColorAnimationUsingKeyFrames>\r\n                            <ColorAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"00:00:00.001\" Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                <SplineColorKeyFrame KeyTime=\"0\" Value=\"#C6FFFFFF\"/>\r\n                            </ColorAnimationUsingKeyFrames>\r\n                            <ColorAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"00:00:00.001\" Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Border.Background).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                <SplineColorKeyFrame KeyTime=\"0\" Value=\"#6BFFFFFF\"/>\r\n                            </ColorAnimationUsingKeyFrames>\r\n                            <ColorAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"00:00:00.001\" Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F4FFFFFF\"/>\r\n                            </ColorAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </vsm:VisualState>\r\n                    <vsm:VisualState x:Name=\"Disabled\" />\r\n                </vsm:VisualStateGroup>\r\n            </vsm:VisualStateManager.VisualStateGroups>\r\n\r\n            <!--Start UI-->\r\n            <Grid Height=\"18\" Width=\"19\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Margin=\"0\" Background=\"#11FFFFFF\" FlowDirection=\"LeftToRight\">\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"20*\"/>\r\n                    <ColumnDefinition Width=\"20*\"/>\r\n                    <ColumnDefinition Width=\"20*\"/>\r\n                    <ColumnDefinition Width=\"20*\"/>\r\n                </Grid.ColumnDefinitions>\r\n                <Grid.RowDefinitions>\r\n                    <RowDefinition Height=\"23*\"/>\r\n                    <RowDefinition Height=\"19*\"/>\r\n                    <RowDefinition Height=\"19*\"/>\r\n                    <RowDefinition Height=\"19*\"/>\r\n                </Grid.RowDefinitions>\r\n                <Border Margin=\"-1\" Grid.ColumnSpan=\"4\" Grid.Row=\"0\" Grid.RowSpan=\"4\" BorderThickness=\"1\" BorderBrush=\"#FF45D6FA\" Opacity=\"0\" CornerRadius=\"0,0,1,1\" x:Name=\"Highlight\"/>\r\n                <Border x:Name=\"Background\" Margin=\"0,-1,0,0\" Grid.ColumnSpan=\"4\" Grid.Row=\"1\" Grid.RowSpan=\"3\" BorderThickness=\"1\" BorderBrush=\"#FFFFFFFF\" Opacity=\"1\" CornerRadius=\".5\" Background=\"#FF1F3B53\"/>\r\n                <Border x:Name=\"BackgroundGradient\" Margin=\"0,-1,0,0\" Grid.ColumnSpan=\"4\" Grid.Row=\"1\" Grid.RowSpan=\"3\" BorderThickness=\"1\" BorderBrush=\"#BF000000\" Opacity=\"1\" CornerRadius=\".5\">\r\n                    <Border.Background>\r\n                        <LinearGradientBrush StartPoint=\".7,0\" EndPoint=\".7,1\">\r\n                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                            <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\" />\r\n                            <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.625\" />\r\n                            <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\" />\r\n                        </LinearGradientBrush>\r\n                    </Border.Background>\r\n                </Border>\r\n                <Rectangle Grid.ColumnSpan=\"4\" Grid.RowSpan=\"1\" StrokeThickness=\"1\">\r\n                    <Rectangle.Stroke>\r\n                        <LinearGradientBrush EndPoint=\"0.48,-1\" StartPoint=\"0.48,1.25\">\r\n                            <GradientStop Color=\"#FF494949\"/>\r\n                            <GradientStop Color=\"#FF9F9F9F\" Offset=\"1\"/>\r\n                        </LinearGradientBrush>\r\n                    </Rectangle.Stroke>\r\n                    <Rectangle.Fill>\r\n                        <LinearGradientBrush EndPoint=\"0.3,-1.1\" StartPoint=\"0.46,1.6\">\r\n                            <GradientStop Color=\"#FF4084BD\"/>\r\n                            <GradientStop Color=\"#FFAFCFEA\" Offset=\"1\"/>\r\n                        </LinearGradientBrush>\r\n                    </Rectangle.Fill>\r\n                </Rectangle>\r\n                <Path HorizontalAlignment=\"Center\" Margin=\"4,3,4,3\" VerticalAlignment=\"Center\" RenderTransformOrigin=\"0.5,0.5\" Grid.Column=\"0\" Grid.Row=\"1\" Fill=\"#FF2F2F2F\" Stretch=\"Fill\" Data=\"M11.426758,8.4305077 L11.749023,8.4305077 L11.749023,16.331387 L10.674805,16.331387 L10.674805,10.299648 L9.0742188,11.298672 L9.0742188,10.294277 C9.4788408,10.090176 9.9094238,9.8090878 10.365967,9.4510155 C10.82251,9.0929432 11.176106,8.7527733 11.426758,8.4305077 z M14.65086,8.4305077 L18.566387,8.4305077 L18.566387,9.3435936 L15.671368,9.3435936 L15.671368,11.255703 C15.936341,11.058764 16.27293,10.960293 16.681133,10.960293 C17.411602,10.960293 17.969301,11.178717 18.354229,11.615566 C18.739157,12.052416 18.931622,12.673672 18.931622,13.479336 C18.931622,15.452317 18.052553,16.438808 16.294415,16.438808 C15.560365,16.438808 14.951641,16.234707 14.468243,15.826504 L14.881817,14.929531 C15.368796,15.326992 15.837872,15.525723 16.289043,15.525723 C17.298809,15.525723 17.803692,14.895514 17.803692,13.635098 C17.803692,12.460618 17.305971,11.873379 16.310528,11.873379 C15.83071,11.873379 15.399232,12.079271 15.016094,12.491055 L14.65086,12.238613 z\" Grid.ColumnSpan=\"4\" Grid.RowSpan=\"3\"/>\r\n                <Ellipse HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Fill=\"#FFFFFFFF\" StrokeThickness=\"0\" Grid.ColumnSpan=\"4\" Width=\"3\" Height=\"3\"/>\r\n                <Border Grid.ColumnSpan=\"4\" Grid.Row=\"0\" Grid.RowSpan=\"4\" BorderThickness=\"1\" BorderBrush=\"#B2FFFFFF\" Opacity=\"0\" CornerRadius=\"0,0,.5,.5\" x:Name=\"DisabledVisual\"/>\r\n            </Grid>\r\n            <!--End UI-->\r\n        </Grid>\r\n    </ControlTemplate>\r\n    \r\n    <!-- DatePicker -->\r\n    <Style TargetType=\"{x:Type local:DatePicker}\">\r\n        <Setter Property=\"Foreground\" Value=\"#FF333333\" />\r\n        <Setter Property=\"IsTodayHighlighted\" Value=\"True\" />\r\n        <Setter Property=\"SelectedDateFormat\" Value=\"Short\" />\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"Padding\" Value=\"2\"/>\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\".5,0\" StartPoint=\".5,1\">\r\n                    <GradientStop Color=\"#FFA3AEB9\" Offset=\"0\"/>\r\n                    <GradientStop Color=\"#FF8399A9\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF718597\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF617584\" Offset=\"1\"/>\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type local:DatePicker}\">\r\n                    <Border BorderBrush=\"{TemplateBinding BorderBrush}\" \r\n                            BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                            Background=\"{TemplateBinding Background}\" \r\n                            Padding=\"{TemplateBinding Padding}\">\r\n                        <vsm:VisualStateManager.VisualStateGroups>\r\n                            <vsm:VisualStateGroup x:Name=\"CommonStates\">\r\n                                <vsm:VisualState x:Name=\"Normal\" />\r\n                                <vsm:VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"PART_DisabledVisual\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" Duration=\"0\" />\r\n                                    </Storyboard>\r\n                                </vsm:VisualState>\r\n                            </vsm:VisualStateGroup>\r\n                        </vsm:VisualStateManager.VisualStateGroups>\r\n                        <Border.Child>\r\n                            <Grid x:Name=\"PART_Root\"\r\n                                  HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" \r\n                                  VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\">\r\n                                <Grid.Resources>\r\n                                    <!-- Main DatePicker Brushes -->\r\n                                    <SolidColorBrush x:Key=\"DisabledBrush\" Color=\"#A5FFFFFF\" />\r\n                                </Grid.Resources>\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"*\" />\r\n                                    <ColumnDefinition Width=\"Auto\" />\r\n                                </Grid.ColumnDefinitions>\r\n                                <Button x:Name=\"PART_Button\" Grid.Row=\"0\" Grid.Column=\"1\"\r\n                                        Template=\"{StaticResource DropDownButtonTemplate}\"\r\n                                        Foreground=\"{TemplateBinding Foreground}\" \r\n                                        Width=\"20\"\r\n                                        Margin=\"3,0,3,0\" \r\n                                        Focusable=\"False\" \r\n                                        VerticalAlignment=\"Top\"\r\n                                        HorizontalAlignment=\"Left\" />\r\n                                <primitives:DatePickerTextBox x:Name=\"PART_TextBox\" \r\n                                    Grid.Row=\"0\" Grid.Column=\"0\" \r\n                                    Foreground=\"{TemplateBinding Foreground}\" \r\n                                    HorizontalContentAlignment=\"Stretch\"\r\n                                    VerticalContentAlignment=\"Stretch\" \r\n                                    Focusable=\"{TemplateBinding Focusable}\" />\r\n                                <Grid x:Name=\"PART_DisabledVisual\" \r\n                                      Opacity=\"0\" \r\n                                      IsHitTestVisible=\"False\" \r\n                                      Grid.Row=\"0\" Grid.Column=\"0\"\r\n                                      Grid.ColumnSpan=\"2\">\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition Width=\"*\"/>\r\n                                        <ColumnDefinition Width=\"Auto\"/>\r\n                                    </Grid.ColumnDefinitions>\r\n                                    <Rectangle Grid.Row=\"0\" Grid.Column=\"0\" RadiusX=\"1\" RadiusY=\"1\" Fill=\"#A5FFFFFF\"/>\r\n                                    <Rectangle Grid.Row=\"0\" Grid.Column=\"1\" RadiusX=\"1\" RadiusY=\"1\" Fill=\"#A5FFFFFF\" Height=\"18\" Width=\"19\" Margin=\"3,0,3,0\" />\r\n                                    <Popup x:Name=\"PART_Popup\" \r\n                                           PlacementTarget=\"{Binding ElementName=PART_Button}\"\r\n                                           Placement=\"Bottom\" \r\n                                           StaysOpen=\"False\"\r\n                                           AllowsTransparency=\"True\" />\r\n                                </Grid>\r\n                            </Grid>\r\n                        </Border.Child>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- DatePickerTextBox -->\r\n    <Style TargetType=\"{x:Type primitives:DatePickerTextBox}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource {x:Static SystemColors.WindowBrushKey}}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"primitives:DatePickerTextBox\">\r\n                    <Grid>\r\n                        <Grid.Resources>\r\n                            <SolidColorBrush x:Key=\"WatermarkBrush\" Color=\"#FFAAAAAA\"/>\r\n                        </Grid.Resources>\r\n                        <vsm:VisualStateManager.VisualStateGroups>\r\n                            <vsm:VisualStateGroup x:Name=\"CommonStates\">\r\n                                <vsm:VisualStateGroup.Transitions>\r\n                                    <vsm:VisualTransition GeneratedDuration=\"0\" />\r\n                                    <vsm:VisualTransition To=\"MouseOver\" GeneratedDuration=\"0:0:0.1\" />\r\n                                </vsm:VisualStateGroup.Transitions>\r\n                                <vsm:VisualState x:Name=\"Normal\" />\r\n                                <vsm:VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimation Storyboard.TargetName=\"ContentElement\" Storyboard.TargetProperty=\"(Border.BorderBrush).(SolidColorBrush.Color)\" To=\"#FF99C1E2\" Duration=\"0\"/>\r\n                                        <ColorAnimation Storyboard.TargetName=\"watermark_decorator\" Storyboard.TargetProperty=\"(Border.BorderBrush).(SolidColorBrush.Color)\" To=\"#FF99C1E2\" Duration=\"0\"/>\r\n                                    </Storyboard>\r\n                                </vsm:VisualState>\r\n                            </vsm:VisualStateGroup>\r\n                            <vsm:VisualStateGroup x:Name=\"WatermarkStates\">\r\n                                <vsm:VisualStateGroup.Transitions>\r\n                                    <vsm:VisualTransition GeneratedDuration=\"0\" />\r\n                                </vsm:VisualStateGroup.Transitions>\r\n                                <vsm:VisualState x:Name=\"Unwatermarked\" />\r\n                                <vsm:VisualState x:Name=\"Watermarked\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"ContentElement\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" Duration=\"0\" />\r\n                                        <DoubleAnimation Storyboard.TargetName=\"PART_Watermark\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" Duration=\"0\" />\r\n                                    </Storyboard>\r\n                                </vsm:VisualState>\r\n                            </vsm:VisualStateGroup>\r\n                            <vsm:VisualStateGroup x:Name=\"FocusStates\">\r\n                                <vsm:VisualStateGroup.Transitions>\r\n                                    <vsm:VisualTransition GeneratedDuration=\"0\" />\r\n                                </vsm:VisualStateGroup.Transitions>\r\n                                <vsm:VisualState x:Name=\"Unfocused\" />\r\n                                <vsm:VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" Duration=\"0\" />\r\n                                    </Storyboard>\r\n                                </vsm:VisualState>\r\n                            </vsm:VisualStateGroup>\r\n                        </vsm:VisualStateManager.VisualStateGroups>\r\n\r\n\r\n                        <!--Start UI-->\r\n                        <Border x:Name=\"Border\" \r\n                                Background=\"{TemplateBinding Background}\" \r\n                                BorderBrush=\"{TemplateBinding BorderBrush}\" \r\n                                BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                                Padding=\"{TemplateBinding Padding}\"\r\n                                CornerRadius=\"1\" \r\n                                Opacity=\"1\">\r\n                            <Grid x:Name=\"WatermarkContent\"\r\n                                  HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                                  VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\">\r\n                                <Border x:Name=\"ContentElement\" BorderThickness=\"1\">\r\n                                    <Border.BorderBrush>\r\n                                        <SolidColorBrush Color=\"#FFFFFFFF\"/>\r\n                                    </Border.BorderBrush>\r\n                                </Border>\r\n                                <Border x:Name=\"watermark_decorator\" BorderThickness=\"1\">\r\n                                    <Border.BorderBrush>\r\n                                        <SolidColorBrush Color=\"#FFFFFFFF\"/>\r\n                                    </Border.BorderBrush>\r\n                                    <ContentControl x:Name=\"PART_Watermark\"\r\n                                                        Opacity=\"0\"\r\n                                                        Focusable=\"False\"\r\n                                                        IsHitTestVisible=\"False\"\r\n                                                        Content=\"{TemplateBinding Watermark}\"\r\n                                                        Padding=\"2\"/>\r\n                                </Border>\r\n                                <ScrollViewer x:Name=\"PART_ContentHost\" \r\n                                              Margin=\"0\"\r\n                                              HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                                              VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\" />\r\n                                <Border x:Name=\"FocusVisual\" BorderBrush=\"#FF45D6FA\" CornerRadius=\"1\" Opacity=\"0\" IsHitTestVisible=\"False\"/>\r\n                            </Grid>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/DatePicker/Themes/Luna.HomeStead.xaml",
    "content": "﻿<!--=================================================================\r\nCopyright (C) Microsoft Corporation.  All rights reserved.\r\n==================================================================-->\r\n\r\n<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n                    xmlns:local=\"clr-namespace:Microsoft.Windows.Controls\"\r\n                    xmlns:sys=\"clr-namespace:System;assembly=mscorlib\">\r\n\r\n  <sys:String x:Key=\"{ComponentResourceKey TypeInTargetAssembly={x:Type local:DatePicker},ResourceId=Theme}\">Luna.HomeStead</sys:String>\r\n\r\n</ResourceDictionary>\r\n"
  },
  {
    "path": "WpfToolkit/DatePicker/Themes/Luna.Metallic.xaml",
    "content": "﻿<!--=================================================================\r\nCopyright (C) Microsoft Corporation.  All rights reserved.\r\n==================================================================-->\r\n\r\n<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n                    xmlns:local=\"clr-namespace:Microsoft.Windows.Controls\"\r\n                    xmlns:sys=\"clr-namespace:System;assembly=mscorlib\">\r\n\r\n  <sys:String x:Key=\"{ComponentResourceKey TypeInTargetAssembly={x:Type local:DatePicker},ResourceId=Theme}\">Luna.Metallic</sys:String>\r\n\r\n</ResourceDictionary>\r\n"
  },
  {
    "path": "WpfToolkit/DatePicker/Themes/Luna.NormalColor.xaml",
    "content": "﻿<!--=================================================================\r\nCopyright (C) Microsoft Corporation.  All rights reserved.\r\n==================================================================-->\r\n\r\n<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n                    xmlns:local=\"clr-namespace:Microsoft.Windows.Controls\"\r\n                    xmlns:sys=\"clr-namespace:System;assembly=mscorlib\">\r\n\r\n  <sys:String x:Key=\"{ComponentResourceKey TypeInTargetAssembly={x:Type local:DatePicker},ResourceId=Theme}\">Luna.NormalColor</sys:String>\r\n\r\n</ResourceDictionary>\r\n"
  },
  {
    "path": "WpfToolkit/DatePicker/Themes/Royale.NormalColor.xaml",
    "content": "﻿<!--=================================================================\r\nCopyright (C) Microsoft Corporation.  All rights reserved.\r\n==================================================================-->\r\n\r\n<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n                    xmlns:local=\"clr-namespace:Microsoft.Windows.Controls\"\r\n                    xmlns:sys=\"clr-namespace:System;assembly=mscorlib\">\r\n\r\n  <sys:String x:Key=\"{ComponentResourceKey TypeInTargetAssembly={x:Type local:DatePicker},ResourceId=Theme}\">Royale.NormalColor</sys:String>\r\n\r\n</ResourceDictionary>\r\n"
  },
  {
    "path": "WpfToolkit/GlobalSuppressions.cs",
    "content": "// This file is used by Code Analysis to maintain SuppressMessage \r\n// attributes that are applied to this project. \r\n// Project-level suppressions either have no target or are given \r\n// a specific target and scoped to a namespace, type, member, etc. \r\n//\r\n// To add a suppression to this file, right-click the message in the \r\n// Error List, point to \"Suppress Message(s)\", and click \r\n// \"In Project Suppression File\". \r\n// You do not need to add suppressions to this file manually. \r\n\r\n[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\", MessageId = \"GridLines\", Scope = \"member\", Target = \"Microsoft.Windows.Controls.DataGrid.#GridLinesVisibility\")]\r\n[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\", MessageId = \"GridLines\", Scope = \"member\", Target = \"Microsoft.Windows.Controls.DataGrid.#GridLinesVisibilityProperty\")]\r\n[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\", MessageId = \"GridLines\", Scope = \"member\", Target = \"Microsoft.Windows.Controls.DataGrid.#HorizontalGridLinesBrush\")]\r\n[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\", MessageId = \"GridLines\", Scope = \"member\", Target = \"Microsoft.Windows.Controls.DataGrid.#HorizontalGridLinesBrushProperty\")]\r\n[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\", MessageId = \"GridLines\", Scope = \"member\", Target = \"Microsoft.Windows.Controls.DataGrid.#VerticalGridLinesBrush\")]\r\n[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\", MessageId = \"GridLines\", Scope = \"member\", Target = \"Microsoft.Windows.Controls.DataGrid.#VerticalGridLinesBrushProperty\")]\r\n[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Security\", \"CA2104:DoNotDeclareReadOnlyMutableReferenceTypes\", Scope = \"member\", Target = \"Microsoft.Windows.Controls.DataGridColumn.#ActualWidthPropertyKey\")]\r\n[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\", MessageId = \"GridLines\", Scope = \"type\", Target = \"Microsoft.Windows.Controls.DataGridGridLinesVisibility\")]\r\n[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Naming\", \"CA1714:FlagsEnumsShouldHavePluralNames\", Scope = \"type\", Target = \"Microsoft.Windows.Controls.DataGridHeadersVisibility\")]\r\n[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\", Scope = \"member\", Target = \"Microsoft.Windows.Controls.DataGridRow.#GetRowContainingElement(System.Windows.FrameworkElement)\")]\r\n[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"Microsoft.Windows.Controls.SRID.#Calendar_OnDisplayModePropertyChanged_InvalidValue\")]\r\n[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"Microsoft.Windows.Controls.SRID.#Calendar_OnFirstDayOfWeekChanged_InvalidValue\")]\r\n[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"Microsoft.Windows.Controls.SRID.#Calendar_OnSelectionModeChanged_InvalidValue\")]\r\n[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"Microsoft.Windows.Controls.SRID.#DataGrid_BeginEditCommandText\")]\r\n[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"Microsoft.Windows.Controls.SRID.#DataGrid_CancelEditCommandText\")]\r\n[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"Microsoft.Windows.Controls.SRID.#DataGrid_CommitEditCommandText\")]\r\n[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"Microsoft.Windows.Controls.SRID.#DataGrid_DeleteCommandText\")]\r\n[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"Microsoft.Windows.Controls.SRID.#DataGrid_NewColumnInvalidDisplayIndex\")]\r\n[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"Microsoft.Windows.Controls.SRID.#DataGrid_SelectAllCommandText\")]\r\n[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"Microsoft.Windows.Controls.SRID.#DataGrid_SelectAllKey\")]\r\n[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"Microsoft.Windows.Controls.SRID.#DataGrid_SelectAllKeyDisplayString\")]\r\n[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"Microsoft.Windows.Controls.SRID.#DatePicker_OnSelectedDateFormatChanged_InvalidValue\")]\r\n[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"Microsoft.Windows.Controls.SRID.#DatePickerTextBox_TemplatePartIsOfIncorrectType\")]\r\n[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"Microsoft.Windows.Controls.VirtualizedCellInfoCollection.#IsValidCell(Microsoft.Windows.Controls.DataGridCellInfo)\")]\r\n[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"o\", Scope = \"member\", Target = \"Microsoft.Windows.Controls.VisualStateBehavior.#UpdateStateHandler(System.Object,System.EventArgs)\")]\r\n[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Security\", \"CA2109:ReviewVisibleEventHandlers\", Scope = \"member\", Target = \"Microsoft.Windows.Controls.VisualStateBehavior.#UpdateStateHandler(System.Object,System.EventArgs)\")]\r\n[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\", Scope = \"member\", Target = \"System.Windows.VisualStateManager.#GetCustomVisualStateManager(System.Windows.FrameworkElement)\")]\r\n[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Design\", \"CA1030:UseEventsWhereAppropriate\", Scope = \"member\", Target = \"System.Windows.VisualStateManager.#RaiseCurrentStateChanged(System.Windows.VisualStateGroup,System.Windows.VisualState,System.Windows.VisualState,System.Windows.Controls.Control)\")]\r\n[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Design\", \"CA1030:UseEventsWhereAppropriate\", Scope = \"member\", Target = \"System.Windows.VisualStateManager.#RaiseCurrentStateChanging(System.Windows.VisualStateGroup,System.Windows.VisualState,System.Windows.VisualState,System.Windows.Controls.Control)\")]\r\n[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\", Scope = \"member\", Target = \"System.Windows.VisualStateManager.#SetCustomVisualStateManager(System.Windows.FrameworkElement,System.Windows.VisualStateManager)\")]\r\n[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Naming\", \"CA1709:IdentifiersShouldBeCasedCorrectly\", MessageId = \"WPF\")]\r\n"
  },
  {
    "path": "WpfToolkit/Input/AutoCompleteBox/System/Windows/Automation/Peers/AutoCompleteBoxAutomationPeer.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Windows.Automation.Provider;\r\nusing System.Windows.Controls;\r\n\r\nnamespace System.Windows.Automation.Peers\r\n{\r\n    /// <summary>\r\n    /// Exposes AutoCompleteBox types to UI Automation.\r\n    /// </summary>\r\n    /// <QualityBand>Stable</QualityBand>\r\n    public sealed class AutoCompleteBoxAutomationPeer : FrameworkElementAutomationPeer, IValueProvider, IExpandCollapseProvider, ISelectionProvider\r\n    {\r\n        /// <summary>\r\n        /// The name reported as the core class name.\r\n        /// </summary>\r\n        private const string AutoCompleteBoxClassNameCore = \"AutoCompleteBox\";\r\n\r\n        /// <summary>\r\n        /// Gets the AutoCompleteBox that owns this\r\n        /// AutoCompleteBoxAutomationPeer.\r\n        /// </summary>\r\n        private AutoCompleteBox OwnerAutoCompleteBox\r\n        {\r\n            get { return (AutoCompleteBox)Owner; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether the UI automation provider allows\r\n        /// more than one child element to be selected concurrently.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// This API supports the .NET Framework infrastructure and is not \r\n        /// intended to be used directly from your code.\r\n        /// </remarks>\r\n        /// <value>True if multiple selection is allowed; otherwise, false.</value>\r\n        bool ISelectionProvider.CanSelectMultiple\r\n        {\r\n            get { return false; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether the UI automation provider\r\n        /// requires at least one child element to be selected.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// This API supports the .NET Framework infrastructure and is not \r\n        /// intended to be used directly from your code.\r\n        /// </remarks>\r\n        /// <value>True if selection is required; otherwise, false.</value>\r\n        bool ISelectionProvider.IsSelectionRequired\r\n        {\r\n            get { return false; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the AutoCompleteBoxAutomationPeer\r\n        /// class.\r\n        /// </summary>\r\n        /// <param name=\"owner\">\r\n        /// The AutoCompleteBox that is associated with this\r\n        /// AutoCompleteBoxAutomationPeer.\r\n        /// </param>\r\n        public AutoCompleteBoxAutomationPeer(AutoCompleteBox owner)\r\n            : base(owner)\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the control type for the AutoCompleteBox that is associated\r\n        /// with this AutoCompleteBoxAutomationPeer. This method is called by\r\n        /// GetAutomationControlType.\r\n        /// </summary>\r\n        /// <returns>ComboBox AutomationControlType.</returns>\r\n        protected override AutomationControlType GetAutomationControlTypeCore()\r\n        {\r\n            return AutomationControlType.ComboBox;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the name of the AutoCompleteBox that is associated with this\r\n        /// AutoCompleteBoxAutomationPeer. This method is called by\r\n        /// GetClassName.\r\n        /// </summary>\r\n        /// <returns>The name AutoCompleteBox.</returns>\r\n        protected override string GetClassNameCore()\r\n        {\r\n            return AutoCompleteBoxClassNameCore;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the control pattern for the AutoCompleteBox that is associated\r\n        /// with this AutoCompleteBoxAutomationPeer.\r\n        /// </summary>\r\n        /// <param name=\"patternInterface\">The desired PatternInterface.</param>\r\n        /// <returns>The desired AutomationPeer or null.</returns>\r\n        public override object GetPattern(PatternInterface patternInterface)\r\n        {\r\n            object iface = null;\r\n            AutoCompleteBox owner = OwnerAutoCompleteBox;\r\n\r\n            if (patternInterface == PatternInterface.Value)\r\n            {\r\n                iface = this;\r\n            }\r\n            else if (patternInterface == PatternInterface.ExpandCollapse)\r\n            {\r\n                iface = this;\r\n            }\r\n            else if (owner.SelectionAdapter != null)\r\n            {\r\n                AutomationPeer peer = owner.SelectionAdapter.CreateAutomationPeer();\r\n                if (peer != null)\r\n                {\r\n                    iface = peer.GetPattern(patternInterface);\r\n                }\r\n            }\r\n\r\n            if (iface == null)\r\n            {\r\n                iface = base.GetPattern(patternInterface);\r\n            }\r\n\r\n            return iface;\r\n        }\r\n\r\n        #region ExpandCollapse\r\n        /// <summary>\r\n        /// Blocking method that returns after the element has been expanded.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// This API supports the .NET Framework infrastructure and is not \r\n        /// intended to be used directly from your code.\r\n        /// </remarks>\r\n        void IExpandCollapseProvider.Expand()\r\n        {\r\n            if (!IsEnabled())\r\n            {\r\n                throw new ElementNotEnabledException();\r\n            }\r\n\r\n            OwnerAutoCompleteBox.IsDropDownOpen = true;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Blocking method that returns after the element has been collapsed.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// This API supports the .NET Framework infrastructure and is not \r\n        /// intended to be used directly from your code.\r\n        /// </remarks>\r\n        void IExpandCollapseProvider.Collapse()\r\n        {\r\n            if (!IsEnabled())\r\n            {\r\n                throw new ElementNotEnabledException();\r\n            }\r\n\r\n            OwnerAutoCompleteBox.IsDropDownOpen = false;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets an element's current Collapsed or Expanded state.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// This API supports the .NET Framework infrastructure and is not \r\n        /// intended to be used directly from your code.\r\n        /// </remarks>\r\n        ExpandCollapseState IExpandCollapseProvider.ExpandCollapseState\r\n        {\r\n            get\r\n            {\r\n                return OwnerAutoCompleteBox.IsDropDownOpen ? ExpandCollapseState.Expanded : ExpandCollapseState.Collapsed;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Raises the ExpandCollapse automation event.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">The old value.</param>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        internal void RaiseExpandCollapseAutomationEvent(bool oldValue, bool newValue)\r\n        {\r\n            RaisePropertyChangedEvent(\r\n                ExpandCollapsePatternIdentifiers.ExpandCollapseStateProperty,\r\n                oldValue ? ExpandCollapseState.Expanded : ExpandCollapseState.Collapsed,\r\n                newValue ? ExpandCollapseState.Expanded : ExpandCollapseState.Collapsed);\r\n        }\r\n        #endregion ExpandCollapse\r\n\r\n        #region ValueProvider\r\n        \r\n        /// <summary>\r\n        /// Sets the value of a control.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value to set. The provider is responsible\r\n        /// for converting the value to the appropriate data type.</param>\r\n        void IValueProvider.SetValue(string value)\r\n        {\r\n            OwnerAutoCompleteBox.Text = value;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether the value of a control is\r\n        /// read-only.\r\n        /// </summary>\r\n        /// <value>True if the value is read-only; false if it can be modified.</value>\r\n        bool IValueProvider.IsReadOnly\r\n        {\r\n            get\r\n            {\r\n                return !OwnerAutoCompleteBox.IsEnabled;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the value of the control.\r\n        /// </summary>\r\n        /// <value>The value of the control.</value>\r\n        string IValueProvider.Value\r\n        {\r\n            get\r\n            {\r\n                return OwnerAutoCompleteBox.Text ?? string.Empty;\r\n            }\r\n        }\r\n        #endregion\r\n\r\n        /// <summary>\r\n        /// Gets the collection of child elements of the AutoCompleteBox that\r\n        /// are associated with this AutoCompleteBoxAutomationPeer. This method\r\n        /// is called by GetChildren.\r\n        /// </summary>\r\n        /// <returns>\r\n        /// A collection of automation peer elements, or an empty collection\r\n        /// if there are no child elements.\r\n        /// </returns>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1002:DoNotExposeGenericLists\", Justification = \"Required by automation\")]\r\n        protected override List<AutomationPeer> GetChildrenCore()\r\n        {\r\n            List<AutomationPeer> children = new List<AutomationPeer>();\r\n            AutoCompleteBox owner = OwnerAutoCompleteBox;\r\n\r\n            // TextBox part.\r\n            TextBox textBox = owner.TextBox;\r\n            if (textBox != null)\r\n            {\r\n                AutomationPeer peer = FrameworkElementAutomationPeer.CreatePeerForElement(textBox);\r\n                if (peer != null)\r\n                {\r\n                    children.Insert(0, peer);\r\n                }\r\n           }\r\n\r\n            // Include SelectionAdapter's children.\r\n            if (owner.SelectionAdapter != null)\r\n            {\r\n                AutomationPeer selectionAdapterPeer = owner.SelectionAdapter.CreateAutomationPeer();\r\n                if (selectionAdapterPeer != null)\r\n                {\r\n                    List<AutomationPeer> listChildren = selectionAdapterPeer.GetChildren();\r\n                    if (listChildren != null)\r\n                    {\r\n                        foreach (AutomationPeer child in listChildren)\r\n                        {\r\n                            children.Add(child);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            return children;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Retrieves a UI automation provider for each child element that is\r\n        /// selected.\r\n        /// </summary>\r\n        /// <returns>An array of UI automation providers.</returns>\r\n        /// <remarks>\r\n        /// This API supports the .NET Framework infrastructure and is not \r\n        /// intended to be used directly from your code.\r\n        /// </remarks>\r\n        IRawElementProviderSimple[] ISelectionProvider.GetSelection()\r\n        {\r\n            if (OwnerAutoCompleteBox.SelectionAdapter != null)\r\n            {\r\n                object selectedItem = OwnerAutoCompleteBox.SelectionAdapter.SelectedItem;\r\n                if (selectedItem != null)\r\n                {\r\n                    UIElement uie = selectedItem as UIElement;\r\n                    if (uie != null)\r\n                    {\r\n                        AutomationPeer peer = FrameworkElementAutomationPeer.CreatePeerForElement(uie);\r\n                        if (peer != null)\r\n                        {\r\n                            return new IRawElementProviderSimple[] { ProviderFromPeer(peer) };\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            return new IRawElementProviderSimple[] { };\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Input/AutoCompleteBox/System/Windows/Controls/AutoCompleteBox.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Collections.Specialized;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Windows.Automation.Peers;\r\nusing System.Windows.Controls.Primitives;\r\nusing System.Windows.Data;\r\nusing System.Windows.Input;\r\nusing System.Windows.Markup;\r\nusing System.Windows.Media;\r\nusing System.Windows.Threading;\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Represents a control that provides a text box for user input and a\r\n    /// drop-down that contains possible matches based on the input in the text\r\n    /// box.\r\n    /// </summary>\r\n    /// <QualityBand>Stable</QualityBand>\r\n    [TemplatePart(Name = AutoCompleteBox.ElementSelectionAdapter, Type = typeof(ISelectionAdapter))]\r\n    [TemplatePart(Name = AutoCompleteBox.ElementSelector, Type = typeof(Selector))]\r\n    [TemplatePart(Name = AutoCompleteBox.ElementTextBox, Type = typeof(TextBox))]\r\n    [TemplatePart(Name = AutoCompleteBox.ElementPopup, Type = typeof(Popup))]\r\n    [StyleTypedProperty(Property = AutoCompleteBox.ElementTextBoxStyle, StyleTargetType = typeof(TextBox))]\r\n    [StyleTypedProperty(Property = AutoCompleteBox.ElementItemContainerStyle, StyleTargetType = typeof(ListBox))]\r\n    [TemplateVisualState(Name = VisualStates.StateNormal, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StateMouseOver, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StatePressed, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StateDisabled, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StateFocused, GroupName = VisualStates.GroupFocus)]\r\n    [TemplateVisualState(Name = VisualStates.StateUnfocused, GroupName = VisualStates.GroupFocus)]\r\n    [TemplateVisualState(Name = VisualStates.StatePopupClosed, GroupName = VisualStates.GroupPopup)]\r\n    [TemplateVisualState(Name = VisualStates.StatePopupOpened, GroupName = VisualStates.GroupPopup)]\r\n    [TemplateVisualState(Name = VisualStates.StateValid, GroupName = VisualStates.GroupValidation)]\r\n    [TemplateVisualState(Name = VisualStates.StateInvalidFocused, GroupName = VisualStates.GroupValidation)]\r\n    [TemplateVisualState(Name = VisualStates.StateInvalidUnfocused, GroupName = VisualStates.GroupValidation)]\r\n    [SuppressMessage(\"Microsoft.Maintainability\", \"CA1506:AvoidExcessiveClassCoupling\", Justification = \"Large implementation keeps the components contained.\")]\r\n    [ContentProperty(\"ItemsSource\")]\r\n    public partial class AutoCompleteBox : Control, IUpdateVisualState\r\n    {\r\n        #region Template part and style names\r\n\r\n        /// <summary>\r\n        /// Specifies the name of the selection adapter TemplatePart.\r\n        /// </summary>\r\n        private const string ElementSelectionAdapter = \"SelectionAdapter\";\r\n\r\n        /// <summary>\r\n        /// Specifies the name of the Selector TemplatePart.\r\n        /// </summary>\r\n        private const string ElementSelector = \"Selector\";\r\n\r\n        /// <summary>\r\n        /// Specifies the name of the Popup TemplatePart.\r\n        /// </summary>\r\n        private const string ElementPopup = \"Popup\";\r\n        \r\n        /// <summary>\r\n        /// The name for the text box part.\r\n        /// </summary>\r\n        private const string ElementTextBox = \"Text\";\r\n\r\n        /// <summary>\r\n        /// The name for the text box style.\r\n        /// </summary>\r\n        private const string ElementTextBoxStyle = \"TextBoxStyle\";\r\n\r\n        /// <summary>\r\n        /// The name for the adapter's item container style.\r\n        /// </summary>\r\n        private const string ElementItemContainerStyle = \"ItemContainerStyle\";\r\n\r\n        #endregion\r\n\r\n        /// <summary>\r\n        /// Gets or sets a local cached copy of the items data.\r\n        /// </summary>\r\n        private List<object> _items;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the observable collection that contains references to \r\n        /// all of the items in the generated view of data that is provided to \r\n        /// the selection-style control adapter.\r\n        /// </summary>\r\n        private ObservableCollection<object> _view;\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value to ignore a number of pending change handlers. \r\n        /// The value is decremented after each use. This is used to reset the \r\n        /// value of properties without performing any of the actions in their \r\n        /// change handlers.\r\n        /// </summary>\r\n        /// <remarks>The int is important as a value because the TextBox \r\n        /// TextChanged event does not immediately fire, and this will allow for\r\n        /// nested property changes to be ignored.</remarks>\r\n        private int _ignoreTextPropertyChange;\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether to ignore calling a pending \r\n        /// change handlers. \r\n        /// </summary>\r\n        private bool _ignorePropertyChange;\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether to ignore the selection \r\n        /// changed event.\r\n        /// </summary>\r\n        private bool _ignoreTextSelectionChange;\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether to skip the text update \r\n        /// processing when the selected item is updated.\r\n        /// </summary>\r\n        private bool _skipSelectedItemTextUpdate;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the last observed text box selection start location.\r\n        /// </summary>\r\n        private int _textSelectionStart;\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether the user initiated the \r\n        /// current populate call.\r\n        /// </summary>\r\n        private bool _userCalledPopulate;\r\n\r\n        /// <summary>\r\n        /// A value indicating whether the popup has been opened at least once.\r\n        /// </summary>\r\n        private bool _popupHasOpened;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the DispatcherTimer used for the MinimumPopulateDelay \r\n        /// condition for auto completion.\r\n        /// </summary>\r\n        private DispatcherTimer _delayTimer;\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether a read-only dependency \r\n        /// property change handler should allow the value to be set.  This is \r\n        /// used to ensure that read-only properties cannot be changed via \r\n        /// SetValue, etc.\r\n        /// </summary>\r\n        private bool _allowWrite;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the helper that provides all of the standard\r\n        /// interaction functionality. Making it internal for subclass access.\r\n        /// </summary>\r\n        internal InteractionHelper Interaction { get; set; }\r\n\r\n        /// <summary>\r\n        /// A weak event listener for the collection changed event.\r\n        /// </summary>\r\n        private WeakEventListener<AutoCompleteBox, object, NotifyCollectionChangedEventArgs> _collectionChangedWeakEventListener;\r\n\r\n        #region public int MinimumPrefixLength\r\n        /// <summary>\r\n        /// Gets or sets the minimum number of characters required to be entered\r\n        /// in the text box before the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> displays\r\n        /// possible matches.\r\n        /// matches.\r\n        /// </summary>\r\n        /// <value>\r\n        /// The minimum number of characters to be entered in the text box\r\n        /// before the <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" />\r\n        /// displays possible matches. The default is 1.\r\n        /// </value>\r\n        /// <remarks>\r\n        /// If you set MinimumPrefixLength to -1, the AutoCompleteBox will\r\n        /// not provide possible matches. There is no maximum value, but\r\n        /// setting MinimumPrefixLength to value that is too large will\r\n        /// prevent the AutoCompleteBox from providing possible matches as well.\r\n        /// </remarks>\r\n        public int MinimumPrefixLength\r\n        {\r\n            get { return (int)GetValue(MinimumPrefixLengthProperty); }\r\n            set { SetValue(MinimumPrefixLengthProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.MinimumPrefixLength\" />\r\n        /// dependency property.\r\n        /// </summary>\r\n        /// <value>The identifier for the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.MinimumPrefixLength\" />\r\n        /// dependency property.</value>\r\n        public static readonly DependencyProperty MinimumPrefixLengthProperty =\r\n            DependencyProperty.Register(\r\n                \"MinimumPrefixLength\",\r\n                typeof(int),\r\n                typeof(AutoCompleteBox),\r\n                new PropertyMetadata(1, OnMinimumPrefixLengthPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// MinimumPrefixLengthProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">AutoCompleteBox that changed its MinimumPrefixLength.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA2208:InstantiateArgumentExceptionsCorrectly\", Justification = \"MinimumPrefixLength is the name of the actual dependency property.\")]\r\n        private static void OnMinimumPrefixLengthPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            int newValue = (int)e.NewValue;\r\n\r\n            if (newValue < 0 && newValue != -1)\r\n            {\r\n                throw new ArgumentOutOfRangeException(\"MinimumPrefixLength\");\r\n            }\r\n        }\r\n        #endregion public int MinimumPrefixLength\r\n\r\n        #region public int MinimumPopulateDelay\r\n        /// <summary>\r\n        /// Gets or sets the minimum delay, in milliseconds, after text is typed\r\n        /// in the text box before the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> control\r\n        /// populates the list of possible matches in the drop-down.\r\n        /// </summary>\r\n        /// <value>The minimum delay, in milliseconds, after text is typed in\r\n        /// the text box, but before the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> populates\r\n        /// the list of possible matches in the drop-down. The default is 0.</value>\r\n        /// <exception cref=\"T:System.ArgumentException\">The set value is less than 0.</exception>\r\n        public int MinimumPopulateDelay\r\n        {\r\n            get { return (int)GetValue(MinimumPopulateDelayProperty); }\r\n            set { SetValue(MinimumPopulateDelayProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.MinimumPopulateDelay\" />\r\n        /// dependency property.\r\n        /// </summary>\r\n        /// <value>The identifier for the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.MinimumPopulateDelay\" />\r\n        /// dependency property.</value>\r\n        public static readonly DependencyProperty MinimumPopulateDelayProperty =\r\n            DependencyProperty.Register(\r\n                \"MinimumPopulateDelay\",\r\n                typeof(int),\r\n                typeof(AutoCompleteBox),\r\n                new PropertyMetadata(OnMinimumPopulateDelayPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// MinimumPopulateDelayProperty property changed handler. Any current \r\n        /// dispatcher timer will be stopped. The timer will not be restarted \r\n        /// until the next TextUpdate call by the user.\r\n        /// </summary>\r\n        /// <param name=\"d\">AutoCompleteTextBox that changed its \r\n        /// MinimumPopulateDelay.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA2208:InstantiateArgumentExceptionsCorrectly\", Justification = \"The exception is most likely to be called through the CLR property setter.\")]\r\n        private static void OnMinimumPopulateDelayPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            AutoCompleteBox source = d as AutoCompleteBox;\r\n\r\n            if (source._ignorePropertyChange)\r\n            {\r\n                source._ignorePropertyChange = false;\r\n                return;\r\n            }\r\n\r\n            int newValue = (int)e.NewValue;\r\n            if (newValue < 0)\r\n            {\r\n                source._ignorePropertyChange = true;\r\n                d.SetValue(e.Property, e.OldValue);\r\n\r\n                throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, Properties.Resources.AutoComplete_OnMinimumPopulateDelayPropertyChanged_InvalidValue, newValue), \"value\");\r\n            }\r\n\r\n            // Stop any existing timer\r\n            if (source._delayTimer != null)\r\n            {\r\n                source._delayTimer.Stop();\r\n                \r\n                if (newValue == 0)\r\n                {\r\n                    source._delayTimer = null;\r\n                }\r\n            }\r\n\r\n            // Create or clear a dispatcher timer instance\r\n            if (newValue > 0 && source._delayTimer == null)\r\n            {\r\n                source._delayTimer = new DispatcherTimer();\r\n                source._delayTimer.Tick += source.PopulateDropDown;\r\n            }\r\n\r\n            // Set the new tick interval\r\n            if (newValue > 0 && source._delayTimer != null)\r\n            {\r\n                source._delayTimer.Interval = TimeSpan.FromMilliseconds(newValue);\r\n            }\r\n        }\r\n        #endregion public int MinimumPopulateDelay\r\n        \r\n        #region public bool IsTextCompletionEnabled\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether the first possible match\r\n        /// found during the filtering process will be displayed automatically\r\n        /// in the text box.\r\n        /// </summary>\r\n        /// <value>\r\n        /// True if the first possible match found will be displayed\r\n        /// automatically in the text box; otherwise, false. The default is\r\n        /// false.\r\n        /// </value>\r\n        public bool IsTextCompletionEnabled\r\n        {\r\n            get { return (bool)GetValue(IsTextCompletionEnabledProperty); }\r\n            set { SetValue(IsTextCompletionEnabledProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.IsTextCompletionEnabled\" />\r\n        /// dependency property.\r\n        /// </summary>\r\n        /// <value>The identifier for the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.IsTextCompletionEnabled\" />\r\n        /// dependency property.</value>\r\n        public static readonly DependencyProperty IsTextCompletionEnabledProperty =\r\n            DependencyProperty.Register(\r\n                \"IsTextCompletionEnabled\",\r\n                typeof(bool),\r\n                typeof(AutoCompleteBox),\r\n                new PropertyMetadata(false, null));\r\n\r\n        #endregion public bool IsTextCompletionEnabled\r\n\r\n        #region public DataTemplate ItemTemplate\r\n        /// <summary>\r\n        /// Gets or sets the <see cref=\"T:System.Windows.DataTemplate\" /> used\r\n        /// to display each item in the drop-down portion of the control.\r\n        /// </summary>\r\n        /// <value>The <see cref=\"T:System.Windows.DataTemplate\" /> used to\r\n        /// display each item in the drop-down. The default is null.</value>\r\n        /// <remarks>\r\n        /// You use the ItemTemplate property to specify the visualization \r\n        /// of the data objects in the drop-down portion of the AutoCompleteBox \r\n        /// control. If your AutoCompleteBox is bound to a collection and you \r\n        /// do not provide specific display instructions by using a \r\n        /// DataTemplate, the resulting UI of each item is a string \r\n        /// representation of each object in the underlying collection. \r\n        /// </remarks>\r\n        public DataTemplate ItemTemplate\r\n        {\r\n            get { return GetValue(ItemTemplateProperty) as DataTemplate; }\r\n            set { SetValue(ItemTemplateProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.ItemTemplate\" />\r\n        /// dependency property.\r\n        /// </summary>\r\n        /// <value>The identifier for the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.ItemTemplate\" />\r\n        /// dependency property.</value>\r\n        public static readonly DependencyProperty ItemTemplateProperty =\r\n            DependencyProperty.Register(\r\n                \"ItemTemplate\",\r\n                typeof(DataTemplate),\r\n                typeof(AutoCompleteBox),\r\n                new PropertyMetadata(null));\r\n\r\n        #endregion public DataTemplate ItemTemplate\r\n\r\n        #region public Style ItemContainerStyle\r\n        /// <summary>\r\n        /// Gets or sets the <see cref=\"T:System.Windows.Style\" /> that is\r\n        /// applied to the selection adapter contained in the drop-down portion\r\n        /// of the <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" />\r\n        /// control.\r\n        /// </summary>\r\n        /// <value>The <see cref=\"T:System.Windows.Style\" /> applied to the\r\n        /// selection adapter contained in the drop-down portion of the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> control.\r\n        /// The default is null.</value>\r\n        /// <remarks>\r\n        /// The default selection adapter contained in the drop-down is a \r\n        /// ListBox control. \r\n        /// </remarks>\r\n        public Style ItemContainerStyle\r\n        {\r\n            get { return GetValue(ItemContainerStyleProperty) as Style; }\r\n            set { SetValue(ItemContainerStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.ItemContainerStyle\" />\r\n        /// dependency property.\r\n        /// </summary>\r\n        /// <value>The identifier for the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.ItemContainerStyle\" />\r\n        /// dependency property.</value>\r\n        public static readonly DependencyProperty ItemContainerStyleProperty =\r\n            DependencyProperty.Register(\r\n                ElementItemContainerStyle,\r\n                typeof(Style),\r\n                typeof(AutoCompleteBox),\r\n                new PropertyMetadata(null, null));\r\n\r\n        #endregion public Style ItemContainerStyle\r\n\r\n        #region public Style TextBoxStyle\r\n        /// <summary>\r\n        /// Gets or sets the <see cref=\"T:System.Windows.Style\" /> applied to\r\n        /// the text box portion of the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> control.\r\n        /// </summary>\r\n        /// <value>The <see cref=\"T:System.Windows.Style\" /> applied to the text\r\n        /// box portion of the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> control.\r\n        /// The default is null.</value>\r\n        public Style TextBoxStyle\r\n        {\r\n            get { return GetValue(TextBoxStyleProperty) as Style; }\r\n            set { SetValue(TextBoxStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.TextBoxStyle\" />\r\n        /// dependency property.\r\n        /// </summary>\r\n        /// <value>The identifier for the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.TextBoxStyle\" />\r\n        /// dependency property.</value>\r\n        public static readonly DependencyProperty TextBoxStyleProperty =\r\n            DependencyProperty.Register(\r\n                ElementTextBoxStyle,\r\n                typeof(Style),\r\n                typeof(AutoCompleteBox),\r\n                new PropertyMetadata(null));\r\n\r\n        #endregion public Style TextBoxStyle\r\n\r\n        #region public double MaxDropDownHeight\r\n        /// <summary>\r\n        /// Gets or sets the maximum height of the drop-down portion of the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> control.\r\n        /// </summary>\r\n        /// <value>The maximum height of the drop-down portion of the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> control.\r\n        /// The default is <see cref=\"F:System.Double.PositiveInfinity\" />.</value>\r\n        /// <exception cref=\"T:System.ArgumentException\">The specified value is less than 0.</exception>\r\n        public double MaxDropDownHeight\r\n        {\r\n            get { return (double)GetValue(MaxDropDownHeightProperty); }\r\n            set { SetValue(MaxDropDownHeightProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.MaxDropDownHeight\" />\r\n        /// dependency property.\r\n        /// </summary>\r\n        /// <value>The identifier for the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.MaxDropDownHeight\" />\r\n        /// dependency property.</value>\r\n        public static readonly DependencyProperty MaxDropDownHeightProperty =\r\n            DependencyProperty.Register(\r\n                \"MaxDropDownHeight\",\r\n                typeof(double),\r\n                typeof(AutoCompleteBox),\r\n                new PropertyMetadata(double.PositiveInfinity, OnMaxDropDownHeightPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// MaxDropDownHeightProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">AutoCompleteTextBox that changed its MaxDropDownHeight.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA2208:InstantiateArgumentExceptionsCorrectly\", Justification = \"The exception will be called through a CLR setter in most cases.\")]\r\n        private static void OnMaxDropDownHeightPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            AutoCompleteBox source = d as AutoCompleteBox;\r\n            if (source._ignorePropertyChange)\r\n            {\r\n                source._ignorePropertyChange = false;\r\n                return;\r\n            }\r\n\r\n            double newValue = (double)e.NewValue;\r\n            \r\n            // Revert to the old value if invalid (negative)\r\n            if (newValue < 0)\r\n            {\r\n                source._ignorePropertyChange = true;\r\n                source.SetValue(e.Property, e.OldValue);\r\n\r\n                throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, Properties.Resources.AutoComplete_OnMaxDropDownHeightPropertyChanged_InvalidValue, e.NewValue), \"value\");\r\n            }\r\n\r\n            source.OnMaxDropDownHeightChanged(newValue);\r\n        }\r\n        #endregion public double MaxDropDownHeight\r\n\r\n        #region public bool IsDropDownOpen\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether the drop-down portion of\r\n        /// the control is open.\r\n        /// </summary>\r\n        /// <value>\r\n        /// True if the drop-down is open; otherwise, false. The default is\r\n        /// false.\r\n        /// </value>\r\n        public bool IsDropDownOpen\r\n        {\r\n            get { return (bool)GetValue(IsDropDownOpenProperty); }\r\n            set { SetValue(IsDropDownOpenProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.IsDropDownOpen\" />\r\n        /// dependency property.\r\n        /// </summary>\r\n        /// <value>The identifier for the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.IsDropDownOpen\" />\r\n        /// dependency property.</value>\r\n        public static readonly DependencyProperty IsDropDownOpenProperty =\r\n            DependencyProperty.Register(\r\n                \"IsDropDownOpen\",\r\n                typeof(bool),\r\n                typeof(AutoCompleteBox),\r\n                new PropertyMetadata(false, OnIsDropDownOpenPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// IsDropDownOpenProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">AutoCompleteTextBox that changed its IsDropDownOpen.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnIsDropDownOpenPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            AutoCompleteBox source = d as AutoCompleteBox;\r\n\r\n            // Ignore the change if requested\r\n            if (source._ignorePropertyChange)\r\n            {\r\n                source._ignorePropertyChange = false;\r\n                return;\r\n            }\r\n\r\n            bool oldValue = (bool)e.OldValue;\r\n            bool newValue = (bool)e.NewValue;\r\n\r\n            if (newValue)\r\n            {\r\n                source.TextUpdated(source.Text, true);\r\n            }\r\n            else\r\n            {\r\n                source.ClosingDropDown(oldValue);\r\n            }\r\n\r\n            source.UpdateVisualState(true);\r\n        }\r\n        #endregion public bool IsDropDownOpen\r\n\r\n        #region public IEnumerable ItemsSource\r\n        /// <summary>\r\n        /// Gets or sets a collection that is used to generate the items for the\r\n        /// drop-down portion of the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> control.\r\n        /// </summary>\r\n        /// <value>The collection that is used to generate the items of the\r\n        /// drop-down portion of the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> control.</value>\r\n        public IEnumerable ItemsSource\r\n        {\r\n            get { return GetValue(ItemsSourceProperty) as IEnumerable; }\r\n            set { SetValue(ItemsSourceProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.ItemsSource\" />\r\n        /// dependency property.\r\n        /// </summary>\r\n        /// <value>The identifier for the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.ItemsSource\" />\r\n        /// dependency property.</value>\r\n        public static readonly DependencyProperty ItemsSourceProperty =\r\n            DependencyProperty.Register(\r\n                \"ItemsSource\",\r\n                typeof(IEnumerable),\r\n                typeof(AutoCompleteBox),\r\n                new PropertyMetadata(OnItemsSourcePropertyChanged));\r\n\r\n        /// <summary>\r\n        /// ItemsSourceProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">AutoCompleteBox that changed its ItemsSource.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnItemsSourcePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            AutoCompleteBox autoComplete = d as AutoCompleteBox;\r\n            autoComplete.OnItemsSourceChanged((IEnumerable)e.OldValue, (IEnumerable)e.NewValue);\r\n        }\r\n\r\n        #endregion public IEnumerable ItemsSource\r\n\r\n        #region public object SelectedItem\r\n        /// <summary>\r\n        /// Gets or sets the selected item in the drop-down.\r\n        /// </summary>\r\n        /// <value>The selected item in the drop-down.</value>\r\n        /// <remarks>\r\n        /// If the IsTextCompletionEnabled property is true and text typed by \r\n        /// the user matches an item in the ItemsSource collection, which is \r\n        /// then displayed in the text box, the SelectedItem property will be \r\n        /// a null reference.\r\n        /// </remarks>\r\n        public object SelectedItem\r\n        {\r\n            get { return GetValue(SelectedItemProperty) as object; }\r\n            set { SetValue(SelectedItemProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.SelectedItem\" />\r\n        /// dependency property.\r\n        /// </summary>\r\n        /// <value>The identifier the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.SelectedItem\" />\r\n        /// dependency property.</value>\r\n        public static readonly DependencyProperty SelectedItemProperty =\r\n            DependencyProperty.Register(\r\n                \"SelectedItem\",\r\n                typeof(object),\r\n                typeof(AutoCompleteBox),\r\n                new PropertyMetadata(OnSelectedItemPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// SelectedItemProperty property changed handler. Fires the \r\n        /// SelectionChanged event. The event data will contain any non-null\r\n        /// removed items and non-null additions.\r\n        /// </summary>\r\n        /// <param name=\"d\">AutoCompleteBox that changed its SelectedItem.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnSelectedItemPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            AutoCompleteBox source = d as AutoCompleteBox;\r\n\r\n            if (source._ignorePropertyChange)\r\n            {\r\n                source._ignorePropertyChange = false;\r\n                return;\r\n            }\r\n\r\n            // Update the text display\r\n            if (source._skipSelectedItemTextUpdate)\r\n            {\r\n                source._skipSelectedItemTextUpdate = false;\r\n            }\r\n            else\r\n            {\r\n                source.OnSelectedItemChanged(e.NewValue);\r\n            }\r\n\r\n            // Fire the SelectionChanged event\r\n            List<object> removed = new List<object>();\r\n            if (e.OldValue != null)\r\n            {\r\n                removed.Add(e.OldValue);\r\n            }\r\n            \r\n            List<object> added = new List<object>();\r\n            if (e.NewValue != null)\r\n            {\r\n                added.Add(e.NewValue);\r\n            }\r\n\r\n            source.OnSelectionChanged(new SelectionChangedEventArgs(\r\n                SelectionChangedEvent,\r\n                removed,\r\n                added));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the selected item is changed, updates the text value\r\n        /// that is displayed in the text box part.\r\n        /// </summary>\r\n        /// <param name=\"newItem\">The new item.</param>\r\n        private void OnSelectedItemChanged(object newItem)\r\n        {\r\n            string text;\r\n\r\n            if (newItem == null)\r\n            {\r\n                text = SearchText;\r\n            }\r\n            else\r\n            {\r\n                text = FormatValue(newItem, true);\r\n            }\r\n\r\n            // Update the Text property and the TextBox values\r\n            UpdateTextValue(text);\r\n\r\n            // Move the caret to the end of the text box\r\n            if (TextBox != null && Text != null)\r\n            {\r\n                TextBox.SelectionStart = Text.Length;\r\n            }\r\n        }\r\n\r\n        #endregion public object SelectedItem\r\n\r\n        #region public string Text\r\n        /// <summary>\r\n        /// Gets or sets the text in the text box portion of the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> control.\r\n        /// </summary>\r\n        /// <value>The text in the text box portion of the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> control.</value>\r\n        public string Text\r\n        {\r\n            get { return GetValue(TextProperty) as string; }\r\n            set { SetValue(TextProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.Text\" />\r\n        /// dependency property.\r\n        /// </summary>\r\n        /// <value>The identifier for the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.Text\" />\r\n        /// dependency property.</value>\r\n        public static readonly DependencyProperty TextProperty =\r\n            DependencyProperty.Register(\r\n                \"Text\",\r\n                typeof(string),\r\n                typeof(AutoCompleteBox),\r\n                new PropertyMetadata(string.Empty, OnTextPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// TextProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">AutoCompleteBox that changed its Text.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnTextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            AutoCompleteBox source = d as AutoCompleteBox;\r\n            source.TextUpdated((string)e.NewValue, false);\r\n        }\r\n\r\n        #endregion public string Text\r\n\r\n        #region public string SearchText\r\n        /// <summary>\r\n        /// Gets the text that is used to filter items in the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.ItemsSource\" />\r\n        /// item collection.\r\n        /// </summary>\r\n        /// <value>The text that is used to filter items in the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.ItemsSource\" />\r\n        /// item collection.</value>\r\n        /// <remarks>\r\n        /// The SearchText value is typically the same as the \r\n        /// Text property, but is set after the TextChanged event occurs \r\n        /// and before the Populating event.\r\n        /// </remarks>\r\n        public string SearchText\r\n        {\r\n            get { return (string)GetValue(SearchTextProperty); }\r\n\r\n            private set\r\n            {\r\n                try\r\n                {\r\n                    _allowWrite = true;\r\n                    SetValue(SearchTextProperty, value);\r\n                }\r\n                finally\r\n                {\r\n                    _allowWrite = false;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.SearchText\" />\r\n        /// dependency property.\r\n        /// </summary>\r\n        /// <value>The identifier for the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.SearchText\" />\r\n        /// dependency property.</value>\r\n        public static readonly DependencyProperty SearchTextProperty =\r\n            DependencyProperty.Register(\r\n                \"SearchText\",\r\n                typeof(string),\r\n                typeof(AutoCompleteBox),\r\n                new PropertyMetadata(string.Empty, OnSearchTextPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// OnSearchTextProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">AutoCompleteBox that changed its SearchText.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnSearchTextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            AutoCompleteBox source = d as AutoCompleteBox;\r\n            if (source._ignorePropertyChange)\r\n            {\r\n                source._ignorePropertyChange = false;\r\n                return;\r\n            }\r\n\r\n            // Ensure the property is only written when expected\r\n            if (!source._allowWrite)\r\n            {\r\n                // Reset the old value before it was incorrectly written\r\n                source._ignorePropertyChange = true;\r\n                source.SetValue(e.Property, e.OldValue);\r\n\r\n                throw new InvalidOperationException(Properties.Resources.AutoComplete_OnSearchTextPropertyChanged_InvalidWrite);\r\n            }\r\n        }\r\n        #endregion public string SearchText\r\n\r\n        #region public AutoCompleteFilterMode FilterMode\r\n        /// <summary>\r\n        /// Gets or sets how the text in the text box is used to filter items\r\n        /// specified by the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.ItemsSource\" />\r\n        /// property for display in the drop-down.\r\n        /// </summary>\r\n        /// <value>One of the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteFilterMode\" />\r\n        /// values The default is\r\n        /// <see cref=\"F:System.Windows.Controls.AutoCompleteFilterMode.StartsWith\" />.</value>\r\n        /// <exception cref=\"T:System.ArgumentException\">The specified value is\r\n        /// not a valid\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteFilterMode\" />.</exception>\r\n        /// <remarks>\r\n        /// Use the FilterMode property to specify how possible matches are \r\n        /// filtered. For example, possible matches can be filtered in a \r\n        /// predefined or custom way. The search mode is automatically set to \r\n        /// Custom if you set the ItemFilter property. \r\n        /// </remarks>\r\n        public AutoCompleteFilterMode FilterMode\r\n        {\r\n            get { return (AutoCompleteFilterMode)GetValue(FilterModeProperty); }\r\n            set { SetValue(FilterModeProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the identifier for the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.FilterMode\" />\r\n        /// dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty FilterModeProperty =\r\n            DependencyProperty.Register(\r\n                \"FilterMode\",\r\n                typeof(AutoCompleteFilterMode),\r\n                typeof(AutoCompleteBox),\r\n                new PropertyMetadata(AutoCompleteFilterMode.StartsWith, OnFilterModePropertyChanged));\r\n\r\n        /// <summary>\r\n        /// FilterModeProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">AutoCompleteBox that changed its FilterMode.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA2208:InstantiateArgumentExceptionsCorrectly\", Justification = \"The exception will be thrown when the CLR setter is used in most situations.\")]\r\n        private static void OnFilterModePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            AutoCompleteBox source = d as AutoCompleteBox;\r\n            AutoCompleteFilterMode mode = (AutoCompleteFilterMode)e.NewValue;\r\n\r\n            if (mode != AutoCompleteFilterMode.Contains &&\r\n                mode != AutoCompleteFilterMode.ContainsCaseSensitive &&\r\n                mode != AutoCompleteFilterMode.ContainsOrdinal &&\r\n                mode != AutoCompleteFilterMode.ContainsOrdinalCaseSensitive &&\r\n                mode != AutoCompleteFilterMode.Custom && \r\n                mode != AutoCompleteFilterMode.Equals &&\r\n                mode != AutoCompleteFilterMode.EqualsCaseSensitive &&\r\n                mode != AutoCompleteFilterMode.EqualsOrdinal &&\r\n                mode != AutoCompleteFilterMode.EqualsOrdinalCaseSensitive &&\r\n                mode != AutoCompleteFilterMode.None &&\r\n                mode != AutoCompleteFilterMode.StartsWith &&\r\n                mode != AutoCompleteFilterMode.StartsWithCaseSensitive &&\r\n                mode != AutoCompleteFilterMode.StartsWithOrdinal &&\r\n                mode != AutoCompleteFilterMode.StartsWithOrdinalCaseSensitive)\r\n            {\r\n                source.SetValue(e.Property, e.OldValue);\r\n\r\n                throw new ArgumentException(Properties.Resources.AutoComplete_OnFilterModePropertyChanged_InvalidValue, \"value\");\r\n            }\r\n\r\n            // Sets the filter predicate for the new value\r\n            AutoCompleteFilterMode newValue = (AutoCompleteFilterMode)e.NewValue;\r\n            source.TextFilter = AutoCompleteSearch.GetFilter(newValue);\r\n        }\r\n        #endregion public AutoCompleteFilterMode FilterMode\r\n\r\n        #region public AutoCompleteFilterPredicate ItemFilter\r\n        /// <summary>\r\n        /// Gets or sets the custom method that uses user-entered text to filter\r\n        /// the items specified by the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.ItemsSource\" />\r\n        /// property for display in the drop-down.\r\n        /// </summary>\r\n        /// <value>The custom method that uses the user-entered text to filter\r\n        /// the items specified by the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.ItemsSource\" />\r\n        /// property. The default is null.</value>\r\n        /// <remarks>\r\n        /// The filter mode is automatically set to Custom if you set the \r\n        /// ItemFilter property. \r\n        /// </remarks>\r\n        public AutoCompleteFilterPredicate<object> ItemFilter\r\n        {\r\n            get { return GetValue(ItemFilterProperty) as AutoCompleteFilterPredicate<object>; }\r\n            set { SetValue(ItemFilterProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.ItemFilter\" />\r\n        /// dependency property.\r\n        /// </summary>\r\n        /// <value>The identifier for the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.ItemFilter\" />\r\n        /// dependency property.</value>\r\n        public static readonly DependencyProperty ItemFilterProperty =\r\n            DependencyProperty.Register(\r\n                \"ItemFilter\",\r\n                typeof(AutoCompleteFilterPredicate<object>),\r\n                typeof(AutoCompleteBox),\r\n                new PropertyMetadata(OnItemFilterPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// ItemFilterProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">AutoCompleteBox that changed its ItemFilter.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnItemFilterPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            AutoCompleteBox source = d as AutoCompleteBox;\r\n            AutoCompleteFilterPredicate<object> value = e.NewValue as AutoCompleteFilterPredicate<object>;\r\n            \r\n            // If null, revert to the \"None\" predicate\r\n            if (value == null)\r\n            {\r\n                source.FilterMode = AutoCompleteFilterMode.None;\r\n            }\r\n            else\r\n            {\r\n                source.FilterMode = AutoCompleteFilterMode.Custom;\r\n                source.TextFilter = null;\r\n            }\r\n        }\r\n        #endregion public AutoCompleteFilterPredicate ItemFilter\r\n\r\n        #region public AutoCompleteStringFilterPredicate TextFilter\r\n        /// <summary>\r\n        /// Gets or sets the custom method that uses the user-entered text to\r\n        /// filter items specified by the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.ItemsSource\" />\r\n        /// property in a text-based way for display in the drop-down.\r\n        /// </summary>\r\n        /// <value>The custom method that uses the user-entered text to filter\r\n        /// items specified by the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.ItemsSource\" />\r\n        /// property in a text-based way for display in the drop-down.</value>\r\n        /// <remarks>\r\n        /// The search mode is automatically set to Custom if you set the \r\n        /// TextFilter property. \r\n        /// </remarks>\r\n        public AutoCompleteFilterPredicate<string> TextFilter\r\n        {\r\n            get { return GetValue(TextFilterProperty) as AutoCompleteFilterPredicate<string>; }\r\n            set { SetValue(TextFilterProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.TextFilter\" />\r\n        /// dependency property.\r\n        /// </summary>\r\n        /// <value>The identifier for the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.TextFilter\" />\r\n        /// dependency property.</value>\r\n        public static readonly DependencyProperty TextFilterProperty =\r\n            DependencyProperty.Register(\r\n                \"TextFilter\",\r\n                typeof(AutoCompleteFilterPredicate<string>),\r\n                typeof(AutoCompleteBox),\r\n                new PropertyMetadata(AutoCompleteSearch.GetFilter(AutoCompleteFilterMode.StartsWith)));\r\n        #endregion public AutoCompleteStringFilterPredicate TextFilter\r\n\r\n        #region public object Placeholder\r\n        /// <summary>\r\n        /// Gets or sets the content of the placeholder which is overlaid over\r\n        /// the textbox when it is empty.\r\n        /// </summary>\r\n        /// <value>The content of the placeholder which is overlaid over the textbox\r\n        ///  when it is empty.</value>\r\n        public object Placeholder\r\n        {\r\n            get { return GetValue(PlaceholderProperty); }\r\n            set { SetValue(PlaceholderProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.Placeholder\"/>\r\n        /// dependency property.\r\n        /// </summary>\r\n        /// <value>The identifier for the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.Placeholder\"/>\r\n        /// dependency property.\r\n        /// </value>\r\n        public static readonly DependencyProperty PlaceholderProperty =\r\n            DependencyProperty.Register(\r\n                \"Placeholder\",\r\n                typeof(object),\r\n                typeof(AutoCompleteBox));\r\n        #endregion\r\n\r\n        #region public DataTemplate PlaceholderTemplate\r\n        /// <summary>\r\n        /// Gets or sets the <see cref=\"T:System.Windows.DataTemplate\" /> used\r\n        /// to display the placeholder of the control.\r\n        /// </summary>\r\n        /// <value>The <see cref=\"T:System.Windows.DataTemplate\" /> used to\r\n        /// display the placeholder of the control.</value>\r\n        /// <remarks>\r\n        /// You use the PlaceholderTemplate property to specify the visualization \r\n        /// of the data objects in the Placeholder of the AutoCompleteBox \r\n        /// control.\r\n        /// </remarks>\r\n        public DataTemplate PlaceholderTemplate\r\n        {\r\n            get { return (DataTemplate)GetValue(PlaceholderTemplateProperty); }\r\n            set { SetValue(PlaceholderTemplateProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.PlaceholderTemplate\"/>\r\n        /// dependency property.\r\n        /// </summary>\r\n        /// <value>The identifier for the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.PlaceholderTemplate\"/>\r\n        /// dependency property.\r\n        /// </value>\r\n        public static readonly DependencyProperty PlaceholderTemplateProperty =\r\n            DependencyProperty.Register(\r\n                \"PlaceholderTemplate\",\r\n                typeof(DataTemplate),\r\n                typeof(AutoCompleteBox));\r\n        #endregion\r\n\r\n        #region public DataTemplateSelector PlaceholderTemplateSelector\r\n        /// <summary>\r\n        /// Gets or sets the <see cref=\"T:System.Windows.Controls.DataTemplateSelector\" /> used\r\n        /// to display the placeholder of the control.\r\n        /// </summary>\r\n        /// <value>The <see cref=\"T:System.Windows.Controls.DataTemplateSelector\" /> used to\r\n        /// display the placeholder of the control.</value>\r\n        /// <remarks>\r\n        /// You use the PlaceholderTemplateSelector property to add custom logic to decide which\r\n        /// template to apply to the AutoCompleteBox' placeholder.\r\n        /// Please note that the PlaceholderTemplateSelector is only used if the PlaceholderTemplate\r\n        /// is set to null.\r\n        /// </remarks>\r\n        public DataTemplateSelector PlaceholderTemplateSelector\r\n        {\r\n            get { return (DataTemplateSelector)GetValue(PlaceholderTemplateSelectorProperty); }\r\n            set { SetValue(PlaceholderTemplateSelectorProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.PlaceholderTemplateSelectorProperty\"/>\r\n        /// dependency property.\r\n        /// </summary>\r\n        /// <value>The identifier for the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.PlaceholderTemplateSelectorProperty\"/>\r\n        /// dependency property.\r\n        /// </value>\r\n        public static readonly DependencyProperty PlaceholderTemplateSelectorProperty =\r\n            DependencyProperty.Register(\r\n                \"PlaceholderTemplateSelector\",\r\n                typeof(DataTemplateSelector),\r\n                typeof(AutoCompleteBox));\r\n        #endregion\r\n        \r\n        #region Template parts\r\n\r\n        /// <summary>\r\n        /// Gets or sets the drop down popup control.\r\n        /// </summary>\r\n        private PopupHelper DropDownPopup { get; set; }\r\n\r\n        /// <summary>\r\n        /// The TextBox template part.\r\n        /// </summary>\r\n        private TextBox _text;\r\n\r\n        /// <summary>\r\n        /// The SelectionAdapter.\r\n        /// </summary>\r\n        private ISelectionAdapter _adapter;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Text template part.\r\n        /// </summary>\r\n        internal TextBox TextBox\r\n        {\r\n            get { return _text; }\r\n            set\r\n            {\r\n                // Detach existing handlers\r\n                if (_text != null)\r\n                {\r\n                    _text.SelectionChanged -= OnTextBoxSelectionChanged;\r\n                    _text.TextChanged -= OnTextBoxTextChanged;\r\n                }\r\n\r\n                _text = value;\r\n\r\n                // Attach handlers\r\n                if (_text != null)\r\n                {\r\n                    _text.SelectionChanged += OnTextBoxSelectionChanged;\r\n                    _text.TextChanged += OnTextBoxTextChanged;\r\n\r\n                    if (Text != null)\r\n                    {\r\n                        UpdateTextValue(Text);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the selection adapter used to populate the drop-down\r\n        /// with a list of selectable items.\r\n        /// </summary>\r\n        /// <value>The selection adapter used to populate the drop-down with a\r\n        /// list of selectable items.</value>\r\n        /// <remarks>\r\n        /// You can use this property when you create an automation peer to \r\n        /// use with AutoCompleteBox or deriving from AutoCompleteBox to \r\n        /// create a custom control.\r\n        /// </remarks>\r\n        protected internal ISelectionAdapter SelectionAdapter \r\n        { \r\n            get { return _adapter; }\r\n            set\r\n            {\r\n                if (_adapter != null)\r\n                {\r\n                    _adapter.SelectionChanged -= OnAdapterSelectionChanged;\r\n                    _adapter.Commit -= OnAdapterSelectionComplete;\r\n                    _adapter.Cancel -= OnAdapterSelectionCanceled;\r\n                    _adapter.Cancel -= OnAdapterSelectionComplete;\r\n                    _adapter.ItemsSource = null;\r\n                }\r\n\r\n                _adapter = value;\r\n\r\n                if (_adapter != null)\r\n                {\r\n                    _adapter.SelectionChanged += OnAdapterSelectionChanged;\r\n                    _adapter.Commit += OnAdapterSelectionComplete;\r\n                    _adapter.Cancel += OnAdapterSelectionCanceled;\r\n                    _adapter.Cancel += OnAdapterSelectionComplete;\r\n                    _adapter.ItemsSource = _view;\r\n                }\r\n            }\r\n        }\r\n\r\n        #endregion\r\n\r\n        /// <summary>\r\n        /// Occurs when the text in the text box portion of the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> changes.\r\n        /// </summary>\r\n        public static readonly RoutedEvent TextChangedEvent = EventManager.RegisterRoutedEvent(\"TextChanged\", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AutoCompleteBox));\r\n\r\n        /// <summary>\r\n        /// Occurs when the text in the text box portion of the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> changes.\r\n        /// </summary>\r\n        public event RoutedEventHandler TextChanged\r\n        {\r\n            add { AddHandler(TextChangedEvent, value); }\r\n            remove { RemoveHandler(TextChangedEvent, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Occurs when the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> is\r\n        /// populating the drop-down with possible matches based on the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.Text\" />\r\n        /// property.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// If the event is canceled, by setting the PopulatingEventArgs.Cancel \r\n        /// property to true, the AutoCompleteBox will not automatically \r\n        /// populate the selection adapter contained in the drop-down. \r\n        /// In this case, if you want possible matches to appear, you must \r\n        /// provide the logic for populating the selection adapter.\r\n        /// </remarks>\r\n        public static readonly RoutedEvent PopulatingEvent = EventManager.RegisterRoutedEvent(\"Populating\", RoutingStrategy.Bubble, typeof(PopulatingEventHandler), typeof(AutoCompleteBox));\r\n\r\n        /// <summary>\r\n        /// Occurs when the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> is\r\n        /// populating the drop-down with possible matches based on the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.Text\" />\r\n        /// property.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// If the event is canceled, by setting the PopulatingEventArgs.Cancel \r\n        /// property to true, the AutoCompleteBox will not automatically \r\n        /// populate the selection adapter contained in the drop-down. \r\n        /// In this case, if you want possible matches to appear, you must \r\n        /// provide the logic for populating the selection adapter.\r\n        /// </remarks>\r\n        public event PopulatingEventHandler Populating\r\n        {\r\n            add { AddHandler(PopulatingEvent, value); }\r\n            remove { RemoveHandler(PopulatingEvent, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Occurs when the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> has\r\n        /// populated the drop-down with possible matches based on the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.Text\" />\r\n        /// property.\r\n        /// </summary>\r\n        public static readonly RoutedEvent PopulatedEvent = EventManager.RegisterRoutedEvent(\"Populated\", RoutingStrategy.Bubble, typeof(PopulatedEventHandler), typeof(AutoCompleteBox));\r\n\r\n        /// <summary>\r\n        /// Occurs when the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> has\r\n        /// populated the drop-down with possible matches based on the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.Text\" />\r\n        /// property.\r\n        /// </summary>\r\n        public event PopulatedEventHandler Populated\r\n        {\r\n            add { AddHandler(PopulatedEvent, value); }\r\n            remove { RemoveHandler(PopulatedEvent, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Occurs when the value of the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.IsDropDownOpen\" />\r\n        /// property is changing from false to true.\r\n        /// </summary>\r\n        public static readonly RoutedEvent DropDownOpeningEvent = EventManager.RegisterRoutedEvent(\"DropDownOpening\", RoutingStrategy.Bubble, typeof(RoutedPropertyChangingEventHandler<bool>), typeof(AutoCompleteBox));\r\n\r\n        /// <summary>\r\n        /// Occurs when the value of the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.IsDropDownOpen\" />\r\n        /// property is changing from false to true.\r\n        /// </summary>\r\n        public event RoutedPropertyChangingEventHandler<bool> DropDownOpening\r\n        {\r\n            add { AddHandler(DropDownOpeningEvent, value); }\r\n            remove { RemoveHandler(DropDownOpeningEvent, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Occurs when the value of the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.IsDropDownOpen\" />\r\n        /// property has changed from false to true and the drop-down is open.\r\n        /// </summary>\r\n        public static readonly RoutedEvent DropDownOpenedEvent = EventManager.RegisterRoutedEvent(\"DropDownOpened\", RoutingStrategy.Bubble, typeof(RoutedPropertyChangedEventHandler<bool>), typeof(AutoCompleteBox));\r\n\r\n        /// <summary>\r\n        /// Occurs when the value of the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.IsDropDownOpen\" />\r\n        /// property has changed from false to true and the drop-down is open.\r\n        /// </summary>\r\n        public event RoutedPropertyChangedEventHandler<bool> DropDownOpened\r\n        {\r\n            add { AddHandler(DropDownOpenedEvent, value); }\r\n            remove { RemoveHandler(DropDownOpenedEvent, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Occurs when the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.IsDropDownOpen\" />\r\n        /// property is changing from true to false.\r\n        /// </summary>\r\n        public static readonly RoutedEvent DropDownClosingEvent = EventManager.RegisterRoutedEvent(\"DropDownClosing\", RoutingStrategy.Bubble, typeof(RoutedPropertyChangingEventHandler<bool>), typeof(AutoCompleteBox));\r\n\r\n        /// <summary>\r\n        /// Occurs when the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.IsDropDownOpen\" />\r\n        /// property is changing from true to false.\r\n        /// </summary>\r\n        public event RoutedPropertyChangingEventHandler<bool> DropDownClosing\r\n        {\r\n            add { AddHandler(DropDownClosingEvent, value); }\r\n            remove { RemoveHandler(DropDownClosingEvent, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Occurs when the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.IsDropDownOpen\" />\r\n        /// property was changed from true to false and the drop-down is open.\r\n        /// </summary>\r\n        public static readonly RoutedEvent DropDownClosedEvent = EventManager.RegisterRoutedEvent(\"DropDownClosed\", RoutingStrategy.Bubble, typeof(RoutedPropertyChangedEventHandler<bool>), typeof(AutoCompleteBox));\r\n\r\n        /// <summary>\r\n        /// Occurs when the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.IsDropDownOpen\" />\r\n        /// property was changed from true to false and the drop-down is open.\r\n        /// </summary>\r\n        public event RoutedPropertyChangedEventHandler<bool> DropDownClosed\r\n        {\r\n            add { AddHandler(DropDownClosedEvent, value); }\r\n            remove { RemoveHandler(DropDownClosedEvent, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Occurs when the selected item in the drop-down portion of the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> has\r\n        /// changed.\r\n        /// </summary>\r\n        public static readonly RoutedEvent SelectionChangedEvent = EventManager.RegisterRoutedEvent(\"SelectionChanged\", RoutingStrategy.Bubble, typeof(SelectionChangedEventHandler), typeof(AutoCompleteBox));\r\n\r\n        /// <summary>\r\n        /// Occurs when the selected item in the drop-down portion of the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> has\r\n        /// changed.\r\n        /// </summary>\r\n        public event SelectionChangedEventHandler SelectionChanged\r\n        {\r\n            add { AddHandler(SelectionChangedEvent, value); }\r\n            remove { RemoveHandler(SelectionChangedEvent, value); }\r\n        }\r\n\r\n        private Binding _valueMemberBinding;\r\n        /// <summary>\r\n        /// Gets or sets the  <see cref=\"T:System.Windows.Data.Binding\" /> that\r\n        /// is used to get the values for display in the text portion of\r\n        /// the <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" />\r\n        /// control.\r\n        /// </summary>\r\n        /// <value>The <see cref=\"T:System.Windows.Data.Binding\" /> object used\r\n        /// when binding to a collection property.</value>\r\n        public Binding ValueMemberBinding\r\n        {\r\n            get\r\n            {\r\n                return _valueMemberBinding;\r\n            }\r\n            set\r\n            {\r\n                _valueMemberBinding = value;\r\n                if (_valueMemberBinding != null && _valueMemberBinding.Path != null)\r\n                {\r\n                    ValueMemberPath = _valueMemberBinding.Path.Path;\r\n                }\r\n                else\r\n                {\r\n                    ValueMemberPath = null;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the property path that is used to get values for\r\n        /// display in the text portion of the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> control.\r\n        /// </summary>\r\n        /// <value>The property path that is used to get values for display in\r\n        /// the text portion of the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> control.</value>\r\n        public string ValueMemberPath\r\n        {\r\n            get { return (string)GetValue(ValueMemberPathProperty); }\r\n            set { SetValue(ValueMemberPathProperty, value); }\r\n        }\r\n\r\n        public static readonly DependencyProperty ValueMemberPathProperty =\r\n            DependencyProperty.Register(\"ValueMemberPath\", typeof(string), typeof(AutoCompleteBox), new PropertyMetadata(null, ValueMemberPathChanged));\r\n\r\n        /// <summary>\r\n        /// Handle the change of the ValueMemberPath property.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private static void ValueMemberPathChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            AutoCompleteBox source = d as AutoCompleteBox;\r\n            source.OnSelectedItemChanged(source.SelectedItem);\r\n        }\r\n\r\n\r\n#if !SILVERLIGHT\r\n        /// <summary>\r\n        /// Initializes the static members of the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> class.\r\n        /// </summary>\r\n        static AutoCompleteBox()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(AutoCompleteBox), new FrameworkPropertyMetadata(typeof(AutoCompleteBox)));\r\n        }\r\n#endif\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> class.\r\n        /// </summary>\r\n        public AutoCompleteBox()\r\n        {\r\n#if SILVERLIGHT  \r\n            DefaultStyleKey = typeof(AutoCompleteBox);\r\n\r\n            Loaded += (sender, e) => ApplyTemplate();\r\n#endif\r\n            IsEnabledChanged += ControlIsEnabledChanged;\r\n\r\n            Interaction = new InteractionHelper(this);\r\n\r\n            // Creating the view here ensures that View is always != null\r\n            ClearView();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Arranges and sizes the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" />\r\n        /// control and its contents.\r\n        /// </summary>\r\n        /// <param name=\"finalSize\">The size allowed for the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> control.</param>\r\n        /// <returns>The <paramref name=\"finalSize\" />, unchanged.</returns>\r\n        protected override Size ArrangeOverride(Size finalSize)\r\n        {\r\n            Size r = base.ArrangeOverride(finalSize);\r\n            if (DropDownPopup != null)\r\n            {\r\n                DropDownPopup.Arrange();\r\n            }\r\n            return r;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Builds the visual tree for the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> control\r\n        /// when a new template is applied.\r\n        /// </summary>\r\n        public override void OnApplyTemplate()\r\n        {\r\n#if !SILVERLIGHT\r\n            if (TextBox != null)\r\n            {\r\n                TextBox.PreviewKeyDown -= OnTextBoxPreviewKeyDown;\r\n            }\r\n#endif\r\n            if (DropDownPopup != null)\r\n            {\r\n                DropDownPopup.Closed -= DropDownPopup_Closed;\r\n                DropDownPopup.FocusChanged -= OnDropDownFocusChanged;\r\n                DropDownPopup.UpdateVisualStates -= OnDropDownPopupUpdateVisualStates;\r\n                DropDownPopup.BeforeOnApplyTemplate();\r\n                DropDownPopup = null;\r\n            }\r\n\r\n            base.OnApplyTemplate();\r\n\r\n            // Set the template parts. Individual part setters remove and add \r\n            // any event handlers.\r\n            Popup popup = GetTemplateChild(ElementPopup) as Popup;\r\n            if (popup != null)\r\n            {\r\n                DropDownPopup = new PopupHelper(this, popup);\r\n                DropDownPopup.MaxDropDownHeight = MaxDropDownHeight;\r\n                DropDownPopup.AfterOnApplyTemplate();\r\n                DropDownPopup.Closed += DropDownPopup_Closed;\r\n                DropDownPopup.FocusChanged += OnDropDownFocusChanged;\r\n                DropDownPopup.UpdateVisualStates += OnDropDownPopupUpdateVisualStates;\r\n            }\r\n            SelectionAdapter = GetSelectionAdapterPart();\r\n            TextBox = GetTemplateChild(AutoCompleteBox.ElementTextBox) as TextBox;\r\n#if !SILVERLIGHT\r\n            if (TextBox != null)\r\n            {\r\n                TextBox.PreviewKeyDown += OnTextBoxPreviewKeyDown;\r\n            }\r\n#endif\r\n            Interaction.OnApplyTemplateBase();\r\n\r\n            // If the drop down property indicates that the popup is open,\r\n            // flip its value to invoke the changed handler.\r\n            if (IsDropDownOpen && DropDownPopup != null && !DropDownPopup.IsOpen)\r\n            {\r\n                OpeningDropDown(false);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Allows the popup wrapper to fire visual state change events.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void OnDropDownPopupUpdateVisualStates(object sender, EventArgs e)\r\n        {\r\n            UpdateVisualState(true);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Allows the popup wrapper to fire the FocusChanged event.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void OnDropDownFocusChanged(object sender, EventArgs e)\r\n        {\r\n            FocusChanged(HasFocus());\r\n        }\r\n\r\n        /// <summary>\r\n        /// Begin closing the drop-down.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">The original value.</param>\r\n        private void ClosingDropDown(bool oldValue)\r\n        {\r\n            bool delayedClosingVisual = false;\r\n            if (DropDownPopup != null)\r\n            {\r\n                delayedClosingVisual = DropDownPopup.UsesClosingVisualState;\r\n            }\r\n\r\n#if SILVERLIGHT\r\n            RoutedPropertyChangingEventArgs<bool> args = new RoutedPropertyChangingEventArgs<bool>(IsDropDownOpenProperty, oldValue, false, true);\r\n#else\r\n            RoutedPropertyChangingEventArgs<bool> args = new RoutedPropertyChangingEventArgs<bool>(IsDropDownOpenProperty, oldValue, false, true, DropDownClosingEvent);\r\n#endif\r\n\r\n            OnDropDownClosing(args);\r\n\r\n            if (_view == null || _view.Count == 0)\r\n            {\r\n                delayedClosingVisual = false;\r\n            }\r\n\r\n            if (args.Cancel)\r\n            {\r\n                _ignorePropertyChange = true;\r\n                SetValue(IsDropDownOpenProperty, oldValue);\r\n            }\r\n            else\r\n            {\r\n                // Immediately close the drop down window:\r\n                // When a popup closed visual state is present, the code path is \r\n                // slightly different and the actual call to CloseDropDown will \r\n                // be called only after the visual state's transition is done\r\n                RaiseExpandCollapseAutomationEvent(oldValue, false);\r\n                if (!delayedClosingVisual)\r\n                {\r\n                    CloseDropDown(oldValue, false);\r\n                }\r\n            }\r\n\r\n            UpdateVisualState(true);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Begin opening the drop down by firing cancelable events, opening the\r\n        /// drop-down or reverting, depending on the event argument values.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">The original value, if needed for a revert.</param>\r\n        private void OpeningDropDown(bool oldValue)\r\n        {\r\n#if SILVERLIGHT\r\n            RoutedPropertyChangingEventArgs<bool> args = new RoutedPropertyChangingEventArgs<bool>(IsDropDownOpenProperty, oldValue, true, true);\r\n#else\r\n            RoutedPropertyChangingEventArgs<bool> args = new RoutedPropertyChangingEventArgs<bool>(IsDropDownOpenProperty, oldValue, true, true, DropDownOpeningEvent);\r\n#endif\r\n            // Opening\r\n            OnDropDownOpening(args);\r\n\r\n            if (args.Cancel)\r\n            {\r\n                _ignorePropertyChange = true;\r\n                SetValue(IsDropDownOpenProperty, oldValue);\r\n            }\r\n            else\r\n            {\r\n                RaiseExpandCollapseAutomationEvent(oldValue, true);\r\n                OpenDropDown(oldValue, true);\r\n            }\r\n\r\n            UpdateVisualState(true);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Raise an expand/collapse event through the automation peer.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">The old value.</param>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        private void RaiseExpandCollapseAutomationEvent(bool oldValue, bool newValue)\r\n        {\r\n            AutoCompleteBoxAutomationPeer peer = FrameworkElementAutomationPeer.FromElement(this) as AutoCompleteBoxAutomationPeer;\r\n            if (peer != null)\r\n            {\r\n                peer.RaiseExpandCollapseAutomationEvent(oldValue, newValue);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the PreviewKeyDown event on the TextBox for WPF.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void OnTextBoxPreviewKeyDown(object sender, KeyEventArgs e)\r\n        {\r\n            OnKeyDown(e);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Connects to the DropDownPopup Closed event.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void DropDownPopup_Closed(object sender, EventArgs e)\r\n        {\r\n            // Force the drop down dependency property to be false.\r\n            if (IsDropDownOpen)\r\n            {\r\n                IsDropDownOpen = false;\r\n            }\r\n\r\n            // Fire the DropDownClosed event\r\n            if (_popupHasOpened)\r\n            {\r\n#if SILVERLIGHT\r\n                OnDropDownClosed(new RoutedPropertyChangedEventArgs<bool>(true, false));\r\n#else\r\n                OnDropDownClosed(new RoutedPropertyChangedEventArgs<bool>(true, false, DropDownClosedEvent));\r\n#endif\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates an\r\n        /// <see cref=\"T:System.Windows.Automation.Peers.AutoCompleteBoxAutomationPeer\" />\r\n        /// </summary>\r\n        /// <returns>A\r\n        /// <see cref=\"T:System.Windows.Automation.Peers.AutoCompleteBoxAutomationPeer\" />\r\n        /// for the <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" />\r\n        /// object.</returns>\r\n        protected override AutomationPeer OnCreateAutomationPeer()\r\n        {\r\n            return new AutoCompleteBoxAutomationPeer(this);\r\n        }\r\n\r\n        #region Focus\r\n\r\n        /// <summary>\r\n        /// Handles the FocusChanged event.\r\n        /// </summary>\r\n        /// <param name=\"hasFocus\">A value indicating whether the control \r\n        /// currently has the focus.</param>\r\n        private void FocusChanged(bool hasFocus)\r\n        {\r\n            // The OnGotFocus & OnLostFocus are asynchronously and cannot \r\n            // reliably tell you that have the focus.  All they do is let you \r\n            // know that the focus changed sometime in the past.  To determine \r\n            // if you currently have the focus you need to do consult the \r\n            // FocusManager (see HasFocus()).\r\n\r\n            if (hasFocus)\r\n            {\r\n                if (TextBox != null && TextBox.SelectionLength == 0)\r\n                {\r\n                    TextBox.SelectAll();\r\n                }\r\n            }\r\n            else\r\n            {\r\n                IsDropDownOpen = false;\r\n                _userCalledPopulate = false;\r\n                if (TextBox != null)\r\n                {\r\n                    TextBox.Select(TextBox.Text.Length, 0);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Determines whether the text box or drop-down portion of the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> control has\r\n        /// focus.\r\n        /// </summary>\r\n        /// <returns>true to indicate the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> has focus;\r\n        /// otherwise, false.</returns>\r\n        protected bool HasFocus()\r\n        {\r\n            DependencyObject focused =\r\n#if SILVERLIGHT\r\n                FocusManager.GetFocusedElement() as DependencyObject;\r\n#else\r\n                // For WPF, check if the element that has focus is within the control, as\r\n                // FocusManager.GetFocusedElement(this) will return null in such a case.\r\n                this.IsKeyboardFocusWithin ? Keyboard.FocusedElement as DependencyObject : FocusManager.GetFocusedElement(this) as DependencyObject;\r\n#endif\r\n            while (focused != null)\r\n            {\r\n                if (object.ReferenceEquals(focused, this))\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                // This helps deal with popups that may not be in the same \r\n                // visual tree\r\n                DependencyObject parent = VisualTreeHelper.GetParent(focused);\r\n                if (parent == null)\r\n                {\r\n                    // Try the logical parent.\r\n                    FrameworkElement element = focused as FrameworkElement;\r\n                    if (element != null)\r\n                    {\r\n                        parent = element.Parent;\r\n                    }\r\n                }\r\n                focused = parent;\r\n            }\r\n            return false;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Provides handling for the\r\n        /// <see cref=\"E:System.Windows.UIElement.GotFocus\" /> event.\r\n        /// </summary>\r\n        /// <param name=\"e\">A <see cref=\"T:System.Windows.RoutedEventArgs\" />\r\n        /// that contains the event data.</param>\r\n        protected override void OnGotFocus(RoutedEventArgs e)\r\n        {\r\n            base.OnGotFocus(e);\r\n            FocusChanged(HasFocus());\r\n            if (TextBox != null) TextBox.Focus();\r\n        }\r\n\r\n#if !SILVERLIGHT\r\n        /// <summary>\r\n        /// Handles change of keyboard focus, which is treated differently than control focus\r\n        /// </summary>\r\n        /// <param name=\"e\"></param>\r\n        protected override void OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs e)\r\n        {\r\n            base.OnIsKeyboardFocusWithinChanged(e);\r\n            FocusChanged((bool)e.NewValue);\r\n        }\r\n#endif\r\n\r\n        /// <summary>\r\n        /// Provides handling for the\r\n        /// <see cref=\"E:System.Windows.UIElement.LostFocus\" /> event.\r\n        /// </summary>\r\n        /// <param name=\"e\">A <see cref=\"T:System.Windows.RoutedEventArgs\" />\r\n        /// that contains the event data.</param>\r\n        protected override void OnLostFocus(RoutedEventArgs e)\r\n        {\r\n            base.OnLostFocus(e);\r\n            FocusChanged(HasFocus());\r\n        }\r\n\r\n        #endregion\r\n\r\n        /// <summary>\r\n        /// Handle the change of the IsEnabled property.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void ControlIsEnabledChanged(object sender, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            bool isEnabled = (bool)e.NewValue;\r\n            if (!isEnabled)\r\n            {\r\n                IsDropDownOpen = false;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the\r\n        /// <see cref=\"T:System.Windows.Controls.ISelectionAdapter\" /> part, if\r\n        /// possible.\r\n        /// </summary>\r\n        /// <returns>\r\n        /// A <see cref=\"T:System.Windows.Controls.ISelectionAdapter\" /> object,\r\n        /// if possible. Otherwise, null.\r\n        /// </returns>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1024:UsePropertiesWhereAppropriate\", Justification = \"Following the GetTemplateChild pattern for the method.\")]\r\n        protected virtual ISelectionAdapter GetSelectionAdapterPart()\r\n        {\r\n            ISelectionAdapter adapter = null;\r\n            Selector selector = GetTemplateChild(ElementSelector) as Selector;\r\n            if (selector != null)\r\n            {\r\n                // Check if it is already an IItemsSelector\r\n                adapter = selector as ISelectionAdapter;\r\n                if (adapter == null)\r\n                {\r\n                    // Built in support for wrapping a Selector control\r\n                    adapter = new SelectorSelectionAdapter(selector);\r\n                }\r\n            }\r\n            if (adapter == null)\r\n            {\r\n                adapter = GetTemplateChild(ElementSelectionAdapter) as ISelectionAdapter;\r\n            }\r\n            return adapter;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the timer tick when using a populate delay.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event arguments.</param>\r\n        private void PopulateDropDown(object sender, EventArgs e)\r\n        {\r\n            if (_delayTimer != null)\r\n            {\r\n                _delayTimer.Stop();\r\n            }\r\n\r\n            // Update the prefix/search text.\r\n            SearchText = Text;\r\n\r\n            // The Populated event enables advanced, custom filtering. The \r\n            // client needs to directly update the ItemsSource collection or\r\n            // call the Populate method on the control to continue the \r\n            // display process if Cancel is set to true.\r\n#if SILVERLIGHT\r\n            PopulatingEventArgs populating = new PopulatingEventArgs(SearchText);\r\n#else\r\n            PopulatingEventArgs populating = new PopulatingEventArgs(SearchText, PopulatingEvent);\r\n#endif\r\n\r\n            OnPopulating(populating);\r\n            if (!populating.Cancel)\r\n            {\r\n                PopulateComplete();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Raises the\r\n        /// <see cref=\"E:System.Windows.Controls.AutoCompleteBox.Populating\" />\r\n        /// event.\r\n        /// </summary>\r\n        /// <param name=\"e\">A\r\n        /// <see cref=\"T:System.Windows.Controls.PopulatingEventArgs\" /> that\r\n        /// contains the event data.</param>\r\n        protected virtual void OnPopulating(PopulatingEventArgs e)\r\n        {\r\n#if SILVERLIGHT\r\n            PopulatingEventHandler handler = Populating;\r\n            if (handler != null)\r\n            {\r\n                handler(this, e);\r\n            }\r\n#else\r\n            RaiseEvent(e);\r\n#endif\r\n        }\r\n\r\n        /// <summary>\r\n        /// Raises the\r\n        /// <see cref=\"E:System.Windows.Controls.AutoCompleteBox.Populated\" />\r\n        /// event.\r\n        /// </summary>\r\n        /// <param name=\"e\">A\r\n        /// <see cref=\"T:System.Windows.Controls.PopulatedEventArgs\" />\r\n        /// that contains the event data.</param>\r\n        protected virtual void OnPopulated(PopulatedEventArgs e)\r\n        {\r\n#if SILVERLIGHT\r\n            PopulatedEventHandler handler = Populated;\r\n            if (handler != null)\r\n            {\r\n                handler(this, e);\r\n            }\r\n#else\r\n            RaiseEvent(e);\r\n#endif\r\n        }\r\n\r\n        /// <summary>\r\n        /// Raises the\r\n        /// <see cref=\"E:System.Windows.Controls.AutoCompleteBox.SelectionChanged\" />\r\n        /// event.\r\n        /// </summary>\r\n        /// <param name=\"e\">A\r\n        /// <see cref=\"T:System.Windows.Controls.SelectionChangedEventArgs\" />\r\n        /// that contains the event data.</param>\r\n        protected virtual void OnSelectionChanged(SelectionChangedEventArgs e)\r\n        {\r\n#if SILVERLIGHT\r\n            SelectionChangedEventHandler handler = SelectionChanged;\r\n            if (handler != null)\r\n            {\r\n                handler(this, e);\r\n            }\r\n#else\r\n            RaiseEvent(e);\r\n#endif\r\n        }\r\n\r\n        /// <summary>\r\n        /// Raises the\r\n        /// <see cref=\"E:System.Windows.Controls.AutoCompleteBox.DropDownOpening\" />\r\n        /// event.\r\n        /// </summary>\r\n        /// <param name=\"e\">A\r\n        /// <see cref=\"T:System.Windows.Controls.RoutedPropertyChangingEventArgs`1\" />\r\n        /// that contains the event data.</param>\r\n        protected virtual void OnDropDownOpening(RoutedPropertyChangingEventArgs<bool> e)\r\n        {\r\n#if SILVERLIGHT\r\n            RoutedPropertyChangingEventHandler<bool> handler = DropDownOpening;\r\n            if (handler != null)\r\n            {\r\n                handler(this, e);\r\n            }\r\n#else\r\n            RaiseEvent(e);\r\n#endif\r\n        }\r\n\r\n        /// <summary>\r\n        /// Raises the\r\n        /// <see cref=\"E:System.Windows.Controls.AutoCompleteBox.DropDownOpened\" />\r\n        /// event.\r\n        /// </summary>\r\n        /// <param name=\"e\">A\r\n        /// <see cref=\"T:System.Windows.RoutedPropertyChangedEventArgs`1\" />\r\n        /// that contains the event data.</param>\r\n        protected virtual void OnDropDownOpened(RoutedPropertyChangedEventArgs<bool> e)\r\n        {\r\n#if SILVERLIGHT\r\n            RoutedPropertyChangedEventHandler<bool> handler = DropDownOpened;\r\n            if (handler != null)\r\n            {\r\n                handler(this, e);\r\n            }\r\n#else\r\n            RaiseEvent(e);\r\n#endif\r\n        }\r\n\r\n        /// <summary>\r\n        /// Raises the\r\n        /// <see cref=\"E:System.Windows.Controls.AutoCompleteBox.DropDownClosing\" />\r\n        /// event.\r\n        /// </summary>\r\n        /// <param name=\"e\">A\r\n        /// <see cref=\"T:System.Windows.Controls.RoutedPropertyChangingEventArgs`1\" />\r\n        /// that contains the event data.</param>\r\n        protected virtual void OnDropDownClosing(RoutedPropertyChangingEventArgs<bool> e)\r\n        {\r\n            RaiseEvent(e);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Raises the\r\n        /// <see cref=\"E:System.Windows.Controls.AutoCompleteBox.DropDownClosed\" />\r\n        /// event.\r\n        /// </summary>\r\n        /// <param name=\"e\">A\r\n        /// <see cref=\"T:System.Windows.RoutedPropertyChangedEventArgs`1\" />\r\n        /// which contains the event data.</param>\r\n        protected virtual void OnDropDownClosed(RoutedPropertyChangedEventArgs<bool> e)\r\n        {\r\n\r\n            RaiseEvent(e);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Formats an Item for text comparisons based on Converter \r\n        /// and ConverterCulture properties.\r\n        /// </summary>\r\n        /// <param name=\"value\">The object to format.</param>\r\n        /// <param name=\"clearDataContext\">A value indicating whether to clear\r\n        /// the data context after the lookup is performed.</param>\r\n        /// <returns>Formatted Value.</returns>\r\n        private string FormatValue(object value, bool clearDataContext)\r\n        {\r\n            return FormatValue(value);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Converts the specified object to a string by using the\r\n        /// <see cref=\"P:System.Windows.Data.Binding.Converter\" /> and\r\n        /// <see cref=\"P:System.Windows.Data.Binding.ConverterCulture\" /> values\r\n        /// of the binding object specified by the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.ValueMemberBinding\" />\r\n        /// property.\r\n        /// </summary>\r\n        /// <param name=\"value\">The object to format as a string.</param>\r\n        /// <returns>The string representation of the specified object.</returns>\r\n        /// <remarks>\r\n        /// Override this method to provide a custom string conversion.\r\n        /// </remarks>\r\n        protected virtual string FormatValue(object value)\r\n        {\r\n            if (ValueMemberPath != null)\r\n            {\r\n                var readValue = ValueByStringHelper.GetStringValue(ValueMemberPath, _valueMemberBinding, value);\r\n                return readValue != null ? readValue : string.Empty;\r\n            }\r\n\r\n            return value == null ? string.Empty : value.ToString();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Raises the\r\n        /// <see cref=\"E:System.Windows.Controls.AutoCompleteBox.TextChanged\" />\r\n        /// event.\r\n        /// </summary>\r\n        /// <param name=\"e\">A <see cref=\"T:System.Windows.RoutedEventArgs\" />\r\n        /// that contains the event data.</param>\r\n        protected virtual void OnTextChanged(RoutedEventArgs e)\r\n        {\r\n#if SILVERLIGHT\r\n            RoutedEventHandler handler = TextChanged;\r\n            if (handler != null)\r\n            {\r\n                handler(this, e);\r\n            }\r\n#else\r\n            RaiseEvent(e);\r\n#endif\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handle the TextChanged event that is directly attached to the \r\n        /// TextBox part. This ensures that only user initiated actions will \r\n        /// result in an AutoCompleteBox suggestion and operation.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source TextBox object.</param>\r\n        /// <param name=\"e\">The TextChanged event data.</param>\r\n        private void OnTextBoxTextChanged(object sender, TextChangedEventArgs e)\r\n        {\r\n            // Call the central updated text method as a user-initiated action\r\n            TextUpdated(_text.Text, true);\r\n        }\r\n\r\n        /// <summary>\r\n        /// When selection changes, save the location of the selection start.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void OnTextBoxSelectionChanged(object sender, RoutedEventArgs e)\r\n        {\r\n            // If ignoring updates. This happens after text is updated, and \r\n            // before the PopulateComplete method is called. Required for the \r\n            // IsTextCompletionEnabled feature.\r\n            if (_ignoreTextSelectionChange)\r\n            {\r\n                return;\r\n            }\r\n\r\n            _textSelectionStart = _text.SelectionStart;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates both the text box value and underlying text dependency \r\n        /// property value if and when they change. Automatically fires the \r\n        /// text changed events when there is a change.\r\n        /// </summary>\r\n        /// <param name=\"value\">The new string value.</param>\r\n        private void UpdateTextValue(string value)\r\n        {\r\n            UpdateTextValue(value, null);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates both the text box value and underlying text dependency \r\n        /// property value if and when they change. Automatically fires the \r\n        /// text changed events when there is a change.\r\n        /// </summary>\r\n        /// <param name=\"value\">The new string value.</param>\r\n        /// <param name=\"userInitiated\">A nullable bool value indicating whether\r\n        /// the action was user initiated. In a user initiated mode, the \r\n        /// underlying text dependency property is updated. In a non-user \r\n        /// interaction, the text box value is updated. When user initiated is \r\n        /// null, all values are updated.</param>\r\n        private void UpdateTextValue(string value, bool? userInitiated)\r\n        {\r\n            // Update the Text dependency property\r\n            if ((userInitiated == null || userInitiated == true) && Text != value)\r\n            {\r\n                _ignoreTextPropertyChange++;\r\n                Text = value;\r\n#if SILVERLIGHT\r\n                OnTextChanged(new RoutedEventArgs());\r\n#else\r\n                OnTextChanged(new RoutedEventArgs(TextChangedEvent));\r\n#endif\r\n            }\r\n\r\n            // Update the TextBox's Text dependency property\r\n            if ((userInitiated == null || userInitiated == false) && TextBox != null && TextBox.Text != value)\r\n            {\r\n                _ignoreTextPropertyChange++;\r\n                TextBox.Text = value ?? string.Empty;\r\n\r\n                // Text dependency property value was set, fire event\r\n                if (Text == value || Text == null)\r\n                {\r\n#if SILVERLIGHT\r\n                    OnTextChanged(new RoutedEventArgs());\r\n#else\r\n                    OnTextChanged(new RoutedEventArgs(TextChangedEvent));\r\n#endif\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handle the update of the text for the control from any source, \r\n        /// including the TextBox part and the Text dependency property.\r\n        /// </summary>\r\n        /// <param name=\"newText\">The new text.</param>\r\n        /// <param name=\"userInitiated\">A value indicating whether the update \r\n        /// is a user-initiated action. This should be a True value when the \r\n        /// TextUpdated method is called from a TextBox event handler.</param>\r\n        private void TextUpdated(string newText, bool userInitiated)\r\n        {\r\n            // Only process this event if it is coming from someone outside \r\n            // setting the Text dependency property directly.\r\n            if (_ignoreTextPropertyChange > 0)\r\n            {\r\n                _ignoreTextPropertyChange--;\r\n                return;\r\n            }\r\n\r\n            if (newText == null)\r\n            {\r\n                newText = string.Empty;\r\n            }\r\n\r\n            // The TextBox.TextChanged event was not firing immediately and \r\n            // was causing an immediate update, even with wrapping. If there is \r\n            // a selection currently, no update should happen.\r\n            if (IsTextCompletionEnabled && TextBox != null && TextBox.SelectionLength > 0 && TextBox.SelectionStart != TextBox.Text.Length)\r\n            {\r\n                return;\r\n            }\r\n\r\n            // Evaluate the conditions needed for completion.\r\n            // 1. Minimum prefix length\r\n            // 2. If a delay timer is in use, use it\r\n            bool populateReady = newText.Length >= MinimumPrefixLength && MinimumPrefixLength >= 0;\r\n            _userCalledPopulate = populateReady ? userInitiated : false;\r\n\r\n            // Update the interface and values only as necessary\r\n            UpdateTextValue(newText, userInitiated);\r\n\r\n            if (populateReady)\r\n            {\r\n                _ignoreTextSelectionChange = true;\r\n\r\n                if (_delayTimer != null)\r\n                {\r\n                    _delayTimer.Start();\r\n                }\r\n                else\r\n                {\r\n                    PopulateDropDown(this, EventArgs.Empty);\r\n                }\r\n            }\r\n            else\r\n            {\r\n                SearchText = string.Empty;\r\n                if (SelectedItem != null)\r\n                {\r\n                    _skipSelectedItemTextUpdate = true;\r\n                }\r\n                SelectedItem = null;\r\n                if (IsDropDownOpen)\r\n                {\r\n                    IsDropDownOpen = false;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Notifies the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> that the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.ItemsSource\" />\r\n        /// property has been set and the data can be filtered to provide\r\n        /// possible matches in the drop-down.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// Call this method when you are providing custom population of \r\n        /// the drop-down portion of the AutoCompleteBox, to signal the control \r\n        /// that you are done with the population process. \r\n        /// Typically, you use PopulateComplete when the population process \r\n        /// is a long-running process and you want to cancel built-in filtering\r\n        ///  of the ItemsSource items. In this case, you can handle the \r\n        /// Populated event and set PopulatingEventArgs.Cancel to true. \r\n        /// When the long-running process has completed you call \r\n        /// PopulateComplete to indicate the drop-down is populated.\r\n        /// </remarks>\r\n        public void PopulateComplete()\r\n        {\r\n            // Apply the search filter\r\n            RefreshView();\r\n\r\n            // Fire the Populated event containing the read-only view data.\r\n#if SILVERLIGHT\r\n            PopulatedEventArgs populated = new PopulatedEventArgs(new ReadOnlyCollection<object>(_view));\r\n#else\r\n            PopulatedEventArgs populated = new PopulatedEventArgs(new ReadOnlyCollection<object>(_view), PopulatedEvent);\r\n#endif\r\n            OnPopulated(populated);\r\n\r\n            if (SelectionAdapter != null && SelectionAdapter.ItemsSource != _view)\r\n            {\r\n                SelectionAdapter.ItemsSource = _view;\r\n            }\r\n\r\n            bool isDropDownOpen = _userCalledPopulate && (_view.Count > 0);\r\n            if (isDropDownOpen != IsDropDownOpen)\r\n            {\r\n                _ignorePropertyChange = true;\r\n                IsDropDownOpen = isDropDownOpen;\r\n            }\r\n            if (IsDropDownOpen)\r\n            {\r\n                OpeningDropDown(false);\r\n                if (DropDownPopup != null)\r\n                {\r\n                    DropDownPopup.Arrange();\r\n                }\r\n            }\r\n            else\r\n            {\r\n                ClosingDropDown(true);\r\n            }\r\n\r\n            UpdateTextCompletion(_userCalledPopulate);\r\n        }\r\n\r\n        private void UpdateTextCompletion(object selectedItem)\r\n        {\r\n            if (SelectedItem != selectedItem)\r\n            {\r\n                _skipSelectedItemTextUpdate = true;\r\n            }\r\n            SelectedItem = selectedItem;\r\n            if (SelectionAdapter != null)\r\n            {\r\n                SelectionAdapter.SelectedItem = selectedItem;\r\n            }\r\n\r\n            // Restore updates for TextSelection\r\n            if (_ignoreTextSelectionChange)\r\n            {\r\n                _ignoreTextSelectionChange = false;\r\n                if (TextBox != null)\r\n                {\r\n                    _textSelectionStart = TextBox.SelectionStart;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Performs text completion, if enabled, and a lookup on the underlying\r\n        /// item values for an exact match. Will update the SelectedItem value.\r\n        /// </summary>\r\n        /// <param name=\"userInitiated\">A value indicating whether the operation\r\n        /// was user initiated. Text completion will not be performed when not \r\n        /// directly initiated by the user.</param>\r\n        private void UpdateTextCompletion(bool userInitiated)\r\n        {\r\n            // By default this method will clear the selected value\r\n            object newSelectedItem = null;\r\n            string text = Text;\r\n\r\n            // Text search is StartsWith explicit and only when enabled, in \r\n            // line with WPF's ComboBox lookup. When in use it will associate \r\n            // a Value with the Text if it is found in ItemsSource. This is \r\n            // only valid when there is data and the user initiated the action.\r\n            if (_view.Count > 0)\r\n            {\r\n                if (IsTextCompletionEnabled && TextBox != null && userInitiated)\r\n                {\r\n                    int currentLength = TextBox.Text.Length;\r\n                    int selectionStart = TextBox.SelectionStart;\r\n                    if (selectionStart == text.Length && selectionStart > _textSelectionStart)\r\n                    {\r\n                        // When the FilterMode dependency property is set to \r\n                        // either StartsWith or StartsWithCaseSensitive, the \r\n                        // first item in the view is used. This will improve \r\n                        // performance on the lookup. It assumes that the \r\n                        // FilterMode the user has selected is an acceptable \r\n                        // case sensitive matching function for their scenario.\r\n                        object top = FilterMode == AutoCompleteFilterMode.StartsWith || FilterMode == AutoCompleteFilterMode.StartsWithCaseSensitive\r\n                            ? _view[0]\r\n                            : TryGetMatch(text, SelectedItem, _view, AutoCompleteSearch.GetFilter(AutoCompleteFilterMode.StartsWith));\r\n\r\n                        // If the search was successful, update SelectedItem\r\n                        if (top != null)\r\n                        {\r\n                            newSelectedItem = top;\r\n                            string topString = FormatValue(top, true);\r\n\r\n                            // Only replace partially when the two words being the same\r\n                            int minLength = Math.Min(topString.Length, Text.Length);\r\n                            if (AutoCompleteSearch.Equals(Text.Substring(0, minLength), topString.Substring(0, minLength)))\r\n                            {\r\n                                // Update the text\r\n                                UpdateTextValue(topString);\r\n\r\n                                // Select the text past the user's caret\r\n                                TextBox.SelectionStart = currentLength;\r\n                                TextBox.SelectionLength = topString.Length - currentLength;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    // Perform an exact string lookup for the text. This is a \r\n                    // design change from the original Toolkit release when the \r\n                    // IsTextCompletionEnabled property behaved just like the \r\n                    // WPF ComboBox's IsTextSearchEnabled property.\r\n                    //\r\n                    // This change provides the behavior that most people expect\r\n                    // to find: a lookup for the value is always performed.\r\n                    newSelectedItem = TryGetMatch(text, SelectedItem, _view, AutoCompleteSearch.GetFilter(AutoCompleteFilterMode.EqualsCaseSensitive));\r\n                }\r\n            }\r\n\r\n            // Update the selected item property\r\n            UpdateTextCompletion(newSelectedItem);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Attempts to look through the view and locate the specific exact \r\n        /// text match.\r\n        /// </summary>\r\n        /// <param name=\"searchText\">The search text.</param>\r\n        /// <param name=\"priorityView\">The view reference with priorty (check before the rest of views).</param>\r\n        /// <param name=\"view\">The view reference.</param>\r\n        /// <param name=\"predicate\">The predicate to use for the partial or \r\n        /// exact match.</param>\r\n        /// <returns>Returns the object or null.</returns>\r\n        private object TryGetMatch(string searchText, object priorityView,ObservableCollection<object> view, AutoCompleteFilterPredicate<string> predicate)\r\n        { \r\n            if (priorityView != null)\r\n            {\r\n                if (predicate(searchText, FormatValue(priorityView)))\r\n                {\r\n                    return priorityView;\r\n                }\r\n            }\r\n            if (view != null && view.Count > 0)\r\n            {\r\n                foreach (object o in view)\r\n                {\r\n                    if (predicate(searchText, FormatValue(o)))\r\n                    {\r\n                        return o;\r\n                    }\r\n                }\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// A simple helper method to clear the view and ensure that a view \r\n        /// object is always present and not null.\r\n        /// </summary>\r\n        private void ClearView()\r\n        {\r\n            if (_view == null)\r\n            {\r\n                _view = new ObservableCollection<object>();\r\n            }\r\n            else\r\n            {\r\n                _view.Clear();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Walks through the items enumeration. Performance is not going to be \r\n        /// perfect with the current implementation.\r\n        /// </summary>\r\n        private void RefreshView()\r\n        {\r\n            if (_items == null)\r\n            {\r\n                ClearView();\r\n                return;\r\n            }\r\n\r\n            // Cache the current text value\r\n            string text = Text ?? string.Empty;\r\n\r\n            // Determine if any filtering mode is on\r\n            bool stringFiltering = TextFilter != null;\r\n            bool objectFiltering = FilterMode == AutoCompleteFilterMode.Custom && TextFilter == null;\r\n\r\n            int view_index = 0;\r\n            int view_count = _view.Count;\r\n            List<object> items = _items;\r\n            foreach (object item in items)\r\n            {\r\n                bool inResults = !(stringFiltering || objectFiltering);\r\n                if (!inResults)\r\n                {\r\n                    inResults = stringFiltering ? TextFilter(text, FormatValue(item)) : ItemFilter(text, item);\r\n                }\r\n\r\n                if (view_count > view_index && inResults && _view[view_index] == item)\r\n                {\r\n                    // Item is still in the view\r\n                    view_index++;\r\n                }\r\n                else if (inResults)\r\n                {\r\n                    // Insert the item\r\n                    if (view_count > view_index && _view[view_index] != item)\r\n                    {\r\n                        // Replace item\r\n                        // Unfortunately replacing via index throws a fatal \r\n                        // exception: View[view_index] = item;\r\n                        // Cost: O(n) vs O(1)\r\n                        _view.RemoveAt(view_index);\r\n                        _view.Insert(view_index, item);\r\n                        view_index++;\r\n                    }\r\n                    else\r\n                    {\r\n                        // Add the item\r\n                        if (view_index == view_count)\r\n                        {\r\n                            // Constant time is preferred (Add).\r\n                            _view.Add(item);\r\n                        }\r\n                        else\r\n                        {\r\n                            _view.Insert(view_index, item);\r\n                        }\r\n                        view_index++;\r\n                        view_count++;\r\n                    }\r\n                }\r\n                else if (view_count > view_index && _view[view_index] == item)\r\n                {\r\n                    // Remove the item\r\n                    _view.RemoveAt(view_index);\r\n                    view_count--;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handle any change to the ItemsSource dependency property, update \r\n        /// the underlying ObservableCollection view, and set the selection \r\n        /// adapter's ItemsSource to the view if appropriate.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">The old enumerable reference.</param>\r\n        /// <param name=\"newValue\">The new enumerable reference.</param>\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA1801:ReviewUnusedParameters\", MessageId = \"oldValue\", Justification = \"This makes it easy to add validation or other changes in the future.\")]\r\n        private void OnItemsSourceChanged(IEnumerable oldValue, IEnumerable newValue)\r\n        {\r\n            // Remove handler for oldValue.CollectionChanged (if present)\r\n            INotifyCollectionChanged oldValueINotifyCollectionChanged = oldValue as INotifyCollectionChanged;\r\n            if (null != oldValueINotifyCollectionChanged && null != _collectionChangedWeakEventListener)\r\n            {\r\n                _collectionChangedWeakEventListener.Detach();\r\n                _collectionChangedWeakEventListener = null;\r\n            }\r\n\r\n            // Add handler for newValue.CollectionChanged (if possible)\r\n            INotifyCollectionChanged newValueINotifyCollectionChanged = newValue as INotifyCollectionChanged;\r\n            if (null != newValueINotifyCollectionChanged)\r\n            {\r\n                _collectionChangedWeakEventListener = new WeakEventListener<AutoCompleteBox, object, NotifyCollectionChangedEventArgs>(this);\r\n                _collectionChangedWeakEventListener.OnEventAction = (instance, source, eventArgs) => instance.ItemsSourceCollectionChanged(source, eventArgs);\r\n                _collectionChangedWeakEventListener.OnDetachAction = (weakEventListener) => newValueINotifyCollectionChanged.CollectionChanged -= weakEventListener.OnEvent;\r\n                newValueINotifyCollectionChanged.CollectionChanged += _collectionChangedWeakEventListener.OnEvent;\r\n            }\r\n\r\n            // Store a local cached copy of the data\r\n            _items = newValue == null ? null : new List<object>(newValue.Cast<object>().ToList());\r\n\r\n            // Clear and set the view on the selection adapter\r\n            ClearView();\r\n            if (SelectionAdapter != null && SelectionAdapter.ItemsSource != _view)\r\n            {\r\n                SelectionAdapter.ItemsSource = _view;\r\n            }\r\n            if (IsDropDownOpen)\r\n            {\r\n                RefreshView();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Method that handles the ObservableCollection.CollectionChanged event for the ItemsSource property.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The object that raised the event.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void ItemsSourceCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)\r\n        {\r\n            // Update the cache\r\n            if (e.Action == NotifyCollectionChangedAction.Remove && e.OldItems != null)\r\n            {\r\n                for (int index = 0; index < e.OldItems.Count; index++)\r\n                {\r\n                    _items.RemoveAt(e.OldStartingIndex);\r\n                }\r\n            }\r\n            if (e.Action == NotifyCollectionChangedAction.Add && e.NewItems != null && _items.Count >= e.NewStartingIndex)\r\n            {\r\n                for (int index = 0; index < e.NewItems.Count; index++)\r\n                {\r\n                    _items.Insert(e.NewStartingIndex + index, e.NewItems[index]);\r\n                }\r\n            }\r\n            if (e.Action == NotifyCollectionChangedAction.Replace && e.NewItems != null && e.OldItems != null)\r\n            {\r\n                for (int index = 0; index < e.NewItems.Count; index++)\r\n                {\r\n                    _items[e.NewStartingIndex] = e.NewItems[index];\r\n                }\r\n            }\r\n\r\n            // Update the view\r\n            if (e.Action == NotifyCollectionChangedAction.Remove || e.Action == NotifyCollectionChangedAction.Replace)\r\n            {\r\n                for (int index = 0; index < e.OldItems.Count; index++)\r\n                {\r\n                    _view.Remove(e.OldItems[index]);\r\n                }\r\n            }\r\n\r\n            if (e.Action == NotifyCollectionChangedAction.Reset)\r\n            {\r\n                // Significant changes to the underlying data.\r\n                ClearView();\r\n                if (ItemsSource != null)\r\n                {\r\n                    _items = new List<object>(ItemsSource.Cast<object>().ToList());\r\n                }\r\n            }\r\n            \r\n            // Refresh the observable collection used in the selection adapter.\r\n            RefreshView();\r\n        }\r\n\r\n        #region Selection Adapter\r\n\r\n        /// <summary>\r\n        /// Handles the SelectionChanged event of the selection adapter.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The selection changed event data.</param>\r\n        private void OnAdapterSelectionChanged(object sender, SelectionChangedEventArgs e)\r\n        {\r\n            if (e.AddedItems.Count == 1)\r\n            {\r\n                SelectedItem = e.AddedItems[0];\r\n            }\r\n            else\r\n            {\r\n                SelectedItem = null;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the Commit event on the selection adapter.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void OnAdapterSelectionComplete(object sender, RoutedEventArgs e)\r\n        {\r\n            IsDropDownOpen = false;\r\n\r\n            ISelectionAdapter selectionAdapter = (sender as ISelectionAdapter);\r\n\r\n            if (selectionAdapter != null)\r\n            {\r\n                UpdateTextCompletion(selectionAdapter.SelectedItem);\r\n            }\r\n            else\r\n            {\r\n                UpdateTextCompletion(false);\r\n            }\r\n\r\n            // Text should not be selected\r\n            if (TextBox != null)\r\n            {\r\n                TextBox.Select(TextBox.Text.Length, 0);\r\n            }\r\n\r\n#if SILVERLIGHT\r\n            Focus();\r\n#else\r\n            // Focus is treated differently in SL and WPF.\r\n            // This forces the textbox to get keyboard focus, in the case where\r\n            // another part of the control may have temporarily received focus.\r\n            if (TextBox != null)\r\n            {\r\n                Keyboard.Focus(TextBox);\r\n            }\r\n            else\r\n            {\r\n                Focus();\r\n            }\r\n#endif\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the Cancel event on the selection adapter.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void OnAdapterSelectionCanceled(object sender, RoutedEventArgs e)\r\n        {\r\n            UpdateTextValue(SearchText);\r\n\r\n            // Completion will update the selected value\r\n            UpdateTextCompletion(false);\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region Popup\r\n\r\n        /// <summary>\r\n        /// Handles MaxDropDownHeightChanged by re-arranging and updating the \r\n        /// popup arrangement.\r\n        /// </summary>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA1801:ReviewUnusedParameters\", MessageId = \"newValue\", Justification = \"This makes it easy to add validation or other changes in the future.\")]\r\n        private void OnMaxDropDownHeightChanged(double newValue)\r\n        {\r\n            if (DropDownPopup != null)\r\n            {\r\n                DropDownPopup.MaxDropDownHeight = newValue;\r\n                DropDownPopup.Arrange();\r\n            }\r\n            UpdateVisualState(true);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Private method that directly opens the popup, checks the expander \r\n        /// button, and then fires the Opened event.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">The old value.</param>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        private void OpenDropDown(bool oldValue, bool newValue)\r\n        {\r\n            if (DropDownPopup != null)\r\n            {\r\n                DropDownPopup.IsOpen = true;\r\n            }\r\n            _popupHasOpened = true;\r\n#if SILVERLIGHT\r\n            OnDropDownOpened(new RoutedPropertyChangedEventArgs<bool>(oldValue, newValue));\r\n#else\r\n            OnDropDownOpened(new RoutedPropertyChangedEventArgs<bool>(oldValue, newValue, DropDownOpenedEvent));\r\n#endif\r\n        }\r\n\r\n        /// <summary>\r\n        /// Private method that directly closes the popup, flips the Checked \r\n        /// value, and then fires the Closed event.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">The old value.</param>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        private void CloseDropDown(bool oldValue, bool newValue)\r\n        {\r\n            if (_popupHasOpened)\r\n            {\r\n                if (SelectionAdapter != null)\r\n                {\r\n                    SelectionAdapter.SelectedItem = null;\r\n                }\r\n                if (DropDownPopup != null)\r\n                {\r\n                    DropDownPopup.IsOpen = false;\r\n                }\r\n#if SILVERLIGHT\r\n                OnDropDownClosed(new RoutedPropertyChangedEventArgs<bool>(oldValue, newValue));\r\n#else\r\n                OnDropDownClosed(new RoutedPropertyChangedEventArgs<bool>(oldValue, newValue, DropDownClosedEvent));\r\n#endif\r\n            }\r\n        }\r\n\r\n        #endregion\r\n\r\n        /// <summary>\r\n        /// Provides handling for the\r\n        /// <see cref=\"E:System.Windows.UIElement.KeyDown\" /> event.\r\n        /// </summary>\r\n        /// <param name=\"e\">A <see cref=\"T:System.Windows.Input.KeyEventArgs\" />\r\n        /// that contains the event data.</param>\r\n        protected override void OnKeyDown(KeyEventArgs e)\r\n        {\r\n            if (e == null)\r\n            {\r\n                throw new ArgumentNullException(\"e\");\r\n            }\r\n\r\n            base.OnKeyDown(e);\r\n\r\n            if (e.Handled || !IsEnabled)\r\n            {\r\n                return;\r\n            }\r\n\r\n            // The drop down is open, pass along the key event arguments to the\r\n            // selection adapter. If it isn't handled by the adapter's logic,\r\n            // then we handle some simple navigation scenarios for controlling\r\n            // the drop down.\r\n            if (IsDropDownOpen)\r\n            {\r\n                if (SelectionAdapter != null)\r\n                {\r\n                    SelectionAdapter.HandleKeyDown(e);\r\n                    if (e.Handled)\r\n                    {\r\n                        return;\r\n                    }\r\n                }\r\n\r\n                if (e.Key == Key.Escape)\r\n                {\r\n                    OnAdapterSelectionCanceled(this, new RoutedEventArgs());\r\n                    e.Handled = true;\r\n                }\r\n            }\r\n            else\r\n            {\r\n                // The drop down is not open, the Down key will toggle it open.\r\n                if (e.Key == Key.Down)\r\n                {\r\n                    IsDropDownOpen = true;\r\n                    e.Handled = true;\r\n                }\r\n            }\r\n\r\n            // Standard drop down navigation\r\n            switch (e.Key)\r\n            {\r\n                case Key.F4:\r\n                    IsDropDownOpen = !IsDropDownOpen;\r\n                    e.Handled = true;\r\n                    break;\r\n\r\n                case Key.Enter:\r\n                    if (IsDropDownOpen)\r\n                    {\r\n                        OnAdapterSelectionComplete(this, new RoutedEventArgs());\r\n                        e.Handled = true;\r\n                    }\r\n                    break;\r\n\r\n                default:\r\n                    break;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Update the visual state of the control.\r\n        /// </summary>\r\n        /// <param name=\"useTransitions\">\r\n        /// A value indicating whether to automatically generate transitions to\r\n        /// the new state, or instantly transition to the new state.\r\n        /// </param>\r\n        void IUpdateVisualState.UpdateVisualState(bool useTransitions)\r\n        {\r\n            UpdateVisualState(useTransitions);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Update the current visual state of the button.\r\n        /// </summary>\r\n        /// <param name=\"useTransitions\">\r\n        /// True to use transitions when updating the visual state, false to\r\n        /// snap directly to the new visual state.\r\n        /// </param>\r\n        internal virtual void UpdateVisualState(bool useTransitions)\r\n        {\r\n            // Popup\r\n            VisualStateManager.GoToState(this, IsDropDownOpen ? VisualStates.StatePopupOpened : VisualStates.StatePopupClosed, useTransitions);\r\n\r\n            // Handle the Common and Focused states\r\n            Interaction.UpdateVisualStateBase(useTransitions);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Input/AutoCompleteBox/System/Windows/Controls/AutoCompleteFilter.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Controls.Extensions;\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// A predefined set of filter functions for the known, built-in \r\n    /// AutoCompleteFilterMode enumeration values.\r\n    /// </summary>\r\n    internal static class AutoCompleteSearch\r\n    {\r\n        /// <summary>\r\n        /// Index function that retrieves the filter for the provided \r\n        /// AutoCompleteFilterMode.\r\n        /// </summary>\r\n        /// <param name=\"FilterMode\">The built-in search mode.</param>\r\n        /// <returns>Returns the string-based comparison function.</returns>\r\n        public static AutoCompleteFilterPredicate<string> GetFilter(AutoCompleteFilterMode FilterMode)\r\n        {\r\n            switch (FilterMode)\r\n            {\r\n                case AutoCompleteFilterMode.Contains:\r\n                    return Contains;\r\n\r\n                case AutoCompleteFilterMode.ContainsCaseSensitive:\r\n                    return ContainsCaseSensitive;\r\n\r\n                case AutoCompleteFilterMode.ContainsOrdinal:\r\n                    return ContainsOrdinal;\r\n\r\n                case AutoCompleteFilterMode.ContainsOrdinalCaseSensitive:\r\n                    return ContainsOrdinalCaseSensitive;\r\n\r\n                case AutoCompleteFilterMode.Equals:\r\n                    return Equals;\r\n\r\n                case AutoCompleteFilterMode.EqualsCaseSensitive:\r\n                    return EqualsCaseSensitive;\r\n\r\n                case AutoCompleteFilterMode.EqualsOrdinal:\r\n                    return EqualsOrdinal;\r\n\r\n                case AutoCompleteFilterMode.EqualsOrdinalCaseSensitive:\r\n                    return EqualsOrdinalCaseSensitive;\r\n\r\n                case AutoCompleteFilterMode.StartsWith:\r\n                    return StartsWith;\r\n\r\n                case AutoCompleteFilterMode.StartsWithCaseSensitive:\r\n                    return StartsWithCaseSensitive;\r\n\r\n                case AutoCompleteFilterMode.StartsWithOrdinal:\r\n                    return StartsWithOrdinal;\r\n\r\n                case AutoCompleteFilterMode.StartsWithOrdinalCaseSensitive:\r\n                    return StartsWithOrdinalCaseSensitive;\r\n\r\n                case AutoCompleteFilterMode.None:\r\n                case AutoCompleteFilterMode.Custom:\r\n                default:\r\n                    return null;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Check if the string value begins with the text.\r\n        /// </summary>\r\n        /// <param name=\"text\">The AutoCompleteBox prefix text.</param>\r\n        /// <param name=\"value\">The item's string value.</param>\r\n        /// <returns>Returns true if the condition is met.</returns>\r\n        public static bool StartsWith(string text, string value)\r\n        {\r\n            return value.StartsWith(text, StringComparison.CurrentCultureIgnoreCase);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Check if the string value begins with the text.\r\n        /// </summary>\r\n        /// <param name=\"text\">The AutoCompleteBox prefix text.</param>\r\n        /// <param name=\"value\">The item's string value.</param>\r\n        /// <returns>Returns true if the condition is met.</returns>\r\n        public static bool StartsWithCaseSensitive(string text, string value)\r\n        {\r\n            return value.StartsWith(text, StringComparison.CurrentCulture);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Check if the string value begins with the text.\r\n        /// </summary>\r\n        /// <param name=\"text\">The AutoCompleteBox prefix text.</param>\r\n        /// <param name=\"value\">The item's string value.</param>\r\n        /// <returns>Returns true if the condition is met.</returns>\r\n        public static bool StartsWithOrdinal(string text, string value)\r\n        {\r\n            return value.StartsWith(text, StringComparison.OrdinalIgnoreCase);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Check if the string value begins with the text.\r\n        /// </summary>\r\n        /// <param name=\"text\">The AutoCompleteBox prefix text.</param>\r\n        /// <param name=\"value\">The item's string value.</param>\r\n        /// <returns>Returns true if the condition is met.</returns>\r\n        public static bool StartsWithOrdinalCaseSensitive(string text, string value)\r\n        {\r\n            return value.StartsWith(text, StringComparison.Ordinal);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Check if the prefix is contained in the string value. The current \r\n        /// culture's case insensitive string comparison operator is used.\r\n        /// </summary>\r\n        /// <param name=\"text\">The AutoCompleteBox prefix text.</param>\r\n        /// <param name=\"value\">The item's string value.</param>\r\n        /// <returns>Returns true if the condition is met.</returns>\r\n        public static bool Contains(string text, string value)\r\n        {\r\n            return value.Contains(text, StringComparison.CurrentCultureIgnoreCase);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Check if the prefix is contained in the string value.\r\n        /// </summary>\r\n        /// <param name=\"text\">The AutoCompleteBox prefix text.</param>\r\n        /// <param name=\"value\">The item's string value.</param>\r\n        /// <returns>Returns true if the condition is met.</returns>\r\n        public static bool ContainsCaseSensitive(string text, string value)\r\n        {\r\n            return value.Contains(text, StringComparison.CurrentCulture);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Check if the prefix is contained in the string value.\r\n        /// </summary>\r\n        /// <param name=\"text\">The AutoCompleteBox prefix text.</param>\r\n        /// <param name=\"value\">The item's string value.</param>\r\n        /// <returns>Returns true if the condition is met.</returns>\r\n        public static bool ContainsOrdinal(string text, string value)\r\n        {\r\n            return value.Contains(text, StringComparison.OrdinalIgnoreCase);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Check if the prefix is contained in the string value.\r\n        /// </summary>\r\n        /// <param name=\"text\">The AutoCompleteBox prefix text.</param>\r\n        /// <param name=\"value\">The item's string value.</param>\r\n        /// <returns>Returns true if the condition is met.</returns>\r\n        public static bool ContainsOrdinalCaseSensitive(string text, string value)\r\n        {\r\n            return value.Contains(text, StringComparison.Ordinal);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Check if the string values are equal.\r\n        /// </summary>\r\n        /// <param name=\"text\">The AutoCompleteBox prefix text.</param>\r\n        /// <param name=\"value\">The item's string value.</param>\r\n        /// <returns>Returns true if the condition is met.</returns>\r\n        public static bool Equals(string text, string value)\r\n        {\r\n            return value.Equals(text, StringComparison.CurrentCultureIgnoreCase);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Check if the string values are equal.\r\n        /// </summary>\r\n        /// <param name=\"text\">The AutoCompleteBox prefix text.</param>\r\n        /// <param name=\"value\">The item's string value.</param>\r\n        /// <returns>Returns true if the condition is met.</returns>\r\n        public static bool EqualsCaseSensitive(string text, string value)\r\n        {\r\n            return value.Equals(text, StringComparison.CurrentCulture);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Check if the string values are equal.\r\n        /// </summary>\r\n        /// <param name=\"text\">The AutoCompleteBox prefix text.</param>\r\n        /// <param name=\"value\">The item's string value.</param>\r\n        /// <returns>Returns true if the condition is met.</returns>\r\n        public static bool EqualsOrdinal(string text, string value)\r\n        {\r\n            return value.Equals(text, StringComparison.OrdinalIgnoreCase);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Check if the string values are equal.\r\n        /// </summary>\r\n        /// <param name=\"text\">The AutoCompleteBox prefix text.</param>\r\n        /// <param name=\"value\">The item's string value.</param>\r\n        /// <returns>Returns true if the condition is met.</returns>\r\n        public static bool EqualsOrdinalCaseSensitive(string text, string value)\r\n        {\r\n            return value.Equals(text, StringComparison.Ordinal);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Input/AutoCompleteBox/System/Windows/Controls/AutoCompleteFilterMode.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    // When adding to this enum, please update the OnFilterModePropertyChanged\r\n    // in the AutoCompleteBox class that is used for validation.\r\n\r\n    /// <summary>\r\n    /// Specifies how text in the text box portion of the\r\n    /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> control is used\r\n    /// to filter items specified by the\r\n    /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.ItemsSource\" />\r\n    /// property for display in the drop-down.\r\n    /// </summary>\r\n    /// <QualityBand>Stable</QualityBand>\r\n    public enum AutoCompleteFilterMode\r\n    {\r\n        /// <summary>\r\n        /// Specifies that no filter is used. All items are returned.\r\n        /// </summary>\r\n        None = 0,\r\n\r\n        /// <summary>\r\n        /// Specifies a culture-sensitive, case-insensitive filter where the\r\n        /// returned items start with the specified text. The filter uses the\r\n        /// <see cref=\"M:System.String.StartsWith(System.String,System.StringComparison)\" />\r\n        /// method, specifying\r\n        /// <see cref=\"P:System.StringComparer.CurrentCultureIgnoreCase\" /> as\r\n        /// the string comparison criteria.\r\n        /// </summary>\r\n        StartsWith = 1,\r\n\r\n        /// <summary>\r\n        /// Specifies a culture-sensitive, case-sensitive filter where the\r\n        /// returned items start with the specified text. The filter uses the\r\n        /// <see cref=\"M:System.String.StartsWith(System.String,System.StringComparison)\" />\r\n        /// method, specifying\r\n        /// <see cref=\"P:System.StringComparer.CurrentCulture\" /> as the string\r\n        /// comparison criteria.\r\n        /// </summary>\r\n        StartsWithCaseSensitive = 2,\r\n\r\n        /// <summary>\r\n        /// Specifies an ordinal, case-insensitive filter where the returned\r\n        /// items start with the specified text. The filter uses the\r\n        /// <see cref=\"M:System.String.StartsWith(System.String,System.StringComparison)\" />\r\n        /// method, specifying\r\n        /// <see cref=\"P:System.StringComparer.OrdinalIgnoreCase\" /> as the\r\n        /// string comparison criteria.\r\n        /// </summary>\r\n        StartsWithOrdinal = 3,\r\n\r\n        /// <summary>\r\n        /// Specifies an ordinal, case-sensitive filter where the returned items\r\n        /// start with the specified text. The filter uses the\r\n        /// <see cref=\"M:System.String.StartsWith(System.String,System.StringComparison)\" />\r\n        /// method, specifying <see cref=\"P:System.StringComparer.Ordinal\" /> as\r\n        /// the string comparison criteria.\r\n        /// </summary>\r\n        StartsWithOrdinalCaseSensitive = 4,\r\n\r\n        /// <summary>\r\n        /// Specifies a culture-sensitive, case-insensitive filter where the\r\n        /// returned items contain the specified text.\r\n        /// </summary>\r\n        Contains = 5,\r\n\r\n        /// <summary>\r\n        /// Specifies a culture-sensitive, case-sensitive filter where the\r\n        /// returned items contain the specified text.\r\n        /// </summary>\r\n        ContainsCaseSensitive = 6,\r\n\r\n        /// <summary>\r\n        /// Specifies an ordinal, case-insensitive filter where the returned\r\n        /// items contain the specified text.\r\n        /// </summary>\r\n        ContainsOrdinal = 7,\r\n\r\n        /// <summary>\r\n        /// Specifies an ordinal, case-sensitive filter where the returned items\r\n        /// contain the specified text.\r\n        /// </summary>\r\n        ContainsOrdinalCaseSensitive = 8,\r\n\r\n        /// <summary>\r\n        /// Specifies a culture-sensitive, case-insensitive filter where the\r\n        /// returned items equal the specified text. The filter uses the\r\n        /// <see cref=\"M:System.String.Equals(System.String,System.StringComparison)\" />\r\n        /// method, specifying\r\n        /// <see cref=\"P:System.StringComparer.CurrentCultureIgnoreCase\" /> as\r\n        /// the search comparison criteria.\r\n        /// </summary>\r\n        Equals = 9,\r\n\r\n        /// <summary>\r\n        /// Specifies a culture-sensitive, case-sensitive filter where the\r\n        /// returned items equal the specified text. The filter uses the\r\n        /// <see cref=\"M:System.String.Equals(System.String,System.StringComparison)\" />\r\n        /// method, specifying\r\n        /// <see cref=\"P:System.StringComparer.CurrentCulture\" /> as the string\r\n        /// comparison criteria.\r\n        /// </summary>\r\n        EqualsCaseSensitive = 10,\r\n\r\n        /// <summary>\r\n        /// Specifies an ordinal, case-insensitive filter where the returned\r\n        /// items equal the specified text. The filter uses the\r\n        /// <see cref=\"M:System.String.Equals(System.String,System.StringComparison)\" />\r\n        /// method, specifying\r\n        /// <see cref=\"P:System.StringComparer.OrdinalIgnoreCase\" /> as the\r\n        /// string comparison criteria.\r\n        /// </summary>\r\n        EqualsOrdinal = 11,\r\n\r\n        /// <summary>\r\n        /// Specifies an ordinal, case-sensitive filter where the returned items\r\n        /// equal the specified text. The filter uses the\r\n        /// <see cref=\"M:System.String.Equals(System.String,System.StringComparison)\" />\r\n        /// method, specifying <see cref=\"P:System.StringComparer.Ordinal\" /> as\r\n        /// the string comparison criteria.\r\n        /// </summary>\r\n        EqualsOrdinalCaseSensitive = 12,\r\n\r\n        /// <summary>\r\n        /// Specifies that a custom filter is used. This mode is used when the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.TextFilter\" />\r\n        /// or\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.ItemFilter\" />\r\n        /// properties are set.\r\n        /// </summary>\r\n        Custom = 13,\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Input/AutoCompleteBox/System/Windows/Controls/AutoCompleteFilterPredicate.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Represents the filter used by the\r\n    /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> control to\r\n    /// determine whether an item is a possible match for the specified text.\r\n    /// </summary>\r\n    /// <returns>true to indicate <paramref name=\"item\" /> is a possible match\r\n    /// for <paramref name=\"search\" />; otherwise false.</returns>\r\n    /// <param name=\"search\">The string used as the basis for filtering.</param>\r\n    /// <param name=\"item\">The item that is compared with the\r\n    /// <paramref name=\"search\" /> parameter.</param>\r\n    /// <typeparam name=\"T\">The type used for filtering the\r\n    /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" />. This type can\r\n    /// be either a string or an object.</typeparam>\r\n    /// <QualityBand>Stable</QualityBand>\r\n    public delegate bool AutoCompleteFilterPredicate<T>(string search, T item);\r\n}"
  },
  {
    "path": "WpfToolkit/Input/AutoCompleteBox/System/Windows/Controls/ISelectionAdapter.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections;\r\nusing System.Windows;\r\nusing System.Windows.Automation.Peers;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Defines an item collection, selection members, and key handling for the\r\n    /// selection adapter contained in the drop-down portion of an\r\n    /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> control.\r\n    /// </summary>\r\n    /// <QualityBand>Stable</QualityBand>\r\n    public interface ISelectionAdapter\r\n    {\r\n        /// <summary>\r\n        /// Gets or sets the selected item.\r\n        /// </summary>\r\n        /// <value>The currently selected item.</value>\r\n        object SelectedItem { get; set; }\r\n\r\n        /// <summary>\r\n        /// Occurs when the\r\n        /// <see cref=\"P:System.Windows.Controls.ISelectionAdapter.SelectedItem\" />\r\n        /// property value changes.\r\n        /// </summary>\r\n        event SelectionChangedEventHandler SelectionChanged;\r\n        \r\n        /// <summary>\r\n        /// Gets or sets a collection that is used to generate content for the\r\n        /// selection adapter.\r\n        /// </summary>\r\n        /// <value>The collection that is used to generate content for the\r\n        /// selection adapter.</value>\r\n        IEnumerable ItemsSource { get; set; }\r\n\r\n        /// <summary>\r\n        /// Occurs when a selected item is not cancelled and is committed as the\r\n        /// selected item.\r\n        /// </summary>\r\n        event RoutedEventHandler Commit;\r\n\r\n        /// <summary>\r\n        /// Occurs when a selection has been canceled.\r\n        /// </summary>\r\n        event RoutedEventHandler Cancel;\r\n\r\n        /// <summary>\r\n        /// Provides handling for the\r\n        /// <see cref=\"E:System.Windows.UIElement.KeyDown\" /> event that occurs\r\n        /// when a key is pressed while the drop-down portion of the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> has focus.\r\n        /// </summary>\r\n        /// <param name=\"e\">A <see cref=\"T:System.Windows.Input.KeyEventArgs\" />\r\n        /// that contains data about the\r\n        /// <see cref=\"E:System.Windows.UIElement.KeyDown\" /> event.</param>\r\n        void HandleKeyDown(KeyEventArgs e);\r\n\r\n        /// <summary>\r\n        /// Returns an automation peer for the selection adapter, for use by the\r\n        /// Silverlight automation infrastructure.\r\n        /// </summary>\r\n        /// <returns>An automation peer for the selection adapter, if one is\r\n        /// available; otherwise, null.</returns>\r\n        AutomationPeer CreateAutomationPeer();\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Input/AutoCompleteBox/System/Windows/Controls/ItemsControlExtensions.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Windows;\nusing System.Windows.Controls;\nusing System.Windows.Controls.Primitives;\nusing System.Windows.Media;\nusing System.Windows.Threading;\n\nnamespace Extensions\n{\n    //Added from http://stackoverflow.com/questions/2946954/make-listview-scrollintoview-scroll-the-item-into-the-center-of-the-listview-c\n    public static class ItemsControlExtensions\n    {\n        public static void ScrollToCenterOfView(this ItemsControl itemsControl, object item)\n        {\n            // Scroll immediately if possible\n            if (!itemsControl.TryScrollToCenterOfView(item))\n            {\n                // Otherwise wait until everything is loaded, then scroll\n                if (itemsControl is ListBox) ((ListBox)itemsControl).ScrollIntoView(item);\n                itemsControl.Dispatcher.BeginInvoke(DispatcherPriority.Loaded, new Action(() =>\n                {\n                    itemsControl.TryScrollToCenterOfView(item);\n                }));\n            }\n        }\n\n        private static bool TryScrollToCenterOfView(this ItemsControl itemsControl, object item)\n        {\n            // Find the container\n            var container = itemsControl.ItemContainerGenerator.ContainerFromItem(item) as UIElement;\n            if (container == null) return false;\n\n            // Find the ScrollContentPresenter\n            ScrollContentPresenter presenter = null;\n            for (Visual vis = container; vis != null && vis != itemsControl; vis = VisualTreeHelper.GetParent(vis) as Visual)\n                if ((presenter = vis as ScrollContentPresenter) != null)\n                    break;\n            if (presenter == null) return false;\n\n            // Find the IScrollInfo\n            var scrollInfo =\n                !presenter.CanContentScroll ? presenter :\n                presenter.Content as IScrollInfo ??\n                FirstVisualChild(presenter.Content as ItemsPresenter) as IScrollInfo ??\n                presenter;\n\n            // Compute the center point of the container relative to the scrollInfo\n            Size size = container.RenderSize;\n            Point center = container.TransformToAncestor((Visual)scrollInfo).Transform(new Point(size.Width / 2, size.Height / 2));\n            center.Y += scrollInfo.VerticalOffset;\n            center.X += scrollInfo.HorizontalOffset;\n\n            // Adjust for logical scrolling\n            if (scrollInfo is StackPanel || scrollInfo is VirtualizingStackPanel)\n            {\n                double logicalCenter = itemsControl.ItemContainerGenerator.IndexFromContainer(container) + 0.5;\n                Orientation orientation = scrollInfo is StackPanel ? ((StackPanel)scrollInfo).Orientation : ((VirtualizingStackPanel)scrollInfo).Orientation;\n                if (orientation == Orientation.Horizontal)\n                    center.X = logicalCenter;\n                else\n                    center.Y = logicalCenter;\n            }\n\n            // Scroll the center of the container to the center of the viewport\n            if (scrollInfo.CanVerticallyScroll) scrollInfo.SetVerticalOffset(CenteringOffset(center.Y, scrollInfo.ViewportHeight, scrollInfo.ExtentHeight));\n            if (scrollInfo.CanHorizontallyScroll) scrollInfo.SetHorizontalOffset(CenteringOffset(center.X, scrollInfo.ViewportWidth, scrollInfo.ExtentWidth));\n            return true;\n        }\n\n        private static double CenteringOffset(double center, double viewport, double extent)\n        {\n            return Math.Min(extent - viewport, Math.Max(0, center - viewport / 2));\n        }\n        private static DependencyObject FirstVisualChild(Visual visual)\n        {\n            if (visual == null) return null;\n            if (VisualTreeHelper.GetChildrenCount(visual) == 0) return null;\n            return VisualTreeHelper.GetChild(visual, 0);\n        }\n    }\n}\n"
  },
  {
    "path": "WpfToolkit/Input/AutoCompleteBox/System/Windows/Controls/PopulatedEventArgs.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections;\r\nusing System.Windows;\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Provides data for the\r\n    /// <see cref=\"E:System.Windows.Controls.AutoCompleteBox.Populated\" />\r\n    /// event.\r\n    /// </summary>\r\n    /// <QualityBand>Stable</QualityBand>\r\n    public class PopulatedEventArgs : RoutedEventArgs\r\n    {\r\n        /// <summary>\r\n        /// Gets the list of possible matches added to the drop-down portion of\r\n        /// the <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" />\r\n        /// control.\r\n        /// </summary>\r\n        /// <value>The list of possible matches added to the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" />.</value>\r\n        public IEnumerable Data { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the\r\n        /// <see cref=\"T:System.Windows.Controls.PopulatedEventArgs\" />.\r\n        /// </summary>\r\n        /// <param name=\"data\">The list of possible matches added to the\r\n        /// drop-down portion of the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> control.</param>\r\n        public PopulatedEventArgs(IEnumerable data)\r\n        {\r\n            Data = data;\r\n        }\r\n\r\n#if !SILVERLIGHT\r\n                /// <summary>\r\n        /// Initializes a new instance of the\r\n        /// <see cref=\"T:System.Windows.Controls.PopulatedEventArgs\" />.\r\n        /// </summary>\r\n        /// <param name=\"data\">The list of possible matches added to the\r\n        /// drop-down portion of the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> control.</param>\r\n        /// <param name=\"routedEvent\">The routed event identifier for this instance.</param>\r\n        public PopulatedEventArgs(IEnumerable data, RoutedEvent routedEvent)\r\n            : base(routedEvent)\r\n        {\r\n            Data = data;\r\n        }\r\n#endif\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Input/AutoCompleteBox/System/Windows/Controls/PopulatedEventHandler.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Windows;\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Represents the method that will handle the\r\n    /// <see cref=\"E:System.Windows.Controls.AutoCompleteBox.Populated\" />\r\n    /// event of a <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" />\r\n    /// control.\r\n    /// </summary>\r\n    /// <param name=\"sender\">The source of the event.</param>\r\n    /// <param name=\"e\">A\r\n    /// <see cref=\"T:System.Windows.Controls.PopulatedEventArgs\" /> that\r\n    /// contains the event data.</param>\r\n    /// <QualityBand>Stable</QualityBand>\r\n    [SuppressMessage(\"Microsoft.Design\", \"CA1003:UseGenericEventHandlerInstances\", Justification = \"There is no generic RoutedEventHandler.\")]\r\n    public delegate void PopulatedEventHandler(object sender, PopulatedEventArgs e);\r\n}"
  },
  {
    "path": "WpfToolkit/Input/AutoCompleteBox/System/Windows/Controls/PopulatingEventArgs.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Windows;\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Provides data for the\r\n    /// <see cref=\"E:System.Windows.Controls.AutoCompleteBox.Populating\" />\r\n    /// event.\r\n    /// </summary>\r\n    /// <QualityBand>Stable</QualityBand>\r\n    public class PopulatingEventArgs : RoutedEventArgs\r\n    {\r\n        /// <summary>\r\n        /// Gets the text that is used to determine which items to display in\r\n        /// the <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" />\r\n        /// control.\r\n        /// </summary>\r\n        /// <value>The text that is used to determine which items to display in\r\n        /// the <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" />.</value>\r\n        public string Parameter { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether the\r\n        /// <see cref=\"E:System.Windows.Controls.AutoCompleteBox.Populating\" />\r\n        /// event should be canceled.\r\n        /// </summary>\r\n        /// <value>True to cancel the event, otherwise false. The default is\r\n        /// false.</value>\r\n        public bool Cancel { get; set; }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the\r\n        /// <see cref=\"T:System.Windows.Controls.PopulatingEventArgs\" />.\r\n        /// </summary>\r\n        /// <param name=\"parameter\">The value of the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.SearchText\" />\r\n        /// property, which is used to filter items for the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> control.</param>\r\n        public PopulatingEventArgs(string parameter)\r\n        {\r\n            Parameter = parameter;\r\n        }\r\n\r\n#if !SILVERLIGHT\r\n        /// <summary>\r\n        /// Initializes a new instance of the\r\n        /// <see cref=\"T:System.Windows.Controls.PopulatingEventArgs\" />.\r\n        /// </summary>\r\n        /// <param name=\"parameter\">The value of the\r\n        /// <see cref=\"P:System.Windows.Controls.AutoCompleteBox.SearchText\" />\r\n        /// property, which is used to filter items for the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> control.</param>\r\n        /// <param name=\"routedEvent\">The routed event identifier for this instance.</param>\r\n        public PopulatingEventArgs(string parameter, RoutedEvent routedEvent)\r\n            : base(routedEvent)\r\n        {\r\n            Parameter = parameter;\r\n        }\r\n#endif\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Input/AutoCompleteBox/System/Windows/Controls/PopulatingEventHandler.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Windows;\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Represents the method that will handle the\r\n    /// <see cref=\"E:System.Windows.Controls.AutoCompleteBox.Populating\" />\r\n    /// event of a <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" />\r\n    /// control.\r\n    /// </summary>\r\n    /// <param name=\"sender\">The source of the event.</param>\r\n    /// <param name=\"e\">A\r\n    /// <see cref=\"T:System.Windows.Controls.PopulatingEventArgs\" /> that\r\n    /// contains the event data.</param>\r\n    /// <QualityBand>Stable</QualityBand>\r\n    [SuppressMessage(\"Microsoft.Design\", \"CA1003:UseGenericEventHandlerInstances\", Justification = \"There is no generic RoutedEventHandler.\")]\r\n    public delegate void PopulatingEventHandler(object sender, PopulatingEventArgs e);\r\n}"
  },
  {
    "path": "WpfToolkit/Input/AutoCompleteBox/System/Windows/Controls/PopupHelper.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Diagnostics;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Windows.Controls.Primitives;\r\nusing System.Windows.Input;\r\nusing System.Windows.Interop;\r\nusing System.Windows.Media;\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// PopupHelper is a simple wrapper type that helps abstract platform\r\n    /// differences out of the Popup.\r\n    /// </summary>\r\n    internal class PopupHelper\r\n    {\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether a visual popup state is being used\r\n        /// in the current template for the Closed state. Setting this value to\r\n        /// true will delay the actual setting of Popup.IsOpen to false until\r\n        /// after the visual state's transition for Closed is complete.\r\n        /// </summary>\r\n        public bool UsesClosingVisualState { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the parent control.\r\n        /// </summary>\r\n        private Control Parent { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the maximum drop down height value.\r\n        /// </summary>\r\n        public double MaxDropDownHeight { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets the Popup control instance.\r\n        /// </summary>\r\n        public Popup Popup { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether the actual Popup is open.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Provided for completeness.\")]\r\n        public bool IsOpen\r\n        {\r\n            get { return Popup.IsOpen; }\r\n            set { Popup.IsOpen = value; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the popup child framework element. Can be used if an\r\n        /// assumption is made on the child type.\r\n        /// </summary>\r\n        private FrameworkElement PopupChild { get; set; }\r\n\r\n        /// <summary>\r\n        /// The Closed event is fired after the Popup closes.\r\n        /// </summary>\r\n        public event EventHandler Closed;\r\n\r\n        /// <summary>\r\n        /// Fired when the popup children have a focus event change, allows the\r\n        /// parent control to update visual states or react to the focus state.\r\n        /// </summary>\r\n        public event EventHandler FocusChanged;\r\n\r\n        /// <summary>\r\n        /// Fired when the popup children intercept an event that may indicate\r\n        /// the need for a visual state update by the parent control.\r\n        /// </summary>\r\n        public event EventHandler UpdateVisualStates;\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the PopupHelper class.\r\n        /// </summary>\r\n        /// <param name=\"parent\">The parent control.</param>\r\n        public PopupHelper(Control parent)\r\n        {\r\n            Debug.Assert(parent != null, \"Parent should not be null.\");\r\n            Parent = parent;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the PopupHelper class.\r\n        /// </summary>\r\n        /// <param name=\"parent\">The parent control.</param>\r\n        /// <param name=\"popup\">The Popup template part.</param>\r\n        public PopupHelper(Control parent, Popup popup)\r\n            : this(parent)\r\n        {\r\n            Popup = popup;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Arrange the popup.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1031:DoNotCatchGeneralExceptionTypes\", Justification = \"This try-catch pattern is used by other popup controls to keep the runtime up.\")]\r\n        public void Arrange()\r\n        {\r\n            if (Popup == null || PopupChild == null || Application.Current == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            UIElement u = Parent;\r\n            if (Application.Current.CheckAccess() && Application.Current.Windows.Count > 0)\r\n            {\r\n                // TODO: USE THE CURRENT WINDOW INSTEAD! WALK THE TREE!\r\n                u = Application.Current.Windows[0];\r\n            }\r\n            while ((u as Window) == null && u != null)\r\n            {\r\n                u = VisualTreeHelper.GetParent(u) as UIElement;\r\n            }\r\n            Window w = u as Window;\r\n            if (w == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            double rootWidth = w.ActualWidth;\r\n            double rootHeight = w.ActualHeight;\r\n\r\n            double popupContentWidth = PopupChild.ActualWidth;\r\n            double popupContentHeight = PopupChild.ActualHeight;\r\n\r\n            if (rootHeight == 0 || rootWidth == 0 || popupContentWidth == 0 || popupContentHeight == 0)\r\n            {\r\n                return;\r\n            }\r\n\r\n            double rootOffsetX = 0;\r\n            double rootOffsetY = 0;\r\n\r\n            double myControlHeight = Parent.ActualHeight;\r\n            double myControlWidth = Parent.ActualWidth;\r\n\r\n            // Use or come up with a maximum popup height.\r\n            double popupMaxHeight = MaxDropDownHeight;\r\n            if (double.IsInfinity(popupMaxHeight) || double.IsNaN(popupMaxHeight))\r\n            {\r\n                popupMaxHeight = (rootHeight - myControlHeight) * 3 / 5;\r\n            }\r\n\r\n            popupContentWidth = Math.Min(popupContentWidth, rootWidth);\r\n            popupContentHeight = Math.Min(popupContentHeight, popupMaxHeight);\r\n            popupContentWidth = Math.Max(myControlWidth, popupContentWidth);\r\n\r\n            // We prefer to align the popup box with the left edge of the \r\n            // control, if it will fit.\r\n            double popupX = rootOffsetX;\r\n            if (rootWidth < popupX + popupContentWidth)\r\n            {\r\n                // Since it doesn't fit when strictly left aligned, we shift it \r\n                // to the left until it does fit.\r\n                popupX = rootWidth - popupContentWidth;\r\n                popupX = Math.Max(0, popupX);\r\n            }\r\n\r\n            // We prefer to put the popup below the combobox if it will fit.\r\n            bool below = true;\r\n            double popupY = rootOffsetY + myControlHeight;\r\n            if (rootHeight < popupY + popupContentHeight)\r\n            {\r\n                below = false;\r\n                // It doesn't fit below the combobox, lets try putting it above \r\n                // the combobox.\r\n                popupY = rootOffsetY - popupContentHeight;\r\n                if (popupY < 0)\r\n                {\r\n                    // doesn't really fit below either.  Now we just pick top \r\n                    // or bottom based on wich area is bigger.\r\n                    if (rootOffsetY < (rootHeight - myControlHeight) / 2)\r\n                    {\r\n                        below = true;\r\n                        popupY = rootOffsetY + myControlHeight;\r\n                    }\r\n                    else\r\n                    {\r\n                        below = false;\r\n                        popupY = rootOffsetY - popupContentHeight;\r\n                    }\r\n                }\r\n            }\r\n\r\n            // Now that we have positioned the popup we may need to truncate \r\n            // its size.\r\n            popupMaxHeight = below ? Math.Min(rootHeight - popupY, popupMaxHeight) : Math.Min(rootOffsetY, popupMaxHeight);\r\n\r\n            Popup.HorizontalOffset = 0;\r\n            Popup.VerticalOffset = 0;\r\n\r\n            PopupChild.MinWidth = myControlWidth;\r\n            PopupChild.MaxWidth = rootWidth;\r\n            PopupChild.MinHeight = 0;\r\n            PopupChild.MaxHeight = Math.Max(0, popupMaxHeight);\r\n\r\n            PopupChild.Width = popupContentWidth;\r\n            // PopupChild.Height = popupContentHeight;\r\n            PopupChild.HorizontalAlignment = HorizontalAlignment.Left;\r\n            PopupChild.VerticalAlignment = VerticalAlignment.Top;\r\n\r\n            // Set the top left corner for the actual drop down.\r\n            Canvas.SetLeft(PopupChild, popupX - rootOffsetX);\r\n            Canvas.SetTop(PopupChild, popupY - rootOffsetY);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Fires the Closed event.\r\n        /// </summary>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void OnClosed(EventArgs e)\r\n        {\r\n            EventHandler handler = Closed;\r\n            if (handler != null)\r\n            {\r\n                handler(this, e);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Actually closes the popup after the VSM state animation completes.\r\n        /// </summary>\r\n        /// <param name=\"sender\">Event source.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private void OnPopupClosedStateChanged(object sender, VisualStateChangedEventArgs e)\r\n        {\r\n            // Delayed closing of the popup until now\r\n            if (e != null && e.NewState != null && e.NewState.Name == VisualStates.StatePopupClosed)\r\n            {\r\n                if (Popup != null)\r\n                {\r\n                    Popup.IsOpen = false;\r\n                }\r\n                OnClosed(EventArgs.Empty);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Should be called by the parent control before the base\r\n        /// OnApplyTemplate method is called.\r\n        /// </summary>\r\n        public void BeforeOnApplyTemplate()\r\n        {\r\n            if (UsesClosingVisualState)\r\n            {\r\n                // Unhook the event handler for the popup closed visual state group.\r\n                // This code is used to enable visual state transitions before \r\n                // actually setting the underlying Popup.IsOpen property to false.\r\n                VisualStateGroup groupPopupClosed = VisualStates.TryGetVisualStateGroup(Parent, VisualStates.GroupPopup);\r\n                if (null != groupPopupClosed)\r\n                {\r\n                    groupPopupClosed.CurrentStateChanged -= OnPopupClosedStateChanged;\r\n                    UsesClosingVisualState = false;\r\n                }\r\n            }\r\n\r\n            if (Popup != null)\r\n            {\r\n                Popup.Closed -= Popup_Closed;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Should be called by the parent control after the base\r\n        /// OnApplyTemplate method is called.\r\n        /// </summary>\r\n        public void AfterOnApplyTemplate()\r\n        {\r\n            if (Popup != null)\r\n            {\r\n                Popup.Closed += Popup_Closed;\r\n            }\r\n\r\n            VisualStateGroup groupPopupClosed = VisualStates.TryGetVisualStateGroup(Parent, VisualStates.GroupPopup);\r\n            if (null != groupPopupClosed)\r\n            {\r\n                groupPopupClosed.CurrentStateChanged += OnPopupClosedStateChanged;\r\n                UsesClosingVisualState = true;\r\n            }\r\n\r\n            // TODO: Consider moving to the DropDownPopup setter\r\n            // TODO: Although in line with other implementations, what happens \r\n            // when the template is swapped out?\r\n            if (Popup != null)\r\n            {\r\n                PopupChild = Popup.Child as FrameworkElement;\r\n\r\n                  if (PopupChild != null)\r\n                {\r\n#if SILVERLIGHT\r\n                    // For Silverlight only, we just create the popup child with \r\n                    // canvas a single time.\r\n                    if (!_hasControlLoaded)\r\n                    {\r\n                        _hasControlLoaded = true;\r\n\r\n                        // Replace the poup child with a canvas\r\n                        PopupChildCanvas = new Canvas();\r\n                        Popup.Child = PopupChildCanvas;\r\n\r\n                        OutsidePopupCanvas = new Canvas();\r\n                        OutsidePopupCanvas.Background = new SolidColorBrush(Colors.Transparent);\r\n                        OutsidePopupCanvas.MouseLeftButtonDown += OutsidePopup_MouseLeftButtonDown;\r\n\r\n                        PopupChildCanvas.Children.Add(OutsidePopupCanvas);\r\n                        PopupChildCanvas.Children.Add(PopupChild);\r\n                    }\r\n#endif\r\n\r\n                    PopupChild.GotFocus += PopupChild_GotFocus;\r\n                    PopupChild.LostFocus += PopupChild_LostFocus;\r\n                    PopupChild.MouseEnter += PopupChild_MouseEnter;\r\n                    PopupChild.MouseLeave += PopupChild_MouseLeave;\r\n                    PopupChild.SizeChanged += PopupChild_SizeChanged;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// The size of the popup child has changed.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void PopupChild_SizeChanged(object sender, SizeChangedEventArgs e)\r\n        {\r\n            Arrange();\r\n        }\r\n\r\n        /// <summary>\r\n        /// The mouse has clicked outside of the popup.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void OutsidePopup_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)\r\n        {\r\n            if (Popup != null)\r\n            {\r\n                Popup.IsOpen = false;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Connected to the Popup Closed event and fires the Closed event.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void Popup_Closed(object sender, EventArgs e)\r\n        {\r\n            OnClosed(EventArgs.Empty);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Connected to several events that indicate that the FocusChanged \r\n        /// event should bubble up to the parent control.\r\n        /// </summary>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void OnFocusChanged(EventArgs e)\r\n        {\r\n            EventHandler handler = FocusChanged;\r\n            if (handler != null)\r\n            {\r\n                handler(this, e);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Fires the UpdateVisualStates event.\r\n        /// </summary>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void OnUpdateVisualStates(EventArgs e)\r\n        {\r\n            EventHandler handler = UpdateVisualStates;\r\n            if (handler != null)\r\n            {\r\n                handler(this, e);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// The popup child has received focus.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void PopupChild_GotFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            OnFocusChanged(EventArgs.Empty);\r\n        }\r\n\r\n        /// <summary>\r\n        /// The popup child has lost focus.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void PopupChild_LostFocus(object sender, RoutedEventArgs e)\r\n        {\r\n            OnFocusChanged(EventArgs.Empty);\r\n        }\r\n\r\n        /// <summary>\r\n        /// The popup child has had the mouse enter its bounds.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void PopupChild_MouseEnter(object sender, MouseEventArgs e)\r\n        {\r\n            OnUpdateVisualStates(EventArgs.Empty);\r\n        }\r\n\r\n        /// <summary>\r\n        /// The mouse has left the popup child's bounds.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void PopupChild_MouseLeave(object sender, MouseEventArgs e)\r\n        {\r\n            OnUpdateVisualStates(EventArgs.Empty);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Input/AutoCompleteBox/System/Windows/Controls/RoutedPropertyChangingEventArgs.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Windows;\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Provides event data for various routed events that track property values\r\n    /// changing.  Typically the events denote a cancellable action.\r\n    /// </summary>\r\n    /// <typeparam name=\"T\">\r\n    /// The type of the value for the dependency property that is changing.\r\n    /// </typeparam>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public class RoutedPropertyChangingEventArgs<T> : RoutedEventArgs\r\n    {\r\n        /// <summary>\r\n        /// Gets the <see cref=\"T:System.Windows.DependencyProperty\" />\r\n        /// identifier for the property that is changing.\r\n        /// </summary>\r\n        /// <value>\r\n        /// The <see cref=\"T:System.Windows.DependencyProperty\" /> identifier\r\n        /// for the property that is changing.\r\n        /// </value>\r\n        public DependencyProperty Property { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Gets a value that reports the previous value of the changing\r\n        /// property.\r\n        /// </summary>\r\n        /// <value>\r\n        /// The previous value of the changing property.\r\n        /// </value>\r\n        public T OldValue { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value that reports the new value of the changing\r\n        /// property, assuming that the property change is not cancelled.\r\n        /// </summary>\r\n        /// <value>\r\n        /// The new value of the changing property.\r\n        /// </value>\r\n        public T NewValue { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether the property change that originated\r\n        /// the RoutedPropertyChanging event is cancellable.\r\n        /// </summary>\r\n        /// <value>\r\n        /// True if the property change is cancellable. false if the property\r\n        /// change is not cancellable.\r\n        /// </value>\r\n        public bool IsCancelable { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether the property change that\r\n        /// originated the RoutedPropertyChanging event should be cancelled.\r\n        /// </summary>\r\n        /// <value>\r\n        /// True to cancel the property change; this resets the property to\r\n        /// <see cref=\"P:System.Windows.Controls.RoutedPropertyChangingEventArgs`1.OldValue\" />.\r\n        /// false to not cancel the property change; the value changes to\r\n        /// <see cref=\"P:System.Windows.Controls.RoutedPropertyChangingEventArgs`1.NewValue\" />.\r\n        /// </value>\r\n        /// <exception cref=\"T:System.InvalidOperationException\">\r\n        /// Attempted to cancel in an instance where\r\n        /// <see cref=\"P:System.Windows.Controls.RoutedPropertyChangingEventArgs`1.IsCancelable\" />\r\n        /// is false.\r\n        /// </exception>\r\n        public bool Cancel\r\n        {\r\n            get { return _cancel; }\r\n            set\r\n            {\r\n                if (IsCancelable)\r\n                {\r\n                    _cancel = value;\r\n                }\r\n                else if (value)\r\n                {\r\n                    throw new InvalidOperationException(Properties.Resources.RoutedPropertyChangingEventArgs_CancelSet_InvalidOperation);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Private member variable for Cancel property.\r\n        /// </summary>\r\n        private bool _cancel;\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether internal value coercion is\r\n        /// acting on the property change that originated the\r\n        /// RoutedPropertyChanging event.\r\n        /// </summary>\r\n        /// <value>\r\n        /// True if coercion is active. false if coercion is not active.\r\n        /// </value>\r\n        /// <remarks>\r\n        /// This is a total hack to work around the class hierarchy for Value\r\n        /// coercion in NumericUpDown.\r\n        /// </remarks>\r\n        public bool InCoercion { get; set; }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the\r\n        /// <see cref=\"T:System.Windows.Controls.RoutedPropertyChangingEventArgs`1\" />\r\n        /// class.\r\n        /// </summary>\r\n        /// <param name=\"property\">\r\n        /// The <see cref=\"T:System.Windows.DependencyProperty\" /> identifier\r\n        /// for the property that is changing.\r\n        /// </param>\r\n        /// <param name=\"oldValue\">The previous value of the property.</param>\r\n        /// <param name=\"newValue\">\r\n        /// The new value of the property, assuming that the property change is\r\n        /// not cancelled.\r\n        /// </param>\r\n        /// <param name=\"isCancelable\">\r\n        /// True if the property change is cancellable by setting\r\n        /// <see cref=\"P:System.Windows.Controls.RoutedPropertyChangingEventArgs`1.Cancel\" />\r\n        /// to true in event handling. false if the property change is not\r\n        /// cancellable.\r\n        /// </param>\r\n        public RoutedPropertyChangingEventArgs(\r\n            DependencyProperty property,\r\n            T oldValue, \r\n            T newValue, \r\n            bool isCancelable)\r\n        {\r\n            Property = property;\r\n            OldValue = oldValue;\r\n            NewValue = newValue;\r\n            IsCancelable = isCancelable;\r\n            Cancel = false;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the\r\n        /// <see cref=\"T:System.Windows.Controls.RoutedPropertyChangingEventArgs`1\" />\r\n        /// class.\r\n        /// </summary>\r\n        /// <param name=\"property\">\r\n        /// The <see cref=\"T:System.Windows.DependencyProperty\" /> identifier\r\n        /// for the property that is changing.\r\n        /// </param>\r\n        /// <param name=\"oldValue\">The previous value of the property.</param>\r\n        /// <param name=\"newValue\">\r\n        /// The new value of the property, assuming that the property change is\r\n        /// not cancelled.\r\n        /// </param>\r\n        /// <param name=\"isCancelable\">\r\n        /// True if the property change is cancellable by setting\r\n        /// <see cref=\"P:System.Windows.Controls.RoutedPropertyChangingEventArgs`1.Cancel\" />\r\n        /// to true in event handling. false if the property change is not\r\n        /// cancellable.\r\n        /// </param>\r\n        /// <param name=\"routedEvent\">The routed event identifier for this instance.</param>\r\n        public RoutedPropertyChangingEventArgs(DependencyProperty property,\r\n            T oldValue, T newValue, bool isCancelable, RoutedEvent routedEvent)\r\n            : base(routedEvent)\r\n        {\r\n            Property = property;\r\n            OldValue = oldValue;\r\n            NewValue = newValue;\r\n            IsCancelable = isCancelable;\r\n            Cancel = false;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Input/AutoCompleteBox/System/Windows/Controls/RoutedPropertyChangingEventHandler.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Windows;\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Represents methods that handle various routed events that track property\r\n    /// values changing.  Typically the events denote a cancellable action.\r\n    /// </summary>\r\n    /// <typeparam name=\"T\">\r\n    /// The type of the value for the dependency property that is changing.\r\n    /// </typeparam>\r\n    /// <param name=\"sender\">\r\n    /// The object where the initiating property is changing.\r\n    /// </param>\r\n    /// <param name=\"e\">Event data for the event.</param>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    [System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Design\", \"CA1003:UseGenericEventHandlerInstances\", Justification = \"To match pattern of RoutedPropertyChangedEventHandler<T>\")]\r\n    public delegate void RoutedPropertyChangingEventHandler<T>(object sender, RoutedPropertyChangingEventArgs<T> e);\r\n}"
  },
  {
    "path": "WpfToolkit/Input/AutoCompleteBox/System/Windows/Controls/SelectorSelectionAdapter.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Automation.Peers;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Controls.Primitives;\r\nusing System.Windows.Input;\r\nusing Extensions;\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Represents the selection adapter contained in the drop-down portion of\r\n    /// an <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> control.\r\n    /// </summary>\r\n    /// <QualityBand>Stable</QualityBand>\r\n    public partial class SelectorSelectionAdapter : ISelectionAdapter\r\n    {\r\n        /// <summary>\r\n        /// The Selector instance.\r\n        /// </summary>\r\n        private Selector _selector;\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether the selection change event \r\n        /// should not be fired.\r\n        /// </summary>\r\n        private bool IgnoringSelectionChanged { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the underlying\r\n        /// <see cref=\"T:System.Windows.Controls.Primitives.Selector\" />\r\n        /// control.\r\n        /// </summary>\r\n        /// <value>The underlying\r\n        /// <see cref=\"T:System.Windows.Controls.Primitives.Selector\" />\r\n        /// control.</value>\r\n        public Selector SelectorControl\r\n        {\r\n            get { return _selector; }\r\n\r\n            set\r\n            {\r\n                if (_selector != null)\r\n                {\r\n                    _selector.SelectionChanged -= OnSelectionChanged;\r\n                    _selector.MouseLeftButtonUp -= OnSelectorMouseLeftButtonUp;\r\n                }\r\n\r\n                _selector = value;\r\n\r\n                if (_selector != null)\r\n                {\r\n                    _selector.SelectionChanged += OnSelectionChanged;\r\n                    _selector.MouseLeftButtonUp += OnSelectorMouseLeftButtonUp;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Occurs when the\r\n        /// <see cref=\"P:System.Windows.Controls.SelectorSelectionAdapter.SelectedItem\" />\r\n        /// property value changes.\r\n        /// </summary>\r\n        public event SelectionChangedEventHandler SelectionChanged;\r\n\r\n        /// <summary>\r\n        /// Occurs when an item is selected and is committed to the underlying\r\n        /// <see cref=\"T:System.Windows.Controls.Primitives.Selector\" />\r\n        /// control.\r\n        /// </summary>\r\n        public event RoutedEventHandler Commit;\r\n\r\n        /// <summary>\r\n        /// Occurs when a selection is canceled before it is committed.\r\n        /// </summary>\r\n        public event RoutedEventHandler Cancel;\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the\r\n        /// <see cref=\"T:System.Windows.Controls.SelectorSelectionAdapter\" />\r\n        /// class.\r\n        /// </summary>\r\n        public SelectorSelectionAdapter()\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the\r\n        /// <see cref=\"T:System.Windows.Controls.SelectorSelectionAdapter\" />\r\n        /// class with the specified\r\n        /// <see cref=\"T:System.Windows.Controls.Primitives.Selector\" />\r\n        /// control.\r\n        /// </summary>\r\n        /// <param name=\"selector\">The\r\n        /// <see cref=\"T:System.Windows.Controls.Primitives.Selector\" /> control\r\n        /// to wrap as a\r\n        /// <see cref=\"T:System.Windows.Controls.SelectorSelectionAdapter\" />.</param>\r\n        public SelectorSelectionAdapter(Selector selector)\r\n        {\r\n            SelectorControl = selector;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the selected item of the selection adapter.\r\n        /// </summary>\r\n        /// <value>The selected item of the underlying selection adapter.</value>\r\n        public object SelectedItem \r\n        {\r\n            get \r\n            { \r\n                return SelectorControl == null ? null : SelectorControl.SelectedItem; \r\n            }\r\n            \r\n            set\r\n            {\r\n                IgnoringSelectionChanged = true;\r\n                if (SelectorControl != null)\r\n                {\r\n                    SelectorControl.SelectedItem = value;\r\n                }\r\n                \r\n                // Attempt to reset the scroll viewer's position\r\n                if (value == null)\r\n                {\r\n                    ResetScrollViewer();\r\n                }\r\n\r\n                IgnoringSelectionChanged = false;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a collection that is used to generate the content of\r\n        /// the selection adapter.\r\n        /// </summary>\r\n        /// <value>The collection used to generate content for the selection\r\n        /// adapter.</value>\r\n        public IEnumerable ItemsSource\r\n        {\r\n            get\r\n            {\r\n                return SelectorControl == null ? null : SelectorControl.ItemsSource; \r\n            }\r\n            set \r\n            {\r\n                if (SelectorControl != null)\r\n                {\r\n                    SelectorControl.ItemsSource = value;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// If the control contains a ScrollViewer, this will reset the viewer \r\n        /// to be scrolled to the top.\r\n        /// </summary>\r\n        private void ResetScrollViewer()\r\n        {\r\n            if (SelectorControl != null)\r\n            {\r\n                ScrollViewer sv = SelectorControl.GetLogicalChildrenBreadthFirst().OfType<ScrollViewer>().FirstOrDefault();\r\n                if (sv != null)\r\n                {\r\n                    sv.ScrollToTop();\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the mouse left button up event on the selector control.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void OnSelectorMouseLeftButtonUp(object sender, MouseButtonEventArgs e)\r\n        {\r\n            OnCommit();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the SelectionChanged event on the Selector control.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The selection changed event data.</param>\r\n        private void OnSelectionChanged(object sender, SelectionChangedEventArgs e)\r\n        {\r\n            if (IgnoringSelectionChanged)\r\n            {\r\n                return;\r\n            }\r\n\r\n            SelectionChangedEventHandler handler = SelectionChanged;\r\n            if (handler != null)\r\n            {\r\n                handler(sender, e);\r\n                SelectorControl.ScrollToCenterOfView(SelectorControl.SelectedItem);\r\n\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Increments the\r\n        /// <see cref=\"P:System.Windows.Controls.Primitives.Selector.SelectedIndex\" />\r\n        /// property of the underlying\r\n        /// <see cref=\"T:System.Windows.Controls.Primitives.Selector\" />\r\n        /// control.\r\n        /// </summary>\r\n        protected void SelectedIndexIncrement()\r\n        {\r\n            if (SelectorControl != null)\r\n            {\r\n                SelectorControl.SelectedIndex = SelectorControl.SelectedIndex + 1 >= SelectorControl.Items.Count ? -1 : SelectorControl.SelectedIndex + 1;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Decrements the\r\n        /// <see cref=\"P:System.Windows.Controls.Primitives.Selector.SelectedIndex\" />\r\n        /// property of the underlying\r\n        /// <see cref=\"T:System.Windows.Controls.Primitives.Selector\" />\r\n        /// control.\r\n        /// </summary>\r\n        protected void SelectedIndexDecrement()\r\n        {\r\n            if (SelectorControl != null)\r\n            {\r\n                int index = SelectorControl.SelectedIndex;\r\n                if (index >= 0)\r\n                {\r\n                    SelectorControl.SelectedIndex--;\r\n                }\r\n                else if (index == -1)\r\n                {\r\n                    SelectorControl.SelectedIndex = SelectorControl.Items.Count - 1;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Provides handling for the\r\n        /// <see cref=\"E:System.Windows.UIElement.KeyDown\" /> event that occurs\r\n        /// when a key is pressed while the drop-down portion of the\r\n        /// <see cref=\"T:System.Windows.Controls.AutoCompleteBox\" /> has focus.\r\n        /// </summary>\r\n        /// <param name=\"e\">A <see cref=\"T:System.Windows.Input.KeyEventArgs\" />\r\n        /// that contains data about the\r\n        /// <see cref=\"E:System.Windows.UIElement.KeyDown\" /> event.</param>\r\n        public void HandleKeyDown(KeyEventArgs e)\r\n        {\r\n            switch (e.Key)\r\n            {\r\n                case Key.Enter:\r\n                    OnCommit();\r\n                    e.Handled = true;\r\n                    break;\r\n\r\n                case Key.Up:\r\n                    SelectedIndexDecrement();\r\n                    e.Handled = true;\r\n                    break;\r\n\r\n                case Key.Down:\r\n                    if ((ModifierKeys.Alt & Keyboard.Modifiers) == ModifierKeys.None)\r\n                    {\r\n                        SelectedIndexIncrement();\r\n                        e.Handled = true;\r\n                    }\r\n                    break;\r\n\r\n                case Key.Escape:\r\n                    OnCancel();\r\n                    e.Handled = true;\r\n                    break;\r\n\r\n                default:\r\n                    break;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Raises the\r\n        /// <see cref=\"E:System.Windows.Controls.SelectorSelectionAdapter.Commit\" />\r\n        /// event.\r\n        /// </summary>\r\n        protected virtual void OnCommit()\r\n        {\r\n            OnCommit(this, new RoutedEventArgs());\r\n        }\r\n\r\n        /// <summary>\r\n        /// Fires the Commit event.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void OnCommit(object sender, RoutedEventArgs e)\r\n        {\r\n            RoutedEventHandler handler = Commit;\r\n            if (handler != null)\r\n            {\r\n                handler(sender, e);\r\n            }\r\n\r\n            AfterAdapterAction();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Raises the\r\n        /// <see cref=\"E:System.Windows.Controls.SelectorSelectionAdapter.Cancel\" />\r\n        /// event.\r\n        /// </summary>\r\n        protected virtual void OnCancel()\r\n        {\r\n            OnCancel(this, new RoutedEventArgs());\r\n        }\r\n\r\n        /// <summary>\r\n        /// Fires the Cancel event.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void OnCancel(object sender, RoutedEventArgs e)\r\n        {\r\n            RoutedEventHandler handler = Cancel;\r\n            if (handler != null)\r\n            {\r\n                handler(sender, e);\r\n            }\r\n\r\n            AfterAdapterAction();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Change the selection after the actions are complete.\r\n        /// </summary>\r\n        private void AfterAdapterAction()\r\n        {\r\n            IgnoringSelectionChanged = true;\r\n            if (SelectorControl != null)\r\n            {\r\n                SelectorControl.SelectedItem = null;\r\n                SelectorControl.SelectedIndex = -1;\r\n            }\r\n            IgnoringSelectionChanged = false;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns an automation peer for the underlying\r\n        /// <see cref=\"T:System.Windows.Controls.Primitives.Selector\" />\r\n        /// control, for use by the Silverlight automation infrastructure.\r\n        /// </summary>\r\n        /// <returns>An automation peer for use by the Silverlight automation\r\n        /// infrastructure.</returns>\r\n        public AutomationPeer CreateAutomationPeer()\r\n        {\r\n            return _selector != null ? FrameworkElementAutomationPeer.CreatePeerForElement(_selector) : null;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Input/AutoCompleteBox/System/Windows/Controls/ValueByStringHelper.cs",
    "content": "﻿using System.Linq;\r\nusing System.Reflection;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Text;\r\nusing System.Windows.Data;\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    public class ValueByStringHelper\r\n    {\r\n        public static string GetStringValue(string path, Binding binding, object @object)\r\n        {\r\n            // see : https://docs.microsoft.com/en-us/dotnet/framework/wpf/advanced/propertypath-xaml-syntax\r\n\r\n            if (@object == null)\r\n                return null;\r\n            var _sb = new StringBuilder(20);\r\n            var retVal = @object;\r\n            PropertyInfo indexerP = null;\r\n            ParameterInfo[] indexers = null;\r\n            object[] indexerValues = null;\r\n            int currentIndexer = 0;\r\n\r\n            for (int n = 0; n < path.Length; n++)\r\n            {\r\n                var ch = path[n];\r\n                if (ch == '.')\r\n                {\r\n                    if (_sb.Length > 0)\r\n                    {\r\n                        var prp = retVal.GetType().GetProperty(_sb.ToString());\r\n                        if (prp == null)\r\n                            return null;\r\n                        retVal = prp.GetValue(retVal, null);\r\n                        _sb.Clear();\r\n                    }\r\n                }\r\n                else if (ch == '[')\r\n                {\r\n                    var prp = retVal.GetType().GetProperty(_sb.ToString());\r\n                    if (prp == null)\r\n                        return null;\r\n                    retVal = prp.GetValue(retVal, null);\r\n                    _sb.Clear();\r\n                    indexerP = retVal.GetType().GetProperties().FirstOrDefault(x => x.GetIndexParameters().Any());\r\n                    if (indexerP == null)\r\n                        return null;\r\n                    indexers = indexerP.GetIndexParameters();\r\n                    indexerValues = new object[indexers.Length];\r\n                }\r\n                else if (ch == ',')\r\n                {\r\n                    indexerValues[currentIndexer] = Convert.ChangeType(_sb.ToString(), indexers[currentIndexer].ParameterType);\r\n                    currentIndexer++;\r\n                    _sb.Clear();\r\n                }\r\n                else if (ch == ']')\r\n                {\r\n                    indexerValues[currentIndexer] = Convert.ChangeType(_sb.ToString(), indexers[currentIndexer].ParameterType);\r\n                    _sb.Clear();\r\n\r\n                    retVal = indexerP.GetValue(retVal, indexerValues);\r\n                    if (retVal == null)\r\n                        return null;\r\n\r\n                    currentIndexer = 0;\r\n                    indexers = null;\r\n                    indexerValues = null;\r\n                }\r\n                else\r\n                {\r\n                    _sb.Append(ch);\r\n                }\r\n            }\r\n\r\n            if (_sb.Length > 0)\r\n            {\r\n                var prp = retVal.GetType().GetProperty(_sb.ToString());\r\n                if (prp == null)\r\n                    return null;\r\n                retVal = prp.GetValue(retVal, null);\r\n            }\r\n\r\n            if (binding != null)\r\n            {\r\n                if (binding.Converter != null)\r\n                {\r\n                    retVal = binding.Converter.Convert(retVal, null, binding.ConverterParameter, binding.ConverterCulture);\r\n                }\r\n\r\n                var formattableRetVal = retVal as IFormattable;\r\n                if (formattableRetVal != null)\r\n                {\r\n                    return formattableRetVal.ToString(binding.StringFormat, binding.ConverterCulture);\r\n                }\r\n\r\n                var convertibleRetVal = retVal as IConvertible;\r\n                if (convertibleRetVal != null)\r\n                {\r\n                    return convertibleRetVal.ToString(binding.ConverterCulture);\r\n                }\r\n            }\r\n\r\n            return retVal != null ? retVal.ToString() : null;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Input/DotNetProjects.Input.Toolkit.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\r\n    <PropertyGroup>\r\n        <TargetFrameworks>net5.0-windows;net6.0-windows;net4</TargetFrameworks>\r\n        <UseWPF>true</UseWPF>\r\n        <RootNamespace>System.Windows.Controls</RootNamespace>\r\n        <Description>WPF Toolkit Input</Description>\r\n        <SignAssembly>true</SignAssembly>\r\n        <AssemblyOriginatorKeyFile>DotNetProjects.snk</AssemblyOriginatorKeyFile>\r\n        <GeneratePackageOnBuild>true</GeneratePackageOnBuild>\r\n        <PackageId>DotNetProjects.WpfToolkit.Input</PackageId>\r\n        <Authors>DotNetProjects</Authors>\r\n        <Company>DotNetProjects</Company>\r\n        <Product>DotNetProjects.WPF Toolkit</Product>\r\n        <Copyright>2021 DotNetProjects</Copyright>\r\n        <Version>1.0.0</Version>\r\n        <AssemblyVersion>1.0.0.0</AssemblyVersion>\r\n        <FileVersion>1.0.0.0</FileVersion>\r\n        <PackageLicenseExpression>MS-PL</PackageLicenseExpression>\r\n    </PropertyGroup>\r\n    <ItemGroup>\r\n        <Compile Include=\"..\\Common\\System\\Windows\\Controls\\Extensions.cs\">\r\n            <Link>Common\\Extensions.cs</Link>\r\n        </Compile>\r\n        <Compile Include=\"..\\Common\\System\\Windows\\Controls\\InteractionHelper.cs\">\r\n            <Link>Common\\InteractionHelper.cs</Link>\r\n        </Compile>\r\n        <Compile Include=\"..\\Common\\System\\Windows\\Controls\\ItemsControlHelper.cs\">\r\n            <Link>Common\\ItemsControlHelper.cs</Link>\r\n        </Compile>\r\n        <Compile Include=\"..\\Common\\System\\Windows\\Controls\\IUpdateVisualState.cs\">\r\n            <Link>Common\\IUpdateVisualState.cs</Link>\r\n        </Compile>\r\n        <Compile Include=\"..\\Common\\System\\Windows\\Controls\\VisualStates.cs\">\r\n            <Link>Common\\VisualStates.cs</Link>\r\n        </Compile>\r\n        <Compile Include=\"..\\Common\\System\\Windows\\Controls\\VisualTreeExtensions.cs\">\r\n            <Link>Common\\VisualTreeExtensions.cs</Link>\r\n        </Compile>\r\n        <Compile Include=\"..\\Common\\System\\Windows\\Controls\\WeakEventListener.cs\">\r\n            <Link>Common\\WeakEventListener.cs</Link>\r\n        </Compile>\r\n    </ItemGroup>\r\n    <ItemGroup>\r\n        <EmbeddedResource Include=\"System.Windows.Controls\\**\\*.png\" />\r\n    </ItemGroup>\r\n</Project>\r\n"
  },
  {
    "path": "WpfToolkit/Input/DotNetProjects.Input.Toolkit.csproj.DotSettings",
    "content": "﻿<wpf:ResourceDictionary xml:space=\"preserve\" xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" xmlns:s=\"clr-namespace:System;assembly=mscorlib\" xmlns:ss=\"urn:shemas-jetbrains-com:settings-storage-xaml\" xmlns:wpf=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\">\n\t<s:Boolean x:Key=\"/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=autocompletebox_005Csystem_005Cwindows/@EntryIndexedValue\">True</s:Boolean>\n\t<s:Boolean x:Key=\"/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=autocompletebox_005Csystem_005Cwindows_005Cautomation/@EntryIndexedValue\">True</s:Boolean>\n\t<s:Boolean x:Key=\"/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=autocompletebox_005Csystem_005Cwindows_005Ccontrols/@EntryIndexedValue\">True</s:Boolean></wpf:ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/Input/GlobalSuppressions.cs",
    "content": "// (c) Copyright Microsoft Corporation.\r\n// This source is subject to [###LICENSE_NAME###].\r\n// Please see [###LICENSE_LINK###] for details.\r\n// All other rights reserved.\r\n\r\nusing System.Diagnostics.CodeAnalysis;\r\n\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1020:AvoidNamespacesWithFewTypes\", Scope = \"namespace\", Target = \"System.Windows.Automation.Peers\", Justification = \"Official automation peers namespace.\")]\r\n\r\n// UpDownBase does not exist on WPF\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.UpDownBase\", Justification = \"UpDownBase does not exist on WPF.\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.UpDownBase`1\", Justification = \"UpDownBase does not exist on WPF.\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.UpDownParseErrorEventArgs\", Justification = \"UpDownBase does not exist on WPF.\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Automation.Peers.UpDownBaseAutomationPeer`1\", Justification = \"UpDownBase does not exist on WPF.\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.UpDownParsingEventArgs`1\")]\r\n\r\n// Spinner does not exist on WPF\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.Spinner\", Justification = \"NumericUpDown does not exist on WPF.\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.SpinDirection\", Justification = \"NumericUpDown does not exist on WPF.\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.SpinEventArgs\", Justification = \"NumericUpDown does not exist on WPF.\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.ButtonSpinner\", Justification = \"NumericUpDown does not exist on WPF.\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.ValidSpinDirections\", Justification = \"ValidSpinDirections does not exist on WPF.\")]\r\n\r\n// NumericUpDown does not exist on WPF\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Automation.Peers.NumericUpDownAutomationPeer\", Justification = \"Spinner does not exist on WPF.\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.NumericUpDown\", Justification = \"Spinner does not exist on WPF.\")]\r\n\r\n// time input controls do not exist in wpf\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.Picker\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.PopupButtonMode\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.TimeGlobalizationInfo\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.TimeParser\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.TimeParserCollection\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.TimePicker\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.TimePickerFormat\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.TimeUpDown\")]\r\n\r\n// DomainUpDown does not exist on WPF\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Automation.Peers.DomainUpDownAutomationPeer\", Justification = \"DomainUpDown does not exist on WPF.\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.DomainUpDown\", Justification = \"DomainUpDown does not exist on WPF.\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.InvalidInputAction\", Justification = \"DomainUpDown does not exist on WPF.\")]\r\n\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"System.Windows.Controls.InteractionHelper.#AllowKeyDown(System.Windows.Input.KeyEventArgs)\", Justification = \"Complete implementation used in other assemblies.\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"System.Windows.Controls.InteractionHelper.#AllowKeyUp(System.Windows.Input.KeyEventArgs)\", Justification = \"Complete implementation used in other assemblies.\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"System.Windows.Controls.InteractionHelper.#AllowMouseLeftButtonDown(System.Windows.Input.MouseButtonEventArgs)\", Justification = \"Complete implementation used in other assemblies.\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"System.Windows.Controls.InteractionHelper.#ClickCount\", Justification = \"Complete implementation used in other assemblies.\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"System.Windows.Controls.InteractionHelper.#LastClickPosition\", Justification = \"Complete implementation used in other assemblies.\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"System.Windows.Controls.InteractionHelper.#LastClickTime\", Justification = \"Complete implementation used in other assemblies.\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"System.Windows.Controls.InteractionHelper.#OnMouseLeftButtonDownBase()\", Justification = \"Complete implementation used in other assemblies.\")]\r\n\r\n// TypeConverter linked in\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"System.Windows.Controls.TypeConverters.#CanConvertFrom`1(System.Type)\", Justification = \"Linked in file.\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"System.Windows.Controls.TypeConverters.#ConvertFrom`1(System.ComponentModel.TypeConverter,System.Object)\", Justification = \"Linked in file.\")]\r\n\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1020:AvoidNamespacesWithFewTypes\", Scope = \"namespace\", Target = \"System.Windows.Controls.Primitives\", Justification = \"Expecting more types.\")]\r\n[assembly: SuppressMessage(\"Layout\", \"SWC3000:CanvasDoesNotRespectLayout\", MessageId = \"ControlTemplate<TargetType=inputToolkit:TimeUpDown>\", Justification = \"Canvas is used because of it does not interfere with layout considerations.\")]\r\n\r\n[assembly: SuppressMessage(\"General\", \"SWC1001:XmlDocumentationCommentShouldBeSpelledCorrectly\", MessageId = \"hh\", Justification = \"Indicates hours in a DateTimeFormat.\")]\r\n[assembly: SuppressMessage(\"General\", \"SWC1001:XmlDocumentationCommentShouldBeSpelledCorrectly\", MessageId = \"ss\", Justification = \"Indicates seconds in a DateTimeFormat.\")]\r\n[assembly: SuppressMessage(\"General\", \"SWC1001:XmlDocumentationCommentShouldBeSpelledCorrectly\", MessageId = \"Headered\")]\r\n[assembly: SuppressMessage(\"General\", \"SWC1001:XmlDocumentationCommentShouldBeSpelledCorrectly\", MessageId = \"Silverlight\")]\r\n\r\n"
  },
  {
    "path": "WpfToolkit/Input/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Windows;\r\n\r\n// In order to begin building localizable applications, set \r\n// <UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file\r\n// inside a <PropertyGroup>.  For example, if you are using US english\r\n// in your source files, set the <UICulture> to en-US.  Then uncomment\r\n// the NeutralResourceLanguage attribute below.  Update the \"en-US\" in\r\n// the line below to match the UICulture setting in the project file.\r\n//[assembly: NeutralResourcesLanguage(\"en-US\")]\r\n\r\n// WPF-only settings\r\n[assembly: ThemeInfo(\r\n    ResourceDictionaryLocation.None,\r\n    ResourceDictionaryLocation.SourceAssembly)]\r\n"
  },
  {
    "path": "WpfToolkit/Input/Properties/Resources.Designer.cs",
    "content": "﻿//------------------------------------------------------------------------------\r\n// <auto-generated>\r\n//     This code was generated by a tool.\r\n//     Runtime Version:4.0.30319.18213\r\n//\r\n//     Changes to this file may cause incorrect behavior and will be lost if\r\n//     the code is regenerated.\r\n// </auto-generated>\r\n//------------------------------------------------------------------------------\r\n\r\nnamespace System.Windows.Controls.Properties {\r\n    using System;\r\n    \r\n    \r\n    /// <summary>\r\n    ///   A strongly-typed resource class, for looking up localized strings, etc.\r\n    /// </summary>\r\n    // This class was auto-generated by the StronglyTypedResourceBuilder\r\n    // class via a tool like ResGen or Visual Studio.\r\n    // To add or remove a member, edit your .ResX file then rerun ResGen\r\n    // with the /str option, or rebuild your VS project.\r\n    [global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Resources.Tools.StronglyTypedResourceBuilder\", \"4.0.0.0\")]\r\n    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r\n    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\r\n    internal class Resources {\r\n        \r\n        private static global::System.Resources.ResourceManager resourceMan;\r\n        \r\n        private static global::System.Globalization.CultureInfo resourceCulture;\r\n        \r\n        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\")]\r\n        internal Resources() {\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Returns the cached ResourceManager instance used by this class.\r\n        /// </summary>\r\n        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\r\n        internal static global::System.Resources.ResourceManager ResourceManager {\r\n            get {\r\n                if (object.ReferenceEquals(resourceMan, null)) {\r\n                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager(\"System.Windows.Controls.Properties.Resources\", typeof(Resources).Assembly);\r\n                    resourceMan = temp;\r\n                }\r\n                return resourceMan;\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Overrides the current thread's CurrentUICulture property for all\r\n        ///   resource lookups using this strongly typed resource class.\r\n        /// </summary>\r\n        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\r\n        internal static global::System.Globalization.CultureInfo Culture {\r\n            get {\r\n                return resourceCulture;\r\n            }\r\n            set {\r\n                resourceCulture = value;\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Invalid FilterMode enumeration value. The value must be one of the defined AutoCompleteFilterMode values to be accepted..\r\n        /// </summary>\r\n        internal static string AutoComplete_OnFilterModePropertyChanged_InvalidValue {\r\n            get {\r\n                return ResourceManager.GetString(\"AutoComplete_OnFilterModePropertyChanged_InvalidValue\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Invalid maximum drop down height value &apos;{0}&apos;. The value must be greater than or equal to zero..\r\n        /// </summary>\r\n        internal static string AutoComplete_OnMaxDropDownHeightPropertyChanged_InvalidValue {\r\n            get {\r\n                return ResourceManager.GetString(\"AutoComplete_OnMaxDropDownHeightPropertyChanged_InvalidValue\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Invalid MinimumPopulateDelay value &apos;{0}&apos;. The value must be greater than or equal to zero..\r\n        /// </summary>\r\n        internal static string AutoComplete_OnMinimumPopulateDelayPropertyChanged_InvalidValue {\r\n            get {\r\n                return ResourceManager.GetString(\"AutoComplete_OnMinimumPopulateDelayPropertyChanged_InvalidValue\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Cannot set read-only property SearchText..\r\n        /// </summary>\r\n        internal static string AutoComplete_OnSearchTextPropertyChanged_InvalidWrite {\r\n            get {\r\n                return ResourceManager.GetString(\"AutoComplete_OnSearchTextPropertyChanged_InvalidWrite\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Cannot perform operation..\r\n        /// </summary>\r\n        internal static string Automation_OperationCannotBePerformed {\r\n            get {\r\n                return ResourceManager.GetString(\"Automation_OperationCannotBePerformed\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Invalid index value &apos;{0}&apos;.\r\n        /// </summary>\r\n        internal static string DomainUpDown_CurrentIndex_InvalidValue {\r\n            get {\r\n                return ResourceManager.GetString(\"DomainUpDown_CurrentIndex_InvalidValue\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Invalid InvalidInputAction value &apos;{0}&apos;.\r\n        /// </summary>\r\n        internal static string DomainUpDown_InvalidInputAction_InvalidValue {\r\n            get {\r\n                return ResourceManager.GetString(\"DomainUpDown_InvalidInputAction_InvalidValue\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Invalid ExpandDirection value &apos;{0}&apos;..\r\n        /// </summary>\r\n        internal static string Expander_OnExpandDirectionPropertyChanged_InvalidValue {\r\n            get {\r\n                return ResourceManager.GetString(\"Expander_OnExpandDirectionPropertyChanged_InvalidValue\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Invalid attempt to change read-only property &quot;{0}.&quot;.\r\n        /// </summary>\r\n        internal static string InvalidAttemptToChangeReadOnlyProperty {\r\n            get {\r\n                return ResourceManager.GetString(\"InvalidAttemptToChangeReadOnlyProperty\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Cannot set read-only property TimeItemsSelection..\r\n        /// </summary>\r\n        internal static string ListTimePickerPopup_TimeItemsSelection_ReadOnly {\r\n            get {\r\n                return ResourceManager.GetString(\"ListTimePickerPopup_TimeItemsSelection_ReadOnly\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Invalid double value &apos;{0}&apos;: valid value is of double type and within decimal range..\r\n        /// </summary>\r\n        internal static string NumericUpDown_EnsureValidDoubleValue_InvalidDoubleValue {\r\n            get {\r\n                return ResourceManager.GetString(\"NumericUpDown_EnsureValidDoubleValue_InvalidDoubleValue\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Invalid Increment value &apos;{0}&apos;: valid value is of double type, within decimal range, and positive.\r\n        /// </summary>\r\n        internal static string NumericUpDown_EnsureValidIncrementValue_InvalidValue {\r\n            get {\r\n                return ResourceManager.GetString(\"NumericUpDown_EnsureValidIncrementValue_InvalidValue\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Invalid DecimalPlaces value &apos;{0}&apos;: valid value is of int type and within 0 and 15 inclusive..\r\n        /// </summary>\r\n        internal static string NumericUpDown_OnDecimalPlacesPropertyChanged_InvalidValue {\r\n            get {\r\n                return ResourceManager.GetString(\"NumericUpDown_OnDecimalPlacesPropertyChanged_InvalidValue\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to The collection is currently ReadOnly and should not be modified..\r\n        /// </summary>\r\n        internal static string ObservableObjectCollection_ReadOnly {\r\n            get {\r\n                return ResourceManager.GetString(\"ObservableObjectCollection_ReadOnly\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Invalid maximum drop down height value &apos;{0}&apos;. The value must be greater than or equal to zero..\r\n        /// </summary>\r\n        internal static string Picker_OnMaxDropDownHeightPropertyChanged_InvalidValue {\r\n            get {\r\n                return ResourceManager.GetString(\"Picker_OnMaxDropDownHeightPropertyChanged_InvalidValue\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Invalid PopupButtonMode value &apos;{0}&apos;..\r\n        /// </summary>\r\n        internal static string Picker_PopupButtonModeNotValid {\r\n            get {\r\n                return ResourceManager.GetString(\"Picker_PopupButtonModeNotValid\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Value must be larger than or equal to 0..\r\n        /// </summary>\r\n        internal static string Rating_SetItemCount_ItemCountMustBeLargerThanOrEqualToZero {\r\n            get {\r\n                return ResourceManager.GetString(\"Rating_SetItemCount_ItemCountMustBeLargerThanOrEqualToZero\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Rating.\r\n        /// </summary>\r\n        internal static string RatingAutomationPeer_GetLocalizedControlTypeCore {\r\n            get {\r\n                return ResourceManager.GetString(\"RatingAutomationPeer_GetLocalizedControlTypeCore\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Value must be null or a number between 0 and 1..\r\n        /// </summary>\r\n        internal static string RatingAutomationPeer_SetValue {\r\n            get {\r\n                return ResourceManager.GetString(\"RatingAutomationPeer_SetValue\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Star.\r\n        /// </summary>\r\n        internal static string RatingItemAutomationPeer_GetLocalizedControlTypeCore {\r\n            get {\r\n                return ResourceManager.GetString(\"RatingItemAutomationPeer_GetLocalizedControlTypeCore\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to The RoutedPropertyChangingEvent cannot be canceled..\r\n        /// </summary>\r\n        internal static string RoutedPropertyChangingEventArgs_CancelSet_InvalidOperation {\r\n            get {\r\n                return ResourceManager.GetString(\"RoutedPropertyChangingEventArgs_CancelSet_InvalidOperation\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Spin action is not valid at this moment..\r\n        /// </summary>\r\n        internal static string Spinner_SpinNotValid {\r\n            get {\r\n                return ResourceManager.GetString(\"Spinner_SpinNotValid\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Invalid PopupMinutesInterval &apos;{0}&apos;. The interval can be set to 0 (no interval) to and including 59..\r\n        /// </summary>\r\n        internal static string TimeInput_PopupMinutesInterval_InvalidValue {\r\n            get {\r\n                return ResourceManager.GetString(\"TimeInput_PopupMinutesInterval_InvalidValue\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Invalid PopupSecondsInterval &apos;{0}&apos;.The interval can be set to 0 (no interval) to and including 59..\r\n        /// </summary>\r\n        internal static string TimeInput_PopupSecondsInterval_InvalidValue {\r\n            get {\r\n                return ResourceManager.GetString(\"TimeInput_PopupSecondsInterval_InvalidValue\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Cannot set the PopupProperty in a style. Please use PopupTemplate..\r\n        /// </summary>\r\n        internal static string TimePicker_PopupSetInStyle {\r\n            get {\r\n                return ResourceManager.GetString(\"TimePicker_PopupSetInStyle\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Invalid PopupTimeSelectionMode for this popup, value &apos;{0}&apos;..\r\n        /// </summary>\r\n        internal static string TimePicker_PopupTimeSelectionModeNotValid {\r\n            get {\r\n                return ResourceManager.GetString(\"TimePicker_PopupTimeSelectionModeNotValid\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Cannot set read-only property TimeHintContent..\r\n        /// </summary>\r\n        internal static string TimeUpDown_OnTimeHintContentChanged {\r\n            get {\r\n                return ResourceManager.GetString(\"TimeUpDown_OnTimeHintContentChanged\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to &apos;{0}&apos; is unable to convert &apos;{1}&apos; to &apos;{2}&apos;..\r\n        /// </summary>\r\n        internal static string TypeConverters_Convert_CannotConvert {\r\n            get {\r\n                return ResourceManager.GetString(\"TypeConverters_Convert_CannotConvert\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to &apos;{0}&apos; cannot convert from &apos;{1}&apos;..\r\n        /// </summary>\r\n        internal static string TypeConverters_ConvertFrom_CannotConvertFromType {\r\n            get {\r\n                return ResourceManager.GetString(\"TypeConverters_ConvertFrom_CannotConvertFromType\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Cannot parse text &apos;{0}&apos;.\r\n        /// </summary>\r\n        internal static string UpDown_ParseException {\r\n            get {\r\n                return ResourceManager.GetString(\"UpDown_ParseException\", resourceCulture);\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Input/Properties/Resources.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n  <!-- \r\n    Microsoft ResX Schema \r\n    \r\n    Version 2.0\r\n    \r\n    The primary goals of this format is to allow a simple XML format \r\n    that is mostly human readable. The generation and parsing of the \r\n    various data types are done through the TypeConverter classes \r\n    associated with the data types.\r\n    \r\n    Example:\r\n    \r\n    ... ado.net/XML headers & schema ...\r\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\r\n    <resheader name=\"version\">2.0</resheader>\r\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\r\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\r\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\r\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\r\n    </data>\r\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\r\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r\n        <comment>This is a comment</comment>\r\n    </data>\r\n                \r\n    There are any number of \"resheader\" rows that contain simple \r\n    name/value pairs.\r\n    \r\n    Each data row contains a name, and value. The row also contains a \r\n    type or mimetype. Type corresponds to a .NET class that support \r\n    text/value conversion through the TypeConverter architecture. \r\n    Classes that don't support this are serialized and stored with the \r\n    mimetype set.\r\n    \r\n    The mimetype is used for serialized objects, and tells the \r\n    ResXResourceReader how to depersist the object. This is currently not \r\n    extensible. For a given mimetype the value must be set accordingly:\r\n    \r\n    Note - application/x-microsoft.net.object.binary.base64 is the format \r\n    that the ResXResourceWriter will generate, however the reader can \r\n    read any of the formats listed below.\r\n    \r\n    mimetype: application/x-microsoft.net.object.binary.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r\n            : and then encoded with base64 encoding.\r\n    \r\n    mimetype: application/x-microsoft.net.object.soap.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r\n            : and then encoded with base64 encoding.\r\n\r\n    mimetype: application/x-microsoft.net.object.bytearray.base64\r\n    value   : The object must be serialized into a byte array \r\n            : using a System.ComponentModel.TypeConverter\r\n            : and then encoded with base64 encoding.\r\n    -->\r\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\r\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\r\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\r\n      <xsd:complexType>\r\n        <xsd:choice maxOccurs=\"unbounded\">\r\n          <xsd:element name=\"metadata\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"assembly\">\r\n            <xsd:complexType>\r\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"data\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"resheader\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n        </xsd:choice>\r\n      </xsd:complexType>\r\n    </xsd:element>\r\n  </xsd:schema>\r\n  <resheader name=\"resmimetype\">\r\n    <value>text/microsoft-resx</value>\r\n  </resheader>\r\n  <resheader name=\"version\">\r\n    <value>2.0</value>\r\n  </resheader>\r\n  <resheader name=\"reader\">\r\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <resheader name=\"writer\">\r\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <data name=\"Automation_OperationCannotBePerformed\" xml:space=\"preserve\">\r\n    <value>Cannot perform operation.</value>\r\n    <comment>Exception thrown by automation peers.</comment>\r\n  </data>\r\n  <data name=\"DomainUpDown_CurrentIndex_InvalidValue\" xml:space=\"preserve\">\r\n    <value>Invalid index value '{0}'</value>\r\n    <comment>Exception thrown when the index is not within the collection.</comment>\r\n  </data>\r\n  <data name=\"DomainUpDown_InvalidInputAction_InvalidValue\" xml:space=\"preserve\">\r\n    <value>Invalid InvalidInputAction value '{0}'</value>\r\n    <comment>Exception thrown when the InvalidInputAction property is provided an invalid value.</comment>\r\n  </data>\r\n  <data name=\"Expander_OnExpandDirectionPropertyChanged_InvalidValue\" xml:space=\"preserve\">\r\n    <value>Invalid ExpandDirection value '{0}'.</value>\r\n    <comment>Exception thrown when the ExpandDirection property is provided an invalid value.</comment>\r\n  </data>\r\n  <data name=\"ListTimePickerPopup_TimeItemsSelection_ReadOnly\" xml:space=\"preserve\">\r\n    <value>Cannot set read-only property TimeItemsSelection.</value>\r\n    <comment>Exception thrown when a TimeItemsSelection is being set.</comment>\r\n  </data>\r\n  <data name=\"InvalidAttemptToChangeReadOnlyProperty\" xml:space=\"preserve\">\r\n    <value>Invalid attempt to change read-only property \"{0}.\"</value>\r\n    <comment>Exception thrown when a read-only property is changed.</comment>\r\n  </data>\r\n  <data name=\"NumericUpDown_EnsureValidDoubleValue_InvalidDoubleValue\" xml:space=\"preserve\">\r\n    <value>Invalid double value '{0}': valid value is of double type and within decimal range.</value>\r\n    <comment>Exception thrown when dependency properties are provided an value that's not a valid double value or not in the decimal range.</comment>\r\n  </data>\r\n  <data name=\"NumericUpDown_EnsureValidIncrementValue_InvalidValue\" xml:space=\"preserve\">\r\n    <value>Invalid Increment value '{0}': valid value is of double type, within decimal range, and positive</value>\r\n    <comment>Exception thrown when the Increment property is provided an value that's not a double value, or not in decimal range, or is negative or zero.</comment>\r\n  </data>\r\n  <data name=\"NumericUpDown_OnDecimalPlacesPropertyChanged_InvalidValue\" xml:space=\"preserve\">\r\n    <value>Invalid DecimalPlaces value '{0}': valid value is of int type and within 0 and 15 inclusive.</value>\r\n    <comment>Exception thrown when the DecimalPlaces property is provided an value not in the range of 0 and 15 inclusive.</comment>\r\n  </data>\r\n  <data name=\"ObservableObjectCollection_ReadOnly\" xml:space=\"preserve\">\r\n    <value>The collection is currently ReadOnly and should not be modified.</value>\r\n    <comment>Exception thrown when the collection is readonly and was modified.</comment>\r\n  </data>\r\n  <data name=\"Picker_OnMaxDropDownHeightPropertyChanged_InvalidValue\" xml:space=\"preserve\">\r\n    <value>Invalid maximum drop down height value '{0}'. The value must be greater than or equal to zero.</value>\r\n    <comment>Exception thrown when the MaxDropDownHeight dependency property is seto to a value that is negative.</comment>\r\n  </data>\r\n  <data name=\"Picker_PopupButtonModeNotValid\" xml:space=\"preserve\">\r\n    <value>Invalid PopupButtonMode value '{0}'.</value>\r\n    <comment>Exception thrown when the PopupButtonMode is improperly set.</comment>\r\n  </data>\r\n  <data name=\"Spinner_SpinNotValid\" xml:space=\"preserve\">\r\n    <value>Spin action is not valid at this moment.</value>\r\n    <comment>Exception thrown when spinning in a direction that is not currently valid.</comment>\r\n  </data>\r\n  <data name=\"TimeInput_PopupMinutesInterval_InvalidValue\" xml:space=\"preserve\">\r\n    <value>Invalid PopupMinutesInterval '{0}'. The interval can be set to 0 (no interval) to and including 59.</value>\r\n    <comment>Exception thrown when an invalid interval is set.</comment>\r\n  </data>\r\n  <data name=\"TimeInput_PopupSecondsInterval_InvalidValue\" xml:space=\"preserve\">\r\n    <value>Invalid PopupSecondsInterval '{0}'.The interval can be set to 0 (no interval) to and including 59.</value>\r\n    <comment>Exception thrown when an invalid interval is set.</comment>\r\n  </data>\r\n  <data name=\"TimePicker_PopupSetInStyle\" xml:space=\"preserve\">\r\n    <value>Cannot set the PopupProperty in a style. Please use PopupTemplate.</value>\r\n    <comment>Exception thrown when the PopupProperty is set in a style.</comment>\r\n  </data>\r\n  <data name=\"TimePicker_PopupTimeSelectionModeNotValid\" xml:space=\"preserve\">\r\n    <value>Invalid PopupTimeSelectionMode for this popup, value '{0}'.</value>\r\n    <comment>Exception thrown by a TimePickerPopup if it does not support the selected PopupTimeSelectionMode.</comment>\r\n  </data>\r\n  <data name=\"TimeUpDown_OnTimeHintContentChanged\" xml:space=\"preserve\">\r\n    <value>Cannot set read-only property TimeHintContent.</value>\r\n    <comment>Exception thrown when the TimeHintContent property is improperly set.</comment>\r\n  </data>\r\n  <data name=\"TypeConverters_ConvertFrom_CannotConvertFromType\" xml:space=\"preserve\">\r\n    <value>'{0}' cannot convert from '{1}'.</value>\r\n    <comment>Exception thrown when a type converter is asked to convert something it cannot.</comment>\r\n  </data>\r\n  <data name=\"TypeConverters_Convert_CannotConvert\" xml:space=\"preserve\">\r\n    <value>'{0}' is unable to convert '{1}' to '{2}'.</value>\r\n    <comment>Exception thrown when a type converter fails to convert a value to another type.</comment>\r\n  </data>\r\n  <data name=\"UpDown_ParseException\" xml:space=\"preserve\">\r\n    <value>Cannot parse text '{0}'</value>\r\n    <comment>Exception thrown when the text supplied cannot be parsed.</comment>\r\n  </data>\r\n  <data name=\"RatingAutomationPeer_SetValue\" xml:space=\"preserve\">\r\n    <value>Value must be null or a number between 0 and 1.</value>\r\n    <comment>Exception thrown when a change is made to an automation peer.</comment>\r\n  </data>\r\n  <data name=\"RatingAutomationPeer_GetLocalizedControlTypeCore\" xml:space=\"preserve\">\r\n    <value>Rating</value>\r\n    <comment>The localized control type used by the RatingAutomationPeer.</comment>\r\n  </data>\r\n  <data name=\"RatingItemAutomationPeer_GetLocalizedControlTypeCore\" xml:space=\"preserve\">\r\n    <value>Star</value>\r\n    <comment>The localized control type name used by the RatingItemAutomationPeer.</comment>\r\n  </data>\r\n  <data name=\"Rating_SetItemCount_ItemCountMustBeLargerThanOrEqualToZero\" xml:space=\"preserve\">\r\n    <value>Value must be larger than or equal to 0.</value>\r\n    <comment>Exception thrown when the ItemCount is set to a value smaller than 0.</comment>\r\n  </data>\r\n  <data name=\"AutoComplete_OnFilterModePropertyChanged_InvalidValue\" xml:space=\"preserve\">\r\n    <value>Invalid FilterMode enumeration value. The value must be one of the defined AutoCompleteFilterMode values to be accepted.</value>\r\n    <comment>Exception thrown when the FilterMode dependency property is set to a value that does not pass the enum validation step in the property changed handler.</comment>\r\n  </data>\r\n  <data name=\"AutoComplete_OnMaxDropDownHeightPropertyChanged_InvalidValue\" xml:space=\"preserve\">\r\n    <value>Invalid maximum drop down height value '{0}'. The value must be greater than or equal to zero.</value>\r\n    <comment>Exception thrown when the MaxDropDownHeight dependency property is seto to a value that is negative.</comment>\r\n  </data>\r\n  <data name=\"AutoComplete_OnMinimumPopulateDelayPropertyChanged_InvalidValue\" xml:space=\"preserve\">\r\n    <value>Invalid MinimumPopulateDelay value '{0}'. The value must be greater than or equal to zero.</value>\r\n    <comment>Exception thrown when the MinimumPopulateDelay dependency property is changed to a negative value.</comment>\r\n  </data>\r\n  <data name=\"AutoComplete_OnSearchTextPropertyChanged_InvalidWrite\" xml:space=\"preserve\">\r\n    <value>Cannot set read-only property SearchText.</value>\r\n    <comment>Exception thrown when the SearchText property is improperly set.</comment>\r\n  </data>\r\n  <data name=\"RoutedPropertyChangingEventArgs_CancelSet_InvalidOperation\" xml:space=\"preserve\">\r\n    <value>The RoutedPropertyChangingEvent cannot be canceled.</value>\r\n    <comment>Exception thrown when setting Cancel property while IsCancelable is false.</comment>\r\n  </data>\r\n</root>"
  },
  {
    "path": "WpfToolkit/Input/Rating/System/Windows/Automation/Peers/RatingAutomationPeer.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\nusing System.Windows.Automation.Provider;\r\nusing System.Windows.Controls;\r\n\r\nnamespace System.Windows.Automation.Peers\r\n{\r\n    /// <summary>\r\n    /// Exposes Rating types to UI Automation.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public sealed partial class RatingAutomationPeer : ItemsControlAutomationPeer, IValueProvider, ISelectionProvider\r\n    {\r\n        /// <summary>\r\n        /// Provides initialization for base class values when called by the constructor\r\n        /// of a derived class.\r\n        /// </summary>\r\n        /// <param name=\"item\">The item to create the automation peer for.</param>\r\n        /// <returns>The item automation peer.</returns>\r\n        protected override ItemAutomationPeer CreateItemAutomationPeer(object item)\r\n        {\r\n            ItemAutomationPeer peer = null;\r\n            UIElement element = item as UIElement;\r\n            if (element != null)\r\n            {\r\n                peer = FrameworkElementAutomationPeer.CreatePeerForElement(element) as ItemAutomationPeer;\r\n            }\r\n            return peer;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the Rating that owns this RatingAutomationPeer.\r\n        /// </summary>\r\n        /// <value>The Rating.</value>\r\n        private Rating OwnerRating { get { return (Rating)Owner; } }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the <see cref=\"RatingAutomationPeer\"/> class.\r\n        /// </summary>\r\n        /// <param name=\"owner\">The Rating that is associated with this\r\n        /// RatingAutomationPeer.</param>\r\n        public RatingAutomationPeer(Rating owner) : base(owner)\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a name if no name is set.\r\n        /// </summary>\r\n        /// <returns>A name if no name is set.</returns>\r\n        protected override string GetNameCore()\r\n        {\r\n            string name = base.GetNameCore();\r\n            if (string.IsNullOrEmpty(name))\r\n            {\r\n                return \"Rating\";\r\n            }\r\n            return name;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the localized control type.\r\n        /// </summary>\r\n        /// <returns>The localized control type.</returns>\r\n        protected override string GetLocalizedControlTypeCore()\r\n        {\r\n            return System.Windows.Controls.Properties.Resources.RatingAutomationPeer_GetLocalizedControlTypeCore;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the control type for the Rating that is associated\r\n        /// with this RatingAutomationPeer.  This method is called by\r\n        /// GetAutomationControlType.\r\n        /// </summary>\r\n        /// <returns>List AutomationControlType.</returns>\r\n        protected override AutomationControlType GetAutomationControlTypeCore()\r\n        {\r\n            return AutomationControlType.Slider;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the control pattern for the Rating that is associated\r\n        /// with this RatingAutomationPeer.\r\n        /// </summary>\r\n        /// <param name=\"patternInterface\">The desired PatternInterface.</param>\r\n        /// <returns>The desired AutomationPeer or null.</returns>\r\n        public override object GetPattern(PatternInterface patternInterface)\r\n        {\r\n            if (patternInterface == PatternInterface.Value ||\r\n                patternInterface == PatternInterface.Selection)\r\n            {\r\n                return this;\r\n            }\r\n\r\n            return base.GetPattern(patternInterface);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the collection of child elements of \r\n        /// the <see cref=\"T:System.Windows.Controls.ItemsControl\"/> that is \r\n        /// associated with this <see cref=\"T:System.Windows.Automation.Peers.ItemsControlAutomationPeer\"/>.\r\n        /// </summary>\r\n        /// <returns>\r\n        /// A collection of RatingItemAutomationPeer elements, or null if the\r\n        /// Rating that is associated with this RatingAutomationPeer is\r\n        /// empty.\r\n        /// </returns>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1002:DoNotExposeGenericLists\", Justification = \"Required by automation\")]\r\n        protected override List<AutomationPeer> GetChildrenCore()\r\n        {\r\n            Rating owner = OwnerRating;\r\n\r\n            ItemCollection items = owner.Items;\r\n            if (items.Count <= 0)\r\n            {\r\n                return null;\r\n            }\r\n\r\n            List<AutomationPeer> peers = new List<AutomationPeer>(items.Count);\r\n            for (int i = 0; i < items.Count; i++)\r\n            {\r\n                RatingItem element = owner.ItemContainerGenerator.ContainerFromIndex(i) as RatingItem;\r\n                if (element != null)\r\n                {\r\n                    peers.Add(FromElement(element) ?? CreatePeerForElement(element));\r\n                }\r\n            }\r\n            return peers;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether the UI Automation provider \r\n        /// allows more than one child element to be selected concurrently.\r\n        /// </summary>\r\n        /// <returns>true if multiple selection is allowed; otherwise, false.\r\n        /// </returns>\r\n        /// <remarks>\r\n        /// This API supports the .NET Framework infrastructure and is not \r\n        /// intended to be used directly from your code.\r\n        /// </remarks>\r\n        public bool CanSelectMultiple\r\n        {\r\n            get \r\n            {\r\n                return false;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Retrieves a UI Automation provider for each child element that is \r\n        /// selected.\r\n        /// </summary>\r\n        /// <returns>An array of UI Automation providers.</returns>\r\n        /// <remarks>\r\n        /// This API supports the .NET Framework infrastructure and is not \r\n        /// intended to be used directly from your code.\r\n        /// </remarks>\r\n        public IRawElementProviderSimple[] GetSelection()\r\n        {\r\n            RatingItem selectedRatingItem = OwnerRating.GetRatingItems().LastOrDefault(ratingItem => ratingItem.Value > 0.0);\r\n            if (selectedRatingItem != null)\r\n            {\r\n                return new[] { ProviderFromPeer(FromElement(selectedRatingItem)) };\r\n            }\r\n            return new IRawElementProviderSimple[] { };\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether the UI Automation provider \r\n        /// requires at least one child element to be selected.\r\n        /// </summary>\r\n        /// <returns>true if selection is required; otherwise, false.\r\n        /// </returns>\r\n        /// <remarks>\r\n        /// This API supports the .NET Framework infrastructure and is not \r\n        /// intended to be used directly from your code.\r\n        /// </remarks>\r\n        public bool IsSelectionRequired\r\n        {\r\n            get\r\n            {\r\n                return false;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether the Rating is read-only.\r\n        /// </summary>\r\n        public bool IsReadOnly\r\n        {\r\n            get { return OwnerRating.IsReadOnly; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Sets a rating value.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value of the rating.</param>\r\n        public void SetValue(string value)\r\n        {\r\n            double ratingValue;\r\n            if (string.IsNullOrEmpty(value))\r\n            {\r\n                OwnerRating.Value = null;\r\n            }\r\n            else if (double.TryParse(value, out ratingValue))\r\n            {\r\n                if (ratingValue < 0.0 || ratingValue > 1.0)\r\n                {\r\n                    throw new InvalidOperationException(System.Windows.Controls.Properties.Resources.RatingAutomationPeer_SetValue);\r\n                }\r\n                else\r\n                {\r\n                    OwnerRating.Value = ratingValue;\r\n                }\r\n            }\r\n            else\r\n            {\r\n                throw new InvalidOperationException(System.Windows.Controls.Properties.Resources.RatingAutomationPeer_SetValue);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the rating value.\r\n        /// </summary>\r\n        public string Value\r\n        {\r\n            get \r\n            {\r\n                if (OwnerRating.Value.HasValue)\r\n                {\r\n                    return OwnerRating.Value.ToString();\r\n                }\r\n                else\r\n                {\r\n                    return null;\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Input/Rating/System/Windows/Automation/Peers/RatingItemAutomationPeer.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Windows.Automation.Provider;\r\nusing System.Windows.Controls;\r\n\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Automation.Peers.RatingItemAutomationPeer.#System.Windows.Automation.Provider.ISelectionItemProvider.AddToSelection()\", Justification = \"Required for subset compat with WPF\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Automation.Peers.RatingItemAutomationPeer.#System.Windows.Automation.Provider.ISelectionItemProvider.IsSelected\", Justification = \"Required for subset compat with WPF\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Automation.Peers.RatingItemAutomationPeer.#System.Windows.Automation.Provider.ISelectionItemProvider.RemoveFromSelection()\", Justification = \"Required for subset compat with WPF\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Automation.Peers.RatingItemAutomationPeer.#System.Windows.Automation.Provider.ISelectionItemProvider.Select()\", Justification = \"Required for subset compat with WPF\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Automation.Peers.RatingItemAutomationPeer.#System.Windows.Automation.Provider.ISelectionItemProvider.SelectionContainer\", Justification = \"Required for subset compat with WPF\")]\r\n\r\nnamespace System.Windows.Automation.Peers\r\n{\r\n    /// <summary>\r\n    /// Exposes RatingItem types to UI Automation.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public class RatingItemAutomationPeer : FrameworkElementAutomationPeer, ISelectionItemProvider\r\n    {\r\n        /// <summary>\r\n        /// Gets the RatingItem that owns this RatingItemAutomationPeer.\r\n        /// </summary>\r\n        private RatingItem OwnerRatingItem\r\n        {\r\n            get { return (RatingItem)Owner; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the RatingAutomationPeer class.\r\n        /// </summary>\r\n        /// <param name=\"owner\">\r\n        /// The Rating that is associated with this\r\n        /// RatingAutomationPeer.\r\n        /// </param>\r\n        public RatingItemAutomationPeer(RatingItem owner)\r\n            : base(owner)\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the localized control type.\r\n        /// </summary>\r\n        /// <returns>The localized control type.</returns>\r\n        protected override string GetLocalizedControlTypeCore()\r\n        {\r\n            return System.Windows.Controls.Properties.Resources.RatingItemAutomationPeer_GetLocalizedControlTypeCore;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the control type for the RatingItem that is associated\r\n        /// with this RatingItemAutomationPeer.  This method is called by\r\n        /// GetAutomationControlType.\r\n        /// </summary>\r\n        /// <returns>Custom AutomationControlType.</returns>\r\n        protected override AutomationControlType GetAutomationControlTypeCore()\r\n        {\r\n            return AutomationControlType.ListItem | AutomationControlType.Button;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the name of the RatingItem that is associated with this\r\n        /// RatingItemAutomationPeer.  This method is called by GetClassName.\r\n        /// </summary>\r\n        /// <returns>The name RatingItem.</returns>\r\n        protected override string GetClassNameCore()\r\n        {\r\n            return \"RatingItem\";\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the control pattern for the RatingItem that is associated\r\n        /// with this RatingItemAutomationPeer.\r\n        /// </summary>\r\n        /// <param name=\"patternInterface\">The desired PatternInterface.</param>\r\n        /// <returns>The desired AutomationPeer or null.</returns>\r\n        public override object GetPattern(PatternInterface patternInterface)\r\n        {\r\n            if (patternInterface == PatternInterface.SelectionItem)\r\n            {\r\n                return this;\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the name of the rating item.  Uses the index of the rating\r\n        /// item in the list.\r\n        /// </summary>\r\n        /// <returns>The name of the rating item.</returns>\r\n        protected override string GetNameCore()\r\n        {\r\n            int? index = this.OwnerRatingItem.ParentRating.GetRatingItems().IndexOf(this.OwnerRatingItem);\r\n            if (index != null)\r\n            {\r\n                return (index.Value + 1).ToString(CultureInfo.CurrentUICulture);\r\n            }\r\n            else\r\n            {\r\n                return string.Empty;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Adds the RatingItem to the collection of selected items.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// This API supports the .NET Framework infrastructure and is not \r\n        /// intended to be used directly from your code.\r\n        /// </remarks>\r\n        void ISelectionItemProvider.AddToSelection()\r\n        {\r\n            RatingItem owner = OwnerRatingItem;\r\n            Rating parent = owner.ParentRating;\r\n            if (parent == null || parent.Value != null)\r\n            {\r\n                throw new InvalidOperationException(Controls.Properties.Resources.Automation_OperationCannotBePerformed);\r\n            }\r\n\r\n            owner.SelectValue();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether the Rating is selected.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// This API supports the .NET Framework infrastructure and is not \r\n        /// intended to be used directly from your code.\r\n        /// </remarks>\r\n        bool ISelectionItemProvider.IsSelected\r\n        {\r\n            get { return OwnerRatingItem.Value > 0.0; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes the current Rating from the collection of selected\r\n        /// items.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// This API supports the .NET Framework infrastructure and is not \r\n        /// intended to be used directly from your code.\r\n        /// </remarks>\r\n        void ISelectionItemProvider.RemoveFromSelection()\r\n        {\r\n            RatingItem owner = OwnerRatingItem;\r\n            Rating parent = owner.ParentRating;\r\n            if (parent == null)\r\n            {\r\n                throw new InvalidOperationException(Controls.Properties.Resources.Automation_OperationCannotBePerformed);\r\n            }\r\n\r\n            if (!parent.IsReadOnly)\r\n            {\r\n                parent.Value = null;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Clears selection from currently selected items and then proceeds to\r\n        /// select the current Rating.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// This API supports the .NET Framework infrastructure and is not \r\n        /// intended to be used directly from your code.\r\n        /// </remarks>\r\n        void ISelectionItemProvider.Select()\r\n        {\r\n            OwnerRatingItem.SelectValue();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the UI Automation provider that implements ISelectionProvider\r\n        /// and acts as the container for the calling object.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// This API supports the .NET Framework infrastructure and is not \r\n        /// intended to be used directly from your code.\r\n        /// </remarks>\r\n        IRawElementProviderSimple ISelectionItemProvider.SelectionContainer\r\n        {\r\n            get\r\n            {\r\n                Rating parent = OwnerRatingItem.ParentRating;\r\n                if (parent != null)\r\n                {\r\n                    AutomationPeer peer = FromElement(parent);\r\n                    if (peer != null)\r\n                    {\r\n                        return ProviderFromPeer(peer);\r\n                    }\r\n                }\r\n                return null;\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Input/Rating/System/Windows/Controls/Clipper.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.Primitives\r\n{\r\n    /// <summary>\r\n    /// Clips a ratio of its content.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public abstract class Clipper : ContentControl\r\n    {\r\n        #region public double RatioVisible\r\n        /// <summary>\r\n        /// Gets or sets the percentage of the item visible.\r\n        /// </summary>\r\n        public double RatioVisible\r\n        {\r\n            get { return (double)GetValue(RatioVisibleProperty); }\r\n            set { SetValue(RatioVisibleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the RatioVisible dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty RatioVisibleProperty =\r\n            DependencyProperty.Register(\r\n                \"RatioVisible\",\r\n                typeof(double),\r\n                typeof(Clipper),\r\n                new PropertyMetadata(1.0, OnRatioVisibleChanged));\r\n\r\n        /// <summary>\r\n        /// RatioVisibleProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">PartialView that changed its RatioVisible.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnRatioVisibleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            Clipper source = (Clipper)d;\r\n            double oldValue = (double)e.OldValue;\r\n            double newValue = (double)e.NewValue;\r\n            source.OnRatioVisibleChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// RatioVisibleProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>        \r\n        protected virtual void OnRatioVisibleChanged(double oldValue, double newValue)\r\n        {\r\n            if (newValue >= 0.0 && newValue <= 1.0)\r\n            {\r\n                ClipContent();\r\n            }\r\n            else\r\n            {\r\n                if (newValue < 0.0)\r\n                {\r\n                    this.RatioVisible = 0.0;\r\n                }\r\n                else if (newValue > 1.0)\r\n                {\r\n                    this.RatioVisible = 1.0;\r\n                }\r\n            }\r\n        }\r\n\r\n        #endregion public double RatioVisible\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the Clipper class.\r\n        /// </summary>\r\n        protected Clipper()\r\n        {\r\n            this.SizeChanged += delegate { ClipContent(); };\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the clip geometry.\r\n        /// </summary>\r\n        protected abstract void ClipContent();\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Input/Rating/System/Windows/Controls/EnumerableFunctions.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\nusing System.Reflection;\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// This class contains general purpose functions to manipulate the generic\r\n    /// IEnumerable type.\r\n    /// </summary>\r\n    internal static class EnumerableFunctions\r\n    {\r\n        /////// <summary>\r\n        /////// Applies a function to an accumulated value and an item in the \r\n        /////// sequence and yields the result as the accumulated value.\r\n        /////// </summary>\r\n        /////// <typeparam name=\"T\">The type of the sequence.</typeparam>\r\n        /////// <param name=\"that\">The sequence to scan.</param>\r\n        /////// <param name=\"func\">The function applied to the accumulator and the\r\n        /////// current item.</param>\r\n        /////// <returns>A sequence of computed values.</returns>\r\n        ////public static IEnumerable<T> Scan<T>(this IEnumerable<T> that, Func<T, T, T> func)\r\n        ////{\r\n        ////    IEnumerator<T> enumerator = that.GetEnumerator();\r\n        ////    if (!enumerator.MoveNext())\r\n        ////    {\r\n        ////        yield break;\r\n        ////    }\r\n\r\n        ////    T acc = enumerator.Current;\r\n        ////    yield return acc;\r\n\r\n        ////    while (enumerator.MoveNext())\r\n        ////    {\r\n        ////        acc = func(acc, enumerator.Current);\r\n        ////        yield return acc;\r\n        ////    }\r\n        ////}\r\n\r\n        /// <summary>\r\n        /// Applies a function to an accumulated value and an item in the \r\n        /// sequence and yields the result as the accumulated value.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The type of the input sequence.</typeparam>\r\n        /// <typeparam name=\"R\">The type of the initial value.</typeparam>\r\n        /// <param name=\"that\">The sequence to scan.</param>\r\n        /// <param name=\"func\">The function applied to the accumulator and the\r\n        /// current item.</param>\r\n        /// <param name=\"initialValue\">The initial value in the output sequence.\r\n        /// </param>\r\n        /// <returns>A sequence of computed values.</returns>\r\n        public static IEnumerable<R> Scan<T, R>(this IEnumerable<T> that, Func<R, T, R> func, R initialValue)\r\n        {\r\n            R acc = initialValue;\r\n            yield return acc;\r\n\r\n            IEnumerator<T> enumerator = that.GetEnumerator();\r\n            while (enumerator.MoveNext())\r\n            {\r\n                acc = func(acc, enumerator.Current);\r\n                yield return acc;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Accepts two sequences and applies a function to the corresponding \r\n        /// values in the two sequences.\r\n        /// </summary>\r\n        /// <typeparam name=\"T0\">The type of the first sequence.</typeparam>\r\n        /// <typeparam name=\"T1\">The type of the second sequence.</typeparam>\r\n        /// <typeparam name=\"R\">The return type of the function.</typeparam>\r\n        /// <param name=\"enumerable0\">The first sequence.</param>\r\n        /// <param name=\"enumerable1\">The second sequence.</param>\r\n        /// <param name=\"func\">The function to apply to the corresponding values\r\n        /// from the two sequences.</param>\r\n        /// <returns>A sequence of transformed values from both sequences.</returns>\r\n        public static IEnumerable<R> Zip<T0, T1, R>(IEnumerable<T0> enumerable0, IEnumerable<T1> enumerable1, Func<T0, T1, R> func)\r\n        {\r\n            IEnumerator<T0> enumerator0 = enumerable0.GetEnumerator();\r\n            IEnumerator<T1> enumerator1 = enumerable1.GetEnumerator();\r\n            while (enumerator0.MoveNext() && enumerator1.MoveNext())\r\n            {\r\n                yield return func(enumerator0.Current, enumerator1.Current);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the index of an item in a sequence.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The type of the sequence.</typeparam>\r\n        /// <param name=\"that\">The sequence.</param>\r\n        /// <param name=\"item\">The item in the sequence.</param>\r\n        /// <returns>The index of an item in a sequence.</returns>\r\n        public static int? IndexOf<T>(this IEnumerable<T> that, T item)\r\n        {\r\n            IEnumerator<T> enumerator = that.GetEnumerator();\r\n            int index = 0;\r\n            while (enumerator.MoveNext())\r\n            {\r\n                if (object.ReferenceEquals(enumerator.Current, item))\r\n                {\r\n                    return index;\r\n                }\r\n                index++;\r\n            }\r\n            return null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a stream of weighted values based on a percentage.\r\n        /// </summary>\r\n        /// <param name=\"values\">A sequence of values.</param>\r\n        /// <param name=\"percent\">The percentage of values.</param>\r\n        /// <returns>A sequence of percentages.</returns>\r\n        public static IEnumerable<double> GetWeightedValues(this IEnumerable<double> values, double percent)\r\n        {\r\n            double total = values.Sum();\r\n            if (total == 0)\r\n            {\r\n                return values.Select(_ => 0.0);\r\n            }\r\n\r\n            return\r\n                EnumerableFunctions\r\n                    .Zip(\r\n                        values.Scan((acc, current) => acc + current, 0.0),\r\n                        values,\r\n                        (acc, current) => Tuple.Create(acc, current))\r\n                    .Select(tuple => Tuple.Create(tuple.First / total, tuple.Second / total))\r\n                    .Select(tuple =>\r\n                    {\r\n                        double accumulated = tuple.First;\r\n                        double current = tuple.Second;\r\n\r\n                        if (percent > accumulated && accumulated + current > percent)\r\n                        {\r\n                            return (percent - accumulated) * total;\r\n                        }\r\n                        else if (percent <= accumulated)\r\n                        {\r\n                            return 0.0;\r\n                        }\r\n                        else\r\n                        {\r\n                            return 1.0;\r\n                        }\r\n                    });\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Input/Rating/System/Windows/Controls/LinearClipper.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System.Windows.Media;\r\n\r\nnamespace System.Windows.Controls.Primitives\r\n{\r\n    /// <summary>\r\n    /// Clips the content of the control in a given direction.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public class LinearClipper : Clipper\r\n    {\r\n        #region public ExpandDirection ExpandDirection\r\n        /// <summary>\r\n        /// Gets or sets the clipped edge.\r\n        /// </summary>\r\n        public ExpandDirection ExpandDirection\r\n        {\r\n            get { return (ExpandDirection) GetValue(ExpandDirectionProperty); }\r\n            set { SetValue(ExpandDirectionProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ExpandDirection dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ExpandDirectionProperty =\r\n            DependencyProperty.Register(\r\n                \"ExpandDirection\",\r\n                typeof(ExpandDirection),\r\n                typeof(LinearClipper),\r\n                new PropertyMetadata(ExpandDirection.Right, OnExpandDirectionChanged));\r\n\r\n        /// <summary>\r\n        /// ExpandDirectionProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">ExpandDirectionView that changed its ExpandDirection.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnExpandDirectionChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            LinearClipper source = (LinearClipper)d;\r\n            ExpandDirection oldValue = (ExpandDirection)e.OldValue;\r\n            ExpandDirection newValue = (ExpandDirection)e.NewValue;\r\n            source.OnExpandDirectionChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// ExpandDirectionProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>        \r\n        protected virtual void OnExpandDirectionChanged(ExpandDirection oldValue, ExpandDirection newValue)\r\n        {\r\n            ClipContent();\r\n        }\r\n        #endregion public ExpandDirection ExpandDirection\r\n\r\n        /// <summary>\r\n        /// Updates the clip geometry.\r\n        /// </summary>\r\n        protected override void ClipContent()\r\n        {\r\n            if (ExpandDirection == ExpandDirection.Right)\r\n            {\r\n                double width = this.RenderSize.Width * RatioVisible;\r\n                this.Clip = new RectangleGeometry { Rect = new Rect(0, 0, width, this.RenderSize.Height) };\r\n            }\r\n            else if (ExpandDirection == ExpandDirection.Left)\r\n            {\r\n                double width = this.RenderSize.Width * RatioVisible;\r\n                double rightSide = this.RenderSize.Width - width;\r\n                this.Clip = new RectangleGeometry { Rect = new Rect(rightSide, 0, width, this.RenderSize.Height) };\r\n            }\r\n            else if (ExpandDirection == ExpandDirection.Up)\r\n            {\r\n                double height = this.RenderSize.Height * RatioVisible;\r\n                double bottom = this.RenderSize.Height - height;\r\n                this.Clip = new RectangleGeometry { Rect = new Rect(0, bottom, this.RenderSize.Width, height) };\r\n            }\r\n            else if (ExpandDirection == ExpandDirection.Down)\r\n            {\r\n                double height = this.RenderSize.Height * RatioVisible;\r\n                this.Clip = new RectangleGeometry { Rect = new Rect(0, 0, this.RenderSize.Width, height) };\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Input/Rating/System/Windows/Controls/NullableConverter.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System.ComponentModel;\r\nusing System.Globalization;\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Converts a string or base value to a <see cref=\"Nullable\"/> value.\r\n    /// </summary>\r\n    /// <typeparam name=\"T\">The type should be value type.</typeparam>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public class NullableConverter<T> : TypeConverter where T : struct\r\n    {\r\n        /// <summary>\r\n        /// Returns whether the type converter can convert an object from the \r\n        /// specified type to the type of this converter.\r\n        /// </summary>\r\n        /// <param name=\"context\">An object that provides a format context.\r\n        /// </param>\r\n        /// <param name=\"sourceType\">The type you want to convert from.</param>\r\n        /// <returns>\r\n        /// Returns true if this converter can perform the conversion; \r\n        /// otherwise, false.\r\n        /// </returns>\r\n        public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)\r\n        {\r\n            if (sourceType == typeof(T))\r\n            {\r\n                return true;\r\n            }\r\n            else if (sourceType == typeof(string))\r\n            {\r\n                return true;\r\n            }\r\n            return false;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns whether the type converter can convert an object from the \r\n        /// specified type to the type of this converter.\r\n        /// </summary>\r\n        /// <param name=\"context\">An object that provides a format context.\r\n        /// </param>\r\n        /// <param name=\"destinationType\">The type you want to convert to.\r\n        /// </param>\r\n        /// <returns>\r\n        /// Returns true if this converter can perform the conversion; \r\n        /// otherwise, false.\r\n        /// </returns>\r\n        public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)\r\n        {\r\n            return (destinationType == typeof(T));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Converts from the specified value to the type of this converter.\r\n        /// </summary>\r\n        /// <param name=\"context\">An object that provides a format context.\r\n        /// </param>\r\n        /// <param name=\"culture\">The \r\n        /// <see cref=\"T:System.Globalization.CultureInfo\"/> to use as the \r\n        /// current culture.</param>\r\n        /// <param name=\"value\">The value to convert to the type of this \r\n        /// converter.</param>\r\n        /// <returns>The converted value.</returns>\r\n        /// <exception cref=\"T:System.NotSupportedException\">\r\n        /// The conversion cannot be performed.\r\n        /// </exception>\r\n        public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)\r\n        {\r\n            string stringValue = value as string;\r\n            if (value is T)\r\n            {\r\n                return new Nullable<T>((T)value);\r\n            }\r\n            else if (string.IsNullOrEmpty(stringValue) || String.Equals(stringValue, \"Auto\", StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                return new Nullable<T>();\r\n            }\r\n            return new Nullable<T>((T)Convert.ChangeType(value, typeof(T), culture));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Converts from the specified value to the a specified type from the\r\n        /// type of this converter.\r\n        /// </summary>\r\n        /// <param name=\"context\">An object that provides a format context.\r\n        /// </param>\r\n        /// <param name=\"culture\">The \r\n        /// <see cref=\"T:System.Globalization.CultureInfo\"/> to use as the \r\n        /// current culture.</param>\r\n        /// <param name=\"value\">The value to convert to the type of this \r\n        /// converter.</param>\r\n        /// <param name=\"destinationType\">The type of convert the value to\r\n        /// .</param>\r\n        /// <returns>The converted value.</returns>\r\n        /// <exception cref=\"T:System.NotSupportedException\">\r\n        /// The conversion cannot be performed.\r\n        /// </exception>\r\n        public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)\r\n        {\r\n            if (value == null)\r\n            {\r\n                return string.Empty;\r\n            }\r\n            else if (destinationType == typeof(string))\r\n            {\r\n                return value.ToString();\r\n            }\r\n            return base.ConvertTo(context, culture, value, destinationType);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Input/Rating/System/Windows/Controls/Rating.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Collections.Specialized;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\nusing System.Windows.Automation;\r\nusing System.Windows.Automation.Peers;\r\nusing System.Windows.Controls.Primitives;\r\nusing System.Windows.Data;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media.Animation;\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// A control that has a rating.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    [TemplateVisualState(Name = VisualStates.StateNormal, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StateMouseOver, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StatePressed, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StateDisabled, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StateReadOnly, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StateFocused, GroupName = VisualStates.GroupFocus)]\r\n    [TemplateVisualState(Name = VisualStates.StateUnfocused, GroupName = VisualStates.GroupFocus)]\r\n    [StyleTypedProperty(Property = \"ItemContainerStyle\", StyleTargetType = typeof(RatingItem))]\r\n    public class Rating : ItemsControl, IUpdateVisualState\r\n    {\r\n        #region protected double DisplayValue\r\n        /// <summary>\r\n        /// Gets or sets the actual value of the Rating control.\r\n        /// </summary>\r\n        protected double DisplayValue\r\n        {\r\n            get { return (double)GetValue(DisplayValueProperty); }\r\n            set { SetValue(DisplayValueProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the DisplayValue dependency property.\r\n        /// </summary>\r\n        protected static readonly DependencyProperty DisplayValueProperty =\r\n            DependencyProperty.Register(\r\n                \"DisplayValue\",\r\n                typeof(double),\r\n                typeof(Rating),\r\n                new PropertyMetadata(0.0, OnDisplayValueChanged));\r\n\r\n        /// <summary>\r\n        /// DisplayValueProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"dependencyObject\">Rating that changed its DisplayValue.</param>\r\n        /// <param name=\"eventArgs\">Event arguments.</param>\r\n        private static void OnDisplayValueChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs eventArgs)\r\n        {\r\n            Rating source = (Rating)dependencyObject;\r\n            source.OnDisplayValueChanged();\r\n        }\r\n\r\n        /// <summary>\r\n        /// DisplayValueProperty property changed handler.\r\n        /// </summary>\r\n        private void OnDisplayValueChanged()\r\n        {\r\n            UpdateDisplayValues();\r\n        }\r\n\r\n        #endregion protected double DisplayValue\r\n\r\n        /// <summary>\r\n        /// Gets or sets the rating item hovered over.\r\n        /// </summary>\r\n        private RatingItem HoveredRatingItem { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets the helper that provides all of the standard\r\n        /// interaction functionality.\r\n        /// </summary>\r\n        internal InteractionHelper Interaction { get; private set; }\r\n\r\n        #region public int ItemCount\r\n        /// <summary>\r\n        /// Gets or sets the number of rating items.\r\n        /// </summary>\r\n        public int ItemCount\r\n        {\r\n            get { return (int)GetValue(ItemCountProperty); }\r\n            set { SetValue(ItemCountProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ItemCount dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ItemCountProperty =\r\n            DependencyProperty.Register(\r\n                \"ItemCount\",\r\n                typeof(int),\r\n                typeof(Rating),\r\n                new PropertyMetadata(0, OnItemCountChanged));\r\n\r\n        /// <summary>\r\n        /// ItemCountProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">Rating that changed its ItemCount.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnItemCountChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            Rating source = d as Rating;\r\n            int value = (int)e.NewValue;\r\n            source.OnItemCountChanged(value);\r\n        }\r\n\r\n        /// <summary>\r\n        /// This method is invoked when the items count property is changed.\r\n        /// </summary>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        private void OnItemCountChanged(int newValue)\r\n        {\r\n            if (newValue < 0)\r\n            {\r\n                throw new ArgumentException(Properties.Resources.Rating_SetItemCount_ItemCountMustBeLargerThanOrEqualToZero);\r\n            }\r\n\r\n            int amountToAdd = newValue - this.Items.Count;\r\n            if (amountToAdd > 0)\r\n            {\r\n                for (int cnt = 0; cnt < amountToAdd; cnt++)\r\n                {\r\n                    this.Items.Add(new RatingItem());\r\n                }\r\n            }\r\n            else if (amountToAdd < 0)\r\n            {\r\n                for (int cnt = 0; cnt < Math.Abs(amountToAdd); cnt++)\r\n                {\r\n                    this.Items.RemoveAt(this.Items.Count - 1);\r\n                }\r\n            }\r\n        }\r\n        #endregion public int ItemCount\r\n\r\n        #region public bool IsReadOnly\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether the Rating is read-only.\r\n        /// </summary>\r\n        public bool IsReadOnly\r\n        {\r\n            get { return (bool)GetValue(IsReadOnlyProperty); }\r\n            set { SetValue(IsReadOnlyProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the IsReadOnly dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty IsReadOnlyProperty =\r\n            DependencyProperty.Register(\r\n                \"IsReadOnly\",\r\n                typeof(bool),\r\n                typeof(Rating),\r\n                new PropertyMetadata(false, OnIsReadOnlyChanged));\r\n\r\n        /// <summary>\r\n        /// IsReadOnlyProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">Rating that changed its IsReadOnly.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnIsReadOnlyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            Rating source = (Rating)d;\r\n            bool oldValue = (bool)e.OldValue;\r\n            bool newValue = (bool)e.NewValue;\r\n            source.OnIsReadOnlyChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// IsReadOnlyProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>        \r\n        protected virtual void OnIsReadOnlyChanged(bool oldValue, bool newValue)\r\n        {\r\n            Interaction.OnIsReadOnlyChanged(newValue);\r\n            foreach (RatingItem ratingItem in GetRatingItems())\r\n            {\r\n                ratingItem.IsReadOnly = newValue;\r\n            }\r\n\r\n            UpdateHoverStates();\r\n        }\r\n        #endregion public bool IsReadOnly\r\n\r\n        #region public RatingSelectionMode SelectionMode\r\n        /// <summary>\r\n        /// Gets or sets the selection mode.\r\n        /// </summary>\r\n        public RatingSelectionMode SelectionMode\r\n        {\r\n            get { return (RatingSelectionMode)GetValue(SelectionModeProperty); }\r\n            set { SetValue(SelectionModeProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the SelectionMode dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty SelectionModeProperty =\r\n            DependencyProperty.Register(\r\n                \"SelectionMode\",\r\n                typeof(RatingSelectionMode),\r\n                typeof(Rating),\r\n                new PropertyMetadata(RatingSelectionMode.Continuous, OnSelectionModeChanged));\r\n\r\n        /// <summary>\r\n        /// SelectionModeProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">Rating that changed its SelectionMode.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnSelectionModeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            Rating source = (Rating)d;\r\n            RatingSelectionMode oldValue = (RatingSelectionMode)e.OldValue;\r\n            RatingSelectionMode newValue = (RatingSelectionMode)e.NewValue;\r\n            source.OnSelectionModeChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// SelectionModeProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>        \r\n        protected virtual void OnSelectionModeChanged(RatingSelectionMode oldValue, RatingSelectionMode newValue)\r\n        {\r\n            UpdateDisplayValues();\r\n        }\r\n        #endregion public RatingSelectionMode SelectionMode\r\n\r\n        #region public double? Value\r\n        /// <summary>\r\n        /// Gets or sets the rating value.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1721:PropertyNamesShouldNotMatchGetMethods\", Justification = \"Value is the logical name for this property.\")]\r\n        [TypeConverter(typeof(NullableConverter<double>))]\r\n        public double? Value\r\n        {\r\n            get { return (double?)GetValue(ValueProperty); }\r\n            set { SetValue(ValueProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Value dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ValueProperty =\r\n            DependencyProperty.Register(\r\n                \"Value\",\r\n                typeof(double?),\r\n                typeof(Rating),\r\n                new PropertyMetadata(new double?(), OnValueChanged));\r\n\r\n        /// <summary>\r\n        /// ValueProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">Rating that changed its Value.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            Rating source = (Rating)d;\r\n            double? oldValue = (double?)e.OldValue;\r\n            double? newValue = (double?)e.NewValue;\r\n            source.OnValueChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// ValueProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>        \r\n        protected virtual void OnValueChanged(double? oldValue, double? newValue)\r\n        {\r\n            UpdateValues();\r\n#if SILVERLIGHT\r\n            RoutedPropertyChangedEventHandler<double?> handler = ValueChanged;\r\n            if (handler != null)\r\n            {\r\n                handler(this, new RoutedPropertyChangedEventArgs<double?>(oldValue, newValue));\r\n            }\r\n#else\r\n            RaiseEvent(new RoutedPropertyChangedEventArgs<double?>(oldValue, newValue, ValueChangedEvent));\r\n#endif\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the control when the items change.\r\n        /// </summary>\r\n        /// <param name=\"e\">Information about the event.</param>\r\n        protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)\r\n        {\r\n            EventHandler layoutUpdated = null;\r\n            layoutUpdated =\r\n                delegate\r\n                {\r\n                    this.LayoutUpdated -= layoutUpdated;\r\n                    UpdateValues();\r\n                    UpdateDisplayValues();\r\n                };\r\n            this.LayoutUpdated += layoutUpdated;\r\n\r\n            this.ItemCount = this.Items.Count;\r\n\r\n            base.OnItemsChanged(e);\r\n        }\r\n\r\n        /// <summary>\r\n        /// This event is raised when the value of the rating is changed.\r\n        /// </summary>\r\n        public static readonly RoutedEvent ValueChangedEvent = EventManager.RegisterRoutedEvent(\"ValueChanged\", RoutingStrategy.Bubble, typeof(RoutedPropertyChangedEventHandler<double?>), typeof(Rating));\r\n\r\n        /// <summary>\r\n        /// This event is raised when the value of the rating is changed.\r\n        /// </summary>\r\n        public event RoutedPropertyChangedEventHandler<double?> ValueChanged\r\n        {\r\n            add { AddHandler(ValueChangedEvent, value); }\r\n            remove { RemoveHandler(ValueChangedEvent, value); }\r\n        }\r\n\r\n        #endregion public double? Value\r\n\r\n        /// <summary>\r\n        /// Initializes the static members of the ColumnDataPoint class.\r\n        /// </summary>\r\n        static Rating()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(Rating), new FrameworkPropertyMetadata(typeof(Rating)));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the Rating control.\r\n        /// </summary>\r\n        public Rating()\r\n        {\r\n            this.Interaction = new InteractionHelper(this);\r\n        }\r\n\r\n        /// <summary>\r\n        /// This method is invoked when the mouse enters the rating item.\r\n        /// </summary>\r\n        /// <param name=\"e\">Information about the event.</param>\r\n        protected override void OnMouseEnter(MouseEventArgs e)\r\n        {\r\n            if (Interaction.AllowMouseEnter(e))\r\n            {\r\n                Interaction.UpdateVisualStateBase(true);\r\n            }\r\n            base.OnMouseEnter(e);\r\n        }\r\n\r\n        /// <summary>\r\n        /// This method is invoked when the mouse leaves the rating item.\r\n        /// </summary>\r\n        /// <param name=\"e\">Information about the event.</param>\r\n        protected override void OnMouseLeave(MouseEventArgs e)\r\n        {\r\n            if (Interaction.AllowMouseLeave(e))\r\n            {\r\n                Interaction.UpdateVisualStateBase(true);\r\n            }\r\n            base.OnMouseLeave(e);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Provides handling for the Rating's MouseLeftButtonDown event.\r\n        /// </summary>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)\r\n        {\r\n            if (Interaction.AllowMouseLeftButtonDown(e))\r\n            {\r\n                Interaction.OnMouseLeftButtonDownBase();\r\n            }\r\n            base.OnMouseLeftButtonDown(e);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Provides handling for the Rating's MouseLeftButtonUp event.\r\n        /// </summary>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)\r\n        {\r\n            if (Interaction.AllowMouseLeftButtonUp(e))\r\n            {\r\n                Interaction.OnMouseLeftButtonUpBase();\r\n            }\r\n            base.OnMouseLeftButtonUp(e);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the values of the rating items.\r\n        /// </summary>\r\n        private void UpdateValues()\r\n        {\r\n            IList<RatingItem> ratingItems = GetRatingItems().ToList();\r\n\r\n            RatingItem oldSelectedItem = this.GetSelectedRatingItem();\r\n\r\n            IEnumerable<Tuple<RatingItem, double>> itemAndWeights =\r\n                EnumerableFunctions\r\n                    .Zip(\r\n                        ratingItems,\r\n                        ratingItems\r\n                            .Select(ratingItem => 1.0)\r\n                            .GetWeightedValues(Value.GetValueOrDefault()),\r\n                        (item, percent) => Tuple.Create(item, percent));\r\n\r\n            foreach (Tuple<RatingItem, double> itemAndWeight in itemAndWeights)\r\n            {\r\n                itemAndWeight.First.Value = itemAndWeight.Second;\r\n            }\r\n\r\n            RatingItem newSelectedItem = this.GetSelectedRatingItem();\r\n\r\n            // Notify when the selection changes\r\n            if (oldSelectedItem != newSelectedItem)\r\n            {\r\n                if (newSelectedItem != null && AutomationPeer.ListenerExists(AutomationEvents.SelectionItemPatternOnElementSelected))\r\n                {\r\n                    AutomationPeer peer = FrameworkElementAutomationPeer.CreatePeerForElement(newSelectedItem);\r\n                    if (peer != null)\r\n                    {\r\n                        peer.RaiseAutomationEvent(AutomationEvents.SelectionItemPatternOnElementSelected);\r\n                    }\r\n                }\r\n                if (oldSelectedItem != null && AutomationPeer.ListenerExists(AutomationEvents.SelectionItemPatternOnElementRemovedFromSelection))\r\n                {\r\n                    AutomationPeer peer = FrameworkElementAutomationPeer.CreatePeerForElement(oldSelectedItem);\r\n                    if (peer != null)\r\n                    {\r\n                        peer.RaiseAutomationEvent(AutomationEvents.SelectionItemPatternOnElementRemovedFromSelection);\r\n                    }\r\n                }\r\n            }\r\n\r\n            if (HoveredRatingItem == null)\r\n            {\r\n                DisplayValue = Value.GetValueOrDefault();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the value and actual value of the rating items.\r\n        /// </summary>\r\n        private void UpdateDisplayValues()\r\n        {\r\n            IList<RatingItem> ratingItems = GetRatingItems().ToList();\r\n\r\n            IEnumerable<Tuple<RatingItem, double>> itemAndWeights =\r\n                EnumerableFunctions\r\n                    .Zip(\r\n                        ratingItems,\r\n                        ratingItems\r\n                            .Select(ratingItem => 1.0)\r\n                            .GetWeightedValues(DisplayValue),\r\n                        (item, percent) => Tuple.Create(item, percent));\r\n\r\n            RatingItem selectedItem = null;\r\n            Tuple<RatingItem, double> selectedItemAndWeight = itemAndWeights.LastOrDefault(i => i.Second > 0.0);\r\n            if (selectedItemAndWeight != null)\r\n            {\r\n                selectedItem = selectedItemAndWeight.First;\r\n            }\r\n            else\r\n            {\r\n                selectedItem = GetSelectedRatingItem();\r\n            }\r\n\r\n            foreach (Tuple<RatingItem, double> itemAndWeight in itemAndWeights)\r\n            {\r\n                if (SelectionMode == RatingSelectionMode.Individual && itemAndWeight.First != selectedItem)\r\n                {\r\n                    itemAndWeight.First.DisplayValue = 0.0;\r\n                }\r\n                else\r\n                {\r\n                    itemAndWeight.First.DisplayValue = itemAndWeight.Second;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the hover states of the rating items.\r\n        /// </summary>\r\n        private void UpdateHoverStates()\r\n        {\r\n            if (HoveredRatingItem != null && !IsReadOnly)\r\n            {\r\n                IList<RatingItem> ratingItems = GetRatingItems().ToList();\r\n                int indexOfItem = ratingItems.IndexOf(HoveredRatingItem);\r\n\r\n                double total = ratingItems.Count();\r\n                double filled = indexOfItem + 1;\r\n\r\n                this.DisplayValue = filled / total;\r\n\r\n                for (int cnt = 0; cnt < ratingItems.Count; cnt++)\r\n                {\r\n                    RatingItem ratingItem = ratingItems[cnt];\r\n                    if (cnt <= indexOfItem && this.SelectionMode == RatingSelectionMode.Continuous)\r\n                    {\r\n                        VisualStates.GoToState(ratingItem, true, VisualStates.StateMouseOver);\r\n                    }\r\n                    else\r\n                    {\r\n                        IUpdateVisualState updateVisualState = (IUpdateVisualState)ratingItem;\r\n                        updateVisualState.UpdateVisualState(true);\r\n                    }\r\n                }\r\n            }\r\n            else\r\n            {\r\n                this.DisplayValue = this.Value.GetValueOrDefault();\r\n\r\n                foreach (IUpdateVisualState updateVisualState in GetRatingItems().OfType<IUpdateVisualState>())\r\n                {\r\n                    updateVisualState.UpdateVisualState(true);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// This method returns a container for the item.\r\n        /// </summary>\r\n        /// <returns>A container for the item.</returns>\r\n        protected override DependencyObject GetContainerForItemOverride()\r\n        {\r\n            return new RatingItem();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether the item is its own container.\r\n        /// </summary>\r\n        /// <param name=\"item\">The item which may be a container.</param>\r\n        /// <returns>A value indicating whether the item is its own container.\r\n        /// </returns>\r\n        protected override bool IsItemItsOwnContainerOverride(object item)\r\n        {\r\n            return item is RatingItem;\r\n        }\r\n\r\n        /// <summary>\r\n        /// This method prepares a container to host an item.\r\n        /// </summary>\r\n        /// <param name=\"element\">The container.</param>\r\n        /// <param name=\"item\">The item hosted in the container.</param>\r\n        protected override void PrepareContainerForItemOverride(DependencyObject element, object item)\r\n        {\r\n            RatingItem ratingItem = (RatingItem)element;\r\n            object defaultForegroundValue = ratingItem.ReadLocalValue(Control.ForegroundProperty);\r\n            if (defaultForegroundValue == DependencyProperty.UnsetValue)\r\n            {\r\n                ratingItem.SetBinding(Control.ForegroundProperty, new Binding(\"Foreground\") { Source = this });\r\n            }\r\n\r\n            ratingItem.IsReadOnly = this.IsReadOnly;\r\n            if (ratingItem.Style == null)\r\n            {\r\n                ratingItem.Style = this.ItemContainerStyle;\r\n            }\r\n            ratingItem.Click += RatingItemClick;\r\n            ratingItem.MouseEnter += RatingItemMouseEnter;\r\n            ratingItem.MouseLeave += RatingItemMouseLeave;\r\n\r\n            ratingItem.ParentRating = this;\r\n            base.PrepareContainerForItemOverride(element, item);\r\n        }\r\n\r\n        /// <summary>\r\n        /// This method clears a container used to host an item.\r\n        /// </summary>\r\n        /// <param name=\"element\">The container that hosts the item.</param>\r\n        /// <param name=\"item\">The item hosted in the container.</param>\r\n        protected override void ClearContainerForItemOverride(DependencyObject element, object item)\r\n        {\r\n            RatingItem ratingItem = (RatingItem)element;\r\n            ratingItem.Click -= RatingItemClick;\r\n            ratingItem.MouseEnter -= RatingItemMouseEnter;\r\n            ratingItem.MouseLeave -= RatingItemMouseLeave;\r\n            ratingItem.ParentRating = null;\r\n\r\n            if (ratingItem == HoveredRatingItem)\r\n            {\r\n                HoveredRatingItem = null;\r\n                UpdateDisplayValues();\r\n                UpdateHoverStates();\r\n            }\r\n\r\n            base.ClearContainerForItemOverride(element, item);\r\n        }\r\n\r\n        /// <summary>\r\n        /// This method is invoked when a rating item's mouse enter event is\r\n        /// invoked.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source of the event.</param>\r\n        /// <param name=\"e\">Information about the event.</param>\r\n        private void RatingItemMouseEnter(object sender, MouseEventArgs e)\r\n        {\r\n            HoveredRatingItem = (RatingItem)sender;\r\n            UpdateHoverStates();\r\n        }\r\n\r\n        /// <summary>\r\n        /// This method is invoked when a rating item's mouse leave event is\r\n        /// invoked.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source of the event.</param>\r\n        /// <param name=\"e\">Information about the event.</param>\r\n        private void RatingItemMouseLeave(object sender, MouseEventArgs e)\r\n        {\r\n            HoveredRatingItem = null;\r\n            UpdateDisplayValues();\r\n            UpdateHoverStates();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a sequence of rating items.\r\n        /// </summary>\r\n        /// <returns>A sequence of rating items.</returns>\r\n        internal IEnumerable<RatingItem> GetRatingItems()\r\n        {\r\n            // The query above returns null in WPF\r\n            // Either way, WPF will already contain the RatingItem objects in the Items collection.\r\n            return this.Items.Cast<RatingItem>();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Selects a rating item.\r\n        /// </summary>\r\n        /// <param name=\"selectedRatingItem\">The selected rating item.</param>\r\n        internal void SelectRatingItem(RatingItem selectedRatingItem)\r\n        {\r\n            if (!this.IsReadOnly)\r\n            {\r\n                IList<RatingItem> ratingItems = GetRatingItems().ToList();\r\n                IEnumerable<double> weights = ratingItems.Select(ratingItem => 1.0);\r\n                double total = ratingItems.Count();\r\n                double percent;\r\n                if (total != 0)\r\n                {\r\n                    percent = weights.Take(ratingItems.IndexOf(selectedRatingItem) + 1).Sum() / total;\r\n                    this.Value = percent;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// This method is raised when a rating item value is selected.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source of the event.</param>\r\n        /// <param name=\"e\">Information about the event.</param>\r\n        private void RatingItemClick(object sender, RoutedEventArgs e)\r\n        {\r\n            if (!this.IsReadOnly)\r\n            {\r\n                RatingItem item = (RatingItem)sender;\r\n                OnRatingItemValueSelected(item, 1.0);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the selected rating item.\r\n        /// </summary>\r\n        /// <returns>The selected rating item.</returns>\r\n        private RatingItem GetSelectedRatingItem()\r\n        {\r\n            return this.GetRatingItems().LastOrDefault(ratingItem => ratingItem.Value > 0.0);\r\n        }\r\n\r\n        /// <summary>\r\n        /// This method is invoked when the rating item value is changed.\r\n        /// </summary>\r\n        /// <param name=\"ratingItem\">The rating item that has changed.</param>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        protected virtual void OnRatingItemValueSelected(RatingItem ratingItem, double newValue)\r\n        {\r\n            List<RatingItem> ratingItems = GetRatingItems().ToList();\r\n            double total = ratingItems.Count();\r\n\r\n            double value =\r\n                (ratingItems\r\n                    .Take(ratingItems.IndexOf(ratingItem))\r\n                    .Count() + newValue) / total;\r\n\r\n            this.Value = value;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a RatingItemAutomationPeer for use by the Silverlight\r\n        /// automation infrastructure.\r\n        /// </summary>\r\n        /// <returns>A RatingItemAutomationPeer object for the RatingItem.</returns>\r\n        protected override AutomationPeer OnCreateAutomationPeer()\r\n        {\r\n            return new RatingAutomationPeer(this);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Provides handling for the\r\n        /// <see cref=\"E:System.Windows.UIElement.KeyDown\" /> event when a key\r\n        /// is pressed while the control has focus.\r\n        /// </summary>\r\n        /// <param name=\"e\">\r\n        /// A <see cref=\"T:System.Windows.Input.KeyEventArgs\" /> that contains\r\n        /// the event data.\r\n        /// </param>\r\n        /// <exception cref=\"T:System.ArgumentNullException\">\r\n        /// <paramref name=\"e \" />is null.\r\n        /// </exception>\r\n        [SuppressMessage(\"Microsoft.Maintainability\", \"CA1502:AvoidExcessiveComplexity\", Justification = \"Complexity metric is inflated by the switch statements\")]\r\n        protected override void OnKeyDown(KeyEventArgs e)\r\n        {\r\n            if (!Interaction.AllowKeyDown(e))\r\n            {\r\n                return;\r\n            }\r\n\r\n            base.OnKeyDown(e);\r\n\r\n            if (e.Handled)\r\n            {\r\n                return;\r\n            }\r\n\r\n            switch (e.Key)\r\n            {\r\n                case Key.Left:\r\n                    {\r\n\r\n                        RatingItem ratingItem = null;\r\n                        if (Application.Current.CheckAccess())\r\n                            ratingItem = FocusManager.GetFocusedElement(Application.Current.MainWindow) as RatingItem;\r\n\r\n                        if (ratingItem != null)\r\n                        {\r\n                            ratingItem = GetRatingItemAtOffsetFrom(ratingItem, -1);\r\n                        }\r\n                        else\r\n                        {\r\n                            ratingItem = GetRatingItems().FirstOrDefault();\r\n                        }\r\n                        if (ratingItem != null)\r\n                        {\r\n                            if (ratingItem.Focus())\r\n                            {\r\n                                e.Handled = true;\r\n                            }\r\n                        }\r\n                    }\r\n                    break;\r\n                case Key.Right:\r\n                    {\r\n                        RatingItem ratingItem = null;\r\n                        if (Application.Current.CheckAccess())\r\n                            ratingItem = FocusManager.GetFocusedElement(Application.Current.MainWindow) as RatingItem;\r\n\r\n                        if (ratingItem != null)\r\n                        {\r\n                            ratingItem = GetRatingItemAtOffsetFrom(ratingItem, 1);\r\n                        }\r\n                        else\r\n                        {\r\n                            ratingItem = GetRatingItems().FirstOrDefault();\r\n                        }\r\n                        if (ratingItem != null)\r\n                        {\r\n                            if (ratingItem.Focus())\r\n                            {\r\n                                e.Handled = true;\r\n                            }\r\n                        }\r\n                    }\r\n                    break;\r\n                case Key.Add:\r\n                    {\r\n                        if (!this.IsReadOnly)\r\n                        {\r\n                            RatingItem ratingItem = GetSelectedRatingItem();\r\n                            if (ratingItem != null)\r\n                            {\r\n                                ratingItem = GetRatingItemAtOffsetFrom(ratingItem, 1);\r\n                            }\r\n                            else\r\n                            {\r\n                                ratingItem = GetRatingItems().FirstOrDefault();\r\n                            }\r\n                            if (ratingItem != null)\r\n                            {\r\n                                ratingItem.SelectValue();\r\n                                e.Handled = true;\r\n                            }\r\n                        }\r\n                    }\r\n                    break;\r\n                case Key.Subtract:\r\n                    {\r\n                        if (!this.IsReadOnly)\r\n                        {\r\n                            RatingItem ratingItem = GetSelectedRatingItem();\r\n                            if (ratingItem != null)\r\n                            {\r\n                                ratingItem = GetRatingItemAtOffsetFrom(ratingItem, -1);\r\n                            }\r\n                            if (ratingItem != null)\r\n                            {\r\n                                ratingItem.SelectValue();\r\n                                e.Handled = true;\r\n                            }\r\n                        }\r\n                    }\r\n                    break;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a rating item at a certain index offset from another \r\n        /// rating item.\r\n        /// </summary>\r\n        /// <param name=\"ratingItem\">The rating item.</param>\r\n        /// <param name=\"offset\">The rating item at an offset from the \r\n        /// index of the rating item.</param>\r\n        /// <returns>The rating item at the offset.</returns>\r\n        private RatingItem GetRatingItemAtOffsetFrom(RatingItem ratingItem, int offset)\r\n        {\r\n            IList<RatingItem> ratingItems = GetRatingItems().ToList();\r\n            int index = ratingItems.IndexOf(ratingItem);\r\n            if (index == -1)\r\n            {\r\n                return null;\r\n            }\r\n            index += offset;\r\n            if (index >= 0 && index < ratingItems.Count)\r\n            {\r\n                ratingItem = ratingItems[index];\r\n            }\r\n            else\r\n            {\r\n                ratingItem = null;\r\n            }\r\n            return ratingItem;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the visual state.\r\n        /// </summary>\r\n        /// <param name=\"useTransitions\">A value indicating whether to use transitions.</param>\r\n        void IUpdateVisualState.UpdateVisualState(bool useTransitions)\r\n        {\r\n            Interaction.UpdateVisualStateBase(useTransitions);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Input/Rating/System/Windows/Controls/RatingItem.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Globalization;\r\nusing System.Windows.Automation.Peers;\r\nusing System.Windows.Controls.Primitives;\r\nusing System.Windows.Input;\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// An item used in a rating control.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    [TemplateVisualState(Name = VisualStates.StateNormal, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StateMouseOver, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StatePressed, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StateDisabled, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StateReadOnly, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StateFocused, GroupName = VisualStates.GroupFocus)]\r\n    [TemplateVisualState(Name = VisualStates.StateUnfocused, GroupName = VisualStates.GroupFocus)]\r\n    [TemplateVisualState(Name = StateFilled, GroupName = GroupFill)]\r\n    [TemplateVisualState(Name = StateEmpty, GroupName = GroupFill)]\r\n    [TemplateVisualState(Name = StatePartial, GroupName = GroupFill)]\r\n    public class RatingItem : ButtonBase, IUpdateVisualState\r\n    {\r\n        /// <summary>\r\n        /// The state in which the item is filled.\r\n        /// </summary>\r\n        private const string StateFilled = \"Filled\";\r\n\r\n        /// <summary>\r\n        /// The state in which the item is empty.\r\n        /// </summary>\r\n        private const string StateEmpty = \"Empty\";\r\n\r\n        /// <summary>\r\n        /// The group that contains fill states.\r\n        /// </summary>\r\n        private const string GroupFill = \"FillStates\";\r\n\r\n        /// <summary>\r\n        /// The state in which the item is partially filled.\r\n        /// </summary>\r\n        private const string StatePartial = \"Partial\";\r\n\r\n        /// <summary>\r\n        /// The interaction helper used to get the common states working.\r\n        /// </summary>\r\n        private InteractionHelper _interactionHelper;\r\n\r\n        #region public double DisplayValue\r\n        /// <summary>\r\n        /// A value indicating whether the actual value is being set.\r\n        /// </summary>\r\n        private bool _settingDisplayValue;\r\n\r\n        /// <summary>\r\n        /// Gets the actual value.\r\n        /// </summary>\r\n        public double DisplayValue\r\n        {\r\n            get { return (double)GetValue(DisplayValueProperty); }\r\n            internal set \r\n            {\r\n                _settingDisplayValue = true;\r\n                try\r\n                {\r\n                    SetValue(DisplayValueProperty, value);\r\n                }\r\n                finally\r\n                {\r\n                    _settingDisplayValue = false;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the DisplayValue dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty DisplayValueProperty =\r\n            DependencyProperty.Register(\r\n                \"DisplayValue\",\r\n                typeof(double),\r\n                typeof(RatingItem),\r\n                new PropertyMetadata(0.0, OnDisplayValueChanged));\r\n\r\n        /// <summary>\r\n        /// DisplayValueProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">RatingItem that changed its DisplayValue.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnDisplayValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            RatingItem source = (RatingItem)d;\r\n            source.OnDisplayValueChanged((double) e.OldValue, (double) e.NewValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// DisplayValueProperty property changed handler.\r\n        /// </summary> \r\n        /// <param name=\"oldValue\">The old value.</param> \r\n        /// <param name=\"newValue\">The new value.</param>\r\n        private void OnDisplayValueChanged(double oldValue, double newValue)\r\n        {\r\n            if (!_settingDisplayValue)\r\n            {\r\n                _settingDisplayValue = true;\r\n\r\n                this.DisplayValue = oldValue;\r\n\r\n                throw new InvalidOperationException(string.Format(CultureInfo.CurrentUICulture, Properties.Resources.InvalidAttemptToChangeReadOnlyProperty, \"DisplayValue\"));\r\n            }\r\n            else\r\n            {\r\n                if (newValue <= 0.0)\r\n                {\r\n                    VisualStates.GoToState(this, true, StateEmpty);\r\n                }\r\n                else if (newValue >= 1.0)\r\n                {\r\n                    VisualStates.GoToState(this, true, StateFilled);\r\n                }\r\n                else\r\n                {\r\n                    VisualStates.GoToState(this, true, StatePartial);\r\n                }\r\n            }\r\n        }\r\n        #endregion public double DisplayValue\r\n\r\n        #region public bool IsReadOnly\r\n        /// <summary>\r\n        /// A value indicating whether the read only value is being set.\r\n        /// </summary>\r\n        private bool _settingIsReadOnly;\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether the control is read-only.\r\n        /// </summary>\r\n        public bool IsReadOnly\r\n        {\r\n            get { return (bool) GetValue(IsReadOnlyProperty); }\r\n            internal set \r\n            {\r\n                _settingIsReadOnly = true;\r\n                try\r\n                {\r\n                    SetValue(IsReadOnlyProperty, value);\r\n                }\r\n                finally\r\n                {\r\n                    _settingIsReadOnly = false;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the IsReadOnly dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty IsReadOnlyProperty =\r\n            DependencyProperty.Register(\r\n                \"IsReadOnly\",\r\n                typeof(bool),\r\n                typeof(RatingItem),\r\n                new PropertyMetadata(false, OnIsReadOnlyChanged));\r\n\r\n        /// <summary>\r\n        /// IsReadOnlyProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">RatingItem that changed its IsReadOnly.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnIsReadOnlyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            RatingItem source = (RatingItem)d;\r\n            bool oldValue = (bool)e.OldValue;\r\n            bool newValue = (bool)e.NewValue;\r\n            source.OnIsReadOnlyChanged(oldValue, newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// IsReadOnlyProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">Old value.</param>\r\n        /// <param name=\"newValue\">New value.</param>        \r\n        protected virtual void OnIsReadOnlyChanged(bool oldValue, bool newValue)\r\n        {\r\n            if (!_settingIsReadOnly)\r\n            {\r\n                _settingIsReadOnly = true;\r\n                this.IsReadOnly = oldValue;\r\n\r\n                throw new InvalidOperationException(string.Format(CultureInfo.CurrentUICulture, Properties.Resources.InvalidAttemptToChangeReadOnlyProperty, \"IsReadOnly\"));\r\n            }\r\n            else\r\n            {\r\n                _interactionHelper.OnIsReadOnlyChanged(newValue);\r\n            }\r\n        }\r\n        #endregion public bool IsReadOnly\r\n\r\n        /// <summary>\r\n        /// Gets or sets the parent rating of this rating item.\r\n        /// </summary>\r\n        internal Rating ParentRating { get; set; }\r\n\r\n        #region public double Value\r\n        /// <summary>\r\n        /// Gets or sets the value property.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1721:PropertyNamesShouldNotMatchGetMethods\", Justification = \"Value is the logical name for this property.\")]\r\n        internal double Value\r\n        {\r\n            get { return (double)GetValue(ValueProperty); }\r\n            set { SetValue(ValueProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Value dependency property.\r\n        /// </summary>\r\n        internal static readonly DependencyProperty ValueProperty =\r\n            DependencyProperty.Register(\r\n                \"Value\",\r\n                typeof(double),\r\n                typeof(RatingItem),\r\n                new PropertyMetadata(0.0));\r\n\r\n        /// <summary>\r\n        /// Selects a value and raises the value selected event.\r\n        /// </summary>\r\n        internal void SelectValue()\r\n        {\r\n            if (!this.IsReadOnly)\r\n            {\r\n                this.Value = 1.0;\r\n                OnClick();\r\n            }\r\n        }\r\n\r\n        #endregion public double Value\r\n\r\n        /// <summary>\r\n        /// Initializes the static members of the ColumnDataPoint class.\r\n        /// </summary>\r\n        static RatingItem()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(RatingItem), new FrameworkPropertyMetadata(typeof(RatingItem)));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the RatingItem class.\r\n        /// </summary>\r\n        public RatingItem()\r\n        {\r\n            _interactionHelper = new InteractionHelper(this);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Provides handling for the RatingItem's MouseLeftButtonDown event.\r\n        /// </summary>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)\r\n        {\r\n            if (_interactionHelper.AllowMouseLeftButtonDown(e))\r\n            {\r\n                _interactionHelper.OnMouseLeftButtonDownBase();\r\n            }\r\n            base.OnMouseLeftButtonDown(e);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Provides handling for the RatingItem's MouseLeftButtonUp event.\r\n        /// </summary>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)\r\n        {\r\n            if (_interactionHelper.AllowMouseLeftButtonUp(e))\r\n            {\r\n                _interactionHelper.OnMouseLeftButtonUpBase();\r\n            }\r\n            base.OnMouseLeftButtonUp(e);\r\n        }\r\n\r\n        /// <summary>\r\n        /// This method is invoked when the mouse enters the rating item.\r\n        /// </summary>\r\n        /// <param name=\"e\">Information about the event.</param>\r\n        protected override void OnMouseEnter(MouseEventArgs e)\r\n        {\r\n            if (_interactionHelper.AllowMouseEnter(e))\r\n            {\r\n                _interactionHelper.UpdateVisualStateBase(true);\r\n            }\r\n            base.OnMouseEnter(e);\r\n        }\r\n\r\n        /// <summary>\r\n        /// This method is invoked when the mouse leaves the rating item.\r\n        /// </summary>\r\n        /// <param name=\"e\">Information about the event.</param>\r\n        protected override void OnMouseLeave(MouseEventArgs e)\r\n        {\r\n            if (_interactionHelper.AllowMouseLeave(e))\r\n            {\r\n                _interactionHelper.UpdateVisualStateBase(true);\r\n            }\r\n            base.OnMouseLeave(e);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Sets the value to 1.0 when clicked.\r\n        /// </summary>\r\n        protected override void OnClick()\r\n        {\r\n            base.OnClick();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the visual state.\r\n        /// </summary>\r\n        /// <param name=\"useTransitions\">A value indicating whether to use \r\n        /// transitions.</param>\r\n        void IUpdateVisualState.UpdateVisualState(bool useTransitions)\r\n        {\r\n            _interactionHelper.UpdateVisualStateBase(useTransitions);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a AccordionItemAutomationPeer for use by the Silverlight\r\n        /// automation infrastructure.\r\n        /// </summary>\r\n        /// <returns>A AccordionItemAutomationPeer object for the AccordionItem.</returns>\r\n        protected override AutomationPeer OnCreateAutomationPeer()\r\n        {\r\n            return new RatingItemAutomationPeer(this);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Input/Rating/System/Windows/Controls/RatingSelectionMode.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// This type is used to determine the state of the item selected and the\r\n    /// previous items.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public enum RatingSelectionMode\r\n    {\r\n        /// <summary>\r\n        /// All items before the selected ones are selected.\r\n        /// </summary>\r\n        Continuous,\r\n\r\n        /// <summary>\r\n        /// Only the item selected is visually distinguished.\r\n        /// </summary>\r\n        Individual\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Input/Rating/System/Windows/Controls/Tuple.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// A structure that groups two values.\r\n    /// </summary>\r\n    /// <typeparam name=\"T0\">The type of the first value.</typeparam>\r\n    /// <typeparam name=\"T1\">The type of the second value.</typeparam>\r\n    internal class Tuple<T0, T1>\r\n    {\r\n        /// <summary>\r\n        /// Gets the first value.\r\n        /// </summary>\r\n        public T0 First { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Gets the second value.\r\n        /// </summary>\r\n        public T1 Second { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the Tuple structure.\r\n        /// </summary>\r\n        /// <param name=\"first\">The first value.</param>\r\n        /// <param name=\"second\">The second value.</param>\r\n        public Tuple(T0 first, T1 second)\r\n        {\r\n            First = first;\r\n            Second = second;\r\n        }\r\n    }     \r\n}"
  },
  {
    "path": "WpfToolkit/Input/Rating/System/Windows/Controls/TupleExtensions.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// A set of tuple functions.\r\n    /// </summary>\r\n    internal static class Tuple\r\n    {\r\n        /// <summary>\r\n        /// A method to create tuples.\r\n        /// </summary>\r\n        /// <typeparam name=\"T0\">The type of the first item.</typeparam>\r\n        /// <typeparam name=\"T1\">The type of the second item.</typeparam>\r\n        /// <param name=\"arg0\">The type of the first argument.</param>\r\n        /// <param name=\"arg1\">The type of the second argument.</param>\r\n        /// <returns>The tuple to return.</returns>\r\n        public static Tuple<T0, T1> Create<T0, T1>(T0 arg0, T1 arg1)\r\n        {\r\n            return new Tuple<T0, T1>(arg0, arg1);\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Input/Themes/Generic.xaml",
    "content": "﻿<!--\r\n// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n-->\r\n\r\n<ResourceDictionary xmlns:input=\"clr-namespace:System.Windows.Controls\" xmlns:inputToolkit=\"clr-namespace:System.Windows.Controls\" xmlns:inputToolkitPrimitives=\"clr-namespace:System.Windows.Controls.Primitives\" xmlns:sys=\"clr-namespace:System;assembly=mscorlib\" xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\">\r\n\r\n    <!--  CommonValidationToolTipTemplate  -->\r\n    <ControlTemplate x:Key=\"CommonValidationToolTipTemplate\" TargetType=\"ToolTip\">\r\n        <Grid x:Name=\"Root\" Margin=\"5,0\" RenderTransformOrigin=\"0,0\" Opacity=\"0\">\r\n            <Grid.RenderTransform>\r\n                <TranslateTransform x:Name=\"Translation\" X=\"-25\" />\r\n            </Grid.RenderTransform>\r\n\r\n            <VisualStateManager.VisualStateGroups>\r\n                <VisualStateGroup Name=\"OpenStates\">\r\n                    <VisualStateGroup.Transitions>\r\n                        <VisualTransition GeneratedDuration=\"0\" />\r\n                        <VisualTransition To=\"Open\" GeneratedDuration=\"0:0:0.2\">\r\n                            <Storyboard>\r\n                                <DoubleAnimation Storyboard.TargetName=\"Translation\" Storyboard.TargetProperty=\"X\" To=\"0\" Duration=\"0:0:0.2\" />\r\n                                <DoubleAnimation Storyboard.TargetName=\"Root\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" Duration=\"0:0:0.2\" />\r\n                            </Storyboard>\r\n                        </VisualTransition>\r\n                    </VisualStateGroup.Transitions>\r\n                    <VisualState x:Name=\"Closed\">\r\n                        <Storyboard>\r\n                            <DoubleAnimation Storyboard.TargetName=\"Root\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" Duration=\"0\" />\r\n                        </Storyboard>\r\n                    </VisualState>\r\n                    <VisualState x:Name=\"Open\">\r\n                        <Storyboard>\r\n                            <DoubleAnimation Storyboard.TargetName=\"Translation\" Storyboard.TargetProperty=\"X\" To=\"0\" Duration=\"0\" />\r\n                            <DoubleAnimation Storyboard.TargetName=\"Root\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" Duration=\"0\" />\r\n                        </Storyboard>\r\n                    </VisualState>\r\n                </VisualStateGroup>\r\n            </VisualStateManager.VisualStateGroups>\r\n\r\n            <Border Margin=\"4,4,-4,-4\" Background=\"#052A2E31\" CornerRadius=\"5\" />\r\n            <Border Margin=\"3,3,-3,-3\" Background=\"#152A2E31\" CornerRadius=\"4\" />\r\n            <Border Margin=\"2,2,-2,-2\" Background=\"#252A2E31\" CornerRadius=\"3\" />\r\n            <Border Margin=\"1,1,-1,-1\" Background=\"#352A2E31\" CornerRadius=\"2\" />\r\n\r\n            <Border Background=\"#FFDC000C\" CornerRadius=\"2\">\r\n                <TextBlock Foreground=\"White\" Margin=\"8,4,8,4\" MaxWidth=\"250\" TextWrapping=\"Wrap\" Text=\"{Binding (Validation.Errors)[0].ErrorContent}\" />\r\n            </Border>\r\n        </Grid>\r\n    </ControlTemplate>\r\n\r\n    <BooleanToVisibilityConverter x:Key=\"BooleanToVisibilityConverter\" />\r\n    \r\n    <!--  input:AutoCompleteBox  -->\r\n    <Style TargetType=\"input:AutoCompleteBox\">\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"Padding\" Value=\"2\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"#FFA3AEB9\" Offset=\"0\" />\r\n                    <GradientStop Color=\"#FF8399A9\" Offset=\"0.375\" />\r\n                    <GradientStop Color=\"#FF718597\" Offset=\"0.375\" />\r\n                    <GradientStop Color=\"#FF617584\" Offset=\"1\" />\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Background\" Value=\"#FFFFFFFF\" />\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\" />\r\n        <Setter Property=\"MinWidth\" Value=\"45\" />\r\n        <Setter Property=\"PlaceholderTemplate\">\r\n            <Setter.Value>\r\n                <DataTemplate>\r\n                    <ContentPresenter TextBlock.FontStyle=\"Italic\"  VerticalAlignment=\"Center\" Content=\"{Binding}\" Opacity=\"0.5\" Margin=\"5,0\"  />\r\n                </DataTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"input:AutoCompleteBox\">\r\n                    <Grid Opacity=\"{TemplateBinding Opacity}\">\r\n                        <ContentControl x:Name=\"Watermark\"  Content=\"{TemplateBinding Placeholder}\" ContentTemplate=\"{TemplateBinding PlaceholderTemplate}\" ContentTemplateSelector=\"{TemplateBinding PlaceholderTemplateSelector}\" IsHitTestVisible=\"False\" Panel.ZIndex=\"10\" Visibility=\"Hidden\" IsTabStop=\"False\" />\r\n                        <TextBox Padding=\"{TemplateBinding Padding}\" Background=\"{TemplateBinding Background}\" IsTabStop=\"True\" x:Name=\"Text\" Style=\"{TemplateBinding TextBoxStyle}\" BorderThickness=\"{TemplateBinding BorderThickness}\" BorderBrush=\"{TemplateBinding BorderBrush}\" Foreground=\"{TemplateBinding Foreground}\" Margin=\"0\" />\r\n                        <Border x:Name=\"ValidationErrorElement\" Visibility=\"Collapsed\" BorderBrush=\"#FFDB000C\" BorderThickness=\"1\" CornerRadius=\"1\">\r\n                            <ToolTipService.ToolTip>\r\n                                <ToolTip x:Name=\"validationTooltip\" DataContext=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\" Template=\"{StaticResource CommonValidationToolTipTemplate}\" Placement=\"Right\" PlacementTarget=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\"/>\r\n                            </ToolTipService.ToolTip>\r\n                            <Grid Height=\"12\" HorizontalAlignment=\"Right\" Margin=\"1,-4,-4,0\" VerticalAlignment=\"Top\" Width=\"12\" Background=\"Transparent\">\r\n                                <Path Fill=\"#FFDC000C\" Margin=\"1,3,0,0\" Data=\"M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z\" />\r\n                                <Path Fill=\"#ffffff\" Margin=\"1,3,0,0\" Data=\"M 0,0 L2,0 L 8,6 L8,8\" />\r\n                            </Grid>\r\n                        </Border>\r\n                        <Popup x:Name=\"Popup\">\r\n                            <Grid Opacity=\"{TemplateBinding Opacity}\" Background=\"{TemplateBinding Background}\" >\r\n                            <Border x:Name=\"PopupBorder\" HorizontalAlignment=\"Stretch\" Opacity=\"0\" BorderThickness=\"0\">\r\n                                <Border.RenderTransform>\r\n                                    <TranslateTransform X=\"1\" Y=\"1\" />\r\n                                </Border.RenderTransform>\r\n                                <Border.Background>\r\n                                    <SolidColorBrush Color=\"#11000000\" />\r\n                                </Border.Background>\r\n                                    <Border HorizontalAlignment=\"Stretch\" Opacity=\"1.0\" Padding=\"0\" BorderThickness=\"{TemplateBinding BorderThickness}\" BorderBrush=\"{TemplateBinding BorderBrush}\" CornerRadius=\"0\">\r\n                                            <Border.RenderTransform>\r\n                                                <TransformGroup>\r\n                                                    <TranslateTransform X=\"-1\" Y=\"-1\" />\r\n                                                </TransformGroup>\r\n                                            </Border.RenderTransform>\r\n                                            <Border.Background>\r\n                                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                                    <GradientStop Color=\"#FFDDDDDD\" Offset=\"0\" />\r\n                                                    <GradientStop Color=\"#AADDDDDD\" Offset=\"1\" />\r\n                                                </LinearGradientBrush>\r\n                                            </Border.Background>\r\n                                            <ListBox x:Name=\"Selector\" ScrollViewer.HorizontalScrollBarVisibility=\"Auto\" ScrollViewer.VerticalScrollBarVisibility=\"Auto\" ItemContainerStyle=\"{TemplateBinding ItemContainerStyle}\" Background=\"{TemplateBinding Background}\" Foreground=\"{TemplateBinding Foreground}\" BorderThickness=\"0\" ItemTemplate=\"{TemplateBinding ItemTemplate}\" />\r\n                                    </Border>\r\n                                </Border>\r\n                            </Grid>\r\n                        </Popup>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"PopupStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"PopupOpened\" />\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.2\" To=\"PopupClosed\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"PopupOpened\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"PopupBorder\" Storyboard.TargetProperty=\"Opacity\" To=\"1.0\" Duration=\"0:0:0.1\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"PopupClosed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"PopupBorder\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" Duration=\"0:0:0.2\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"ValidationStates\">\r\n                                <VisualState x:Name=\"Valid\" />\r\n                                <VisualState x:Name=\"InvalidUnfocused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"ValidationErrorElement\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"InvalidFocused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"ValidationErrorElement\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"validationTooltip\" Storyboard.TargetProperty=\"IsOpen\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Boolean>True</sys:Boolean>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                    </Grid>\r\n                    \r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"Text\" Value=\"\">\r\n                            <Setter TargetName=\"Watermark\" Property=\"Visibility\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  inputToolkit:Rating  -->\r\n    <Style TargetType=\"inputToolkit:Rating\">\r\n        <Setter Property=\"Background\" Value=\"#FFFFFFFF\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"#FF545454\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"0\" />\r\n        <Setter Property=\"Foreground\">\r\n            <Setter.Value>\r\n                <RadialGradientBrush Center=\"0.548,0.475\" GradientOrigin=\"0.484,0.537\">\r\n                    <GradientStop Color=\"#FFB10000\" Offset=\"1\" />\r\n                    <GradientStop Color=\"#FFF70000\" />\r\n                    <GradientStop Color=\"#FFFA0000\" Offset=\"0.043\" />\r\n                </RadialGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"ItemsPanel\">\r\n            <Setter.Value>\r\n                <ItemsPanelTemplate>\r\n                    <StackPanel Orientation=\"Horizontal\" />\r\n                </ItemsPanelTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"inputToolkit:Rating\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\" />\r\n                                <VisualState x:Name=\"Pressed\" />\r\n                                <VisualState x:Name=\"Disabled\" />\r\n                                <VisualState x:Name=\"ReadOnly\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"ReadOnlyVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.03\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\" />\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\">\r\n                            <ItemsPresenter />\r\n                        </Border>\r\n                        <Border x:Name=\"ReadOnlyVisualElement\" IsHitTestVisible=\"False\" Opacity=\"0\" Background=\"#83FFFFFF\" BorderBrush=\"#A5F7F7F7\" BorderThickness=\"{TemplateBinding BorderThickness}\" />\r\n                        <Border x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"False\" Opacity=\"0\" Background=\"#FF4D4D4D\" BorderBrush=\"#A5F7F7F7\" BorderThickness=\"{TemplateBinding BorderThickness}\" />\r\n                        <Rectangle x:Name=\"FocusVisualElement\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  inputToolkit:RatingItem  -->\r\n    <Style TargetType=\"inputToolkit:RatingItem\">\r\n        <Setter Property=\"BorderBrush\" Value=\"#FF545454\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"inputToolkit:RatingItem\">\r\n                    <Grid Background=\"{TemplateBinding Background}\" Width=\"20\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"20\" />\r\n                            <RowDefinition Height=\"Auto\" />\r\n                        </Grid.RowDefinitions>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"MouseOverRatingItem\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"MouseOverHighlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.325\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"MouseOverHighlight\" Storyboard.TargetProperty=\"(Shape.Fill).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#FF6E0000\" />\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"PressedRatingItem\" Storyboard.TargetProperty=\"(Shape.Fill).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#FFFEFEFE\" />\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"PressedRatingItem\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.39\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames  Storyboard.TargetName=\"DisabledRatingItem\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames  Storyboard.TargetName=\"DisabledRatingItemBackground\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ReadOnly\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ReadOnlyRatingItem\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard />\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FillStates\">\r\n                                <VisualState x:Name=\"Empty\" />\r\n                                <VisualState x:Name=\"Partial\" />\r\n                                <VisualState x:Name=\"Filled\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border Background=\"#02FFFFFF\" BorderThickness=\"0\" />\r\n                        <Path x:Name=\"DefaultRatingItem\" Fill=\"White\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeLineJoin=\"Round\" StrokeThickness=\"0.4\" VerticalAlignment=\"Stretch\" Opacity=\"1\" Data=\"M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z\" />\r\n                        <inputToolkitPrimitives:LinearClipper RatioVisible=\"{TemplateBinding DisplayValue}\" ExpandDirection=\"Right\">\r\n                            <Path Fill=\"{TemplateBinding Foreground}\" Stretch=\"Fill\" Stroke=\"{x:Null}\" StrokeLineJoin=\"Round\" VerticalAlignment=\"Stretch\" Opacity=\"1\" Data=\"M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z\" />\r\n                        </inputToolkitPrimitives:LinearClipper>\r\n                        <Path x:Name=\"MouseOverRatingItem\" Fill=\"{TemplateBinding Foreground}\" Stretch=\"Fill\" Stroke=\"{x:Null}\" StrokeLineJoin=\"Round\" VerticalAlignment=\"Stretch\" Opacity=\"0\" Data=\"M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z\" />\r\n                        <Path x:Name=\"MouseOverHighlight\" Fill=\"#FFFFFFFF\" Stretch=\"Fill\" Stroke=\"{x:Null}\" StrokeLineJoin=\"Round\" VerticalAlignment=\"Stretch\" Opacity=\"0\" Data=\"M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z\" />\r\n                        <Path x:Name=\"PressedRatingItem\" Stretch=\"Fill\" Stroke=\"{x:Null}\" StrokeLineJoin=\"Round\" VerticalAlignment=\"Stretch\" Data=\"M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z\" Fill=\"#82000000\" Opacity=\"0\" />\r\n                        <Path x:Name=\"FocusRatingItem\" Stretch=\"Fill\" Stroke=\"#FF6DBDD1\" StrokeLineJoin=\"Round\" StrokeThickness=\"0.01\" VerticalAlignment=\"Stretch\" Opacity=\"0\" Data=\"M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z\" />\r\n                        <Path x:Name=\"ReadOnlyRatingItem\" Fill=\"#18FFFFFF\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeLineJoin=\"Round\" StrokeThickness=\"0.4\" VerticalAlignment=\"Stretch\" Data=\"M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z\" IsHitTestVisible=\"False\" Opacity=\"0\" />\r\n                        <Path x:Name=\"DisabledRatingItemBackground\" Stretch=\"Fill\" Stroke=\"{x:Null}\" StrokeLineJoin=\"Round\" VerticalAlignment=\"Stretch\" Data=\"M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z\" Fill=\"Gainsboro\" Opacity=\"0\" />\r\n                        <inputToolkitPrimitives:LinearClipper x:Name=\"DisabledRatingItem\" RatioVisible=\"{TemplateBinding DisplayValue}\" ExpandDirection=\"Right\" Opacity=\"0\">\r\n                            <Path Stretch=\"Fill\" Stroke=\"{x:Null}\" StrokeLineJoin=\"Round\" VerticalAlignment=\"Stretch\" Opacity=\"1\" Data=\"M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z\" Fill=\"#FF5E5E5E\" />\r\n                        </inputToolkitPrimitives:LinearClipper>\r\n                        <ContentPresenter x:Name=\"Content\" Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"Left\" Margin=\"{TemplateBinding Padding}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Grid.RowSpan=\"2\" Grid.Row=\"1\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/Layout/Accordion/System/Windows/Automation/Peers/AccordionAutomationPeer.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Windows.Automation.Provider;\r\nusing System.Windows.Controls;\r\n\r\nnamespace System.Windows.Automation.Peers\r\n{\r\n    /// <summary>\r\n    /// Exposes Accordion types to UI Automation.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public class AccordionAutomationPeer : ItemsControlAutomationPeer, ISelectionProvider\r\n    {\r\n        /// <summary>\r\n        /// Gets the Accordion that owns this AccordionAutomationPeer.\r\n        /// </summary>\r\n        /// <value>The accordion.</value>\r\n        private Accordion OwnerAccordion { get { return (Accordion)Owner; } }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the <see cref=\"AccordionAutomationPeer\"/> class.\r\n        /// </summary>\r\n        /// <param name=\"owner\">The Accordion that is associated with this\r\n        /// AccordionAutomationPeer.</param>\r\n        public AccordionAutomationPeer(Accordion owner)\r\n            : base(owner)\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the name of the Accordion that is associated with this\r\n        /// AccordionAutomationPeer.  This method is called by GetClassName.\r\n        /// </summary>\r\n        /// <returns>The name Accordion.</returns>\r\n        protected override string GetClassNameCore()\r\n        {\r\n            return \"Accordion\";\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the control type for the Accordion that is associated\r\n        /// with this AccordionAutomationPeer.  This method is called by\r\n        /// GetAutomationControlType.\r\n        /// </summary>\r\n        /// <returns>List AutomationControlType.</returns>\r\n        protected override AutomationControlType GetAutomationControlTypeCore()\r\n        {\r\n            return AutomationControlType.List;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the control pattern for the Accordion that is associated\r\n        /// with this AccordionAutomationPeer.\r\n        /// </summary>\r\n        /// <param name=\"patternInterface\">The desired PatternInterface.</param>\r\n        /// <returns>The desired AutomationPeer or null.</returns>\r\n        public override object GetPattern(PatternInterface patternInterface)\r\n        {\r\n            if (patternInterface == PatternInterface.Selection)\r\n            {\r\n                return this;\r\n            }\r\n\r\n            return base.GetPattern(patternInterface);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the collection of child elements of \r\n        /// the <see cref=\"T:System.Windows.Controls.ItemsControl\"/> that is \r\n        /// associated with this <see cref=\"T:System.Windows.Automation.Peers.ItemsControlAutomationPeer\"/>.\r\n        /// </summary>\r\n        /// <returns>\r\n        /// A collection of AccordionItemAutomationPeer elements, or null if the\r\n        /// Accordion that is associated with this AccordionAutomationPeer is\r\n        /// empty.\r\n        /// </returns>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1002:DoNotExposeGenericLists\", Justification = \"Required by automation\")]\r\n        protected override List<AutomationPeer> GetChildrenCore()\r\n        {\r\n            Accordion owner = OwnerAccordion;\r\n\r\n            ItemCollection items = owner.Items;\r\n            if (items.Count <= 0)\r\n            {\r\n                return null;\r\n            }\r\n\r\n            List<AutomationPeer> peers = new List<AutomationPeer>(items.Count);\r\n            for (int i = 0; i < items.Count; i++)\r\n            {\r\n                AccordionItem element = owner.ItemContainerGenerator.ContainerFromIndex(i) as AccordionItem;\r\n                if (element != null)\r\n                {\r\n                    peers.Add(FromElement(element) ?? CreatePeerForElement(element));\r\n                }\r\n            }\r\n            return peers;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether the UI Automation provider \r\n        /// allows more than one child element to be selected concurrently.\r\n        /// </summary>\r\n        /// <returns>true if multiple selection is allowed; otherwise, false.\r\n        /// </returns>\r\n        /// <remarks>\r\n        /// This API supports the .NET Framework infrastructure and is not \r\n        /// intended to be used directly from your code.\r\n        /// </remarks>\r\n        public bool CanSelectMultiple\r\n        {\r\n            get \r\n            { \r\n                return OwnerAccordion.SelectionMode == AccordionSelectionMode.OneOrMore || \r\n                    OwnerAccordion.SelectionMode == AccordionSelectionMode.ZeroOrMore; \r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Retrieves a UI Automation provider for each child element that is \r\n        /// selected.\r\n        /// </summary>\r\n        /// <returns>An array of UI Automation providers.</returns>\r\n        /// <remarks>\r\n        /// This API supports the .NET Framework infrastructure and is not \r\n        /// intended to be used directly from your code.\r\n        /// </remarks>\r\n        public IRawElementProviderSimple[] GetSelection()\r\n        {\r\n            Accordion owner = OwnerAccordion;\r\n\r\n            List<IRawElementProviderSimple> selection = new List<IRawElementProviderSimple>(owner.SelectedIndices.Count);\r\n\r\n            foreach (int index in owner.SelectedIndices)\r\n            {\r\n                AccordionItem item = owner.ItemContainerGenerator.ContainerFromIndex(index) as AccordionItem;\r\n                if (item != null)\r\n                {\r\n                    AutomationPeer peer = FromElement(item);\r\n                    if (peer != null)\r\n                    {\r\n                        selection.Add(ProviderFromPeer(peer));\r\n                    }\r\n                }\r\n            }\r\n            return selection.ToArray();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether the UI Automation provider \r\n        /// requires at least one child element to be selected.\r\n        /// </summary>\r\n        /// <returns>true if selection is required; otherwise, false.\r\n        /// </returns>\r\n        /// <remarks>\r\n        /// This API supports the .NET Framework infrastructure and is not \r\n        /// intended to be used directly from your code.\r\n        /// </remarks>\r\n        public bool IsSelectionRequired\r\n        {\r\n            get\r\n            {\r\n                return OwnerAccordion.SelectionMode == AccordionSelectionMode.One ||\r\n                       OwnerAccordion.SelectionMode == AccordionSelectionMode.OneOrMore;\r\n            }\r\n        }\r\n\r\n#if !SILVERLIGHT\r\n        /// <summary>\r\n        /// Exposes a data item  to UI Automation.\r\n        /// </summary>\r\n        /// <param name=\"item\">The item to expose</param>\r\n        /// <returns>The UI automation object associated with the item</returns>\r\n        protected override ItemAutomationPeer CreateItemAutomationPeer(object item)\r\n        {\r\n            return new AccordionItemAutomationPeer(item, this);\r\n        }\r\n#endif\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Layout/Accordion/System/Windows/Automation/Peers/AccordionItemAutomationPeer.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Windows.Automation.Provider;\r\nusing System.Windows.Controls;\r\n\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Automation.Peers.AccordionItemAutomationPeer.#System.Windows.Automation.Provider.IExpandCollapseProvider.Collapse()\", Justification = \"Required for subset compat with WPF\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Automation.Peers.AccordionItemAutomationPeer.#System.Windows.Automation.Provider.IExpandCollapseProvider.Expand()\", Justification = \"Required for subset compat with WPF\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Automation.Peers.AccordionItemAutomationPeer.#System.Windows.Automation.Provider.IExpandCollapseProvider.ExpandCollapseState\", Justification = \"Required for subset compat with WPF\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Automation.Peers.AccordionItemAutomationPeer.#System.Windows.Automation.Provider.ISelectionItemProvider.AddToSelection()\", Justification = \"Required for subset compat with WPF\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Automation.Peers.AccordionItemAutomationPeer.#System.Windows.Automation.Provider.ISelectionItemProvider.IsSelected\", Justification = \"Required for subset compat with WPF\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Automation.Peers.AccordionItemAutomationPeer.#System.Windows.Automation.Provider.ISelectionItemProvider.RemoveFromSelection()\", Justification = \"Required for subset compat with WPF\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Automation.Peers.AccordionItemAutomationPeer.#System.Windows.Automation.Provider.ISelectionItemProvider.Select()\", Justification = \"Required for subset compat with WPF\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\", Scope = \"member\", Target = \"System.Windows.Automation.Peers.AccordionItemAutomationPeer.#System.Windows.Automation.Provider.ISelectionItemProvider.SelectionContainer\", Justification = \"Required for subset compat with WPF\")]\r\n\r\nnamespace System.Windows.Automation.Peers\r\n{\r\n    /// <summary>\r\n    /// Exposes AccordionItem types to UI Automation.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n#if SILVERLIGHT\r\n    public class AccordionItemAutomationPeer : FrameworkElementAutomationPeer, IExpandCollapseProvider, ISelectionItemProvider\r\n#else\r\n    public class AccordionItemAutomationPeer : ItemAutomationPeer, IExpandCollapseProvider, ISelectionItemProvider\r\n#endif\r\n    {\r\n        /// <summary>\r\n        /// Gets the AccordionItem that owns this AccordionItemAutomationPeer.\r\n        /// </summary>\r\n        private AccordionItem OwnerAccordionItem\r\n        {\r\n#if SILVERLIGHT\r\n            get { return (AccordionItem)Owner; }\r\n#else\r\n            get { return base.Item as AccordionItem; }\r\n#endif\r\n        }\r\n\r\n#if SILVERLIGHT\r\n        /// <summary>\r\n        /// Initializes a new instance of the AccordionAutomationPeer class.\r\n        /// </summary>\r\n        /// <param name=\"owner\">\r\n        /// The Accordion that is associated with this\r\n        /// AccordionAutomationPeer.\r\n        /// </param>\r\n        public AccordionItemAutomationPeer(AccordionItem owner)\r\n            : base(owner)\r\n        {\r\n        }\r\n#else\r\n        /// <summary>\r\n        /// Initializes a new instance of the AccordionAutomationPeer class.\r\n        /// </summary>\r\n        /// <param name=\"item\">\r\n        /// The item associated with this AutomationPeer \r\n        /// </param>\r\n        /// <param name=\"itemsControlAutomationPeer\">\r\n        /// The Accordion that is associated with this item.\r\n        /// </param>\r\n        public AccordionItemAutomationPeer(object item, ItemsControlAutomationPeer itemsControlAutomationPeer)\r\n            : base(item, itemsControlAutomationPeer)\r\n        {\r\n        }\r\n#endif\r\n\r\n        /// <summary>\r\n        /// Gets the control type for the AccordionItem that is associated\r\n        /// with this AccordionItemAutomationPeer.  This method is called by\r\n        /// GetAutomationControlType.\r\n        /// </summary>\r\n        /// <returns>Custom AutomationControlType.</returns>\r\n        protected override AutomationControlType GetAutomationControlTypeCore()\r\n        {\r\n            return AutomationControlType.ListItem;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the name of the AccordionItem that is associated with this\r\n        /// AccordionItemAutomationPeer.  This method is called by GetClassName.\r\n        /// </summary>\r\n        /// <returns>The name AccordionItem.</returns>\r\n        protected override string GetClassNameCore()\r\n        {\r\n            return \"AccordionItem\";\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the control pattern for the AccordionItem that is associated\r\n        /// with this AccordionItemAutomationPeer.\r\n        /// </summary>\r\n        /// <param name=\"patternInterface\">The desired PatternInterface.</param>\r\n        /// <returns>The desired AutomationPeer or null.</returns>\r\n        public override object GetPattern(PatternInterface patternInterface)\r\n        {\r\n            if (patternInterface == PatternInterface.ExpandCollapse ||\r\n                patternInterface == PatternInterface.SelectionItem)\r\n            {\r\n                return this;\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the state (expanded or collapsed) of the Accordion.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// This API supports the .NET Framework infrastructure and is not \r\n        /// intended to be used directly from your code.\r\n        /// </remarks>\r\n        ExpandCollapseState IExpandCollapseProvider.ExpandCollapseState\r\n        {\r\n            get\r\n            {\r\n                return OwnerAccordionItem.IsSelected ? ExpandCollapseState.Expanded : ExpandCollapseState.Collapsed;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Collapses the AccordionItem.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// This API supports the .NET Framework infrastructure and is not \r\n        /// intended to be used directly from your code.\r\n        /// </remarks>\r\n        void IExpandCollapseProvider.Collapse()\r\n        {\r\n            if (!IsEnabled())\r\n            {\r\n                throw new ElementNotEnabledException();\r\n            }\r\n\r\n            AccordionItem owner = OwnerAccordionItem;\r\n            if (owner.IsLocked)\r\n            {\r\n                throw new InvalidOperationException(Controls.Properties.Resources.Automation_OperationCannotBePerformed);\r\n            }\r\n\r\n            owner.IsSelected = false;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Expands the AccordionItem.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// This API supports the .NET Framework infrastructure and is not \r\n        /// intended to be used directly from your code.\r\n        /// </remarks>\r\n        void IExpandCollapseProvider.Expand()\r\n        {\r\n            if (!IsEnabled())\r\n            {\r\n                throw new ElementNotEnabledException();\r\n            }\r\n\r\n            AccordionItem owner = OwnerAccordionItem;\r\n            if (owner.IsLocked)\r\n            {\r\n                throw new InvalidOperationException(Controls.Properties.Resources.Automation_OperationCannotBePerformed);\r\n            }\r\n\r\n            owner.IsSelected = true;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Adds the AccordionItem to the collection of selected items.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// This API supports the .NET Framework infrastructure and is not \r\n        /// intended to be used directly from your code.\r\n        /// </remarks>\r\n        void ISelectionItemProvider.AddToSelection()\r\n        {\r\n            AccordionItem owner = OwnerAccordionItem;\r\n            Accordion parent = owner.ParentAccordion;\r\n            if (parent == null)\r\n            {\r\n                throw new InvalidOperationException(Controls.Properties.Resources.Automation_OperationCannotBePerformed);\r\n            }\r\n            parent.SelectedItems.Add(owner);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether the Accordion is selected.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// This API supports the .NET Framework infrastructure and is not \r\n        /// intended to be used directly from your code.\r\n        /// </remarks>\r\n        bool ISelectionItemProvider.IsSelected\r\n        {\r\n            get { return OwnerAccordionItem.IsSelected; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes the current Accordion from the collection of selected\r\n        /// items.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// This API supports the .NET Framework infrastructure and is not \r\n        /// intended to be used directly from your code.\r\n        /// </remarks>\r\n        void ISelectionItemProvider.RemoveFromSelection()\r\n        {\r\n            AccordionItem owner = OwnerAccordionItem;\r\n            Accordion parent = owner.ParentAccordion;\r\n            if (parent == null)\r\n            {\r\n                throw new InvalidOperationException(Controls.Properties.Resources.Automation_OperationCannotBePerformed);\r\n            }\r\n            parent.SelectedItems.Remove(owner);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Clears selection from currently selected items and then proceeds to\r\n        /// select the current Accordion.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// This API supports the .NET Framework infrastructure and is not \r\n        /// intended to be used directly from your code.\r\n        /// </remarks>\r\n        void ISelectionItemProvider.Select()\r\n        {\r\n            OwnerAccordionItem.IsSelected = true;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the UI Automation provider that implements ISelectionProvider\r\n        /// and acts as the container for the calling object.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// This API supports the .NET Framework infrastructure and is not \r\n        /// intended to be used directly from your code.\r\n        /// </remarks>\r\n        IRawElementProviderSimple ISelectionItemProvider.SelectionContainer\r\n        {\r\n            get\r\n            {\r\n                Accordion parent = OwnerAccordionItem.ParentAccordion;\r\n                if (parent != null)\r\n                {\r\n#if SILVERLIGHT\r\n                    AutomationPeer peer = FromElement(parent);\r\n#else\r\n                    AutomationPeer peer = UIElementAutomationPeer.FromElement(parent);\r\n#endif\r\n                    if (peer != null)\r\n                    {\r\n                        return ProviderFromPeer(peer);\r\n                    }\r\n                }\r\n                return null;\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Layout/Accordion/System/Windows/Automation/Peers/AccordionItemWrapperAutomationPeer.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Windows.Automation.Provider;\r\nusing System.Windows.Controls;\r\n\r\nnamespace System.Windows.Automation.Peers\r\n{\r\n    /// <summary>\r\n    /// Wraps an <see cref=\"T:System.Windows.Controls.AccordionItem\" />.\r\n    /// </summary>\r\n    public class AccordionItemWrapperAutomationPeer : FrameworkElementAutomationPeer\r\n    {\r\n        /// <summary>\r\n        /// Constructor\r\n        /// </summary>\r\n        /// <param name=\"item\">The <see cref=\"T:System.Windows.Controls.AccordionItem\" /> to wrap.</param>\r\n        public AccordionItemWrapperAutomationPeer(AccordionItem item)\r\n            : base(item)\r\n        {\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Layout/Accordion/System/Windows/Controls/Accordion.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Collections.Specialized;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Windows.Automation.Peers;\r\nusing System.Windows.Data;\r\nusing System.Windows.Controls.Primitives;\r\nusing System.Windows.Input;\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Represents a collection of collapsed and expanded AccordionItem controls.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    [StyleTypedProperty(Property = \"ItemContainerStyle\", StyleTargetType = typeof(AccordionItem))]\r\n    [StyleTypedProperty(Property = AccordionButtonStyleName, StyleTargetType = typeof(AccordionButton))]\r\n    [TemplateVisualState(Name = VisualStates.StateNormal, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StateMouseOver, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StatePressed, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StateDisabled, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StateFocused, GroupName = VisualStates.GroupFocus)]\r\n    [TemplateVisualState(Name = VisualStates.StateUnfocused, GroupName = VisualStates.GroupFocus)]\r\n    public class Accordion : ItemsControl, IUpdateVisualState\r\n    {\r\n        /// <summary>\r\n        /// The items that are currently waiting to perform an action.\r\n        /// </summary>\r\n        /// <remarks>An action can be expanding, resizing or collapsing.</remarks>\r\n        private readonly List<AccordionItem> _scheduledActions;\r\n\r\n        /// <summary>\r\n        /// The name used to indicate AccordionButtonStyle property.\r\n        /// </summary>\r\n        private const string AccordionButtonStyleName = \"AccordionButtonStyle\";\r\n\r\n        /// <summary>\r\n        /// Determines whether the SelectedItemsProperty may be written.\r\n        /// </summary>\r\n        private bool _isAllowedToWriteSelectedItems;\r\n\r\n        /// <summary>\r\n        /// Determines whether the SelectedIndicesProperty may be written.\r\n        /// </summary>\r\n        private bool _isAllowedToWriteSelectedIndices;\r\n        \r\n        /// <summary>\r\n        /// Indicates that changes to the SelectedIndices collection should\r\n        /// be ignored.\r\n        /// </summary>\r\n        private bool _isIgnoringSelectedIndicesChanges;\r\n\r\n        /// <summary>\r\n        /// Indicates that changes to the SelectedItems collection should\r\n        /// be ignored.\r\n        /// </summary>\r\n        private bool _isIgnoringSelectedItemsChanges;\r\n\r\n        /// <summary>\r\n        /// Determines whether we are currently in the SelectedItems Collection\r\n        /// Changed handling.\r\n        /// </summary>\r\n        private bool _isInSelectedItemsCollectionChanged;\r\n\r\n        /// <summary>\r\n        /// Determines whether we are currently in the SelectedIndices Collection\r\n        /// Changed handling.\r\n        /// </summary>\r\n        private bool _isInSelectedIndicesCollectionChanged;\r\n\r\n        /// <summary>\r\n        /// The item that is currently visually performing an action.\r\n        /// </summary>\r\n        /// <remarks>An action can be expanding, resizing or collapsing.</remarks>\r\n        private AccordionItem _currentActioningItem;\r\n\r\n        /// <summary>\r\n        /// Gets the ItemsControlHelper that is associated with this control.\r\n        /// </summary>\r\n        internal ItemsControlHelper ItemsControlHelper { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether this instance is currently resizing.\r\n        /// </summary>\r\n        /// <value>True if this instance is resizing; otherwise, false.</value>\r\n        internal bool IsResizing { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the helper that provides all of the standard\r\n        /// interaction functionality.\r\n        /// </summary>\r\n        private InteractionHelper Interaction { get; set; }\r\n\r\n        #region public ExpandDirection ExpandDirection\r\n        /// <summary>\r\n        /// Gets or sets the ExpandDirection property of each \r\n        /// AccordionItem in the Accordion control and the direction in which\r\n        /// the Accordion does layout.\r\n        /// </summary>\r\n        /// <remarks>Setting the ExpandDirection will set the expand direction \r\n        /// on the accordionItems.</remarks>\r\n        public ExpandDirection ExpandDirection\r\n        {\r\n            get { return (ExpandDirection)GetValue(ExpandDirectionProperty); }\r\n            set { SetValue(ExpandDirectionProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ExpandDirection dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ExpandDirectionProperty =\r\n            DependencyProperty.Register(\r\n                \"ExpandDirection\",\r\n                typeof(ExpandDirection),\r\n                typeof(Accordion),\r\n                new PropertyMetadata(ExpandDirection.Down, OnExpandDirectionPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// ExpandDirectionProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">Accordion that changed its ExpandDirection.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnExpandDirectionPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            Accordion source = (Accordion)d;\r\n            ExpandDirection expandDirection = (ExpandDirection)e.NewValue;\r\n\r\n            if (expandDirection != ExpandDirection.Down &&\r\n                expandDirection != ExpandDirection.Up &&\r\n                expandDirection != ExpandDirection.Left &&\r\n                expandDirection != ExpandDirection.Right)\r\n            {\r\n                // revert to old value\r\n                source.SetValue(ExpandDirectionProperty, e.OldValue);\r\n\r\n                string message = string.Format(\r\n                    CultureInfo.InvariantCulture,\r\n                    Properties.Resources.Accordion_OnExpandDirectionPropertyChanged_InvalidValue,\r\n                    expandDirection);\r\n\r\n                throw new ArgumentOutOfRangeException(\"e\", message);\r\n            }\r\n\r\n            // force this change to all AccordionItems\r\n            for (int i = 0; i < source.Items.Count; i++)\r\n            {\r\n                AccordionItem accordionItem = source.ItemContainerGenerator.ContainerFromIndex(i) as AccordionItem;\r\n\r\n                if (accordionItem != null)\r\n                {\r\n                    accordionItem.ExpandDirection = expandDirection;\r\n                }\r\n            }\r\n\r\n            // set panel to align to the change\r\n            source.SetPanelOrientation();\r\n\r\n            // schedule a layout pass after this panel has had time to rearrange.\r\n            source.Dispatcher.BeginInvoke(new Action(source.LayoutChildren));\r\n        }\r\n        #endregion public ExpandDirection ExpandDirection\r\n\r\n        #region public AccordionSelectionMode SelectionMode\r\n        /// <summary>\r\n        /// Gets or sets the AccordionSelectionMode used to determine the minimum \r\n        /// and maximum selected AccordionItems allowed in the Accordion.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Multi\", Justification = \"WPF has a MultiSelector class that will be used in the future.\")]\r\n        public AccordionSelectionMode SelectionMode\r\n        {\r\n            get { return (AccordionSelectionMode)GetValue(SelectionModeProperty); }\r\n            set { SetValue(SelectionModeProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the SelectionMode dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty SelectionModeProperty =\r\n            DependencyProperty.Register(\r\n                \"SelectionMode\",\r\n                typeof(AccordionSelectionMode),\r\n                typeof(Accordion),\r\n                new PropertyMetadata(AccordionSelectionMode.One, OnSelectionModePropertyChanged));\r\n\r\n        /// <summary>\r\n        /// SelectionModeProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">Accordion that changed its SelectionMode.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnSelectionModePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            Accordion source = (Accordion)d;\r\n\r\n            AccordionSelectionMode newValue = (AccordionSelectionMode)e.NewValue;\r\n\r\n            if (newValue != AccordionSelectionMode.One &&\r\n                newValue != AccordionSelectionMode.OneOrMore &&\r\n                newValue != AccordionSelectionMode.ZeroOrMore &&\r\n                newValue != AccordionSelectionMode.ZeroOrOne)\r\n            {\r\n                // revert to old value\r\n                source.SetValue(SelectionModeProperty, e.OldValue);\r\n\r\n                string message = string.Format(\r\n                    CultureInfo.InvariantCulture,\r\n                    Properties.Resources.Accordion_OnSelectionModePropertyChanged_InvalidValue,\r\n                    newValue);\r\n\r\n                throw new ArgumentOutOfRangeException(\"e\", message);\r\n            }\r\n\r\n            // unlock all items\r\n            // a selectionmode change is expected to change the locks.\r\n            for (int i = 0; i < source.Items.Count; i++)\r\n            {\r\n                AccordionItem item = source.ItemContainerGenerator.ContainerFromIndex(i) as AccordionItem;\r\n                if (item != null)\r\n                {\r\n                    item.IsLocked = false;\r\n                }\r\n            }\r\n\r\n            // single selection coercion\r\n            if (source.IsMinimumOneSelected)\r\n            {\r\n                // a minimum of one item should be selected\r\n                if (source.GetValue(SelectedItemProperty) == null && source.Items.Count > 0)\r\n                {\r\n                    // select first accordionitem\r\n                    source.SetValue(SelectedItemProperty, source.Items[0]);\r\n                }\r\n            }\r\n\r\n            // multi selection coeercion\r\n            if (source.IsMaximumOneSelected)\r\n            {\r\n                // allow at most one item.\r\n                if (source.SelectedIndices.Count > 1)\r\n                {\r\n                    // make copy of collection, since it will be modified\r\n                    List<int> indices = source.SelectedIndices.ToList();\r\n                    foreach (int index in indices)\r\n                    {\r\n                        // unselect all items except the currently selected item.\r\n                        if (index != source.SelectedIndex)\r\n                        {\r\n                            source.UnselectItem(index, null);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            // re-evaluate the locking status of the items in this new configuration\r\n            source.SetLockedProperties();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether at least one item is selected at \r\n        /// all times.\r\n        /// </summary>\r\n        private bool IsMinimumOneSelected\r\n        {\r\n            get\r\n            {\r\n                return SelectionMode == AccordionSelectionMode.One || SelectionMode == AccordionSelectionMode.OneOrMore;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether at most one item is selected at all times.\r\n        /// </summary>\r\n        private bool IsMaximumOneSelected\r\n        {\r\n            get\r\n            {\r\n                return SelectionMode == AccordionSelectionMode.One || SelectionMode == AccordionSelectionMode.ZeroOrOne;\r\n            }\r\n        }\r\n        #endregion public AccordionSelectionMode SelectionMode\r\n\r\n        #region public object SelectedItem\r\n        /// <summary>\r\n        /// Gets or sets the selected item.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// The default value is null.\r\n        /// When multiple items are allowed (IsMaximumOneSelected false), \r\n        /// return the first of the selectedItems.\r\n        /// </remarks>\r\n        public object SelectedItem\r\n        {\r\n            get { return GetValue(SelectedItemProperty); }\r\n            set { SetValue(SelectedItemProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the SelectedItem dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty SelectedItemProperty =\r\n            DependencyProperty.Register(\r\n                \"SelectedItem\",\r\n                typeof(object),\r\n                typeof(Accordion),\r\n                new PropertyMetadata(null, OnSelectedItemPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// SelectedItemProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">Accordion that changed its SelectedItem.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnSelectedItemPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            Accordion source = (Accordion)d;\r\n\r\n            object oldValue = e.OldValue;\r\n            object newValue = e.NewValue;\r\n            object[] newValues = newValue == null ? new object[0] : new[] { newValue };\r\n            object[] oldValues = oldValue == null ? new object[0] : new[] { oldValue };\r\n\r\n            if (oldValue != null && oldValue.Equals(newValue))\r\n            {\r\n                // when value types are used as items, there is a possibility of getting a change notification.\r\n#if SILVERLIGHT\r\n                source.OnSelectedItemChanged(new SelectionChangedEventArgs(oldValues, newValues));\r\n#else\r\n                source.OnSelectedItemChanged(new SelectionChangedEventArgs(SelectionChangedEvent, oldValues, newValues));\r\n#endif\r\n                return;\r\n            }\r\n\r\n            if (!source.IsValidItemForSelection(newValue))\r\n            {\r\n                // reset to oldvalue\r\n                source._selectedItemNestedLevel++;\r\n                source.SetValue(SelectedItemProperty, oldValue);\r\n                source._selectedItemNestedLevel--;\r\n            }\r\n            else if (source._selectedItemNestedLevel == 0)\r\n            {\r\n                if (newValue == null)\r\n                {\r\n                    source.SelectedIndex = -1;\r\n                }\r\n                else\r\n                {\r\n                    // be cautious about choosing a new index.\r\n                    int currentIndex = source.SelectedIndex;\r\n                    // use current SelectedIndex if possible\r\n                    if (currentIndex < 0 || currentIndex > source.Items.Count || !newValue.Equals(source.Items[currentIndex]))\r\n                    {\r\n                        // use an index out of SelectedIndices if possible\r\n                        // or fallback to finding the index in the ItemsCollection\r\n                        IEnumerable<int> validIndices = source.SelectedIndices.Where(i => i >= 0 && i < source.Items.Count && newValue.Equals(source.Items[i]));\r\n                        currentIndex = validIndices.Count() > 0 ? validIndices.First() : source.Items.IndexOf(newValue);\r\n                    }\r\n                    source.SelectedIndex = currentIndex;\r\n                }\r\n\r\n#if SILVERLIGHT\r\n                source.OnSelectedItemChanged(new SelectionChangedEventArgs(oldValues, newValues));\r\n#else\r\n                source.OnSelectedItemChanged(new SelectionChangedEventArgs(SelectionChangedEvent, oldValues, newValues));\r\n#endif\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Determines whether the new value can be selected.\r\n        /// </summary>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        /// <returns>\r\n        /// <c>True</c> if this item can be selected; otherwise, <c>false</c>.\r\n        /// </returns>\r\n        private bool IsValidItemForSelection(object newValue)\r\n        {\r\n            // setting to null is supported in some cases\r\n            if (newValue == null)\r\n            {\r\n                // we can always return something since null is not a valid item.\r\n                // if accordion allows no selection, null is accepted\r\n                // if there are currently no items, null is accepted\r\n                return (IsMinimumOneSelected == false || Items.Count == 0);\r\n            }\r\n\r\n            // item should be contained inside the items collection.\r\n            return Items.OfType<object>().Contains(newValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Nested level for SelectedItemCoercion.\r\n        /// </summary>\r\n        private int _selectedItemNestedLevel;\r\n\r\n        #endregion public object SelectedItem\r\n\r\n        #region public int SelectedIndex\r\n        /// <summary>\r\n        /// Gets or sets the index of the currently selected AccordionItem.\r\n        /// </summary>\r\n        public int SelectedIndex\r\n        {\r\n            get { return (int)GetValue(SelectedIndexProperty); }\r\n            set { SetValue(SelectedIndexProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the SelectedIndex dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty SelectedIndexProperty =\r\n            DependencyProperty.Register(\r\n                \"SelectedIndex\",\r\n                typeof(int),\r\n                typeof(Accordion),\r\n                new PropertyMetadata(-1, OnSelectedIndexPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// SelectedIndexProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">Accordion that changed its SelectedIndex.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnSelectedIndexPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            Accordion source = (Accordion)d;\r\n            int oldValue = (int)e.OldValue;\r\n            int newValue = (int)e.NewValue;\r\n\r\n            // SelectedIndex will be changed when modifying the SelectionCollections.\r\n            // Those should not trigger changes in the SelectedIndex.\r\n            if (source._isIgnoringSelectedIndicesChanges)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (!source.IsValidIndexForSelection(newValue))\r\n            {\r\n                // oldvalue might not be valid anymore (because of items removed from collection)\r\n                if (source.IsValidIndexForSelection(oldValue))\r\n                {\r\n                    // oldvalue is valid, repress events\r\n                    source._selectedIndexNestedLevel++;\r\n                    source.SetValue(SelectedIndexProperty, oldValue);\r\n                    source._selectedIndexNestedLevel--;\r\n                }\r\n                else\r\n                {\r\n                    // select new\r\n                    source.SetValue(SelectedIndexProperty, source.ProposeSelectedIndexCandidate(newValue));\r\n                }\r\n            }\r\n            else if (source._selectedIndexNestedLevel == 0)\r\n            {\r\n                // synchronize with SelectedItem\r\n#if SILVERLIGHT\r\n                source.SelectedItem = source.Items.ElementAtOrDefault(newValue);\r\n#else\r\n                // In .NET 3.5, ElementAtOrDefault will throw an exception when newValue is out of bounds.\r\n                // Avoid the exception by explicitly checking the value is within the bounds\r\n                source.SelectedItem = (newValue >= 0 && newValue < source.Items.Count) ? source.Items[newValue] : null;\r\n#endif\r\n\r\n                // SelectedIndex is responsible for kicking off the real work.\r\n                source.ChangeSelectedIndex(oldValue, newValue);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Determines whether the new value can be selected.\r\n        /// </summary>\r\n        /// <param name=\"newValue\">The new value.</param>\r\n        /// <returns>\r\n        /// <c>True</c> if this item can be selected; otherwise, <c>false</c>.\r\n        /// </returns>\r\n        private bool IsValidIndexForSelection(int newValue)\r\n        {\r\n            // setting to null is supported in some cases\r\n            if (newValue == -1)\r\n            {\r\n                // we can always return something since null is not a valid item.\r\n                // if accordion allows no selection, null is accepted\r\n                // if there are currently no items, null is accepted\r\n                return (IsMinimumOneSelected == false || Items.Count == 0);\r\n            }\r\n\r\n            // index should be contained inside the items collection.\r\n            return newValue >= 0 && newValue < Items.Count;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Coercion level.\r\n        /// </summary>\r\n        private int _selectedIndexNestedLevel;\r\n        #endregion public int SelectedIndex\r\n\r\n        #region public SelectionSequence SelectionSequence\r\n        /// <summary>\r\n        /// Gets or sets the SelectionSequence used to determine \r\n        /// the order of AccordionItem selection.\r\n        /// </summary>\r\n        public SelectionSequence SelectionSequence\r\n        {\r\n            get { return (SelectionSequence)GetValue(SelectionSequenceProperty); }\r\n            set { SetValue(SelectionSequenceProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the SelectionSequence dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty SelectionSequenceProperty =\r\n            DependencyProperty.Register(\r\n                \"SelectionSequence\",\r\n                typeof(SelectionSequence),\r\n                typeof(Accordion),\r\n                new PropertyMetadata(SelectionSequence.Simultaneous, OnSelectionSequencePropertyChanged));\r\n\r\n        /// <summary>\r\n        /// Called when SelectionSequenceProperty changed.\r\n        /// </summary>\r\n        /// <param name=\"d\">Accordion that changed its SelectionSequence property.</param>\r\n        /// <param name=\"e\">The <see cref=\"System.Windows.DependencyPropertyChangedEventArgs\"/> \r\n        /// instance containing the event data.</param>\r\n        private static void OnSelectionSequencePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            SelectionSequence newValue = (SelectionSequence)e.NewValue;\r\n\r\n            if (newValue != SelectionSequence.CollapseBeforeExpand &&\r\n                newValue != SelectionSequence.Simultaneous)\r\n            {\r\n                // revert to old value\r\n                d.SetValue(Accordion.SelectionSequenceProperty, e.OldValue);\r\n\r\n                string message = string.Format(\r\n                    CultureInfo.InvariantCulture,\r\n                    Properties.Resources.Accordion_OnSelectionSequencepropertyChanged_InvalidValue,\r\n                    newValue);\r\n                throw new ArgumentOutOfRangeException(\"e\", message);\r\n            }\r\n        }\r\n        #endregion public SelectionSequence SelectionSequence\r\n\r\n        #region public IList SelectedItems\r\n        /// <summary>\r\n        /// Gets the selected items.\r\n        /// </summary>\r\n        /// <remarks>Does not allow setting.</remarks>\r\n        public IList SelectedItems\r\n        {\r\n            get { return GetValue(SelectedItemsProperty) as IList; }\r\n            private set\r\n            {\r\n                _isAllowedToWriteSelectedItems = true;\r\n                SetValue(SelectedItemsProperty, value);\r\n                _isAllowedToWriteSelectedItems = false;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the SelectedItems dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty SelectedItemsProperty =\r\n            DependencyProperty.Register(\r\n                \"SelectedItems\",\r\n                typeof(IList),\r\n                typeof(Accordion),\r\n                new PropertyMetadata(OnSelectedItemsChanged));\r\n\r\n        /// <summary>\r\n        /// Property changed handler of SelectedItems.\r\n        /// </summary>\r\n        /// <param name=\"d\">Accordion that changed the collection.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnSelectedItemsChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            Accordion accordion = (Accordion)d;\r\n\r\n            if (!accordion._isAllowedToWriteSelectedItems)\r\n            {\r\n                // revert to old value\r\n                accordion.SelectedItems = e.OldValue as IList;\r\n\r\n                throw new InvalidOperationException(Properties.Resources.Accordion_OnSelectedItemsChanged_InvalidWrite);\r\n            }\r\n        }\r\n        #endregion public IList SelectedItems\r\n\r\n        #region public IList<int> SelectedIndices\r\n        /// <summary>\r\n        /// Gets the indices of the currently selected AccordionItems.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1726:UsePreferredTerms\", MessageId = \"Indices\", Justification = \"Framework uses indices.\")]\r\n        public IList<int> SelectedIndices\r\n        {\r\n            get { return GetValue(SelectedIndicesProperty) as IList<int>; }\r\n            private set\r\n            {\r\n                _isAllowedToWriteSelectedIndices = true;\r\n                SetValue(SelectedIndicesProperty, value);\r\n                _isAllowedToWriteSelectedIndices = false;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the SelectedIndices dependency property.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1726:UsePreferredTerms\", MessageId = \"Indices\", Justification = \"Framework uses indices.\")]\r\n        public static readonly DependencyProperty SelectedIndicesProperty =\r\n            DependencyProperty.Register(\r\n                \"SelectedIndices\",\r\n                typeof(IList<int>),\r\n                typeof(Accordion),\r\n                new PropertyMetadata(null, OnSelectedIndicesChanged));\r\n\r\n        /// <summary>\r\n        /// Property changed handler of SelectedIndices.\r\n        /// </summary>\r\n        /// <param name=\"d\">Accordion that changed the collection.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnSelectedIndicesChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            Accordion accordion = (Accordion)d;\r\n\r\n            if (!accordion._isAllowedToWriteSelectedIndices)\r\n            {\r\n                // revert to old value\r\n                accordion.SelectedIndices = e.OldValue as IList<int>;\r\n\r\n                throw new InvalidOperationException(Properties.Resources.Accordion_OnSelectedIndicesChanged_InvalidWrite);\r\n            }\r\n        }\r\n        #endregion public IList<int> SelectedIndices\r\n\r\n#if SILVERLIGHT\r\n        #region public Style ItemContainerStyle\r\n\r\n        /// <summary>\r\n        /// Gets or sets the Style that is applied to the container element\r\n        /// generated for each item.\r\n        /// </summary>\r\n        public Style ItemContainerStyle\r\n        {\r\n            get { return GetValue(ItemContainerStyleProperty) as Style; }\r\n            set { SetValue(ItemContainerStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ItemContainerStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ItemContainerStyleProperty =\r\n            DependencyProperty.Register(\r\n                \"ItemContainerStyle\",\r\n                typeof(Style),\r\n                typeof(Accordion),\r\n                new PropertyMetadata(null, OnItemContainerStylePropertyChanged));\r\n\r\n        /// <summary>\r\n        /// ItemContainerStyleProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">\r\n        /// TreeView that changed its ItemContainerStyle.\r\n        /// </param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnItemContainerStylePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            Accordion source = (Accordion)d;\r\n            Style value = e.NewValue as Style;\r\n            source.ItemsControlHelper.UpdateItemContainerStyle(value);\r\n        }\r\n        #endregion public Style ItemContainerStyle\r\n#endif\r\n        #region public Style AccordionButtonStyle\r\n        /// <summary>\r\n        /// Gets or sets the Style that is applied to AccordionButton elements\r\n        /// in the AccordionItems.\r\n        /// </summary>\r\n        public Style AccordionButtonStyle\r\n        {\r\n            get { return GetValue(AccordionButtonStyleProperty) as Style; }\r\n            set { SetValue(AccordionButtonStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the AccordionButtonStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty AccordionButtonStyleProperty =\r\n            DependencyProperty.Register(\r\n                AccordionButtonStyleName,\r\n                typeof(Style),\r\n                typeof(Accordion),\r\n                new PropertyMetadata(null, OnAccordionButtonStylePropertyChanged));\r\n\r\n        /// <summary>\r\n        /// AccordionButtonStyleProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">Accordion that changed its AccordionButtonStyle.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnAccordionButtonStylePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n        }\r\n        #endregion public Style AccordionButtonStyle\r\n\r\n        #region public DataTemplate ContentTemplate\r\n        /// <summary>\r\n        /// Gets or sets the DataTemplate used to display the content \r\n        /// of each generated AccordionItem. \r\n        /// </summary>\r\n        /// <remarks>Either ContentTemplate or ItemTemplate is used. \r\n        /// Setting both will result in an exception.</remarks>\r\n        public DataTemplate ContentTemplate\r\n        {\r\n            get { return (DataTemplate)GetValue(ContentTemplateProperty); }\r\n            set { SetValue(ContentTemplateProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ContentTemplate dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ContentTemplateProperty =\r\n            DependencyProperty.Register(\r\n                \"ContentTemplate\",\r\n                typeof(DataTemplate),\r\n                typeof(Accordion),\r\n                new PropertyMetadata(null));\r\n        #endregion public DataTemplate ContentTemplate\r\n\r\n#if SILVERLIGHT\r\n        /// <summary>\r\n        /// Occurs when the SelectedItem or SelectedItems property value changes.\r\n        /// </summary>\r\n        public event SelectionChangedEventHandler SelectionChanged;\r\n#else\r\n        /// <summary>\r\n        /// Occurs when the SelectedItem or SelectedItems property value changes.\r\n        /// </summary>\r\n        public static readonly RoutedEvent SelectionChangedEvent = EventManager.RegisterRoutedEvent(\"SelectionChanged\", RoutingStrategy.Bubble, typeof(SelectionChangedEventHandler), typeof(Accordion));\r\n\r\n        /// <summary>\r\n        /// Occurs when the SelectedItem or SelectedItems property value changes.\r\n        /// </summary>\r\n        public event SelectionChangedEventHandler SelectionChanged\r\n        {\r\n            add\r\n            {\r\n                base.AddHandler(SelectionChangedEvent, value);\r\n            }\r\n            remove\r\n            {\r\n                base.RemoveHandler(SelectionChangedEvent, value);\r\n            }\r\n        }\r\n\r\n#endif\r\n        /// <summary>\r\n        /// Occurs when the SelectedItems collection changes.\r\n        /// </summary>\r\n        public event NotifyCollectionChangedEventHandler SelectedItemsChanged;\r\n\r\n#if !SILVERLIGHT\r\n        /// <summary>\r\n        /// Static constructor\r\n        /// </summary>\r\n        static Accordion()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(Accordion), new FrameworkPropertyMetadata(typeof(Accordion)));\r\n        }\r\n#endif\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the <see cref=\"Accordion\"/> class.\r\n        /// </summary>\r\n        public Accordion()\r\n        {\r\n#if SILVERLIGHT\r\n            DefaultStyleKey = typeof(Accordion);\r\n#endif\r\n            ItemsControlHelper = new ItemsControlHelper(this);\r\n\r\n            ObservableCollection<object> items = new ObservableCollection<object>();\r\n            ObservableCollection<int> indices = new ObservableCollection<int>();\r\n\r\n            SelectedItems = items;\r\n            SelectedIndices = indices;\r\n\r\n            items.CollectionChanged += OnSelectedItemsCollectionChanged;\r\n            indices.CollectionChanged += OnSelectedIndicesCollectionChanged;\r\n\r\n            _scheduledActions = new List<AccordionItem>();\r\n            SizeChanged += OnAccordionSizeChanged;\r\n            Interaction = new InteractionHelper(this);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Builds the visual tree for the Accordion control when a \r\n        /// new template is applied.\r\n        /// </summary>\r\n        public override void OnApplyTemplate()\r\n        {\r\n            ItemsControlHelper.OnApplyTemplate();\r\n            base.OnApplyTemplate();\r\n            Interaction.OnApplyTemplateBase();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a AccordionAutomationPeer for use by the Silverlight\r\n        /// automation infrastructure.\r\n        /// </summary>\r\n        /// <returns>A AccordionAutomationPeer object for the Accordion.</returns>\r\n        protected override AutomationPeer OnCreateAutomationPeer()\r\n        {\r\n            return new AccordionAutomationPeer(this);\r\n        }\r\n\r\n        #region ItemsControl\r\n        /// <summary>\r\n        /// Creates or identifies the element that is used to display the given \r\n        /// item.\r\n        /// </summary>\r\n        /// <returns>\r\n        /// The element that is used to display the given item.\r\n        /// </returns>\r\n        protected override DependencyObject GetContainerForItemOverride()\r\n        {\r\n            return new AccordionItem();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Determines if the specified item is (or is eligible to be) its own \r\n        /// container.\r\n        /// </summary>\r\n        /// <param name=\"item\">The item to check.</param>\r\n        /// <returns>\r\n        /// True if the item is (or is eligible to be) its own container; \r\n        /// otherwise, false.\r\n        /// </returns>\r\n        protected override bool IsItemItsOwnContainerOverride(object item)\r\n        {\r\n            return item is AccordionItem;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Prepares the specified element to display the specified item.\r\n        /// </summary>\r\n        /// <param name=\"element\">The element used to display the specified item.</param>\r\n        /// <param name=\"item\">The item to display.</param>\r\n        protected override void PrepareContainerForItemOverride(DependencyObject element, object item)\r\n        {\r\n            AccordionItem accordionItem = element as AccordionItem;\r\n\r\n            if (accordionItem != null)\r\n            {\r\n                DataTemplate specifiedContentTemplate = accordionItem.ContentTemplate;\r\n\r\n                base.PrepareContainerForItemOverride(element, item);\r\n                ItemsControlHelper.PrepareContainerForItemOverride(accordionItem, ItemContainerStyle);\r\n                AccordionItem.PreparePrepareHeaderedContentControlContainerForItemOverride(accordionItem, item, this, ItemContainerStyle);\r\n\r\n                // after base.prepare, item template has replaced contenttemplate\r\n                DataTemplate displayMemberTemplate = accordionItem.ContentTemplate;\r\n                \r\n                // put original contenttemplate back that was overwritten\r\n                // It takes precendence over a generated itemtemplate.\r\n                // this might mean setting back a null, which is correct given the bindings\r\n                // that follow.\r\n                accordionItem.ContentTemplate = specifiedContentTemplate;\r\n\r\n                // potentially set contenttemplate if accordionItem did not specify one explicitly\r\n                if (accordionItem.ContentTemplate == null)\r\n                {\r\n                    accordionItem.SetBinding(\r\n                        ContentControl.ContentTemplateProperty,\r\n                        new Binding(\"ContentTemplate\")\r\n                        {\r\n                            Source = this,\r\n                            Mode = BindingMode.OneWay\r\n                        });\r\n                }\r\n\r\n                // potentially set headertemplate if accordionItem did not specify one explicitly\r\n                if (accordionItem.HeaderTemplate == null)\r\n                {\r\n                    accordionItem.SetBinding(\r\n                        HeaderedContentControl.HeaderTemplateProperty,\r\n                        new Binding(\"ItemTemplate\")\r\n                        {\r\n                            Source = this,\r\n                            Mode = BindingMode.OneWay\r\n                        });\r\n                }\r\n\r\n                // potentially bind AccordionButtonStyle.\r\n                if (accordionItem.AccordionButtonStyle == null)\r\n                {\r\n                    accordionItem.SetBinding(\r\n                        AccordionItem.AccordionButtonStyleProperty,\r\n                        new Binding(AccordionButtonStyleName)\r\n                        {\r\n                            Source = this,\r\n                            Mode = BindingMode.OneWay\r\n                        });\r\n                }\r\n\r\n                // possibly set a displaymemberPath on header or content.\r\n                if (displayMemberTemplate != null && !string.IsNullOrEmpty(DisplayMemberPath))\r\n                {\r\n                    if (accordionItem.ContentTemplate == null)\r\n                    {\r\n                        accordionItem.ContentTemplate = displayMemberTemplate;\r\n                    }\r\n                    if (accordionItem.HeaderTemplate == null)\r\n                    {\r\n                        accordionItem.HeaderTemplate = displayMemberTemplate;\r\n                    }\r\n                }\r\n\r\n                // give accordionItem a reference back to the parent Accordion.\r\n                accordionItem.ParentAccordion = this;\r\n\r\n                // SelectedItem is expected to be set while adding items.\r\n                // Check: does this item belong in the selectedindices\r\n                int index = ItemContainerGenerator.IndexFromContainer(accordionItem);\r\n                if (!accordionItem.IsSelected && SelectedIndices.Contains(index))\r\n                {\r\n                    accordionItem.IsSelected = true;\r\n                }\r\n\r\n                // could also be adding an item with the IsSelected set to true.\r\n                if (accordionItem.IsSelected)\r\n                {\r\n                    SelectedItem = item;\r\n                }\r\n\r\n                // item might have been preselected when added to the item collection. \r\n                // at that point the parent had not been registered yet, so no notification was done.\r\n                if (accordionItem.IsSelected)\r\n                {\r\n                    if (!SelectedItems.OfType<object>().Contains(item))\r\n                    {\r\n                        SelectedItems.Add(item);\r\n                    }\r\n\r\n                    if (!SelectedIndices.Contains(index))\r\n                    {\r\n                        SelectedIndices.Add(index);\r\n                    }\r\n                }\r\n                accordionItem.ExpandDirection = ExpandDirection;\r\n            }\r\n            else\r\n            {\r\n                base.PrepareContainerForItemOverride(element, item);\r\n                ItemsControlHelper.PrepareContainerForItemOverride(element, ItemContainerStyle);\r\n            }\r\n\r\n            // The panel will register itself when it has had a child to add.\r\n            SetPanelOrientation();\r\n\r\n            // change has occured, re-evaluate the locked status on items\r\n            SetLockedProperties();\r\n\r\n            // At this moment this item has not been added to the panel yet, so we schedule a layoutpass\r\n            Dispatcher.BeginInvoke(new Action(LayoutChildren));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Undoes the effects of the <see cref=\"M:System.Windows.Controls.ItemsControl.PrepareContainerForItemOverride(System.Windows.DependencyObject,System.Object)\"/> \r\n        /// method.\r\n        /// </summary>\r\n        /// <param name=\"element\">The container element.</param>\r\n        /// <param name=\"item\">The item that should be cleared.</param>\r\n        protected override void ClearContainerForItemOverride(DependencyObject element, object item)\r\n        {\r\n            AccordionItem accordionItem = element as AccordionItem;\r\n            if (accordionItem != null)\r\n            {\r\n                accordionItem.IsLocked = false;\r\n                accordionItem.IsSelected = false;\r\n\r\n                // release the parent child relationship.\r\n                accordionItem.ParentAccordion = null;\r\n            }\r\n\r\n            base.ClearContainerForItemOverride(element, item);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Invoked when the <see cref=\"P:System.Windows.Controls.ItemsControl.Items\"/> \r\n        /// property changes.\r\n        /// </summary>\r\n        /// <param name=\"e\">Information about the change.</param>\r\n        protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)\r\n        {\r\n            base.OnItemsChanged(e);\r\n\r\n            switch (e.Action)\r\n            {\r\n                case NotifyCollectionChangedAction.Add:\r\n                    try\r\n                    {\r\n                        _isIgnoringSelectedIndicesChanges = true;\r\n                        for (int i = 0; i < SelectedIndices.Count; i++)\r\n                        {\r\n                            if (SelectedIndices[i] >=\r\n                                e.NewStartingIndex)\r\n                            {\r\n                                // add a value of one\r\n                                SelectedIndices[i] = SelectedIndices[i] + 1;\r\n                            }\r\n                        }\r\n                    }\r\n                    finally\r\n                    {\r\n                        _isIgnoringSelectedIndicesChanges = false;\r\n                    }\r\n\r\n                    if (SelectedIndex >= e.NewStartingIndex && SelectedIndex > -1)\r\n                    {\r\n                        SelectedIndex++;\r\n                    }\r\n\r\n                    // now add the item, will also add indice at correct position.\r\n                    if (SelectedItem == null && IsMinimumOneSelected)\r\n                    {\r\n                        if (!SelectedItems.OfType<object>().Contains(e.NewItems[0]))\r\n                        {\r\n                            SelectedItems.Add(e.NewItems[0]);\r\n                        }\r\n                        SelectedItem = e.NewItems[0];\r\n                    }\r\n                    break;\r\n                case NotifyCollectionChangedAction.Reset:\r\n                    {\r\n                        _isIgnoringSelectedIndicesChanges = true;\r\n                        _isIgnoringSelectedItemsChanges = true;\r\n                        try\r\n                        {\r\n                            // Items has been cleared.\r\n                            // so clear selecteditems as well\r\n                            SelectedItems.Clear();\r\n                            SelectedIndices.Clear();\r\n                            SelectedItem = null;\r\n                            SelectedIndex = -1;\r\n                        }\r\n                        finally\r\n                        {\r\n                            _isIgnoringSelectedIndicesChanges = false;\r\n                            _isIgnoringSelectedItemsChanges = false;\r\n                        }\r\n\r\n                        // we receive this action when an itemssource is set\r\n                        InitializeNewItemsSource();\r\n                    }\r\n                break;\r\n                case NotifyCollectionChangedAction.Remove:\r\n                    {\r\n                        int index = e.OldStartingIndex;\r\n                        object item = e.OldItems[0];\r\n\r\n                        try\r\n                        {\r\n                            _isIgnoringSelectedIndicesChanges = true;\r\n\r\n                            if (SelectedIndices.Contains(index))\r\n                            {\r\n                                SelectedIndices.Remove(index);\r\n                            }\r\n                            for (int i = 0; i < SelectedIndices.Count; i++)\r\n                            {\r\n                                if (SelectedIndices[i] > index)\r\n                                {\r\n                                    // lower the value by one\r\n                                    SelectedIndices[i] = SelectedIndices[i] - 1;\r\n                                }\r\n                            }\r\n                        }\r\n                        finally\r\n                        {\r\n                            _isIgnoringSelectedIndicesChanges = false;\r\n                        }\r\n\r\n                        try\r\n                        {\r\n                            _isIgnoringSelectedItemsChanges = true;\r\n\r\n                            if (SelectedItems.Contains(item))\r\n                            {\r\n                                // check that there are no indices pointing to similar\r\n                                // items that are still in the collection\r\n                                if (SelectedIndices.Count(i => i < Items.Count && Items[i].Equals(item)) == 0)\r\n                                {\r\n                                    SelectedItems.Remove(item);\r\n                                }\r\n                            }\r\n                        }\r\n                        finally\r\n                        {\r\n                            _isIgnoringSelectedItemsChanges = false;\r\n                        }\r\n\r\n                        if (SelectedIndex == index)\r\n                        {\r\n                            // that item is no longer in the Items collection\r\n                            // so the index is incorrect as well\r\n                            SelectedIndex = -1;\r\n                        }\r\n                        if (SelectedIndex > e.OldStartingIndex && SelectedIndex > -1)\r\n                        {\r\n                            SelectedIndex -= 1;\r\n                        }\r\n                    }\r\n                    break;\r\n            }\r\n\r\n            SetPanelOrientation();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes the SelectedItem property when a new ItemsSource is set.\r\n        /// </summary>\r\n        private void InitializeNewItemsSource()\r\n        {\r\n            // todo: remove the SelectedItem == null check (should not be necessary)\r\n\r\n            // possibly an ItemsSource has been set\r\n            if (IsMinimumOneSelected && SelectedItem == null && Items.Count > 0)\r\n            {\r\n                if (!SelectedItems.OfType<object>().Contains(Items[0]))\r\n                {\r\n                    SelectedItems.Add(Items[0]);\r\n                }\r\n                SelectedItem = Items[0];\r\n            }\r\n        }\r\n        #endregion ItemsControl\r\n\r\n        #region Selection handling\r\n        /// <summary>\r\n        /// Called when an AccordionItem is unselected.\r\n        /// </summary>\r\n        /// <param name=\"accordionItem\">The accordion item that was unselected.</param>\r\n        internal void OnAccordionItemUnselected(AccordionItem accordionItem)\r\n        {\r\n            UnselectItem(ItemContainerGenerator.IndexFromContainer(accordionItem), ItemContainerGenerator.ItemFromContainer(accordionItem));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Unselects the item.\r\n        /// </summary>\r\n        /// <param name=\"index\">The index of the item that will be unselected.</param>\r\n        /// <param name=\"item\">The item that will be unselected. Can be null.</param>\r\n        private void UnselectItem(int index, object item)\r\n        {\r\n            if (index < 0 || index > Items.Count)\r\n            {\r\n                // invalid\r\n                return;\r\n            }\r\n\r\n            // try through accordionitem\r\n            AccordionItem container = index >= 0 && index < Items.Count ? ItemContainerGenerator.ContainerFromIndex(index) as AccordionItem : null;\r\n            if (container != null && container.IsSelected)\r\n            {\r\n                container.IsLocked = false;\r\n                container.IsSelected = false;\r\n                return;\r\n            }\r\n\r\n            item = item ?? Items[index];\r\n\r\n            int newSelectedIndex = -1;\r\n            // shortcuts to new item selection.\r\n            if (SelectedIndex > -1 && SelectedIndex == index)\r\n            {\r\n                // this item is no longer the selected item. \r\n                // in order to keep the amount of raised events down, will select a new selected item here.\r\n                newSelectedIndex = ProposeSelectedIndexCandidate(index);\r\n\r\n                // no cancelling possible, undo the action.\r\n                // current template makes sure accordionheader does not allow this unselect\r\n                // that behavior is not enforced which means that it could come\r\n                // from a SelectedItems/Indices manipulation\r\n                SelectedIndex = newSelectedIndex;\r\n            }\r\n\r\n            // update selecteditems collection\r\n            if (SelectedItems.OfType<object>().Contains(item) && index != newSelectedIndex && !item.Equals(SelectedItem))\r\n            {\r\n                // if there are indices still pointing to a similar item, do not remove\r\n                if (SelectedIndices.Count(i => i != index && i < Items.Count && Items[i].Equals(item)) == 0)\r\n                {\r\n                    if (_isInSelectedItemsCollectionChanged)\r\n                    {\r\n                        throw new InvalidOperationException(Properties.Resources.Accordion_InvalidManipulationOfSelectionCollections);\r\n                    }\r\n                    SelectedItems.Remove(item);\r\n                }\r\n            }\r\n\r\n            // indexes should always be changed, even if we are reselecting a similar item\r\n            if (SelectedIndices.Contains(index))\r\n            {\r\n                if (_isInSelectedIndicesCollectionChanged)\r\n                {\r\n                    throw new InvalidOperationException(Properties.Resources.Accordion_InvalidManipulationOfSelectionCollections);\r\n                }\r\n                SelectedIndices.Remove(index);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when an AccordionItem selected.\r\n        /// </summary>\r\n        /// <param name=\"accordionItem\">The accordion item that was selected.</param>\r\n        internal void OnAccordionItemSelected(AccordionItem accordionItem)\r\n        {\r\n            SelectItem(ItemContainerGenerator.IndexFromContainer(accordionItem));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Selects the item.\r\n        /// </summary>\r\n        /// <param name=\"index\">The index of the item to select.</param>\r\n        private void SelectItem(int index)\r\n        {\r\n            // try through accordionitem\r\n            AccordionItem container = index >= 0 && index < Items.Count ? ItemContainerGenerator.ContainerFromIndex(index) as AccordionItem : null;\r\n            if (container != null && !container.IsSelected)\r\n            {\r\n                container.IsSelected = true;\r\n                return;\r\n            }\r\n\r\n            SelectedIndex = index;\r\n         \r\n            object item = Items[index];\r\n            if (item != null)\r\n            {\r\n                // update selecteditems collection\r\n                if (!SelectedItems.OfType<object>().Contains(item))\r\n                {\r\n                    if (_isInSelectedItemsCollectionChanged)\r\n                    {\r\n                        throw new InvalidOperationException(Properties.Resources.Accordion_InvalidManipulationOfSelectionCollections);\r\n                    }\r\n                    SelectedItems.Add(item);\r\n                }\r\n\r\n                if (!SelectedIndices.Contains(index))\r\n                {\r\n                    if (_isInSelectedIndicesCollectionChanged)\r\n                    {\r\n                        throw new InvalidOperationException(Properties.Resources.Accordion_InvalidManipulationOfSelectionCollections);\r\n                    }\r\n                    SelectedIndices.Add(index);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Changes the selected item, by unselecting and selecting where \r\n        /// necessary.\r\n        /// </summary>\r\n        /// <param name=\"oldIndex\">The old index.</param>\r\n        /// <param name=\"newIndex\">The new index.</param>\r\n        private void ChangeSelectedIndex(int oldIndex, int newIndex)\r\n        {\r\n            AccordionItem oldAccordionItem = oldIndex >= 0 && oldIndex < Items.Count ? ItemContainerGenerator.ContainerFromIndex(oldIndex) as AccordionItem : null;\r\n            AccordionItem newAccordionItem = newIndex >= 0 && newIndex < Items.Count ? ItemContainerGenerator.ContainerFromIndex(newIndex) as AccordionItem : null;\r\n\r\n            // unselect the previous item, if we need to\r\n            // we should be able to be called when the oldvalue equals the newvalue\r\n            if (oldIndex != newIndex)\r\n            {\r\n                // we only need to explicitly deselect the oldvalue if there is a maximum\r\n                // of one selected. However, if user explicitly set SelectedItem\r\n                // to null, we should still deselect the old value.\r\n                if (IsMaximumOneSelected || newIndex == -1)\r\n                {\r\n                    if (oldAccordionItem != null)\r\n                    {\r\n                        // unselection can be triggered by selection of another item.\r\n                        oldAccordionItem.IsLocked = false;\r\n                        oldAccordionItem.IsSelected = false;\r\n                    }\r\n                    else if (oldIndex > -1)\r\n                    {\r\n                        // there was no wrapper yet, fallback to regular unselecting\r\n                        UnselectItem(oldIndex, null);\r\n                    }\r\n\r\n                    #region raise event for UIAutomation.\r\n                    if (newAccordionItem != null &&\r\n                        AutomationPeer.ListenerExists(\r\n                                AutomationEvents.SelectionItemPatternOnElementSelected))\r\n                    {\r\n                        AutomationPeer peer =\r\n                                FrameworkElementAutomationPeer.CreatePeerForElement(newAccordionItem);\r\n                        if (peer != null)\r\n                        {\r\n                            peer.RaiseAutomationEvent(AutomationEvents.SelectionItemPatternOnElementSelected);\r\n                        }\r\n                    }\r\n                    #endregion\r\n                }\r\n            }\r\n\r\n            // make the selection through the container if possible\r\n            if (newAccordionItem != null)\r\n            {\r\n                newAccordionItem.IsSelected = true;\r\n            }\r\n            else if (newIndex != -1)\r\n            {\r\n                // there was no wrapper yet, fallback to regular selecting\r\n                SelectItem(newIndex);\r\n            }\r\n\r\n            SelectedIndex = newIndex;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when selected items collection changed.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The sender.</param>\r\n        /// <param name=\"e\">The <see cref=\"System.Collections.Specialized.NotifyCollectionChangedEventArgs\"/> \r\n        /// instance containing the event data.</param>\r\n        private void OnSelectedItemsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)\r\n        {\r\n            if (_isIgnoringSelectedItemsChanges)\r\n            {\r\n                return;\r\n            }\r\n\r\n            _isInSelectedItemsCollectionChanged = true;\r\n\r\n            Action<object> unselectItem = item =>\r\n                                              {\r\n                                                      // since we removed this selecteditem, all selectedindices need to be removed as well\r\n                                                      List<int> valid = SelectedIndices.Where(i => i < Items.Count && item.Equals(Items[i])).ToList();\r\n                                                      if (valid.Count > 0)\r\n                                                      {\r\n                                                          foreach (int index in valid)\r\n                                                          {\r\n                                                              UnselectItem(index, item);\r\n                                                          }\r\n                                                      }\r\n                                                      else\r\n                                                      {\r\n                                                          UnselectItem(Items.IndexOf(item), item);\r\n                                                      }\r\n                                              };\r\n\r\n            switch (e.Action)\r\n            {\r\n                case NotifyCollectionChangedAction.Add:\r\n                    {\r\n                        if (IsMaximumOneSelected && (SelectedItem != null && !e.NewItems.Contains(SelectedItem)))\r\n                        {\r\n                            // will always lead to manipulation of the collection\r\n                            throw new InvalidOperationException(Properties.Resources.Accordion_InvalidManipulationOfSelectionCollections);\r\n                        }\r\n                        foreach (object item in e.NewItems)\r\n                        {\r\n                            object tempItem = item;\r\n                            SelectedItem = tempItem;\r\n                        }\r\n                    }\r\n                    break;\r\n                case NotifyCollectionChangedAction.Remove:\r\n                    {\r\n                        if (IsMinimumOneSelected && e.OldItems.Contains(SelectedItem))\r\n                        {\r\n                            // will always lead to manipulation of the collection\r\n                            throw new InvalidOperationException(Properties.Resources.Accordion_InvalidManipulationOfSelectionCollections);\r\n                        }\r\n                        foreach (object item in e.OldItems)\r\n                        {\r\n                            object tempItem = item;\r\n                            unselectItem(tempItem);\r\n                        }\r\n                    }\r\n                    break;\r\n                case NotifyCollectionChangedAction.Reset:\r\n                    {\r\n                        // unselect all items.\r\n                        // we use the selectedindices collection to pinpoint the\r\n                        // items we need to unselect\r\n                        if (IsMinimumOneSelected && Items.Count > 0)\r\n                        {\r\n                            // will always lead to manipulation of the collection\r\n                            throw new InvalidOperationException(Properties.Resources.Accordion_InvalidManipulationOfSelectionCollections);\r\n                        }\r\n                        for (int i = SelectedIndices.Count - 1; i >= 0; i--)\r\n                        {\r\n                            int selectedIndex = SelectedIndices[i];\r\n\r\n                            if (selectedIndex < Items.Count)\r\n                            {\r\n                                object tempItem = Items[selectedIndex];\r\n                                unselectItem(tempItem);\r\n                            }\r\n                        }\r\n                    }\r\n                    break;\r\n                default:\r\n                    {\r\n                        string message = string.Format(\r\n                                CultureInfo.InvariantCulture,\r\n                                Properties.Resources.Accordion_UnsupportedCollectionAction,\r\n                                e.Action);\r\n\r\n                        throw new NotSupportedException(message);\r\n                    }\r\n            }\r\n\r\n            // let the outside world know\r\n            RaiseOnSelectedItemsCollectionChanged(e);\r\n\r\n            _isInSelectedItemsCollectionChanged = false;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when selected indices collection changed.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The sender.</param>\r\n        /// <param name=\"e\">The <see cref=\"System.Collections.Specialized.NotifyCollectionChangedEventArgs\"/> \r\n        /// instance containing the event data.</param>\r\n        [SuppressMessage(\"Microsoft.Maintainability\", \"CA1502:AvoidExcessiveComplexity\", Justification = \"Method is best kept coherent.\")]\r\n        private void OnSelectedIndicesCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)\r\n        {\r\n            if (_isIgnoringSelectedIndicesChanges)\r\n            {\r\n                return;\r\n            }\r\n\r\n            _isInSelectedIndicesCollectionChanged = true;\r\n\r\n            switch (e.Action)\r\n            {\r\n                case NotifyCollectionChangedAction.Add:\r\n                    {\r\n                        if (IsMaximumOneSelected)\r\n                        {\r\n                            // selectedindex always trails the actual state\r\n                            if (SelectedItem != null && e.NewItems.Count != 1 || ((int)e.NewItems[0] < Items.Count && !Items[(int)e.NewItems[0]].Equals(SelectedItem)))\r\n                            {\r\n                                // will always lead to manipulation of the collection\r\n                                throw new InvalidOperationException(Properties.Resources.Accordion_InvalidManipulationOfSelectionCollections);\r\n                            }\r\n                        }\r\n                        foreach (int index in e.NewItems)\r\n                        {\r\n                            if (index < Items.Count)\r\n                            {\r\n                                SelectedIndex = index;\r\n                                // raise event for UIAutomation, which uses SelectedIndices to query SelectedItems.\r\n                                if (AutomationPeer.ListenerExists(AutomationEvents.SelectionItemPatternOnElementAddedToSelection))\r\n                                {\r\n                                    AutomationPeer peer = FrameworkElementAutomationPeer.CreatePeerForElement(this);\r\n                                    if (peer != null)\r\n                                    {\r\n                                        peer.RaiseAutomationEvent(AutomationEvents.SelectionItemPatternOnElementAddedToSelection);\r\n                                    }\r\n                                } \r\n                            }\r\n                        }\r\n                    }\r\n                    break;\r\n                case NotifyCollectionChangedAction.Remove:\r\n                    {\r\n                        if (IsMinimumOneSelected && e.OldItems.Contains(SelectedIndex))\r\n                        {\r\n                            if (SelectedIndex < Items.Count && Items[SelectedIndex].Equals(SelectedItem) && SelectedIndices.Count == 0)\r\n                            {\r\n                                // will always lead to manipulation of the collection\r\n                                throw new InvalidOperationException(Properties.Resources.Accordion_InvalidManipulationOfSelectionCollections);\r\n                            }\r\n                        }\r\n                        foreach (int index in e.OldItems)\r\n                        {\r\n                            if (index < Items.Count)\r\n                            {\r\n                                UnselectItem(index, null);\r\n\r\n                                // raise event for UIAutomation, which uses SelectedIndices to query SelectedItems.\r\n                                if (AutomationPeer.ListenerExists(AutomationEvents.SelectionItemPatternOnElementRemovedFromSelection))\r\n                                {\r\n                                    AutomationPeer peer = FrameworkElementAutomationPeer.CreatePeerForElement(this);\r\n                                    if (peer != null)\r\n                                    {\r\n                                        peer.RaiseAutomationEvent(AutomationEvents.SelectionItemPatternOnElementRemovedFromSelection);\r\n                                    }\r\n                                } \r\n                            }\r\n                        }\r\n                    }\r\n                    break;\r\n                case NotifyCollectionChangedAction.Reset:\r\n                    {\r\n                        // unselect all items.\r\n                        // we use the selectedindices collection to pinpoint the\r\n                        // items we need to unselect\r\n                        if (IsMinimumOneSelected && Items.Count > 0)\r\n                        {\r\n                            // will always lead to manipulation of the collection\r\n                            throw new InvalidOperationException(Properties.Resources.Accordion_InvalidManipulationOfSelectionCollections);\r\n                        }\r\n                        // unselect all items.\r\n                        // we use the selectedItems collection to pinpoint the\r\n                        // items we need to unselect\r\n                        for (int i = SelectedItems.Count - 1; i >= 0; i--)\r\n                        {\r\n                            object item = SelectedItems[i];\r\n                            UnselectItem(i, item);\r\n\r\n                            // raise event for UIAutomation, which uses SelectedIndices to query SelectedItems.\r\n                            if (AutomationPeer.ListenerExists(AutomationEvents.SelectionItemPatternOnElementRemovedFromSelection))\r\n                            {\r\n                                AutomationPeer peer = FrameworkElementAutomationPeer.CreatePeerForElement(this);\r\n                                if (peer != null)\r\n                                {\r\n                                    peer.RaiseAutomationEvent(AutomationEvents.SelectionItemPatternOnElementRemovedFromSelection);\r\n                                }\r\n                            } \r\n                        }\r\n                    }\r\n                    break;\r\n                default:\r\n                    {\r\n                        string message = string.Format(\r\n                            CultureInfo.InvariantCulture,\r\n                            Properties.Resources.Accordion_UnsupportedCollectionAction,\r\n                            e.Action);\r\n\r\n                        throw new NotSupportedException(message);\r\n                    }\r\n            }\r\n\r\n            // change has occured, re-evaluate the locked status on items\r\n            SetLockedProperties();\r\n\r\n            // do a layout pass.\r\n            LayoutChildren();\r\n\r\n            _isInSelectedIndicesCollectionChanged = false;\r\n        }\r\n\r\n        #region Helpers\r\n        /// <summary>\r\n        /// Gets an item that is suitable for selection.\r\n        /// </summary>\r\n        /// <param name=\"nonCandidateIndex\">Index that should not be considered if \r\n        /// possible.</param>\r\n        /// <returns>An item that should be selected. This could be nonCandidateIndex, \r\n        /// if no other possibility was found.</returns>\r\n        private int ProposeSelectedIndexCandidate(int nonCandidateIndex)\r\n        {\r\n            // other non candidates are items that are exactly like this item.\r\n            object item = (nonCandidateIndex >= 0 && nonCandidateIndex < Items.Count) ? Items[nonCandidateIndex] : null;\r\n\r\n            // see if we can find a suitable item in the selecteditems collection\r\n            IEnumerable<int> validIndices = SelectedIndices.Where(i => i != nonCandidateIndex && (item == null || !item.Equals(Items[i])));\r\n\r\n            if (validIndices.Count() > 0)\r\n            {\r\n                return validIndices.First();\r\n            }\r\n\r\n            if (IsMinimumOneSelected && Items.Count > 0)\r\n            {\r\n                return 0;\r\n            }\r\n\r\n            return -1;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Selects all the AccordionItems in the Accordion control.\r\n        /// </summary>\r\n        /// <remarks>If the Accordion SelectionMode is OneOrMore or ZeroOrMore all \r\n        /// AccordionItems would be selected. If the Accordion SelectionMode is \r\n        /// One or ZeroOrOne all items would be selected and unselected. Only \r\n        /// the last AccordionItem would remain selected. </remarks>\r\n        public void SelectAll()\r\n        {\r\n            UpdateAccordionItemsSelection(true);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Unselects all the AccordionItems in the Accordion control.\r\n        /// </summary>\r\n        /// <remarks>If the Accordion SelectionMode is Zero or ZeroOrMore all \r\n        /// AccordionItems would be Unselected. If SelectionMode is One or  \r\n        /// OneOrMode  than all items would be Unselected and selected. Only the \r\n        /// first AccordionItem would still be selected.</remarks>\r\n        public void UnselectAll()\r\n        {\r\n            UpdateAccordionItemsSelection(false);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates all accordionItems to be selected or unselected.\r\n        /// </summary>\r\n        /// <param name=\"selectedValue\">True to select all items, false to unselect.</param>\r\n        /// <remarks>Will not attempt to change a locked accordionItem.</remarks>\r\n        private void UpdateAccordionItemsSelection(bool selectedValue)\r\n        {\r\n            foreach (object item in Items)\r\n            {\r\n                AccordionItem accordionItem = ItemContainerGenerator.ContainerFromItem(item) as AccordionItem;\r\n\r\n                if (accordionItem != null && !accordionItem.IsLocked)\r\n                {\r\n                    accordionItem.IsSelected = selectedValue;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Sets the locked properties on all the items.\r\n        /// </summary>\r\n        private void SetLockedProperties()\r\n        {\r\n            // an item that can not be unselected is locked.\r\n            // This happens in 'One' or 'OneOrMore' selection mode, when the first item is selected.\r\n\r\n            for (int i = 0; i < Items.Count; i++)\r\n            {\r\n                AccordionItem item = ItemContainerGenerator.ContainerFromIndex(i) as AccordionItem;\r\n\r\n                if (item != null)\r\n                {\r\n                    item.IsLocked = (item.IsSelected && IsMinimumOneSelected && SelectedIndices.Count == 1);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Raises the SelectedItemChanged event when the SelectedItem \r\n        /// property value changes.\r\n        /// </summary>\r\n        /// <param name=\"e\">The <see cref=\"System.Windows.Controls.SelectionChangedEventArgs\"/> \r\n        /// instance containing the event data.</param>\r\n        protected virtual void OnSelectedItemChanged(SelectionChangedEventArgs e)\r\n        {\r\n#if SILVERLIGHT\r\n            SelectionChangedEventHandler handler = SelectionChanged;\r\n\r\n            if (handler != null)\r\n            {\r\n                handler(this, e);\r\n            }\r\n#else\r\n            RaiseEvent(e);\r\n#endif\r\n        }\r\n\r\n        /// <summary>\r\n        /// Raise the SelectedItemsCollectionChanged event.\r\n        /// </summary>\r\n        /// <param name=\"e\">The <see cref=\"System.Windows.Controls.SelectionChangedEventArgs\"/> \r\n        /// instance containing the event data.</param>\r\n        /// <remarks>This event is raised after the changes to the collection \r\n        /// have been processed.</remarks>\r\n        private void RaiseOnSelectedItemsCollectionChanged(NotifyCollectionChangedEventArgs e)\r\n        {\r\n            NotifyCollectionChangedEventHandler handler = SelectedItemsChanged;\r\n\r\n            if (handler != null)\r\n            {\r\n                handler(this, e);\r\n            }\r\n        } \r\n        #endregion\r\n        #endregion Selection handling\r\n\r\n        #region Layout\r\n        /// <summary>\r\n        /// Called when the size of the Accordion changes.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The sender.</param>\r\n        /// <param name=\"e\">The <see cref=\"System.Windows.SizeChangedEventArgs\"/> \r\n        /// instance containing the event data.</param>\r\n        private void OnAccordionSizeChanged(object sender, SizeChangedEventArgs e)\r\n        {\r\n            IsResizing = true;\r\n\r\n            LayoutChildren();\r\n            IsResizing = false;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when size of a Header on the item changes.\r\n        /// </summary>\r\n        /// <param name=\"item\">The item whose Header changed.</param>\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA1801:ReviewUnusedParameters\", MessageId = \"item\", Justification = \"Passing the AccordionItem leads to a better API if we wish to change modifier to protected in the future.\")]\r\n        internal void OnHeaderSizeChange(AccordionItem item)\r\n        {\r\n            LayoutChildren();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Allows an AccordionItem to signal the need for a visual action \r\n        /// (resize, collapse, expand).\r\n        /// </summary>\r\n        /// <param name=\"item\">The AccordionItem that signals for a schedule.</param>\r\n        /// <param name=\"action\">The action it is scheduling for.</param>\r\n        /// <returns>True if the item is allowed to proceed without scheduling, \r\n        /// false if the item needs to wait for a signal to execute the action.</returns>\r\n        internal virtual bool ScheduleAction(AccordionItem item, AccordionAction action)\r\n        {\r\n            if (SelectionSequence == SelectionSequence.CollapseBeforeExpand)\r\n            {\r\n                lock (this)\r\n                {\r\n                    if (!_scheduledActions.Contains(item))\r\n                    {\r\n                        _scheduledActions.Add(item);\r\n                    }\r\n                }\r\n                if (_currentActioningItem == null)\r\n                {\r\n                    Dispatcher.BeginInvoke(new Action(StartNextAction));\r\n                }\r\n\r\n                return false;\r\n            }\r\n            else\r\n            {\r\n                return true;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Signals the finish of an action by an item.\r\n        /// </summary>\r\n        /// <param name=\"item\">The AccordionItem that finishes an action.</param>\r\n        /// <remarks>An AccordionItem should always signal a finish, for this call\r\n        /// will start the next scheduled action.</remarks>\r\n        internal virtual void OnActionFinish(AccordionItem item)\r\n        {\r\n            if (SelectionSequence == SelectionSequence.CollapseBeforeExpand)\r\n            {\r\n                lock (this)\r\n                {\r\n                    if (!_currentActioningItem.Equals(item))\r\n                    {\r\n                        throw new InvalidOperationException(Properties.Resources.Accordion_OnActionFinish_InvalidFinish);\r\n                    }\r\n\r\n                    _currentActioningItem = null;\r\n\r\n                    StartNextAction();\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Starts the next action in the list, in a particular order.\r\n        /// </summary>\r\n        /// <remarks>An AccordionItem is should always signal that it is \r\n        /// finished with an action.</remarks>\r\n        private void StartNextAction()\r\n        {\r\n            if (_currentActioningItem != null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            // First do collapses, then resizes and finally expands.\r\n            AccordionItem next = _scheduledActions.FirstOrDefault(item => item.ScheduledAction == AccordionAction.Collapse);\r\n            if (next == null)\r\n            {\r\n                next = _scheduledActions.FirstOrDefault(item => item.ScheduledAction == AccordionAction.Resize);\r\n            }\r\n            if (next == null)\r\n            {\r\n                next = _scheduledActions.FirstOrDefault(item => item.ScheduledAction == AccordionAction.Expand);\r\n            }\r\n            if (next != null)\r\n            {\r\n                _currentActioningItem = next;\r\n                _scheduledActions.Remove(next);\r\n                next.StartAction();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Determines and sets the height of the accordion items.\r\n        /// </summary>\r\n        private void LayoutChildren()\r\n        {\r\n            ScrollViewer root = ItemsControlHelper.ScrollHost;\r\n            Size targetSize = new Size(double.NaN, double.NaN);\r\n            if (root != null && ItemsControlHelper.ItemsHost != null)\r\n            {\r\n                if (IsShouldFillWidth)\r\n                {\r\n                    // selected items should fill the remaining width of the container.\r\n                    targetSize.Width = Math.Max(0, root.ViewportWidth - ItemsControlHelper.ItemsHost.ActualWidth);\r\n\r\n                    // calculate space currently occupied by items. This space will be redistributed.\r\n                    foreach (object item in Items)\r\n                    {\r\n                        AccordionItem accordionItem = ItemContainerGenerator.ContainerFromItem(item) as AccordionItem;\r\n                        if (accordionItem != null)\r\n                        {\r\n                            targetSize.Width += accordionItem.RelevantContentSize.Width;\r\n                        }\r\n                    }\r\n\r\n                    // offset for the real difference in viewportheight and actualheight. This happens when accordion\r\n                    // was made smaller.\r\n                    double smaller = root.ViewportWidth - ItemsControlHelper.ItemsHost.ActualWidth;\r\n\r\n                    if (smaller < 0)\r\n                    {\r\n                        targetSize.Width = Math.Max(0, targetSize.Width + smaller);\r\n                    }\r\n\r\n                    // calculated the targetsize for all selected items. Because of rounding issues, the\r\n                    // actual space taken sometimes exceeds the appropriate amount by a fraction. \r\n                    if (targetSize.Width > 1)\r\n                    {\r\n                        targetSize.Width -= 1;\r\n                    }\r\n\r\n                    // possibly we are bigger than we would want, the items\r\n                    // are overflowing. Always try to fit in current viewport.\r\n                    if (root.ExtentWidth > root.ViewportWidth)\r\n                    {\r\n                        targetSize.Width = Math.Max(0, targetSize.Width - (root.ExtentWidth - root.ViewportWidth));\r\n                    }\r\n\r\n                    // calculate targetsize per selected item. This is redistribution.\r\n                    targetSize.Width = SelectedItems.Count > 0 ? targetSize.Width / SelectedItems.Count : targetSize.Width;\r\n                }\r\n                else if (IsShouldFillHeight)\r\n                {\r\n                    // selected items should fill the remaining width of the container.\r\n                    targetSize.Height = Math.Max(0, root.ViewportHeight - ItemsControlHelper.ItemsHost.ActualHeight);\r\n\r\n                    // calculate space currently occupied by items. This space will be redistributed.\r\n                    foreach (object item in Items)\r\n                    {\r\n                        AccordionItem accordionItem = ItemContainerGenerator.ContainerFromItem(item) as AccordionItem;\r\n                        if (accordionItem != null)\r\n                        {\r\n                            targetSize.Height += accordionItem.RelevantContentSize.Height;\r\n                        }\r\n                    }\r\n\r\n                    // offset for the real difference in viewportheight and actualheight. This happens when accordion\r\n                    // was made smaller.\r\n                    double smaller = root.ViewportHeight - ItemsControlHelper.ItemsHost.ActualHeight;\r\n\r\n                    if (smaller < 0)\r\n                    {\r\n                        targetSize.Height = Math.Max(0, targetSize.Height + smaller);\r\n                    }\r\n\r\n                    // calculated the targetsize for all selected items. Because of rounding issues, the\r\n                    // actual space taken sometimes exceeds the appropriate amount by a fraction. \r\n                    if (targetSize.Height > 1)\r\n                    {\r\n                        targetSize.Height -= 1;\r\n                    }\r\n\r\n                    // calculate targetsize per selected item. This is redistribution.\r\n                    targetSize.Height = SelectedItems.Count > 0 ? targetSize.Height / SelectedItems.Count : targetSize.Height;\r\n                }\r\n\r\n                // set that targetsize\r\n                foreach (object item in Items)\r\n                {\r\n                    AccordionItem accordionItem = ItemContainerGenerator.ContainerFromItem(item) as AccordionItem;\r\n                    if (accordionItem != null)\r\n                    {\r\n                        // the calculated target size is calculated for the selected items.\r\n                        if (accordionItem.IsSelected)\r\n                        {\r\n                            accordionItem.ContentTargetSize = targetSize;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether the accordion fills width.\r\n        /// </summary>\r\n        private bool IsShouldFillWidth\r\n        {\r\n            get\r\n            {\r\n                return (ExpandDirection == ExpandDirection.Left || ExpandDirection == ExpandDirection.Right) &&\r\n                       (!Double.IsNaN(Width) || HorizontalAlignment == HorizontalAlignment.Stretch);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether the accordion fills height.\r\n        /// </summary>\r\n        private bool IsShouldFillHeight\r\n        {\r\n            get\r\n            {\r\n                return (ExpandDirection == ExpandDirection.Down || ExpandDirection == ExpandDirection.Up) &&\r\n                       (!Double.IsNaN(Height) || VerticalAlignment == VerticalAlignment.Stretch);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Sets the orientation of the panel.\r\n        /// </summary>\r\n        private void SetPanelOrientation()\r\n        {\r\n            StackPanel panel = ItemsControlHelper.ItemsHost as StackPanel;\r\n            if (panel != null)\r\n            {\r\n                switch (ExpandDirection)\r\n                {\r\n                    case ExpandDirection.Down:\r\n                    case ExpandDirection.Up:\r\n                        panel.HorizontalAlignment = HorizontalAlignment.Stretch;\r\n                        panel.VerticalAlignment = ExpandDirection == ExpandDirection.Down ? VerticalAlignment.Top : VerticalAlignment.Bottom;\r\n                        panel.Orientation = Orientation.Vertical;\r\n                        break;\r\n                    case ExpandDirection.Left:\r\n                    case ExpandDirection.Right:\r\n                        panel.VerticalAlignment = VerticalAlignment.Stretch;\r\n                        panel.HorizontalAlignment = ExpandDirection == ExpandDirection.Left ? HorizontalAlignment.Right : HorizontalAlignment.Left;\r\n                        panel.Orientation = Orientation.Horizontal;\r\n                        break;\r\n                }\r\n            }\r\n        }\r\n        #endregion Layout\r\n\r\n        #region Visual state management\r\n        /// <summary>\r\n        /// Provides handling for the GotFocus event.\r\n        /// </summary>\r\n        /// <param name=\"e\">The data for the event.</param>\r\n        protected override void OnGotFocus(RoutedEventArgs e)\r\n        {\r\n            if (Interaction.AllowGotFocus(e))\r\n            {\r\n                Interaction.OnGotFocusBase();\r\n                base.OnGotFocus(e);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Provides handling for the LostFocus event.\r\n        /// </summary>\r\n        /// <param name=\"e\">The data for the event.</param>\r\n        protected override void OnLostFocus(RoutedEventArgs e)\r\n        {\r\n            if (Interaction.AllowLostFocus(e))\r\n            {\r\n                Interaction.OnLostFocusBase();\r\n                base.OnLostFocus(e);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Provides handling for the MouseEnter event.\r\n        /// </summary>\r\n        /// <param name=\"e\">The data for the event.</param>\r\n        protected override void OnMouseEnter(MouseEventArgs e)\r\n        {\r\n            if (Interaction.AllowMouseEnter(e))\r\n            {\r\n                Interaction.OnMouseEnterBase();\r\n                base.OnMouseEnter(e);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Provides handling for the MouseLeave event.\r\n        /// </summary>\r\n        /// <param name=\"e\">The data for the event.</param>\r\n        protected override void OnMouseLeave(MouseEventArgs e)\r\n        {\r\n            if (Interaction.AllowMouseLeave(e))\r\n            {\r\n                Interaction.OnMouseLeaveBase();\r\n                base.OnMouseLeave(e);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Provides handling for the MouseLeftButtonDown event.\r\n        /// </summary>\r\n        /// <param name=\"e\">The data for the event.</param>\r\n        protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)\r\n        {\r\n            if (Interaction.AllowMouseLeftButtonDown(e))\r\n            {\r\n                Interaction.OnMouseLeftButtonDownBase();\r\n                base.OnMouseLeftButtonDown(e);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called before the MouseLeftButtonUp event occurs.\r\n        /// </summary>\r\n        /// <param name=\"e\">The data for the event.</param>\r\n        protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)\r\n        {\r\n            if (Interaction.AllowMouseLeftButtonUp(e))\r\n            {\r\n                Interaction.OnMouseLeftButtonUpBase();\r\n                base.OnMouseLeftButtonUp(e);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Update the visual state of the control.\r\n        /// </summary>\r\n        /// <param name=\"useTransitions\">\r\n        /// A value indicating whether to automatically generate transitions to\r\n        /// the new state, or instantly transition to the new state.\r\n        /// </param>\r\n        void IUpdateVisualState.UpdateVisualState(bool useTransitions)\r\n        {\r\n            UpdateVisualState(useTransitions);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Update the current visual state of the button.\r\n        /// </summary>\r\n        /// <param name=\"useTransitions\">\r\n        /// True to use transitions when updating the visual state, false to\r\n        /// snap directly to the new visual state.\r\n        /// </param>\r\n        internal virtual void UpdateVisualState(bool useTransitions)\r\n        {\r\n            // Handle the Common and Focused states\r\n            Interaction.UpdateVisualStateBase(useTransitions);\r\n        }\r\n        #endregion Visual state management\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Layout/Accordion/System/Windows/Controls/AccordionAction.cs",
    "content": "// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Determines the action the AccordionItem will perform.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    internal enum AccordionAction\r\n    {\r\n        /// <summary>\r\n        /// No action will be performed.\r\n        /// </summary>\r\n        None,\r\n\r\n        /// <summary>\r\n        /// A collapse will be performed.\r\n        /// </summary>\r\n        Collapse,\r\n        \r\n        /// <summary>\r\n        /// An expand will be performed.\r\n        /// </summary>\r\n        Expand,\r\n        \r\n        /// <summary>\r\n        /// A resize will be performed.\r\n        /// </summary>\r\n        Resize\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Layout/Accordion/System/Windows/Controls/AccordionButton.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.Primitives\r\n{\r\n    /// <summary>\r\n    /// Represents the header for an accordion item.\r\n    /// </summary>\r\n    /// <remarks>By creating a seperate control, there is more flexibility in \r\n    /// the templating possibilities.</remarks>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    [TemplateVisualState(Name = VisualStates.StateNormal, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StateMouseOver, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StatePressed, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StateDisabled, GroupName = VisualStates.GroupCommon)]\r\n\r\n    [TemplateVisualState(Name = VisualStates.StateFocused, GroupName = VisualStates.GroupFocus)]\r\n    [TemplateVisualState(Name = VisualStates.StateUnfocused, GroupName = VisualStates.GroupFocus)]\r\n\r\n    [TemplateVisualState(Name = VisualStates.StateExpanded, GroupName = VisualStates.GroupExpansion)]\r\n    [TemplateVisualState(Name = VisualStates.StateCollapsed, GroupName = VisualStates.GroupExpansion)]\r\n\r\n    [TemplateVisualState(Name = VisualStates.StateExpandDown, GroupName = VisualStates.GroupExpandDirection)]\r\n    [TemplateVisualState(Name = VisualStates.StateExpandUp, GroupName = VisualStates.GroupExpandDirection)]\r\n    [TemplateVisualState(Name = VisualStates.StateExpandLeft, GroupName = VisualStates.GroupExpandDirection)]\r\n    [TemplateVisualState(Name = VisualStates.StateExpandRight, GroupName = VisualStates.GroupExpandDirection)]\r\n    public class AccordionButton : ToggleButton\r\n    {\r\n        #region Parent AccordionItem\r\n        /// <summary>\r\n        /// Gets or sets a reference to the parent AccordionItem \r\n        /// of an AccordionButton.\r\n        /// </summary>\r\n        /// <value>The parent accordion item.</value>\r\n        internal AccordionItem ParentAccordionItem { get; set; }\r\n        #endregion Parent AccordionItem\r\n\r\n#if !SILVERLIGHT\r\n        /// <summary>\r\n        /// Static constructor\r\n        /// </summary>\r\n        static AccordionButton()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(AccordionButton), new FrameworkPropertyMetadata(typeof(AccordionButton)));\r\n        }\r\n#endif\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the <see cref=\"AccordionButton\"/> \r\n        /// class.\r\n        /// </summary>\r\n        public AccordionButton()\r\n        {\r\n#if SILVERLIGHT\r\n            DefaultStyleKey = typeof(AccordionButton);\r\n#endif\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates the state of the visual.\r\n        /// </summary>\r\n        /// <param name=\"useTransitions\">If set to <c>true</c> use transitions.</param>\r\n        /// <remarks>The header will follow the parent accordionitem states.</remarks>\r\n        internal virtual void UpdateVisualState(bool useTransitions)\r\n        {\r\n            // the visualstate of the header is completely dependent on the parent state.\r\n            if (ParentAccordionItem == null)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (ParentAccordionItem.IsSelected)\r\n            {\r\n                VisualStates.GoToState(this, useTransitions, VisualStates.StateExpanded);\r\n            }\r\n            else\r\n            {\r\n                VisualStates.GoToState(this, useTransitions, VisualStates.StateCollapsed);\r\n            }\r\n\r\n            switch (ParentAccordionItem.ExpandDirection)\r\n            {\r\n                    // no animations on an expanddirection change.\r\n                case ExpandDirection.Down:\r\n                    VisualStates.GoToState(this, false, VisualStates.StateExpandDown);\r\n                    break;\r\n\r\n                case ExpandDirection.Up:\r\n                    VisualStates.GoToState(this, false, VisualStates.StateExpandUp);\r\n                    break;\r\n\r\n                case ExpandDirection.Left:\r\n                    VisualStates.GoToState(this, false, VisualStates.StateExpandLeft);\r\n                    break;\r\n\r\n                default:\r\n                    VisualStates.GoToState(this, false, VisualStates.StateExpandRight);\r\n                    break;\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Layout/Accordion/System/Windows/Controls/AccordionItem.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System.Globalization;\r\nusing System.Windows.Automation.Peers;\r\nusing System.Windows.Controls.Primitives;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Diagnostics;\r\nusing System.Diagnostics.CodeAnalysis;\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Represents a control that displays a header and has a collapsible \r\n    /// content window.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    [TemplateVisualState(Name = VisualStates.StateNormal, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StateMouseOver, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StatePressed, GroupName = VisualStates.GroupCommon)]\r\n    [TemplateVisualState(Name = VisualStates.StateDisabled, GroupName = VisualStates.GroupCommon)]\r\n\r\n    [TemplateVisualState(Name = VisualStates.StateFocused, GroupName = VisualStates.GroupFocus)]\r\n    [TemplateVisualState(Name = VisualStates.StateUnfocused, GroupName = VisualStates.GroupFocus)]\r\n\r\n    [TemplateVisualState(Name = VisualStates.StateExpanded, GroupName = VisualStates.GroupExpansion)]\r\n    [TemplateVisualState(Name = VisualStates.StateCollapsed, GroupName = VisualStates.GroupExpansion)]\r\n\r\n    [TemplateVisualState(Name = VisualStates.StateLocked, GroupName = VisualStates.GroupLocked)]\r\n    [TemplateVisualState(Name = VisualStates.StateUnlocked, GroupName = VisualStates.GroupLocked)]\r\n\r\n    [TemplateVisualState(Name = VisualStates.StateExpandDown, GroupName = VisualStates.GroupExpandDirection)]\r\n    [TemplateVisualState(Name = VisualStates.StateExpandUp, GroupName = VisualStates.GroupExpandDirection)]\r\n    [TemplateVisualState(Name = VisualStates.StateExpandLeft, GroupName = VisualStates.GroupExpandDirection)]\r\n    [TemplateVisualState(Name = VisualStates.StateExpandRight, GroupName = VisualStates.GroupExpandDirection)]\r\n\r\n    [TemplatePart(Name = ElementExpandSiteName, Type = typeof(ExpandableContentControl))]\r\n    [TemplatePart(Name = ElementExpanderButtonName, Type = typeof(AccordionButton))]\r\n\r\n    [StyleTypedProperty(Property = \"AccordionButtonStyle\", StyleTargetType = typeof(AccordionButton))]\r\n    [StyleTypedProperty(Property = \"ExpandableContentControlStyle\", StyleTargetType = typeof(ExpandableContentControl))]\r\n    public class AccordionItem : HeaderedContentControl, IUpdateVisualState\r\n    {\r\n        #region Template Parts\r\n        /// <summary>\r\n        /// The name of the ExpanderButton template part.\r\n        /// </summary>\r\n        private const string ElementExpanderButtonName = \"ExpanderButton\";\r\n\r\n        /// <summary>\r\n        /// The name of the ExpandSite template part.\r\n        /// </summary>\r\n        private const string ElementExpandSiteName = \"ExpandSite\";\r\n\r\n        /// <summary>\r\n        /// The ExpanderButton template part is a templated ToggleButton that's \r\n        /// used to select and unselect this AccordionItem.\r\n        /// </summary>\r\n        private AccordionButton _expanderButton;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the ExpanderButton template part.\r\n        /// </summary>\r\n        private AccordionButton ExpanderButton\r\n        {\r\n            get { return _expanderButton; }\r\n            set\r\n            {\r\n                // Detach from old ExpanderButton\r\n                if (_expanderButton != null)\r\n                {\r\n                    _expanderButton.Click -= OnExpanderButtonClicked;\r\n                    _expanderButton.ParentAccordionItem = null;\r\n                    _expanderButton.SizeChanged -= OnHeaderSizeChanged;\r\n                }\r\n\r\n                _expanderButton = value;\r\n\r\n                if (_expanderButton != null)\r\n                {\r\n                    _expanderButton.IsChecked = IsSelected;\r\n                    _expanderButton.Click += OnExpanderButtonClicked;\r\n                    _expanderButton.ParentAccordionItem = this;\r\n                    _expanderButton.SizeChanged += OnHeaderSizeChanged;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// BackingField for the ExpandSite property.\r\n        /// </summary>\r\n        private ExpandableContentControl _expandSite;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the expand site template part.\r\n        /// </summary>\r\n        private ExpandableContentControl ExpandSite\r\n        {\r\n            get\r\n            {\r\n                return _expandSite;\r\n            }\r\n            set\r\n            {\r\n                _expandSite = value;\r\n            }\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region public ExpandDirection ExpandDirection\r\n        /// <summary>\r\n        /// Determines whether the ExpandDirection property may be written.\r\n        /// </summary>\r\n        private bool _allowedToWriteExpandDirection;\r\n\r\n        /// <summary>\r\n        /// Gets the direction in which the AccordionItem content window opens.\r\n        /// </summary>\r\n        public ExpandDirection ExpandDirection\r\n        {\r\n            get { return (ExpandDirection)GetValue(ExpandDirectionProperty); }\r\n            protected internal set\r\n            {\r\n                _allowedToWriteExpandDirection = true;\r\n                SetValue(ExpandDirectionProperty, value);\r\n                _allowedToWriteExpandDirection = false;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ExpandDirection dependency property. \r\n        /// </summary>\r\n        public static readonly DependencyProperty ExpandDirectionProperty =\r\n                DependencyProperty.Register(\r\n                        \"ExpandDirection\",\r\n                        typeof(ExpandDirection),\r\n                        typeof(AccordionItem),\r\n                        new PropertyMetadata(ExpandDirection.Down, OnExpandDirectionPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// ExpandDirectionProperty PropertyChangedCallback call back static \r\n        /// function.\r\n        /// This function validates the new value before calling virtual function \r\n        /// OnExpandDirectionChanged.\r\n        /// </summary>\r\n        /// <param name=\"d\">Expander object whose ExpandDirection property is \r\n        /// changed.</param>\r\n        /// <param name=\"e\">DependencyPropertyChangedEventArgs which contains \r\n        /// the old and new values.</param>\r\n        private static void OnExpandDirectionPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            AccordionItem ctrl = (AccordionItem)d;\r\n            ExpandDirection oldValue = (ExpandDirection)e.OldValue;\r\n            ExpandDirection newValue = (ExpandDirection)e.NewValue;\r\n            \r\n            if (!ctrl._allowedToWriteExpandDirection)\r\n            {\r\n                // revert to old value\r\n                ctrl.ExpandDirection = oldValue;\r\n\r\n                string message = string.Format(\r\n                    CultureInfo.InvariantCulture,\r\n                    Properties.Resources.AccordionItem_InvalidWriteToExpandDirection,\r\n                    newValue);\r\n                throw new InvalidOperationException(message);\r\n            }\r\n\r\n            // invalid value. This check is not of great importance anymore since \r\n            // the previous check should catch all invalid sets.\r\n            if (newValue != ExpandDirection.Down &&\r\n                newValue != ExpandDirection.Left &&\r\n                newValue != ExpandDirection.Right &&\r\n                newValue != ExpandDirection.Up)\r\n            {\r\n                // revert to old value\r\n                ctrl.ExpandDirection = oldValue;\r\n\r\n                string message = string.Format(\r\n                    CultureInfo.InvariantCulture,\r\n                    Properties.Resources.Expander_OnExpandDirectionPropertyChanged_InvalidValue,\r\n                    newValue);\r\n                throw new ArgumentException(message, \"e\");\r\n            }\r\n\r\n            if (ctrl.ExpandSite != null)\r\n            {\r\n                // Jump to correct percentage after a direction change\r\n#if SILVERLIGHT\r\n                ctrl.ExpandSite.Percentage = ctrl.IsSelected ? 1 : 0;\r\n#else\r\n //               ctrl.ExpandSite.RecalculatePercentage(ctrl.IsSelected ? 1 : 0);\r\n#endif\r\n            }\r\n\r\n            ctrl.UpdateVisualState(true);\r\n        }\r\n        #endregion public ExpandDirection ExpandDirection\r\n\r\n        #region public bool IsSelected\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether the AccordionItem is \r\n        /// selected and its content window is visible.\r\n        /// </summary>\r\n        public bool IsSelected\r\n        {\r\n            get { return (bool)GetValue(IsSelectedProperty); }\r\n            set { SetValue(IsSelectedProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the IsSelected dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty IsSelectedProperty =\r\n                DependencyProperty.Register(\r\n                        \"IsSelected\",\r\n                        typeof(bool),\r\n                        typeof(AccordionItem),\r\n                        new PropertyMetadata(OnIsSelectedPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// SelectedProperty PropertyChangedCallback static function.\r\n        /// </summary>\r\n        /// <param name=\"d\">Expander object whose Expanded property is changed.</param>\r\n        /// <param name=\"e\">DependencyPropertyChangedEventArgs which contains the \r\n        /// old and new values.</param>\r\n        private static void OnIsSelectedPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            AccordionItem ctrl = (AccordionItem) d;\r\n            bool isSelected = (bool) e.NewValue;\r\n\r\n            // Not allowed to change the IsSelected state when locked.\r\n            if (ctrl.IsLocked && ctrl._isSelectedNestedLevel == 0)\r\n            {\r\n                ctrl._isSelectedNestedLevel++;\r\n                ctrl.SetValue(IsSelectedProperty, e.OldValue);\r\n                ctrl._isSelectedNestedLevel--;\r\n\r\n                throw new InvalidOperationException(Properties.Resources.AccordionItem_OnIsSelectedPropertyChanged_InvalidChange);\r\n            }\r\n\r\n            if (ctrl._isSelectedNestedLevel == 0)\r\n            {\r\n                Accordion parent = ctrl.ParentAccordion;\r\n                if (parent != null)\r\n                {\r\n                    if (isSelected)\r\n                    {\r\n                        parent.OnAccordionItemSelected(ctrl);\r\n                    }\r\n                    else\r\n                    {\r\n                        parent.OnAccordionItemUnselected(ctrl);\r\n                    }\r\n                }\r\n\r\n                if (isSelected)\r\n                {\r\n                    ctrl.OnSelected();\r\n                }\r\n                else\r\n                {\r\n                    ctrl.OnUnselected();\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Nested level for IsSelectedCoercion.\r\n        /// </summary>\r\n        private int _isSelectedNestedLevel;\r\n        #endregion public bool IsSelected\r\n\r\n        #region public bool IsLocked\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether the AccordionItem cannot be \r\n        /// selected by the user.\r\n        /// </summary>\r\n        /// <value><c>True</c> if this instance is locked; otherwise, <c>false</c>.</value>\r\n        /// <remarks>The IsSelected property may not be changed when the \r\n        /// AccordionItem is locked. Locking occurs when the item is the first \r\n        /// in the list, the SelectionMode of Accordion requires atleast one selected\r\n        /// AccordionItem and the AccordionItem is currently selected.</remarks>\r\n        public bool IsLocked\r\n        {\r\n            get { return _isLocked; }\r\n            internal set\r\n            {\r\n                if (_isLocked != value)\r\n                {\r\n                    _isLocked = value;\r\n\r\n                    UpdateVisualState(true);\r\n                }\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        /// BackingField for IsLocked.\r\n        /// </summary>\r\n        private bool _isLocked;\r\n\r\n        #endregion public bool IsLocked\r\n\r\n        #region public Style AccordionButtonStyle\r\n        /// <summary>\r\n        /// Gets or sets the Style used by AccordionButton.\r\n        /// </summary>\r\n        public Style AccordionButtonStyle\r\n        {\r\n            get { return GetValue(AccordionButtonStyleProperty) as Style; }\r\n            set { SetValue(AccordionButtonStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the AccordionButtonStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty AccordionButtonStyleProperty =\r\n            DependencyProperty.Register(\r\n                \"AccordionButtonStyle\",\r\n                typeof(Style),\r\n                typeof(AccordionItem),\r\n                new PropertyMetadata(OnAccordionButtonStylePropertyChanged));\r\n\r\n        /// <summary>\r\n        /// AccordionButtonStyleProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">AccordionItem that changed its AccordionButtonStyle.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnAccordionButtonStylePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            AccordionItem source = (AccordionItem) d;\r\n            source.OnAccordionButtonStyleChanged(e.OldValue as Style, e.NewValue as Style);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when AccordionButtonStyle is changed.\r\n        /// </summary>\r\n        /// <param name=\"oldStyle\">The old style.</param>\r\n        /// <param name=\"newStyle\">The new style.</param>\r\n        protected virtual void OnAccordionButtonStyleChanged(Style oldStyle, Style newStyle)\r\n        {\r\n        }\r\n        #endregion public Style AccordionButtonStyle\r\n\r\n        #region public Style ExpandableContentControlStyle\r\n        /// <summary>\r\n        /// Gets or sets the Style used by ExpandableContentControl.\r\n        /// </summary>\r\n        public Style ExpandableContentControlStyle\r\n        {\r\n            get { return GetValue(ExpandableContentControlStyleProperty) as Style; }\r\n            set { SetValue(ExpandableContentControlStyleProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ExpandableContentControlStyle dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ExpandableContentControlStyleProperty =\r\n            DependencyProperty.Register(\r\n                \"ExpandableContentControlStyle\",\r\n                typeof(Style),\r\n                typeof(AccordionItem),\r\n                new PropertyMetadata(OnExpandableContentControlStylePropertyChanged));\r\n\r\n        /// <summary>\r\n        /// ExpandableContentControlStyleProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">AccordionItem that changed its ExpandableContentControlStyle.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnExpandableContentControlStylePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            AccordionItem source = (AccordionItem)d;\r\n            source.OnExpandableContentControlStyleChanged(e.OldValue as Style, e.NewValue as Style);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when ExpandableContentControlStyle is changed.\r\n        /// </summary>\r\n        /// <param name=\"oldStyle\">The old style.</param>\r\n        /// <param name=\"newStyle\">The new style.</param>\r\n        protected virtual void OnExpandableContentControlStyleChanged(Style oldStyle, Style newStyle)\r\n        {\r\n        }\r\n        #endregion public Style ExpandableContentControlStyle\r\n\r\n        #region public Size ContentTargetSize\r\n        /// <summary>\r\n        /// Determines whether it is allowed to set the ContentTargetSize\r\n        /// property.\r\n        /// </summary>\r\n        private bool _allowedToWriteContentTargetSize;\r\n\r\n        /// <summary>\r\n        /// Gets the Size that the content will animate to.\r\n        /// </summary>\r\n        public Size ContentTargetSize\r\n        {\r\n            get { return (Size)GetValue(ContentTargetSizeProperty); }\r\n            internal set\r\n            {\r\n                _allowedToWriteContentTargetSize = true;\r\n                SetValue(ContentTargetSizeProperty, value);\r\n                _allowedToWriteContentTargetSize = false;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the ContentTargetSize dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ContentTargetSizeProperty =\r\n            DependencyProperty.Register(\r\n                \"ContentTargetSize\",\r\n                typeof(Size),\r\n                typeof(AccordionItem),\r\n                new PropertyMetadata(new Size(double.NaN, double.NaN), OnContentTargetSizePropertyChanged));\r\n\r\n        /// <summary>\r\n        /// ContentTargetSizeProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">AccordionItem that changed its ContentTargetSize.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnContentTargetSizePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            AccordionItem source = (AccordionItem)d;\r\n            Size targetSize = (Size)e.NewValue;\r\n\r\n            if (!source._allowedToWriteContentTargetSize)\r\n            {\r\n                // revert to old value\r\n                source.ContentTargetSize = (Size)e.OldValue;\r\n\r\n                throw new InvalidOperationException(Properties.Resources.AccordionItem_InvalidWriteToContentTargetSize);\r\n            }\r\n        }\r\n        #endregion public Size ContentTargetSize\r\n\r\n        #region Accordion ParentAccordion\r\n        /// <summary>\r\n        /// Gets or sets a reference to the parent Accordion of an\r\n        /// AccordionItem.\r\n        /// </summary>\r\n        internal Accordion ParentAccordion { get; set; }\r\n        #endregion Accordion ParentAccordion\r\n\r\n        /// <summary>\r\n        /// Gets the scheduled action.\r\n        /// </summary>\r\n        /// <value>The scheduled action.</value>\r\n        internal AccordionAction ScheduledAction { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Occurs when the accordionItem is selected.\r\n        /// </summary>\r\n        public static RoutedEvent SelectedEvent = EventManager.RegisterRoutedEvent(\"Selected\", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AccordionItem));\r\n\r\n        /// <summary>\r\n        /// Occurs when the accordionItem is selected.\r\n        /// </summary>\r\n        public event RoutedEventHandler Selected\r\n        {\r\n            add { AddHandler(SelectedEvent, value); }\r\n            remove { RemoveHandler(SelectedEvent, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Occurs when the accordionItem is unselected.\r\n        /// </summary>\r\n        public static RoutedEvent UnselectedEvent = EventManager.RegisterRoutedEvent(\"Unselected\", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(AccordionItem));\r\n\r\n        /// <summary>\r\n        /// Occurs when the accordionItem is unselected.\r\n        /// </summary>\r\n        public event RoutedEventHandler Unselected\r\n        {\r\n            add { AddHandler(UnselectedEvent, value); }\r\n            remove { RemoveHandler(UnselectedEvent, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Static constructor\r\n        /// </summary>\r\n        static AccordionItem()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(AccordionItem), new FrameworkPropertyMetadata(typeof(AccordionItem)));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the AccordionItem class.\r\n        /// </summary>\r\n        public AccordionItem()\r\n        {\r\n            // initialize to no action.\r\n            ScheduledAction = AccordionAction.None;\r\n\r\n#if SILVERLIGHT\r\n            DefaultStyleKey = typeof(AccordionItem);\r\n#endif\r\n            _interaction = new InteractionHelper(this);\r\n        }\r\n\r\n        #region Layout\r\n\r\n        /// <summary>\r\n        /// Called when the size of the control changes.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The sender.</param>\r\n        /// <param name=\"e\">The <see cref=\"System.Windows.SizeChangedEventArgs\"/> \r\n        /// instance containing the event data.</param>\r\n        private void OnHeaderSizeChanged(object sender, SizeChangedEventArgs e)\r\n        {\r\n            // allow the parent to reschedule a layout pass.\r\n            if (ParentAccordion != null)\r\n            {\r\n                ParentAccordion.OnHeaderSizeChange(this);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the relevant size of the current content.\r\n        /// </summary>\r\n        internal Size RelevantContentSize\r\n        {\r\n            get { return ExpandSite == null ? new Size(0, 0) : ExpandSite.RelevantContentSize; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Schedules the specified action.\r\n        /// </summary>\r\n        /// <param name=\"action\">The action to be performed.</param>\r\n        private void Schedule(AccordionAction action)\r\n        {\r\n#if SILVERLIGHT\r\n            if (DesignerProperties.GetIsInDesignMode(this) && ExpandSite != null)\r\n            {\r\n                switch (action)\r\n                {\r\n                    case AccordionAction.None:\r\n                        break;\r\n                    case AccordionAction.Collapse:\r\n                        ExpandSite.Percentage = 0;\r\n                        break;\r\n                    case AccordionAction.Expand:\r\n                    case AccordionAction.Resize:\r\n                        ExpandSite.Percentage = 1;\r\n                        break;\r\n                    default:\r\n                        throw new ArgumentOutOfRangeException(\"action\");\r\n                }\r\n                return;\r\n            }\r\n#endif\r\n\r\n            ScheduledAction = action;\r\n\r\n            if (ParentAccordion == null)\r\n            {\r\n                // no parentaccordion to notify, so just execute.\r\n                StartAction();\r\n            }\r\n            else\r\n            {\r\n                bool directExecute = ParentAccordion.ScheduleAction(this, action);\r\n                if (directExecute)\r\n                {\r\n                    StartAction();\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Starts an action, such as resize, collapse or expand.\r\n        /// </summary>\r\n        internal virtual void StartAction()\r\n        {\r\n            if (ScheduledAction == AccordionAction.None)\r\n            {\r\n                throw new InvalidOperationException(Properties.Resources.AccordionItem_StartAction_InvalidCall);\r\n            }\r\n            Action layoutAction;\r\n\r\n            switch (ScheduledAction)\r\n            {\r\n                case AccordionAction.Collapse:\r\n                    layoutAction = () =>\r\n                    {\r\n                        VisualStateManager.GoToState(this, VisualStates.StateExpanded, false);\r\n                        // We only want to notify the parent that this action is finished when we are done with\r\n                        // the state transition. In SL this is done through OnStoryboardFinished, but the same code\r\n                        // in WPF would result in a corrupted state because OnStoryboardFinished gets called more frequently than expected.\r\n                        // In the WPF case, we make the scheduled action synchornous to ensure the transition is properly done.\r\n#if SILVERLIGHT\r\n                        VisualStateManager.GoToState(this, VisualStates.StateCollapsed, true);\r\n#else\r\n                        if (VisualStateManager.GoToState(this, VisualStates.StateCollapsed, true))\r\n                        {\r\n                            ParentAccordion.OnActionFinish(this);\r\n                        }\r\n#endif\r\n                    };\r\n                    break;\r\n                case AccordionAction.Expand:\r\n                    layoutAction = () =>\r\n                    {\r\n                        VisualStateManager.GoToState(this, VisualStates.StateCollapsed, false);\r\n#if SILVERLIGHT\r\n                        VisualStateManager.GoToState(this, VisualStates.StateExpanded, true);\r\n#else\r\n                        if (VisualStateManager.GoToState(this, VisualStates.StateExpanded, true))\r\n                        {\r\n                            ParentAccordion.OnActionFinish(this);\r\n                        }\r\n#endif\r\n                    };\r\n                    break;\r\n                case AccordionAction.Resize:\r\n                    layoutAction = () =>\r\n                    {\r\n                        // trigger ExpandedState to run again, by quickly moving to collapsed. \r\n                        // the effect is not noticeable because no layout pass is done.\r\n                        VisualStateManager.GoToState(this, VisualStates.StateExpanded, false);\r\n                        VisualStateManager.GoToState(this, VisualStates.StateCollapsed, false);\r\n#if SILVERLIGHT\r\n                        VisualStateManager.GoToState(this, VisualStates.StateExpanded, true);\r\n#else\r\n                        if (VisualStateManager.GoToState(this, VisualStates.StateExpanded, true))\r\n                        {\r\n                            ParentAccordion.OnActionFinish(this);\r\n                        }\r\n#endif\r\n                    };\r\n                    break;\r\n                default:\r\n                    {\r\n                        string message = string.Format(\r\n                            CultureInfo.InvariantCulture,\r\n                            Properties.Resources.AccordionItem_StartAction_InvalidAction,\r\n                            ScheduledAction);\r\n\r\n                        throw new NotSupportedException(message);\r\n                    }\r\n            }\r\n\r\n            ScheduledAction = AccordionAction.None;\r\n            layoutAction();\r\n        }\r\n\r\n#if SILVERLIGHT\r\n        /// <summary>\r\n        /// Called when a storyboard finishes.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The AccordionItem that finished a storyboard.</param>\r\n        /// <param name=\"e\">The <see cref=\"System.EventArgs\"/> instance containing \r\n        /// the event data.</param>\r\n        /// <remarks>AccordionItem is required to make this call.</remarks>\r\n        private void OnStoryboardFinished(object sender, EventArgs e)\r\n        {\r\n            _isBusyWithAction = false;\r\n\r\n            if (ParentAccordion != null)\r\n            {\r\n                ParentAccordion.OnActionFinish(this);\r\n            }\r\n        }\r\n#endif\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether the AccordionItem fills width.\r\n        /// </summary>\r\n        private bool ShouldFillWidth\r\n        {\r\n            get\r\n            {\r\n                return (ExpandDirection == ExpandDirection.Left || ExpandDirection == ExpandDirection.Right) &&\r\n                       (!Double.IsNaN(ContentTargetSize.Width) || HorizontalAlignment == HorizontalAlignment.Stretch);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether the AccordionItem fills height.\r\n        /// </summary>\r\n        private bool ShouldFillHeight\r\n        {\r\n            get\r\n            {\r\n                return (ExpandDirection == ExpandDirection.Down || ExpandDirection == ExpandDirection.Up) &&\r\n                       (!Double.IsNaN(ContentTargetSize.Height) || VerticalAlignment == VerticalAlignment.Stretch);\r\n            }\r\n        }\r\n        #endregion Layout\r\n\r\n        /// <summary>\r\n        /// Builds the visual tree for the AccordionItem control when a new \r\n        /// template is applied.\r\n        /// </summary>\r\n        public override void OnApplyTemplate()\r\n        {\r\n            base.OnApplyTemplate();\r\n            ExpanderButton = GetTemplateChild(ElementExpanderButtonName) as AccordionButton;\r\n            ExpandSite = GetTemplateChild(ElementExpandSiteName) as ExpandableContentControl;\r\n\r\n            if (VisualTreeHelper.GetChildrenCount(this) > 0)\r\n            {\r\n                FrameworkElement root = VisualTreeHelper.GetChild(this, 0) as FrameworkElement;\r\n\r\n#if SILVERLIGHT\r\n                if (root != null)\r\n                {\r\n                    ExpandStoryboard = (from stategroup in\r\n                                            (VisualStateManager.GetVisualStateGroups(root) as\r\n                                             Collection<VisualStateGroup>)\r\n                                        where stategroup.Name == VisualStates.GroupExpansion\r\n                                        from state in (stategroup.States as Collection<VisualState>)\r\n                                        where state.Name == VisualStates.StateExpanded\r\n                                        select state.Storyboard).FirstOrDefault();\r\n\r\n                    CollapseStoryboard = (from stategroup in\r\n                                              (VisualStateManager.GetVisualStateGroups(root) as\r\n                                               Collection<VisualStateGroup>)\r\n                                          where stategroup.Name == VisualStates.GroupExpansion\r\n                                          from state in (stategroup.States as Collection<VisualState>)\r\n                                          where state.Name == VisualStates.StateCollapsed\r\n                                          select state.Storyboard).FirstOrDefault();\r\n                }\r\n                else\r\n                {\r\n                    ExpandStoryboard = null;\r\n                    CollapseStoryboard = null;\r\n                }\r\n#endif\r\n\r\n            }\r\n\r\n            _interaction.OnApplyTemplateBase();\r\n\r\n            UpdateVisualState(false);\r\n\r\n            // the UpdateVisualState will not set the expand or collapse state.\r\n            if (IsSelected)\r\n            {\r\n                Schedule(AccordionAction.Expand);\r\n            }\r\n            else\r\n            {\r\n                Schedule(AccordionAction.Collapse);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a AccordionItemAutomationPeer for use by the Silverlight\r\n        /// automation infrastructure.\r\n        /// </summary>\r\n        /// <returns>A AccordionItemAutomationPeer object for the AccordionItem.</returns>\r\n        protected override AutomationPeer OnCreateAutomationPeer()\r\n        {\r\n#if SILVERLIGHT\r\n            return new AccordionItemAutomationPeer(this);\r\n#else\r\n            return new AccordionItemWrapperAutomationPeer(this);\r\n#endif\r\n        }\r\n\r\n        /// <summary>\r\n        /// Prepares the specified container to display the specified item.\r\n        /// </summary>\r\n        /// <param name=\"element\">\r\n        /// Container element used to display the specified item.\r\n        /// </param>\r\n        /// <param name=\"item\">Specified item to display.</param>\r\n        /// <param name=\"parent\">The parent ItemsControl.</param>\r\n        /// <param name=\"parentItemContainerStyle\">\r\n        /// The ItemContainerStyle for the parent ItemsControl.\r\n        /// </param>\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA1801:ReviewUnusedParameters\", MessageId = \"parent\", Justification = \"Following ItemsControl signature.\")]\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA1801:ReviewUnusedParameters\", MessageId = \"parentItemContainerStyle\", Justification = \"Following ItemsControl signature.\")]\r\n        internal static void PreparePrepareHeaderedContentControlContainerForItemOverride(HeaderedContentControl element, object item, ItemsControl parent, Style parentItemContainerStyle)\r\n        {\r\n            if (element != item)\r\n            {\r\n                // We do not have proper access to Visual.\r\n                // Nor do we keep track of the HeaderIsItem property.\r\n                if (!(item is UIElement) && HasDefaultValue(element, HeaderProperty))\r\n                {\r\n                    element.Header = item;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Check whether a control has the default value for a property.\r\n        /// </summary>\r\n        /// <param name=\"control\">The control to check.</param>\r\n        /// <param name=\"property\">The property to check.</param>\r\n        /// <returns>\r\n        /// True if the property has the default value; false otherwise.\r\n        /// </returns>\r\n        private static bool HasDefaultValue(Control control, DependencyProperty property)\r\n        {\r\n            Debug.Assert(control != null, \"control should not be null!\");\r\n            Debug.Assert(property != null, \"property should not be null!\");\r\n            return control.ReadLocalValue(property) == DependencyProperty.UnsetValue;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Provides handling for the KeyDown event.\r\n        /// </summary>\r\n        /// <param name=\"e\">Key event args.</param>\r\n        protected override void OnKeyDown(KeyEventArgs e)\r\n        {\r\n            base.OnKeyDown(e);\r\n\r\n            if (e.Handled || !IsEnabled || IsLocked)\r\n            {\r\n                return;\r\n            }\r\n\r\n            bool isSelected = IsSelected;\r\n            switch (ExpandDirection)\r\n            {\r\n                case ExpandDirection.Down:\r\n                    if ((isSelected && e.Key == Key.Up) || (!isSelected && e.Key == Key.Down))\r\n                    {\r\n                        IsSelected = !isSelected;\r\n                    }\r\n                    break;\r\n                case ExpandDirection.Up:\r\n                    if ((isSelected && e.Key == Key.Down) || (!isSelected && e.Key == Key.Up))\r\n                    {\r\n                        IsSelected = !isSelected;\r\n                    }\r\n                    break;\r\n                case ExpandDirection.Left:\r\n                    if ((isSelected && e.Key == Key.Right) || (!isSelected && e.Key == Key.Left))\r\n                    {\r\n                        IsSelected = !isSelected;\r\n                    }\r\n                    break;\r\n                case ExpandDirection.Right:\r\n                    if ((isSelected && e.Key == Key.Left) || (!isSelected && e.Key == Key.Right))\r\n                    {\r\n                        IsSelected = !isSelected;\r\n                    }\r\n                    break;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Raises the Selected event when the IsSelected property changes \r\n        /// from false to true.\r\n        /// </summary>\r\n        protected virtual void OnSelected()\r\n        {\r\n#if SILVERLIGHT\r\n            ToggleSelected(Selected, new RoutedEventArgs());\r\n#else\r\n            ToggleSelected(new RoutedEventArgs(SelectedEvent));\r\n#endif\r\n        }\r\n\r\n        /// <summary>\r\n        /// Raises the Unselected event when the IsSelected property changes \r\n        /// from true to false.\r\n        /// </summary>\r\n        protected virtual void OnUnselected()\r\n        {\r\n#if SILVERLIGHT\r\n            ToggleSelected(Unselected, new RoutedEventArgs());\r\n#else\r\n            ToggleSelected(new RoutedEventArgs(UnselectedEvent));\r\n#endif\r\n        }\r\n\r\n#if SILVERLIGHT\r\n        /// <summary>\r\n        /// Handle changes to the IsSelected property.\r\n        /// </summary>\r\n        /// <param name=\"handler\">Event handler.</param>\r\n        /// <param name=\"args\">Event arguments.</param>\r\n        private void ToggleSelected(RoutedEventHandler handler, RoutedEventArgs args)\r\n        {\r\n#else\r\n        /// <summary>\r\n        /// Handle changes to the IsSelected property.\r\n        /// </summary>\r\n        /// <param name=\"args\">Event arguments.</param>\r\n        private void ToggleSelected(RoutedEventArgs args)\r\n        {\r\n#endif\r\n            ToggleButton expander = ExpanderButton;\r\n            if (expander != null)\r\n            {\r\n                expander.IsChecked = IsSelected;\r\n            }\r\n\r\n            if (IsSelected)\r\n            {\r\n                Schedule(AccordionAction.Expand);\r\n            }\r\n            else\r\n            {\r\n                Schedule(AccordionAction.Collapse);\r\n            }\r\n\r\n            UpdateVisualState(true);\r\n#if SILVERLIGHT\r\n            RaiseEvent(handler, args);\r\n#else\r\n            // WPF has a slightly different mechanism for raising routed events\r\n            RaiseEvent(args);\r\n#endif\r\n        }\r\n\r\n#if SILVERLIGHT\r\n        /// <summary>\r\n        /// Raise a RoutedEvent.\r\n        /// </summary>\r\n        /// <param name=\"handler\">Event handler.</param>\r\n        /// <param name=\"args\">Event arguments.</param>\r\n        private void RaiseEvent(RoutedEventHandler handler, RoutedEventArgs args)\r\n        {\r\n            if (handler != null)\r\n            {\r\n                handler(this, args);\r\n            }\r\n        }\r\n#endif\r\n\r\n        /// <summary>\r\n        /// Handle ExpanderButton's click event.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The ExpanderButton in template.</param>\r\n        /// <param name=\"e\">Routed event arg.</param>\r\n        private void OnExpanderButtonClicked(object sender, RoutedEventArgs e)\r\n        {\r\n            // If the item is locked, the item is not permitted to change its selection state\r\n            if (!IsLocked)\r\n            {\r\n                IsSelected = !IsSelected;\r\n            }\r\n        }\r\n\r\n        #region Visual state management\r\n\r\n        /// <summary>\r\n        /// Gets or sets the helper that provides all of the standard\r\n        /// interaction functionality.\r\n        /// </summary>\r\n        private InteractionHelper _interaction;\r\n\r\n        /// <summary>\r\n        /// Provides handling for the GotFocus event.\r\n        /// </summary>\r\n        /// <param name=\"e\">The data for the event.</param>\r\n        protected override void OnGotFocus(RoutedEventArgs e)\r\n        {\r\n            if (_interaction.AllowGotFocus(e))\r\n            {\r\n                _interaction.OnGotFocusBase();\r\n                base.OnGotFocus(e);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Provides handling for the LostFocus event.\r\n        /// </summary>\r\n        /// <param name=\"e\">The data for the event.</param>\r\n        protected override void OnLostFocus(RoutedEventArgs e)\r\n        {\r\n            if (_interaction.AllowLostFocus(e))\r\n            {\r\n                _interaction.OnLostFocusBase();\r\n                base.OnLostFocus(e);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Provides handling for the MouseEnter event.\r\n        /// </summary>\r\n        /// <param name=\"e\">The data for the event.</param>\r\n        protected override void OnMouseEnter(MouseEventArgs e)\r\n        {\r\n            if (_interaction.AllowMouseEnter(e))\r\n            {\r\n                _interaction.OnMouseEnterBase();\r\n                base.OnMouseEnter(e);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Provides handling for the MouseLeave event.\r\n        /// </summary>\r\n        /// <param name=\"e\">The data for the event.</param>\r\n        protected override void OnMouseLeave(MouseEventArgs e)\r\n        {\r\n            if (_interaction.AllowMouseLeave(e))\r\n            {\r\n                _interaction.OnMouseLeaveBase();\r\n                base.OnMouseLeave(e);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Provides handling for the MouseLeftButtonDown event.\r\n        /// </summary>\r\n        /// <param name=\"e\">The data for the event.</param>\r\n        protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)\r\n        {\r\n            if (_interaction.AllowMouseLeftButtonDown(e))\r\n            {\r\n                _interaction.OnMouseLeftButtonDownBase();\r\n                base.OnMouseLeftButtonDown(e);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called before the MouseLeftButtonUp event occurs.\r\n        /// </summary>\r\n        /// <param name=\"e\">The data for the event.</param>\r\n        protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)\r\n        {\r\n            if (_interaction.AllowMouseLeftButtonUp(e))\r\n            {\r\n                _interaction.OnMouseLeftButtonUpBase();\r\n                base.OnMouseLeftButtonUp(e);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Update the visual state of the control.\r\n        /// </summary>\r\n        /// <param name=\"useTransitions\">\r\n        /// A value indicating whether to automatically generate transitions to\r\n        /// the new state, or instantly transition to the new state.\r\n        /// </param>\r\n        void IUpdateVisualState.UpdateVisualState(bool useTransitions)\r\n        {\r\n            UpdateVisualState(useTransitions);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Update the current visual state of the button.\r\n        /// </summary>\r\n        /// <param name=\"useTransitions\">\r\n        /// True to use transitions when updating the visual state, false to\r\n        /// snap directly to the new visual state.\r\n        /// </param>\r\n        internal virtual void UpdateVisualState(bool useTransitions)\r\n        {\r\n            if (IsLocked)\r\n            {\r\n                VisualStates.GoToState(this, useTransitions, VisualStates.StateLocked);\r\n            }\r\n            else\r\n            {\r\n                VisualStates.GoToState(this, useTransitions, VisualStates.StateUnlocked);\r\n            }\r\n\r\n            switch (ExpandDirection)\r\n            {\r\n                case ExpandDirection.Down:\r\n                    VisualStates.GoToState(this, useTransitions, VisualStates.StateExpandDown);\r\n                    break;\r\n\r\n                case ExpandDirection.Up:\r\n                    VisualStates.GoToState(this, useTransitions, VisualStates.StateExpandUp);\r\n                    break;\r\n\r\n                case ExpandDirection.Left:\r\n                    VisualStates.GoToState(this, useTransitions, VisualStates.StateExpandLeft);\r\n                    break;\r\n\r\n                default:\r\n                    VisualStates.GoToState(this, useTransitions, VisualStates.StateExpandRight);\r\n                    break;\r\n            }\r\n\r\n            // let the header know a change has possibly occured.\r\n            if (ExpanderButton != null)\r\n            {\r\n                ExpanderButton.UpdateVisualState(useTransitions);\r\n            }\r\n\r\n            // Handle the Common and Focused states\r\n            _interaction.UpdateVisualStateBase(useTransitions);\r\n        }\r\n        #endregion\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Layout/Accordion/System/Windows/Controls/AccordionSelectionMode.cs",
    "content": "// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Defines the minimum and maximum number of selected items allowed in an Accordion control.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public enum AccordionSelectionMode\r\n    {\r\n        /// <summary>\r\n        /// Exactly one item must be selected in the Accordion.\r\n        /// </summary>\r\n        One,\r\n\r\n        /// <summary>\r\n        /// At least one item must be selected in the Accordion. \r\n        /// </summary>\r\n        OneOrMore,\r\n        \r\n        /// <summary>\r\n        /// No more than one item can be selected in the accordion.\r\n        /// </summary>\r\n        ZeroOrOne,\r\n\r\n        /// <summary>\r\n        /// Any number of  items can be selected in the Accordion. \r\n        /// </summary>\r\n        ZeroOrMore\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Layout/Accordion/System/Windows/Controls/ExpandableContentControl.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls.Primitives\r\n{\r\n    public class ExpandableContentControl : ContentControl\r\n    {\r\n        static ExpandableContentControl()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(ExpandableContentControl),\r\n                new FrameworkPropertyMetadata(typeof(ExpandableContentControl)));\r\n            ClipToBoundsProperty.OverrideMetadata(typeof(ExpandableContentControl), new FrameworkPropertyMetadata(true));\r\n            FocusableProperty.OverrideMetadata(typeof(ExpandableContentControl), new FrameworkPropertyMetadata(false));\r\n        }\r\n\r\n        #region public ExpandDirection RevealMode\r\n\r\n        /// <summary>\r\n        /// Gets or sets the direction in which the ExpandableContentControl \r\n        /// content window opens.\r\n        /// </summary>\r\n        public ExpandDirection RevealMode\r\n        {\r\n            get { return (ExpandDirection) GetValue(RevealModeProperty); }\r\n            set { SetValue(RevealModeProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the RevealMode dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty RevealModeProperty = DependencyProperty.Register(\"RevealMode\",\r\n            typeof(ExpandDirection), typeof(ExpandableContentControl),\r\n            new FrameworkPropertyMetadata(ExpandDirection.Down,\r\n                FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsArrange),\r\n            IsRevealModeValid);\r\n\r\n        private static bool IsRevealModeValid(object value)\r\n        {\r\n            return value != null && Enum.IsDefined(typeof(ExpandDirection), value);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether the content should be revealed horizontally.\r\n        /// </summary>\r\n        private bool IsHorizontalRevealMode\r\n        {\r\n            get { return RevealMode == ExpandDirection.Left || RevealMode == ExpandDirection.Right; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether the content should be revealed verticaly.\r\n        /// </summary>\r\n        private bool IsVerticalRevealMode\r\n        {\r\n            get { return RevealMode == ExpandDirection.Up || RevealMode == ExpandDirection.Down; }\r\n        }\r\n\r\n        #endregion public ExpandDirection RevealMode\r\n\r\n        #region public double Percentage\r\n\r\n        /// <summary>\r\n        /// Gets or sets the relative percentage of the content that is \r\n        /// currently visible. A percentage of 1 corresponds to the complete\r\n        /// TargetSize.\r\n        /// </summary>\r\n        public double Percentage\r\n        {\r\n            get { return (double) GetValue(PercentageProperty); }\r\n            set { SetValue(PercentageProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Percentage dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty PercentageProperty = DependencyProperty.Register(\"Percentage\",\r\n            typeof(double), typeof(ExpandableContentControl),\r\n            new FrameworkPropertyMetadata(1.0,\r\n                FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsArrange));\r\n\r\n        #endregion public double Percentage\r\n\r\n        #region IsExpanded\r\n\r\n        public static readonly DependencyProperty IsExpandedProperty = DependencyProperty.Register(\"IsExpanded\",\r\n            typeof(bool), typeof(ExpandableContentControl), new PropertyMetadata(false));\r\n\r\n        public bool IsExpanded\r\n        {\r\n            get { return (bool) GetValue(IsExpandedProperty); }\r\n            set { SetValue(IsExpandedProperty, value); }\r\n        }\r\n\r\n        #endregion\r\n\r\n        private UIElement Child\r\n        {\r\n            get { return VisualChildrenCount == 0 ? null : GetVisualChild(0) as UIElement; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the content current visible size.\r\n        /// </summary>\r\n        internal Size RelevantContentSize\r\n        {\r\n            get\r\n            {\r\n                return new Size(\r\n                    (IsHorizontalRevealMode ? Width : 0),\r\n                    (IsVerticalRevealMode ? Height : 0));\r\n            }\r\n        }\r\n\r\n\r\n        protected override Size MeasureOverride(Size availableSize)\r\n        {\r\n            var child = Child;\r\n            var size = new Size();\r\n\r\n            if (child != null)\r\n            {\r\n                child.Measure(availableSize);\r\n                size = child.DesiredSize;\r\n            }\r\n\r\n            return Resize(size, Percentage);\r\n        }\r\n\r\n        private Size Resize(Size size, double factor)\r\n        {\r\n            return IsHorizontalRevealMode\r\n                ? new Size(size.Width*factor, size.Height)\r\n                : new Size(size.Width, size.Height*factor);\r\n        }\r\n\r\n        protected override Size ArrangeOverride(Size finalSize)\r\n        {\r\n            var child = Child;\r\n            if (child == null || Math.Abs(Percentage) < 0.0001)\r\n                return finalSize;\r\n\r\n            var rect = new Rect(Resize(finalSize, 1/Percentage));\r\n\r\n            if (RevealMode == ExpandDirection.Down)\r\n                rect.Y = -rect.Height*(1 - Percentage);\r\n            else if (RevealMode == ExpandDirection.Left)\r\n                rect.X = -rect.Width*(1 - Percentage);\r\n\r\n            child.Arrange(rect);\r\n\r\n            return finalSize;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Layout/Accordion/System/Windows/Controls/SelectionSequence.cs",
    "content": "// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Determines the order in which visual states are set.\r\n    /// </summary>\r\n    /// <QualityBand>Preview</QualityBand>\r\n    public enum SelectionSequence\r\n    {\r\n        /// <summary>\r\n        /// Collapses are set before expansions.\r\n        /// </summary>\r\n        CollapseBeforeExpand,\r\n\r\n        /// <summary>\r\n        /// No delays, all states are set immediately.\r\n        /// </summary>\r\n        Simultaneous\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Layout/DotNetProjects.Layout.Toolkit.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\r\n    <PropertyGroup>\r\n        <RootNamespace>System.Windows.Controls</RootNamespace>\r\n        <TargetFrameworks>net5.0-windows;net6.0-windows;net4</TargetFrameworks>\r\n        <UseWPF>true</UseWPF>\r\n        <Description>WPF Toolkit Layout</Description>\r\n        <SignAssembly>true</SignAssembly>\r\n        <AssemblyOriginatorKeyFile>DotNetProjects.snk</AssemblyOriginatorKeyFile>\r\n        <GeneratePackageOnBuild>true</GeneratePackageOnBuild>\r\n        <PackageId>DotNetProjects.WpfToolkit.Layout</PackageId>\r\n        <Authors>DotNetProjects</Authors>\r\n        <Company>DotNetProjects</Company>\r\n        <Product>DotNetProjects.WPF Toolkit</Product>\r\n        <Copyright>2021 DotNetProjects</Copyright>\r\n        <Version>1.0.0</Version>\r\n        <AssemblyVersion>1.0.0.0</AssemblyVersion>\r\n        <FileVersion>1.0.0.0</FileVersion>\r\n        <PackageLicenseExpression>MS-PL</PackageLicenseExpression>\r\n    </PropertyGroup>\r\n    <ItemGroup>\r\n        <Compile Include=\"..\\Common\\System\\Windows\\Controls\\Extensions.cs\">\r\n            <Link>Extensions\\Extensions.cs</Link>\r\n        </Compile>\r\n        <Compile Include=\"..\\Common\\System\\Windows\\Controls\\InteractionHelper.cs\">\r\n            <Link>Common\\InteractionHelper.cs</Link>\r\n        </Compile>\r\n        <Compile Include=\"..\\Common\\System\\Windows\\Controls\\ItemsControlHelper.cs\">\r\n            <Link>Common\\ItemsControlHelper.cs</Link>\r\n        </Compile>\r\n        <Compile Include=\"..\\Common\\System\\Windows\\Controls\\IUpdateVisualState.cs\">\r\n            <Link>Common\\IUpdateVisualState.cs</Link>\r\n        </Compile>\r\n        <Compile Include=\"..\\Common\\System\\Windows\\Controls\\VisualStates.cs\">\r\n            <Link>Common\\VisualStates.cs</Link>\r\n        </Compile>\r\n        <Compile Include=\"..\\Common\\System\\Windows\\Controls\\VisualTreeExtensions.cs\">\r\n            <Link>Common\\VisualTreeExtensions.cs</Link>\r\n        </Compile>\r\n        <Compile Include=\"..\\Common\\System\\Windows\\Controls\\WeakEventListener.cs\">\r\n            <Link>Common\\WeakEventListener.cs</Link>\r\n        </Compile>\r\n    </ItemGroup>\r\n    <ItemGroup>\r\n        <EmbeddedResource Include=\"System.Windows.Controls\\**\\*.png\" />\r\n    </ItemGroup>\r\n</Project>\r\n"
  },
  {
    "path": "WpfToolkit/Layout/Extensions/MathExtensions.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics.CodeAnalysis;\r\n\r\nnamespace System.Windows.Controls.Extensions\r\n{\r\n    /// <summary>Provides extension methods for trigonometric, logarithmic, and other common mathematical functions.</summary>\r\n    internal static class MathExtensions\r\n    {\r\n        #region Approximation\r\n\r\n        /// <summary>Returns the smallest integer greater than or equal to the specified decimal number.</summary>\r\n        /// <returns>The smallest integer greater than or equal to value.</returns>\r\n        /// <param name=\"value\">A decimal number.</param>\r\n        public static decimal Ceiling(this decimal value) { return Math.Ceiling(value); }\r\n        /// <summary>Returns the smallest integer greater than or equal to the specified double-precision floating-point number.</summary>\r\n        /// <returns>The smallest integer greater than or equal to value. If value is equal to <see cref=\"F:System.Double.NaN\"/>, <see cref=\"F:System.Double.NegativeInfinity\"/>, or <see cref=\"F:System.Double.PositiveInfinity\"/>, that value is returned.</returns>\r\n        /// <param name=\"value\">A double-precision floating-point number.</param>\r\n        public static double Ceiling(this double value) { return Math.Ceiling(value); }\r\n\r\n        /// <summary>Returns the largest integer less than or equal to the specified decimal number.</summary>\r\n        /// <returns>The largest integer less than or equal to value.</returns>\r\n        /// <param name=\"value\">A decimal number.</param>\r\n        public static decimal Floor(this decimal value) { return Math.Floor(value); }\r\n        /// <summary>Returns the largest integer less than or equal to the specified double-precision floating-point number.</summary>\r\n        /// <returns>The largest integer less than or equal to value. If value is equal to <see cref=\"F:System.Double.NaN\"/>, <see cref=\"F:System.Double.NegativeInfinity\"/>, or <see cref=\"F:System.Double.PositiveInfinity\"/>, that value is returned.</returns>\r\n        /// <param name=\"value\">A double-precision floating-point number.</param>\r\n        public static double Floor(this double value) { return Math.Floor(value); }\r\n     \r\n        /// <summary>Returns the larger of two 8-bit unsigned integers.</summary>\r\n        /// <returns>Parameter a or b, whichever is larger.</returns>\r\n        /// <param name=\"a\">The first of two 8-bit unsigned integers to compare.</param>\r\n        /// <param name=\"b\">The second of two 8-bit unsigned integers to compare.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static byte AtLeast(this byte a, byte b) { return Math.Max(a, b); }\r\n        /// <summary>Returns the larger of two decimal numbers.</summary>\r\n        /// <returns>Parameter a or b, whichever is larger.</returns>\r\n        /// <param name=\"a\">The first of two <see cref=\"T:System.Decimal\"/> numbers to compare.</param>\r\n        /// <param name=\"b\">The second of two <see cref=\"T:System.Decimal\"/> numbers to compare.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static decimal AtLeast(this decimal a, decimal b) { return Math.Max(a, b); }\r\n        /// <summary>Returns the larger of two double-precision floating-point numbers.</summary>\r\n        /// <returns>Parameter a or b, whichever is larger. If a, b, or both a and b are equal to <see cref=\"F:System.Double.NaN\"/>, <see cref=\"F:System.Double.NaN\"/> is returned.</returns>\r\n        /// <param name=\"a\">The first of two double-precision floating-point numbers to compare.</param>\r\n        /// <param name=\"b\">The second of two double-precision floating-point numbers to compare.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static double AtLeast(this double a, double b) { return Math.Max(a, b); }\r\n        /// <summary>Returns the larger of two single-precision floating-point numbers.</summary>\r\n        /// <returns>Parameter a or b, whichever is larger. If a, or b, or both a and b are equal to <see cref=\"F:System.Single.NaN\"/>, <see cref=\"F:System.Single.NaN\"/> is returned.</returns>\r\n        /// <param name=\"a\">The first of two single-precision floating-point numbers to compare.</param>\r\n        /// <param name=\"b\">The second of two single-precision floating-point numbers to compare.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static float AtLeast(this float a, float b) { return Math.Max(a, b); }\r\n        /// <summary>Returns the larger of two 16-bit signed integers.</summary>\r\n        /// <returns>Parameter a or b, whichever is larger.</returns>\r\n        /// <param name=\"a\">The first of two 16-bit signed integers to compare.</param>\r\n        /// <param name=\"b\">The second of two 16-bit signed integers to compare.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static short AtLeast(this short a, short b) { return Math.Max(a, b); }\r\n        /// <summary>Returns the larger of two 32-bit signed integers.</summary>\r\n        /// <returns>Parameter a or b, whichever is larger.</returns>\r\n        /// <param name=\"a\">The first of two 32-bit signed integers to compare.</param>\r\n        /// <param name=\"b\">The second of two 32-bit signed integers to compare.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static int AtLeast(this int a, int b) { return Math.Max(a, b); }\r\n        /// <summary>Returns the larger of two 64-bit signed integers.</summary>\r\n        /// <returns>Parameter a or b, whichever is larger.</returns>\r\n        /// <param name=\"a\">The first of two 64-bit signed integers to compare.</param>\r\n        /// <param name=\"b\">The second of two 64-bit signed integers to compare.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static long AtLeast(this long a, long b) { return Math.Max(a, b); }\r\n        /// <summary>Returns the larger of two 8-bit signed integers.</summary>\r\n        /// <returns>Parameter a or b, whichever is larger.</returns>\r\n        /// <param name=\"a\">The first of two 8-bit unsigned integers to compare.</param>\r\n        /// <param name=\"b\">The second of two 8-bit unsigned integers to compare.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static sbyte AtLeast(this sbyte a, sbyte b) { return Math.Max(a, b); }\r\n        /// <summary>Returns the larger of two 16-bit unsigned integers.</summary>\r\n        /// <returns>Parameter a or b, whichever is larger.</returns>\r\n        /// <param name=\"a\">The first of two 16-bit unsigned integers to compare.</param>\r\n        /// <param name=\"b\">The second of two 16-bit unsigned integers to compare.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static ushort AtLeast(this ushort a, ushort b) { return Math.Max(a, b); }\r\n        /// <summary>Returns the larger of two 32-bit unsigned integers.</summary>\r\n        /// <returns>Parameter a or b, whichever is larger.</returns>\r\n        /// <param name=\"a\">The first of two 32-bit unsigned integers to compare.</param>\r\n        /// <param name=\"b\">The second of two 32-bit unsigned integers to compare.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static uint AtLeast(this uint a, uint b) { return Math.Max(a, b); }\r\n        /// <summary>Returns the larger of two 64-bit unsigned integers.</summary>\r\n        /// <returns>Parameter a or b, whichever is larger.</returns>\r\n        /// <param name=\"a\">The first of two 64-bit unsigned integers to compare.</param>\r\n        /// <param name=\"b\">The second of two 64-bit unsigned integers to compare.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static ulong AtLeast(this ulong a, ulong b) { return Math.Max(a, b); }\r\n        \r\n        /// <summary>Returns the smaller of two 8-bit unsigned integers.</summary>\r\n        /// <returns>Parameter a or b, whichever is smaller.</returns>\r\n        /// <param name=\"a\">The first of two 8-bit unsigned integers to compare.</param>\r\n        /// <param name=\"b\">The second of two 8-bit unsigned integers to compare.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static byte AtMost(this byte a, byte b) { return Math.Min(a, b); }\r\n        /// <summary>Returns the smaller of two decimal numbers.</summary>\r\n        /// <returns>Parameter a or b, whichever is smaller.</returns>\r\n        /// <param name=\"a\">The first of two <see cref=\"T:System.Decimal\"/> numbers to compare.</param>\r\n        /// <param name=\"b\">The second of two <see cref=\"T:System.Decimal\"/> numbers to compare.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static decimal AtMost(this decimal a, decimal b) { return Math.Min(a, b); }\r\n        /// <summary>Returns the smaller of two double-precision floating-point numbers.</summary>\r\n        /// <returns>Parameter a or b, whichever is smaller. If a, b, or both a and b are equal to <see cref=\"F:System.Double.NaN\"/>, <see cref=\"F:System.Double.NaN\"/> is returned.</returns>\r\n        /// <param name=\"a\">The first of two double-precision floating-point numbers to compare.</param>\r\n        /// <param name=\"b\">The second of two double-precision floating-point numbers to compare.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static double AtMost(this double a, double b) { return Math.Min(a, b); }\r\n        /// <summary>Returns the smaller of two single-precision floating-point numbers.</summary>\r\n        /// <returns>Parameter a or b, whichever is smaller. If a, b, or both a and b are equal to <see cref=\"F:System.Single.NaN\"/>, <see cref=\"F:System.Single.NaN\"/> is returned.</returns>\r\n        /// <param name=\"a\">The first of two single-precision floating-point numbers to compare.</param>\r\n        /// <param name=\"b\">The second of two single-precision floating-point numbers to compare.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static float AtMost(this float a, float b) { return Math.Min(a, b); }\r\n        /// <summary>Returns the smaller of two 16-bit signed integers.</summary>\r\n        /// <returns>Parameter a or b, whichever is smaller.</returns>\r\n        /// <param name=\"a\">The first of two 16-bit signed integers to compare.</param>\r\n        /// <param name=\"b\">The second of two 16-bit signed integers to compare.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static short AtMost(this short a, short b) { return Math.Min(a, b); }\r\n        /// <summary>Returns the smaller of two 32-bit signed integers.</summary>\r\n        /// <returns>Parameter a or b, whichever is smaller.</returns>\r\n        /// <param name=\"a\">The first of two 32-bit signed integers to compare.</param>\r\n        /// <param name=\"b\">The second of two 32-bit signed integers to compare.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static int AtMost(this int a, int b) { return Math.Min(a, b); }\r\n        /// <summary>Returns the smaller of two 64-bit signed integers.</summary>\r\n        /// <returns>Parameter a or b, whichever is smaller.</returns>\r\n        /// <param name=\"a\">The first of two 64-bit signed integers to compare.</param>\r\n        /// <param name=\"b\">The second of two 64-bit signed integers to compare.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static long AtMost(this long a, long b) { return Math.Min(a, b); }\r\n        /// <summary>Returns the smaller of two 8-bit signed integers.</summary>\r\n        /// <returns>Parameter a or b, whichever is smaller.</returns>\r\n        /// <param name=\"a\">The first of two 8-bit signed integers to compare.</param>\r\n        /// <param name=\"b\">The second of two 8-bit signed integers to compare.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static sbyte AtMost(this sbyte a, sbyte b) { return Math.Min(a, b); }\r\n        /// <summary>Returns the smaller of two 16-bit unsigned integers.</summary>\r\n        /// <returns>Parameter a or b, whichever is smaller.</returns>\r\n        /// <param name=\"a\">The first of two 16-bit unsigned integers to compare.</param>\r\n        /// <param name=\"b\">The second of two 16-bit unsigned integers to compare.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static ushort AtMost(this ushort a, ushort b) { return Math.Min(a, b); }\r\n        /// <summary>Returns the smaller of two 32-bit unsigned integers.</summary>\r\n        /// <returns>Parameter a or b, whichever is smaller.</returns>\r\n        /// <param name=\"a\">The first of two 32-bit unsigned integers to compare.</param>\r\n        /// <param name=\"b\">The second of two 32-bit unsigned integers to compare.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static uint AtMost(this uint a, uint b) { return Math.Min(a, b); }\r\n        /// <summary>Returns the smaller of two 64-bit unsigned integers.</summary>\r\n        /// <returns>Parameter a or b, whichever is smaller.</returns>\r\n        /// <param name=\"a\">The first of two 64-bit unsigned integers to compare.</param>\r\n        /// <param name=\"b\">The second of two 64-bit unsigned integers to compare.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static ulong AtMost(this ulong a, ulong b) { return Math.Min(a, b); }\r\n\r\n        /// <summary>Returns the value constrained inclusively between two 8-bit unsigned integers.</summary>\r\n        /// <returns>A value between a and b inclusively.</returns>\r\n        /// <param name=\"value\">The value to restrict between a and b.</param>\r\n        /// <param name=\"a\">The first of two 8-bit unsigned integers to compare.</param>\r\n        /// <param name=\"b\">The second of two 8-bit unsigned integers to compare.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static byte Clamp(this byte value, byte a, byte b) { return a < b ? Math.Min(Math.Max(value, a), b) : Math.Max(Math.Min(value, a), b); }\r\n        /// <summary>Returns the value constrained inclusively between two decimal numbers.</summary>\r\n        /// <returns>A value between a and b inclusively.</returns>\r\n        /// <param name=\"value\">The value to restrict between a and b.</param>\r\n        /// <param name=\"a\">The first of two <see cref=\"T:System.Decimal\"/> numbers to compare.</param>\r\n        /// <param name=\"b\">The second of two <see cref=\"T:System.Decimal\"/> numbers to compare.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static decimal Clamp(this decimal value, decimal a, decimal b) { return a < b ? Math.Min(Math.Max(value, a), b) : Math.Max(Math.Min(value, a), b); }\r\n        /// <summary>Returns the value constrained inclusively between two double-precision floating-point numbers.</summary>\r\n        /// <returns>A value between a and b inclusively. If a, b, or both a and b are equal to <see cref=\"F:System.Double.NaN\"/>, <see cref=\"F:System.Double.NaN\"/> is returned.</returns>\r\n        /// <param name=\"value\">The value to restrict between a and b.</param>\r\n        /// <param name=\"a\">The first of two double-precision floating-point numbers to compare.</param>\r\n        /// <param name=\"b\">The second of two double-precision floating-point numbers to compare.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static double Clamp(this double value, double a, double b) { return a < b ? Math.Min(Math.Max(value, a), b) : Math.Max(Math.Min(value, a), b); }\r\n        /// <summary>Returns the value constrained inclusively between two single-precision floating-point numbers.</summary>\r\n        /// <returns>A value between a and b inclusively. If a, b, or both a and b are equal to <see cref=\"F:System.Single.NaN\"/>, <see cref=\"F:System.Single.NaN\"/> is returned.</returns>\r\n        /// <param name=\"value\">The value to restrict between a and b.</param>\r\n        /// <param name=\"a\">The first of two single-precision floating-point numbers to compare.</param>\r\n        /// <param name=\"b\">The second of two single-precision floating-point numbers to compare.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static float Clamp(this float value, float a, float b) { return a < b ? Math.Min(Math.Max(value, a), b) : Math.Max(Math.Min(value, a), b); }\r\n        /// <summary>Returns the value constrained inclusively between two 16-bit signed integers.</summary>\r\n        /// <returns>A value between a and b inclusively.</returns>\r\n        /// <param name=\"value\">The value to restrict between a and b.</param>\r\n        /// <param name=\"a\">The first of two 16-bit signed integers to compare.</param>\r\n        /// <param name=\"b\">The second of two 16-bit signed integers to compare.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static short Clamp(this short value, short a, short b) { return a < b ? Math.Min(Math.Max(value, a), b) : Math.Max(Math.Min(value, a), b); }\r\n        /// <summary>Returns the value constrained inclusively between two 32-bit signed integers.</summary>\r\n        /// <returns>A value between a and b inclusively.</returns>\r\n        /// <param name=\"value\">The value to restrict between a and b.</param>\r\n        /// <param name=\"a\">The first of two 32-bit signed integers to compare.</param>\r\n        /// <param name=\"b\">The second of two 32-bit signed integers to compare.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static int Clamp(this int value, int a, int b) { return a < b ? Math.Min(Math.Max(value, a), b) : Math.Max(Math.Min(value, a), b); }\r\n        /// <summary>Returns the value constrained inclusively between two 64-bit signed integers.</summary>\r\n        /// <returns>A value between a and b inclusively.</returns>\r\n        /// <param name=\"value\">The value to restrict between a and b.</param>\r\n        /// <param name=\"a\">The first of two 64-bit signed integers to compare.</param>\r\n        /// <param name=\"b\">The second of two 64-bit signed integers to compare.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static long Clamp(this long value, long a, long b) { return a < b ? Math.Min(Math.Max(value, a), b) : Math.Max(Math.Min(value, a), b); }\r\n        /// <summary>Returns the value constrained inclusively between two 8-bit signed integers.</summary>\r\n        /// <returns>A value between a and b inclusively.</returns>\r\n        /// <param name=\"value\">The value to restrict between a and b.</param>\r\n        /// <param name=\"a\">The first of two 8-bit signed integers to compare.</param>\r\n        /// <param name=\"b\">The second of two 8-bit signed integers to compare.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static sbyte Clamp(this sbyte value, sbyte a, sbyte b) { return a < b ? Math.Min(Math.Max(value, a), b) : Math.Max(Math.Min(value, a), b); }\r\n        /// <summary>Returns the value constrained inclusively between two 16-bit unsigned integers.</summary>\r\n        /// <returns>A value between a and b inclusively.</returns>\r\n        /// <param name=\"value\">The value to restrict between a and b.</param>\r\n        /// <param name=\"a\">The first of two 16-bit unsigned integers to compare.</param>\r\n        /// <param name=\"b\">The second of two 16-bit unsigned integers to compare.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static ushort Clamp(this ushort value, ushort a, ushort b) { return a < b ? Math.Min(Math.Max(value, a), b) : Math.Max(Math.Min(value, a), b); }\r\n        /// <summary>Returns the value constrained inclusively between two 32-bit unsigned integers.</summary>\r\n        /// <returns>A value between a and b inclusively.</returns>\r\n        /// <param name=\"value\">The value to restrict between a and b.</param>\r\n        /// <param name=\"a\">The first of two 32-bit unsigned integers to compare.</param>\r\n        /// <param name=\"b\">The second of two 32-bit unsigned integers to compare.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static uint Clamp(this uint value, uint a, uint b) { return a < b ? Math.Min(Math.Max(value, a), b) : Math.Max(Math.Min(value, a), b); }\r\n        /// <summary>Returns the value constrained inclusively between two 64-bit unsigned integers.</summary>\r\n        /// <returns>A value between a and b inclusively.</returns>\r\n        /// <param name=\"value\">The value to restrict between a and b.</param>\r\n        /// <param name=\"a\">The first of two 64-bit unsigned integers to compare.</param>\r\n        /// <param name=\"b\">The second of two 64-bit unsigned integers to compare.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static ulong Clamp(this ulong value, ulong a, ulong b) { return a < b ? Math.Min(Math.Max(value, a), b) : Math.Max(Math.Min(value, a), b); }\r\n\r\n        /// <summary>Rounds a decimal value to the nearest integer.</summary>\r\n        /// <returns>The integer nearest parameter value. If value is halfway between two integers, one of which is even and the other odd, then the even number is returned.</returns>\r\n        /// <param name=\"value\">A decimal number to be rounded.</param>\r\n        /// <exception cref=\"T:System.OverflowException\">The result is outside the range of a <see cref=\"T:System.Decimal\"/>.</exception>\r\n        public static decimal Round(this decimal value) { return Math.Round(value); }\r\n        /// <summary>Rounds a double-precision floating-point value to the nearest integer.</summary>\r\n        /// <returns>The integer nearest value. If value is halfway between two integers, one of which is even and the other odd, then the even number is returned.</returns>\r\n        /// <param name=\"value\">A double-precision floating-point number to be rounded.</param>\r\n        public static double Round(this double value) { return Math.Round(value); }\r\n        /// <summary>Rounds a decimal value to a specified precision.</summary>\r\n        /// <returns>The number nearest value with a precision equal to decimals. If value is halfway between two numbers, one of which is even and the other odd, then the even number is returned. If the precision of value is less than decimals, then value is returned unchanged.</returns>\r\n        /// <param name=\"value\">A decimal number to be rounded.</param>\r\n        /// <param name=\"decimals\">The number of significant decimal places  (precision) in the return value.</param>\r\n        /// <exception cref=\"T:System.OverflowException\">The result is outside the range of a <see cref=\"T:System.Decimal\"/>.</exception>\r\n        /// <exception cref=\"T:System.ArgumentOutOfRangeException\">decimals is less than 0 or greater than 28.</exception>\r\n        public static decimal Round(this decimal value, int decimals) { return Math.Round(value, decimals); }\r\n        /// <summary>Rounds a decimal value to the nearest integer. A parameter specifies how to round the value if it is midway between two other numbers.</summary>\r\n        /// <returns>The integer nearest value. If value is halfway between two numbers, one of which is even and the other odd, then mode determines which of the two is returned.</returns>\r\n        /// <param name=\"value\">A decimal number to be rounded.</param>\r\n        /// <param name=\"mode\">Specification for how to round value if it is midway between two other numbers.</param>\r\n        /// <exception cref=\"T:System.OverflowException\">The result is outside the range of a <see cref=\"T:System.Decimal\"/>.</exception>\r\n        /// <exception cref=\"T:System.ArgumentException\">mode is not a valid value of <see cref=\"T:System.MidpointRounding\"/>.</exception>\r\n        public static decimal Round(this decimal value, MidpointRounding mode) { return Math.Round(value, mode); }\r\n        /// <summary>Rounds a double-precision floating-point value to the specified precision.</summary>\r\n        /// <returns>The number nearest value with a precision equal to digits. If value is halfway between two numbers, one of which is even and the other odd, then the even number is returned. If the precision of value is less than digits, then value is returned unchanged.</returns>\r\n        /// <param name=\"digits\">The number of significant digits (precision) in the return value.</param>\r\n        /// <param name=\"value\">A double-precision floating-point number to be rounded.</param>\r\n        /// <exception cref=\"T:System.ArgumentOutOfRangeException\">digits is less than 0 or greater than 15.</exception>\r\n        public static double Round(this double value, int digits) { return Math.Round(value, digits); }\r\n        /// <summary>Rounds a double-precision floating-point value to the nearest integer. A parameter specifies how to round the value if it is midway between two other numbers.</summary>\r\n        /// <returns>The integer nearest value. If value is halfway between two integers, one of which is even and the other odd, then mode determines which of the two is returned.</returns>\r\n        /// <param name=\"mode\">Specification for how to round value if it is midway between two other numbers.</param>\r\n        /// <param name=\"value\">A double-precision floating-point number to be rounded.</param>\r\n        /// <exception cref=\"T:System.ArgumentException\">mode is not a valid value of <see cref=\"T:System.MidpointRounding\"/>.</exception>\r\n        public static double Round(this double value, MidpointRounding mode) { return Math.Round(value, mode); }\r\n        /// <summary>Rounds a decimal value to a specified precision. A parameter specifies how to round the value if it is midway between two other numbers.</summary>\r\n        /// <returns>The number nearest value with a precision equal to decimals. If value is halfway between two numbers, one of which is even and the other odd, then mode determines which of the two numbers is returned. If the precision of value is less than decimals, then value is returned unchanged.</returns>\r\n        /// <param name=\"value\">A decimal number to be rounded.</param>\r\n        /// <param name=\"mode\">Specification for how to round value if it is midway between two other numbers.</param>\r\n        /// <param name=\"decimals\">The number of significant decimal places  (precision) in the return value.</param>\r\n        /// <exception cref=\"T:System.OverflowException\">The result is outside the range of a <see cref=\"T:System.Decimal\"/>.</exception>\r\n        /// <exception cref=\"T:System.ArgumentOutOfRangeException\">decimals is less than 0 or greater than 28.</exception>\r\n        /// <exception cref=\"T:System.ArgumentException\">mode is not a valid value of <see cref=\"T:System.MidpointRounding\"/>.</exception>\r\n        public static decimal Round(this decimal value, int decimals, MidpointRounding mode) { return Math.Round(value, decimals, mode); }\r\n        /// <summary>Rounds a double-precision floating-point value to the specified precision. A parameter specifies how to round the value if it is midway between two other numbers.</summary>\r\n        /// <returns>The number nearest value with a precision equal to digits. If value is halfway between two numbers, one of which is even and the other odd, then the mode parameter determines which number is returned. If the precision of value is less than digits, then value is returned unchanged.</returns>\r\n        /// <param name=\"mode\">Specification for how to round value if it is midway between two other numbers.</param>\r\n        /// <param name=\"digits\">The number of significant digits (precision) in the return value.</param>\r\n        /// <param name=\"value\">A double-precision floating-point number to be rounded.</param>\r\n        /// <exception cref=\"T:System.ArgumentOutOfRangeException\">digits is less than 0 or greater than 15.</exception>\r\n        /// <exception cref=\"T:System.ArgumentException\">mode is not a valid value of <see cref=\"T:System.MidpointRounding\"/>.</exception>\r\n        public static double Round(this double value, int digits, MidpointRounding mode) { return Math.Round(value, digits, mode); }\r\n\r\n        /// <summary>Rounds a decimal value to the next multiple of the specified factor.</summary>\r\n        /// <returns>The nearest multiple of factor that is greater than or equal to value.</returns>\r\n        /// <param name=\"value\">A decimal number to be rounded.</param>\r\n        /// <param name=\"factor\">The factor to round the value to.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\")]\r\n        public static decimal RoundUp(this decimal value, decimal factor) { var d = (value % factor); return d == 0 ? value : value < 0 ? value - d : value + (factor - d); }\r\n        /// <summary>Rounds a double-precision floating-point value to the next multiple of the specified factor.</summary>\r\n        /// <returns>The nearest multiple of factor that is greater than or equal to value.</returns>\r\n        /// <param name=\"value\">A double-precision floating-point number to be rounded.</param>\r\n        /// <param name=\"factor\">The factor to round the value to.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\")]\r\n        public static double RoundUp(this double value, double factor) { var d = (value % factor); return d == 0 ? value : value < 0 ? value - d : value + (factor - d); }\r\n        /// <summary>Rounds a single-precision floating-point value to the next multiple of the specified factor.</summary>\r\n        /// <returns>The nearest multiple of factor that is greater than or equal to value.</returns>\r\n        /// <param name=\"value\">A single-precision floating-point number to be rounded.</param>\r\n        /// <param name=\"factor\">The factor to round the value to.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\")]\r\n        public static float RoundUp(this float value, float factor) { var d = (value % factor); return d == 0 ? value : value < 0 ? value - d : value + (factor - d); }\r\n        /// <summary>Rounds a 64-bit signed integer to the next multiple of the specified factor.</summary>\r\n        /// <returns>The nearest multiple of factor that is greater than or equal to value.</returns>\r\n        /// <param name=\"value\">A 64-bit signed integer to be rounded.</param>\r\n        /// <param name=\"factor\">The factor to round the value to.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\")]\r\n        public static long RoundUp(this long value, long factor) { var d = (value % factor); return d == 0 ? value : value < 0 ? value - d : value + (factor - d); }\r\n        /// <summary>Rounds a 32-bit signed integer to the next multiple of the specified factor.</summary>\r\n        /// <returns>The nearest multiple of factor that is greater than or equal to value.</returns>\r\n        /// <param name=\"value\">A 32-bit signed integer to be rounded.</param>\r\n        /// <param name=\"factor\">The factor to round the value to.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\")]\r\n        public static int RoundUp(this int value, int factor) { var d = (value % factor); return d == 0 ? value : value < 0 ? value - d : value + (factor - d); }\r\n        /// <summary>Rounds a 16-bit signed integer to the next multiple of the specified factor.</summary>\r\n        /// <returns>The nearest multiple of factor that is greater than or equal to value.</returns>\r\n        /// <param name=\"value\">A 16-bit signed integer to be rounded.</param>\r\n        /// <param name=\"factor\">The factor to round the value to.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\")]\r\n        public static short RoundUp(this short value, short factor) { var d = (value % factor); return (short)(d == 0 ? value : value < 0 ? value - d : value + (factor - d)); }\r\n        /// <summary>Rounds a 8-bit signed integer to the next multiple of the specified factor.</summary>\r\n        /// <returns>The nearest multiple of factor that is greater than or equal to value.</returns>\r\n        /// <param name=\"value\">A 8-bit signed integer to be rounded.</param>\r\n        /// <param name=\"factor\">The factor to round the value to.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\")]\r\n        public static byte RoundUp(this byte value, byte factor) { var d = (value % factor); return (byte)(d == 0 ? value : value + (factor - d)); }\r\n\r\n        /// <summary>Rounds a decimal value to the next integer.</summary>\r\n        /// <returns>The nearest integer that is greater than or equal to value.</returns>\r\n        /// <param name=\"value\">A decimal number to be rounded.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\")]\r\n        public static decimal RoundUp(this decimal value) { return RoundUp(value, 1); }\r\n        /// <summary>Rounds a double-precision floating-point value to the next integer.</summary>\r\n        /// <returns>The nearest integer that is greater than or equal to value.</returns>\r\n        /// <param name=\"value\">A double-precision floating-point number to be rounded.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\")]\r\n        public static double RoundUp(this double value) { return RoundUp(value, 1); }\r\n        /// <summary>Rounds a single-precision floating-point value to the next integer.</summary>\r\n        /// <returns>The nearest integer that is greater than or equal to value.</returns>\r\n        /// <param name=\"value\">A single-precision floating-point number to be rounded.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\")]\r\n        public static float RoundUp(this float value) { return RoundUp(value, 1); }\r\n        /// <summary>Rounds a 64-bit signed integer to the next integer.</summary>\r\n        /// <returns>The nearest integer that is greater than or equal to value.</returns>\r\n        /// <param name=\"value\">A 64-bit signed integer to be rounded.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\")]\r\n        public static long RoundUp(this long value) { return RoundUp(value, 1); }\r\n        /// <summary>Rounds a 32-bit signed integer to the next integer.</summary>\r\n        /// <returns>The nearest integer that is greater than or equal to value.</returns>\r\n        /// <param name=\"value\">A 32-bit signed integer to be rounded.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\")]\r\n        public static int RoundUp(this int value) { return RoundUp(value, 1); }\r\n        /// <summary>Rounds a 16-bit signed integer to the next integer.</summary>\r\n        /// <returns>The nearest integer that is greater than or equal to value.</returns>\r\n        /// <param name=\"value\">A 16-bit signed integer to be rounded.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\")]\r\n        public static short RoundUp(this short value) { return RoundUp(value, (short)1); }\r\n        /// <summary>Rounds a 8-bit signed integer to the next integer.</summary>\r\n        /// <returns>The nearest integer that is greater than or equal to value.</returns>\r\n        /// <param name=\"value\">A 8-bit signed integer to be rounded.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1702:CompoundWordsShouldBeCasedCorrectly\")]\r\n        public static byte RoundUp(this byte value) { return RoundUp(value, (byte)1); }\r\n\r\n        /// <summary>Rounds a decimal value to the previous multiple of the specified factor.</summary>\r\n        /// <returns>The nearest multiple of factor that is less than or equal to value.</returns>\r\n        /// <param name=\"value\">A decimal number to be rounded.</param>\r\n        /// <param name=\"factor\">The factor to round the value to.</param>\r\n        public static decimal RoundDown(this decimal value, decimal factor) { var d = (value % factor); return d == 0 ? value : value > 0 ? value - d : value - (factor + d); }\r\n        /// <summary>Rounds a double-precision floating-point value to the previous multiple of the specified factor.</summary>\r\n        /// <returns>The nearest multiple of factor that is less than or equal to value.</returns>\r\n        /// <param name=\"value\">A double-precision floating-point number to be rounded.</param>\r\n        /// <param name=\"factor\">The factor to round the value to.</param>\r\n        public static double RoundDown(this double value, double factor) { var d = (value % factor); return d == 0 ? value : value > 0 ? value - d : value - (factor + d); }\r\n        /// <summary>Rounds a single-precision floating-point value to the previous multiple of the specified factor.</summary>\r\n        /// <returns>The nearest multiple of factor that is less than or equal to value.</returns>\r\n        /// <param name=\"value\">A single-precision floating-point number to be rounded.</param>\r\n        /// <param name=\"factor\">The factor to round the value to.</param>\r\n        public static float RoundDown(this float value, float factor) { var d = (value % factor); return d == 0 ? value : value > 0 ? value - d : value - (factor + d); }\r\n        /// <summary>Rounds a 64-bit signed integer to the previous multiple of the specified factor.</summary>\r\n        /// <returns>The nearest multiple of factor that is less than or equal to value.</returns>\r\n        /// <param name=\"value\">A 64-bit signed integer to be rounded.</param>\r\n        /// <param name=\"factor\">The factor to round the value to.</param>\r\n        public static long RoundDown(this long value, long factor) { var d = (value % factor); return d == 0 ? value : value > 0 ? value - d : value - (factor + d); }\r\n        /// <summary>Rounds a 32-bit signed integer to the previous multiple of the specified factor.</summary>\r\n        /// <returns>The nearest multiple of factor that is less than or equal to value.</returns>\r\n        /// <param name=\"value\">A 32-bit signed integer to be rounded.</param>\r\n        /// <param name=\"factor\">The factor to round the value to.</param>\r\n        public static int RoundDown(this int value, int factor) { var d = (value % factor); return d == 0 ? value : value > 0 ? value - d : value - (factor + d); }\r\n        /// <summary>Rounds a 16-bit signed integer to the previous multiple of the specified factor.</summary>\r\n        /// <returns>The nearest multiple of factor that is less than or equal to value.</returns>\r\n        /// <param name=\"value\">A 16-bit signed integer to be rounded.</param>\r\n        /// <param name=\"factor\">The factor to round the value to.</param>\r\n        public static short RoundDown(this short value, short factor) { var d = (value % factor); return (short)(d == 0 ? value : value > 0 ? value - d : value - (factor + d)); }\r\n        /// <summary>Rounds an 8-bit unsigned integer to the previous multiple of the specified factor.</summary>\r\n        /// <returns>The nearest multiple of factor that is less than or equal to value.</returns>\r\n        /// <param name=\"value\">An 8-bit unsigned integer to be rounded.</param>\r\n        /// <param name=\"factor\">The factor to round the value to.</param>\r\n        public static byte RoundDown(this byte value, byte factor) { var d = (value % factor); return (byte)(value - d); }\r\n\r\n        /// <summary>Rounds a decimal value to the previous integer.</summary>\r\n        /// <returns>The nearest integer that is less than or equal to value.</returns>\r\n        /// <param name=\"value\">A decimal number to be rounded.</param>\r\n        public static decimal RoundDown(this decimal value) { return RoundDown(value, 1); }\r\n        /// <summary>Rounds a double-precision floating-point value to the previous integer.</summary>\r\n        /// <returns>The nearest integer that is less than or equal to value.</returns>\r\n        /// <param name=\"value\">A double-precision floating-point number to be rounded.</param>\r\n        public static double RoundDown(this double value) { return RoundDown(value, 1); }\r\n        /// <summary>Rounds a single-precision floating-point value to the previous integer.</summary>\r\n        /// <returns>The nearest integer that is less than or equal to value.</returns>\r\n        /// <param name=\"value\">A single-precision floating-point number to be rounded.</param>\r\n        public static float RoundDown(this float value) { return RoundDown(value, 1); }\r\n        /// <summary>Rounds a 64-bit signed integer to the previous integer.</summary>\r\n        /// <returns>The nearest integer that is less than or equal to value.</returns>\r\n        /// <param name=\"value\">A 64-bit signed integer to be rounded.</param>\r\n        public static long RoundDown(this long value) { return RoundDown(value, 1); }\r\n        /// <summary>Rounds a 32-bit signed integer to the previous integer.</summary>\r\n        /// <returns>The nearest integer that is less than or equal to value.</returns>\r\n        /// <param name=\"value\">A 32-bit signed integer to be rounded.</param>\r\n        public static int RoundDown(this int value) { return RoundDown(value, 1); }\r\n        /// <summary>Rounds a 16-bit signed integer to the previous integer.</summary>\r\n        /// <returns>The nearest integer that is less than or equal to value.</returns>\r\n        /// <param name=\"value\">A 16-bit signed integer to be rounded.</param>\r\n        public static short RoundDown(this short value) { return RoundDown(value, (short)1); }\r\n        /// <summary>Rounds an 8-bit unsigned integer to the previous integer.</summary>\r\n        /// <returns>The nearest integer that is less than or equal to value.</returns>\r\n        /// <param name=\"value\">An 8-bit unsigned integer to be rounded.</param>\r\n        public static byte RoundDown(this byte value) { return RoundDown(value, (byte)1); }\r\n\r\n        /// <summary>Calculates the integral part of a specified decimal number.</summary>\r\n        /// <returns>The integral part of value; that is, the number that remains after any fractional digits have been discarded.</returns>\r\n        /// <param name=\"value\">A number to truncate.</param>\r\n        public static decimal Truncate(this decimal value) { return Math.Truncate(value); }\r\n        /// <summary>Calculates the integral part of a specified double-precision floating-point number.</summary>\r\n        /// <returns>The integral part of value; that is, the number that remains after any fractional digits have been discarded.</returns>\r\n        /// <param name=\"value\">A number to truncate.</param>\r\n        public static double Truncate(this double value) { return Math.Truncate(value); }\r\n\r\n        #endregion\r\n\r\n        #region Arithmetic\r\n\r\n        /// <summary>Returns the absolute value of a <see cref=\"T:System.Decimal\"/> number.</summary>\r\n        /// <returns>A <see cref=\"T:System.Decimal\"/>, x, such that 0 ≤ x ≤ <see cref=\"F:System.Decimal.MaxValue\"/>.</returns>\r\n        /// <param name=\"value\">A number in the range <see cref=\"F:System.Decimal.MinValue\"/> ≤ value ≤ <see cref=\"F:System.Decimal.MaxValue\"/>.</param>\r\n        public static decimal Abs(this decimal value) { return Math.Abs(value); }\r\n        /// <summary>Returns the absolute value of a double-precision floating-point number.</summary>\r\n        /// <returns>A double-precision floating-point number, x, such that 0 ≤ x ≤ <see cref=\"F:System.Double.MaxValue\"/>.</returns>\r\n        /// <param name=\"value\">A number in the range <see cref=\"F:System.Double.MinValue\"/> ≤ value ≤ <see cref=\"F:System.Double.MaxValue\"/>.</param>\r\n        public static double Abs(this double value) { return Math.Abs(value); }\r\n        /// <summary>Returns the absolute value of a single-precision floating-point number.</summary>\r\n        /// <returns>A single-precision floating-point number, x, such that 0 ≤ x ≤ <see cref=\"F:System.Single.MaxValue\"/>.</returns>\r\n        /// <param name=\"value\">A number in the range <see cref=\"F:System.Single.MinValue\"/> ≤ value ≤ <see cref=\"F:System.Single.MaxValue\"/>.</param>\r\n        public static float Abs(this float value) { return Math.Abs(value); }\r\n        /// <summary>Returns the absolute value of a 16-bit signed integer.</summary>\r\n        /// <returns>A 16-bit signed integer, x, such that 0 ≤ x ≤ <see cref=\"F:System.Int16.MaxValue\"/>.</returns>\r\n        /// <param name=\"value\">A number in the range <see cref=\"F:System.Int16.MinValue\"/> &lt; value ≤ <see cref=\"F:System.Int16.MaxValue\"/>.</param>\r\n        /// <exception cref=\"T:System.OverflowException\">value equals <see cref=\"F:System.Int16.MinValue\"/>.</exception>\r\n        public static short Abs(this short value) { return Math.Abs(value); }\r\n        /// <summary>Returns the absolute value of a 32-bit signed integer.</summary>\r\n        /// <returns>A 32-bit signed integer, x, such that 0 ≤ x ≤ <see cref=\"F:System.Int32.MaxValue\"/>.</returns>\r\n        /// <param name=\"value\">A number in the range <see cref=\"F:System.Int32.MinValue\"/> &lt; value ≤ <see cref=\"F:System.Int32.MaxValue\"/>.</param>\r\n        /// <exception cref=\"T:System.OverflowException\">value equals <see cref=\"F:System.Int32.MinValue\"/>.</exception>\r\n        public static int Abs(this int value) { return Math.Abs(value); }\r\n        /// <summary>Returns the absolute value of a 64-bit signed integer.</summary>\r\n        /// <returns>A 64-bit signed integer, x, such that 0 ≤ x ≤ <see cref=\"F:System.Int64.MaxValue\"/>.</returns>\r\n        /// <param name=\"value\">A number in the range <see cref=\"F:System.Int64.MinValue\"/> &lt; value ≤ <see cref=\"F:System.Int64.MaxValue\"/>.</param>\r\n        /// <exception cref=\"T:System.OverflowException\">value equals <see cref=\"F:System.Int64.MinValue\"/>.</exception>\r\n        public static long Abs(this long value) { return Math.Abs(value); }\r\n        /// <summary>Returns the absolute value of an 8-bit signed integer.</summary>\r\n        /// <returns>An 8-bit signed integer, x, such that 0 ≤ x ≤ <see cref=\"F:System.SByte.MaxValue\"/>.</returns>\r\n        /// <param name=\"value\">A number in the range <see cref=\"F:System.SByte.MinValue\"/> &lt; value ≤ <see cref=\"F:System.SByte.MaxValue\"/>.</param>\r\n        /// <exception cref=\"T:System.OverflowException\">value equals <see cref=\"F:System.SByte.MinValue\"/>.</exception>\r\n        public static sbyte Abs(this sbyte value) { return Math.Abs(value); }\r\n\r\n        /// <summary>Produces the full product of two 32-bit numbers.</summary>\r\n        /// <returns>The <see cref=\"T:System.Int64\"/> containing the product of the specified numbers.</returns>\r\n        /// <param name=\"a\">The first <see cref=\"T:System.Int32\"/> to multiply.</param>\r\n        /// <param name=\"b\">The second <see cref=\"T:System.Int32\"/> to multiply.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static long BigMul(this int a, int b) { return Math.BigMul(a, b); }\r\n\r\n        /// <summary>Calculates the quotient of two 32-bit signed integers and also returns the remainder in an output parameter.</summary>\r\n        /// <returns>The <see cref=\"T:System.Int32\"/> containing the quotient of the specified numbers.</returns>\r\n        /// <param name=\"a\">The <see cref=\"T:System.Int32\"/> that contains the dividend.</param>\r\n        /// <param name=\"result\">The <see cref=\"T:System.Int32\"/> that receives the remainder.</param>\r\n        /// <param name=\"b\">The <see cref=\"T:System.Int32\"/> that contains the divisor.</param>\r\n        /// <exception cref=\"T:System.DivideByZeroException\">b is zero.</exception>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1021:AvoidOutParameters\")]\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static int DivRem(this int a, int b, out int result) { return Math.DivRem(a, b, out result); }\r\n        /// <summary>Calculates the quotient of two 64-bit signed integers and also returns the remainder in an output parameter.</summary>\r\n        /// <returns>The <see cref=\"T:System.Int64\"/> containing the quotient of the specified numbers.</returns>\r\n        /// <param name=\"a\">The <see cref=\"T:System.Int64\"/> that contains the dividend.</param>\r\n        /// <param name=\"result\">The <see cref=\"T:System.Int64\"/> that receives the remainder.</param>\r\n        /// <param name=\"b\">The <see cref=\"T:System.Int64\"/> that contains the divisor.</param>\r\n        /// <exception cref=\"T:System.DivideByZeroException\">b is zero.</exception>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1021:AvoidOutParameters\")]\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static long DivRem(this long a, long b, out long result) { return Math.DivRem(a, b, out result); }\r\n     \r\n        /// <summary>Returns e raised to the specified power.</summary>\r\n        /// <returns>The number e raised to the power value. If value equals <see cref=\"F:System.Double.NaN\"/> or <see cref=\"F:System.Double.PositiveInfinity\"/>, that value is returned. If value equals <see cref=\"F:System.Double.NegativeInfinity\"/>, 0 is returned.</returns>\r\n        /// <param name=\"value\">A number specifying a power.</param>\r\n        public static double Exp(this double value) { return Math.Exp(value); }\r\n     \r\n        /// <summary>Returns the remainder resulting from the division of a specified number by another specified number.</summary>\r\n        /// <returns>A number equal to x - (y Q), where Q is the quotient of x / y rounded to the nearest integer (if x / y falls halfway between two integers, the even integer is returned).If x - (y Q) is zero, the value +0 is returned if x is positive, or -0 if x is negative. If y = 0, <see cref=\"F:System.Double.NaN\"/> (Not-A-Number) is returned.</returns>\r\n        /// <param name=\"y\">A divisor.</param>\r\n        /// <param name=\"x\">A dividend.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1709:IdentifiersShouldBeCasedCorrectly\")]\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static double IEEERemainder(this double x, double y) { return Math.IEEERemainder(x, y); }\r\n     \r\n        /// <summary>Returns the natural (base e) logarithm of a specified number.</summary>\r\n        /// <returns>See <see cref=\"Math.Log\"/> for details.</returns>\r\n        /// <param name=\"value\">A number whose logarithm is to be found.</param>\r\n        public static double Log(this double value) { return Math.Log(value); }\r\n        /// <summary>Returns the logarithm of a specified number in a specified base.</summary>\r\n        /// <returns>See <see cref=\"Math.Log\"/> for details.</returns>\r\n        /// <param name=\"value\">A number whose logarithm is to be found.</param>\r\n        /// <param name=\"newBase\">The base of the logarithm.</param>\r\n        public static double Log(this double value, double newBase) { return Math.Log(value, newBase); }\r\n     \r\n        /// <summary>Returns the base 10 logarithm of a specified number.</summary>\r\n        /// <returns>See <see cref=\"Math.Log10\"/> for details.</returns>\r\n        /// <param name=\"value\">A number whose logarithm is to be found.</param>\r\n        public static double Log10(this double value) { return Math.Log10(value); }\r\n\r\n        /// <summary>Returns a specified number raised to the specified power.</summary>\r\n        /// <returns>The number x raised to the power y. See <see cref=\"Math.Pow\"/> for details.</returns>\r\n        /// <param name=\"y\">A double-precision floating-point number that specifies a power.</param>\r\n        /// <param name=\"x\">A double-precision floating-point number to be raised to a power.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static double Pow(this double x, double y) { return Math.Pow(x, y); }\r\n        \r\n        /// <summary>Returns a value indicating the sign of a decimal number.</summary>\r\n        /// <returns>A number indicating the sign of value.Number Description -1 value is less than zero. 0 value is equal to zero. 1 value is greater than zero.</returns>\r\n        /// <param name=\"value\">A signed <see cref=\"T:System.Decimal\"/> number.</param>\r\n        public static int Sign(this decimal value) { return Math.Sign(value); }\r\n        /// <summary>Returns a value indicating the sign of a double-precision floating-point number.</summary>\r\n        /// <returns>A number indicating the sign of value.Number Description -1 value is less than zero. 0 value is equal to zero. 1 value is greater than zero.</returns>\r\n        /// <param name=\"value\">A signed number.</param>\r\n        /// <exception cref=\"T:System.ArithmeticException\">value is equal to <see cref=\"F:System.Double.NaN\"/>.</exception>\r\n        public static int Sign(this double value) { return Math.Sign(value); }\r\n        /// <summary>Returns a value indicating the sign of a single-precision floating-point number.</summary>\r\n        /// <returns>A number indicating the sign of value.Number Description -1 value is less than zero. 0 value is equal to zero. 1 value is greater than zero.</returns>\r\n        /// <param name=\"value\">A signed number.</param>\r\n        /// <exception cref=\"T:System.ArithmeticException\">value is equal to <see cref=\"F:System.Single.NaN\"/>.</exception>\r\n        public static int Sign(this float value) { return Math.Sign(value); }\r\n        /// <summary>Returns a value indicating the sign of a 16-bit signed integer.</summary>\r\n        /// <returns>A number indicating the sign of value.Number Description -1 value is less than zero. 0 value is equal to zero. 1 value is greater than zero.</returns>\r\n        /// <param name=\"value\">A signed number.</param>\r\n        public static int Sign(this short value) { return Math.Sign(value); }\r\n        /// <summary>Returns a value indicating the sign of a 32-bit signed integer.</summary>\r\n        /// <returns>A number indicating the sign of value.Number Description -1 value is less than zero. 0 value is equal to zero. 1 value is greater than zero.</returns>\r\n        /// <param name=\"value\">A signed number.</param>\r\n        public static int Sign(this int value) { return Math.Sign(value); }\r\n        /// <summary>Returns a value indicating the sign of a 64-bit signed integer.</summary>\r\n        /// <returns>A number indicating the sign of value.Number Description -1 value is less than zero. 0 value is equal to zero. 1 value is greater than zero.</returns>\r\n        /// <param name=\"value\">A signed number.</param>\r\n        public static int Sign(this long value) { return Math.Sign(value); }\r\n        /// <summary>Returns a value indicating the sign of an 8-bit signed integer.</summary>\r\n        /// <returns>A number indicating the sign of value.Number Description -1 value is less than zero. 0 value is equal to zero. 1 value is greater than zero.</returns>\r\n        /// <param name=\"value\">A signed number.</param>\r\n        public static int Sign(this sbyte value) { return Math.Sign(value); }\r\n\r\n        /// <summary>Returns the square root of a specified number.</summary>\r\n        /// <returns><see cref=\"Math.Sqrt\"/> for details.</returns>\r\n        /// <param name=\"value\">A number.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static double Sqrt(this double value) { return Math.Sqrt(value); }\r\n\r\n        #endregion\r\n\r\n        #region Comparison\r\n\r\n        /// <summary>Determines whether a decimal value is inclusively between two values.</summary>\r\n        /// <returns>A boolean representing whether value is inclusively between a and b.</returns>\r\n        /// <param name=\"value\">A decimal value to compare.</param>\r\n        /// <param name=\"a\">The first bound to compare value against.</param>\r\n        /// <param name=\"b\">The second bound to compare value against.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static bool IsBetween(this decimal value, decimal a, decimal b) { return a < b ? a <= value && value <= b : b <= value && value <= a; }\r\n        /// <summary>Determines whether a double-precision floating-point value is inclusively between two values.</summary>\r\n        /// <returns>A boolean representing whether value is inclusively between a and b.</returns>\r\n        /// <param name=\"value\">A double-precision floating-point value to compare.</param>\r\n        /// <param name=\"a\">The first bound to compare value against.</param>\r\n        /// <param name=\"b\">The second bound to compare value against.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static bool IsBetween(this double value, double a, double b) { return a < b ? a <= value && value <= b : b <= value && value <= a; }\r\n        /// <summary>Determines whether a single-precision floating-point value is inclusively between two values.</summary>\r\n        /// <returns>A boolean representing whether value is inclusively between a and b.</returns>\r\n        /// <param name=\"value\">A double-precision floating-point value to compare.</param>\r\n        /// <param name=\"a\">The first bound to compare value against.</param>\r\n        /// <param name=\"b\">The second bound to compare value against.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static bool IsBetween(this float value, float a, float b) { return a < b ? a <= value && value <= b : b <= value && value <= a; }\r\n        /// <summary>Determines whether a 64-bit signed integer is inclusively between two values.</summary>\r\n        /// <returns>A boolean representing whether value is inclusively between a and b.</returns>\r\n        /// <param name=\"value\">A 64-bit signed integer to compare.</param>\r\n        /// <param name=\"a\">The first bound to compare value against.</param>\r\n        /// <param name=\"b\">The second bound to compare value against.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static bool IsBetween(this long value, long a, long b) { return a < b ? a <= value && value <= b : b <= value && value <= a; }\r\n        /// <summary>Determines whether a 32-bit signed integer is inclusively between two values.</summary>\r\n        /// <returns>A boolean representing whether value is inclusively between a and b.</returns>\r\n        /// <param name=\"value\">A 32-bit signed integer to compare.</param>\r\n        /// <param name=\"a\">The first bound to compare value against.</param>\r\n        /// <param name=\"b\">The second bound to compare value against.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static bool IsBetween(this int value, int a, int b) { return a < b ? a <= value && value <= b : b <= value && value <= a; }\r\n        /// <summary>Determines whether a 16-bit signed integer is inclusively between two values.</summary>\r\n        /// <returns>A boolean representing whether value is inclusively between a and b.</returns>\r\n        /// <param name=\"value\">A 16-bit signed integer to compare.</param>\r\n        /// <param name=\"a\">The first bound to compare value against.</param>\r\n        /// <param name=\"b\">The second bound to compare value against.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static bool IsBetween(this short value, short a, short b) { return a < b ? a <= value && value <= b : b <= value && value <= a; }\r\n        /// <summary>Determines whether an 8-bit unsigned integer is inclusively between two values.</summary>\r\n        /// <returns>A boolean representing whether value is inclusively between a and b.</returns>\r\n        /// <param name=\"value\">An 8-bit unsigned integer to compare.</param>\r\n        /// <param name=\"a\">The first bound to compare value against.</param>\r\n        /// <param name=\"b\">The second bound to compare value against.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static bool IsBetween(this byte value, byte a, byte b) { return a < b ? a <= value && value <= b : b <= value && value <= a; }\r\n\r\n        /// <summary>Returns a value indicating whether the specified number evaluates to a value that is not a number (<see cref=\"F:System.Double.NaN\"/>).</summary>\r\n        /// <returns>true if value evaluates to <see cref=\"F:System.Double.NaN\"/>; otherwise, false.</returns>\r\n        /// <param name=\"value\">A double-precision floating-point number. </param>\r\n        /// <filterpriority>1</filterpriority>\r\n        public static bool IsNaN(this double value) { return Double.IsNaN(value); }\r\n        /// <summary>Returns a value indicating whether the specified number evaluates to not a number (<see cref=\"F:System.Single.NaN\"/>).</summary>\r\n        /// <returns>true if value evaluates to not a number (<see cref=\"F:System.Single.NaN\"/>); otherwise, false.</returns>\r\n        /// <param name=\"f\">A single-precision floating-point number. </param>\r\n        /// <filterpriority>1</filterpriority>\r\n        public static bool IsNaN(this float value) { return Single.IsNaN(value); }\r\n\r\n        /// <summary>Retrieves the value of the specified number, or zero if it's not a number (<see cref=\"F:System.Double.NaN\"/>).</summary>\r\n        /// <returns>The value of the <paramref name=\"value\"/> parameter if it doesn't evaluate to <see cref=\"F:System.Double.NaN\"/>; otherwise, 0.0.</returns>\r\n        /// <param name=\"value\">A double-precision floating-point number. </param>\r\n        public static double GetValueOrDefault(this double value) { return Double.IsNaN(value) ? 0.0 : value; }\r\n        /// <summary>Retrieves the value of the specified number, or the specified default value if it's not a number (<see cref=\"F:System.Double.NaN\"/>).</summary>\r\n        /// <returns>The value of the <paramref name=\"value\"/> parameter if it doesn't evaluate to <see cref=\"F:System.Double.NaN\"/>; otherwise, the <paramref name=\"defaultValue\"/> parameter.</returns>\r\n        /// <param name=\"value\">A double-precision floating-point number. </param>\r\n        /// <param name=\"defaultValue\">The value to return if <see cref=\"IsNaN\"/> returns true.</param>\r\n        public static double GetValueOrDefault(this double value, double defaultValue) { return Double.IsNaN(value) ? defaultValue : value; }\r\n        /// <summary>Retrieves the value of the specified number, or zero if it's not a number (<see cref=\"F:System.Single.NaN\"/>).</summary>\r\n        /// <returns>The value of the <paramref name=\"value\"/> parameter if it doesn't evaluate to <see cref=\"F:System.Single.NaN\"/>; otherwise, 0.0.</returns>\r\n        /// <param name=\"value\">A single-precision floating-point number. </param>\r\n        public static float GetValueOrDefault(this float value) { return Single.IsNaN(value) ? 0.0f : value; }\r\n        /// <summary>Retrieves the value of the specified number, or the specified default value if it's not a number (<see cref=\"F:System.Single.NaN\"/>).</summary>\r\n        /// <returns>The value of the <paramref name=\"value\"/> parameter if it doesn't evaluate to <see cref=\"F:System.Single.NaN\"/>; otherwise, the <paramref name=\"defaultValue\"/> parameter.</returns>\r\n        /// <param name=\"value\">A single-precision floating-point number. </param>\r\n        /// <param name=\"defaultValue\">The value to return if <see cref=\"IsNaN\"/> returns true.</param>\r\n        public static float GetValueOrDefault(this float value, float defaultValue) { return Single.IsNaN(value) ? defaultValue : value; }\r\n\r\n        #endregion\r\n\r\n        #region Trigonometry\r\n\r\n        /// <summary>Returns the angle whose cosine is the specified number.</summary>\r\n        /// <returns>An angle, θ, measured in radians, such that 0 ≤ θ ≤ π -or- <see cref=\"F:System.Double.NaN\"/> if value &lt; -1 or value &gt; 1.</returns>\r\n        /// <param name=\"value\">A number representing a cosine, where -1 ≤ value ≤ 1.</param>\r\n        public static double Acos(this double value) { return Math.Acos(value); }\r\n\r\n        /// <summary>Returns the angle whose sine is the specified number.</summary>\r\n        /// <returns>An angle, θ, measured in radians, such that -π/2 ≤ θ ≤ π/2 -or- <see cref=\"F:System.Double.NaN\"/> if value &lt; -1 or value &gt; 1.</returns>\r\n        /// <param name=\"value\">A number representing a sine, where -1 ≤ value ≤ 1.</param>\r\n        public static double Asin(this double value) { return Math.Asin(value); }\r\n\r\n        /// <summary>Returns the angle whose tangent is the specified number.</summary>\r\n        /// <returns>An angle, θ, measured in radians, such that -π/2 ≤ θ ≤ π/2 -or- <see cref=\"F:System.Double.NaN\"/> if value equals <see cref=\"F:System.Double.NaN\"/>, -π/2 rounded to double precision (-1.5707963267949) if value equals <see cref=\"F:System.Double.NegativeInfinity\"/>, or π/2 rounded to double precision (1.5707963267949) if value equals <see cref=\"F:System.Double.PositiveInfinity\"/>.</returns>\r\n        /// <param name=\"value\">A number representing a tangent.</param>\r\n        public static double Atan(this double value) { return Math.Atan(value); }\r\n\r\n        /// <summary>Returns the angle whose tangent is the quotient of two specified numbers.</summary>\r\n        /// <returns>An angle, θ, measured in radians, such that -π ≤ θ ≤ π, and tan(θ) = y / x, where (x, y) is a point in the Cartesian plane. See <see cref=\"Math.Atan2\"/> for details.</returns>\r\n        /// <param name=\"y\">The y coordinate of a point.</param>\r\n        /// <param name=\"x\">The x coordinate of a point.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static double Atan2(this double y, double x) { return Math.Atan2(y, x); }\r\n  \r\n        /// <summary>Returns the cosine of the specified angle.</summary>\r\n        /// <returns>The cosine of angle.</returns>\r\n        /// <param name=\"angle\">An angle, measured in radians.</param>\r\n        public static double Cos(this double angle) { return Math.Cos(angle); }\r\n     \r\n        /// <summary>Returns the hyperbolic cosine of the specified angle.</summary>\r\n        /// <returns>The hyperbolic cosine of angle. If angle is equal to <see cref=\"F:System.Double.NegativeInfinity\"/> or <see cref=\"F:System.Double.PositiveInfinity\"/>, <see cref=\"F:System.Double.PositiveInfinity\"/> is returned. If angle is equal to <see cref=\"F:System.Double.NaN\"/>, <see cref=\"F:System.Double.NaN\"/> is returned.</returns>\r\n        /// <param name=\"angle\">An angle, measured in radians.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static double Cosh(this double angle) { return Math.Cosh(angle); }\r\n\r\n        /// <summary>Returns the sine of the specified angle.</summary>\r\n        /// <returns>The sine of angle. If angle is equal to <see cref=\"F:System.Double.NaN\"/>, <see cref=\"F:System.Double.NegativeInfinity\"/>, or <see cref=\"F:System.Double.PositiveInfinity\"/>, this method returns <see cref=\"F:System.Double.NaN\"/>.</returns>\r\n        /// <param name=\"angle\">An angle, measured in radians.</param>\r\n        public static double Sin(this double angle) { return Math.Sin(angle); }\r\n\r\n        /// <summary>Returns the hyperbolic sine of the specified angle.</summary>\r\n        /// <returns>The hyperbolic sine of angle. If angle is equal to <see cref=\"F:System.Double.NegativeInfinity\"/>, <see cref=\"F:System.Double.PositiveInfinity\"/>, or <see cref=\"F:System.Double.NaN\"/>, this method returns a <see cref=\"T:System.Double\"/> equal to angle.</returns>\r\n        /// <param name=\"angle\">An angle, measured in radians.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static double Sinh(this double angle) { return Math.Sinh(angle); }\r\n\r\n        /// <summary>Returns the tangent of the specified angle.</summary>\r\n        /// <returns>The tangent of angle. If angle is equal to <see cref=\"F:System.Double.NaN\"/>, <see cref=\"F:System.Double.NegativeInfinity\"/>, or <see cref=\"F:System.Double.PositiveInfinity\"/>, this method returns <see cref=\"F:System.Double.NaN\"/>.</returns>\r\n        /// <param name=\"angle\">An angle, measured in radians.</param>\r\n        public static double Tan(this double angle) { return Math.Tan(angle); }\r\n\r\n        /// <summary>Returns the hyperbolic tangent of the specified angle.</summary>\r\n        /// <returns>The hyperbolic tangent of angle. If angle is equal to <see cref=\"F:System.Double.NegativeInfinity\"/>, this method returns -1. If angle is equal to <see cref=\"F:System.Double.PositiveInfinity\"/>, this method returns 1. If angle is equal to <see cref=\"F:System.Double.NaN\"/>, this method returns <see cref=\"F:System.Double.NaN\"/>.</returns>\r\n        /// <param name=\"angle\">An angle, measured in radians.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\")]\r\n        public static double Tanh(this double angle) { return Math.Tanh(angle); }\r\n\r\n        #endregion\r\n\r\n        #region Sequences\r\n\r\n        /// <summary>Generates a sequence of decimal numbers within a specified range.</summary>\r\n        /// <returns>A sequence of numbers from start to (but not including) bound where each number is 1 greater than the previous number.</returns>\r\n        /// <param name=\"start\">The number to start from.</param>\r\n        /// <param name=\"bound\">The number to stop before.</param>\r\n        public static IEnumerable<decimal> To(this decimal start, decimal bound) { var step = start <= bound ? (decimal)1 : (decimal)-1; for (decimal i = start; i < bound; i += step) yield return i; }\r\n        /// <summary>Generates a sequence of decimal numbers within a specified range.</summary>\r\n        /// <returns>A sequence of numbers from start to (but not including) bound where each number is a given step greater than the previous number.</returns>\r\n        /// <param name=\"start\">The number to start from.</param>\r\n        /// <param name=\"bound\">The number to stop before.</param>\r\n        public static IEnumerable<decimal> To(this decimal start, decimal bound, decimal step) { for (decimal i = start; i < bound; i += step) yield return i; }\r\n        /// <summary>Generates a sequence of double-precision floating-point values within a specified range.</summary>\r\n        /// <returns>A sequence of numbers from start to (but not including) bound where each number is 1 greater than the previous number.</returns>\r\n        /// <param name=\"start\">The number to start from.</param>\r\n        /// <param name=\"bound\">The number to stop before.</param>\r\n        public static IEnumerable<double> To(this double start, double bound) { var step = start <= bound ? (double)1 : (double)-1; for (double i = start; i < bound; i += step) yield return i; }\r\n        /// <summary>Generates a sequence of double-precision floating-point values within a specified range.</summary>\r\n        /// <returns>A sequence of numbers from start to (but not including) bound where each number is a given step greater than the previous number.</returns>\r\n        /// <param name=\"start\">The number to start from.</param>\r\n        /// <param name=\"bound\">The number to stop before.</param>\r\n        public static IEnumerable<double> To(this double start, double bound, double step) { for (double i = start; i < bound; i += step) yield return i; }\r\n        /// <summary>Generates a sequence of single-precision floating-point values within a specified range.</summary>\r\n        /// <returns>A sequence of numbers from start to (but not including) bound where each number is 1 greater than the previous number.</returns>\r\n        /// <param name=\"start\">The number to start from.</param>\r\n        /// <param name=\"bound\">The number to stop before.</param>\r\n        public static IEnumerable<float> To(this float start, float bound) { var step = start <= bound ? (float)1 : (float)-1; for (float i = start; i < bound; i += step) yield return i; }\r\n        /// <summary>Generates a sequence of single-precision floating-point values within a specified range.</summary>\r\n        /// <returns>A sequence of numbers from start to (but not including) bound where each number is a given step greater than the previous number.</returns>\r\n        /// <param name=\"start\">The number to start from.</param>\r\n        /// <param name=\"bound\">The number to stop before.</param>\r\n        public static IEnumerable<float> To(this float start, float bound, float step) { for (float i = start; i < bound; i += step) yield return i; }\r\n        /// <summary>Generates a sequence of 64-bit signed integers within a specified range.</summary>\r\n        /// <returns>A sequence of numbers from start to (but not including) bound where each number is 1 greater than the previous number.</returns>\r\n        /// <param name=\"start\">The number to start from.</param>\r\n        /// <param name=\"bound\">The number to stop before.</param>\r\n        public static IEnumerable<long> To(this long start, long bound) { var step = start <= bound ? (long)1 : (long)-1; for (long i = start; i < bound; i += step) yield return i; }\r\n        /// <summary>Generates a sequence of 64-bit signed integers within a specified range.</summary>\r\n        /// <returns>A sequence of numbers from start to (but not including) bound where each number is a given step greater than the previous number.</returns>\r\n        /// <param name=\"start\">The number to start from.</param>\r\n        /// <param name=\"bound\">The number to stop before.</param>\r\n        public static IEnumerable<long> To(this long start, long bound, long step) { for (long i = start; i < bound; i += step) yield return i; }\r\n        /// <summary>Generates a sequence of 32-bit signed integers within a specified range.</summary>\r\n        /// <returns>A sequence of numbers from start to (but not including) bound where each number is 1 greater than the previous number.</returns>\r\n        /// <param name=\"start\">The number to start from.</param>\r\n        /// <param name=\"bound\">The number to stop before.</param>\r\n        public static IEnumerable<int> To(this int start, int bound) { var step = start <= bound ? (int)1 : (int)-1; for (int i = start; i < bound; i += step) yield return i; }\r\n        /// <summary>Generates a sequence of 32-bit signed integers within a specified range.</summary>\r\n        /// <returns>A sequence of numbers from start to (but not including) bound where each number is a given step greater than the previous number.</returns>\r\n        /// <param name=\"start\">The number to start from.</param>\r\n        /// <param name=\"bound\">The number to stop before.</param>\r\n        public static IEnumerable<int> To(this int start, int bound, int step) { for (int i = start; i < bound; i += step) yield return i; }\r\n        /// <summary>Generates a sequence of 16-bit signed integers within a specified range.</summary>\r\n        /// <returns>A sequence of numbers from start to (but not including) bound where each number is 1 greater than the previous number.</returns>\r\n        /// <param name=\"start\">The number to start from.</param>\r\n        /// <param name=\"bound\">The number to stop before.</param>\r\n        public static IEnumerable<short> To(this short start, short bound) { var step = start <= bound ? (short)1 : (short)-1; for (short i = start; i < bound; i += step) yield return i; }\r\n        /// <summary>Generates a sequence of 16-bit signed integers within a specified range.</summary>\r\n        /// <returns>A sequence of numbers from start to (but not including) bound where each number is a given step greater than the previous number.</returns>\r\n        /// <param name=\"start\">The number to start from.</param>\r\n        /// <param name=\"bound\">The number to stop before.</param>\r\n        public static IEnumerable<short> To(this short start, short bound, short step) { for (short i = start; i < bound; i += step) yield return i; }\r\n\r\n        #endregion\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Layout/Extensions/RectExtensions.cs",
    "content": "﻿using System;\r\nusing System.Windows;\r\n\r\nnamespace System.Windows.Controls.Extensions\r\n{\r\n    /// <summary>\r\n    /// Provides extension methods for rects.\r\n    /// </summary>\r\n\tinternal static class RectExtensions\r\n\t{\r\n        /// <summary>\r\n        /// Returns the center point of the <see cref=\"Rect\"/>.\r\n        /// </summary>\r\n        /// <param name=\"rect\">The rect to return the center point of.</param>\r\n        /// <returns>The center <see cref=\"Point\"/> of the <paramref name=\"rect\"/>.</returns>\r\n        public static Point GetCenter(this Rect rect)\r\n        {\r\n            return new Point(rect.X + rect.Width / 2, rect.Y + rect.Height / 2);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns whether the <see cref=\"Rect\"/> defines a real area in space.\r\n        /// </summary>\r\n        /// <param name=\"rect\">The rect to test.</param>\r\n        /// <returns><c>true</c> if rect defines an area or point in finite space, which is not the case for <see cref=\"Rect.Empty\"/> or if any of the fields are <see cref=\"double.NaN\"/>.</returns>\r\n        public static bool IsDefined(this Rect rect)\r\n        {\r\n            return rect.Width >= 0.0\r\n                && rect.Height >= 0.0\r\n                && rect.Top < Double.PositiveInfinity\r\n                && rect.Left < Double.PositiveInfinity\r\n                && (rect.Top > Double.NegativeInfinity || rect.Height == Double.PositiveInfinity)\r\n                && (rect.Left > Double.NegativeInfinity || rect.Width == Double.PositiveInfinity);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Indicates whether the specified rectangle intersects with the current rectangle, properly considering the empty rect and infinities.\r\n        /// </summary>\r\n        /// <param name=\"self\">The current rectangle.</param>\r\n        /// <param name=\"rect\">The rectangle to check.</param>\r\n        /// <returns><c>true</c> if the specified rectangle intersects with the current rectangle; otherwise, <c>false</c>.</returns>\r\n        public static bool Intersects(this Rect self, Rect rect)\r\n        {\r\n            return (self.IsEmpty || rect.IsEmpty)\r\n                || (self.Width == Double.PositiveInfinity || self.Right >= rect.Left)\r\n                && (rect.Width == Double.PositiveInfinity || rect.Right >= self.Left)\r\n                && (self.Height == Double.PositiveInfinity || self.Bottom >= rect.Top)\r\n                && (rect.Height == Double.PositiveInfinity || rect.Bottom >= self.Top);\r\n        }\r\n\t}\r\n}"
  },
  {
    "path": "WpfToolkit/Layout/GlobalSuppressions.cs",
    "content": "// (c) Copyright Microsoft Corporation.\r\n// This source is subject to [###LICENSE_NAME###].\r\n// Please see [###LICENSE_LINK###] for details.\r\n// All other rights reserved.\r\n\r\nusing System.Diagnostics.CodeAnalysis;\r\n\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1020:AvoidNamespacesWithFewTypes\", Scope = \"namespace\", Target = \"System.Windows.Automation.Peers\", Justification = \"This is the official namespace for automation peers.\")]\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1020:AvoidNamespacesWithFewTypes\", Scope = \"namespace\", Target = \"System.Windows\")]\r\n\r\n[assembly: SuppressMessage(\"General\", \"SWC1001:XmlDocumentationCommentShouldBeSpelledCorrectly\", MessageId = \"Headered\")]\r\n[assembly: SuppressMessage(\"General\", \"SWC1001:XmlDocumentationCommentShouldBeSpelledCorrectly\", MessageId = \"Util\")]\r\n[assembly: SuppressMessage(\"General\", \"SWC1001:XmlDocumentationCommentShouldBeSpelledCorrectly\", MessageId = \"namescope\")]\r\n[assembly: SuppressMessage(\"General\", \"SWC1001:XmlDocumentationCommentShouldBeSpelledCorrectly\", MessageId = \"Multi\")]\r\n[assembly: SuppressMessage(\"General\", \"SWC1001:XmlDocumentationCommentShouldBeSpelledCorrectly\", MessageId = \"Unwatermarked\")]\r\n[assembly: SuppressMessage(\"General\", \"SWC1001:XmlDocumentationCommentShouldBeSpelledCorrectly\", MessageId = \"Validator's\")]\r\n[assembly: SuppressMessage(\"General\", \"SWC1001:XmlDocumentationCommentShouldBeSpelledCorrectly\", MessageId = \"WPF's\")]\r\n[assembly: SuppressMessage(\"General\", \"SWC1001:XmlDocumentationCommentShouldBeSpelledCorrectly\", MessageId = \"Silverlight\")]\r\n\r\n[assembly: SuppressMessage(\"Microsoft.Naming\", \"CA1703:ResourceStringsShouldBeSpelledCorrectly\", MessageId = \"Multi\", Scope = \"resource\", Target = \"System.Windows.Controls.Properties.Resources.resources\", Justification = \"Follows WPF MultiSelector class naming.\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.Accordion\", Justification = \"New control for Silverlight\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.AccordionButton\", Justification = \"Part of Accordion\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.AccordionItem\", Justification = \"Part of Accordion\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.ExpandableContentControl\", Justification = \"Part of Accordion\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.LayoutTransformControl\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.SelectionSequence\", Justification = \"Part of Accordion\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Controls.SelectionMode\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Automation.Peers.AccordionAutomationPeer\")]\r\n[assembly: SuppressMessage(\"Compatibility\", \"SWC4000:GeneralWPFCompatibilityRule\", MessageId = \"System.Windows.Automation.Peers.AccordionItemAutomationPeer\")]\r\n\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"System.Windows.Controls.InteractionHelper.#AllowGotFocus(System.Windows.RoutedEventArgs)\", Justification = \"Implementations used by other assemblies.\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"System.Windows.Controls.InteractionHelper.#AllowKeyDown(System.Windows.Input.KeyEventArgs)\", Justification = \"Implementations used by other assemblies.\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"System.Windows.Controls.InteractionHelper.#AllowKeyUp(System.Windows.Input.KeyEventArgs)\", Justification = \"Implementations used by other assemblies.\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"System.Windows.Controls.InteractionHelper.#AllowLostFocus(System.Windows.RoutedEventArgs)\", Justification = \"Implementations used by other assemblies.\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"System.Windows.Controls.InteractionHelper.#AllowMouseEnter(System.Windows.Input.MouseEventArgs)\", Justification = \"Implementations used by other assemblies.\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"System.Windows.Controls.InteractionHelper.#AllowMouseLeave(System.Windows.Input.MouseEventArgs)\", Justification = \"Implementations used by other assemblies.\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"System.Windows.Controls.InteractionHelper.#AllowMouseLeftButtonDown(System.Windows.Input.MouseButtonEventArgs)\", Justification = \"Implementations used by other assemblies.\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"System.Windows.Controls.InteractionHelper.#AllowMouseLeftButtonUp(System.Windows.Input.MouseButtonEventArgs)\", Justification = \"Implementations used by other assemblies.\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"System.Windows.Controls.InteractionHelper.#ClickCount\", Justification = \"Implementations used by other assemblies.\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"System.Windows.Controls.InteractionHelper.#LastClickPosition\", Justification = \"Implementations used by other assemblies.\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"System.Windows.Controls.InteractionHelper.#LastClickTime\", Justification = \"Implementations used by other assemblies.\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"System.Windows.Controls.InteractionHelper.#OnGotFocusBase()\", Justification = \"Implementations used by other assemblies.\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"System.Windows.Controls.InteractionHelper.#OnLostFocusBase()\", Justification = \"Implementations used by other assemblies.\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"System.Windows.Controls.InteractionHelper.#OnMouseEnterBase()\", Justification = \"Implementations used by other assemblies.\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"System.Windows.Controls.InteractionHelper.#OnMouseLeaveBase()\", Justification = \"Implementations used by other assemblies.\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"System.Windows.Controls.InteractionHelper.#OnMouseLeftButtonDownBase()\", Justification = \"Implementations used by other assemblies.\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"System.Windows.Controls.InteractionHelper.#OnMouseLeftButtonUpBase()\", Justification = \"Implementations used by other assemblies.\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"System.Windows.Controls.VisualStates.#GetImplementationRoot(System.Windows.DependencyObject)\", Justification = \"Implementations used by other assemblies.\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Scope = \"member\", Target = \"System.Windows.Controls.VisualStates.#TryGetVisualStateGroup(System.Windows.DependencyObject,System.String)\", Justification = \"Implementations used by other assemblies.\")]\r\n\r\n[assembly: SuppressMessage(\"Microsoft.Design\", \"CA1020:AvoidNamespacesWithFewTypes\", Scope = \"namespace\", Target = \"System.Windows.Controls.Primitives\", Justification = \"Controls are considered primitives.\")]\r\n[assembly: SuppressMessage(\"General\", \"SWC1001:XmlDocumentationCommentShouldBeSpelledCorrectly\", MessageId = \"headered\", Justification = \"Follows naming used in hierarchy.\")]\r\n"
  },
  {
    "path": "WpfToolkit/Layout/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Runtime.InteropServices;\r\nusing System.Windows;\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components.  If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n// In order to begin building localizable applications, set \r\n// <UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file\r\n// inside a <PropertyGroup>.  For example, if you are using US english\r\n// in your source files, set the <UICulture> to en-US.  Then uncomment\r\n// the NeutralResourceLanguage attribute below.  Update the \"en-US\" in\r\n// the line below to match the UICulture setting in the project file.\r\n// [assembly: NeutralResourcesLanguage(\"en-US\")]\r\n// WPF-only settings\r\n[assembly: ThemeInfo(\r\n    ResourceDictionaryLocation.None,\r\n    ResourceDictionaryLocation.SourceAssembly)]\r\n"
  },
  {
    "path": "WpfToolkit/Layout/Properties/Resources.Designer.cs",
    "content": "﻿//------------------------------------------------------------------------------\r\n// <auto-generated>\r\n//     This code was generated by a tool.\r\n//     Runtime Version:4.0.30319.18213\r\n//\r\n//     Changes to this file may cause incorrect behavior and will be lost if\r\n//     the code is regenerated.\r\n// </auto-generated>\r\n//------------------------------------------------------------------------------\r\n\r\nnamespace System.Windows.Controls.Properties {\r\n    using System;\r\n    \r\n    \r\n    /// <summary>\r\n    ///   A strongly-typed resource class, for looking up localized strings, etc.\r\n    /// </summary>\r\n    // This class was auto-generated by the StronglyTypedResourceBuilder\r\n    // class via a tool like ResGen or Visual Studio.\r\n    // To add or remove a member, edit your .ResX file then rerun ResGen\r\n    // with the /str option, or rebuild your VS project.\r\n    [global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Resources.Tools.StronglyTypedResourceBuilder\", \"4.0.0.0\")]\r\n    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r\n    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\r\n    internal class Resources {\r\n        \r\n        private static global::System.Resources.ResourceManager resourceMan;\r\n        \r\n        private static global::System.Globalization.CultureInfo resourceCulture;\r\n        \r\n        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\")]\r\n        internal Resources() {\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Returns the cached ResourceManager instance used by this class.\r\n        /// </summary>\r\n        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\r\n        internal static global::System.Resources.ResourceManager ResourceManager {\r\n            get {\r\n                if (object.ReferenceEquals(resourceMan, null)) {\r\n                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager(\"System.Windows.Controls.Properties.Resources\", typeof(Resources).Assembly);\r\n                    resourceMan = temp;\r\n                }\r\n                return resourceMan;\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Overrides the current thread's CurrentUICulture property for all\r\n        ///   resource lookups using this strongly typed resource class.\r\n        /// </summary>\r\n        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\r\n        internal static global::System.Globalization.CultureInfo Culture {\r\n            get {\r\n                return resourceCulture;\r\n            }\r\n            set {\r\n                resourceCulture = value;\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to The modification made to the collection lead to an invalid Selection state. Please check the SelectionMode to allow zero or multiple items..\r\n        /// </summary>\r\n        internal static string Accordion_InvalidManipulationOfSelectionCollections {\r\n            get {\r\n                return ResourceManager.GetString(\"Accordion_InvalidManipulationOfSelectionCollections\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Should not signal a finish when item is not expected to perform an action..\r\n        /// </summary>\r\n        internal static string Accordion_OnActionFinish_InvalidFinish {\r\n            get {\r\n                return ResourceManager.GetString(\"Accordion_OnActionFinish_InvalidFinish\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Invalid ExpandDirection value &apos;{0}&apos;..\r\n        /// </summary>\r\n        internal static string Accordion_OnExpandDirectionPropertyChanged_InvalidValue {\r\n            get {\r\n                return ResourceManager.GetString(\"Accordion_OnExpandDirectionPropertyChanged_InvalidValue\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Cannot set read-only property SelectedIndices..\r\n        /// </summary>\r\n        internal static string Accordion_OnSelectedIndicesChanged_InvalidWrite {\r\n            get {\r\n                return ResourceManager.GetString(\"Accordion_OnSelectedIndicesChanged_InvalidWrite\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Cannot set read-only property SelectedItems..\r\n        /// </summary>\r\n        internal static string Accordion_OnSelectedItemsChanged_InvalidWrite {\r\n            get {\r\n                return ResourceManager.GetString(\"Accordion_OnSelectedItemsChanged_InvalidWrite\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Invalid SelectionMode value &apos;{0}&apos;..\r\n        /// </summary>\r\n        internal static string Accordion_OnSelectionModePropertyChanged_InvalidValue {\r\n            get {\r\n                return ResourceManager.GetString(\"Accordion_OnSelectionModePropertyChanged_InvalidValue\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Invalid SelectionSequence value &apos;{0}&apos;..\r\n        /// </summary>\r\n        internal static string Accordion_OnSelectionSequencepropertyChanged_InvalidValue {\r\n            get {\r\n                return ResourceManager.GetString(\"Accordion_OnSelectionSequencepropertyChanged_InvalidValue\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Unsupported collection action &apos;{0}&apos;..\r\n        /// </summary>\r\n        internal static string Accordion_UnsupportedCollectionAction {\r\n            get {\r\n                return ResourceManager.GetString(\"Accordion_UnsupportedCollectionAction\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to ContentTargetSize is a read-only value and is set through Accordion..\r\n        /// </summary>\r\n        internal static string AccordionItem_InvalidWriteToContentTargetSize {\r\n            get {\r\n                return ResourceManager.GetString(\"AccordionItem_InvalidWriteToContentTargetSize\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to ExpandDirection is a read-only value and is set through Accordion..\r\n        /// </summary>\r\n        internal static string AccordionItem_InvalidWriteToExpandDirection {\r\n            get {\r\n                return ResourceManager.GetString(\"AccordionItem_InvalidWriteToExpandDirection\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Cannot modify the IsSelected property while item is locked..\r\n        /// </summary>\r\n        internal static string AccordionItem_OnIsSelectedPropertyChanged_InvalidChange {\r\n            get {\r\n                return ResourceManager.GetString(\"AccordionItem_OnIsSelectedPropertyChanged_InvalidChange\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Invalid Action &apos;{0}&apos;..\r\n        /// </summary>\r\n        internal static string AccordionItem_StartAction_InvalidAction {\r\n            get {\r\n                return ResourceManager.GetString(\"AccordionItem_StartAction_InvalidAction\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Cannot start an action when there is no action scheduled..\r\n        /// </summary>\r\n        internal static string AccordionItem_StartAction_InvalidCall {\r\n            get {\r\n                return ResourceManager.GetString(\"AccordionItem_StartAction_InvalidCall\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Cannot perform operation..\r\n        /// </summary>\r\n        internal static string Automation_OperationCannotBePerformed {\r\n            get {\r\n                return ResourceManager.GetString(\"Automation_OperationCannotBePerformed\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Invalid ExpandDirection value &apos;{0}&apos;..\r\n        /// </summary>\r\n        internal static string Expander_OnExpandDirectionPropertyChanged_InvalidValue {\r\n            get {\r\n                return ResourceManager.GetString(\"Expander_OnExpandDirectionPropertyChanged_InvalidValue\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to Transition &apos;{0}&apos; was not defined..\r\n        /// </summary>\r\n        internal static string TransitioningContentControl_TransitionNotFound {\r\n            get {\r\n                return ResourceManager.GetString(\"TransitioningContentControl_TransitionNotFound\", resourceCulture);\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Looks up a localized string similar to IsTransitioning property is read-only..\r\n        /// </summary>\r\n        internal static string TransitiotioningContentControl_IsTransitioningReadOnly {\r\n            get {\r\n                return ResourceManager.GetString(\"TransitiotioningContentControl_IsTransitioningReadOnly\", resourceCulture);\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Layout/Properties/Resources.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n  <!-- \r\n    Microsoft ResX Schema \r\n    \r\n    Version 2.0\r\n    \r\n    The primary goals of this format is to allow a simple XML format \r\n    that is mostly human readable. The generation and parsing of the \r\n    various data types are done through the TypeConverter classes \r\n    associated with the data types.\r\n    \r\n    Example:\r\n    \r\n    ... ado.net/XML headers & schema ...\r\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\r\n    <resheader name=\"version\">2.0</resheader>\r\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\r\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\r\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\r\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\r\n    </data>\r\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\r\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r\n        <comment>This is a comment</comment>\r\n    </data>\r\n                \r\n    There are any number of \"resheader\" rows that contain simple \r\n    name/value pairs.\r\n    \r\n    Each data row contains a name, and value. The row also contains a \r\n    type or mimetype. Type corresponds to a .NET class that support \r\n    text/value conversion through the TypeConverter architecture. \r\n    Classes that don't support this are serialized and stored with the \r\n    mimetype set.\r\n    \r\n    The mimetype is used for serialized objects, and tells the \r\n    ResXResourceReader how to depersist the object. This is currently not \r\n    extensible. For a given mimetype the value must be set accordingly:\r\n    \r\n    Note - application/x-microsoft.net.object.binary.base64 is the format \r\n    that the ResXResourceWriter will generate, however the reader can \r\n    read any of the formats listed below.\r\n    \r\n    mimetype: application/x-microsoft.net.object.binary.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\r\n            : and then encoded with base64 encoding.\r\n    \r\n    mimetype: application/x-microsoft.net.object.soap.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r\n            : and then encoded with base64 encoding.\r\n\r\n    mimetype: application/x-microsoft.net.object.bytearray.base64\r\n    value   : The object must be serialized into a byte array \r\n            : using a System.ComponentModel.TypeConverter\r\n            : and then encoded with base64 encoding.\r\n    -->\r\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\r\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\r\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\r\n      <xsd:complexType>\r\n        <xsd:choice maxOccurs=\"unbounded\">\r\n          <xsd:element name=\"metadata\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"assembly\">\r\n            <xsd:complexType>\r\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"data\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\r\n              <xsd:attribute ref=\"xml:space\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"resheader\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n        </xsd:choice>\r\n      </xsd:complexType>\r\n    </xsd:element>\r\n  </xsd:schema>\r\n  <resheader name=\"resmimetype\">\r\n    <value>text/microsoft-resx</value>\r\n  </resheader>\r\n  <resheader name=\"version\">\r\n    <value>2.0</value>\r\n  </resheader>\r\n  <resheader name=\"reader\">\r\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <resheader name=\"writer\">\r\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <data name=\"AccordionItem_InvalidWriteToContentTargetSize\" xml:space=\"preserve\">\r\n    <value>ContentTargetSize is a read-only value and is set through Accordion.</value>\r\n    <comment>Exception thrown when ContentTargetSize on AccordionItem is changed.</comment>\r\n  </data>\r\n  <data name=\"AccordionItem_InvalidWriteToExpandDirection\" xml:space=\"preserve\">\r\n    <value>ExpandDirection is a read-only value and is set through Accordion.</value>\r\n    <comment>Exception thrown when ExpandDirection on AccordionItem is changed.</comment>\r\n  </data>\r\n  <data name=\"AccordionItem_OnIsSelectedPropertyChanged_InvalidChange\" xml:space=\"preserve\">\r\n    <value>Cannot modify the IsSelected property while item is locked.</value>\r\n    <comment>Exception thrown when the IsSelectedProperty is changed, while the AccordionItem is locked.</comment>\r\n  </data>\r\n  <data name=\"AccordionItem_StartAction_InvalidAction\" xml:space=\"preserve\">\r\n    <value>Invalid Action '{0}'.</value>\r\n    <comment>Exception thrown when the layout action is unknown.</comment>\r\n  </data>\r\n  <data name=\"AccordionItem_StartAction_InvalidCall\" xml:space=\"preserve\">\r\n    <value>Cannot start an action when there is no action scheduled.</value>\r\n    <comment>Exception thrown when no layout action is available but StartAction is called.</comment>\r\n  </data>\r\n  <data name=\"Accordion_InvalidManipulationOfSelectionCollections\" xml:space=\"preserve\">\r\n    <value>The modification made to the collection lead to an invalid Selection state. Please check the SelectionMode to allow zero or multiple items.</value>\r\n    <comment>Exception thrown when the SelectionCollections are incorrectly manipulated.</comment>\r\n  </data>\r\n  <data name=\"Accordion_OnActionFinish_InvalidFinish\" xml:space=\"preserve\">\r\n    <value>Should not signal a finish when item is not expected to perform an action.</value>\r\n    <comment>Exception thrown when an AccordionItem signals the end of an action, but was not registered by Accordion as performing that action.</comment>\r\n  </data>\r\n  <data name=\"Accordion_OnExpandDirectionPropertyChanged_InvalidValue\" xml:space=\"preserve\">\r\n    <value>Invalid ExpandDirection value '{0}'.</value>\r\n    <comment>Exception thrown when the ExpandDirection property is provided an invalid value.</comment>\r\n  </data>\r\n  <data name=\"Accordion_OnSelectedIndicesChanged_InvalidWrite\" xml:space=\"preserve\">\r\n    <value>Cannot set read-only property SelectedIndices.</value>\r\n    <comment>Exception thrown when the SelectedIndices property is improperly set.</comment>\r\n  </data>\r\n  <data name=\"Accordion_OnSelectedItemsChanged_InvalidWrite\" xml:space=\"preserve\">\r\n    <value>Cannot set read-only property SelectedItems.</value>\r\n    <comment>Exception thrown when the SelectedItems property is improperly set.</comment>\r\n  </data>\r\n  <data name=\"Accordion_OnSelectionModePropertyChanged_InvalidValue\" xml:space=\"preserve\">\r\n    <value>Invalid SelectionMode value '{0}'.</value>\r\n    <comment>Exception thrown when the SelectionMode property is provided an invalid value.</comment>\r\n  </data>\r\n  <data name=\"Accordion_OnSelectionSequencepropertyChanged_InvalidValue\" xml:space=\"preserve\">\r\n    <value>Invalid SelectionSequence value '{0}'.</value>\r\n    <comment>Exception thrown when the SelectionSequence property is provided an invalid value.</comment>\r\n  </data>\r\n  <data name=\"Accordion_UnsupportedCollectionAction\" xml:space=\"preserve\">\r\n    <value>Unsupported collection action '{0}'.</value>\r\n    <comment>Exception thrown when the SelectedItems or SelectedIndices collection is changed in a way not supported by Accordion.</comment>\r\n  </data>\r\n  <data name=\"Automation_OperationCannotBePerformed\" xml:space=\"preserve\">\r\n    <value>Cannot perform operation.</value>\r\n    <comment>Exception thrown by automation peers.</comment>\r\n  </data>\r\n  <data name=\"Expander_OnExpandDirectionPropertyChanged_InvalidValue\" xml:space=\"preserve\">\r\n    <value>Invalid ExpandDirection value '{0}'.</value>\r\n    <comment>Exception thrown when the ExpandDirection property is provided an invalid value.</comment>\r\n  </data>\r\n  <data name=\"TransitioningContentControl_TransitionNotFound\" xml:space=\"preserve\">\r\n    <value>Transition '{0}' was not defined.</value>\r\n    <comment>Exception thrown when a Transition is set that is not available.</comment>\r\n  </data>\r\n  <data name=\"TransitiotioningContentControl_IsTransitioningReadOnly\" xml:space=\"preserve\">\r\n    <value>IsTransitioning property is read-only.</value>\r\n    <comment>Exception thrown when IsTransitioning is altered.</comment>\r\n  </data>\r\n</root>"
  },
  {
    "path": "WpfToolkit/Layout/System.Windows.Controls.Layout.Toolkit.XML",
    "content": "<?xml version=\"1.0\"?>\r\n<doc>\r\n    <assembly>\r\n        <name>DotNetProjects.Layout.Toolkit</name>\r\n    </assembly>\r\n    <members>\r\n        <member name=\"T:System.Windows.Controls.Extensions.Extensions\">\r\n            <summary>\r\n            This set of internal extension methods provide general solutions and \r\n            utilities in a small enough number to not warrant a dedicated extension\r\n            methods class.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.Extensions.Invert(System.Windows.Media.Matrix,System.Windows.Media.Matrix@)\">\r\n            <summary>\r\n            Inverts a Matrix. The Invert functionality on the Matrix type is \r\n            internal to the framework only. Since Matrix is a struct, an out \r\n            parameter must be presented.\r\n            </summary>\r\n            <param name=\"m\">The Matrix object.</param>\r\n            <param name=\"outputMatrix\">The matrix to return by an output \r\n            parameter.</param>\r\n            <returns>Returns a value indicating whether the type was \r\n            successfully inverted. If the determinant is 0.0, then it cannot \r\n            be inverted and the original instance will remain untouched.</returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.Extensions.Contains(System.String,System.String,System.StringComparison)\">\r\n            <summary>\r\n            An implementation of the Contains member of string that takes in a \r\n            string comparison. The traditional .NET string Contains member uses \r\n            StringComparison.Ordinal.\r\n            </summary>\r\n            <param name=\"s\">The string.</param>\r\n            <param name=\"value\">The string value to search for.</param>\r\n            <param name=\"comparison\">The string comparison type.</param>\r\n            <returns>Returns true when the substring is found.</returns>\r\n        </member>\r\n        <member name=\"T:System.Windows.Controls.Extensions.MathExtensions\">\r\n            <summary>Provides extension methods for trigonometric, logarithmic, and other common mathematical functions.</summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Ceiling(System.Decimal)\">\r\n            <summary>Returns the smallest integer greater than or equal to the specified decimal number.</summary>\r\n            <returns>The smallest integer greater than or equal to value.</returns>\r\n            <param name=\"value\">A decimal number.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Ceiling(System.Double)\">\r\n            <summary>Returns the smallest integer greater than or equal to the specified double-precision floating-point number.</summary>\r\n            <returns>The smallest integer greater than or equal to value. If value is equal to <see cref=\"F:System.Double.NaN\"/>, <see cref=\"F:System.Double.NegativeInfinity\"/>, or <see cref=\"F:System.Double.PositiveInfinity\"/>, that value is returned.</returns>\r\n            <param name=\"value\">A double-precision floating-point number.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Floor(System.Decimal)\">\r\n            <summary>Returns the largest integer less than or equal to the specified decimal number.</summary>\r\n            <returns>The largest integer less than or equal to value.</returns>\r\n            <param name=\"value\">A decimal number.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Floor(System.Double)\">\r\n            <summary>Returns the largest integer less than or equal to the specified double-precision floating-point number.</summary>\r\n            <returns>The largest integer less than or equal to value. If value is equal to <see cref=\"F:System.Double.NaN\"/>, <see cref=\"F:System.Double.NegativeInfinity\"/>, or <see cref=\"F:System.Double.PositiveInfinity\"/>, that value is returned.</returns>\r\n            <param name=\"value\">A double-precision floating-point number.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.AtLeast(System.Byte,System.Byte)\">\r\n            <summary>Returns the larger of two 8-bit unsigned integers.</summary>\r\n            <returns>Parameter a or b, whichever is larger.</returns>\r\n            <param name=\"a\">The first of two 8-bit unsigned integers to compare.</param>\r\n            <param name=\"b\">The second of two 8-bit unsigned integers to compare.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.AtLeast(System.Decimal,System.Decimal)\">\r\n            <summary>Returns the larger of two decimal numbers.</summary>\r\n            <returns>Parameter a or b, whichever is larger.</returns>\r\n            <param name=\"a\">The first of two <see cref=\"T:System.Decimal\"/> numbers to compare.</param>\r\n            <param name=\"b\">The second of two <see cref=\"T:System.Decimal\"/> numbers to compare.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.AtLeast(System.Double,System.Double)\">\r\n            <summary>Returns the larger of two double-precision floating-point numbers.</summary>\r\n            <returns>Parameter a or b, whichever is larger. If a, b, or both a and b are equal to <see cref=\"F:System.Double.NaN\"/>, <see cref=\"F:System.Double.NaN\"/> is returned.</returns>\r\n            <param name=\"a\">The first of two double-precision floating-point numbers to compare.</param>\r\n            <param name=\"b\">The second of two double-precision floating-point numbers to compare.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.AtLeast(System.Single,System.Single)\">\r\n            <summary>Returns the larger of two single-precision floating-point numbers.</summary>\r\n            <returns>Parameter a or b, whichever is larger. If a, or b, or both a and b are equal to <see cref=\"F:System.Single.NaN\"/>, <see cref=\"F:System.Single.NaN\"/> is returned.</returns>\r\n            <param name=\"a\">The first of two single-precision floating-point numbers to compare.</param>\r\n            <param name=\"b\">The second of two single-precision floating-point numbers to compare.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.AtLeast(System.Int16,System.Int16)\">\r\n            <summary>Returns the larger of two 16-bit signed integers.</summary>\r\n            <returns>Parameter a or b, whichever is larger.</returns>\r\n            <param name=\"a\">The first of two 16-bit signed integers to compare.</param>\r\n            <param name=\"b\">The second of two 16-bit signed integers to compare.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.AtLeast(System.Int32,System.Int32)\">\r\n            <summary>Returns the larger of two 32-bit signed integers.</summary>\r\n            <returns>Parameter a or b, whichever is larger.</returns>\r\n            <param name=\"a\">The first of two 32-bit signed integers to compare.</param>\r\n            <param name=\"b\">The second of two 32-bit signed integers to compare.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.AtLeast(System.Int64,System.Int64)\">\r\n            <summary>Returns the larger of two 64-bit signed integers.</summary>\r\n            <returns>Parameter a or b, whichever is larger.</returns>\r\n            <param name=\"a\">The first of two 64-bit signed integers to compare.</param>\r\n            <param name=\"b\">The second of two 64-bit signed integers to compare.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.AtLeast(System.SByte,System.SByte)\">\r\n            <summary>Returns the larger of two 8-bit signed integers.</summary>\r\n            <returns>Parameter a or b, whichever is larger.</returns>\r\n            <param name=\"a\">The first of two 8-bit unsigned integers to compare.</param>\r\n            <param name=\"b\">The second of two 8-bit unsigned integers to compare.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.AtLeast(System.UInt16,System.UInt16)\">\r\n            <summary>Returns the larger of two 16-bit unsigned integers.</summary>\r\n            <returns>Parameter a or b, whichever is larger.</returns>\r\n            <param name=\"a\">The first of two 16-bit unsigned integers to compare.</param>\r\n            <param name=\"b\">The second of two 16-bit unsigned integers to compare.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.AtLeast(System.UInt32,System.UInt32)\">\r\n            <summary>Returns the larger of two 32-bit unsigned integers.</summary>\r\n            <returns>Parameter a or b, whichever is larger.</returns>\r\n            <param name=\"a\">The first of two 32-bit unsigned integers to compare.</param>\r\n            <param name=\"b\">The second of two 32-bit unsigned integers to compare.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.AtLeast(System.UInt64,System.UInt64)\">\r\n            <summary>Returns the larger of two 64-bit unsigned integers.</summary>\r\n            <returns>Parameter a or b, whichever is larger.</returns>\r\n            <param name=\"a\">The first of two 64-bit unsigned integers to compare.</param>\r\n            <param name=\"b\">The second of two 64-bit unsigned integers to compare.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.AtMost(System.Byte,System.Byte)\">\r\n            <summary>Returns the smaller of two 8-bit unsigned integers.</summary>\r\n            <returns>Parameter a or b, whichever is smaller.</returns>\r\n            <param name=\"a\">The first of two 8-bit unsigned integers to compare.</param>\r\n            <param name=\"b\">The second of two 8-bit unsigned integers to compare.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.AtMost(System.Decimal,System.Decimal)\">\r\n            <summary>Returns the smaller of two decimal numbers.</summary>\r\n            <returns>Parameter a or b, whichever is smaller.</returns>\r\n            <param name=\"a\">The first of two <see cref=\"T:System.Decimal\"/> numbers to compare.</param>\r\n            <param name=\"b\">The second of two <see cref=\"T:System.Decimal\"/> numbers to compare.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.AtMost(System.Double,System.Double)\">\r\n            <summary>Returns the smaller of two double-precision floating-point numbers.</summary>\r\n            <returns>Parameter a or b, whichever is smaller. If a, b, or both a and b are equal to <see cref=\"F:System.Double.NaN\"/>, <see cref=\"F:System.Double.NaN\"/> is returned.</returns>\r\n            <param name=\"a\">The first of two double-precision floating-point numbers to compare.</param>\r\n            <param name=\"b\">The second of two double-precision floating-point numbers to compare.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.AtMost(System.Single,System.Single)\">\r\n            <summary>Returns the smaller of two single-precision floating-point numbers.</summary>\r\n            <returns>Parameter a or b, whichever is smaller. If a, b, or both a and b are equal to <see cref=\"F:System.Single.NaN\"/>, <see cref=\"F:System.Single.NaN\"/> is returned.</returns>\r\n            <param name=\"a\">The first of two single-precision floating-point numbers to compare.</param>\r\n            <param name=\"b\">The second of two single-precision floating-point numbers to compare.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.AtMost(System.Int16,System.Int16)\">\r\n            <summary>Returns the smaller of two 16-bit signed integers.</summary>\r\n            <returns>Parameter a or b, whichever is smaller.</returns>\r\n            <param name=\"a\">The first of two 16-bit signed integers to compare.</param>\r\n            <param name=\"b\">The second of two 16-bit signed integers to compare.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.AtMost(System.Int32,System.Int32)\">\r\n            <summary>Returns the smaller of two 32-bit signed integers.</summary>\r\n            <returns>Parameter a or b, whichever is smaller.</returns>\r\n            <param name=\"a\">The first of two 32-bit signed integers to compare.</param>\r\n            <param name=\"b\">The second of two 32-bit signed integers to compare.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.AtMost(System.Int64,System.Int64)\">\r\n            <summary>Returns the smaller of two 64-bit signed integers.</summary>\r\n            <returns>Parameter a or b, whichever is smaller.</returns>\r\n            <param name=\"a\">The first of two 64-bit signed integers to compare.</param>\r\n            <param name=\"b\">The second of two 64-bit signed integers to compare.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.AtMost(System.SByte,System.SByte)\">\r\n            <summary>Returns the smaller of two 8-bit signed integers.</summary>\r\n            <returns>Parameter a or b, whichever is smaller.</returns>\r\n            <param name=\"a\">The first of two 8-bit signed integers to compare.</param>\r\n            <param name=\"b\">The second of two 8-bit signed integers to compare.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.AtMost(System.UInt16,System.UInt16)\">\r\n            <summary>Returns the smaller of two 16-bit unsigned integers.</summary>\r\n            <returns>Parameter a or b, whichever is smaller.</returns>\r\n            <param name=\"a\">The first of two 16-bit unsigned integers to compare.</param>\r\n            <param name=\"b\">The second of two 16-bit unsigned integers to compare.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.AtMost(System.UInt32,System.UInt32)\">\r\n            <summary>Returns the smaller of two 32-bit unsigned integers.</summary>\r\n            <returns>Parameter a or b, whichever is smaller.</returns>\r\n            <param name=\"a\">The first of two 32-bit unsigned integers to compare.</param>\r\n            <param name=\"b\">The second of two 32-bit unsigned integers to compare.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.AtMost(System.UInt64,System.UInt64)\">\r\n            <summary>Returns the smaller of two 64-bit unsigned integers.</summary>\r\n            <returns>Parameter a or b, whichever is smaller.</returns>\r\n            <param name=\"a\">The first of two 64-bit unsigned integers to compare.</param>\r\n            <param name=\"b\">The second of two 64-bit unsigned integers to compare.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Clamp(System.Byte,System.Byte,System.Byte)\">\r\n            <summary>Returns the value constrained inclusively between two 8-bit unsigned integers.</summary>\r\n            <returns>A value between a and b inclusively.</returns>\r\n            <param name=\"value\">The value to restrict between a and b.</param>\r\n            <param name=\"a\">The first of two 8-bit unsigned integers to compare.</param>\r\n            <param name=\"b\">The second of two 8-bit unsigned integers to compare.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Clamp(System.Decimal,System.Decimal,System.Decimal)\">\r\n            <summary>Returns the value constrained inclusively between two decimal numbers.</summary>\r\n            <returns>A value between a and b inclusively.</returns>\r\n            <param name=\"value\">The value to restrict between a and b.</param>\r\n            <param name=\"a\">The first of two <see cref=\"T:System.Decimal\"/> numbers to compare.</param>\r\n            <param name=\"b\">The second of two <see cref=\"T:System.Decimal\"/> numbers to compare.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Clamp(System.Double,System.Double,System.Double)\">\r\n            <summary>Returns the value constrained inclusively between two double-precision floating-point numbers.</summary>\r\n            <returns>A value between a and b inclusively. If a, b, or both a and b are equal to <see cref=\"F:System.Double.NaN\"/>, <see cref=\"F:System.Double.NaN\"/> is returned.</returns>\r\n            <param name=\"value\">The value to restrict between a and b.</param>\r\n            <param name=\"a\">The first of two double-precision floating-point numbers to compare.</param>\r\n            <param name=\"b\">The second of two double-precision floating-point numbers to compare.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Clamp(System.Single,System.Single,System.Single)\">\r\n            <summary>Returns the value constrained inclusively between two single-precision floating-point numbers.</summary>\r\n            <returns>A value between a and b inclusively. If a, b, or both a and b are equal to <see cref=\"F:System.Single.NaN\"/>, <see cref=\"F:System.Single.NaN\"/> is returned.</returns>\r\n            <param name=\"value\">The value to restrict between a and b.</param>\r\n            <param name=\"a\">The first of two single-precision floating-point numbers to compare.</param>\r\n            <param name=\"b\">The second of two single-precision floating-point numbers to compare.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Clamp(System.Int16,System.Int16,System.Int16)\">\r\n            <summary>Returns the value constrained inclusively between two 16-bit signed integers.</summary>\r\n            <returns>A value between a and b inclusively.</returns>\r\n            <param name=\"value\">The value to restrict between a and b.</param>\r\n            <param name=\"a\">The first of two 16-bit signed integers to compare.</param>\r\n            <param name=\"b\">The second of two 16-bit signed integers to compare.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Clamp(System.Int32,System.Int32,System.Int32)\">\r\n            <summary>Returns the value constrained inclusively between two 32-bit signed integers.</summary>\r\n            <returns>A value between a and b inclusively.</returns>\r\n            <param name=\"value\">The value to restrict between a and b.</param>\r\n            <param name=\"a\">The first of two 32-bit signed integers to compare.</param>\r\n            <param name=\"b\">The second of two 32-bit signed integers to compare.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Clamp(System.Int64,System.Int64,System.Int64)\">\r\n            <summary>Returns the value constrained inclusively between two 64-bit signed integers.</summary>\r\n            <returns>A value between a and b inclusively.</returns>\r\n            <param name=\"value\">The value to restrict between a and b.</param>\r\n            <param name=\"a\">The first of two 64-bit signed integers to compare.</param>\r\n            <param name=\"b\">The second of two 64-bit signed integers to compare.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Clamp(System.SByte,System.SByte,System.SByte)\">\r\n            <summary>Returns the value constrained inclusively between two 8-bit signed integers.</summary>\r\n            <returns>A value between a and b inclusively.</returns>\r\n            <param name=\"value\">The value to restrict between a and b.</param>\r\n            <param name=\"a\">The first of two 8-bit signed integers to compare.</param>\r\n            <param name=\"b\">The second of two 8-bit signed integers to compare.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Clamp(System.UInt16,System.UInt16,System.UInt16)\">\r\n            <summary>Returns the value constrained inclusively between two 16-bit unsigned integers.</summary>\r\n            <returns>A value between a and b inclusively.</returns>\r\n            <param name=\"value\">The value to restrict between a and b.</param>\r\n            <param name=\"a\">The first of two 16-bit unsigned integers to compare.</param>\r\n            <param name=\"b\">The second of two 16-bit unsigned integers to compare.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Clamp(System.UInt32,System.UInt32,System.UInt32)\">\r\n            <summary>Returns the value constrained inclusively between two 32-bit unsigned integers.</summary>\r\n            <returns>A value between a and b inclusively.</returns>\r\n            <param name=\"value\">The value to restrict between a and b.</param>\r\n            <param name=\"a\">The first of two 32-bit unsigned integers to compare.</param>\r\n            <param name=\"b\">The second of two 32-bit unsigned integers to compare.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Clamp(System.UInt64,System.UInt64,System.UInt64)\">\r\n            <summary>Returns the value constrained inclusively between two 64-bit unsigned integers.</summary>\r\n            <returns>A value between a and b inclusively.</returns>\r\n            <param name=\"value\">The value to restrict between a and b.</param>\r\n            <param name=\"a\">The first of two 64-bit unsigned integers to compare.</param>\r\n            <param name=\"b\">The second of two 64-bit unsigned integers to compare.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Round(System.Decimal)\">\r\n            <summary>Rounds a decimal value to the nearest integer.</summary>\r\n            <returns>The integer nearest parameter value. If value is halfway between two integers, one of which is even and the other odd, then the even number is returned.</returns>\r\n            <param name=\"value\">A decimal number to be rounded.</param>\r\n            <exception cref=\"T:System.OverflowException\">The result is outside the range of a <see cref=\"T:System.Decimal\"/>.</exception>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Round(System.Double)\">\r\n            <summary>Rounds a double-precision floating-point value to the nearest integer.</summary>\r\n            <returns>The integer nearest value. If value is halfway between two integers, one of which is even and the other odd, then the even number is returned.</returns>\r\n            <param name=\"value\">A double-precision floating-point number to be rounded.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Round(System.Decimal,System.Int32)\">\r\n            <summary>Rounds a decimal value to a specified precision.</summary>\r\n            <returns>The number nearest value with a precision equal to decimals. If value is halfway between two numbers, one of which is even and the other odd, then the even number is returned. If the precision of value is less than decimals, then value is returned unchanged.</returns>\r\n            <param name=\"value\">A decimal number to be rounded.</param>\r\n            <param name=\"decimals\">The number of significant decimal places  (precision) in the return value.</param>\r\n            <exception cref=\"T:System.OverflowException\">The result is outside the range of a <see cref=\"T:System.Decimal\"/>.</exception>\r\n            <exception cref=\"T:System.ArgumentOutOfRangeException\">decimals is less than 0 or greater than 28.</exception>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Round(System.Decimal,System.MidpointRounding)\">\r\n            <summary>Rounds a decimal value to the nearest integer. A parameter specifies how to round the value if it is midway between two other numbers.</summary>\r\n            <returns>The integer nearest value. If value is halfway between two numbers, one of which is even and the other odd, then mode determines which of the two is returned.</returns>\r\n            <param name=\"value\">A decimal number to be rounded.</param>\r\n            <param name=\"mode\">Specification for how to round value if it is midway between two other numbers.</param>\r\n            <exception cref=\"T:System.OverflowException\">The result is outside the range of a <see cref=\"T:System.Decimal\"/>.</exception>\r\n            <exception cref=\"T:System.ArgumentException\">mode is not a valid value of <see cref=\"T:System.MidpointRounding\"/>.</exception>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Round(System.Double,System.Int32)\">\r\n            <summary>Rounds a double-precision floating-point value to the specified precision.</summary>\r\n            <returns>The number nearest value with a precision equal to digits. If value is halfway between two numbers, one of which is even and the other odd, then the even number is returned. If the precision of value is less than digits, then value is returned unchanged.</returns>\r\n            <param name=\"digits\">The number of significant digits (precision) in the return value.</param>\r\n            <param name=\"value\">A double-precision floating-point number to be rounded.</param>\r\n            <exception cref=\"T:System.ArgumentOutOfRangeException\">digits is less than 0 or greater than 15.</exception>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Round(System.Double,System.MidpointRounding)\">\r\n            <summary>Rounds a double-precision floating-point value to the nearest integer. A parameter specifies how to round the value if it is midway between two other numbers.</summary>\r\n            <returns>The integer nearest value. If value is halfway between two integers, one of which is even and the other odd, then mode determines which of the two is returned.</returns>\r\n            <param name=\"mode\">Specification for how to round value if it is midway between two other numbers.</param>\r\n            <param name=\"value\">A double-precision floating-point number to be rounded.</param>\r\n            <exception cref=\"T:System.ArgumentException\">mode is not a valid value of <see cref=\"T:System.MidpointRounding\"/>.</exception>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Round(System.Decimal,System.Int32,System.MidpointRounding)\">\r\n            <summary>Rounds a decimal value to a specified precision. A parameter specifies how to round the value if it is midway between two other numbers.</summary>\r\n            <returns>The number nearest value with a precision equal to decimals. If value is halfway between two numbers, one of which is even and the other odd, then mode determines which of the two numbers is returned. If the precision of value is less than decimals, then value is returned unchanged.</returns>\r\n            <param name=\"value\">A decimal number to be rounded.</param>\r\n            <param name=\"mode\">Specification for how to round value if it is midway between two other numbers.</param>\r\n            <param name=\"decimals\">The number of significant decimal places  (precision) in the return value.</param>\r\n            <exception cref=\"T:System.OverflowException\">The result is outside the range of a <see cref=\"T:System.Decimal\"/>.</exception>\r\n            <exception cref=\"T:System.ArgumentOutOfRangeException\">decimals is less than 0 or greater than 28.</exception>\r\n            <exception cref=\"T:System.ArgumentException\">mode is not a valid value of <see cref=\"T:System.MidpointRounding\"/>.</exception>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Round(System.Double,System.Int32,System.MidpointRounding)\">\r\n            <summary>Rounds a double-precision floating-point value to the specified precision. A parameter specifies how to round the value if it is midway between two other numbers.</summary>\r\n            <returns>The number nearest value with a precision equal to digits. If value is halfway between two numbers, one of which is even and the other odd, then the mode parameter determines which number is returned. If the precision of value is less than digits, then value is returned unchanged.</returns>\r\n            <param name=\"mode\">Specification for how to round value if it is midway between two other numbers.</param>\r\n            <param name=\"digits\">The number of significant digits (precision) in the return value.</param>\r\n            <param name=\"value\">A double-precision floating-point number to be rounded.</param>\r\n            <exception cref=\"T:System.ArgumentOutOfRangeException\">digits is less than 0 or greater than 15.</exception>\r\n            <exception cref=\"T:System.ArgumentException\">mode is not a valid value of <see cref=\"T:System.MidpointRounding\"/>.</exception>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.RoundUp(System.Decimal,System.Decimal)\">\r\n            <summary>Rounds a decimal value to the next multiple of the specified factor.</summary>\r\n            <returns>The nearest multiple of factor that is greater than or equal to value.</returns>\r\n            <param name=\"value\">A decimal number to be rounded.</param>\r\n            <param name=\"factor\">The factor to round the value to.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.RoundUp(System.Double,System.Double)\">\r\n            <summary>Rounds a double-precision floating-point value to the next multiple of the specified factor.</summary>\r\n            <returns>The nearest multiple of factor that is greater than or equal to value.</returns>\r\n            <param name=\"value\">A double-precision floating-point number to be rounded.</param>\r\n            <param name=\"factor\">The factor to round the value to.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.RoundUp(System.Single,System.Single)\">\r\n            <summary>Rounds a single-precision floating-point value to the next multiple of the specified factor.</summary>\r\n            <returns>The nearest multiple of factor that is greater than or equal to value.</returns>\r\n            <param name=\"value\">A single-precision floating-point number to be rounded.</param>\r\n            <param name=\"factor\">The factor to round the value to.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.RoundUp(System.Int64,System.Int64)\">\r\n            <summary>Rounds a 64-bit signed integer to the next multiple of the specified factor.</summary>\r\n            <returns>The nearest multiple of factor that is greater than or equal to value.</returns>\r\n            <param name=\"value\">A 64-bit signed integer to be rounded.</param>\r\n            <param name=\"factor\">The factor to round the value to.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.RoundUp(System.Int32,System.Int32)\">\r\n            <summary>Rounds a 32-bit signed integer to the next multiple of the specified factor.</summary>\r\n            <returns>The nearest multiple of factor that is greater than or equal to value.</returns>\r\n            <param name=\"value\">A 32-bit signed integer to be rounded.</param>\r\n            <param name=\"factor\">The factor to round the value to.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.RoundUp(System.Int16,System.Int16)\">\r\n            <summary>Rounds a 16-bit signed integer to the next multiple of the specified factor.</summary>\r\n            <returns>The nearest multiple of factor that is greater than or equal to value.</returns>\r\n            <param name=\"value\">A 16-bit signed integer to be rounded.</param>\r\n            <param name=\"factor\">The factor to round the value to.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.RoundUp(System.Byte,System.Byte)\">\r\n            <summary>Rounds a 8-bit signed integer to the next multiple of the specified factor.</summary>\r\n            <returns>The nearest multiple of factor that is greater than or equal to value.</returns>\r\n            <param name=\"value\">A 8-bit signed integer to be rounded.</param>\r\n            <param name=\"factor\">The factor to round the value to.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.RoundUp(System.Decimal)\">\r\n            <summary>Rounds a decimal value to the next integer.</summary>\r\n            <returns>The nearest integer that is greater than or equal to value.</returns>\r\n            <param name=\"value\">A decimal number to be rounded.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.RoundUp(System.Double)\">\r\n            <summary>Rounds a double-precision floating-point value to the next integer.</summary>\r\n            <returns>The nearest integer that is greater than or equal to value.</returns>\r\n            <param name=\"value\">A double-precision floating-point number to be rounded.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.RoundUp(System.Single)\">\r\n            <summary>Rounds a single-precision floating-point value to the next integer.</summary>\r\n            <returns>The nearest integer that is greater than or equal to value.</returns>\r\n            <param name=\"value\">A single-precision floating-point number to be rounded.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.RoundUp(System.Int64)\">\r\n            <summary>Rounds a 64-bit signed integer to the next integer.</summary>\r\n            <returns>The nearest integer that is greater than or equal to value.</returns>\r\n            <param name=\"value\">A 64-bit signed integer to be rounded.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.RoundUp(System.Int32)\">\r\n            <summary>Rounds a 32-bit signed integer to the next integer.</summary>\r\n            <returns>The nearest integer that is greater than or equal to value.</returns>\r\n            <param name=\"value\">A 32-bit signed integer to be rounded.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.RoundUp(System.Int16)\">\r\n            <summary>Rounds a 16-bit signed integer to the next integer.</summary>\r\n            <returns>The nearest integer that is greater than or equal to value.</returns>\r\n            <param name=\"value\">A 16-bit signed integer to be rounded.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.RoundUp(System.Byte)\">\r\n            <summary>Rounds a 8-bit signed integer to the next integer.</summary>\r\n            <returns>The nearest integer that is greater than or equal to value.</returns>\r\n            <param name=\"value\">A 8-bit signed integer to be rounded.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.RoundDown(System.Decimal,System.Decimal)\">\r\n            <summary>Rounds a decimal value to the previous multiple of the specified factor.</summary>\r\n            <returns>The nearest multiple of factor that is less than or equal to value.</returns>\r\n            <param name=\"value\">A decimal number to be rounded.</param>\r\n            <param name=\"factor\">The factor to round the value to.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.RoundDown(System.Double,System.Double)\">\r\n            <summary>Rounds a double-precision floating-point value to the previous multiple of the specified factor.</summary>\r\n            <returns>The nearest multiple of factor that is less than or equal to value.</returns>\r\n            <param name=\"value\">A double-precision floating-point number to be rounded.</param>\r\n            <param name=\"factor\">The factor to round the value to.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.RoundDown(System.Single,System.Single)\">\r\n            <summary>Rounds a single-precision floating-point value to the previous multiple of the specified factor.</summary>\r\n            <returns>The nearest multiple of factor that is less than or equal to value.</returns>\r\n            <param name=\"value\">A single-precision floating-point number to be rounded.</param>\r\n            <param name=\"factor\">The factor to round the value to.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.RoundDown(System.Int64,System.Int64)\">\r\n            <summary>Rounds a 64-bit signed integer to the previous multiple of the specified factor.</summary>\r\n            <returns>The nearest multiple of factor that is less than or equal to value.</returns>\r\n            <param name=\"value\">A 64-bit signed integer to be rounded.</param>\r\n            <param name=\"factor\">The factor to round the value to.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.RoundDown(System.Int32,System.Int32)\">\r\n            <summary>Rounds a 32-bit signed integer to the previous multiple of the specified factor.</summary>\r\n            <returns>The nearest multiple of factor that is less than or equal to value.</returns>\r\n            <param name=\"value\">A 32-bit signed integer to be rounded.</param>\r\n            <param name=\"factor\">The factor to round the value to.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.RoundDown(System.Int16,System.Int16)\">\r\n            <summary>Rounds a 16-bit signed integer to the previous multiple of the specified factor.</summary>\r\n            <returns>The nearest multiple of factor that is less than or equal to value.</returns>\r\n            <param name=\"value\">A 16-bit signed integer to be rounded.</param>\r\n            <param name=\"factor\">The factor to round the value to.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.RoundDown(System.Byte,System.Byte)\">\r\n            <summary>Rounds an 8-bit unsigned integer to the previous multiple of the specified factor.</summary>\r\n            <returns>The nearest multiple of factor that is less than or equal to value.</returns>\r\n            <param name=\"value\">An 8-bit unsigned integer to be rounded.</param>\r\n            <param name=\"factor\">The factor to round the value to.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.RoundDown(System.Decimal)\">\r\n            <summary>Rounds a decimal value to the previous integer.</summary>\r\n            <returns>The nearest integer that is less than or equal to value.</returns>\r\n            <param name=\"value\">A decimal number to be rounded.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.RoundDown(System.Double)\">\r\n            <summary>Rounds a double-precision floating-point value to the previous integer.</summary>\r\n            <returns>The nearest integer that is less than or equal to value.</returns>\r\n            <param name=\"value\">A double-precision floating-point number to be rounded.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.RoundDown(System.Single)\">\r\n            <summary>Rounds a single-precision floating-point value to the previous integer.</summary>\r\n            <returns>The nearest integer that is less than or equal to value.</returns>\r\n            <param name=\"value\">A single-precision floating-point number to be rounded.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.RoundDown(System.Int64)\">\r\n            <summary>Rounds a 64-bit signed integer to the previous integer.</summary>\r\n            <returns>The nearest integer that is less than or equal to value.</returns>\r\n            <param name=\"value\">A 64-bit signed integer to be rounded.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.RoundDown(System.Int32)\">\r\n            <summary>Rounds a 32-bit signed integer to the previous integer.</summary>\r\n            <returns>The nearest integer that is less than or equal to value.</returns>\r\n            <param name=\"value\">A 32-bit signed integer to be rounded.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.RoundDown(System.Int16)\">\r\n            <summary>Rounds a 16-bit signed integer to the previous integer.</summary>\r\n            <returns>The nearest integer that is less than or equal to value.</returns>\r\n            <param name=\"value\">A 16-bit signed integer to be rounded.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.RoundDown(System.Byte)\">\r\n            <summary>Rounds an 8-bit unsigned integer to the previous integer.</summary>\r\n            <returns>The nearest integer that is less than or equal to value.</returns>\r\n            <param name=\"value\">An 8-bit unsigned integer to be rounded.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Truncate(System.Decimal)\">\r\n            <summary>Calculates the integral part of a specified decimal number.</summary>\r\n            <returns>The integral part of value; that is, the number that remains after any fractional digits have been discarded.</returns>\r\n            <param name=\"value\">A number to truncate.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Truncate(System.Double)\">\r\n            <summary>Calculates the integral part of a specified double-precision floating-point number.</summary>\r\n            <returns>The integral part of value; that is, the number that remains after any fractional digits have been discarded.</returns>\r\n            <param name=\"value\">A number to truncate.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Abs(System.Decimal)\">\r\n            <summary>Returns the absolute value of a <see cref=\"T:System.Decimal\"/> number.</summary>\r\n            <returns>A <see cref=\"T:System.Decimal\"/>, x, such that 0 ≤ x ≤ <see cref=\"F:System.Decimal.MaxValue\"/>.</returns>\r\n            <param name=\"value\">A number in the range <see cref=\"F:System.Decimal.MinValue\"/> ≤ value ≤ <see cref=\"F:System.Decimal.MaxValue\"/>.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Abs(System.Double)\">\r\n            <summary>Returns the absolute value of a double-precision floating-point number.</summary>\r\n            <returns>A double-precision floating-point number, x, such that 0 ≤ x ≤ <see cref=\"F:System.Double.MaxValue\"/>.</returns>\r\n            <param name=\"value\">A number in the range <see cref=\"F:System.Double.MinValue\"/> ≤ value ≤ <see cref=\"F:System.Double.MaxValue\"/>.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Abs(System.Single)\">\r\n            <summary>Returns the absolute value of a single-precision floating-point number.</summary>\r\n            <returns>A single-precision floating-point number, x, such that 0 ≤ x ≤ <see cref=\"F:System.Single.MaxValue\"/>.</returns>\r\n            <param name=\"value\">A number in the range <see cref=\"F:System.Single.MinValue\"/> ≤ value ≤ <see cref=\"F:System.Single.MaxValue\"/>.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Abs(System.Int16)\">\r\n            <summary>Returns the absolute value of a 16-bit signed integer.</summary>\r\n            <returns>A 16-bit signed integer, x, such that 0 ≤ x ≤ <see cref=\"F:System.Int16.MaxValue\"/>.</returns>\r\n            <param name=\"value\">A number in the range <see cref=\"F:System.Int16.MinValue\"/> &lt; value ≤ <see cref=\"F:System.Int16.MaxValue\"/>.</param>\r\n            <exception cref=\"T:System.OverflowException\">value equals <see cref=\"F:System.Int16.MinValue\"/>.</exception>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Abs(System.Int32)\">\r\n            <summary>Returns the absolute value of a 32-bit signed integer.</summary>\r\n            <returns>A 32-bit signed integer, x, such that 0 ≤ x ≤ <see cref=\"F:System.Int32.MaxValue\"/>.</returns>\r\n            <param name=\"value\">A number in the range <see cref=\"F:System.Int32.MinValue\"/> &lt; value ≤ <see cref=\"F:System.Int32.MaxValue\"/>.</param>\r\n            <exception cref=\"T:System.OverflowException\">value equals <see cref=\"F:System.Int32.MinValue\"/>.</exception>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Abs(System.Int64)\">\r\n            <summary>Returns the absolute value of a 64-bit signed integer.</summary>\r\n            <returns>A 64-bit signed integer, x, such that 0 ≤ x ≤ <see cref=\"F:System.Int64.MaxValue\"/>.</returns>\r\n            <param name=\"value\">A number in the range <see cref=\"F:System.Int64.MinValue\"/> &lt; value ≤ <see cref=\"F:System.Int64.MaxValue\"/>.</param>\r\n            <exception cref=\"T:System.OverflowException\">value equals <see cref=\"F:System.Int64.MinValue\"/>.</exception>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Abs(System.SByte)\">\r\n            <summary>Returns the absolute value of an 8-bit signed integer.</summary>\r\n            <returns>An 8-bit signed integer, x, such that 0 ≤ x ≤ <see cref=\"F:System.SByte.MaxValue\"/>.</returns>\r\n            <param name=\"value\">A number in the range <see cref=\"F:System.SByte.MinValue\"/> &lt; value ≤ <see cref=\"F:System.SByte.MaxValue\"/>.</param>\r\n            <exception cref=\"T:System.OverflowException\">value equals <see cref=\"F:System.SByte.MinValue\"/>.</exception>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.BigMul(System.Int32,System.Int32)\">\r\n            <summary>Produces the full product of two 32-bit numbers.</summary>\r\n            <returns>The <see cref=\"T:System.Int64\"/> containing the product of the specified numbers.</returns>\r\n            <param name=\"a\">The first <see cref=\"T:System.Int32\"/> to multiply.</param>\r\n            <param name=\"b\">The second <see cref=\"T:System.Int32\"/> to multiply.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.DivRem(System.Int32,System.Int32,System.Int32@)\">\r\n            <summary>Calculates the quotient of two 32-bit signed integers and also returns the remainder in an output parameter.</summary>\r\n            <returns>The <see cref=\"T:System.Int32\"/> containing the quotient of the specified numbers.</returns>\r\n            <param name=\"a\">The <see cref=\"T:System.Int32\"/> that contains the dividend.</param>\r\n            <param name=\"result\">The <see cref=\"T:System.Int32\"/> that receives the remainder.</param>\r\n            <param name=\"b\">The <see cref=\"T:System.Int32\"/> that contains the divisor.</param>\r\n            <exception cref=\"T:System.DivideByZeroException\">b is zero.</exception>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.DivRem(System.Int64,System.Int64,System.Int64@)\">\r\n            <summary>Calculates the quotient of two 64-bit signed integers and also returns the remainder in an output parameter.</summary>\r\n            <returns>The <see cref=\"T:System.Int64\"/> containing the quotient of the specified numbers.</returns>\r\n            <param name=\"a\">The <see cref=\"T:System.Int64\"/> that contains the dividend.</param>\r\n            <param name=\"result\">The <see cref=\"T:System.Int64\"/> that receives the remainder.</param>\r\n            <param name=\"b\">The <see cref=\"T:System.Int64\"/> that contains the divisor.</param>\r\n            <exception cref=\"T:System.DivideByZeroException\">b is zero.</exception>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Exp(System.Double)\">\r\n            <summary>Returns e raised to the specified power.</summary>\r\n            <returns>The number e raised to the power value. If value equals <see cref=\"F:System.Double.NaN\"/> or <see cref=\"F:System.Double.PositiveInfinity\"/>, that value is returned. If value equals <see cref=\"F:System.Double.NegativeInfinity\"/>, 0 is returned.</returns>\r\n            <param name=\"value\">A number specifying a power.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.IEEERemainder(System.Double,System.Double)\">\r\n            <summary>Returns the remainder resulting from the division of a specified number by another specified number.</summary>\r\n            <returns>A number equal to x - (y Q), where Q is the quotient of x / y rounded to the nearest integer (if x / y falls halfway between two integers, the even integer is returned).If x - (y Q) is zero, the value +0 is returned if x is positive, or -0 if x is negative. If y = 0, <see cref=\"F:System.Double.NaN\"/> (Not-A-Number) is returned.</returns>\r\n            <param name=\"y\">A divisor.</param>\r\n            <param name=\"x\">A dividend.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Log(System.Double)\">\r\n            <summary>Returns the natural (base e) logarithm of a specified number.</summary>\r\n            <returns>See <see cref=\"M:System.Math.Log(System.Double)\"/> for details.</returns>\r\n            <param name=\"value\">A number whose logarithm is to be found.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Log(System.Double,System.Double)\">\r\n            <summary>Returns the logarithm of a specified number in a specified base.</summary>\r\n            <returns>See <see cref=\"M:System.Math.Log(System.Double)\"/> for details.</returns>\r\n            <param name=\"value\">A number whose logarithm is to be found.</param>\r\n            <param name=\"newBase\">The base of the logarithm.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Log10(System.Double)\">\r\n            <summary>Returns the base 10 logarithm of a specified number.</summary>\r\n            <returns>See <see cref=\"M:System.Math.Log10(System.Double)\"/> for details.</returns>\r\n            <param name=\"value\">A number whose logarithm is to be found.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Pow(System.Double,System.Double)\">\r\n            <summary>Returns a specified number raised to the specified power.</summary>\r\n            <returns>The number x raised to the power y. See <see cref=\"M:System.Math.Pow(System.Double,System.Double)\"/> for details.</returns>\r\n            <param name=\"y\">A double-precision floating-point number that specifies a power.</param>\r\n            <param name=\"x\">A double-precision floating-point number to be raised to a power.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Sign(System.Decimal)\">\r\n            <summary>Returns a value indicating the sign of a decimal number.</summary>\r\n            <returns>A number indicating the sign of value.Number Description -1 value is less than zero. 0 value is equal to zero. 1 value is greater than zero.</returns>\r\n            <param name=\"value\">A signed <see cref=\"T:System.Decimal\"/> number.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Sign(System.Double)\">\r\n            <summary>Returns a value indicating the sign of a double-precision floating-point number.</summary>\r\n            <returns>A number indicating the sign of value.Number Description -1 value is less than zero. 0 value is equal to zero. 1 value is greater than zero.</returns>\r\n            <param name=\"value\">A signed number.</param>\r\n            <exception cref=\"T:System.ArithmeticException\">value is equal to <see cref=\"F:System.Double.NaN\"/>.</exception>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Sign(System.Single)\">\r\n            <summary>Returns a value indicating the sign of a single-precision floating-point number.</summary>\r\n            <returns>A number indicating the sign of value.Number Description -1 value is less than zero. 0 value is equal to zero. 1 value is greater than zero.</returns>\r\n            <param name=\"value\">A signed number.</param>\r\n            <exception cref=\"T:System.ArithmeticException\">value is equal to <see cref=\"F:System.Single.NaN\"/>.</exception>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Sign(System.Int16)\">\r\n            <summary>Returns a value indicating the sign of a 16-bit signed integer.</summary>\r\n            <returns>A number indicating the sign of value.Number Description -1 value is less than zero. 0 value is equal to zero. 1 value is greater than zero.</returns>\r\n            <param name=\"value\">A signed number.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Sign(System.Int32)\">\r\n            <summary>Returns a value indicating the sign of a 32-bit signed integer.</summary>\r\n            <returns>A number indicating the sign of value.Number Description -1 value is less than zero. 0 value is equal to zero. 1 value is greater than zero.</returns>\r\n            <param name=\"value\">A signed number.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Sign(System.Int64)\">\r\n            <summary>Returns a value indicating the sign of a 64-bit signed integer.</summary>\r\n            <returns>A number indicating the sign of value.Number Description -1 value is less than zero. 0 value is equal to zero. 1 value is greater than zero.</returns>\r\n            <param name=\"value\">A signed number.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Sign(System.SByte)\">\r\n            <summary>Returns a value indicating the sign of an 8-bit signed integer.</summary>\r\n            <returns>A number indicating the sign of value.Number Description -1 value is less than zero. 0 value is equal to zero. 1 value is greater than zero.</returns>\r\n            <param name=\"value\">A signed number.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Sqrt(System.Double)\">\r\n            <summary>Returns the square root of a specified number.</summary>\r\n            <returns><see cref=\"M:System.Math.Sqrt(System.Double)\"/> for details.</returns>\r\n            <param name=\"value\">A number.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.IsBetween(System.Decimal,System.Decimal,System.Decimal)\">\r\n            <summary>Determines whether a decimal value is inclusively between two values.</summary>\r\n            <returns>A boolean representing whether value is inclusively between a and b.</returns>\r\n            <param name=\"value\">A decimal value to compare.</param>\r\n            <param name=\"a\">The first bound to compare value against.</param>\r\n            <param name=\"b\">The second bound to compare value against.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.IsBetween(System.Double,System.Double,System.Double)\">\r\n            <summary>Determines whether a double-precision floating-point value is inclusively between two values.</summary>\r\n            <returns>A boolean representing whether value is inclusively between a and b.</returns>\r\n            <param name=\"value\">A double-precision floating-point value to compare.</param>\r\n            <param name=\"a\">The first bound to compare value against.</param>\r\n            <param name=\"b\">The second bound to compare value against.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.IsBetween(System.Single,System.Single,System.Single)\">\r\n            <summary>Determines whether a single-precision floating-point value is inclusively between two values.</summary>\r\n            <returns>A boolean representing whether value is inclusively between a and b.</returns>\r\n            <param name=\"value\">A double-precision floating-point value to compare.</param>\r\n            <param name=\"a\">The first bound to compare value against.</param>\r\n            <param name=\"b\">The second bound to compare value against.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.IsBetween(System.Int64,System.Int64,System.Int64)\">\r\n            <summary>Determines whether a 64-bit signed integer is inclusively between two values.</summary>\r\n            <returns>A boolean representing whether value is inclusively between a and b.</returns>\r\n            <param name=\"value\">A 64-bit signed integer to compare.</param>\r\n            <param name=\"a\">The first bound to compare value against.</param>\r\n            <param name=\"b\">The second bound to compare value against.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.IsBetween(System.Int32,System.Int32,System.Int32)\">\r\n            <summary>Determines whether a 32-bit signed integer is inclusively between two values.</summary>\r\n            <returns>A boolean representing whether value is inclusively between a and b.</returns>\r\n            <param name=\"value\">A 32-bit signed integer to compare.</param>\r\n            <param name=\"a\">The first bound to compare value against.</param>\r\n            <param name=\"b\">The second bound to compare value against.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.IsBetween(System.Int16,System.Int16,System.Int16)\">\r\n            <summary>Determines whether a 16-bit signed integer is inclusively between two values.</summary>\r\n            <returns>A boolean representing whether value is inclusively between a and b.</returns>\r\n            <param name=\"value\">A 16-bit signed integer to compare.</param>\r\n            <param name=\"a\">The first bound to compare value against.</param>\r\n            <param name=\"b\">The second bound to compare value against.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.IsBetween(System.Byte,System.Byte,System.Byte)\">\r\n            <summary>Determines whether an 8-bit unsigned integer is inclusively between two values.</summary>\r\n            <returns>A boolean representing whether value is inclusively between a and b.</returns>\r\n            <param name=\"value\">An 8-bit unsigned integer to compare.</param>\r\n            <param name=\"a\">The first bound to compare value against.</param>\r\n            <param name=\"b\">The second bound to compare value against.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.IsNaN(System.Double)\">\r\n            <summary>Returns a value indicating whether the specified number evaluates to a value that is not a number (<see cref=\"F:System.Double.NaN\"/>).</summary>\r\n            <returns>true if value evaluates to <see cref=\"F:System.Double.NaN\"/>; otherwise, false.</returns>\r\n            <param name=\"value\">A double-precision floating-point number. </param>\r\n            <filterpriority>1</filterpriority>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.IsNaN(System.Single)\">\r\n            <summary>Returns a value indicating whether the specified number evaluates to not a number (<see cref=\"F:System.Single.NaN\"/>).</summary>\r\n            <returns>true if value evaluates to not a number (<see cref=\"F:System.Single.NaN\"/>); otherwise, false.</returns>\r\n            <param name=\"f\">A single-precision floating-point number. </param>\r\n            <filterpriority>1</filterpriority>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.GetValueOrDefault(System.Double)\">\r\n            <summary>Retrieves the value of the specified number, or zero if it's not a number (<see cref=\"F:System.Double.NaN\"/>).</summary>\r\n            <returns>The value of the <paramref name=\"value\"/> parameter if it doesn't evaluate to <see cref=\"F:System.Double.NaN\"/>; otherwise, 0.0.</returns>\r\n            <param name=\"value\">A double-precision floating-point number. </param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.GetValueOrDefault(System.Double,System.Double)\">\r\n            <summary>Retrieves the value of the specified number, or the specified default value if it's not a number (<see cref=\"F:System.Double.NaN\"/>).</summary>\r\n            <returns>The value of the <paramref name=\"value\"/> parameter if it doesn't evaluate to <see cref=\"F:System.Double.NaN\"/>; otherwise, the <paramref name=\"defaultValue\"/> parameter.</returns>\r\n            <param name=\"value\">A double-precision floating-point number. </param>\r\n            <param name=\"defaultValue\">The value to return if <see cref=\"M:System.Windows.Controls.Extensions.MathExtensions.IsNaN(System.Double)\"/> returns true.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.GetValueOrDefault(System.Single)\">\r\n            <summary>Retrieves the value of the specified number, or zero if it's not a number (<see cref=\"F:System.Single.NaN\"/>).</summary>\r\n            <returns>The value of the <paramref name=\"value\"/> parameter if it doesn't evaluate to <see cref=\"F:System.Single.NaN\"/>; otherwise, 0.0.</returns>\r\n            <param name=\"value\">A single-precision floating-point number. </param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.GetValueOrDefault(System.Single,System.Single)\">\r\n            <summary>Retrieves the value of the specified number, or the specified default value if it's not a number (<see cref=\"F:System.Single.NaN\"/>).</summary>\r\n            <returns>The value of the <paramref name=\"value\"/> parameter if it doesn't evaluate to <see cref=\"F:System.Single.NaN\"/>; otherwise, the <paramref name=\"defaultValue\"/> parameter.</returns>\r\n            <param name=\"value\">A single-precision floating-point number. </param>\r\n            <param name=\"defaultValue\">The value to return if <see cref=\"M:System.Windows.Controls.Extensions.MathExtensions.IsNaN(System.Double)\"/> returns true.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Acos(System.Double)\">\r\n            <summary>Returns the angle whose cosine is the specified number.</summary>\r\n            <returns>An angle, θ, measured in radians, such that 0 ≤ θ ≤ π -or- <see cref=\"F:System.Double.NaN\"/> if value &lt; -1 or value &gt; 1.</returns>\r\n            <param name=\"value\">A number representing a cosine, where -1 ≤ value ≤ 1.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Asin(System.Double)\">\r\n            <summary>Returns the angle whose sine is the specified number.</summary>\r\n            <returns>An angle, θ, measured in radians, such that -π/2 ≤ θ ≤ π/2 -or- <see cref=\"F:System.Double.NaN\"/> if value &lt; -1 or value &gt; 1.</returns>\r\n            <param name=\"value\">A number representing a sine, where -1 ≤ value ≤ 1.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Atan(System.Double)\">\r\n            <summary>Returns the angle whose tangent is the specified number.</summary>\r\n            <returns>An angle, θ, measured in radians, such that -π/2 ≤ θ ≤ π/2 -or- <see cref=\"F:System.Double.NaN\"/> if value equals <see cref=\"F:System.Double.NaN\"/>, -π/2 rounded to double precision (-1.5707963267949) if value equals <see cref=\"F:System.Double.NegativeInfinity\"/>, or π/2 rounded to double precision (1.5707963267949) if value equals <see cref=\"F:System.Double.PositiveInfinity\"/>.</returns>\r\n            <param name=\"value\">A number representing a tangent.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Atan2(System.Double,System.Double)\">\r\n            <summary>Returns the angle whose tangent is the quotient of two specified numbers.</summary>\r\n            <returns>An angle, θ, measured in radians, such that -π ≤ θ ≤ π, and tan(θ) = y / x, where (x, y) is a point in the Cartesian plane. See <see cref=\"M:System.Math.Atan2(System.Double,System.Double)\"/> for details.</returns>\r\n            <param name=\"y\">The y coordinate of a point.</param>\r\n            <param name=\"x\">The x coordinate of a point.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Cos(System.Double)\">\r\n            <summary>Returns the cosine of the specified angle.</summary>\r\n            <returns>The cosine of angle.</returns>\r\n            <param name=\"angle\">An angle, measured in radians.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Cosh(System.Double)\">\r\n            <summary>Returns the hyperbolic cosine of the specified angle.</summary>\r\n            <returns>The hyperbolic cosine of angle. If angle is equal to <see cref=\"F:System.Double.NegativeInfinity\"/> or <see cref=\"F:System.Double.PositiveInfinity\"/>, <see cref=\"F:System.Double.PositiveInfinity\"/> is returned. If angle is equal to <see cref=\"F:System.Double.NaN\"/>, <see cref=\"F:System.Double.NaN\"/> is returned.</returns>\r\n            <param name=\"angle\">An angle, measured in radians.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Sin(System.Double)\">\r\n            <summary>Returns the sine of the specified angle.</summary>\r\n            <returns>The sine of angle. If angle is equal to <see cref=\"F:System.Double.NaN\"/>, <see cref=\"F:System.Double.NegativeInfinity\"/>, or <see cref=\"F:System.Double.PositiveInfinity\"/>, this method returns <see cref=\"F:System.Double.NaN\"/>.</returns>\r\n            <param name=\"angle\">An angle, measured in radians.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Sinh(System.Double)\">\r\n            <summary>Returns the hyperbolic sine of the specified angle.</summary>\r\n            <returns>The hyperbolic sine of angle. If angle is equal to <see cref=\"F:System.Double.NegativeInfinity\"/>, <see cref=\"F:System.Double.PositiveInfinity\"/>, or <see cref=\"F:System.Double.NaN\"/>, this method returns a <see cref=\"T:System.Double\"/> equal to angle.</returns>\r\n            <param name=\"angle\">An angle, measured in radians.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Tan(System.Double)\">\r\n            <summary>Returns the tangent of the specified angle.</summary>\r\n            <returns>The tangent of angle. If angle is equal to <see cref=\"F:System.Double.NaN\"/>, <see cref=\"F:System.Double.NegativeInfinity\"/>, or <see cref=\"F:System.Double.PositiveInfinity\"/>, this method returns <see cref=\"F:System.Double.NaN\"/>.</returns>\r\n            <param name=\"angle\">An angle, measured in radians.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.Tanh(System.Double)\">\r\n            <summary>Returns the hyperbolic tangent of the specified angle.</summary>\r\n            <returns>The hyperbolic tangent of angle. If angle is equal to <see cref=\"F:System.Double.NegativeInfinity\"/>, this method returns -1. If angle is equal to <see cref=\"F:System.Double.PositiveInfinity\"/>, this method returns 1. If angle is equal to <see cref=\"F:System.Double.NaN\"/>, this method returns <see cref=\"F:System.Double.NaN\"/>.</returns>\r\n            <param name=\"angle\">An angle, measured in radians.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.To(System.Decimal,System.Decimal)\">\r\n            <summary>Generates a sequence of decimal numbers within a specified range.</summary>\r\n            <returns>A sequence of numbers from start to (but not including) bound where each number is 1 greater than the previous number.</returns>\r\n            <param name=\"start\">The number to start from.</param>\r\n            <param name=\"bound\">The number to stop before.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.To(System.Decimal,System.Decimal,System.Decimal)\">\r\n            <summary>Generates a sequence of decimal numbers within a specified range.</summary>\r\n            <returns>A sequence of numbers from start to (but not including) bound where each number is a given step greater than the previous number.</returns>\r\n            <param name=\"start\">The number to start from.</param>\r\n            <param name=\"bound\">The number to stop before.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.To(System.Double,System.Double)\">\r\n            <summary>Generates a sequence of double-precision floating-point values within a specified range.</summary>\r\n            <returns>A sequence of numbers from start to (but not including) bound where each number is 1 greater than the previous number.</returns>\r\n            <param name=\"start\">The number to start from.</param>\r\n            <param name=\"bound\">The number to stop before.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.To(System.Double,System.Double,System.Double)\">\r\n            <summary>Generates a sequence of double-precision floating-point values within a specified range.</summary>\r\n            <returns>A sequence of numbers from start to (but not including) bound where each number is a given step greater than the previous number.</returns>\r\n            <param name=\"start\">The number to start from.</param>\r\n            <param name=\"bound\">The number to stop before.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.To(System.Single,System.Single)\">\r\n            <summary>Generates a sequence of single-precision floating-point values within a specified range.</summary>\r\n            <returns>A sequence of numbers from start to (but not including) bound where each number is 1 greater than the previous number.</returns>\r\n            <param name=\"start\">The number to start from.</param>\r\n            <param name=\"bound\">The number to stop before.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.To(System.Single,System.Single,System.Single)\">\r\n            <summary>Generates a sequence of single-precision floating-point values within a specified range.</summary>\r\n            <returns>A sequence of numbers from start to (but not including) bound where each number is a given step greater than the previous number.</returns>\r\n            <param name=\"start\">The number to start from.</param>\r\n            <param name=\"bound\">The number to stop before.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.To(System.Int64,System.Int64)\">\r\n            <summary>Generates a sequence of 64-bit signed integers within a specified range.</summary>\r\n            <returns>A sequence of numbers from start to (but not including) bound where each number is 1 greater than the previous number.</returns>\r\n            <param name=\"start\">The number to start from.</param>\r\n            <param name=\"bound\">The number to stop before.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.To(System.Int64,System.Int64,System.Int64)\">\r\n            <summary>Generates a sequence of 64-bit signed integers within a specified range.</summary>\r\n            <returns>A sequence of numbers from start to (but not including) bound where each number is a given step greater than the previous number.</returns>\r\n            <param name=\"start\">The number to start from.</param>\r\n            <param name=\"bound\">The number to stop before.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.To(System.Int32,System.Int32)\">\r\n            <summary>Generates a sequence of 32-bit signed integers within a specified range.</summary>\r\n            <returns>A sequence of numbers from start to (but not including) bound where each number is 1 greater than the previous number.</returns>\r\n            <param name=\"start\">The number to start from.</param>\r\n            <param name=\"bound\">The number to stop before.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.To(System.Int32,System.Int32,System.Int32)\">\r\n            <summary>Generates a sequence of 32-bit signed integers within a specified range.</summary>\r\n            <returns>A sequence of numbers from start to (but not including) bound where each number is a given step greater than the previous number.</returns>\r\n            <param name=\"start\">The number to start from.</param>\r\n            <param name=\"bound\">The number to stop before.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.To(System.Int16,System.Int16)\">\r\n            <summary>Generates a sequence of 16-bit signed integers within a specified range.</summary>\r\n            <returns>A sequence of numbers from start to (but not including) bound where each number is 1 greater than the previous number.</returns>\r\n            <param name=\"start\">The number to start from.</param>\r\n            <param name=\"bound\">The number to stop before.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.MathExtensions.To(System.Int16,System.Int16,System.Int16)\">\r\n            <summary>Generates a sequence of 16-bit signed integers within a specified range.</summary>\r\n            <returns>A sequence of numbers from start to (but not including) bound where each number is a given step greater than the previous number.</returns>\r\n            <param name=\"start\">The number to start from.</param>\r\n            <param name=\"bound\">The number to stop before.</param>\r\n        </member>\r\n        <member name=\"T:System.Windows.Controls.Extensions.RectExtensions\">\r\n            <summary>\r\n            Provides extension methods for rects.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.RectExtensions.GetCenter(System.Windows.Rect)\">\r\n            <summary>\r\n            Returns the center point of the <see cref=\"T:System.Windows.Rect\"/>.\r\n            </summary>\r\n            <param name=\"rect\">The rect to return the center point of.</param>\r\n            <returns>The center <see cref=\"T:System.Windows.Point\"/> of the <paramref name=\"rect\"/>.</returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.RectExtensions.IsDefined(System.Windows.Rect)\">\r\n            <summary>\r\n            Returns whether the <see cref=\"T:System.Windows.Rect\"/> defines a real area in space.\r\n            </summary>\r\n            <param name=\"rect\">The rect to test.</param>\r\n            <returns><c>true</c> if rect defines an area or point in finite space, which is not the case for <see cref=\"P:System.Windows.Rect.Empty\"/> or if any of the fields are <see cref=\"F:System.Double.NaN\"/>.</returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Extensions.RectExtensions.Intersects(System.Windows.Rect,System.Windows.Rect)\">\r\n            <summary>\r\n            Indicates whether the specified rectangle intersects with the current rectangle, properly considering the empty rect and infinities.\r\n            </summary>\r\n            <param name=\"self\">The current rectangle.</param>\r\n            <param name=\"rect\">The rectangle to check.</param>\r\n            <returns><c>true</c> if the specified rectangle intersects with the current rectangle; otherwise, <c>false</c>.</returns>\r\n        </member>\r\n        <member name=\"T:System.Windows.Controls.InteractionHelper\">\r\n            <summary>\r\n            The InteractionHelper provides controls with support for all of the\r\n            common interactions like mouse movement, mouse clicks, key presses,\r\n            etc., and also incorporates proper event semantics when the control is\r\n            disabled.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.InteractionHelper.SequentialClickThresholdInMilliseconds\">\r\n            <summary>\r\n            The threshold used to determine whether two clicks are temporally\r\n            local and considered a double click (or triple, quadruple, etc.).\r\n            500 milliseconds is the default double click value on Windows.\r\n            This value would ideally be pulled form the system settings.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.InteractionHelper.SequentialClickThresholdInPixelsSquared\">\r\n            <summary>\r\n            The threshold used to determine whether two clicks are spatially\r\n            local and considered a double click (or triple, quadruple, etc.)\r\n            in pixels squared.  We use pixels squared so that we can compare to\r\n            the distance delta without taking a square root.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.InteractionHelper.Control\">\r\n            <summary>\r\n            Gets the control the InteractionHelper is targeting.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.InteractionHelper.IsFocused\">\r\n            <summary>\r\n            Gets a value indicating whether the control has focus.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.InteractionHelper.IsMouseOver\">\r\n            <summary>\r\n            Gets a value indicating whether the mouse is over the control.\r\n            </summary> \r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.InteractionHelper.IsReadOnly\">\r\n            <summary>\r\n            Gets a value indicating whether the read-only property is set.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.InteractionHelper.IsPressed\">\r\n            <summary>\r\n            Gets a value indicating whether the mouse button is pressed down\r\n            over the control.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.InteractionHelper.LastClickTime\">\r\n            <summary>\r\n            Gets or sets the last time the control was clicked.\r\n            </summary>\r\n            <remarks>\r\n            The value is stored as Utc time because it is slightly more\r\n            performant than converting to local time.\r\n            </remarks>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.InteractionHelper.LastClickPosition\">\r\n            <summary>\r\n            Gets or sets the mouse position of the last click.\r\n            </summary>\r\n            <remarks>The value is relative to the control.</remarks>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.InteractionHelper.ClickCount\">\r\n            <summary>\r\n            Gets the number of times the control was clicked.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.InteractionHelper._updateVisualState\">\r\n            <summary>\r\n            Reference used to call UpdateVisualState on the base class.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.InteractionHelper.#ctor(System.Windows.Controls.Control)\">\r\n            <summary>\r\n            Initializes a new instance of the InteractionHelper class.\r\n            </summary>\r\n            <param name=\"control\">Control receiving interaction.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.InteractionHelper.UpdateVisualState(System.Boolean)\">\r\n            <summary>\r\n            Update the visual state of the control.\r\n            </summary>\r\n            <param name=\"useTransitions\">\r\n            A value indicating whether to automatically generate transitions to\r\n            the new state, or instantly transition to the new state.\r\n            </param>\r\n            <remarks>\r\n            UpdateVisualState works differently than the rest of the injected\r\n            functionality.  Most of the other events are overridden by the\r\n            calling class which calls Allow, does what it wants, and then calls\r\n            Base.  UpdateVisualState is the opposite because a number of the\r\n            methods in InteractionHelper need to trigger it in the calling\r\n            class.  We do this using the IUpdateVisualState internal interface.\r\n            </remarks>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.InteractionHelper.UpdateVisualStateBase(System.Boolean)\">\r\n            <summary>\r\n            Update the visual state of the control.\r\n            </summary>\r\n            <param name=\"useTransitions\">\r\n            A value indicating whether to automatically generate transitions to\r\n            the new state, or instantly transition to the new state.\r\n            </param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.InteractionHelper.OnLoaded(System.Object,System.Windows.RoutedEventArgs)\">\r\n            <summary>\r\n            Handle the control's Loaded event.\r\n            </summary>\r\n            <param name=\"sender\">The control.</param>\r\n            <param name=\"e\">Event arguments.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.InteractionHelper.OnIsEnabledChanged(System.Object,System.Windows.DependencyPropertyChangedEventArgs)\">\r\n            <summary>\r\n            Handle changes to the control's IsEnabled property.\r\n            </summary>\r\n            <param name=\"sender\">The control.</param>\r\n            <param name=\"e\">Event arguments.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.InteractionHelper.OnIsReadOnlyChanged(System.Boolean)\">\r\n            <summary>\r\n            Handles changes to the control's IsReadOnly property.\r\n            </summary>\r\n            <param name=\"value\">The value of the property.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.InteractionHelper.OnApplyTemplateBase\">\r\n            <summary>\r\n            Update the visual state of the control when its template is changed.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.InteractionHelper.AllowGotFocus(System.Windows.RoutedEventArgs)\">\r\n            <summary>\r\n            Check if the control's GotFocus event should be handled.\r\n            </summary>\r\n            <param name=\"e\">Event arguments.</param>\r\n            <returns>\r\n            A value indicating whether the event should be handled.\r\n            </returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.InteractionHelper.OnGotFocusBase\">\r\n            <summary>\r\n            Base implementation of the virtual GotFocus event handler.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.InteractionHelper.AllowLostFocus(System.Windows.RoutedEventArgs)\">\r\n            <summary>\r\n            Check if the control's LostFocus event should be handled.\r\n            </summary>\r\n            <param name=\"e\">Event arguments.</param>\r\n            <returns>\r\n            A value indicating whether the event should be handled.\r\n            </returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.InteractionHelper.OnLostFocusBase\">\r\n            <summary>\r\n            Base implementation of the virtual LostFocus event handler.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.InteractionHelper.AllowMouseEnter(System.Windows.Input.MouseEventArgs)\">\r\n            <summary>\r\n            Check if the control's MouseEnter event should be handled.\r\n            </summary>\r\n            <param name=\"e\">Event arguments.</param>\r\n            <returns>\r\n            A value indicating whether the event should be handled.\r\n            </returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.InteractionHelper.OnMouseEnterBase\">\r\n            <summary>\r\n            Base implementation of the virtual MouseEnter event handler.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.InteractionHelper.AllowMouseLeave(System.Windows.Input.MouseEventArgs)\">\r\n            <summary>\r\n            Check if the control's MouseLeave event should be handled.\r\n            </summary>\r\n            <param name=\"e\">Event arguments.</param>\r\n            <returns>\r\n            A value indicating whether the event should be handled.\r\n            </returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.InteractionHelper.OnMouseLeaveBase\">\r\n            <summary>\r\n            Base implementation of the virtual MouseLeave event handler.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.InteractionHelper.AllowMouseLeftButtonDown(System.Windows.Input.MouseButtonEventArgs)\">\r\n            <summary>\r\n            Check if the control's MouseLeftButtonDown event should be handled.\r\n            </summary>\r\n            <param name=\"e\">Event arguments.</param>\r\n            <returns>\r\n            A value indicating whether the event should be handled.\r\n            </returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.InteractionHelper.OnMouseLeftButtonDownBase\">\r\n            <summary>\r\n            Base implementation of the virtual MouseLeftButtonDown event\r\n            handler.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.InteractionHelper.AllowMouseLeftButtonUp(System.Windows.Input.MouseButtonEventArgs)\">\r\n            <summary>\r\n            Check if the control's MouseLeftButtonUp event should be handled.\r\n            </summary>\r\n            <param name=\"e\">Event arguments.</param>\r\n            <returns>\r\n            A value indicating whether the event should be handled.\r\n            </returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.InteractionHelper.OnMouseLeftButtonUpBase\">\r\n            <summary>\r\n            Base implementation of the virtual MouseLeftButtonUp event handler.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.InteractionHelper.AllowKeyDown(System.Windows.Input.KeyEventArgs)\">\r\n            <summary>\r\n            Check if the control's KeyDown event should be handled.\r\n            </summary>\r\n            <param name=\"e\">Event arguments.</param>\r\n            <returns>\r\n            A value indicating whether the event should be handled.\r\n            </returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.InteractionHelper.AllowKeyUp(System.Windows.Input.KeyEventArgs)\">\r\n            <summary>\r\n            Check if the control's KeyUp event should be handled.\r\n            </summary>\r\n            <param name=\"e\">Event arguments.</param>\r\n            <returns>\r\n            A value indicating whether the event should be handled.\r\n            </returns>\r\n        </member>\r\n        <member name=\"T:System.Windows.Controls.ItemsControlHelper\">\r\n            <summary>\r\n            The ItemContainerGenerator provides useful utilities for ItemsControls.\r\n            </summary>\r\n            <QualityBand>Preview</QualityBand>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.ItemsControlHelper.ItemsControl\">\r\n            <summary>\r\n            Gets or sets the ItemsControl being tracked by the\r\n            ItemContainerGenerator.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.ItemsControlHelper._itemsHost\">\r\n            <summary>\r\n            A Panel that is used as the ItemsHost of the ItemsControl.  This\r\n            property will only be valid when the ItemsControl is live in the\r\n            tree and has generated containers for some of its items.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.ItemsControlHelper.ItemsHost\">\r\n            <summary>\r\n            Gets a Panel that is used as the ItemsHost of the ItemsControl.\r\n            This property will only be valid when the ItemsControl is live in\r\n            the tree and has generated containers for some of its items.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.ItemsControlHelper._scrollHost\">\r\n            <summary>\r\n            A ScrollViewer that is used to scroll the items in the ItemsHost.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.ItemsControlHelper.ScrollHost\">\r\n            <summary>\r\n            Gets a ScrollViewer that is used to scroll the items in the\r\n            ItemsHost.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ItemsControlHelper.#ctor(System.Windows.Controls.ItemsControl)\">\r\n            <summary>\r\n            Initializes a new instance of the ItemContainerGenerator.\r\n            </summary>\r\n            <param name=\"control\">\r\n            The ItemsControl being tracked by the ItemContainerGenerator.\r\n            </param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ItemsControlHelper.OnApplyTemplate\">\r\n            <summary>\r\n            Apply a control template to the ItemsControl.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ItemsControlHelper.PrepareContainerForItemOverride(System.Windows.DependencyObject,System.Windows.Style)\">\r\n            <summary>\r\n            Prepares the specified container to display the specified item.\r\n            </summary>\r\n            <param name=\"element\">\r\n            Container element used to display the specified item.\r\n            </param>\r\n            <param name=\"parentItemContainerStyle\">\r\n            The ItemContainerStyle for the parent ItemsControl.\r\n            </param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ItemsControlHelper.UpdateItemContainerStyle(System.Windows.Style)\">\r\n            <summary>\r\n            Update the style of any generated items when the ItemContainerStyle\r\n            has been changed.\r\n            </summary>\r\n            <param name=\"itemContainerStyle\">The ItemContainerStyle.</param>\r\n            <remarks>\r\n            Silverlight does not support setting a Style multiple times, so we\r\n            only attempt to set styles on elements whose style hasn't already\r\n            been set.\r\n            </remarks>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ItemsControlHelper.ScrollIntoView(System.Windows.FrameworkElement)\">\r\n            <summary>\r\n            Scroll the desired element into the ScrollHost's viewport.\r\n            </summary>\r\n            <param name=\"element\">Element to scroll into view.</param>\r\n        </member>\r\n        <member name=\"T:System.Windows.Controls.IUpdateVisualState\">\r\n            <summary>\r\n            The IUpdateVisualState interface is used to provide the\r\n            InteractionHelper with access to the type's UpdateVisualState method.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.IUpdateVisualState.UpdateVisualState(System.Boolean)\">\r\n            <summary>\r\n            Update the visual state of the control.\r\n            </summary>\r\n            <param name=\"useTransitions\">\r\n            A value indicating whether to automatically generate transitions to\r\n            the new state, or instantly transition to the new state.\r\n            </param>\r\n        </member>\r\n        <member name=\"T:System.Windows.Controls.VisualStates\">\r\n            <summary>\r\n            Names and helpers for visual states in the controls.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.GroupCommon\">\r\n            <summary>\r\n            Common state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateNormal\">\r\n            <summary>\r\n            Normal state of the Common state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateReadOnly\">\r\n            <summary>\r\n            Normal state of the Common state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateMouseOver\">\r\n            <summary>\r\n            MouseOver state of the Common state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StatePressed\">\r\n            <summary>\r\n            Pressed state of the Common state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateDisabled\">\r\n            <summary>\r\n            Disabled state of the Common state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.GroupFocus\">\r\n            <summary>\r\n            Focus state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateUnfocused\">\r\n            <summary>\r\n            Unfocused state of the Focus state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateFocused\">\r\n            <summary>\r\n            Focused state of the Focus state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.GroupSelection\">\r\n            <summary>\r\n            Selection state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateSelected\">\r\n            <summary>\r\n            Selected state of the Selection state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateUnselected\">\r\n            <summary>\r\n            Unselected state of the Selection state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateSelectedInactive\">\r\n            <summary>\r\n            Selected inactive state of the Selection state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.GroupExpansion\">\r\n            <summary>\r\n            Expansion state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateExpanded\">\r\n            <summary>\r\n            Expanded state of the Expansion state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateCollapsed\">\r\n            <summary>\r\n            Collapsed state of the Expansion state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.GroupPopup\">\r\n            <summary>\r\n            Popup state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StatePopupOpened\">\r\n            <summary>\r\n            Opened state of the Popup state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StatePopupClosed\">\r\n            <summary>\r\n            Closed state of the Popup state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.GroupValidation\">\r\n            <summary>\r\n            ValidationStates state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateValid\">\r\n            <summary>\r\n            The valid state for the ValidationStates group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateInvalidFocused\">\r\n            <summary>\r\n            Invalid, focused state for the ValidationStates group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateInvalidUnfocused\">\r\n            <summary>\r\n            Invalid, unfocused state for the ValidationStates group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.GroupExpandDirection\">\r\n            <summary>\r\n            ExpandDirection state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateExpandDown\">\r\n            <summary>\r\n            Down expand direction state of ExpandDirection state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateExpandUp\">\r\n            <summary>\r\n            Up expand direction state of ExpandDirection state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateExpandLeft\">\r\n            <summary>\r\n            Left expand direction state of ExpandDirection state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateExpandRight\">\r\n            <summary>\r\n            Right expand direction state of ExpandDirection state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.GroupHasItems\">\r\n            <summary>\r\n            HasItems state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateHasItems\">\r\n            <summary>\r\n            HasItems state of the HasItems state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateNoItems\">\r\n            <summary>\r\n            NoItems state of the HasItems state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.GroupIncrease\">\r\n            <summary>\r\n            Increment state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateIncreaseEnabled\">\r\n            <summary>\r\n            State enabled for increment group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateIncreaseDisabled\">\r\n            <summary>\r\n            State disabled for increment group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.GroupDecrease\">\r\n            <summary>\r\n            Decrement state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateDecreaseEnabled\">\r\n            <summary>\r\n            State enabled for decrement group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateDecreaseDisabled\">\r\n            <summary>\r\n            State disabled for decrement group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.GroupInteractionMode\">\r\n            <summary>\r\n            InteractionMode state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateEdit\">\r\n            <summary>\r\n            Edit of the DisplayMode state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateDisplay\">\r\n            <summary>\r\n            Display of the DisplayMode state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.GroupLocked\">\r\n            <summary>\r\n            DisplayMode state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateLocked\">\r\n            <summary>\r\n            Edit of the DisplayMode state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateUnlocked\">\r\n            <summary>\r\n            Display of the DisplayMode state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateActive\">\r\n            <summary>\r\n            Active state.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateInactive\">\r\n            <summary>\r\n            Inactive state.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.GroupActive\">\r\n            <summary>\r\n            Active state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateUnwatermarked\">\r\n            <summary>\r\n            Non-watermarked state.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateWatermarked\">\r\n            <summary>\r\n            Watermarked state.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.GroupWatermark\">\r\n            <summary>\r\n            Watermark state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateCalendarButtonUnfocused\">\r\n            <summary>\r\n            Unfocused state for Calendar Buttons.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateCalendarButtonFocused\">\r\n            <summary>\r\n            Focused state for Calendar Buttons.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.GroupCalendarButtonFocus\">\r\n            <summary>\r\n            CalendarButtons Focus state group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateBusy\">\r\n            <summary>\r\n            Busy state for BusyIndicator.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateIdle\">\r\n            <summary>\r\n            Idle state for BusyIndicator.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.GroupBusyStatus\">\r\n            <summary>\r\n            Busyness group name.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateVisible\">\r\n            <summary>\r\n            Visible state name for BusyIndicator.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.StateHidden\">\r\n            <summary>\r\n            Hidden state name for BusyIndicator.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VisualStates.GroupVisibility\">\r\n            <summary>\r\n            BusyDisplay group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.VisualStates.GoToState(System.Windows.Controls.Control,System.Boolean,System.String[])\">\r\n            <summary>\r\n            Use VisualStateManager to change the visual state of the control.\r\n            </summary>\r\n            <param name=\"control\">\r\n            Control whose visual state is being changed.\r\n            </param>\r\n            <param name=\"useTransitions\">\r\n            A value indicating whether to use transitions when updating the\r\n            visual state, or to snap directly to the new visual state.\r\n            </param>\r\n            <param name=\"stateNames\">\r\n            Ordered list of state names and fallback states to transition into.\r\n            Only the first state to be found will be used.\r\n            </param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.VisualStates.GetImplementationRoot(System.Windows.DependencyObject)\">\r\n            <summary>\r\n            Gets the implementation root of the Control.\r\n            </summary>\r\n            <param name=\"dependencyObject\">The DependencyObject.</param>\r\n            <remarks>\r\n            Implements Silverlight's corresponding internal property on Control.\r\n            </remarks>\r\n            <returns>Returns the implementation root or null.</returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.VisualStates.TryGetVisualStateGroup(System.Windows.DependencyObject,System.String)\">\r\n            <summary>\r\n            This method tries to get the named VisualStateGroup for the \r\n            dependency object. The provided object's ImplementationRoot will be \r\n            looked up in this call.\r\n            </summary>\r\n            <param name=\"dependencyObject\">The dependency object.</param>\r\n            <param name=\"groupName\">The visual state group's name.</param>\r\n            <returns>Returns null or the VisualStateGroup object.</returns>\r\n        </member>\r\n        <member name=\"T:System.Windows.Controls.VisualTreeExtensions\">\r\n            <summary>\r\n            A static class providing methods for working with the visual tree.  \r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.VisualTreeExtensions.GetVisualChildren(System.Windows.DependencyObject)\">\r\n            <summary>\r\n            Retrieves all the visual children of a framework element.\r\n            </summary>\r\n            <param name=\"parent\">The parent framework element.</param>\r\n            <returns>The visual children of the framework element.</returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.VisualTreeExtensions.GetLogicalChildrenBreadthFirst(System.Windows.FrameworkElement)\">\r\n            <summary>\r\n            Retrieves all the logical children of a framework element using a \r\n            breadth-first search.  A visual element is assumed to be a logical \r\n            child of another visual element if they are in the same namescope.\r\n            For performance reasons this method manually manages the queue \r\n            instead of using recursion.\r\n            </summary>\r\n            <param name=\"parent\">The parent framework element.</param>\r\n            <returns>The logical children of the framework element.</returns>\r\n        </member>\r\n        <member name=\"T:System.Windows.Controls.WeakEventListener`3\">\r\n            <summary>\r\n            Implements a weak event listener that allows the owner to be garbage\r\n            collected if its only remaining link is an event handler.\r\n            </summary>\r\n            <typeparam name=\"TInstance\">Type of instance listening for the event.</typeparam>\r\n            <typeparam name=\"TSource\">Type of source for the event.</typeparam>\r\n            <typeparam name=\"TEventArgs\">Type of event arguments for the event.</typeparam>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.WeakEventListener`3._weakInstance\">\r\n            <summary>\r\n            WeakReference to the instance listening for the event.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.WeakEventListener`3.OnEventAction\">\r\n            <summary>\r\n            Gets or sets the method to call when the event fires.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.WeakEventListener`3.OnDetachAction\">\r\n            <summary>\r\n            Gets or sets the method to call when detaching from the event.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.WeakEventListener`3.#ctor(`0)\">\r\n            <summary>\r\n            Initializes a new instances of the WeakEventListener class.\r\n            </summary>\r\n            <param name=\"instance\">Instance subscribing to the event.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.WeakEventListener`3.OnEvent(`1,`2)\">\r\n            <summary>\r\n            Handler for the subscribed event calls OnEventAction to handle it.\r\n            </summary>\r\n            <param name=\"source\">Event source.</param>\r\n            <param name=\"eventArgs\">Event arguments.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.WeakEventListener`3.Detach\">\r\n            <summary>\r\n            Detaches from the subscribed event.\r\n            </summary>\r\n        </member>\r\n        <member name=\"T:System.Windows.Controls.Accordion\">\r\n            <summary>\r\n            Represents a collection of collapsed and expanded AccordionItem controls.\r\n            </summary>\r\n            <QualityBand>Preview</QualityBand>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.Accordion._scheduledActions\">\r\n            <summary>\r\n            The items that are currently waiting to perform an action.\r\n            </summary>\r\n            <remarks>An action can be expanding, resizing or collapsing.</remarks>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.Accordion.AccordionButtonStyleName\">\r\n            <summary>\r\n            The name used to indicate AccordionButtonStyle property.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.Accordion._isAllowedToWriteSelectedItems\">\r\n            <summary>\r\n            Determines whether the SelectedItemsProperty may be written.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.Accordion._isAllowedToWriteSelectedIndices\">\r\n            <summary>\r\n            Determines whether the SelectedIndicesProperty may be written.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.Accordion._isIgnoringSelectedIndicesChanges\">\r\n            <summary>\r\n            Indicates that changes to the SelectedIndices collection should\r\n            be ignored.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.Accordion._isIgnoringSelectedItemsChanges\">\r\n            <summary>\r\n            Indicates that changes to the SelectedItems collection should\r\n            be ignored.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.Accordion._isInSelectedItemsCollectionChanged\">\r\n            <summary>\r\n            Determines whether we are currently in the SelectedItems Collection\r\n            Changed handling.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.Accordion._isInSelectedIndicesCollectionChanged\">\r\n            <summary>\r\n            Determines whether we are currently in the SelectedIndices Collection\r\n            Changed handling.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.Accordion._currentActioningItem\">\r\n            <summary>\r\n            The item that is currently visually performing an action.\r\n            </summary>\r\n            <remarks>An action can be expanding, resizing or collapsing.</remarks>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Accordion.ItemsControlHelper\">\r\n            <summary>\r\n            Gets the ItemsControlHelper that is associated with this control.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Accordion.IsResizing\">\r\n            <summary>\r\n            Gets a value indicating whether this instance is currently resizing.\r\n            </summary>\r\n            <value>True if this instance is resizing; otherwise, false.</value>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Accordion.Interaction\">\r\n            <summary>\r\n            Gets or sets the helper that provides all of the standard\r\n            interaction functionality.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Accordion.ExpandDirection\">\r\n            <summary>\r\n            Gets or sets the ExpandDirection property of each \r\n            AccordionItem in the Accordion control and the direction in which\r\n            the Accordion does layout.\r\n            </summary>\r\n            <remarks>Setting the ExpandDirection will set the expand direction \r\n            on the accordionItems.</remarks>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.Accordion.ExpandDirectionProperty\">\r\n            <summary>\r\n            Identifies the ExpandDirection dependency property.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.OnExpandDirectionPropertyChanged(System.Windows.DependencyObject,System.Windows.DependencyPropertyChangedEventArgs)\">\r\n            <summary>\r\n            ExpandDirectionProperty property changed handler.\r\n            </summary>\r\n            <param name=\"d\">Accordion that changed its ExpandDirection.</param>\r\n            <param name=\"e\">Event arguments.</param>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Accordion.SelectionMode\">\r\n            <summary>\r\n            Gets or sets the AccordionSelectionMode used to determine the minimum \r\n            and maximum selected AccordionItems allowed in the Accordion.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.Accordion.SelectionModeProperty\">\r\n            <summary>\r\n            Identifies the SelectionMode dependency property.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.OnSelectionModePropertyChanged(System.Windows.DependencyObject,System.Windows.DependencyPropertyChangedEventArgs)\">\r\n            <summary>\r\n            SelectionModeProperty property changed handler.\r\n            </summary>\r\n            <param name=\"d\">Accordion that changed its SelectionMode.</param>\r\n            <param name=\"e\">Event arguments.</param>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Accordion.IsMinimumOneSelected\">\r\n            <summary>\r\n            Gets a value indicating whether at least one item is selected at \r\n            all times.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Accordion.IsMaximumOneSelected\">\r\n            <summary>\r\n            Gets a value indicating whether at most one item is selected at all times.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Accordion.SelectedItem\">\r\n            <summary>\r\n            Gets or sets the selected item.\r\n            </summary>\r\n            <remarks>\r\n            The default value is null.\r\n            When multiple items are allowed (IsMaximumOneSelected false), \r\n            return the first of the selectedItems.\r\n            </remarks>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.Accordion.SelectedItemProperty\">\r\n            <summary>\r\n            Identifies the SelectedItem dependency property.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.OnSelectedItemPropertyChanged(System.Windows.DependencyObject,System.Windows.DependencyPropertyChangedEventArgs)\">\r\n            <summary>\r\n            SelectedItemProperty property changed handler.\r\n            </summary>\r\n            <param name=\"d\">Accordion that changed its SelectedItem.</param>\r\n            <param name=\"e\">Event arguments.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.IsValidItemForSelection(System.Object)\">\r\n            <summary>\r\n            Determines whether the new value can be selected.\r\n            </summary>\r\n            <param name=\"newValue\">The new value.</param>\r\n            <returns>\r\n            <c>True</c> if this item can be selected; otherwise, <c>false</c>.\r\n            </returns>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.Accordion._selectedItemNestedLevel\">\r\n            <summary>\r\n            Nested level for SelectedItemCoercion.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Accordion.SelectedIndex\">\r\n            <summary>\r\n            Gets or sets the index of the currently selected AccordionItem.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.Accordion.SelectedIndexProperty\">\r\n            <summary>\r\n            Identifies the SelectedIndex dependency property.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.OnSelectedIndexPropertyChanged(System.Windows.DependencyObject,System.Windows.DependencyPropertyChangedEventArgs)\">\r\n            <summary>\r\n            SelectedIndexProperty property changed handler.\r\n            </summary>\r\n            <param name=\"d\">Accordion that changed its SelectedIndex.</param>\r\n            <param name=\"e\">Event arguments.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.IsValidIndexForSelection(System.Int32)\">\r\n            <summary>\r\n            Determines whether the new value can be selected.\r\n            </summary>\r\n            <param name=\"newValue\">The new value.</param>\r\n            <returns>\r\n            <c>True</c> if this item can be selected; otherwise, <c>false</c>.\r\n            </returns>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.Accordion._selectedIndexNestedLevel\">\r\n            <summary>\r\n            Coercion level.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Accordion.SelectionSequence\">\r\n            <summary>\r\n            Gets or sets the SelectionSequence used to determine \r\n            the order of AccordionItem selection.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.Accordion.SelectionSequenceProperty\">\r\n            <summary>\r\n            Identifies the SelectionSequence dependency property.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.OnSelectionSequencePropertyChanged(System.Windows.DependencyObject,System.Windows.DependencyPropertyChangedEventArgs)\">\r\n            <summary>\r\n            Called when SelectionSequenceProperty changed.\r\n            </summary>\r\n            <param name=\"d\">Accordion that changed its SelectionSequence property.</param>\r\n            <param name=\"e\">The <see cref=\"T:System.Windows.DependencyPropertyChangedEventArgs\"/> \r\n            instance containing the event data.</param>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Accordion.SelectedItems\">\r\n            <summary>\r\n            Gets the selected items.\r\n            </summary>\r\n            <remarks>Does not allow setting.</remarks>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.Accordion.SelectedItemsProperty\">\r\n            <summary>\r\n            Identifies the SelectedItems dependency property.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.OnSelectedItemsChanged(System.Windows.DependencyObject,System.Windows.DependencyPropertyChangedEventArgs)\">\r\n            <summary>\r\n            Property changed handler of SelectedItems.\r\n            </summary>\r\n            <param name=\"d\">Accordion that changed the collection.</param>\r\n            <param name=\"e\">Event arguments.</param>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Accordion.SelectedIndices\">\r\n            <summary>\r\n            Gets the indices of the currently selected AccordionItems.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.Accordion.SelectedIndicesProperty\">\r\n            <summary>\r\n            Identifies the SelectedIndices dependency property.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.OnSelectedIndicesChanged(System.Windows.DependencyObject,System.Windows.DependencyPropertyChangedEventArgs)\">\r\n            <summary>\r\n            Property changed handler of SelectedIndices.\r\n            </summary>\r\n            <param name=\"d\">Accordion that changed the collection.</param>\r\n            <param name=\"e\">Event arguments.</param>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Accordion.AccordionButtonStyle\">\r\n            <summary>\r\n            Gets or sets the Style that is applied to AccordionButton elements\r\n            in the AccordionItems.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.Accordion.AccordionButtonStyleProperty\">\r\n            <summary>\r\n            Identifies the AccordionButtonStyle dependency property.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.OnAccordionButtonStylePropertyChanged(System.Windows.DependencyObject,System.Windows.DependencyPropertyChangedEventArgs)\">\r\n            <summary>\r\n            AccordionButtonStyleProperty property changed handler.\r\n            </summary>\r\n            <param name=\"d\">Accordion that changed its AccordionButtonStyle.</param>\r\n            <param name=\"e\">Event arguments.</param>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Accordion.ContentTemplate\">\r\n            <summary>\r\n            Gets or sets the DataTemplate used to display the content \r\n            of each generated AccordionItem. \r\n            </summary>\r\n            <remarks>Either ContentTemplate or ItemTemplate is used. \r\n            Setting both will result in an exception.</remarks>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.Accordion.ContentTemplateProperty\">\r\n            <summary>\r\n            Identifies the ContentTemplate dependency property.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.Accordion.SelectionChangedEvent\">\r\n            <summary>\r\n            Occurs when the SelectedItem or SelectedItems property value changes.\r\n            </summary>\r\n        </member>\r\n        <member name=\"E:System.Windows.Controls.Accordion.SelectionChanged\">\r\n            <summary>\r\n            Occurs when the SelectedItem or SelectedItems property value changes.\r\n            </summary>\r\n        </member>\r\n        <member name=\"E:System.Windows.Controls.Accordion.SelectedItemsChanged\">\r\n            <summary>\r\n            Occurs when the SelectedItems collection changes.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.#cctor\">\r\n            <summary>\r\n            Static constructor\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.#ctor\">\r\n            <summary>\r\n            Initializes a new instance of the <see cref=\"T:System.Windows.Controls.Accordion\"/> class.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.OnApplyTemplate\">\r\n            <summary>\r\n            Builds the visual tree for the Accordion control when a \r\n            new template is applied.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.OnCreateAutomationPeer\">\r\n            <summary>\r\n            Returns a AccordionAutomationPeer for use by the Silverlight\r\n            automation infrastructure.\r\n            </summary>\r\n            <returns>A AccordionAutomationPeer object for the Accordion.</returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.GetContainerForItemOverride\">\r\n            <summary>\r\n            Creates or identifies the element that is used to display the given \r\n            item.\r\n            </summary>\r\n            <returns>\r\n            The element that is used to display the given item.\r\n            </returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.IsItemItsOwnContainerOverride(System.Object)\">\r\n            <summary>\r\n            Determines if the specified item is (or is eligible to be) its own \r\n            container.\r\n            </summary>\r\n            <param name=\"item\">The item to check.</param>\r\n            <returns>\r\n            True if the item is (or is eligible to be) its own container; \r\n            otherwise, false.\r\n            </returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.PrepareContainerForItemOverride(System.Windows.DependencyObject,System.Object)\">\r\n            <summary>\r\n            Prepares the specified element to display the specified item.\r\n            </summary>\r\n            <param name=\"element\">The element used to display the specified item.</param>\r\n            <param name=\"item\">The item to display.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.ClearContainerForItemOverride(System.Windows.DependencyObject,System.Object)\">\r\n            <summary>\r\n            Undoes the effects of the <see cref=\"M:System.Windows.Controls.ItemsControl.PrepareContainerForItemOverride(System.Windows.DependencyObject,System.Object)\"/> \r\n            method.\r\n            </summary>\r\n            <param name=\"element\">The container element.</param>\r\n            <param name=\"item\">The item that should be cleared.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.OnItemsChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs)\">\r\n            <summary>\r\n            Invoked when the <see cref=\"P:System.Windows.Controls.ItemsControl.Items\"/> \r\n            property changes.\r\n            </summary>\r\n            <param name=\"e\">Information about the change.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.InitializeNewItemsSource\">\r\n            <summary>\r\n            Initializes the SelectedItem property when a new ItemsSource is set.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.OnAccordionItemUnselected(System.Windows.Controls.AccordionItem)\">\r\n            <summary>\r\n            Called when an AccordionItem is unselected.\r\n            </summary>\r\n            <param name=\"accordionItem\">The accordion item that was unselected.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.UnselectItem(System.Int32,System.Object)\">\r\n            <summary>\r\n            Unselects the item.\r\n            </summary>\r\n            <param name=\"index\">The index of the item that will be unselected.</param>\r\n            <param name=\"item\">The item that will be unselected. Can be null.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.OnAccordionItemSelected(System.Windows.Controls.AccordionItem)\">\r\n            <summary>\r\n            Called when an AccordionItem selected.\r\n            </summary>\r\n            <param name=\"accordionItem\">The accordion item that was selected.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.SelectItem(System.Int32)\">\r\n            <summary>\r\n            Selects the item.\r\n            </summary>\r\n            <param name=\"index\">The index of the item to select.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.ChangeSelectedIndex(System.Int32,System.Int32)\">\r\n            <summary>\r\n            Changes the selected item, by unselecting and selecting where \r\n            necessary.\r\n            </summary>\r\n            <param name=\"oldIndex\">The old index.</param>\r\n            <param name=\"newIndex\">The new index.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.OnSelectedItemsCollectionChanged(System.Object,System.Collections.Specialized.NotifyCollectionChangedEventArgs)\">\r\n            <summary>\r\n            Called when selected items collection changed.\r\n            </summary>\r\n            <param name=\"sender\">The sender.</param>\r\n            <param name=\"e\">The <see cref=\"T:System.Collections.Specialized.NotifyCollectionChangedEventArgs\"/> \r\n            instance containing the event data.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.OnSelectedIndicesCollectionChanged(System.Object,System.Collections.Specialized.NotifyCollectionChangedEventArgs)\">\r\n            <summary>\r\n            Called when selected indices collection changed.\r\n            </summary>\r\n            <param name=\"sender\">The sender.</param>\r\n            <param name=\"e\">The <see cref=\"T:System.Collections.Specialized.NotifyCollectionChangedEventArgs\"/> \r\n            instance containing the event data.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.ProposeSelectedIndexCandidate(System.Int32)\">\r\n            <summary>\r\n            Gets an item that is suitable for selection.\r\n            </summary>\r\n            <param name=\"nonCandidateIndex\">Index that should not be considered if \r\n            possible.</param>\r\n            <returns>An item that should be selected. This could be nonCandidateIndex, \r\n            if no other possibility was found.</returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.SelectAll\">\r\n            <summary>\r\n            Selects all the AccordionItems in the Accordion control.\r\n            </summary>\r\n            <remarks>If the Accordion SelectionMode is OneOrMore or ZeroOrMore all \r\n            AccordionItems would be selected. If the Accordion SelectionMode is \r\n            One or ZeroOrOne all items would be selected and unselected. Only \r\n            the last AccordionItem would remain selected. </remarks>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.UnselectAll\">\r\n            <summary>\r\n            Unselects all the AccordionItems in the Accordion control.\r\n            </summary>\r\n            <remarks>If the Accordion SelectionMode is Zero or ZeroOrMore all \r\n            AccordionItems would be Unselected. If SelectionMode is One or  \r\n            OneOrMode  than all items would be Unselected and selected. Only the \r\n            first AccordionItem would still be selected.</remarks>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.UpdateAccordionItemsSelection(System.Boolean)\">\r\n            <summary>\r\n            Updates all accordionItems to be selected or unselected.\r\n            </summary>\r\n            <param name=\"selectedValue\">True to select all items, false to unselect.</param>\r\n            <remarks>Will not attempt to change a locked accordionItem.</remarks>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.SetLockedProperties\">\r\n            <summary>\r\n            Sets the locked properties on all the items.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.OnSelectedItemChanged(System.Windows.Controls.SelectionChangedEventArgs)\">\r\n            <summary>\r\n            Raises the SelectedItemChanged event when the SelectedItem \r\n            property value changes.\r\n            </summary>\r\n            <param name=\"e\">The <see cref=\"T:System.Windows.Controls.SelectionChangedEventArgs\"/> \r\n            instance containing the event data.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.RaiseOnSelectedItemsCollectionChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs)\">\r\n            <summary>\r\n            Raise the SelectedItemsCollectionChanged event.\r\n            </summary>\r\n            <param name=\"e\">The <see cref=\"T:System.Windows.Controls.SelectionChangedEventArgs\"/> \r\n            instance containing the event data.</param>\r\n            <remarks>This event is raised after the changes to the collection \r\n            have been processed.</remarks>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.OnAccordionSizeChanged(System.Object,System.Windows.SizeChangedEventArgs)\">\r\n            <summary>\r\n            Called when the size of the Accordion changes.\r\n            </summary>\r\n            <param name=\"sender\">The sender.</param>\r\n            <param name=\"e\">The <see cref=\"T:System.Windows.SizeChangedEventArgs\"/> \r\n            instance containing the event data.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.OnHeaderSizeChange(System.Windows.Controls.AccordionItem)\">\r\n            <summary>\r\n            Called when size of a Header on the item changes.\r\n            </summary>\r\n            <param name=\"item\">The item whose Header changed.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.ScheduleAction(System.Windows.Controls.AccordionItem,System.Windows.Controls.AccordionAction)\">\r\n            <summary>\r\n            Allows an AccordionItem to signal the need for a visual action \r\n            (resize, collapse, expand).\r\n            </summary>\r\n            <param name=\"item\">The AccordionItem that signals for a schedule.</param>\r\n            <param name=\"action\">The action it is scheduling for.</param>\r\n            <returns>True if the item is allowed to proceed without scheduling, \r\n            false if the item needs to wait for a signal to execute the action.</returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.OnActionFinish(System.Windows.Controls.AccordionItem)\">\r\n            <summary>\r\n            Signals the finish of an action by an item.\r\n            </summary>\r\n            <param name=\"item\">The AccordionItem that finishes an action.</param>\r\n            <remarks>An AccordionItem should always signal a finish, for this call\r\n            will start the next scheduled action.</remarks>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.StartNextAction\">\r\n            <summary>\r\n            Starts the next action in the list, in a particular order.\r\n            </summary>\r\n            <remarks>An AccordionItem is should always signal that it is \r\n            finished with an action.</remarks>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.LayoutChildren\">\r\n            <summary>\r\n            Determines and sets the height of the accordion items.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Accordion.IsShouldFillWidth\">\r\n            <summary>\r\n            Gets a value indicating whether the accordion fills width.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Accordion.IsShouldFillHeight\">\r\n            <summary>\r\n            Gets a value indicating whether the accordion fills height.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.SetPanelOrientation\">\r\n            <summary>\r\n            Sets the orientation of the panel.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.OnGotFocus(System.Windows.RoutedEventArgs)\">\r\n            <summary>\r\n            Provides handling for the GotFocus event.\r\n            </summary>\r\n            <param name=\"e\">The data for the event.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.OnLostFocus(System.Windows.RoutedEventArgs)\">\r\n            <summary>\r\n            Provides handling for the LostFocus event.\r\n            </summary>\r\n            <param name=\"e\">The data for the event.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.OnMouseEnter(System.Windows.Input.MouseEventArgs)\">\r\n            <summary>\r\n            Provides handling for the MouseEnter event.\r\n            </summary>\r\n            <param name=\"e\">The data for the event.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.OnMouseLeave(System.Windows.Input.MouseEventArgs)\">\r\n            <summary>\r\n            Provides handling for the MouseLeave event.\r\n            </summary>\r\n            <param name=\"e\">The data for the event.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.OnMouseLeftButtonDown(System.Windows.Input.MouseButtonEventArgs)\">\r\n            <summary>\r\n            Provides handling for the MouseLeftButtonDown event.\r\n            </summary>\r\n            <param name=\"e\">The data for the event.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.OnMouseLeftButtonUp(System.Windows.Input.MouseButtonEventArgs)\">\r\n            <summary>\r\n            Called before the MouseLeftButtonUp event occurs.\r\n            </summary>\r\n            <param name=\"e\">The data for the event.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.System#Windows#Controls#IUpdateVisualState#UpdateVisualState(System.Boolean)\">\r\n            <summary>\r\n            Update the visual state of the control.\r\n            </summary>\r\n            <param name=\"useTransitions\">\r\n            A value indicating whether to automatically generate transitions to\r\n            the new state, or instantly transition to the new state.\r\n            </param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Accordion.UpdateVisualState(System.Boolean)\">\r\n            <summary>\r\n            Update the current visual state of the button.\r\n            </summary>\r\n            <param name=\"useTransitions\">\r\n            True to use transitions when updating the visual state, false to\r\n            snap directly to the new visual state.\r\n            </param>\r\n        </member>\r\n        <member name=\"T:System.Windows.Controls.AccordionAction\">\r\n            <summary>\r\n            Determines the action the AccordionItem will perform.\r\n            </summary>\r\n            <QualityBand>Preview</QualityBand>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.AccordionAction.None\">\r\n            <summary>\r\n            No action will be performed.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.AccordionAction.Collapse\">\r\n            <summary>\r\n            A collapse will be performed.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.AccordionAction.Expand\">\r\n            <summary>\r\n            An expand will be performed.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.AccordionAction.Resize\">\r\n            <summary>\r\n            A resize will be performed.\r\n            </summary>\r\n        </member>\r\n        <member name=\"T:System.Windows.Controls.Primitives.AccordionButton\">\r\n            <summary>\r\n            Represents the header for an accordion item.\r\n            </summary>\r\n            <remarks>By creating a seperate control, there is more flexibility in \r\n            the templating possibilities.</remarks>\r\n            <QualityBand>Preview</QualityBand>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Primitives.AccordionButton.ParentAccordionItem\">\r\n            <summary>\r\n            Gets or sets a reference to the parent AccordionItem \r\n            of an AccordionButton.\r\n            </summary>\r\n            <value>The parent accordion item.</value>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Primitives.AccordionButton.#cctor\">\r\n            <summary>\r\n            Static constructor\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Primitives.AccordionButton.#ctor\">\r\n            <summary>\r\n            Initializes a new instance of the <see cref=\"T:System.Windows.Controls.Primitives.AccordionButton\"/> \r\n            class.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.Primitives.AccordionButton.UpdateVisualState(System.Boolean)\">\r\n            <summary>\r\n            Updates the state of the visual.\r\n            </summary>\r\n            <param name=\"useTransitions\">If set to <c>true</c> use transitions.</param>\r\n            <remarks>The header will follow the parent accordionitem states.</remarks>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Primitives.ExpandableContentControl.RevealMode\">\r\n            <summary>\r\n            Gets or sets the direction in which the ExpandableContentControl \r\n            content window opens.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.Primitives.ExpandableContentControl.RevealModeProperty\">\r\n            <summary>\r\n            Identifies the RevealMode dependency property.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Primitives.ExpandableContentControl.IsHorizontalRevealMode\">\r\n            <summary>\r\n            Gets a value indicating whether the content should be revealed horizontally.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Primitives.ExpandableContentControl.IsVerticalRevealMode\">\r\n            <summary>\r\n            Gets a value indicating whether the content should be revealed verticaly.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Primitives.ExpandableContentControl.Percentage\">\r\n            <summary>\r\n            Gets or sets the relative percentage of the content that is \r\n            currently visible. A percentage of 1 corresponds to the complete\r\n            TargetSize.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.Primitives.ExpandableContentControl.PercentageProperty\">\r\n            <summary>\r\n            Identifies the Percentage dependency property.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Primitives.ExpandableContentControl.RelevantContentSize\">\r\n            <summary>\r\n            Gets the content current visible size.\r\n            </summary>\r\n        </member>\r\n        <member name=\"T:System.Windows.Controls.AccordionItem\">\r\n            <summary>\r\n            Represents a control that displays a header and has a collapsible \r\n            content window.\r\n            </summary>\r\n            <QualityBand>Preview</QualityBand>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.AccordionItem.ElementExpanderButtonName\">\r\n            <summary>\r\n            The name of the ExpanderButton template part.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.AccordionItem.ElementExpandSiteName\">\r\n            <summary>\r\n            The name of the ExpandSite template part.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.AccordionItem._expanderButton\">\r\n            <summary>\r\n            The ExpanderButton template part is a templated ToggleButton that's \r\n            used to select and unselect this AccordionItem.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.AccordionItem.ExpanderButton\">\r\n            <summary>\r\n            Gets or sets the ExpanderButton template part.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.AccordionItem._expandSite\">\r\n            <summary>\r\n            BackingField for the ExpandSite property.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.AccordionItem.ExpandSite\">\r\n            <summary>\r\n            Gets or sets the expand site template part.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.AccordionItem._isBusyWithAction\">\r\n            <summary>\r\n            Indicates that the control is currently executing an action.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.AccordionItem._allowedToWriteExpandDirection\">\r\n            <summary>\r\n            Determines whether the ExpandDirection property may be written.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.AccordionItem.ExpandDirection\">\r\n            <summary>\r\n            Gets the direction in which the AccordionItem content window opens.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.AccordionItem.ExpandDirectionProperty\">\r\n            <summary>\r\n            Identifies the ExpandDirection dependency property. \r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.AccordionItem.OnExpandDirectionPropertyChanged(System.Windows.DependencyObject,System.Windows.DependencyPropertyChangedEventArgs)\">\r\n            <summary>\r\n            ExpandDirectionProperty PropertyChangedCallback call back static \r\n            function.\r\n            This function validates the new value before calling virtual function \r\n            OnExpandDirectionChanged.\r\n            </summary>\r\n            <param name=\"d\">Expander object whose ExpandDirection property is \r\n            changed.</param>\r\n            <param name=\"e\">DependencyPropertyChangedEventArgs which contains \r\n            the old and new values.</param>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.AccordionItem.IsSelected\">\r\n            <summary>\r\n            Gets or sets a value indicating whether the AccordionItem is \r\n            selected and its content window is visible.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.AccordionItem.IsSelectedProperty\">\r\n            <summary>\r\n            Identifies the IsSelected dependency property.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.AccordionItem.OnIsSelectedPropertyChanged(System.Windows.DependencyObject,System.Windows.DependencyPropertyChangedEventArgs)\">\r\n            <summary>\r\n            SelectedProperty PropertyChangedCallback static function.\r\n            </summary>\r\n            <param name=\"d\">Expander object whose Expanded property is changed.</param>\r\n            <param name=\"e\">DependencyPropertyChangedEventArgs which contains the \r\n            old and new values.</param>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.AccordionItem._isSelectedNestedLevel\">\r\n            <summary>\r\n            Nested level for IsSelectedCoercion.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.AccordionItem.IsLocked\">\r\n            <summary>\r\n            Gets a value indicating whether the AccordionItem cannot be \r\n            selected by the user.\r\n            </summary>\r\n            <value><c>True</c> if this instance is locked; otherwise, <c>false</c>.</value>\r\n            <remarks>The IsSelected property may not be changed when the \r\n            AccordionItem is locked. Locking occurs when the item is the first \r\n            in the list, the SelectionMode of Accordion requires atleast one selected\r\n            AccordionItem and the AccordionItem is currently selected.</remarks>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.AccordionItem._isLocked\">\r\n            <summary>\r\n            BackingField for IsLocked.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.AccordionItem.AccordionButtonStyle\">\r\n            <summary>\r\n            Gets or sets the Style used by AccordionButton.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.AccordionItem.AccordionButtonStyleProperty\">\r\n            <summary>\r\n            Identifies the AccordionButtonStyle dependency property.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.AccordionItem.OnAccordionButtonStylePropertyChanged(System.Windows.DependencyObject,System.Windows.DependencyPropertyChangedEventArgs)\">\r\n            <summary>\r\n            AccordionButtonStyleProperty property changed handler.\r\n            </summary>\r\n            <param name=\"d\">AccordionItem that changed its AccordionButtonStyle.</param>\r\n            <param name=\"e\">Event arguments.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.AccordionItem.OnAccordionButtonStyleChanged(System.Windows.Style,System.Windows.Style)\">\r\n            <summary>\r\n            Called when AccordionButtonStyle is changed.\r\n            </summary>\r\n            <param name=\"oldStyle\">The old style.</param>\r\n            <param name=\"newStyle\">The new style.</param>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.AccordionItem.ExpandableContentControlStyle\">\r\n            <summary>\r\n            Gets or sets the Style used by ExpandableContentControl.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.AccordionItem.ExpandableContentControlStyleProperty\">\r\n            <summary>\r\n            Identifies the ExpandableContentControlStyle dependency property.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.AccordionItem.OnExpandableContentControlStylePropertyChanged(System.Windows.DependencyObject,System.Windows.DependencyPropertyChangedEventArgs)\">\r\n            <summary>\r\n            ExpandableContentControlStyleProperty property changed handler.\r\n            </summary>\r\n            <param name=\"d\">AccordionItem that changed its ExpandableContentControlStyle.</param>\r\n            <param name=\"e\">Event arguments.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.AccordionItem.OnExpandableContentControlStyleChanged(System.Windows.Style,System.Windows.Style)\">\r\n            <summary>\r\n            Called when ExpandableContentControlStyle is changed.\r\n            </summary>\r\n            <param name=\"oldStyle\">The old style.</param>\r\n            <param name=\"newStyle\">The new style.</param>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.AccordionItem._allowedToWriteContentTargetSize\">\r\n            <summary>\r\n            Determines whether it is allowed to set the ContentTargetSize\r\n            property.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.AccordionItem.ContentTargetSize\">\r\n            <summary>\r\n            Gets the Size that the content will animate to.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.AccordionItem.ContentTargetSizeProperty\">\r\n            <summary>\r\n            Identifies the ContentTargetSize dependency property.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.AccordionItem.OnContentTargetSizePropertyChanged(System.Windows.DependencyObject,System.Windows.DependencyPropertyChangedEventArgs)\">\r\n            <summary>\r\n            ContentTargetSizeProperty property changed handler.\r\n            </summary>\r\n            <param name=\"d\">AccordionItem that changed its ContentTargetSize.</param>\r\n            <param name=\"e\">Event arguments.</param>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.AccordionItem.ParentAccordion\">\r\n            <summary>\r\n            Gets or sets a reference to the parent Accordion of an\r\n            AccordionItem.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.AccordionItem.ScheduledAction\">\r\n            <summary>\r\n            Gets the scheduled action.\r\n            </summary>\r\n            <value>The scheduled action.</value>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.AccordionItem.SelectedEvent\">\r\n            <summary>\r\n            Occurs when the accordionItem is selected.\r\n            </summary>\r\n        </member>\r\n        <member name=\"E:System.Windows.Controls.AccordionItem.Selected\">\r\n            <summary>\r\n            Occurs when the accordionItem is selected.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.AccordionItem.UnselectedEvent\">\r\n            <summary>\r\n            Occurs when the accordionItem is unselected.\r\n            </summary>\r\n        </member>\r\n        <member name=\"E:System.Windows.Controls.AccordionItem.Unselected\">\r\n            <summary>\r\n            Occurs when the accordionItem is unselected.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.AccordionItem.#cctor\">\r\n            <summary>\r\n            Static constructor\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.AccordionItem.#ctor\">\r\n            <summary>\r\n            Initializes a new instance of the AccordionItem class.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.AccordionItem.OnHeaderSizeChanged(System.Object,System.Windows.SizeChangedEventArgs)\">\r\n            <summary>\r\n            Called when the size of the control changes.\r\n            </summary>\r\n            <param name=\"sender\">The sender.</param>\r\n            <param name=\"e\">The <see cref=\"T:System.Windows.SizeChangedEventArgs\"/> \r\n            instance containing the event data.</param>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.AccordionItem.RelevantContentSize\">\r\n            <summary>\r\n            Gets the relevant size of the current content.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.AccordionItem.Schedule(System.Windows.Controls.AccordionAction)\">\r\n            <summary>\r\n            Schedules the specified action.\r\n            </summary>\r\n            <param name=\"action\">The action to be performed.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.AccordionItem.StartAction\">\r\n            <summary>\r\n            Starts an action, such as resize, collapse or expand.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.AccordionItem.ShouldFillWidth\">\r\n            <summary>\r\n            Gets a value indicating whether the AccordionItem fills width.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.AccordionItem.ShouldFillHeight\">\r\n            <summary>\r\n            Gets a value indicating whether the AccordionItem fills height.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.AccordionItem.OnApplyTemplate\">\r\n            <summary>\r\n            Builds the visual tree for the AccordionItem control when a new \r\n            template is applied.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.AccordionItem.OnCreateAutomationPeer\">\r\n            <summary>\r\n            Returns a AccordionItemAutomationPeer for use by the Silverlight\r\n            automation infrastructure.\r\n            </summary>\r\n            <returns>A AccordionItemAutomationPeer object for the AccordionItem.</returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.AccordionItem.PreparePrepareHeaderedContentControlContainerForItemOverride(System.Windows.Controls.HeaderedContentControl,System.Object,System.Windows.Controls.ItemsControl,System.Windows.Style)\">\r\n            <summary>\r\n            Prepares the specified container to display the specified item.\r\n            </summary>\r\n            <param name=\"element\">\r\n            Container element used to display the specified item.\r\n            </param>\r\n            <param name=\"item\">Specified item to display.</param>\r\n            <param name=\"parent\">The parent ItemsControl.</param>\r\n            <param name=\"parentItemContainerStyle\">\r\n            The ItemContainerStyle for the parent ItemsControl.\r\n            </param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.AccordionItem.HasDefaultValue(System.Windows.Controls.Control,System.Windows.DependencyProperty)\">\r\n            <summary>\r\n            Check whether a control has the default value for a property.\r\n            </summary>\r\n            <param name=\"control\">The control to check.</param>\r\n            <param name=\"property\">The property to check.</param>\r\n            <returns>\r\n            True if the property has the default value; false otherwise.\r\n            </returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.AccordionItem.OnKeyDown(System.Windows.Input.KeyEventArgs)\">\r\n            <summary>\r\n            Provides handling for the KeyDown event.\r\n            </summary>\r\n            <param name=\"e\">Key event args.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.AccordionItem.OnSelected\">\r\n            <summary>\r\n            Raises the Selected event when the IsSelected property changes \r\n            from false to true.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.AccordionItem.OnUnselected\">\r\n            <summary>\r\n            Raises the Unselected event when the IsSelected property changes \r\n            from true to false.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.AccordionItem.ToggleSelected(System.Windows.RoutedEventArgs)\">\r\n            <summary>\r\n            Handle changes to the IsSelected property.\r\n            </summary>\r\n            <param name=\"args\">Event arguments.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.AccordionItem.OnExpanderButtonClicked(System.Object,System.Windows.RoutedEventArgs)\">\r\n            <summary>\r\n            Handle ExpanderButton's click event.\r\n            </summary>\r\n            <param name=\"sender\">The ExpanderButton in template.</param>\r\n            <param name=\"e\">Routed event arg.</param>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.AccordionItem._interaction\">\r\n            <summary>\r\n            Gets or sets the helper that provides all of the standard\r\n            interaction functionality.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.AccordionItem.OnGotFocus(System.Windows.RoutedEventArgs)\">\r\n            <summary>\r\n            Provides handling for the GotFocus event.\r\n            </summary>\r\n            <param name=\"e\">The data for the event.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.AccordionItem.OnLostFocus(System.Windows.RoutedEventArgs)\">\r\n            <summary>\r\n            Provides handling for the LostFocus event.\r\n            </summary>\r\n            <param name=\"e\">The data for the event.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.AccordionItem.OnMouseEnter(System.Windows.Input.MouseEventArgs)\">\r\n            <summary>\r\n            Provides handling for the MouseEnter event.\r\n            </summary>\r\n            <param name=\"e\">The data for the event.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.AccordionItem.OnMouseLeave(System.Windows.Input.MouseEventArgs)\">\r\n            <summary>\r\n            Provides handling for the MouseLeave event.\r\n            </summary>\r\n            <param name=\"e\">The data for the event.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.AccordionItem.OnMouseLeftButtonDown(System.Windows.Input.MouseButtonEventArgs)\">\r\n            <summary>\r\n            Provides handling for the MouseLeftButtonDown event.\r\n            </summary>\r\n            <param name=\"e\">The data for the event.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.AccordionItem.OnMouseLeftButtonUp(System.Windows.Input.MouseButtonEventArgs)\">\r\n            <summary>\r\n            Called before the MouseLeftButtonUp event occurs.\r\n            </summary>\r\n            <param name=\"e\">The data for the event.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.AccordionItem.System#Windows#Controls#IUpdateVisualState#UpdateVisualState(System.Boolean)\">\r\n            <summary>\r\n            Update the visual state of the control.\r\n            </summary>\r\n            <param name=\"useTransitions\">\r\n            A value indicating whether to automatically generate transitions to\r\n            the new state, or instantly transition to the new state.\r\n            </param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.AccordionItem.UpdateVisualState(System.Boolean)\">\r\n            <summary>\r\n            Update the current visual state of the button.\r\n            </summary>\r\n            <param name=\"useTransitions\">\r\n            True to use transitions when updating the visual state, false to\r\n            snap directly to the new visual state.\r\n            </param>\r\n        </member>\r\n        <member name=\"T:System.Windows.Controls.AccordionSelectionMode\">\r\n            <summary>\r\n            Defines the minimum and maximum number of selected items allowed in an Accordion control.\r\n            </summary>\r\n            <QualityBand>Preview</QualityBand>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.AccordionSelectionMode.One\">\r\n            <summary>\r\n            Exactly one item must be selected in the Accordion.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.AccordionSelectionMode.OneOrMore\">\r\n            <summary>\r\n            At least one item must be selected in the Accordion. \r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.AccordionSelectionMode.ZeroOrOne\">\r\n            <summary>\r\n            No more than one item can be selected in the accordion.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.AccordionSelectionMode.ZeroOrMore\">\r\n            <summary>\r\n            Any number of  items can be selected in the Accordion. \r\n            </summary>\r\n        </member>\r\n        <member name=\"T:System.Windows.Controls.SelectionSequence\">\r\n            <summary>\r\n            Determines the order in which visual states are set.\r\n            </summary>\r\n            <QualityBand>Preview</QualityBand>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.SelectionSequence.CollapseBeforeExpand\">\r\n            <summary>\r\n            Collapses are set before expansions.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.SelectionSequence.Simultaneous\">\r\n            <summary>\r\n            No delays, all states are set immediately.\r\n            </summary>\r\n        </member>\r\n        <member name=\"T:System.Windows.Controls.Properties.Resources\">\r\n            <summary>\r\n              A strongly-typed resource class, for looking up localized strings, etc.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Properties.Resources.ResourceManager\">\r\n            <summary>\r\n              Returns the cached ResourceManager instance used by this class.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Properties.Resources.Culture\">\r\n            <summary>\r\n              Overrides the current thread's CurrentUICulture property for all\r\n              resource lookups using this strongly typed resource class.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Properties.Resources.Accordion_InvalidManipulationOfSelectionCollections\">\r\n            <summary>\r\n              Looks up a localized string similar to The modification made to the collection lead to an invalid Selection state. Please check the SelectionMode to allow zero or multiple items..\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Properties.Resources.Accordion_OnActionFinish_InvalidFinish\">\r\n            <summary>\r\n              Looks up a localized string similar to Should not signal a finish when item is not expected to perform an action..\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Properties.Resources.Accordion_OnExpandDirectionPropertyChanged_InvalidValue\">\r\n            <summary>\r\n              Looks up a localized string similar to Invalid ExpandDirection value &apos;{0}&apos;..\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Properties.Resources.Accordion_OnSelectedIndicesChanged_InvalidWrite\">\r\n            <summary>\r\n              Looks up a localized string similar to Cannot set read-only property SelectedIndices..\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Properties.Resources.Accordion_OnSelectedItemsChanged_InvalidWrite\">\r\n            <summary>\r\n              Looks up a localized string similar to Cannot set read-only property SelectedItems..\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Properties.Resources.Accordion_OnSelectionModePropertyChanged_InvalidValue\">\r\n            <summary>\r\n              Looks up a localized string similar to Invalid SelectionMode value &apos;{0}&apos;..\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Properties.Resources.Accordion_OnSelectionSequencepropertyChanged_InvalidValue\">\r\n            <summary>\r\n              Looks up a localized string similar to Invalid SelectionSequence value &apos;{0}&apos;..\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Properties.Resources.Accordion_UnsupportedCollectionAction\">\r\n            <summary>\r\n              Looks up a localized string similar to Unsupported collection action &apos;{0}&apos;..\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Properties.Resources.AccordionItem_InvalidWriteToContentTargetSize\">\r\n            <summary>\r\n              Looks up a localized string similar to ContentTargetSize is a read-only value and is set through Accordion..\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Properties.Resources.AccordionItem_InvalidWriteToExpandDirection\">\r\n            <summary>\r\n              Looks up a localized string similar to ExpandDirection is a read-only value and is set through Accordion..\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Properties.Resources.AccordionItem_OnIsSelectedPropertyChanged_InvalidChange\">\r\n            <summary>\r\n              Looks up a localized string similar to Cannot modify the IsSelected property while item is locked..\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Properties.Resources.AccordionItem_StartAction_InvalidAction\">\r\n            <summary>\r\n              Looks up a localized string similar to Invalid Action &apos;{0}&apos;..\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Properties.Resources.AccordionItem_StartAction_InvalidCall\">\r\n            <summary>\r\n              Looks up a localized string similar to Cannot start an action when there is no action scheduled..\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Properties.Resources.Automation_OperationCannotBePerformed\">\r\n            <summary>\r\n              Looks up a localized string similar to Cannot perform operation..\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Properties.Resources.Expander_OnExpandDirectionPropertyChanged_InvalidValue\">\r\n            <summary>\r\n              Looks up a localized string similar to Invalid ExpandDirection value &apos;{0}&apos;..\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Properties.Resources.TransitioningContentControl_TransitionNotFound\">\r\n            <summary>\r\n              Looks up a localized string similar to Transition &apos;{0}&apos; was not defined..\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.Properties.Resources.TransitiotioningContentControl_IsTransitioningReadOnly\">\r\n            <summary>\r\n              Looks up a localized string similar to IsTransitioning property is read-only..\r\n            </summary>\r\n        </member>\r\n        <member name=\"T:System.Windows.Controls.TransitioningContentControl\">\r\n            <summary>\r\n            Represents a control with a single piece of content and when that content \r\n            changes performs a transition animation. \r\n            </summary>\r\n            <QualityBand>Experimental</QualityBand>\r\n            <remarks>The API for this control will change considerably in the future.</remarks>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.TransitioningContentControl.PresentationGroup\">\r\n            <summary>\r\n            The name of the group that holds the presentation states.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.TransitioningContentControl.NormalState\">\r\n            <summary>\r\n            The name of the state that represents a normal situation where no\r\n            transition is currently being used.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.TransitioningContentControl.DefaultTransitionState\">\r\n            <summary>\r\n            The name of the state that represents the default transition.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.TransitioningContentControl.PreviousContentPresentationSitePartName\">\r\n            <summary>\r\n            The name of the control that will display the previous content.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.TransitioningContentControl.CurrentContentPresentationSitePartName\">\r\n            <summary>\r\n            The name of the control that will display the current content.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.TransitioningContentControl.CurrentContentPresentationSite\">\r\n            <summary>\r\n            Gets or sets the current content presentation site.\r\n            </summary>\r\n            <value>The current content presentation site.</value>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.TransitioningContentControl.PreviousContentPresentationSite\">\r\n            <summary>\r\n            Gets or sets the previous content presentation site.\r\n            </summary>\r\n            <value>The previous content presentation site.</value>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.TransitioningContentControl._allowIsTransitioningWrite\">\r\n            <summary>\r\n            Indicates whether the control allows writing IsTransitioning.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.TransitioningContentControl.IsTransitioning\">\r\n            <summary>\r\n            Gets a value indicating whether this instance is currently performing\r\n            a transition.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.TransitioningContentControl.IsTransitioningProperty\">\r\n            <summary>\r\n            Identifies the IsTransitioning dependency property.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.TransitioningContentControl.OnIsTransitioningPropertyChanged(System.Windows.DependencyObject,System.Windows.DependencyPropertyChangedEventArgs)\">\r\n            <summary>\r\n            IsTransitioningProperty property changed handler.\r\n            </summary>\r\n            <param name=\"d\">TransitioningContentControl that changed its IsTransitioning.</param>\r\n            <param name=\"e\">Event arguments.</param>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.TransitioningContentControl._currentTransition\">\r\n            <summary>\r\n            The storyboard that is used to transition old and new content.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.TransitioningContentControl.CurrentTransition\">\r\n            <summary>\r\n            Gets or sets the storyboard that is used to transition old and new content.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.TransitioningContentControl.Transition\">\r\n            <summary>\r\n            Gets or sets the name of the transition to use. These correspond\r\n            directly to the VisualStates inside the PresentationStates group.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.TransitioningContentControl.TransitionProperty\">\r\n            <summary>\r\n            Identifies the Transition dependency property.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.TransitioningContentControl.OnTransitionPropertyChanged(System.Windows.DependencyObject,System.Windows.DependencyPropertyChangedEventArgs)\">\r\n            <summary>\r\n            TransitionProperty property changed handler.\r\n            </summary>\r\n            <param name=\"d\">TransitioningContentControl that changed its Transition.</param>\r\n            <param name=\"e\">Event arguments.</param>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.TransitioningContentControl.RestartTransitionOnContentChange\">\r\n            <summary>\r\n            Gets or sets a value indicating whether the current transition\r\n            will be aborted when setting new content during a transition.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.TransitioningContentControl.RestartTransitionOnContentChangeProperty\">\r\n            <summary>\r\n            Identifies the RestartTransitionOnContentChange dependency property.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.TransitioningContentControl.OnRestartTransitionOnContentChangePropertyChanged(System.Windows.DependencyObject,System.Windows.DependencyPropertyChangedEventArgs)\">\r\n            <summary>\r\n            RestartTransitionOnContentChangeProperty property changed handler.\r\n            </summary>\r\n            <param name=\"d\">TransitioningContentControl that changed its RestartTransitionOnContentChange.</param>\r\n            <param name=\"e\">Event arguments.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.TransitioningContentControl.OnRestartTransitionOnContentChangeChanged(System.Boolean,System.Boolean)\">\r\n            <summary>\r\n            Called when the RestartTransitionOnContentChangeProperty changes.\r\n            </summary>\r\n            <param name=\"oldValue\">The old value of RestartTransitionOnContentChange.</param>\r\n            <param name=\"newValue\">The new value of RestartTransitionOnContentChange.</param>\r\n        </member>\r\n        <member name=\"E:System.Windows.Controls.TransitioningContentControl.TransitionCompleted\">\r\n            <summary>\r\n            Occurs when the current transition has completed.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.TransitioningContentControl.#cctor\">\r\n            <summary>\r\n            Static constructor\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.TransitioningContentControl.#ctor\">\r\n            <summary>\r\n            Initializes a new instance of the <see cref=\"T:System.Windows.Controls.TransitioningContentControl\"/> class.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.TransitioningContentControl.OnApplyTemplate\">\r\n            <summary>\r\n            Builds the visual tree for the TransitioningContentControl control \r\n            when a new template is applied.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.TransitioningContentControl.OnContentChanged(System.Object,System.Object)\">\r\n            <summary>\r\n            Called when the value of the <see cref=\"P:System.Windows.Controls.ContentControl.Content\"/> property changes.\r\n            </summary>\r\n            <param name=\"oldContent\">The old value of the <see cref=\"P:System.Windows.Controls.ContentControl.Content\"/> property.</param>\r\n            <param name=\"newContent\">The new value of the <see cref=\"P:System.Windows.Controls.ContentControl.Content\"/> property.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.TransitioningContentControl.StartTransition(System.Object,System.Object)\">\r\n            <summary>\r\n            Starts the transition.\r\n            </summary>\r\n            <param name=\"oldContent\">The old content.</param>\r\n            <param name=\"newContent\">The new content.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.TransitioningContentControl.OnTransitionCompleted(System.Object,System.EventArgs)\">\r\n            <summary>\r\n            Handles the Completed event of the transition storyboard.\r\n            </summary>\r\n            <param name=\"sender\">The source of the event.</param>\r\n            <param name=\"e\">The <see cref=\"T:System.EventArgs\"/> instance containing the event data.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.TransitioningContentControl.AbortTransition\">\r\n            <summary>\r\n            Aborts the transition and releases the previous content.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.TransitioningContentControl.GetStoryboard(System.String)\">\r\n            <summary>\r\n            Attempts to find a storyboard that matches the newTransition name.\r\n            </summary>\r\n            <param name=\"newTransition\">The new transition.</param>\r\n            <returns>A storyboard or null, if no storyboard was found.</returns>\r\n        </member>\r\n        <member name=\"T:System.Windows.Controls.VirtualPanel\">\r\n            <summary>\r\n            Provides a framework for <see cref=\"T:System.Windows.Controls.Panel\"/> elements that virtualize their child data collection. This is an abstract class.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VirtualPanel.IsVirtualizingProperty\">\r\n            <summary>\r\n            Identifies the <see cref=\"P:System.Windows.Controls.VirtualPanel.IsVirtualizing\"/> property.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.VirtualPanel.OnIsVirtualizingChanged(System.Windows.DependencyObject,System.Windows.DependencyPropertyChangedEventArgs)\">\r\n            <summary>\r\n            Handles the event that occurs when the value of the <see cref=\"P:System.Windows.Controls.VirtualPanel.IsVirtualizing\"/> dependency property has changed.\r\n            </summary>\r\n            <param name=\"d\">The dependency object on which the dependency property has changed.</param>\r\n            <param name=\"e\">The event args containing the old and new values of the dependency property.</param>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.VirtualPanel.IsVirtualizing\">\r\n            <summary>\r\n            Gets or sets a value that indicates that this <see cref=\"T:System.Windows.Controls.VirtualPanel\"/> is virtualizing its child collection.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VirtualPanel.RealizationPriorityProperty\">\r\n            <summary>\r\n            Identifies the <see cref=\"P:System.Windows.Controls.VirtualPanel.RealizationPriority\"/> property.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.VirtualPanel.RealizationPriority\">\r\n            <summary>\r\n            Gets or sets the <see cref=\"T:System.Windows.Threading.DispatcherPriority\"/> of the realization pass for this <see cref=\"T:System.Windows.Controls.VirtualPanel\"/>.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.VirtualPanel.IndexForItemContainerProperty\">\r\n            <summary>\r\n            This is an attached property that the panel sets on each container (generated or direct) to point back to the index of the item.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.VirtualPanel.RealizeOperation\">\r\n            <summary>\r\n            Holds the latest queued realization operation.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.VirtualPanel.ItemsOwner\">\r\n            <summary>\r\n            Returns the <see cref=\"T:System.Windows.Controls.ItemsControl\"/> that this panel hosts items for.\r\n            </summary>\r\n            <value></value>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.VirtualPanel.IndexFromContainer(System.Windows.UIElement)\">\r\n            <summary>\r\n            Returns the index to an item that corresponds to the specified, generated <see cref=\"T:System.Windows.UIElement\"/>. \r\n            </summary>\r\n            <param name=\"container\">The <see cref=\"T:System.Windows.UIElement\"/> that corresponds to the item index to be returned.</param>\r\n            <returns>An <see cref=\"T:System.Int32\"/> index to an item that corresponds to the specified <see cref=\"T:System.Windows.UIElement\"/> if it was generated and hosted by this panel; otherwise, <c>-1</c>.</returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.VirtualPanel.ItemFromContainer(System.Windows.UIElement)\">\r\n            <summary>\r\n            Returns the item that corresponds to the specified, generated <see cref=\"T:System.Windows.UIElement\"/>. \r\n            </summary>\r\n            <param name=\"container\">The <see cref=\"T:System.Windows.UIElement\"/> that corresponds to the item to be returned.</param>\r\n            <returns>An <see cref=\"T:System.Object\"/> that is the item which corresponds to the specified <see cref=\"T:System.Windows.UIElement\"/> if it was generated and hosted by this panel; otherwise, <c>null</c>.</returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.VirtualPanel.ContainerFromIndex(System.Int32)\">\r\n            <summary>\r\n            Returns the <see cref=\"T:System.Windows.UIElement\"/> corresponding to the item at the given index within the item collection if it has been realized.\r\n            </summary>\r\n            <param name=\"itemIndex\">The index of the desired item. </param>\r\n            <returns>The element corresponding to the item at the given index within the item collection or returns <c>null</c> if the item is not realized.</returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.VirtualPanel.ContainerFromItem(System.Object)\">\r\n            <summary>\r\n            Returns the <see cref=\"T:System.Windows.UIElement\"/> corresponding to the given item if it has been realized.\r\n            </summary>\r\n            <param name=\"item\">The <see cref=\"T:System.Object\"/> item to find the <see cref=\"T:System.Windows.UIElement\"/> for.</param>\r\n            <returns>A <see cref=\"T:System.Windows.UIElement\"/> that corresponds to the given item. Returns <c>null</c> if the item does not belong to the item collection, or if a <see cref=\"T:System.Windows.UIElement\"/> has not been generated for it.</returns>\r\n            <remarks>Use caution when calling this method as it does a linear search for the item.  Consider calling <see cref=\"M:System.Windows.Controls.VirtualPanel.ContainerFromIndex(System.Int32)\"/> instead.</remarks>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.VirtualPanel.InvalidateReality\">\r\n            <summary>\r\n            Invalidates the realization state of all items being hosted by this panel. After the invalidation, the panel will have its reality updated, which will occur asynchronously unless subsequently forced by <see cref=\"M:System.Windows.Controls.VirtualPanel.UpdateReality\"/>. \r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.VirtualPanel.UpdateReality\">\r\n            <summary>\r\n            Ensures that all items being hosted by this panel are properly realized or virtualized.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.VirtualPanel.RealizeCore(System.Object)\">\r\n            <summary>\r\n            Manages calls to <see cref=\"M:System.Windows.Controls.VirtualPanel.RealizeOverride(System.Collections.IEnumerable,System.Object)\"/>.\r\n            </summary>\r\n            <param name=\"state\">A custom state object left over from a previous call to <see cref=\"M:System.Windows.Controls.VirtualPanel.RealizeCore(System.Object)\"/> if additional processing was needed.</param>\r\n            <returns>A custom state object if additional processing is needed; otherwise, <c>null</c>.</returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.VirtualPanel.RealizeOverride(System.Collections.IEnumerable,System.Object)\">\r\n            <summary>\r\n            When overridden in a derived class, realizes and/or virtualizes items, optionally deferring additional realization.\r\n            </summary>\r\n            <param name=\"items\">The current items being hosted by this panel.</param>\r\n            <param name=\"state\">A custom state object left over from a previous call to <see cref=\"M:System.Windows.Controls.VirtualPanel.RealizeOverride(System.Collections.IEnumerable,System.Object)\"/> if additional processing was needed.</param>\r\n            <returns>Implementations may optionally defer additional processing by return a non-<c>null</c> object, which will then be passed to a future call to <see cref=\"M:System.Windows.Controls.VirtualPanel.RealizeOverride(System.Collections.IEnumerable,System.Object)\"/>.</returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.VirtualPanel.OnIsItemsHostChanged(System.Boolean,System.Boolean)\">\r\n            <summary>\r\n            Indicates that the <see cref=\"P:System.Windows.Controls.Panel.IsItemsHost\"/> property value has changed.\r\n            </summary>\r\n            <param name=\"oldIsItemsHost\">The old property value.</param>\r\n            <param name=\"newIsItemsHost\">The new property value.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.VirtualPanel.OnIsVirtualizingChanged(System.Boolean,System.Boolean)\">\r\n            <summary>\r\n            Indicates that the <see cref=\"P:System.Windows.Controls.VirtualPanel.IsVirtualizing\"/> property value has changed.\r\n            </summary>\r\n            <param name=\"oldIsVirtualizing\">The old property value.</param>\r\n            <param name=\"newIsVirtualizing\">The new property value.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.VirtualPanel.OnItemsChanged(System.Object,System.Windows.Controls.Primitives.ItemsChangedEventArgs)\">\r\n            <summary>\r\n            Maintains event handlers when the items source has changed.\r\n            </summary>\r\n            <param name=\"sender\">The <see cref=\"T:System.Object\"/> that raised the event.</param>\r\n            <param name=\"args\">Provides data for the <see cref=\"E:System.Windows.Controls.ItemContainerGenerator.ItemsChanged\"/> event.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.VirtualPanel.OnItemsChanged(System.Object,System.Collections.Specialized.NotifyCollectionChangedEventArgs)\">\r\n            <summary>\r\n            Called when the <see cref=\"P:System.Windows.Controls.ItemsControl.Items\"/> collection that is associated with the <see cref=\"T:System.Windows.Controls.ItemsControl\"/> for this <see cref=\"T:System.Windows.Controls.Panel\"/> changes.\r\n            </summary>\r\n            <param name=\"sender\">The <see cref=\"T:System.Object\"/> that raised the event.</param>\r\n            <param name=\"args\">Provides data for the <see cref=\"!:ItemsChanged\"/> event.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.VirtualPanel.RealizeItem(System.Int32)\">\r\n            <summary>\r\n            Realizes an item container for the item with the given index.\r\n            </summary>\r\n            <param name=\"itemIndex\">The index of the item.</param>\r\n            <returns>The child that was created and added to the internal children.</returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.VirtualPanel.VirtualizeItem(System.Int32)\">\r\n            <summary>\r\n            Removes an item container for the item with the given index.\r\n            </summary>\r\n            <param name=\"itemIndex\">The index of the item.</param>\r\n            <returns><c>true</c> if the child had been previously realized and was now removed; otherwise, <c>false</c>.</returns>\r\n        </member>\r\n        <member name=\"T:System.Windows.Controls.VirtualPanel.VirtualItemsList\">\r\n            <summary>\r\n            Returns a list which represents a subset of the elements in the source list. \r\n            </summary>\r\n            <remarks>\r\n            This list is used in NotifyCollectionChangedEventArgs because we might be dealing with\r\n            virtualized lists that raise events for items changing when the items haven't been\r\n            loaded into memory yet.  If the client needs to inspect the item, then they can index\r\n            into this list and it will retrieve it from the original source, but if they don't need\r\n            to inspect the item then we spare the cost of the lookup and retrieval.\r\n            </remarks>\r\n        </member>\r\n        <member name=\"T:System.Windows.Controls.ZoomableCanvas\">\r\n            <summary>\r\n            Defines an area within which you can explicitly position an infinite number of child elements by using coordinates that are relative to the <see cref=\"T:System.Windows.Controls.ZoomableCanvas\"/> area.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.ZoomableCanvas.ApplyTransformProperty\">\r\n            <summary>\r\n            Identifies the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.ApplyTransform\"/> dependency property.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.CoerceRenderTransform(System.Windows.DependencyObject,System.Object)\">\r\n            <summary>\r\n            Returns a transform applying the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Scale\"/> and <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Offset\"/> when <see cref=\"P:System.Windows.Controls.ZoomableCanvas.ApplyTransform\"/> is set to <c>true</c>.\r\n            </summary>\r\n            <param name=\"d\">Dependency object whos value is being coerced.</param>\r\n            <param name=\"value\">The original uncoerced value.</param>\r\n            <returns>A new transform if <see cref=\"P:System.Windows.Controls.ZoomableCanvas.ApplyTransform\"/> is set to <c>true</c>; otherwise, <paramref name=\"value\"/>.</returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.OnApplyTransformChanged(System.Windows.DependencyObject,System.Windows.DependencyPropertyChangedEventArgs)\">\r\n            <summary>\r\n            Handles the event that occurs when the value of the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.ApplyTransform\"/> dependency property has changed.\r\n            </summary>\r\n            <param name=\"d\">The dependency object on which the dependency property has changed.</param>\r\n            <param name=\"e\">The event args containing the old and new values of the dependency property.</param>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.ZoomableCanvas.ApplyTransform\">\r\n            <summary>\r\n            Gets or sets whether to automatically apply a <see cref=\"T:System.Windows.Media.ScaleTransform\"/> to the canvas.\r\n            </summary>\r\n            <value><c>true</c> or <c>false</c>.  The default is <see cref=\"!:true\"/>.</value>\r\n            <remarks>\r\n            The value of this dependency property is <c>true</c> by default, meaning that the <see cref=\"!:RenderTransform\"/> property will contain a <see cref=\"T:System.Windows.Media.Transform\"/> that scales the canvas and its children automatically.\r\n            This property can be set to <c>false</c> prevent the automatic transform.  This means that children are responsible for changing their appearance when the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Scale\"/> property changes.\r\n            Note that this property does not affect the <b>placement</b> of the elements; the children are automatically placed with the top-left corners of their elements at the appropriate positions on the screen, regardless of the value of <see cref=\"P:System.Windows.Controls.ZoomableCanvas.ApplyTransform\"/>.\r\n            <para>\r\n            Children will usually do this by simply changing their <see cref=\"!:Width\"/> and <see cref=\"!:Height\"/> to become larger or smaller when the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Scale\"/> property increases or decreases.\r\n            This is useful when pen widths are important, such as an element surrounded with a <see cref=\"T:System.Windows.Controls.Border\"/> with <see cref=\"P:System.Windows.Controls.Border.BorderThickness\"/> set to <c>1.0</c>.\r\n            If <see cref=\"P:System.Windows.Controls.ZoomableCanvas.ApplyTransform\"/> is <c>true</c>, then as <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Scale\"/> decreases the shape will be scaled down and the border stroke will become thinner than one pixel, possibly too thin to see even with sub-pixel rendering.\r\n            This is also true when drawing paths, edges of a graph, or any other element that uses <see cref=\"T:System.Windows.Media.Pen\"/> to draw lines and strokes.\r\n            In these cases setting <see cref=\"P:System.Windows.Controls.ZoomableCanvas.ApplyTransform\"/> to <c>false</c> and setting the <see cref=\"T:System.Windows.Shapes.Shape\"/>'s <see cref=\"P:System.Windows.Shapes.Shape.Stretch\"/> to <see cref=\"F:System.Windows.Media.Stretch.Fill\"/> while binding its <see cref=\"!:Width\"/> and <see cref=\"!:Height\"/> to a factor of <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Scale\"/> will often provide a better effect.\r\n            </para>\r\n            <para>\r\n            Another reason to set this property to <c>false</c> is when elements change their representation or visual state based on the scale (also known as \"semantic zoom\").\r\n            For example, imagine a canvas showing multiple thumbnails of spreadsheets and the relationships between their formulas and values.\r\n            When <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Scale\"/> is set to <c>1.0</c> (the default value), each spreadsheet element might be fully interactive, editable, and showing all rows and columns.\r\n            When zooming out, and <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Scale\"/> gets small enough that there is not enough room for each spreadsheet to show all of its rows and columns, it may change its representation into a bar chart or pie chart with axis values and a legend instead.\r\n            When zooming even further out, and <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Scale\"/> gets small enough that there is not enough room for the axis and legend, it may simply remove the axis and legend to make more room for the graphical portion of the chart.\r\n            Since the children of the canvas can be arbitary rich UIElements, they can dynamically change their representation and be interacted with at all levels of zoom.\r\n            This is in sharp contrast to multi-scale-image approaches such as Silverlight's Deep Zoom since those scenarios are simply performing linear scale transformations on pre-computed static bitmaps.\r\n            </para>\r\n            </remarks>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.ZoomableCanvas.ActualViewboxProperty\">\r\n            <summary>\r\n            Identifies the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.ActualViewbox\"/> dependency property.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.CoerceActualViewbox(System.Windows.DependencyObject,System.Object)\">\r\n            <summary>\r\n            Returns a <see cref=\"T:System.Windows.Rect\"/> representing the area of the canvas that is currently being displayed.\r\n            </summary>\r\n            <param name=\"d\">Dependency object whos value is being coerced.</param>\r\n            <param name=\"value\">The original uncoerced value.</param>\r\n            <returns>A <see cref=\"T:System.Windows.Rect\"/> representing the area of the canvas (in canvas coordinates) that is being displayed by this panel.</returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.OnActualViewboxChanged(System.Windows.DependencyObject,System.Windows.DependencyPropertyChangedEventArgs)\">\r\n            <summary>\r\n            Handles the event that occurs when the value of the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.ActualViewbox\"/> dependency property has changed.\r\n            </summary>\r\n            <param name=\"d\">The dependency object on which the dependency property has changed.</param>\r\n            <param name=\"e\">The event args containing the old and new values of the dependency property.</param>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.ZoomableCanvas.ActualViewbox\">\r\n            <summary>\r\n            Gets a <see cref=\"T:System.Windows.Rect\"/> representing the area of the canvas that is currently being displayed by this panel.\r\n            </summary>\r\n            <value>A <see cref=\"T:System.Windows.Rect\"/> representing the area of the canvas that is currently being displayed by this panel.</value>\r\n            <remarks>\r\n            The value of this property is automatically computed based on the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Scale\"/>, <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Offset\"/>, and <see cref=\"!:RenderSize\"/> of this panel.\r\n            It is independent (and usually different) from the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Viewbox\"/> dependency property.\r\n            </remarks>\r\n            <seealso cref=\"P:System.Windows.Controls.ZoomableCanvas.Viewbox\"/>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.ZoomableCanvas.ViewboxProperty\">\r\n            <summary>\r\n            Identifies the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Viewbox\"/> dependency property.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.IsViewboxValid(System.Object)\">\r\n            <summary>\r\n            Determines whether the value given is a valid value for the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Viewbox\"/> dependency property.\r\n            </summary>\r\n            <param name=\"value\">The potential value for the dependency property.</param>\r\n            <returns><c>true</c> if the value is a valid value for the property; otherwise, <c>false</c>.</returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.OnViewboxChanged(System.Windows.DependencyObject,System.Windows.DependencyPropertyChangedEventArgs)\">\r\n            <summary>\r\n            Handles the event that occurs when the value of the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Viewbox\"/> dependency property has changed.\r\n            </summary>\r\n            <param name=\"d\">The dependency object on which the dependency property has changed.</param>\r\n            <param name=\"e\">The event args containing the old and new values of the dependency property.</param>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.ZoomableCanvas.Viewbox\">\r\n            <summary>\r\n            Gets or sets the portion of the canvas (in canvas coordinates) that should be attempted to be displayed by this panel.\r\n            </summary>\r\n            <value>A <see cref=\"T:System.Windows.Rect\"/> specifying the portion of the canvas that should be displayed by this panel, or <see cref=\"P:System.Windows.Rect.Empty\"/> when unspecified.  The default value is <see cref=\"P:System.Windows.Rect.Empty\"/>.</value>\r\n            <remarks>\r\n            The area of the canvas shown by this panel can be controlled by either setting <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Scale\"/> and <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Offset\"/>, or by setting the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Viewbox\"/>, <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Stretch\"/>, and <see cref=\"P:System.Windows.Controls.ZoomableCanvas.StretchDirection\"/> properties.\r\n            When <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Viewbox\"/> is set to anything other than <see cref=\"P:System.Windows.Rect.Empty\"/>, the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Scale\"/> and <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Offset\"/> will be automatically coerced to appropriate values according to the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Stretch\"/> and <see cref=\"P:System.Windows.Controls.ZoomableCanvas.StretchDirection\"/> properties.\r\n            Note that the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Stretch\"/> mode of <see cref=\"F:System.Windows.Media.Stretch.Fill\"/> is not supported, so unless the aspect ratio of <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Viewbox\"/> exactly matches the aspect ratio of <see cref=\"!:RenderSize\"/> the actual area displayed will be more or less than <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Viewbox\"/>.\r\n            The exact area that is displayed can be determined by the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.ActualViewbox\"/> property in this case.\r\n            </remarks>\r\n            <seealso cref=\"P:System.Windows.Controls.ZoomableCanvas.Stretch\"/>\r\n            <seealso cref=\"P:System.Windows.Controls.ZoomableCanvas.StretchDirection\"/>\r\n            <seealso cref=\"P:System.Windows.Media.TileBrush.Viewbox\"/>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.ZoomableCanvas.StretchProperty\">\r\n            <summary>\r\n            Identifies the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Stretch\"/> dependency property.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.IsStretchValid(System.Object)\">\r\n            <summary>\r\n            Determines whether the value given is a valid value for the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Stretch\"/> dependency property.\r\n            </summary>\r\n            <param name=\"value\">The potential value for the dependency property.</param>\r\n            <returns><c>true</c> if the value is a valid value for the property; otherwise, <c>false</c>.</returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.OnStretchChanged(System.Windows.DependencyObject,System.Windows.DependencyPropertyChangedEventArgs)\">\r\n            <summary>\r\n            Handles the event that occurs when the value of the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Stretch\"/> dependency property has changed.\r\n            </summary>\r\n            <param name=\"d\">The dependency object on which the dependency property has changed.</param>\r\n            <param name=\"e\">The event args containing the old and new values of the dependency property.</param>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.ZoomableCanvas.Stretch\">\r\n            <summary>\r\n            Gets or sets a value that specifies how the content of the canvas is displayed when <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Viewbox\"/> is set.\r\n            </summary>\r\n            <value>One of the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Stretch\"/> values other than <see cref=\"F:System.Windows.Media.Stretch.Fill\"/>.  The default is <see cref=\"F:System.Windows.Media.Stretch.Uniform\"/>.</value>\r\n            <remarks>\r\n            Please see the documentation of <see cref=\"P:System.Windows.Media.TileBrush.Stretch\"/> for a detailed explanation of the effects of this property.\r\n            The <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Stretch\"/> mode of <see cref=\"F:System.Windows.Media.Stretch.Fill\"/> is not supported, so unless the aspect ratio of <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Viewbox\"/> exactly matches the aspect ratio of <see cref=\"!:RenderSize\"/> the actual area displayed will be more or less than <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Viewbox\"/>.\r\n            The exact area that is displayed can be determined by the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.ActualViewbox\"/> property in this case.\r\n            </remarks>\r\n            <seealso cref=\"P:System.Windows.Media.TileBrush.Stretch\"/>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.ZoomableCanvas.StretchDirectionProperty\">\r\n            <summary>\r\n            Identifies the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.StretchDirection\"/> dependency property.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.IsStretchDirectionValid(System.Object)\">\r\n            <summary>\r\n            Determines whether the value given is a valid value for the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.StretchDirection\"/> dependency property.\r\n            </summary>\r\n            <param name=\"value\">The potential value for the dependency property.</param>\r\n            <returns><c>true</c> if the value is a valid value for the property; otherwise, <c>false</c>.</returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.OnStretchDirectionChanged(System.Windows.DependencyObject,System.Windows.DependencyPropertyChangedEventArgs)\">\r\n            <summary>\r\n            Handles the event that occurs when the value of the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.StretchDirection\"/> dependency property has changed.\r\n            </summary>\r\n            <param name=\"d\">The dependency object on which the dependency property has changed.</param>\r\n            <param name=\"e\">The event args containing the old and new values of the dependency property.</param>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.ZoomableCanvas.StretchDirection\">\r\n            <summary>\r\n            Gets or sets how setting the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Viewbox\"/> property can affect the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Scale\"/>.\r\n            </summary>\r\n            <value>One of the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.StretchDirection\"/> values.  The default is <see cref=\"F:System.Windows.Controls.StretchDirection.Both\"/></value>\r\n            <remarks>\r\n            When setting the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Viewbox\"/> property, the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Scale\"/> and <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Offset\"/> properties are automatically coerced to the appropriate values according to the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Stretch\"/> and <see cref=\"P:System.Windows.Controls.ZoomableCanvas.StretchDirection\"/> properties, and any existing values of <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Scale\"/> and <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Offset\"/> will be overridden.\r\n            However, when the value of <see cref=\"P:System.Windows.Controls.ZoomableCanvas.StretchDirection\"/> is set to anything other than <see cref=\"F:System.Windows.Controls.StretchDirection.Both\"/>, then the setting of the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Scale\"/> property can limit the range of the automatically computed value.\r\n            The exact area that is displayed can be determined by the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.ActualViewbox\"/> property in this case.\r\n            </remarks>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.ZoomableCanvas.OffsetProperty\">\r\n            <summary>\r\n            Identifies the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Offset\"/> dependency property.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.IsOffsetValid(System.Object)\">\r\n            <summary>\r\n            Determines whether the value given is a valid value for the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Offset\"/> dependency property.\r\n            </summary>\r\n            <param name=\"value\">The potential value for the dependency property.</param>\r\n            <returns><c>true</c> if the value is a valid value for the property; otherwise, <c>false</c>.</returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.CoerceOffset(System.Windows.DependencyObject,System.Object)\">\r\n            <summary>\r\n            Returns a <see cref=\"T:System.Windows.Point\"/> representing top-left point of the canvas (in canvas coordinates) that is currently being displayed after taking <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Viewbox\"/> into account.\r\n            </summary>\r\n            <param name=\"d\">Dependency object whos value is being coerced.</param>\r\n            <param name=\"value\">The original uncoerced value.</param>\r\n            <returns>A <see cref=\"T:System.Windows.Point\"/> representing top-left point of the canvas (in canvas coordinates) that is currently being displayed.</returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.OnOffsetChanged(System.Windows.DependencyObject,System.Windows.DependencyPropertyChangedEventArgs)\">\r\n            <summary>\r\n            Handles the event that occurs when the value of the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Offset\"/> dependency property has changed.\r\n            </summary>\r\n            <param name=\"d\">The dependency object on which the dependency property has changed.</param>\r\n            <param name=\"e\">The event args containing the old and new values of the dependency property.</param>\r\n        </member>\r\n        <!-- Badly formed XML comment ignored for member \"P:System.Windows.Controls.ZoomableCanvas.Offset\" -->\r\n        <member name=\"F:System.Windows.Controls.ZoomableCanvas.ScaleProperty\">\r\n            <summary>\r\n            Identifies the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Scale\"/> dependency property.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.IsScaleValid(System.Object)\">\r\n            <summary>\r\n            Determines whether the value given is a valid value for the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Scale\"/> dependency property.\r\n            </summary>\r\n            <param name=\"value\">The potential value for the dependency property.</param>\r\n            <returns><c>true</c> if the value is a valid value for the property; otherwise, <c>false</c>.</returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.CoerceScale(System.Windows.DependencyObject,System.Object)\">\r\n            <summary>\r\n            Returns a <see cref=\"T:System.Double\"/> representing the scale of the content that is currently being displayed after taking <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Viewbox\"/>, <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Stretch\"/>, and <see cref=\"P:System.Windows.Controls.ZoomableCanvas.StretchDirection\"/> into account.\r\n            </summary>\r\n            <param name=\"d\">Dependency object whos value is being coerced.</param>\r\n            <param name=\"value\">The original uncoerced value.</param>\r\n            <returns>A <see cref=\"T:System.Double\"/> representing scale of the content that is currently being displayed.</returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.OnScaleChanged(System.Windows.DependencyObject,System.Windows.DependencyPropertyChangedEventArgs)\">\r\n            <summary>\r\n            Handles the event that occurs when the value of the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Scale\"/> dependency property has changed.\r\n            </summary>\r\n            <param name=\"d\">The dependency object on which the dependency property has changed.</param>\r\n            <param name=\"e\">The event args containing the old and new values of the dependency property.</param>\r\n        </member>\r\n        <!-- Badly formed XML comment ignored for member \"P:System.Windows.Controls.ZoomableCanvas.Scale\" -->\r\n        <member name=\"F:System.Windows.Controls.ZoomableCanvas.RealizationLimitProperty\">\r\n            <summary>\r\n            Identifies the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.RealizationLimit\"/> dependency property.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.IsRealizationLimitValid(System.Object)\">\r\n            <summary>\r\n            Determines whether the value given is a valid value for the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.RealizationLimit\"/> dependency property.\r\n            </summary>\r\n            <param name=\"value\">The potential value for the dependency property.</param>\r\n            <returns><c>true</c> if the value is a valid value for the property; otherwise, <c>false</c>.</returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.OnRealizationLimitChanged(System.Windows.DependencyObject,System.Windows.DependencyPropertyChangedEventArgs)\">\r\n            <summary>\r\n            Handles the event that occurs when the value of the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.RealizationLimit\"/> dependency property has changed.\r\n            </summary>\r\n            <param name=\"d\">The dependency object on which the dependency property has changed.</param>\r\n            <param name=\"e\">The event args containing the old and new values of the dependency property.</param>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.ZoomableCanvas.RealizationLimit\">\r\n            <summary>\r\n            Gets or sets the maximum number of elements that will be instantiated on the canvas when <see cref=\"!:IsVirtualizing\"/> is set to <see cref=\"!:true\"/>.\r\n            </summary>\r\n            <value>An <see cref=\"T:System.Int32\"/> between <c>0</c> and <see cref=\"F:System.Int32.MaxValue\"/>.  The default is <see cref=\"F:System.Int32.MaxValue\"/>.</value>\r\n            <remarks>\r\n            When the children of the canvas are being populated through an <see cref=\"T:System.Windows.Controls.ItemsControl\"/>, visual elements will be instantiated for the first <see cref=\"P:System.Windows.Controls.ZoomableCanvas.RealizationLimit\"/> items within the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.ActualViewbox\"/>.\r\n            </remarks>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.ZoomableCanvas.RealizationRateProperty\">\r\n            <summary>\r\n            Identifies the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.RealizationRate\"/> dependency property.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.IsRealizationRateValid(System.Object)\">\r\n            <summary>\r\n            Determines whether the value given is a valid value for the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.RealizationRate\"/> dependency property.\r\n            </summary>\r\n            <param name=\"value\">The potential value for the dependency property.</param>\r\n            <returns><c>true</c> if the value is a valid value for the property; otherwise, <c>false</c>.</returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.OnRealizationRateChanged(System.Windows.DependencyObject,System.Windows.DependencyPropertyChangedEventArgs)\">\r\n            <summary>\r\n            Handles the event that occurs when the value of the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.RealizationRate\"/> dependency property has changed.\r\n            </summary>\r\n            <param name=\"d\">The dependency object on which the dependency property has changed.</param>\r\n            <param name=\"e\">The event args containing the old and new values of the dependency property.</param>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.ZoomableCanvas.RealizationRate\">\r\n            <summary>\r\n            Gets or sets the maximum number of elements that will be realized or virtualized at one time before yielding control back to the dispatcher when <see cref=\"!:IsVirtualizing\"/> is set to <see cref=\"!:true\"/>.\r\n            </summary>\r\n            <value>An <see cref=\"T:System.Int32\"/> between <c>0</c> and <see cref=\"F:System.Int32.MaxValue\"/>.  The default is <see cref=\"F:System.Int32.MaxValue\"/>.</value>\r\n            <remarks>\r\n            By default, the value of this property is <see cref=\"F:System.Int32.MaxValue\"/> which means that all realization and virtualization happens at once, at the time determined by <see cref=\"!:RealizationPriority\"/>.\r\n            The default behavior is optimized to realize all elements as quickly as possible, at the expensive of application responsiveness while the realization is happening.\r\n            Setting the <see cref=\"!:RealizationPriority\"/> to <see cref=\"F:System.Windows.Threading.DispatcherPriority.Input\"/> and decreasing the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.RealizationRate\"/> will make the application feel more responsive but will take longer to realize all items.\r\n            </remarks>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.#cctor\">\r\n            <summary>\r\n            Performs a one-time initialization of <see cref=\"T:System.Windows.Controls.ZoomableCanvas\"/>-related metadata.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.#ctor\">\r\n            <summary>\r\n            Ensures coersion routines are invoked with their default values.\r\n            </summary>\r\n        </member>\r\n        <member name=\"T:System.Windows.Controls.ZoomableCanvas.ISpatialItemsSource\">\r\n            <summary>\r\n            Provides a two-dimensional index of items that can be quickly queried for all items that intersect a given rectangle.\r\n            </summary>\r\n            <remarks>\r\n            When the <see cref=\"T:System.Windows.Controls.ZoomableCanvas\"/> is hosting items for an <see cref=\"T:System.Windows.Controls.ItemsControl\"/>, the <see cref=\"P:System.Windows.Controls.ItemsControl.ItemsSource\"/> can implement this interface to greatly speed up virtualization in the canvas.\r\n            If any of those conditions are not true, then the canvas must realize every item at least once in order to determine its bounds before it can virtualize it, and then once it is virtualized it will have no means of moving spontaneously back into view.\r\n            </remarks>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.ZoomableCanvas.ISpatialItemsSource.Extent\">\r\n            <summary>\r\n            Gets the entire extent of the index, which is typically the union of all bounding boxes of all items within the set.\r\n            </summary>\r\n            <remarks>\r\n            This value is used when determining the extent of the scroll bars when the canvas is hosted in a scroll viewer.\r\n            </remarks>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.ISpatialItemsSource.Query(System.Windows.Rect)\">\r\n            <summary>\r\n            Gets the set of items that intersect the given rectangle.\r\n            </summary>\r\n            <param name=\"rectangle\">The area in which any intersecting items are returned.</param>\r\n            <returns>A result set of all items that intersect the given rectangle.</returns>\r\n            <remarks>\r\n            The enumerator returned by this method is used lazily and sometimes only partially, meaning it should return quickly without computing the entire result set immediately for best results.\r\n            </remarks>\r\n        </member>\r\n        <member name=\"E:System.Windows.Controls.ZoomableCanvas.ISpatialItemsSource.ExtentChanged\">\r\n            <summary>\r\n            Occurs when the value of the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.ISpatialItemsSource.Extent\"/> property has changed.\r\n            </summary>\r\n        </member>\r\n        <member name=\"E:System.Windows.Controls.ZoomableCanvas.ISpatialItemsSource.QueryInvalidated\">\r\n            <summary>\r\n            Occurs when the results of the last query are no longer valid and should be re-queried.\r\n            </summary>\r\n        </member>\r\n        <member name=\"T:System.Windows.Controls.ZoomableCanvas.PrivateSpatialIndex\">\r\n            <summary>\r\n            Private implementation of <see cref=\"T:System.Windows.Controls.ZoomableCanvas.ISpatialItemsSource\"/> when the items source is not one.\r\n            </summary>\r\n            <remarks>\r\n            This class efficiently implements a spatial index by internally using a PriorityQuadTree data structure.\r\n            </remarks>\r\n        </member>\r\n        <member name=\"T:System.Windows.Controls.ZoomableCanvas.PrivateSpatialIndex.SpatialItem\">\r\n            <summary>\r\n            Private class that holds an index/bounds pair.\r\n            </summary>\r\n            <remarks>\r\n            A Tuple could have been used instead except that we want Index to be mutable.\r\n            </remarks>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.ZoomableCanvas.PrivateSpatialIndex._tree\">\r\n            <summary>\r\n            We use a PriorityQuadTree to implement our spatial index.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.ZoomableCanvas.PrivateSpatialIndex._items\">\r\n            <summary>\r\n            This is a list of all of the spatial items in the index.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.ZoomableCanvas.PrivateSpatialIndex._extent\">\r\n            <summary>\r\n            Holds the accurate extent of all item bounds in the index.  This may be different from _tree.Extent.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.ZoomableCanvas.PrivateSpatialIndex._lastQuery\">\r\n            <summary>\r\n            Holds the last query used in order to know when to raise the <see cref=\"E:System.Windows.Controls.ZoomableCanvas.PrivateSpatialIndex.QueryInvalidated\"/> event.\r\n            </summary>\r\n        </member>\r\n        <member name=\"E:System.Windows.Controls.ZoomableCanvas.PrivateSpatialIndex.ExtentChanged\">\r\n            <summary>\r\n            Occurs when the value of the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.PrivateSpatialIndex.Extent\"/> property has changed.\r\n            </summary>\r\n        </member>\r\n        <member name=\"E:System.Windows.Controls.ZoomableCanvas.PrivateSpatialIndex.QueryInvalidated\">\r\n            <summary>\r\n            Occurs when the results of the last query are no longer valid and should be re-queried.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.PrivateSpatialIndex.Query(System.Windows.Rect)\">\r\n            <summary>\r\n            Get a list of the items that intersect the given bounds.\r\n            </summary>\r\n            <param name=\"bounds\">The bounds to test.</param>\r\n            <returns>\r\n            List of zero or more items that intersect the given bounds, returned in the order given by the priority assigned during Insert.\r\n            </returns>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.ZoomableCanvas.PrivateSpatialIndex.Extent\">\r\n            <summary>\r\n            Gets the computed minimum required rectangle to contain all of the items in the index.  This property is also settable for efficiency the future extent of the items is known.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.ZoomableCanvas.PrivateSpatialIndex.Item(System.Int32)\">\r\n            <summary>\r\n            Gets or sets the bounds for the item with the given <paramref name=\"index\"/>.\r\n            </summary>\r\n            <param name=\"index\">The index of the item.</param>\r\n            <returns>The bounds of the item, or <see cref=\"P:System.Windows.Rect.Empty\"/> if the bounds are unknown.</returns>\r\n            <remarks>\r\n            Items with bounnds of <see cref=\"P:System.Windows.Rect.Empty\"/> are always returned first from any query.\r\n            </remarks>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.PrivateSpatialIndex.InsertRange(System.Int32,System.Int32)\">\r\n            <summary>\r\n            Adds or inserts the given <see cref=\"!:count\"/> of items at the given <see cref=\"!:index\"/>.\r\n            </summary>\r\n            <param name=\"index\">The index at which to insert the items.</param>\r\n            <param name=\"count\">The number of items to insert.</param>\r\n            <remarks>\r\n            All items are inserted with bounds of <see cref=\"P:System.Windows.Rect.Empty\"/>, meaning they will be returned from all queries.\r\n            </remarks>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.PrivateSpatialIndex.RemoveRange(System.Int32,System.Int32)\">\r\n            <summary>\r\n            Removes the given <see cref=\"!:count\"/> of items at the given <see cref=\"!:index\"/>.\r\n            </summary>\r\n            <param name=\"index\">The index at which to remove from.</param>\r\n            <param name=\"count\">The number of items to remove.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.PrivateSpatialIndex.Reset(System.Int32)\">\r\n            <summary>\r\n            Clears and resets the spatial index to hold the given <see cref=\"!:count\"/> of items.\r\n            </summary>\r\n            <param name=\"count\">The number of items within the index.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.PrivateSpatialIndex.Optimize\">\r\n            <summary>\r\n            Optimizes the spatial index based on the current extent if optimization is warranted.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.ZoomableCanvas.SpatialIndex\">\r\n            <summary>\r\n            Two-dimentional spatial index of our data items.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.ZoomableCanvas.PrivateIndex\">\r\n            <summary>\r\n            Private implementation of <see cref=\"T:System.Windows.Controls.ZoomableCanvas.ISpatialItemsSource\"/> when the items source does not provide one.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.ZoomableCanvas.RealizedItems\">\r\n            <summary>\r\n            Ordered list of realized items based on the order they are returned from the spatial index.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.OnIsVirtualizingChanged(System.Boolean,System.Boolean)\">\r\n            <summary>\r\n            Handles the event that occurs when the value of the <see cref=\"P:System.Windows.Controls.VirtualPanel.IsVirtualizing\"/> property has changed.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.OnIsItemsHostChanged(System.Boolean,System.Boolean)\">\r\n            <summary>\r\n            Refreshes our data when the <see cref=\"P:System.Windows.Controls.Panel.IsItemsHost\"/> property has changed.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.OnItemsChanged(System.Object,System.Collections.Specialized.NotifyCollectionChangedEventArgs)\">\r\n            <summary>\r\n            Dispatches to specific methods to update the spatial index when the items have changed.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.OnItemsAdded(System.Int32,System.Collections.IList)\">\r\n            <summary>\r\n            Updates our private spatial index when items are added to the item source.\r\n            </summary>\r\n            <param name=\"index\">The index of the first item that was added.</param>\r\n            <param name=\"items\">The items that were added.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.OnItemsRemoved(System.Int32,System.Collections.IList)\">\r\n            <summary>\r\n            Updates our private spatial index when items are removed from the item source.\r\n            </summary>\r\n            <param name=\"index\">The old index of the first item that was removed.</param>\r\n            <param name=\"items\">The items that were removed.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.OnItemsReset\">\r\n            <summary>\r\n            Resets and initializes our spatial indices when the items source has changed.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.OnSpatialQueryInvalidated(System.Object,System.EventArgs)\">\r\n            <summary>\r\n            Invalidates reality when the last spatial query is no longer valid.\r\n            </summary>\r\n            <param name=\"sender\">The spatial index.</param>\r\n            <param name=\"e\">The event arguments.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.OnSpatialExtentChanged(System.Object,System.EventArgs)\">\r\n            <summary>\r\n            Invalidates the extent when the spatial index extent has changed.\r\n            </summary>\r\n            <param name=\"sender\">The spatial index.</param>\r\n            <param name=\"e\">The event arguments.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.RealizeOverride(System.Collections.IEnumerable,System.Object)\">\r\n            <summary>\r\n            Performs realization and virtualization in batches based on the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.RealizationRate\"/>. \r\n            </summary>\r\n            <param name=\"items\">The current items being hosted by this panel.</param>\r\n            <param name=\"state\">The previous return value of this method.</param>\r\n            <returns>A non-<c>null</c> value if further realization is required; otherwise, <c>null</c>.</returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.RealizeOverride\">\r\n            <summary>\r\n            Realizes and virtualizes items based on the current viewbox.\r\n            </summary>\r\n            <returns>An enumerator which allows this method to continue realization where it left off.</returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.OnRenderSizeChanged(System.Windows.SizeChangedInfo)\">\r\n            <summary>\r\n            Updates the calculated <see cref=\"P:System.Windows.Controls.ZoomableCanvas.ActualViewbox\"/> and the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Scale\"/> and <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Offset\"/> when the size changes.\r\n            </summary>\r\n            <param name=\"sizeInfo\">Size information about the render size.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.OnPositioningChanged(System.Windows.DependencyObject,System.Windows.DependencyPropertyChangedEventArgs)\">\r\n            <summary>\r\n            Invalidates the arrangement of canvases when their children's positions change.\r\n            </summary>\r\n            <param name=\"d\">Dependency object whos position has changed.</param>\r\n            <param name=\"e\">Event arguments related to the change.</param>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.ZoomableCanvas.AppliedScaleTransform\">\r\n            <summary>\r\n            Gets the applied scale transform if <see cref=\"P:System.Windows.Controls.ZoomableCanvas.ApplyTransform\"/> is set to <c>true</c>.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.ZoomableCanvas.AppliedTranslateTransform\">\r\n            <summary>\r\n            Gets the applied translate transform if <see cref=\"P:System.Windows.Controls.ZoomableCanvas.ApplyTransform\"/> is set to <c>true</c>.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.ScaleOverride(System.Double)\">\r\n            <summary>\r\n            Scales the child elements of a <see cref=\"T:System.Windows.Controls.ZoomableCanvas\"/> by applying a transform if <see cref=\"P:System.Windows.Controls.ZoomableCanvas.ApplyTransform\"/> is <c>true</c>, or by calling <see cref=\"!:FrameworkElement.InvalidateArrange\"/> otherwise.\r\n            </summary>\r\n            <param name=\"scale\">The new scale of the canvas.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.OffsetOverride(System.Windows.Point)\">\r\n            <summary>\r\n            Offsets the child elements of a <see cref=\"T:System.Windows.Controls.ZoomableCanvas\"/> by applying a transform if <see cref=\"P:System.Windows.Controls.ZoomableCanvas.ApplyTransform\"/> is <c>true</c>, or by calling <see cref=\"!:FrameworkElement.InvalidateArrange\"/> otherwise.\r\n            </summary>\r\n            <param name=\"offset\">The new offset of the canvas.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.MeasureOverride(System.Windows.Size)\">\r\n            <summary>\r\n            Measures the child elements of a <see cref=\"T:System.Windows.Controls.ZoomableCanvas\"/> in anticipation of arranging them during the <see cref=\"M:System.Windows.Controls.ZoomableCanvas.ArrangeOverride(System.Windows.Size)\"/> pass.\r\n            </summary>\r\n            <param name=\"availableSize\">An upper limit <see cref=\"T:System.Windows.Size\"/> that should not be exceeded.</param>\r\n            <returns>A <see cref=\"T:System.Windows.Size\"/> that represents the size that is required to arrange child content.</returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.ArrangeOverride(System.Windows.Size)\">\r\n            <summary>\r\n            Arranges the content of a <see cref=\"T:System.Windows.Controls.ZoomableCanvas\"/> element.\r\n            </summary>\r\n            <param name=\"finalSize\">The size that this <see cref=\"T:System.Windows.Controls.ZoomableCanvas\"/> element should use to arrange its child elements.</param>\r\n            <returns>A <see cref=\"T:System.Windows.Size\"/> that represents the arranged size of this <see cref=\"T:System.Windows.Controls.ZoomableCanvas\"/> element and its descendants.</returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.GetLayoutClip(System.Windows.Size)\">\r\n            <summary>\r\n            Returns a clipping geometry that indicates the area that will be clipped if the <see cref=\"P:System.Windows.UIElement.ClipToBounds\"/> property is set to <c>true</c>. \r\n            </summary>\r\n            <param name=\"layoutSlotSize\">The available size of the element.</param>\r\n            <returns>A <see cref=\"T:System.Windows.Media.Geometry\"/> that represents the area that is clipped if <see cref=\"P:System.Windows.UIElement.ClipToBounds\"/> is <c>true</c>.</returns>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.ZoomableCanvas.ChildrenExtent\">\r\n            <summary>\r\n            Represents the extent of the instantiated UIElements calculated during <see cref=\"M:System.Windows.Controls.ZoomableCanvas.ArrangeOverride(System.Windows.Size)\"/>.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Windows.Controls.ZoomableCanvas.ComputedExtent\">\r\n            <summary>\r\n            Caches the calculated <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Extent\"/> based on the spatial index and arranged children of the canvas until <see cref=\"M:System.Windows.Controls.ZoomableCanvas.InvalidateExtent\"/> is called.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.ZoomableCanvas.Extent\">\r\n            <summary>\r\n            Gets the extent of the populated area of the canvas (in canvas coordinates).\r\n            </summary>\r\n            <remarks>\r\n            This property is also used to determine the range of the scroll bars when the canvas is hosted within a <see cref=\"T:System.Windows.Controls.ScrollViewer\"/>.\r\n            </remarks>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.InvalidateExtent\">\r\n            <summary>\r\n            Re-computes the <see cref=\"P:System.Windows.Controls.ZoomableCanvas.Extent\"/> of items in the canvas and updates the parent scroll viewer if there is one.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.GetVisualPoint(System.Windows.Point)\">\r\n            <summary>\r\n            Gets the current visual coordinates for a given <see cref=\"T:System.Windows.Point\"/> on this <see cref=\"T:System.Windows.Controls.ZoomableCanvas\"/>.\r\n            </summary>\r\n            <param name=\"canvasPoint\">The <see cref=\"T:System.Windows.Point\"/> in canvas coordinates.</param>\r\n            <returns>The current position of the canvas point on the screen relative to the upper-left corner of this <see cref=\"T:System.Windows.Controls.ZoomableCanvas\"/>.</returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Controls.ZoomableCanvas.GetCanvasPoint(System.Windows.Point)\">\r\n            <summary>\r\n            Gets the point on the canvas that is currently represented by the given <see cref=\"T:System.Windows.Point\"/> on the screen.\r\n            </summary>\r\n            <param name=\"screenPoint\">The <see cref=\"T:System.Windows.Point\"/> on the screen relative to the upper-left corner of this <see cref=\"T:System.Windows.Controls.ZoomableCanvas\"/>.</param>\r\n            <returns>The point on the canvas that corresponds to the given point on the screen.</returns>\r\n        </member>\r\n        <member name=\"P:System.Windows.Controls.ZoomableCanvas.MousePosition\">\r\n            <summary>\r\n            Returns the the point on the canvas at which the mouse cursor is currently located.\r\n            </summary>\r\n        </member>\r\n        <member name=\"T:System.Windows.Automation.Peers.AccordionAutomationPeer\">\r\n            <summary>\r\n            Exposes Accordion types to UI Automation.\r\n            </summary>\r\n            <QualityBand>Preview</QualityBand>\r\n        </member>\r\n        <member name=\"P:System.Windows.Automation.Peers.AccordionAutomationPeer.OwnerAccordion\">\r\n            <summary>\r\n            Gets the Accordion that owns this AccordionAutomationPeer.\r\n            </summary>\r\n            <value>The accordion.</value>\r\n        </member>\r\n        <member name=\"M:System.Windows.Automation.Peers.AccordionAutomationPeer.#ctor(System.Windows.Controls.Accordion)\">\r\n            <summary>\r\n            Initializes a new instance of the <see cref=\"T:System.Windows.Automation.Peers.AccordionAutomationPeer\"/> class.\r\n            </summary>\r\n            <param name=\"owner\">The Accordion that is associated with this\r\n            AccordionAutomationPeer.</param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Automation.Peers.AccordionAutomationPeer.GetClassNameCore\">\r\n            <summary>\r\n            Gets the name of the Accordion that is associated with this\r\n            AccordionAutomationPeer.  This method is called by GetClassName.\r\n            </summary>\r\n            <returns>The name Accordion.</returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Automation.Peers.AccordionAutomationPeer.GetAutomationControlTypeCore\">\r\n            <summary>\r\n            Gets the control type for the Accordion that is associated\r\n            with this AccordionAutomationPeer.  This method is called by\r\n            GetAutomationControlType.\r\n            </summary>\r\n            <returns>List AutomationControlType.</returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Automation.Peers.AccordionAutomationPeer.GetPattern(System.Windows.Automation.Peers.PatternInterface)\">\r\n            <summary>\r\n            Gets the control pattern for the Accordion that is associated\r\n            with this AccordionAutomationPeer.\r\n            </summary>\r\n            <param name=\"patternInterface\">The desired PatternInterface.</param>\r\n            <returns>The desired AutomationPeer or null.</returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Automation.Peers.AccordionAutomationPeer.GetChildrenCore\">\r\n            <summary>\r\n            Gets the collection of child elements of \r\n            the <see cref=\"T:System.Windows.Controls.ItemsControl\"/> that is \r\n            associated with this <see cref=\"T:System.Windows.Automation.Peers.ItemsControlAutomationPeer\"/>.\r\n            </summary>\r\n            <returns>\r\n            A collection of AccordionItemAutomationPeer elements, or null if the\r\n            Accordion that is associated with this AccordionAutomationPeer is\r\n            empty.\r\n            </returns>\r\n        </member>\r\n        <member name=\"P:System.Windows.Automation.Peers.AccordionAutomationPeer.CanSelectMultiple\">\r\n            <summary>\r\n            Gets a value indicating whether the UI Automation provider \r\n            allows more than one child element to be selected concurrently.\r\n            </summary>\r\n            <returns>true if multiple selection is allowed; otherwise, false.\r\n            </returns>\r\n            <remarks>\r\n            This API supports the .NET Framework infrastructure and is not \r\n            intended to be used directly from your code.\r\n            </remarks>\r\n        </member>\r\n        <member name=\"M:System.Windows.Automation.Peers.AccordionAutomationPeer.GetSelection\">\r\n            <summary>\r\n            Retrieves a UI Automation provider for each child element that is \r\n            selected.\r\n            </summary>\r\n            <returns>An array of UI Automation providers.</returns>\r\n            <remarks>\r\n            This API supports the .NET Framework infrastructure and is not \r\n            intended to be used directly from your code.\r\n            </remarks>\r\n        </member>\r\n        <member name=\"P:System.Windows.Automation.Peers.AccordionAutomationPeer.IsSelectionRequired\">\r\n            <summary>\r\n            Gets a value indicating whether the UI Automation provider \r\n            requires at least one child element to be selected.\r\n            </summary>\r\n            <returns>true if selection is required; otherwise, false.\r\n            </returns>\r\n            <remarks>\r\n            This API supports the .NET Framework infrastructure and is not \r\n            intended to be used directly from your code.\r\n            </remarks>\r\n        </member>\r\n        <member name=\"M:System.Windows.Automation.Peers.AccordionAutomationPeer.CreateItemAutomationPeer(System.Object)\">\r\n            <summary>\r\n            Exposes a data item  to UI Automation.\r\n            </summary>\r\n            <param name=\"item\">The item to expose</param>\r\n            <returns>The UI automation object associated with the item</returns>\r\n        </member>\r\n        <member name=\"T:System.Windows.Automation.Peers.AccordionItemAutomationPeer\">\r\n            <summary>\r\n            Exposes AccordionItem types to UI Automation.\r\n            </summary>\r\n            <QualityBand>Preview</QualityBand>\r\n        </member>\r\n        <member name=\"P:System.Windows.Automation.Peers.AccordionItemAutomationPeer.OwnerAccordionItem\">\r\n            <summary>\r\n            Gets the AccordionItem that owns this AccordionItemAutomationPeer.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Automation.Peers.AccordionItemAutomationPeer.#ctor(System.Object,System.Windows.Automation.Peers.ItemsControlAutomationPeer)\">\r\n            <summary>\r\n            Initializes a new instance of the AccordionAutomationPeer class.\r\n            </summary>\r\n            <param name=\"item\">\r\n            The item associated with this AutomationPeer \r\n            </param>\r\n            <param name=\"itemsControlAutomationPeer\">\r\n            The Accordion that is associated with this item.\r\n            </param>\r\n        </member>\r\n        <member name=\"M:System.Windows.Automation.Peers.AccordionItemAutomationPeer.GetAutomationControlTypeCore\">\r\n            <summary>\r\n            Gets the control type for the AccordionItem that is associated\r\n            with this AccordionItemAutomationPeer.  This method is called by\r\n            GetAutomationControlType.\r\n            </summary>\r\n            <returns>Custom AutomationControlType.</returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Automation.Peers.AccordionItemAutomationPeer.GetClassNameCore\">\r\n            <summary>\r\n            Gets the name of the AccordionItem that is associated with this\r\n            AccordionItemAutomationPeer.  This method is called by GetClassName.\r\n            </summary>\r\n            <returns>The name AccordionItem.</returns>\r\n        </member>\r\n        <member name=\"M:System.Windows.Automation.Peers.AccordionItemAutomationPeer.GetPattern(System.Windows.Automation.Peers.PatternInterface)\">\r\n            <summary>\r\n            Gets the control pattern for the AccordionItem that is associated\r\n            with this AccordionItemAutomationPeer.\r\n            </summary>\r\n            <param name=\"patternInterface\">The desired PatternInterface.</param>\r\n            <returns>The desired AutomationPeer or null.</returns>\r\n        </member>\r\n        <member name=\"P:System.Windows.Automation.Peers.AccordionItemAutomationPeer.System#Windows#Automation#Provider#IExpandCollapseProvider#ExpandCollapseState\">\r\n            <summary>\r\n            Gets the state (expanded or collapsed) of the Accordion.\r\n            </summary>\r\n            <remarks>\r\n            This API supports the .NET Framework infrastructure and is not \r\n            intended to be used directly from your code.\r\n            </remarks>\r\n        </member>\r\n        <member name=\"M:System.Windows.Automation.Peers.AccordionItemAutomationPeer.System#Windows#Automation#Provider#IExpandCollapseProvider#Collapse\">\r\n            <summary>\r\n            Collapses the AccordionItem.\r\n            </summary>\r\n            <remarks>\r\n            This API supports the .NET Framework infrastructure and is not \r\n            intended to be used directly from your code.\r\n            </remarks>\r\n        </member>\r\n        <member name=\"M:System.Windows.Automation.Peers.AccordionItemAutomationPeer.System#Windows#Automation#Provider#IExpandCollapseProvider#Expand\">\r\n            <summary>\r\n            Expands the AccordionItem.\r\n            </summary>\r\n            <remarks>\r\n            This API supports the .NET Framework infrastructure and is not \r\n            intended to be used directly from your code.\r\n            </remarks>\r\n        </member>\r\n        <member name=\"M:System.Windows.Automation.Peers.AccordionItemAutomationPeer.System#Windows#Automation#Provider#ISelectionItemProvider#AddToSelection\">\r\n            <summary>\r\n            Adds the AccordionItem to the collection of selected items.\r\n            </summary>\r\n            <remarks>\r\n            This API supports the .NET Framework infrastructure and is not \r\n            intended to be used directly from your code.\r\n            </remarks>\r\n        </member>\r\n        <member name=\"P:System.Windows.Automation.Peers.AccordionItemAutomationPeer.System#Windows#Automation#Provider#ISelectionItemProvider#IsSelected\">\r\n            <summary>\r\n            Gets a value indicating whether the Accordion is selected.\r\n            </summary>\r\n            <remarks>\r\n            This API supports the .NET Framework infrastructure and is not \r\n            intended to be used directly from your code.\r\n            </remarks>\r\n        </member>\r\n        <member name=\"M:System.Windows.Automation.Peers.AccordionItemAutomationPeer.System#Windows#Automation#Provider#ISelectionItemProvider#RemoveFromSelection\">\r\n            <summary>\r\n            Removes the current Accordion from the collection of selected\r\n            items.\r\n            </summary>\r\n            <remarks>\r\n            This API supports the .NET Framework infrastructure and is not \r\n            intended to be used directly from your code.\r\n            </remarks>\r\n        </member>\r\n        <member name=\"M:System.Windows.Automation.Peers.AccordionItemAutomationPeer.System#Windows#Automation#Provider#ISelectionItemProvider#Select\">\r\n            <summary>\r\n            Clears selection from currently selected items and then proceeds to\r\n            select the current Accordion.\r\n            </summary>\r\n            <remarks>\r\n            This API supports the .NET Framework infrastructure and is not \r\n            intended to be used directly from your code.\r\n            </remarks>\r\n        </member>\r\n        <member name=\"P:System.Windows.Automation.Peers.AccordionItemAutomationPeer.System#Windows#Automation#Provider#ISelectionItemProvider#SelectionContainer\">\r\n            <summary>\r\n            Gets the UI Automation provider that implements ISelectionProvider\r\n            and acts as the container for the calling object.\r\n            </summary>\r\n            <remarks>\r\n            This API supports the .NET Framework infrastructure and is not \r\n            intended to be used directly from your code.\r\n            </remarks>\r\n        </member>\r\n        <member name=\"T:System.Windows.Automation.Peers.AccordionItemWrapperAutomationPeer\">\r\n            <summary>\r\n            Wraps an <see cref=\"T:System.Windows.Controls.AccordionItem\" />.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Windows.Automation.Peers.AccordionItemWrapperAutomationPeer.#ctor(System.Windows.Controls.AccordionItem)\">\r\n            <summary>\r\n            Constructor\r\n            </summary>\r\n            <param name=\"item\">The <see cref=\"T:System.Windows.Controls.AccordionItem\" /> to wrap.</param>\r\n        </member>\r\n        <member name=\"T:System.Collections.Generic.LinkedListExtensions\">\r\n            <summary>\r\n            Provides extension methods for LinkedList.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Collections.Generic.LinkedListExtensions.FindNext``1(System.Collections.Generic.LinkedList{``0},System.Collections.Generic.LinkedListNode{``0},``0)\">\r\n            <summary>\r\n            Finds the next node after the given node that contains the specified value.\r\n            </summary>\r\n            <typeparam name=\"T\">The type of value in the linked list.</typeparam>\r\n            <param name=\"list\">The linked list.</param>\r\n            <param name=\"node\">The node after which to search for the value in the linked list, or <c>null</c> to search from the beginning.</param>\r\n            <param name=\"value\">The value to locate in the linked list.</param>\r\n            <returns>The first node after the given node that contains the specified value, if found; otherwise, <c>null</c>.</returns>\r\n        </member>\r\n        <member name=\"M:System.Collections.Generic.LinkedListExtensions.FindPrevious``1(System.Collections.Generic.LinkedList{``0},System.Collections.Generic.LinkedListNode{``0},``0)\">\r\n            <summary>\r\n            Finds the previous node before the given node that contains the specified value.\r\n            </summary>\r\n            <typeparam name=\"T\">The type of value in the linked list.</typeparam>\r\n            <param name=\"list\">The linked list.</param>\r\n            <param name=\"node\">The node before which to search for the value in the linked list, or <c>null</c> to search from the end.</param>\r\n            <param name=\"value\">The value to locate in the linked list.</param>\r\n            <returns>The first node before the given node that contains the specified value, if found; otherwise, <c>null</c>.</returns>\r\n        </member>\r\n        <member name=\"T:System.Collections.Generic.PriorityQuadTree`1\">\r\n            <summary>\r\n            This class efficiently stores and lazily retrieves arbitrarily sized and positioned objects in a prioritized order in a quad-tree data structure.\r\n            This can be used to do efficient hit detection or visibility checks on objects in a two dimensional space.\r\n            The object does not need to implement any special interface because the Rect Bounds of those objects is handled as a separate argument to Insert.\r\n            </summary>\r\n            <remarks>\r\n            Original class written by Chris Lovett.\r\n            Prioritization and lazy enumeration added by Kael Rowan.\r\n            </remarks>\r\n        </member>\r\n        <!-- Badly formed XML comment ignored for member \"T:System.Collections.Generic.PriorityQuadTree`1.QuadNode\" -->\r\n        <member name=\"M:System.Collections.Generic.PriorityQuadTree`1.QuadNode.#ctor(`0,System.Windows.Rect,System.Double)\">\r\n            <summary>\r\n            Construct new QuadNode to wrap the given node with given bounds.\r\n            </summary>\r\n            <param name=\"node\">The node with generic type T.</param>\r\n            <param name=\"bounds\">The bounds of that node.</param>\r\n            <param name=\"priority\">The priority of that node.</param>\r\n        </member>\r\n        <member name=\"P:System.Collections.Generic.PriorityQuadTree`1.QuadNode.Node\">\r\n            <summary>\r\n            The wrapped node.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Collections.Generic.PriorityQuadTree`1.QuadNode.Bounds\">\r\n            <summary>\r\n            The Rect bounds of the node.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Collections.Generic.PriorityQuadTree`1.QuadNode.Priority\">\r\n            <summary>\r\n            The priority of the node.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Collections.Generic.PriorityQuadTree`1.QuadNode.Next\">\r\n            <summary>\r\n            QuadNodes form a linked list in the Quadrant.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Collections.Generic.PriorityQuadTree`1.QuadNode.InsertInto(System.Collections.Generic.PriorityQuadTree{`0}.QuadNode)\">\r\n            <summary>\r\n            Inserts this QuadNode into an existing list and returns the new tail of the list.\r\n            </summary>\r\n            <param name=\"tail\">The tail of an existing circular linked list of QuadNodes, or <c>null</c> if this is the first.</param>\r\n            <returns>The (possibly new) tail of the circular linked list after inserting this QuadNode into it.</returns>\r\n        </member>\r\n        <member name=\"M:System.Collections.Generic.PriorityQuadTree`1.QuadNode.GetNodesIntersecting(System.Windows.Rect)\">\r\n            <summary>\r\n            Walk the linked list of QuadNodes and check them against the given bounds.\r\n            </summary>\r\n            <param name=\"bounds\">The bounds to test against each node.</param>\r\n            <returns>A lazy list of nodes along with the priority of the next node.</returns>\r\n        </member>\r\n        <member name=\"M:System.Collections.Generic.PriorityQuadTree`1.QuadNode.GetNodesInside(System.Windows.Rect)\">\r\n            <summary>\r\n            Walk the linked list of QuadNodes and check them against the given bounds.\r\n            </summary>\r\n            <param name=\"bounds\">The bounds to test against each node.</param>\r\n            <returns>A lazy list of nodes along with the priority of the next node.</returns>\r\n        </member>\r\n        <member name=\"M:System.Collections.Generic.PriorityQuadTree`1.QuadNode.HasNodesIntersecting(System.Windows.Rect)\">\r\n            <summary>\r\n            Walk the linked list and test each node against the given bounds.\r\n            </summary>\r\n            <param name=\"bounds\">Bounds to test.</param>\r\n            <returns>Return true if a node in the list intersects the bounds.</returns>\r\n        </member>\r\n        <member name=\"M:System.Collections.Generic.PriorityQuadTree`1.QuadNode.HasNodesInside(System.Windows.Rect)\">\r\n            <summary>\r\n            Walk the linked list and test each node against the given bounds.\r\n            </summary>\r\n            <param name=\"bounds\">Bounds to test.</param>\r\n            <returns>Return true if a node in the list is inside the bounds.</returns>\r\n        </member>\r\n        <member name=\"T:System.Collections.Generic.PriorityQuadTree`1.Quadrant\">\r\n            <summary>\r\n            The quad tree is split up into four Quadrants and objects are stored in the quadrant that contains them\r\n            and each quadrant is split up into four child Quadrants recurrsively.  Objects that overlap more than\r\n            one quadrant are stored in the nodes list for this Quadrant.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Collections.Generic.PriorityQuadTree`1.Quadrant.#ctor(System.Windows.Rect)\">\r\n            <summary>\r\n            Construct new Quadrant with a given bounds all nodes stored inside this quadrant\r\n            will fit inside this bounds.  \r\n            </summary>\r\n            <param name=\"bounds\">The bounds of this quadrant</param>\r\n        </member>\r\n        <member name=\"M:System.Collections.Generic.PriorityQuadTree`1.Quadrant.Insert(`0,System.Windows.Rect,System.Double,System.Int32)\">\r\n            <summary>\r\n            Insert the given node.\r\n            </summary>\r\n            <param name=\"node\">The wrapped node.</param>\r\n            <param name=\"bounds\">The bounds of that node.</param>\r\n            <param name=\"priority\">The priority of that node.</param>\r\n            <param name=\"depth\">The recursive depth of this call, to avoid stack overflows.</param>\r\n            <returns>The quadrant that ultimately holds the node.</returns>            \r\n        </member>\r\n        <member name=\"M:System.Collections.Generic.PriorityQuadTree`1.Quadrant.Remove(`0,System.Windows.Rect)\">\r\n            <summary>\r\n            Removes the first occurance of the given node from this quadrant or any child quadrants within the search bounds.\r\n            </summary>\r\n            <param name=\"node\">The node to remove.</param>\r\n            <param name=\"bounds\">The bounds to search within.</param>\r\n            <returns><c>true</c> if the node was found and removed; otherwise, <c>false</c>.</returns>\r\n        </member>\r\n        <member name=\"M:System.Collections.Generic.PriorityQuadTree`1.Quadrant.GetNodesIntersecting(System.Windows.Rect)\">\r\n            <summary>\r\n            Returns all nodes in this quadrant that intersect the given bounds.\r\n            The nodes are returned in order of descending priority.\r\n            </summary>\r\n            <param name=\"bounds\">The bounds that intersects the nodes you want returned.</param>\r\n            <returns>A lazy list of nodes along with the new potential of this quadrant.</returns>\r\n        </member>\r\n        <member name=\"M:System.Collections.Generic.PriorityQuadTree`1.Quadrant.GetNodesInside(System.Windows.Rect)\">\r\n            <summary>\r\n            Returns all nodes in this quadrant that are fully contained within the given bounds.\r\n            The nodes are returned in order of descending priority.\r\n            </summary>\r\n            <param name=\"bounds\">The bounds that contains the nodes you want returned.</param>\r\n            <returns>A lazy list of nodes along with the new potential of this quadrant.</returns>\r\n        </member>\r\n        <member name=\"M:System.Collections.Generic.PriorityQuadTree`1.Quadrant.HasNodesInside(System.Windows.Rect)\">\r\n            <summary>\r\n            Return true if there are any nodes in this Quadrant are inside the given bounds.\r\n            </summary>\r\n            <param name=\"bounds\">The bounds to test</param>\r\n            <returns><c>true</c> if this quadrant or its subquadrants has nodes inside the bounds; otherwise, <c>false</c>.</returns>\r\n        </member>\r\n        <member name=\"M:System.Collections.Generic.PriorityQuadTree`1.Quadrant.HasNodesIntersecting(System.Windows.Rect)\">\r\n            <summary>\r\n            Return true if there are any nodes in this Quadrant that intersect the given bounds.\r\n            </summary>\r\n            <param name=\"bounds\">The bounds to test</param>\r\n            <returns><c>true</c> if this quadrant or its subquadrants has nodes intersecting the bounds; otherwise, <c>false</c>.</returns>\r\n        </member>\r\n        <member name=\"M:System.Collections.Generic.PriorityQuadTree`1.Quadrant.RemoveNode(`0)\">\r\n            <summary>\r\n            Remove the given node from this Quadrant.(non-recursive)\r\n            </summary>\r\n            <param name=\"node\">The node to remove.</param>            \r\n            <returns>Returns true if the node was found and removed.</returns>\r\n        </member>\r\n        <member name=\"M:System.Collections.Generic.PriorityQuadTree`1.Quadrant.CalculatePotential\">\r\n            <summary>\r\n            The maximum priority for this quadrant's and all of its subquadrants' nodes.\r\n            </summary>\r\n            <returns>The maximum priority for this quadrant's and all of its subquadrants' nodes.</returns>\r\n            <remarks>This call assumes that the potential is correctly set on the subquadrants.</remarks>\r\n        </member>\r\n        <member name=\"M:System.Collections.Generic.PriorityQuadTree`1.Quadrant.GetEnumerator\">\r\n            <summary>\r\n            Enumerates over all nodes within this quadrant in random order.\r\n            </summary>\r\n            <returns>\r\n            Enumerator that enumerates over all its nodes.\r\n            </returns>\r\n        </member>\r\n        <member name=\"F:System.Collections.Generic.PriorityQuadTree`1._extent\">\r\n            <summary>\r\n            The extent defines the subdivisible bounds of the quad tree index.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Collections.Generic.PriorityQuadTree`1._root\">\r\n            <summary>\r\n            The outer PriorityQuadTree class is essentially just a wrapper around a tree of Quadrants.\r\n            </summary>\r\n        </member>\r\n        <member name=\"F:System.Collections.Generic.PriorityQuadTree`1.MaxTreeDepth\">\r\n            <summary>\r\n            The MaxTreeDepth limit is required since recursive calls can go that deep if item bounds (height or width) are very small compared to Extent (height or width).\r\n            The max depth will prevent stack overflow exception in some of the recursive calls we make.\r\n            With a value of 50 the item bounds can be 2^-50 times the extent before the tree stops growing in height.\r\n            </summary>\r\n        </member>\r\n        <member name=\"P:System.Collections.Generic.PriorityQuadTree`1.Extent\">\r\n            <summary>\r\n            The extent determines the overall quad-tree indexing strategy.\r\n            Changing this bounds is expensive since it has to re-divide the entire thing - like a re-hash operation.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Collections.Generic.PriorityQuadTree`1.Insert(`0,System.Windows.Rect,System.Double)\">\r\n            <summary>\r\n            Insert an item with given bounds and priority into this QuadTree.\r\n            </summary>\r\n            <param name=\"item\">The item to insert.</param>\r\n            <param name=\"bounds\">The bounds of this item.</param>\r\n            <param name=\"priority\">The priority to return this item before others in query results.</param>\r\n        </member>\r\n        <member name=\"M:System.Collections.Generic.PriorityQuadTree`1.HasItemsInside(System.Windows.Rect)\">\r\n            <summary>\r\n            Gets whether any items are fully inside the given bounds.\r\n            </summary>\r\n            <param name=\"bounds\">The bounds to test.</param>\r\n            <returns><c>true</c> if any items are inside the given bounds; otherwise, <c>false</c>.</returns>\r\n        </member>\r\n        <member name=\"M:System.Collections.Generic.PriorityQuadTree`1.GetItemsInside(System.Windows.Rect)\">\r\n            <summary>\r\n            Get a list of the items that are fully inside the given bounds.\r\n            </summary>\r\n            <param name=\"bounds\">The bounds to test.</param>\r\n            <returns>The items that are inside the given bounds, returned in the order given by the priority assigned during Insert.</returns>\r\n        </member>\r\n        <member name=\"M:System.Collections.Generic.PriorityQuadTree`1.HasItemsIntersecting(System.Windows.Rect)\">\r\n            <summary>\r\n            Gets whether any items intersect the given bounds.\r\n            </summary>\r\n            <param name=\"bounds\">The bounds to test.</param>\r\n            <returns><c>true</c> if any items intersect the given bounds; otherwise, <c>false</c>.</returns>\r\n        </member>\r\n        <member name=\"M:System.Collections.Generic.PriorityQuadTree`1.GetItemsIntersecting(System.Windows.Rect)\">\r\n            <summary>\r\n            Get list of nodes that intersect the given bounds.\r\n            </summary>\r\n            <param name=\"bounds\">The bounds to test.</param>\r\n            <returns>The items that intersect the given bounds, returned in the order given by the priority assigned during Insert.</returns>\r\n        </member>\r\n        <member name=\"M:System.Collections.Generic.PriorityQuadTree`1.Remove(`0)\">\r\n            <summary>\r\n            Removes the first instance of the given item from the tree (if it exists) by searching through the entire tree for the item.\r\n            </summary>\r\n            <param name=\"item\">The item to remove.</param>\r\n            <returns><c>true</c> if the item was found and removed; otherwise, <c>false</c>.</returns>\r\n            <remarks>\r\n            This overload does a full search through the entire tree for the item.\r\n            Clients should instead call the overload that takes a <see cref=\"T:System.Windows.Rect\"/> if the bounds of the item are known.\r\n            </remarks>\r\n        </member>\r\n        <member name=\"M:System.Collections.Generic.PriorityQuadTree`1.Remove(`0,System.Windows.Rect)\">\r\n            <summary>\r\n            Removes the first instance of the given item that intersects the given bounds from the tree (if it exists).\r\n            </summary>\r\n            <param name=\"item\">The item to remove.</param>\r\n            <param name=\"bounds\">The bounds within to search for the item.</param>\r\n            <returns><c>true</c> if the item was found and removed; otherwise, <c>false</c>.</returns>\r\n            <remarks>\r\n            This overload does a partial search through the tree, so if the <paramref name=\"bounds\"/> do not intersect the node then the node will be missed.\r\n            Clients should instead call the overload that does not take a <see cref=\"T:System.Windows.Rect\"/> if the bounds of the item are not known.\r\n            </remarks>\r\n        </member>\r\n        <member name=\"M:System.Collections.Generic.PriorityQuadTree`1.Clear\">\r\n            <summary>\r\n            Removes all nodes from the tree.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Collections.Generic.PriorityQuadTree`1.ReIndex\">\r\n            <summary>\r\n            Rebuilds all the Quadrants according to the current QuadTree Bounds.\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:System.Collections.Generic.PriorityQuadTree`1.GetEnumerator\">\r\n            <summary>\r\n            Returns all items in the tree in unspecified order.\r\n            </summary>\r\n            <returns>An enumerator over all items in the tree in random order.</returns>\r\n            <remarks>To get all items in the tree in prioritized-order then simply call <see cref=\"M:System.Collections.Generic.PriorityQuadTree`1.GetItemsInside(System.Windows.Rect)\"/> with an infinitely large rectangle.</remarks>\r\n        </member>\r\n        <member name=\"M:System.Collections.Generic.PriorityQuadTree`1.System#Collections#IEnumerable#GetEnumerator\">\r\n            <summary>\r\n            Returns all items in the tree in unspecified order.\r\n            </summary>\r\n            <returns>An enumerator over all items in the tree in random order.</returns>\r\n            <remarks>To get all items in the tree in prioritized-order then simply call <see cref=\"M:System.Collections.Generic.PriorityQuadTree`1.GetItemsInside(System.Windows.Rect)\"/> with an infinitely large rectangle.</remarks>\r\n        </member>\r\n        <member name=\"T:System.Collections.Generic.PriorityQueue`2\">\r\n            <summary>\r\n            Represents a queue of items that are sorted based on individual priorities.\r\n            </summary>\r\n            <typeparam name=\"T\">Specifies the type of elements in the queue.</typeparam>\r\n            <typeparam name=\"TPriority\">Specifies the type of object representing the priority.</typeparam>\r\n        </member>\r\n        <member name=\"T:XamlGeneratedNamespace.GeneratedInternalTypeHelper\">\r\n            <summary>\r\n            GeneratedInternalTypeHelper\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:XamlGeneratedNamespace.GeneratedInternalTypeHelper.CreateInstance(System.Type,System.Globalization.CultureInfo)\">\r\n            <summary>\r\n            CreateInstance\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:XamlGeneratedNamespace.GeneratedInternalTypeHelper.GetPropertyValue(System.Reflection.PropertyInfo,System.Object,System.Globalization.CultureInfo)\">\r\n            <summary>\r\n            GetPropertyValue\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:XamlGeneratedNamespace.GeneratedInternalTypeHelper.SetPropertyValue(System.Reflection.PropertyInfo,System.Object,System.Object,System.Globalization.CultureInfo)\">\r\n            <summary>\r\n            SetPropertyValue\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:XamlGeneratedNamespace.GeneratedInternalTypeHelper.CreateDelegate(System.Type,System.Object,System.String)\">\r\n            <summary>\r\n            CreateDelegate\r\n            </summary>\r\n        </member>\r\n        <member name=\"M:XamlGeneratedNamespace.GeneratedInternalTypeHelper.AddEventHandler(System.Reflection.EventInfo,System.Object,System.Delegate)\">\r\n            <summary>\r\n            AddEventHandler\r\n            </summary>\r\n        </member>\r\n    </members>\r\n</doc>\r\n"
  },
  {
    "path": "WpfToolkit/Layout/Themes/Generic.xaml",
    "content": "﻿<!--\r\n// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n-->\r\n\r\n<ResourceDictionary xmlns:layoutPrimitivesToolkit=\"clr-namespace:System.Windows.Controls.Primitives\" xmlns:layoutToolkit=\"clr-namespace:System.Windows.Controls\" xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" xmlns:sys=\"clr-namespace:System;assembly=mscorlib\">\r\n\r\n    <!--  layoutPrimitivesToolkit:AccordionButton  -->\r\n    <Style TargetType=\"layoutPrimitivesToolkit:AccordionButton\">\r\n        <Setter Property=\"BorderThickness\" Value=\"0\" />\r\n        <Setter Property=\"Background\" Value=\"White\" />\r\n        <Setter Property=\"HorizontalAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"True\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"layoutPrimitivesToolkit:AccordionButton\">\r\n                    <Grid Margin=\"{TemplateBinding Padding}\" Background=\"Transparent\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"ExpandDirectionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"ExpandDown\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"icon\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>0</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"icon\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>0</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>0</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>Auto</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"cd1\" Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>*</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimation BeginTime=\"00:00:00\" Duration=\"00:00:00\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)\" To=\"-90\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ExpandUp\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"icon\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"icon\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>0</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>*</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"cd1\" Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>Auto</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimation BeginTime=\"00:00:00\" Duration=\"00:00:00\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)\" To=\"90\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ExpandLeft\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"icon\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"icon\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>0</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>Auto</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"rd1\" Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>*</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"LayoutTransform\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <TransformGroup>\r\n                                                        <RotateTransform Angle=\"90\" />\r\n                                                    </TransformGroup>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimation BeginTime=\"00:00:00\" Duration=\"00:00:00\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)\" To=\"0\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ExpandRight\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"icon\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>0</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"icon\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>0</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>0</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>*</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"rd1\" Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>Auto</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"LayoutTransform\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <TransformGroup>\r\n                                                        <RotateTransform Angle=\"-90\" />\r\n                                                    </TransformGroup>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimation BeginTime=\"00:00:00\" Duration=\"00:00:00\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)\" To=\"180\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"ExpansionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Collapsed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation BeginTime=\"00:00:00\" Duration=\"00:00:00.3\" Storyboard.TargetName=\"icon\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)\" To=\"0\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Expanded\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation BeginTime=\"00:00:00\" Duration=\"00:00:00.3\" Storyboard.TargetName=\"icon\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)\" To=\"90\" />\r\n                                        <ColorAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"ExpandedBackground\" Storyboard.TargetProperty=\"(Border.Background).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#FFBADDE9\" />\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"ExpandedBackground\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Checked\" />\r\n                                <VisualState x:Name=\"Unchecked\" />\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                    <VisualTransition From=\"MouseOver\" GeneratedDuration=\"00:00:00.1\" To=\"Normal\" />\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\" />\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimation BeginTime=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(Path.Stroke).(SolidColorBrush.Color)\" To=\"#222\" />\r\n                                        <ColorAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"MouseOverBackground\" Storyboard.TargetProperty=\"(Border.Background).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#FFBADDE9\" />\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"MouseOverBackground\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.3\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimation BeginTime=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(Path.Stroke).(SolidColorBrush.Color)\" To=\"#FF003366\" />\r\n                                        <ColorAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"MouseOverBackground\" Storyboard.TargetProperty=\"(Border.Background).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#ff737573\" />\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard />\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.385\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"background\" Background=\"{TemplateBinding Background}\" CornerRadius=\"1,1,1,1\">\r\n                            <Grid>\r\n                                <Border Height=\"Auto\" Margin=\"0,0,0,0\" x:Name=\"ExpandedBackground\" VerticalAlignment=\"Stretch\" Opacity=\"0\" Background=\"#FFBADDE9\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"1,1,1,1\" />\r\n                                <Border Height=\"Auto\" Margin=\"0,0,0,0\" x:Name=\"MouseOverBackground\" VerticalAlignment=\"Stretch\" Opacity=\"0\" Background=\"#FFBDBDBD\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"1,1,1,1\" />\r\n                                <Grid Background=\"Transparent\">\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition Width=\"Auto\" x:Name=\"cd0\" />\r\n                                        <ColumnDefinition Width=\"Auto\" x:Name=\"cd1\" />\r\n                                    </Grid.ColumnDefinitions>\r\n                                    <Grid.RowDefinitions>\r\n                                        <RowDefinition Height=\"Auto\" x:Name=\"rd0\" />\r\n                                        <RowDefinition Height=\"Auto\" x:Name=\"rd1\" />\r\n                                    </Grid.RowDefinitions>\r\n                                    <Grid Height=\"19\" HorizontalAlignment=\"Center\" x:Name=\"icon\" VerticalAlignment=\"Center\" Width=\"19\" RenderTransformOrigin=\"0.5,0.5\" Grid.Column=\"0\" Grid.Row=\"0\">\r\n                                        <Grid.RenderTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform />\r\n                                                <SkewTransform />\r\n                                                <RotateTransform Angle=\"-90\" />\r\n                                                <TranslateTransform />\r\n                                            </TransformGroup>\r\n                                        </Grid.RenderTransform>\r\n                                        <Path Height=\"Auto\" HorizontalAlignment=\"Center\" Margin=\"0,0,0,0\" x:Name=\"arrow\" VerticalAlignment=\"Center\" Width=\"Auto\" RenderTransformOrigin=\"0.5,0.5\" Stroke=\"#666\" StrokeThickness=\"2\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\">\r\n                                            <Path.RenderTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform />\r\n                                                    <SkewTransform />\r\n                                                    <RotateTransform />\r\n                                                    <TranslateTransform />\r\n                                                </TransformGroup>\r\n                                            </Path.RenderTransform>\r\n                                        </Path>\r\n                                    </Grid>\r\n                                    <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"6,6,6,0\" x:Name=\"header\" Grid.Column=\"1\" Grid.Row=\"0\" Grid.RowSpan=\"1\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" />\r\n                                </Grid>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Rectangle x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" RadiusX=\"1\" RadiusY=\"1\" Stroke=\"#FF6DBDD1\" StrokeThickness=\"1\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  layoutPrimitivesToolkit:ExpandableContentControl  -->\r\n    <Style TargetType=\"layoutPrimitivesToolkit:ExpandableContentControl\">\r\n    <Setter Property=\"IsEnabled\" Value=\"true\" />\r\n    <Setter Property=\"Cursor\" Value=\"Arrow\" />\r\n    <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n    <Setter Property=\"BorderThickness\" Value=\"0\" />\r\n    <Setter Property=\"Padding\" Value=\"0\" />\r\n    <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n    <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n    <Setter Property=\"Template\">\r\n      <Setter.Value>\r\n        <ControlTemplate TargetType=\"layoutPrimitivesToolkit:ExpandableContentControl\">\r\n          <ContentPresenter x:Name=\"ContentSite\" Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Margin=\"0\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" />\r\n        </ControlTemplate>\r\n      </Setter.Value>\r\n    </Setter>\r\n  </Style>\r\n\r\n    <!--  layoutToolkit:Accordion  -->\r\n    <Style TargetType=\"layoutToolkit:Accordion\">\r\n    <Setter Property=\"Foreground\" Value=\"#FF000000\" />\r\n    <Setter Property=\"BorderBrush\" Value=\"#FFEAEAEA\" />\r\n    <Setter Property=\"HorizontalAlignment\" Value=\"Left\" />\r\n    <Setter Property=\"VerticalAlignment\" Value=\"Top\" />\r\n    <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n    <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n    <Setter Property=\"Cursor\" Value=\"Arrow\" />\r\n    <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n    <Setter Property=\"Padding\" Value=\"0\" />\r\n    <Setter Property=\"Margin\" Value=\"0\" />\r\n    <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n    <!-- Accordion expects a stackpanel to layout its children. -->\r\n    <Setter Property=\"ItemsPanel\">\r\n      <Setter.Value>\r\n        <ItemsPanelTemplate>\r\n          <StackPanel VerticalAlignment=\"Top\" />\r\n        </ItemsPanelTemplate>\r\n      </Setter.Value>\r\n    </Setter>\r\n    <Setter Property=\"Template\">\r\n      <Setter.Value>\r\n        <ControlTemplate TargetType=\"layoutToolkit:Accordion\">\r\n          <Grid x:Name=\"Root\">\r\n            <VisualStateManager.VisualStateGroups>\r\n              <!-- common states -->\r\n              <VisualStateGroup x:Name=\"CommonStates\">\r\n                <VisualState x:Name=\"Normal\" />\r\n                <VisualState x:Name=\"Pressed\" />\r\n                <VisualState x:Name=\"MouseOver\" />\r\n                <VisualState x:Name=\"Disabled\" />\r\n              </VisualStateGroup>\r\n              <!-- focus states -->\r\n              <VisualStateGroup x:Name=\"FocusStates\">\r\n                <VisualState x:Name=\"Focused\" />\r\n                <VisualState x:Name=\"Unfocused\" />\r\n              </VisualStateGroup>\r\n            </VisualStateManager.VisualStateGroups>\r\n            <Border x:Name=\"Border\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\">\r\n              <ScrollViewer IsTabStop=\"False\" HorizontalScrollBarVisibility=\"Disabled\" VerticalScrollBarVisibility=\"Disabled\" Background=\"{x:Null}\" BorderBrush=\"Transparent\" Margin=\"0\" Padding=\"0\" BorderThickness=\"0\">\r\n                <ItemsPresenter />\r\n              </ScrollViewer>\r\n              </Border>\r\n          </Grid>\r\n        </ControlTemplate>\r\n      </Setter.Value>\r\n    </Setter>\r\n  </Style>\r\n\r\n    <!--  layoutToolkit:AccordionItem  -->\r\n    <Style TargetType=\"layoutToolkit:AccordionItem\">\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"#FFECECEC\" />\r\n        <Setter Property=\"Background\" Value=\"White\" />\r\n        <Setter Property=\"Margin\" Value=\"0\" />\r\n        <Setter Property=\"Padding\" Value=\"0\" />\r\n        <Setter Property=\"HorizontalAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"layoutToolkit:AccordionItem\">\r\n                    <!-- Background=\"{TemplateBinding Background}\"  -->\r\n                    <Grid Background=\"Blue\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <!-- CommonState -->\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"Pressed\" />\r\n                                <VisualState x:Name=\"MouseOver\" />\r\n                                <VisualState x:Name=\"Disabled\" />\r\n                            </VisualStateGroup>\r\n                            <!-- FocusStates -->\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\" />\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                            <!-- ExpansionStates -->\r\n                            <VisualStateGroup x:Name=\"ExpansionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Collapsed\">\r\n                                    <Storyboard x:Name=\"AccordionItemCollapsedStoryboard\">\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(layoutPrimitivesToolkit:ExpandableContentControl.Percentage)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00.3\" KeySpline=\"0.2,0,0,1\" Value=\"0\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00.3\" Duration=\"00:00:00\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Expanded\">\r\n                                    <Storyboard x:Name=\"AccordionItemExpandedStoryboard\">\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(layoutPrimitivesToolkit:ExpandableContentControl.Percentage)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00.3\" KeySpline=\"0.2,0,0,1\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <!-- ExpansionStates -->\r\n                            <VisualStateGroup x:Name=\"LockedStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Locked\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"IsEnabled\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Boolean>False</sys:Boolean>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unlocked\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"IsEnabled\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Boolean>True</sys:Boolean>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <!-- ExpandDirectionStates-->\r\n                            <VisualStateGroup x:Name=\"ExpandDirectionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"ExpandDown\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd1\" Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>*</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>*</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ExpandUp\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>0</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>*</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>*</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ExpandLeft\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.ColumnSpan)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.ColumnSpan)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.RowSpan)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>2</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.RowSpan)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>2</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>0</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>*</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>*</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ExpandRight\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.ColumnSpan)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.ColumnSpan)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.RowSpan)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>2</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.RowSpan)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>2</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>0</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>*</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd1\" Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>*</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"Background\" Padding=\"{TemplateBinding Padding}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"1,1,1,1\">\r\n                            <Grid>\r\n                                <Grid.RowDefinitions>\r\n                                    <RowDefinition Height=\"Auto\" x:Name=\"rd0\" />\r\n                                    <RowDefinition Height=\"Auto\" x:Name=\"rd1\" />\r\n                                </Grid.RowDefinitions>\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\" x:Name=\"cd0\" />\r\n                                    <ColumnDefinition Width=\"Auto\" x:Name=\"cd1\" />\r\n                                </Grid.ColumnDefinitions>\r\n\r\n                                <layoutPrimitivesToolkit:AccordionButton Name=\"ExpanderButton\" Style=\"{TemplateBinding AccordionButtonStyle}\" Content=\"{TemplateBinding Header}\" ContentTemplate=\"{TemplateBinding HeaderTemplate}\" IsChecked=\"{TemplateBinding IsSelected}\" IsTabStop=\"True\" Grid.Row=\"0\" Padding=\"0,0,0,0\" Margin=\"0,0,0,0\" FontFamily=\"{TemplateBinding FontFamily}\" FontSize=\"{TemplateBinding FontSize}\" FontStretch=\"{TemplateBinding FontStretch}\" FontStyle=\"{TemplateBinding FontStyle}\" FontWeight=\"{TemplateBinding FontWeight}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\" Background=\"{TemplateBinding Background}\" />\r\n                                <layoutPrimitivesToolkit:ExpandableContentControl Name=\"ExpandSite\" Grid.Row=\"1\" IsTabStop=\"False\" Percentage=\"0\" RevealMode=\"{TemplateBinding ExpandDirection}\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Margin=\"0,0,0,0\" Style=\"{TemplateBinding ExpandableContentControlStyle}\" FontFamily=\"{TemplateBinding FontFamily}\" FontSize=\"{TemplateBinding FontSize}\" FontStretch=\"{TemplateBinding FontStretch}\" FontStyle=\"{TemplateBinding FontStyle}\" FontWeight=\"{TemplateBinding FontWeight}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\" />\r\n                            </Grid>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    \r\n    <!--  layoutToolkit:TransitioningContentControl  -->\r\n    <Style TargetType=\"layoutToolkit:TransitioningContentControl\">\r\n        <Setter Property=\"IsTabStop\" Value=\"True\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"Transition\" Value=\"DefaultTransition\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"layoutToolkit:TransitioningContentControl\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"PresentationStates\">\r\n                                <VisualState x:Name=\"DefaultTransition\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CurrentContentPresentationSite\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\" />\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00.300\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PreviousContentPresentationSite\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00.300\" Value=\"0\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Normal\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PreviousContentPresentationSite\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n\r\n                                <VisualState x:Name=\"UpTransition\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CurrentContentPresentationSite\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\" />\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00.300\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CurrentContentPresentationSite\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"30\" />\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00.300\" Value=\"0\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PreviousContentPresentationSite\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00.300\" Value=\"0\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PreviousContentPresentationSite\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\" />\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00.300\" Value=\"-30\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n\r\n                                <VisualState x:Name=\"DownTransition\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CurrentContentPresentationSite\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\" />\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00.300\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CurrentContentPresentationSite\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"-40\" />\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00.300\" Value=\"0\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PreviousContentPresentationSite\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00.300\" Value=\"0\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PreviousContentPresentationSite\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\" />\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00.300\" Value=\"40\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\">\r\n                            <Grid>\r\n                                <ContentPresenter x:Name=\"PreviousContentPresentationSite\" Content=\"{x:Null}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\">\r\n                                    <ContentPresenter.RenderTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform />\r\n                                            <SkewTransform />\r\n                                            <RotateTransform />\r\n                                            <TranslateTransform />\r\n                                        </TransformGroup>\r\n                                    </ContentPresenter.RenderTransform>\r\n                                </ContentPresenter>\r\n\r\n                                <ContentPresenter x:Name=\"CurrentContentPresentationSite\" Content=\"{x:Null}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\">\r\n                                    <ContentPresenter.RenderTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform />\r\n                                            <SkewTransform />\r\n                                            <RotateTransform />\r\n                                            <TranslateTransform />\r\n                                        </TransformGroup>\r\n                                    </ContentPresenter.RenderTransform>\r\n                                </ContentPresenter>\r\n                            </Grid>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/Layout/TransitioningContentControl/System/Windows/Controls/TransitioningContentControl.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Media;\r\nusing System.Globalization;\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Represents a control with a single piece of content and when that content \r\n    /// changes performs a transition animation. \r\n    /// </summary>\r\n    /// <QualityBand>Experimental</QualityBand>\r\n    /// <remarks>The API for this control will change considerably in the future.</remarks>\r\n    [TemplateVisualState(GroupName = PresentationGroup, Name = NormalState)]\r\n    [TemplateVisualState(GroupName = PresentationGroup, Name = DefaultTransitionState)]\r\n    [TemplatePart(Name = PreviousContentPresentationSitePartName, Type = typeof(ContentControl))]\r\n    [TemplatePart(Name = CurrentContentPresentationSitePartName, Type = typeof(ContentControl))]\r\n    public class TransitioningContentControl : ContentControl\r\n    {\r\n        #region Visual state names\r\n        /// <summary>\r\n        /// The name of the group that holds the presentation states.\r\n        /// </summary>\r\n        private const string PresentationGroup = \"PresentationStates\";\r\n\r\n        /// <summary>\r\n        /// The name of the state that represents a normal situation where no\r\n        /// transition is currently being used.\r\n        /// </summary>\r\n        private const string NormalState = \"Normal\";\r\n\r\n        /// <summary>\r\n        /// The name of the state that represents the default transition.\r\n        /// </summary>\r\n        public const string DefaultTransitionState = \"DefaultTransition\";\r\n        #endregion Visual state names\r\n\r\n        #region Template part names\r\n        /// <summary>\r\n        /// The name of the control that will display the previous content.\r\n        /// </summary>\r\n        internal const string PreviousContentPresentationSitePartName = \"PreviousContentPresentationSite\";\r\n\r\n        /// <summary>\r\n        /// The name of the control that will display the current content.\r\n        /// </summary>\r\n        internal const string CurrentContentPresentationSitePartName = \"CurrentContentPresentationSite\";\r\n\r\n        #endregion Template part names\r\n\r\n        #region TemplateParts\r\n        /// <summary>\r\n        /// Gets or sets the current content presentation site.\r\n        /// </summary>\r\n        /// <value>The current content presentation site.</value>\r\n        private ContentPresenter CurrentContentPresentationSite { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the previous content presentation site.\r\n        /// </summary>\r\n        /// <value>The previous content presentation site.</value>\r\n        private ContentPresenter PreviousContentPresentationSite { get; set; } \r\n        #endregion TemplateParts\r\n\r\n        #region public bool IsTransitioning\r\n\r\n        /// <summary>\r\n        /// Indicates whether the control allows writing IsTransitioning.\r\n        /// </summary>\r\n        private bool _allowIsTransitioningWrite;\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether this instance is currently performing\r\n        /// a transition.\r\n        /// </summary>\r\n        public bool IsTransitioning\r\n        {\r\n            get { return (bool)GetValue(IsTransitioningProperty); }\r\n            private set\r\n            {\r\n                _allowIsTransitioningWrite = true;\r\n                SetValue(IsTransitioningProperty, value);\r\n                _allowIsTransitioningWrite = false;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the IsTransitioning dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty IsTransitioningProperty =\r\n            DependencyProperty.Register(\r\n                \"IsTransitioning\",\r\n                typeof(bool),\r\n                typeof(TransitioningContentControl),\r\n                new PropertyMetadata(OnIsTransitioningPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// IsTransitioningProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">TransitioningContentControl that changed its IsTransitioning.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnIsTransitioningPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            TransitioningContentControl source = (TransitioningContentControl)d;\r\n\r\n            if (!source._allowIsTransitioningWrite)\r\n            {\r\n                source.IsTransitioning = (bool)e.OldValue;\r\n                throw new InvalidOperationException(Properties.Resources.TransitiotioningContentControl_IsTransitioningReadOnly);\r\n            }\r\n        }\r\n        #endregion public bool IsTransitioning\r\n\r\n        /// <summary>\r\n        /// The storyboard that is used to transition old and new content.\r\n        /// </summary>\r\n        private Storyboard _currentTransition;\r\n\r\n        /// <summary>\r\n        /// Gets or sets the storyboard that is used to transition old and new content.\r\n        /// </summary>\r\n        private Storyboard CurrentTransition\r\n        {\r\n            get { return _currentTransition; }\r\n            set\r\n            {\r\n                // decouple event\r\n                if (_currentTransition != null)\r\n                {\r\n                    _currentTransition.Completed -= OnTransitionCompleted;\r\n                }\r\n\r\n                _currentTransition = value;\r\n\r\n                if (_currentTransition != null)\r\n                {\r\n                    _currentTransition.Completed += OnTransitionCompleted;\r\n                }\r\n            }\r\n        }\r\n\r\n        #region public string Transition\r\n        /// <summary>\r\n        /// Gets or sets the name of the transition to use. These correspond\r\n        /// directly to the VisualStates inside the PresentationStates group.\r\n        /// </summary>\r\n        public string Transition\r\n        {\r\n            get { return GetValue(TransitionProperty) as string; }\r\n            set { SetValue(TransitionProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the Transition dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty TransitionProperty =\r\n            DependencyProperty.Register(\r\n                \"Transition\",\r\n                typeof(string),\r\n                typeof(TransitioningContentControl),\r\n                new PropertyMetadata(DefaultTransitionState, OnTransitionPropertyChanged));\r\n\r\n        /// <summary>\r\n        /// TransitionProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">TransitioningContentControl that changed its Transition.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnTransitionPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            TransitioningContentControl source = (TransitioningContentControl)d;\r\n            string oldTransition = e.NewValue as string;\r\n            string newTransition = e.NewValue as string;\r\n\r\n            if (source.IsTransitioning)\r\n            {\r\n                source.AbortTransition();\r\n            }          \r\n  \r\n            // find new transition\r\n            Storyboard newStoryboard = source.GetStoryboard(newTransition);\r\n\r\n            // unable to find the transition.\r\n            if (newStoryboard == null)\r\n            {\r\n                // could be during initialization of xaml that presentationgroups was not yet defined\r\n                if (VisualStates.TryGetVisualStateGroup(source, PresentationGroup) == null)\r\n                {\r\n                    // will delay check\r\n                    source.CurrentTransition = null;\r\n                }\r\n                else\r\n                {\r\n                    // revert to old value\r\n                    source.SetValue(TransitionProperty, oldTransition);\r\n\r\n                    throw new ArgumentException(\r\n                        string.Format(CultureInfo.CurrentCulture, Properties.Resources.TransitioningContentControl_TransitionNotFound, newTransition));\r\n          }\r\n            }\r\n            else\r\n            {\r\n                source.CurrentTransition = newStoryboard;\r\n            }\r\n        }\r\n        #endregion public string Transition\r\n\r\n        #region public bool RestartTransitionOnContentChange\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether the current transition\r\n        /// will be aborted when setting new content during a transition.\r\n        /// </summary>\r\n        public bool RestartTransitionOnContentChange\r\n        {\r\n            get { return (bool)GetValue(RestartTransitionOnContentChangeProperty); }\r\n            set { SetValue(RestartTransitionOnContentChangeProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the RestartTransitionOnContentChange dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty RestartTransitionOnContentChangeProperty =\r\n            DependencyProperty.Register(\r\n                \"RestartTransitionOnContentChange\",\r\n                typeof(bool),\r\n                typeof(TransitioningContentControl),\r\n                new PropertyMetadata(false, OnRestartTransitionOnContentChangePropertyChanged));\r\n\r\n        /// <summary>\r\n        /// RestartTransitionOnContentChangeProperty property changed handler.\r\n        /// </summary>\r\n        /// <param name=\"d\">TransitioningContentControl that changed its RestartTransitionOnContentChange.</param>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private static void OnRestartTransitionOnContentChangePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            ((TransitioningContentControl) d).OnRestartTransitionOnContentChangeChanged((bool) e.OldValue, (bool) e.NewValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the RestartTransitionOnContentChangeProperty changes.\r\n        /// </summary>\r\n        /// <param name=\"oldValue\">The old value of RestartTransitionOnContentChange.</param>\r\n        /// <param name=\"newValue\">The new value of RestartTransitionOnContentChange.</param>\r\n        protected virtual void OnRestartTransitionOnContentChangeChanged(bool oldValue, bool newValue)\r\n        {\r\n        }\r\n        #endregion public bool RestartTransitionOnContentChange\r\n\r\n        #region Events\r\n        /// <summary>\r\n        /// Occurs when the current transition has completed.\r\n        /// </summary>\r\n        public event RoutedEventHandler TransitionCompleted;\r\n        #endregion Events\r\n\r\n#if !SILVERLIGHT\r\n        /// <summary>\r\n        /// Static constructor\r\n        /// </summary>\r\n        static TransitioningContentControl()\r\n        {\r\n            DefaultStyleKeyProperty.OverrideMetadata(typeof(TransitioningContentControl), new FrameworkPropertyMetadata(typeof(TransitioningContentControl)));\r\n        }\r\n#endif\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the <see cref=\"TransitioningContentControl\"/> class.\r\n        /// </summary>\r\n        public TransitioningContentControl()\r\n        {\r\n#if SILVERLIGHT\r\n            DefaultStyleKey = typeof(TransitioningContentControl);\r\n#endif\r\n        }\r\n\r\n        /// <summary>\r\n        /// Builds the visual tree for the TransitioningContentControl control \r\n        /// when a new template is applied.\r\n        /// </summary>\r\n        public override void OnApplyTemplate()\r\n        {\r\n            if (IsTransitioning)\r\n            {\r\n                AbortTransition();\r\n            }\r\n\r\n            base.OnApplyTemplate();\r\n\r\n            PreviousContentPresentationSite = GetTemplateChild(PreviousContentPresentationSitePartName) as ContentPresenter;\r\n            CurrentContentPresentationSite = GetTemplateChild(CurrentContentPresentationSitePartName) as ContentPresenter;\r\n\r\n            if (CurrentContentPresentationSite != null)\r\n            {\r\n                CurrentContentPresentationSite.Content = Content;\r\n            }\r\n\r\n            // hookup currenttransition\r\n            Storyboard transition = GetStoryboard(Transition);\r\n            CurrentTransition = transition;\r\n            if (transition == null)\r\n            {\r\n                string invalidTransition = Transition;\r\n                // revert to default\r\n                Transition = DefaultTransitionState;\r\n\r\n                throw new ArgumentException(\r\n                    string.Format(CultureInfo.CurrentCulture, Properties.Resources.TransitioningContentControl_TransitionNotFound, invalidTransition));\r\n            }\r\n\r\n            VisualStateManager.GoToState(this, NormalState, false);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the value of the <see cref=\"P:System.Windows.Controls.ContentControl.Content\"/> property changes.\r\n        /// </summary>\r\n        /// <param name=\"oldContent\">The old value of the <see cref=\"P:System.Windows.Controls.ContentControl.Content\"/> property.</param>\r\n        /// <param name=\"newContent\">The new value of the <see cref=\"P:System.Windows.Controls.ContentControl.Content\"/> property.</param>\r\n        protected override void OnContentChanged(object oldContent, object newContent)\r\n        {\r\n            base.OnContentChanged(oldContent, newContent);\r\n\r\n            StartTransition(oldContent, newContent);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Starts the transition.\r\n        /// </summary>\r\n        /// <param name=\"oldContent\">The old content.</param>\r\n        /// <param name=\"newContent\">The new content.</param>\r\n        [SuppressMessage(\"Microsoft.Usage\", \"CA1801:ReviewUnusedParameters\", MessageId = \"newContent\", Justification = \"Should be used in the future.\")]\r\n        private void StartTransition(object oldContent, object newContent)\r\n        {\r\n            // both presenters must be available, otherwise a transition is useless.\r\n            if (CurrentContentPresentationSite != null && PreviousContentPresentationSite != null)\r\n            {\r\n                CurrentContentPresentationSite.Content = newContent;\r\n\r\n                PreviousContentPresentationSite.Content = oldContent;\r\n\r\n                // and start a new transition\r\n                if (!IsTransitioning || RestartTransitionOnContentChange)\r\n                {\r\n                    IsTransitioning = true;\r\n                    VisualStateManager.GoToState(this, NormalState, false);\r\n                    VisualStateManager.GoToState(this, Transition, true);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the Completed event of the transition storyboard.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source of the event.</param>\r\n        /// <param name=\"e\">The <see cref=\"System.EventArgs\"/> instance containing the event data.</param>\r\n        private void OnTransitionCompleted(object sender, EventArgs e)\r\n        {\r\n            AbortTransition();\r\n\r\n            RoutedEventHandler handler = TransitionCompleted;\r\n            if (handler != null)\r\n            {\r\n                handler(this, new RoutedEventArgs());\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Aborts the transition and releases the previous content.\r\n        /// </summary>\r\n        public void AbortTransition()\r\n        {\r\n            // go to normal state and release our hold on the old content.\r\n            VisualStateManager.GoToState(this, NormalState, false);\r\n            IsTransitioning = false;\r\n            if (PreviousContentPresentationSite != null)\r\n            {\r\n                PreviousContentPresentationSite.Content = null;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Attempts to find a storyboard that matches the newTransition name.\r\n        /// </summary>\r\n        /// <param name=\"newTransition\">The new transition.</param>\r\n        /// <returns>A storyboard or null, if no storyboard was found.</returns>\r\n        private Storyboard GetStoryboard(string newTransition)\r\n        {\r\n            VisualStateGroup presentationGroup = VisualStates.TryGetVisualStateGroup(this, PresentationGroup);\r\n            Storyboard newStoryboard = null;\r\n            if (presentationGroup != null)\r\n            {\r\n                newStoryboard = presentationGroup.States\r\n                    .OfType<VisualState>()\r\n                    .Where(state => state.Name == newTransition)\r\n                    .Select(state => state.Storyboard)\r\n                    .FirstOrDefault();\r\n            }\r\n            return newStoryboard;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Layout/ZoomableCanvas/LinkedListExtensions.cs",
    "content": "﻿namespace System.Collections.Generic\r\n{\r\n    /// <summary>\r\n    /// Provides extension methods for LinkedList.\r\n    /// </summary>\r\n    public static class LinkedListExtensions\r\n    {\r\n        /// <summary>\r\n        /// Finds the next node after the given node that contains the specified value.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The type of value in the linked list.</typeparam>\r\n        /// <param name=\"list\">The linked list.</param>\r\n        /// <param name=\"node\">The node after which to search for the value in the linked list, or <c>null</c> to search from the beginning.</param>\r\n        /// <param name=\"value\">The value to locate in the linked list.</param>\r\n        /// <returns>The first node after the given node that contains the specified value, if found; otherwise, <c>null</c>.</returns>\r\n        public static LinkedListNode<T> FindNext<T>(this LinkedList<T> list, LinkedListNode<T> node, T value)\r\n        {\r\n            if (list == null)\r\n            {\r\n                throw new ArgumentNullException(\"list\");\r\n            }\r\n            \r\n            if (node == null)\r\n            {\r\n                return list.Find(value);\r\n            }\r\n\r\n            if (list != node.List)\r\n            {\r\n                throw new ArgumentException(\"The list does not contain the given node.\");\r\n            }\r\n\r\n            EqualityComparer<T> comparer = EqualityComparer<T>.Default;\r\n\r\n            // Skip the given node.\r\n            node = node.Next;\r\n            while (node != null)\r\n            {\r\n                if (value != null)\r\n                {\r\n                    if (comparer.Equals(node.Value, value))\r\n                    {\r\n                        return node;\r\n                    }\r\n                }\r\n                else if (node.Value == null)\r\n                {\r\n                    return node;\r\n                }\r\n                node = node.Next;\r\n            }\r\n\r\n            return null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Finds the previous node before the given node that contains the specified value.\r\n        /// </summary>\r\n        /// <typeparam name=\"T\">The type of value in the linked list.</typeparam>\r\n        /// <param name=\"list\">The linked list.</param>\r\n        /// <param name=\"node\">The node before which to search for the value in the linked list, or <c>null</c> to search from the end.</param>\r\n        /// <param name=\"value\">The value to locate in the linked list.</param>\r\n        /// <returns>The first node before the given node that contains the specified value, if found; otherwise, <c>null</c>.</returns>\r\n        public static LinkedListNode<T> FindPrevious<T>(this LinkedList<T> list, LinkedListNode<T> node, T value)\r\n        {\r\n            if (list == null)\r\n            {\r\n                throw new ArgumentNullException(\"list\");\r\n            }\r\n\r\n            if (node == null)\r\n            {\r\n                return list.FindLast(value);\r\n            }\r\n\r\n            if (list != node.List)\r\n            {\r\n                throw new ArgumentException(\"The list does not contain the given node.\");\r\n            }\r\n\r\n            EqualityComparer<T> comparer = EqualityComparer<T>.Default;\r\n\r\n            // Skip the given node.\r\n            node = node.Previous;\r\n            while (node != null)\r\n            {\r\n                if (value != null)\r\n                {\r\n                    if (comparer.Equals(node.Value, value))\r\n                    {\r\n                        return node;\r\n                    }\r\n                }\r\n                else if (node.Value == null)\r\n                {\r\n                    return node;\r\n                }\r\n                node = node.Previous;\r\n            }\r\n\r\n            return null;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Layout/ZoomableCanvas/PriorityQuadTree.cs",
    "content": "﻿using System;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls.Extensions;\r\n\r\nnamespace System.Collections.Generic\r\n{\r\n    /// <summary>\r\n    /// This class efficiently stores and lazily retrieves arbitrarily sized and positioned objects in a prioritized order in a quad-tree data structure.\r\n    /// This can be used to do efficient hit detection or visibility checks on objects in a two dimensional space.\r\n    /// The object does not need to implement any special interface because the Rect Bounds of those objects is handled as a separate argument to Insert.\r\n    /// </summary>\r\n    /// <remarks>\r\n    /// Original class written by Chris Lovett.\r\n    /// Prioritization and lazy enumeration added by Kael Rowan.\r\n    /// </remarks>\r\n    [System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Naming\", \"CA1710:IdentifiersShouldHaveCorrectSuffix\")]\r\n    public class PriorityQuadTree<T> : IEnumerable<T>\r\n    {\r\n        /// <summary>\r\n        /// Each node stored in the tree has a position, width & height.        \r\n        /// </summary>\r\n        private class QuadNode\r\n        {\r\n            private readonly Rect _bounds; // the bounds of the node\r\n            private readonly T _node; // the actual object being stored here.\r\n            private readonly double _priority; // the priority of the object being stored here.\r\n            private QuadNode _next; // linked in a circular list.\r\n\r\n            /// <summary>\r\n            /// Construct new QuadNode to wrap the given node with given bounds.\r\n            /// </summary>\r\n            /// <param name=\"node\">The node with generic type T.</param>\r\n            /// <param name=\"bounds\">The bounds of that node.</param>\r\n            /// <param name=\"priority\">The priority of that node.</param>\r\n            public QuadNode(T node, Rect bounds, double priority)\r\n            {\r\n                _node = node;\r\n                _bounds = bounds;\r\n                _priority = priority;\r\n            }\r\n\r\n            /// <summary>\r\n            /// The wrapped node.\r\n            /// </summary>\r\n            public T Node\r\n            {\r\n                get { return _node; }\r\n            }\r\n\r\n            /// <summary>\r\n            /// The Rect bounds of the node.\r\n            /// </summary>\r\n            public Rect Bounds\r\n            {\r\n                get { return _bounds; }\r\n            }\r\n\r\n            /// <summary>\r\n            /// The priority of the node.\r\n            /// </summary>\r\n            public double Priority\r\n            {\r\n                get { return _priority; }\r\n            }\r\n\r\n            /// <summary>\r\n            /// QuadNodes form a linked list in the Quadrant.\r\n            /// </summary>\r\n            public QuadNode Next\r\n            {\r\n                get { return _next; }\r\n                set { _next = value; }\r\n            }\r\n\r\n            /// <summary>\r\n            /// Inserts this QuadNode into an existing list and returns the new tail of the list.\r\n            /// </summary>\r\n            /// <param name=\"tail\">The tail of an existing circular linked list of QuadNodes, or <c>null</c> if this is the first.</param>\r\n            /// <returns>The (possibly new) tail of the circular linked list after inserting this QuadNode into it.</returns>\r\n            public QuadNode InsertInto(QuadNode tail)\r\n            {\r\n                if (tail == null)\r\n                {\r\n                    Next = this;\r\n                    tail = this;\r\n                }\r\n                else\r\n                {\r\n                    // link up in circular link list.\r\n                    if (Priority < tail.Priority)\r\n                    {\r\n                        Next = tail.Next;\r\n                        tail.Next = this;\r\n                        tail = this;\r\n                    }\r\n                    else\r\n                    {\r\n                        QuadNode x;\r\n                        for (x = tail; x.Next != tail && Priority < x.Next.Priority; x = x.Next) ;\r\n                        Next = x.Next;\r\n                        x.Next = this;\r\n                    }\r\n                }\r\n                return tail;\r\n            }\r\n\r\n            /// <summary>\r\n            /// Walk the linked list of QuadNodes and check them against the given bounds.\r\n            /// </summary>\r\n            /// <param name=\"bounds\">The bounds to test against each node.</param>\r\n            /// <returns>A lazy list of nodes along with the priority of the next node.</returns>\r\n            public IEnumerable<Tuple<QuadNode, double>> GetNodesIntersecting(Rect bounds)\r\n            {\r\n                QuadNode n = this;\r\n                do\r\n                {\r\n                    n = n.Next; // first node.\r\n                    if (bounds.Intersects(n.Bounds))\r\n                    {\r\n                        yield return Tuple.Create(n, n != this ? n.Next.Priority : double.NaN);\r\n                    }\r\n                } while (n != this);\r\n            }\r\n\r\n            /// <summary>\r\n            /// Walk the linked list of QuadNodes and check them against the given bounds.\r\n            /// </summary>\r\n            /// <param name=\"bounds\">The bounds to test against each node.</param>\r\n            /// <returns>A lazy list of nodes along with the priority of the next node.</returns>\r\n            public IEnumerable<Tuple<QuadNode, double>> GetNodesInside(Rect bounds)\r\n            {\r\n                QuadNode n = this;\r\n                do\r\n                {\r\n                    n = n.Next; // first node.\r\n                    if (bounds.Contains(n.Bounds))\r\n                    {\r\n                        yield return Tuple.Create(n, n != this ? n.Next.Priority : double.NaN);\r\n                    }\r\n                } while (n != this);\r\n            }\r\n\r\n            /// <summary>\r\n            /// Walk the linked list and test each node against the given bounds.\r\n            /// </summary>\r\n            /// <param name=\"bounds\">Bounds to test.</param>\r\n            /// <returns>Return true if a node in the list intersects the bounds.</returns>\r\n            public bool HasNodesIntersecting(Rect bounds)\r\n            {\r\n                QuadNode n = this;\r\n                do\r\n                {\r\n                    n = n.Next; // first node.\r\n                    if (bounds.Intersects(n.Bounds))\r\n                    {\r\n                        return true;\r\n                    }\r\n                } while (n != this);\r\n\r\n                return false;\r\n            }\r\n\r\n            /// <summary>\r\n            /// Walk the linked list and test each node against the given bounds.\r\n            /// </summary>\r\n            /// <param name=\"bounds\">Bounds to test.</param>\r\n            /// <returns>Return true if a node in the list is inside the bounds.</returns>\r\n            public bool HasNodesInside(Rect bounds)\r\n            {\r\n                QuadNode n = this;\r\n                do\r\n                {\r\n                    n = n.Next; // first node.\r\n                    if (bounds.Contains(n.Bounds))\r\n                    {\r\n                        return true;\r\n                    }\r\n                } while (n != this);\r\n\r\n                return false;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// The quad tree is split up into four Quadrants and objects are stored in the quadrant that contains them\r\n        /// and each quadrant is split up into four child Quadrants recurrsively.  Objects that overlap more than\r\n        /// one quadrant are stored in the nodes list for this Quadrant.\r\n        /// </summary>\r\n        private class Quadrant : IEnumerable<QuadNode>\r\n        {\r\n            private readonly Rect _bounds; // quadrant bounds.\r\n            private double _potential = Double.NegativeInfinity; // the maximum priority of all nodes within this quadrant.\r\n            private int _count;\r\n\r\n            private QuadNode _nodes; // nodes that overlap the sub quadrant boundaries.\r\n\r\n            // The quadrant is subdivided when nodes are inserted that are \r\n            // completely contained within those subdivisions.\r\n            private Quadrant _topLeft;\r\n            private Quadrant _topRight;\r\n            private Quadrant _bottomLeft;\r\n            private Quadrant _bottomRight;\r\n\r\n            /// <summary>\r\n            /// Construct new Quadrant with a given bounds all nodes stored inside this quadrant\r\n            /// will fit inside this bounds.  \r\n            /// </summary>\r\n            /// <param name=\"bounds\">The bounds of this quadrant</param>\r\n            public Quadrant(Rect bounds)\r\n            {\r\n                _bounds = bounds;\r\n            }\r\n\r\n            /// <summary>\r\n            /// Insert the given node.\r\n            /// </summary>\r\n            /// <param name=\"node\">The wrapped node.</param>\r\n            /// <param name=\"bounds\">The bounds of that node.</param>\r\n            /// <param name=\"priority\">The priority of that node.</param>\r\n            /// <param name=\"depth\">The recursive depth of this call, to avoid stack overflows.</param>\r\n            /// <returns>The quadrant that ultimately holds the node.</returns>            \r\n            internal Quadrant Insert(T node, Rect bounds, double priority, int depth)\r\n            {\r\n                _potential = Math.Max(_potential, priority);\r\n                _count++;\r\n\r\n                Quadrant child = null;\r\n\r\n                // Only drill down the tree for positive sized bounds, otherwise we could drill forever.\r\n                // Todo: We can remove this restriction if we choose to only split quads when \"full\".\r\n                if (depth <= PriorityQuadTree<T>.MaxTreeDepth && (bounds.Width > 0 || bounds.Height > 0))\r\n                {\r\n                    double w = _bounds.Width / 2;\r\n                    double h = _bounds.Height / 2;\r\n\r\n                    // assumption that the Rect struct is almost as fast as doing the operations\r\n                    // manually since Rect is a value type.\r\n                    Rect topLeft = new Rect(_bounds.Left, _bounds.Top, w, h);\r\n                    Rect topRight = new Rect(_bounds.Left + w, _bounds.Top, w, h);\r\n                    Rect bottomLeft = new Rect(_bounds.Left, _bounds.Top + h, w, h);\r\n                    Rect bottomRight = new Rect(_bounds.Left + w, _bounds.Top + h, w, h);\r\n\r\n                    // See if any child quadrants completely contain this node.\r\n                    if (topLeft.Contains(bounds))\r\n                    {\r\n                        if (_topLeft == null)\r\n                        {\r\n                            _topLeft = new Quadrant(topLeft);\r\n                        }\r\n                        child = _topLeft;\r\n                    }\r\n                    else if (topRight.Contains(bounds))\r\n                    {\r\n                        if (_topRight == null)\r\n                        {\r\n                            _topRight = new Quadrant(topRight);\r\n                        }\r\n                        child = _topRight;\r\n                    }\r\n                    else if (bottomLeft.Contains(bounds))\r\n                    {\r\n                        if (_bottomLeft == null)\r\n                        {\r\n                            _bottomLeft = new Quadrant(bottomLeft);\r\n                        }\r\n                        child = _bottomLeft;\r\n                    }\r\n                    else if (bottomRight.Contains(bounds))\r\n                    {\r\n                        if (_bottomRight == null)\r\n                        {\r\n                            _bottomRight = new Quadrant(bottomRight);\r\n                        }\r\n                        child = _bottomRight;\r\n                    }\r\n                }\r\n\r\n                if (child != null)\r\n                {\r\n                    return child.Insert(node, bounds, priority, depth + 1);\r\n                }\r\n                else\r\n                {\r\n                    QuadNode n = new QuadNode(node, bounds, priority);\r\n                    _nodes = n.InsertInto(_nodes);\r\n                    return this;\r\n                }\r\n            }\r\n\r\n            /// <summary>\r\n            /// Removes the first occurance of the given node from this quadrant or any child quadrants within the search bounds.\r\n            /// </summary>\r\n            /// <param name=\"node\">The node to remove.</param>\r\n            /// <param name=\"bounds\">The bounds to search within.</param>\r\n            /// <returns><c>true</c> if the node was found and removed; otherwise, <c>false</c>.</returns>\r\n            internal bool Remove(T node, Rect bounds)\r\n            {\r\n                bool nodeRemoved = false;\r\n                if (RemoveNode(node))\r\n                {\r\n                    nodeRemoved = true;\r\n                }\r\n                else\r\n                {\r\n                    double w = _bounds.Width / 2;\r\n                    double h = _bounds.Height / 2;\r\n\r\n                    // assumption that the Rect struct is almost as fast as doing the operations\r\n                    // manually since Rect is a value type.\r\n                    Rect topLeft = new Rect(_bounds.Left, _bounds.Top, w, h);\r\n                    Rect topRight = new Rect(_bounds.Left + w, _bounds.Top, w, h);\r\n                    Rect bottomLeft = new Rect(_bounds.Left, _bounds.Top + h, w, h);\r\n                    Rect bottomRight = new Rect(_bounds.Left + w, _bounds.Top + h, w, h);\r\n\r\n                    if (_topLeft != null && topLeft.Intersects(bounds) && _topLeft.Remove(node, bounds))\r\n                    {\r\n                        if (_topLeft._count == 0)\r\n                        {\r\n                            _topLeft = null;\r\n                        }\r\n\r\n                        nodeRemoved = true;\r\n                    }\r\n                    else if (_topRight != null && topRight.Intersects(bounds) && _topRight.Remove(node, bounds))\r\n                    {\r\n                        if (_topRight._count == 0)\r\n                        {\r\n                            _topRight = null;\r\n                        }\r\n\r\n                        nodeRemoved = true;\r\n                    }\r\n                    else if (_bottomLeft != null && bottomLeft.Intersects(bounds) && _bottomLeft.Remove(node, bounds))\r\n                    {\r\n                        if (_bottomLeft._count == 0)\r\n                        {\r\n                            _bottomLeft = null;\r\n                        }\r\n\r\n                        nodeRemoved = true;\r\n                    }\r\n                    else if (_bottomRight != null && bottomRight.Intersects(bounds) && _bottomRight.Remove(node, bounds))\r\n                    {\r\n                        if (_bottomRight._count == 0)\r\n                        {\r\n                            _bottomRight = null;\r\n                        }\r\n\r\n                        nodeRemoved = true;\r\n                    }\r\n                }\r\n\r\n                if (nodeRemoved)\r\n                {\r\n                    _count--;\r\n                    _potential = CalculatePotential();\r\n                    return true;\r\n                }\r\n\r\n                return false;\r\n            }\r\n\r\n            /// <summary>\r\n            /// Returns all nodes in this quadrant that intersect the given bounds.\r\n            /// The nodes are returned in order of descending priority.\r\n            /// </summary>\r\n            /// <param name=\"bounds\">The bounds that intersects the nodes you want returned.</param>\r\n            /// <returns>A lazy list of nodes along with the new potential of this quadrant.</returns>\r\n            internal IEnumerable<Tuple<QuadNode, double>> GetNodesIntersecting(Rect bounds)\r\n            {\r\n                double w = _bounds.Width / 2;\r\n                double h = _bounds.Height / 2;\r\n\r\n                // assumption that the Rect struct is almost as fast as doing the operations\r\n                // manually since Rect is a value type.\r\n                Rect topLeft = new Rect(_bounds.Left, _bounds.Top, w, h);\r\n                Rect topRight = new Rect(_bounds.Left + w, _bounds.Top, w, h);\r\n                Rect bottomLeft = new Rect(_bounds.Left, _bounds.Top + h, w, h);\r\n                Rect bottomRight = new Rect(_bounds.Left + w, _bounds.Top + h, w, h);\r\n\r\n                // Create a priority queue based on the potential of our nodes and our quads.\r\n                var queue = new PriorityQueue<IEnumerator<Tuple<QuadNode, double>>, double>(true);\r\n\r\n                if (_nodes != null)\r\n                {\r\n                    queue.Enqueue(_nodes.GetNodesIntersecting(bounds).GetEnumerator(), _nodes.Next.Priority);\r\n                }\r\n\r\n                if (_topLeft != null && topLeft.Intersects(bounds))\r\n                {\r\n                    queue.Enqueue(_topLeft.GetNodesIntersecting(bounds).GetEnumerator(), _topLeft._potential);\r\n                }\r\n\r\n                if (_topRight != null && topRight.Intersects(bounds))\r\n                {\r\n                    queue.Enqueue(_topRight.GetNodesIntersecting(bounds).GetEnumerator(), _topRight._potential);\r\n                }\r\n\r\n                if (_bottomLeft != null && bottomLeft.Intersects(bounds))\r\n                {\r\n                    queue.Enqueue(_bottomLeft.GetNodesIntersecting(bounds).GetEnumerator(), _bottomLeft._potential);\r\n                }\r\n\r\n                if (_bottomRight != null && bottomRight.Intersects(bounds))\r\n                {\r\n                    queue.Enqueue(_bottomRight.GetNodesIntersecting(bounds).GetEnumerator(), _bottomRight._potential);\r\n                }\r\n\r\n                // Then just loop through the queue.\r\n                while (queue.Count > 0)\r\n                {\r\n                    // Grab the enumerator with the highest potential.\r\n                    var enumerator = queue.Dequeue().Key;\r\n                    if (enumerator.MoveNext())\r\n                    {\r\n                        // Get the current node and its new potential from the enumerator.\r\n                        var current = enumerator.Current;\r\n                        var node = current.Item1;\r\n                        var potential = current.Item2;\r\n\r\n                        // Determine our new potential.\r\n                        var newPotential = queue.Count > 0 ? !potential.IsNaN() ? Math.Max(potential, queue.Peek().Value) : queue.Peek().Value : potential;\r\n\r\n                        // It might be the case that the actual intersecting node has less priority than our remaining potential.\r\n                        if (newPotential > node.Priority)\r\n                        {\r\n                            // Store it for later in a container containing only it with no further potential.\r\n                            var store = Enumerable.Repeat(Tuple.Create(node, double.NaN), 1).GetEnumerator();\r\n\r\n                            // Enqueue the container at the correct position.\r\n                            queue.Enqueue(store, node.Priority);\r\n                        }\r\n                        else\r\n                        {\r\n                            // Return it to our parent along with our new potential.\r\n                            yield return Tuple.Create(node, newPotential);\r\n                        }\r\n\r\n                        // If this enumerator has some more potential then re-enqueue it.\r\n                        if (!potential.IsNaN())\r\n                        {\r\n                            queue.Enqueue(enumerator, potential);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            /// <summary>\r\n            /// Returns all nodes in this quadrant that are fully contained within the given bounds.\r\n            /// The nodes are returned in order of descending priority.\r\n            /// </summary>\r\n            /// <param name=\"bounds\">The bounds that contains the nodes you want returned.</param>\r\n            /// <returns>A lazy list of nodes along with the new potential of this quadrant.</returns>\r\n            internal IEnumerable<Tuple<QuadNode, double>> GetNodesInside(Rect bounds)\r\n            {\r\n                double w = _bounds.Width / 2;\r\n                double h = _bounds.Height / 2;\r\n\r\n                // assumption that the Rect struct is almost as fast as doing the operations\r\n                // manually since Rect is a value type.\r\n                Rect topLeft = new Rect(_bounds.Left, _bounds.Top, w, h);\r\n                Rect topRight = new Rect(_bounds.Left + w, _bounds.Top, w, h);\r\n                Rect bottomLeft = new Rect(_bounds.Left, _bounds.Top + h, w, h);\r\n                Rect bottomRight = new Rect(_bounds.Left + w, _bounds.Top + h, w, h);\r\n\r\n                // Create a priority queue based on the potential of our nodes and our quads.\r\n                var queue = new PriorityQueue<IEnumerator<Tuple<QuadNode, double>>, double>(true);\r\n\r\n                if (_nodes != null)\r\n                {\r\n                    queue.Enqueue(_nodes.GetNodesInside(bounds).GetEnumerator(), _nodes.Next.Priority);\r\n                }\r\n\r\n                if (_topLeft != null && topLeft.Intersects(bounds))\r\n                {\r\n                    queue.Enqueue(_topLeft.GetNodesInside(bounds).GetEnumerator(), _topLeft._potential);\r\n                }\r\n\r\n                if (_topRight != null && topRight.Intersects(bounds))\r\n                {\r\n                    queue.Enqueue(_topRight.GetNodesInside(bounds).GetEnumerator(), _topRight._potential);\r\n                }\r\n\r\n                if (_bottomLeft != null && bottomLeft.Intersects(bounds))\r\n                {\r\n                    queue.Enqueue(_bottomLeft.GetNodesInside(bounds).GetEnumerator(), _bottomLeft._potential);\r\n                }\r\n\r\n                if (_bottomRight != null && bottomRight.Intersects(bounds))\r\n                {\r\n                    queue.Enqueue(_bottomRight.GetNodesInside(bounds).GetEnumerator(), _bottomRight._potential);\r\n                }\r\n\r\n                // Then just loop through the queue.\r\n                while (queue.Count > 0)\r\n                {\r\n                    // Grab the enumerator with the highest potential.\r\n                    var enumerator = queue.Dequeue().Key;\r\n                    if (enumerator.MoveNext())\r\n                    {\r\n                        // Get the current node and its new potential from the enumerator.\r\n                        var current = enumerator.Current;\r\n                        var node = current.Item1;\r\n                        var potential = current.Item2;\r\n\r\n                        // Determine our new potential.\r\n                        var newPotential = queue.Count > 0 ? !potential.IsNaN() ? Math.Max(potential, queue.Peek().Value) : queue.Peek().Value : potential;\r\n\r\n                        // It might be the case that the actual intersecting node has less priority than our remaining potential.\r\n                        if (newPotential > node.Priority)\r\n                        {\r\n                            // Store it for later in a container containing only it with no further potential.\r\n                            var store = Enumerable.Repeat(Tuple.Create(node, double.NaN), 1).GetEnumerator();\r\n\r\n                            // Enqueue the container at the correct position.\r\n                            queue.Enqueue(store, node.Priority);\r\n                        }\r\n                        else\r\n                        {\r\n                            // Return it to our parent along with our new potential.\r\n                            yield return Tuple.Create(node, newPotential);\r\n                        }\r\n\r\n                        // If this enumerator has some more potential then re-enqueue it.\r\n                        if (!potential.IsNaN())\r\n                        {\r\n                            queue.Enqueue(enumerator, potential);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            /// <summary>\r\n            /// Return true if there are any nodes in this Quadrant are inside the given bounds.\r\n            /// </summary>\r\n            /// <param name=\"bounds\">The bounds to test</param>\r\n            /// <returns><c>true</c> if this quadrant or its subquadrants has nodes inside the bounds; otherwise, <c>false</c>.</returns>\r\n            internal bool HasNodesInside(Rect bounds)\r\n            {\r\n                double w = _bounds.Width / 2;\r\n                double h = _bounds.Height / 2;\r\n\r\n                // assumption that the Rect struct is almost as fast as doing the operations\r\n                // manually since Rect is a value type.\r\n                Rect topLeft = new Rect(_bounds.Left, _bounds.Top, w, h);\r\n                Rect topRight = new Rect(_bounds.Left + w, _bounds.Top, w, h);\r\n                Rect bottomLeft = new Rect(_bounds.Left, _bounds.Top + h, w, h);\r\n                Rect bottomRight = new Rect(_bounds.Left + w, _bounds.Top + h, w, h);\r\n\r\n                if (_nodes != null && _nodes.HasNodesInside(bounds))\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                if (_topLeft != null && topLeft.Contains(bounds) && _topLeft.HasNodesInside(bounds))\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                if (_topRight != null && topRight.Contains(bounds) && _topRight.HasNodesInside(bounds))\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                if (_bottomLeft != null && bottomLeft.Contains(bounds) && _bottomLeft.HasNodesInside(bounds))\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                if (_bottomRight != null && bottomRight.Contains(bounds) && _bottomRight.HasNodesInside(bounds))\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                return false;\r\n            }\r\n\r\n            /// <summary>\r\n            /// Return true if there are any nodes in this Quadrant that intersect the given bounds.\r\n            /// </summary>\r\n            /// <param name=\"bounds\">The bounds to test</param>\r\n            /// <returns><c>true</c> if this quadrant or its subquadrants has nodes intersecting the bounds; otherwise, <c>false</c>.</returns>\r\n            internal bool HasNodesIntersecting(Rect bounds)\r\n            {\r\n                double w = _bounds.Width / 2;\r\n                double h = _bounds.Height / 2;\r\n\r\n                // assumption that the Rect struct is almost as fast as doing the operations\r\n                // manually since Rect is a value type.\r\n                Rect topLeft = new Rect(_bounds.Left, _bounds.Top, w, h);\r\n                Rect topRight = new Rect(_bounds.Left + w, _bounds.Top, w, h);\r\n                Rect bottomLeft = new Rect(_bounds.Left, _bounds.Top + h, w, h);\r\n                Rect bottomRight = new Rect(_bounds.Left + w, _bounds.Top + h, w, h);\r\n\r\n                if (_nodes != null && _nodes.HasNodesIntersecting(bounds))\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                if (_topLeft != null && topLeft.Intersects(bounds) && _topLeft.HasNodesIntersecting(bounds))\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                if (_topRight != null && topRight.Intersects(bounds) && _topRight.HasNodesIntersecting(bounds))\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                if (_bottomLeft != null && bottomLeft.Intersects(bounds) && _bottomLeft.HasNodesIntersecting(bounds))\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                if (_bottomRight != null && bottomRight.Intersects(bounds) && _bottomRight.HasNodesIntersecting(bounds))\r\n                {\r\n                    return true;\r\n                }\r\n\r\n                return false;\r\n            }\r\n\r\n            /// <summary>\r\n            /// Remove the given node from this Quadrant.(non-recursive)\r\n            /// </summary>\r\n            /// <param name=\"node\">The node to remove.</param>            \r\n            /// <returns>Returns true if the node was found and removed.</returns>\r\n            private bool RemoveNode(T node)\r\n            {\r\n                bool rc = false;\r\n                if (_nodes != null)\r\n                {\r\n                    QuadNode p = _nodes;\r\n                    while (!Object.Equals(p.Next.Node, node) && p.Next != _nodes)\r\n                    {\r\n                        p = p.Next;\r\n                    }\r\n                    if (Object.Equals(p.Next.Node, node))\r\n                    {\r\n                        rc = true;\r\n                        QuadNode n = p.Next;\r\n                        if (p == n)\r\n                        {\r\n                            // list goes to empty\r\n                            _nodes = null;\r\n                        }\r\n                        else\r\n                        {\r\n                            if (_nodes == n)\r\n                            {\r\n                                _nodes = p;\r\n                            }\r\n\r\n                            p.Next = n.Next;\r\n                        }\r\n                    }\r\n                }\r\n                return rc;\r\n            }\r\n\r\n            /// <summary>\r\n            /// The maximum priority for this quadrant's and all of its subquadrants' nodes.\r\n            /// </summary>\r\n            /// <returns>The maximum priority for this quadrant's and all of its subquadrants' nodes.</returns>\r\n            /// <remarks>This call assumes that the potential is correctly set on the subquadrants.</remarks>\r\n            private double CalculatePotential()\r\n            {\r\n                double potential = Double.NegativeInfinity;\r\n                if (_nodes != null)\r\n                {\r\n                    potential = _nodes.Next.Priority;\r\n                }\r\n\r\n                if (_topLeft != null)\r\n                {\r\n                    potential = Math.Max(potential, _topLeft._potential);\r\n                }\r\n\r\n                if (_topRight != null)\r\n                {\r\n                    potential = Math.Max(potential, _topRight._potential);\r\n                }\r\n\r\n                if (_bottomLeft != null)\r\n                {\r\n                    potential = Math.Max(potential, _bottomLeft._potential);\r\n                }\r\n\r\n                if (_bottomRight != null)\r\n                {\r\n                    potential = Math.Max(potential, _bottomRight._potential);\r\n                }\r\n\r\n                return potential;\r\n            }\r\n\r\n            /// <summary>\r\n            /// Enumerates over all nodes within this quadrant in random order.\r\n            /// </summary>\r\n            /// <returns>\r\n            /// Enumerator that enumerates over all its nodes.\r\n            /// </returns>\r\n            public IEnumerator<QuadNode> GetEnumerator()\r\n            {\r\n                var queue = new Queue<Quadrant>();\r\n                queue.Enqueue(this);\r\n\r\n                while (queue.Count > 0)\r\n                {\r\n                    var quadrant = queue.Dequeue();\r\n                    if (quadrant._nodes != null)\r\n                    {\r\n                        var n = quadrant._nodes;\r\n                        do\r\n                        {\r\n                            n = n.Next;\r\n                            yield return n;\r\n                        }\r\n                        while (n != quadrant._nodes);\r\n                    }\r\n\r\n                    if (quadrant._topLeft != null)\r\n                    {\r\n                        queue.Enqueue(quadrant._topLeft);\r\n                    }\r\n\r\n                    if (quadrant._topRight != null)\r\n                    {\r\n                        queue.Enqueue(quadrant._topRight);\r\n                    }\r\n\r\n                    if (quadrant._bottomLeft != null)\r\n                    {\r\n                        queue.Enqueue(quadrant._bottomLeft);\r\n                    }\r\n\r\n                    if (quadrant._bottomRight != null)\r\n                    {\r\n                        queue.Enqueue(quadrant._bottomRight);\r\n                    }\r\n                }\r\n            }\r\n\r\n            IEnumerator IEnumerable.GetEnumerator()\r\n            {\r\n                return GetEnumerator();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// The extent defines the subdivisible bounds of the quad tree index.\r\n        /// </summary>\r\n        private Rect _extent;\r\n\r\n        /// <summary>\r\n        /// The outer PriorityQuadTree class is essentially just a wrapper around a tree of Quadrants.\r\n        /// </summary>\r\n        private Quadrant _root;\r\n\r\n        /// <summary>\r\n        /// The MaxTreeDepth limit is required since recursive calls can go that deep if item bounds (height or width) are very small compared to Extent (height or width).\r\n        /// The max depth will prevent stack overflow exception in some of the recursive calls we make.\r\n        /// With a value of 50 the item bounds can be 2^-50 times the extent before the tree stops growing in height.\r\n        /// </summary>\r\n        private const int MaxTreeDepth = 50;\r\n\r\n        /// <summary>\r\n        /// The extent determines the overall quad-tree indexing strategy.\r\n        /// Changing this bounds is expensive since it has to re-divide the entire thing - like a re-hash operation.\r\n        /// </summary>\r\n        public Rect Extent\r\n        {\r\n            get\r\n            {\r\n                return _extent;\r\n            }\r\n            set\r\n            {\r\n                if (!(value.Top >= double.MinValue &&\r\n                      value.Top <= double.MaxValue &&\r\n                      value.Left >= double.MinValue &&\r\n                      value.Left <= double.MaxValue &&\r\n                      value.Width <= double.MaxValue &&\r\n                      value.Height <= double.MaxValue))\r\n                {\r\n                    throw new ArgumentOutOfRangeException(\"value\");\r\n                }\r\n\r\n                _extent = value;\r\n                ReIndex();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Insert an item with given bounds and priority into this QuadTree.\r\n        /// </summary>\r\n        /// <param name=\"item\">The item to insert.</param>\r\n        /// <param name=\"bounds\">The bounds of this item.</param>\r\n        /// <param name=\"priority\">The priority to return this item before others in query results.</param>\r\n        public void Insert(T item, Rect bounds, double priority)\r\n        {\r\n            if (bounds.Top.IsNaN() ||\r\n                bounds.Left.IsNaN() ||\r\n                bounds.Width.IsNaN() ||\r\n                bounds.Height.IsNaN())\r\n            {\r\n                throw new ArgumentOutOfRangeException(\"bounds\");\r\n            }\r\n\r\n            if (_root == null)\r\n            {\r\n                _root = new Quadrant(_extent);\r\n            }\r\n\r\n            if (Double.IsNaN(priority))\r\n            {\r\n                priority = Double.NegativeInfinity;\r\n            }\r\n\r\n            _root.Insert(item, bounds, priority, 1);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets whether any items are fully inside the given bounds.\r\n        /// </summary>\r\n        /// <param name=\"bounds\">The bounds to test.</param>\r\n        /// <returns><c>true</c> if any items are inside the given bounds; otherwise, <c>false</c>.</returns>\r\n        public bool HasItemsInside(Rect bounds)\r\n        {\r\n            if (bounds.Top.IsNaN() ||\r\n                bounds.Left.IsNaN() ||\r\n                bounds.Width.IsNaN() ||\r\n                bounds.Height.IsNaN())\r\n            {\r\n                throw new ArgumentOutOfRangeException(\"bounds\");\r\n            }\r\n\r\n            if (_root != null)\r\n            {\r\n                return _root.HasNodesInside(bounds);\r\n            }\r\n            return false;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Get a list of the items that are fully inside the given bounds.\r\n        /// </summary>\r\n        /// <param name=\"bounds\">The bounds to test.</param>\r\n        /// <returns>The items that are inside the given bounds, returned in the order given by the priority assigned during Insert.</returns>\r\n        public IEnumerable<T> GetItemsInside(Rect bounds)\r\n        {\r\n            if (bounds.Top.IsNaN() ||\r\n                bounds.Left.IsNaN() ||\r\n                bounds.Width.IsNaN() ||\r\n                bounds.Height.IsNaN())\r\n            {\r\n                throw new ArgumentOutOfRangeException();\r\n            }\r\n\r\n            if (_root != null)\r\n            {\r\n                foreach (var node in _root.GetNodesInside(bounds))\r\n                {\r\n                    yield return node.Item1.Node;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets whether any items intersect the given bounds.\r\n        /// </summary>\r\n        /// <param name=\"bounds\">The bounds to test.</param>\r\n        /// <returns><c>true</c> if any items intersect the given bounds; otherwise, <c>false</c>.</returns>\r\n        public bool HasItemsIntersecting(Rect bounds)\r\n        {\r\n            if (bounds.Top.IsNaN() ||\r\n                bounds.Left.IsNaN() ||\r\n                bounds.Width.IsNaN() ||\r\n                bounds.Height.IsNaN())\r\n            {\r\n                throw new ArgumentOutOfRangeException(\"bounds\");\r\n            }\r\n\r\n            if (_root != null)\r\n            {\r\n                return _root.HasNodesIntersecting(bounds);\r\n            }\r\n            return false;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Get list of nodes that intersect the given bounds.\r\n        /// </summary>\r\n        /// <param name=\"bounds\">The bounds to test.</param>\r\n        /// <returns>The items that intersect the given bounds, returned in the order given by the priority assigned during Insert.</returns>\r\n        public IEnumerable<T> GetItemsIntersecting(Rect bounds)\r\n        {\r\n            if (bounds.Top.IsNaN() ||\r\n                bounds.Left.IsNaN() ||\r\n                bounds.Width.IsNaN() ||\r\n                bounds.Height.IsNaN())\r\n            {\r\n                throw new ArgumentOutOfRangeException();\r\n            }\r\n\r\n            if (_root != null)\r\n            {\r\n                foreach (var node in _root.GetNodesIntersecting(bounds))\r\n                {\r\n                    yield return node.Item1.Node;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes the first instance of the given item from the tree (if it exists) by searching through the entire tree for the item.\r\n        /// </summary>\r\n        /// <param name=\"item\">The item to remove.</param>\r\n        /// <returns><c>true</c> if the item was found and removed; otherwise, <c>false</c>.</returns>\r\n        /// <remarks>\r\n        /// This overload does a full search through the entire tree for the item.\r\n        /// Clients should instead call the overload that takes a <see cref=\"Rect\"/> if the bounds of the item are known.\r\n        /// </remarks>\r\n        public bool Remove(T item)\r\n        {\r\n            return Remove(item, new Rect(double.NegativeInfinity, double.NegativeInfinity, double.PositiveInfinity, double.PositiveInfinity));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes the first instance of the given item that intersects the given bounds from the tree (if it exists).\r\n        /// </summary>\r\n        /// <param name=\"item\">The item to remove.</param>\r\n        /// <param name=\"bounds\">The bounds within to search for the item.</param>\r\n        /// <returns><c>true</c> if the item was found and removed; otherwise, <c>false</c>.</returns>\r\n        /// <remarks>\r\n        /// This overload does a partial search through the tree, so if the <paramref name=\"bounds\"/> do not intersect the node then the node will be missed.\r\n        /// Clients should instead call the overload that does not take a <see cref=\"Rect\"/> if the bounds of the item are not known.\r\n        /// </remarks>\r\n        public bool Remove(T item, Rect bounds)\r\n        {\r\n            if (bounds.Top.IsNaN() ||\r\n                bounds.Left.IsNaN() ||\r\n                bounds.Width.IsNaN() ||\r\n                bounds.Height.IsNaN())\r\n            {\r\n                throw new ArgumentOutOfRangeException(\"bounds\");\r\n            }\r\n\r\n            if (_root != null)\r\n            {\r\n                return _root.Remove(item, bounds);\r\n            }\r\n            return false;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes all nodes from the tree.\r\n        /// </summary>\r\n        public void Clear()\r\n        {\r\n            _root = null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Rebuilds all the Quadrants according to the current QuadTree Bounds.\r\n        /// </summary>\r\n        private void ReIndex()\r\n        {\r\n            Quadrant quadrant = _root;\r\n            _root = new Quadrant(_extent);\r\n            if (quadrant != null)\r\n            {\r\n                foreach (var node in quadrant.GetNodesIntersecting(_extent))\r\n                {\r\n                    // Todo: It would be more efficient if we added a code path that allowed reuse of the QuadNode wrappers.\r\n                    Insert(node.Item1.Node, node.Item1.Bounds, node.Item1.Priority);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns all items in the tree in unspecified order.\r\n        /// </summary>\r\n        /// <returns>An enumerator over all items in the tree in random order.</returns>\r\n        /// <remarks>To get all items in the tree in prioritized-order then simply call <see cref=\"GetItemsInside\"/> with an infinitely large rectangle.</remarks>\r\n        public IEnumerator<T> GetEnumerator()\r\n        {\r\n            if (_root != null)\r\n            {\r\n                foreach (var node in _root)\r\n                {\r\n                    yield return node.Node;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns all items in the tree in unspecified order.\r\n        /// </summary>\r\n        /// <returns>An enumerator over all items in the tree in random order.</returns>\r\n        /// <remarks>To get all items in the tree in prioritized-order then simply call <see cref=\"GetItemsInside\"/> with an infinitely large rectangle.</remarks>\r\n        IEnumerator IEnumerable.GetEnumerator()\r\n        {\r\n            return GetEnumerator();\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Layout/ZoomableCanvas/PriorityQueue.cs",
    "content": "using System;\r\nusing System.Diagnostics.CodeAnalysis;\r\n\r\nnamespace System.Collections.Generic\r\n{\r\n    /// <summary>\r\n    /// Represents a queue of items that are sorted based on individual priorities.\r\n    /// </summary>\r\n    /// <typeparam name=\"T\">Specifies the type of elements in the queue.</typeparam>\r\n    /// <typeparam name=\"TPriority\">Specifies the type of object representing the priority.</typeparam>\r\n    [SuppressMessage(\"Microsoft.Naming\", \"CA1711:IdentifiersShouldNotHaveIncorrectSuffix\")]\r\n    public class PriorityQueue<T, TPriority>\r\n    {\r\n        private readonly List<KeyValuePair<T, TPriority>> heap = new List<KeyValuePair<T, TPriority>>();\r\n        private readonly Dictionary<T, int> indexes = new Dictionary<T, int>();\r\n\r\n        private readonly IComparer<TPriority> comparer;\r\n        private readonly bool invert;\r\n\r\n        public PriorityQueue()\r\n            : this(false)\r\n        {\r\n        }\r\n\r\n        public PriorityQueue(bool invert)\r\n            : this(Comparer<TPriority>.Default)\r\n        {\r\n            this.invert = invert;\r\n        }\r\n\r\n        public PriorityQueue(IComparer<TPriority> comparer)\r\n        {\r\n            this.comparer = comparer;\r\n            heap.Add(default(KeyValuePair<T, TPriority>));\r\n        }\r\n\r\n        public void Enqueue(T item, TPriority priority)\r\n        {\r\n            KeyValuePair<T, TPriority> tail = new KeyValuePair<T, TPriority>(item, priority);\r\n            heap.Add(tail);\r\n\r\n            MoveUp(tail, Count);\r\n        }\r\n\r\n        public KeyValuePair<T, TPriority> Dequeue()\r\n        {\r\n            int bound = Count;\r\n            if (bound < 1)\r\n                throw new InvalidOperationException(\"Queue is empty.\");\r\n\r\n            KeyValuePair<T, TPriority> head = heap[1];\r\n            KeyValuePair<T, TPriority> tail = heap[bound];\r\n\r\n            heap.RemoveAt(bound);\r\n\r\n            if (bound > 1)\r\n                MoveDown(tail, 1);\r\n\r\n            indexes.Remove(head.Key);\r\n\r\n            return head;\r\n        }\r\n\r\n        public KeyValuePair<T, TPriority> Peek()\r\n        {\r\n            if (Count < 1)\r\n                throw new InvalidOperationException(\"Queue is empty.\");\r\n\r\n            return heap[1];\r\n        }\r\n\r\n        public bool TryGetValue(T item, out TPriority priority)\r\n        {\r\n            int index;\r\n            if (indexes.TryGetValue(item, out index))\r\n            {\r\n                priority = heap[indexes[item]].Value;\r\n                return true;\r\n            }\r\n            else\r\n            {\r\n                priority = default(TPriority);\r\n                return false;\r\n            }\r\n        }\r\n\r\n        public TPriority this[T item]\r\n        {\r\n            get\r\n            {\r\n                return heap[indexes[item]].Value;\r\n            }\r\n            set\r\n            {\r\n                int index;\r\n\r\n                if (indexes.TryGetValue(item, out index))\r\n                {\r\n                    int order = comparer.Compare(value, heap[index].Value);\r\n                    if (order != 0)\r\n                    {\r\n                        if (invert)\r\n                            order = ~order;\r\n\r\n                        KeyValuePair<T, TPriority> element = new KeyValuePair<T, TPriority>(item, value);\r\n                        if (order < 0)\r\n                            MoveUp(element, index);\r\n                        else\r\n                            MoveDown(element, index);\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    KeyValuePair<T, TPriority> element = new KeyValuePair<T, TPriority>(item, value);\r\n                    heap.Add(element);\r\n\r\n                    MoveUp(element, Count);\r\n                }\r\n            }\r\n        }\r\n\r\n        public int Count\r\n        {\r\n            get\r\n            {\r\n                return heap.Count - 1;\r\n            }\r\n        }\r\n\r\n        private void MoveUp(KeyValuePair<T, TPriority> element, int index)\r\n        {\r\n            while (index > 1)\r\n            {\r\n                int parent = index >> 1;\r\n\r\n                if (IsPrior(heap[parent], element))\r\n                    break;\r\n\r\n                heap[index] = heap[parent];\r\n                indexes[heap[parent].Key] = index;\r\n\r\n                index = parent;\r\n            }\r\n\r\n            heap[index] = element;\r\n            indexes[element.Key] = index;\r\n        }\r\n\r\n        private void MoveDown(KeyValuePair<T, TPriority> element, int index)\r\n        {\r\n            int count = heap.Count;\r\n\r\n            while (index << 1 < count)\r\n            {\r\n                int child = index << 1;\r\n                int sibling = child | 1;\r\n\r\n                if (sibling < count && IsPrior(heap[sibling], heap[child]))\r\n                    child = sibling;\r\n\r\n                if (IsPrior(element, heap[child]))\r\n                    break;\r\n\r\n                heap[index] = heap[child];\r\n                indexes[heap[child].Key] = index;\r\n\r\n                index = child;\r\n            }\r\n\r\n            heap[index] = element;\r\n            indexes[element.Key] = index;\r\n        }\r\n\r\n        private bool IsPrior(KeyValuePair<T, TPriority> element1, KeyValuePair<T, TPriority> element2)\r\n        {\r\n            int order =  comparer.Compare(element1.Value, element2.Value); \r\n            if (invert)\r\n                order = ~order;\r\n            return order < 0;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Layout/ZoomableCanvas/VirtualPanel.cs",
    "content": "﻿using System;\r\nusing System.Collections;\r\nusing System.Collections.Specialized;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Windows.Controls.Primitives;\r\nusing System.Windows.Threading;\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Provides a framework for <see cref=\"Panel\"/> elements that virtualize their child data collection. This is an abstract class.\r\n    /// </summary>\r\n    public abstract class VirtualPanel : VirtualizingPanel\r\n    {\r\n        /// <summary>\r\n        /// Identifies the <see cref=\"IsVirtualizing\"/> property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty IsVirtualizingProperty = VirtualizingStackPanel.IsVirtualizingProperty.AddOwner(typeof(VirtualPanel), new FrameworkPropertyMetadata(VirtualizingStackPanel.IsVirtualizingProperty.DefaultMetadata.DefaultValue, OnIsVirtualizingChanged));\r\n\r\n        /// <summary>\r\n        /// Handles the event that occurs when the value of the <see cref=\"IsVirtualizing\"/> dependency property has changed.\r\n        /// </summary>\r\n        /// <param name=\"d\">The dependency object on which the dependency property has changed.</param>\r\n        /// <param name=\"e\">The event args containing the old and new values of the dependency property.</param>\r\n        private static void OnIsVirtualizingChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var panel = d as VirtualPanel;\r\n            if (panel != null)\r\n            {\r\n                panel.OnIsVirtualizingChanged((bool)e.OldValue, (bool)e.NewValue);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value that indicates that this <see cref=\"VirtualPanel\"/> is virtualizing its child collection.\r\n        /// </summary>\r\n        public bool IsVirtualizing\r\n        {\r\n            get { return (bool)GetValue(IsVirtualizingProperty); }\r\n            set { SetValue(IsVirtualizingProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Identifies the <see cref=\"RealizationPriority\"/> property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty RealizationPriorityProperty = DependencyProperty.Register(\"RealizationPriority\", typeof(DispatcherPriority), typeof(VirtualPanel), new FrameworkPropertyMetadata(DispatcherPriority.Normal));\r\n\r\n        /// <summary>\r\n        /// Gets or sets the <see cref=\"DispatcherPriority\"/> of the realization pass for this <see cref=\"VirtualPanel\"/>.\r\n        /// </summary>\r\n        public DispatcherPriority RealizationPriority\r\n        {\r\n            get { return (DispatcherPriority)GetValue(RealizationPriorityProperty); }\r\n            set { SetValue(RealizationPriorityProperty, value); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// This is an attached property that the panel sets on each container (generated or direct) to point back to the index of the item.\r\n        /// </summary>\r\n        private static readonly DependencyProperty IndexForItemContainerProperty = DependencyProperty.RegisterAttached(\"IndexForItemContainer\", typeof(int), typeof(VirtualPanel), new FrameworkPropertyMetadata(-1));\r\n\r\n        /// <summary>\r\n        /// Holds the latest queued realization operation.\r\n        /// </summary>\r\n        private DispatcherOperation RealizeOperation\r\n        {\r\n            get; \r\n            set;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the <see cref=\"ItemsControl\"/> that this panel hosts items for.\r\n        /// </summary>\r\n        /// <value></value>\r\n        public ItemsControl ItemsOwner\r\n        {\r\n            get\r\n            {\r\n                return ItemsControl.GetItemsOwner(this);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the index to an item that corresponds to the specified, generated <see cref=\"UIElement\"/>. \r\n        /// </summary>\r\n        /// <param name=\"container\">The <see cref=\"UIElement\"/> that corresponds to the item index to be returned.</param>\r\n        /// <returns>An <see cref=\"Int32\"/> index to an item that corresponds to the specified <see cref=\"UIElement\"/> if it was generated and hosted by this panel; otherwise, <c>-1</c>.</returns>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\r\n        public int IndexFromContainer(UIElement container)\r\n        {\r\n            if (container == null)\r\n            {\r\n                throw new ArgumentNullException(\"container\");\r\n            }\r\n\r\n            // The generator is technically not necessary, but it ensures the container was generated and hosted by this panel.\r\n            var generator = ItemContainerGenerator as ItemContainerGenerator;\r\n            if (generator != null && generator.ItemFromContainer(container) != DependencyProperty.UnsetValue)\r\n            {\r\n                var index = container.ReadLocalValue(IndexForItemContainerProperty);\r\n                return index as int? ?? -1;\r\n            }\r\n            return -1;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the item that corresponds to the specified, generated <see cref=\"UIElement\"/>. \r\n        /// </summary>\r\n        /// <param name=\"container\">The <see cref=\"UIElement\"/> that corresponds to the item to be returned.</param>\r\n        /// <returns>An <see cref=\"Object\"/> that is the item which corresponds to the specified <see cref=\"UIElement\"/> if it was generated and hosted by this panel; otherwise, <c>null</c>.</returns>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1011:ConsiderPassingBaseTypesAsParameters\")]\r\n        public object ItemFromContainer(UIElement container)\r\n        {\r\n            if (container == null)\r\n            {\r\n                throw new ArgumentNullException(\"container\");\r\n            }\r\n\r\n            var generator = ItemContainerGenerator as ItemContainerGenerator;\r\n            if (generator != null)\r\n            {\r\n                var item = generator.ItemFromContainer(container);\r\n                return item != DependencyProperty.UnsetValue ? item : null;\r\n            }\r\n            return null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the <see cref=\"UIElement\"/> corresponding to the item at the given index within the item collection if it has been realized.\r\n        /// </summary>\r\n        /// <param name=\"itemIndex\">The index of the desired item. </param>\r\n        /// <returns>The element corresponding to the item at the given index within the item collection or returns <c>null</c> if the item is not realized.</returns>\r\n        public UIElement ContainerFromIndex(int itemIndex)\r\n        {\r\n            var generator = ItemContainerGenerator as ItemContainerGenerator;\r\n            if (generator != null)\r\n            {\r\n                return generator.ContainerFromIndex(itemIndex) as UIElement;\r\n            }\r\n            return null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the <see cref=\"UIElement\"/> corresponding to the given item if it has been realized.\r\n        /// </summary>\r\n        /// <param name=\"item\">The <see cref=\"Object\"/> item to find the <see cref=\"UIElement\"/> for.</param>\r\n        /// <returns>A <see cref=\"UIElement\"/> that corresponds to the given item. Returns <c>null</c> if the item does not belong to the item collection, or if a <see cref=\"UIElement\"/> has not been generated for it.</returns>\r\n        /// <remarks>Use caution when calling this method as it does a linear search for the item.  Consider calling <see cref=\"ContainerFromIndex\"/> instead.</remarks>\r\n        public UIElement ContainerFromItem(object item)\r\n        {\r\n            var generator = ItemContainerGenerator as ItemContainerGenerator;\r\n            if (generator != null)\r\n            {\r\n                return generator.ContainerFromItem(item) as UIElement;\r\n            }\r\n            return null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Invalidates the realization state of all items being hosted by this panel. After the invalidation, the panel will have its reality updated, which will occur asynchronously unless subsequently forced by <see cref=\"UpdateReality\"/>. \r\n        /// </summary>\r\n        public void InvalidateReality()\r\n        {\r\n            if (RealizeOperation != null)\r\n            {\r\n                RealizeOperation.Abort();\r\n            }\r\n\r\n            object state = null;\r\n            Action action = null;\r\n\r\n            action = delegate\r\n            {\r\n                RealizeOperation = null;\r\n                state = RealizeCore(state);\r\n                if (state != null && RealizeOperation == null)\r\n                {\r\n                    RealizeOperation = Dispatcher.BeginInvoke(action, RealizationPriority);\r\n                }\r\n            };\r\n\r\n            RealizeOperation = Dispatcher.BeginInvoke(action, RealizationPriority);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Ensures that all items being hosted by this panel are properly realized or virtualized.\r\n        /// </summary>\r\n        public void UpdateReality()\r\n        {\r\n            RealizeOperation.Abort();\r\n            RealizeOperation = null;\r\n            object state = null;\r\n            do\r\n            {\r\n                state = RealizeCore(state);\r\n            }\r\n            while (state != null);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Manages calls to <see cref=\"RealizeOverride\"/>.\r\n        /// </summary>\r\n        /// <param name=\"state\">A custom state object left over from a previous call to <see cref=\"RealizeCore\"/> if additional processing was needed.</param>\r\n        /// <returns>A custom state object if additional processing is needed; otherwise, <c>null</c>.</returns>\r\n        private object RealizeCore(object state)\r\n        {\r\n            if (IsItemsHost)\r\n            {\r\n                if (IsVirtualizing)\r\n                {\r\n                    var owner = ItemsOwner;\r\n                    if (owner != null)\r\n                    {\r\n                        return RealizeOverride(owner.ItemsSource ?? owner.Items, state);\r\n                    }\r\n                }\r\n                else if (InternalChildren.Count == 0)\r\n                {\r\n                    var generator = ItemContainerGenerator;\r\n                    using (generator.StartAt(new GeneratorPosition(-1, 0), GeneratorDirection.Forward))\r\n                    {\r\n                        int index = 0;\r\n                        DependencyObject next;\r\n                        while ((next = generator.GenerateNext()) != null)\r\n                        {\r\n                            var container = next as UIElement;\r\n                            if (container != null)\r\n                            {\r\n                                container.SetValue(IndexForItemContainerProperty, index);\r\n                                AddInternalChild(container);\r\n                                generator.PrepareItemContainer(next);\r\n                            }\r\n                            index++;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            return null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// When overridden in a derived class, realizes and/or virtualizes items, optionally deferring additional realization.\r\n        /// </summary>\r\n        /// <param name=\"items\">The current items being hosted by this panel.</param>\r\n        /// <param name=\"state\">A custom state object left over from a previous call to <see cref=\"RealizeOverride\"/> if additional processing was needed.</param>\r\n        /// <returns>Implementations may optionally defer additional processing by return a non-<c>null</c> object, which will then be passed to a future call to <see cref=\"RealizeOverride\"/>.</returns>\r\n        protected abstract object RealizeOverride(IEnumerable items, object state);\r\n\r\n        /// <summary>\r\n        /// Indicates that the <see cref=\"Panel.IsItemsHost\"/> property value has changed.\r\n        /// </summary>\r\n        /// <param name=\"oldIsItemsHost\">The old property value.</param>\r\n        /// <param name=\"newIsItemsHost\">The new property value.</param>\r\n        protected override void OnIsItemsHostChanged(bool oldIsItemsHost, bool newIsItemsHost)\r\n        {\r\n            base.OnIsItemsHostChanged(oldIsItemsHost, newIsItemsHost);\r\n\r\n            InvalidateReality();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Indicates that the <see cref=\"IsVirtualizing\"/> property value has changed.\r\n        /// </summary>\r\n        /// <param name=\"oldIsVirtualizing\">The old property value.</param>\r\n        /// <param name=\"newIsVirtualizing\">The new property value.</param>\r\n        protected virtual void OnIsVirtualizingChanged(bool oldIsVirtualizing, bool newIsVirtualizing)\r\n        {\r\n            InvalidateReality();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Maintains event handlers when the items source has changed.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The <see cref=\"object\"/> that raised the event.</param>\r\n        /// <param name=\"args\">Provides data for the <see cref=\"ItemContainerGenerator.ItemsChanged\"/> event.</param>\r\n        [SuppressMessage(\"Microsoft.Maintainability\", \"CA1502:AvoidExcessiveComplexity\")]\r\n        protected override sealed void OnItemsChanged(object sender, ItemsChangedEventArgs args)\r\n        {\r\n            if (args == null)\r\n            {\r\n                throw new ArgumentNullException(\"args\");\r\n            }\r\n\r\n            var owner = ItemsOwner;\r\n            var items = owner != null ? owner.Items : null;\r\n\r\n            var action = args.Action;\r\n            if (action == NotifyCollectionChangedAction.Reset)\r\n            {\r\n                OnItemsChanged(items, new NotifyCollectionChangedEventArgs(action));\r\n            }\r\n            else if (items != null)\r\n            {\r\n                var generator = sender as IItemContainerGenerator;\r\n                if (generator != null)\r\n                {\r\n                    if (action == NotifyCollectionChangedAction.Add)\r\n                    {\r\n                        var index = generator.IndexFromGeneratorPosition(args.Position);\r\n                        // ItemContainerGenerator is infested with bugs. One of which is that as items are added to the end of a collection, the index from IndexFromGeneratorPosition will usually be wrong.\r\n                        if (args.Position.Offset == 1)\r\n                        {\r\n                            index = items.Count - 1;\r\n                        }\r\n                        var newItems = new VirtualItemsList(items, index, args.ItemCount);\r\n\r\n                        if (!IsVirtualizing)\r\n                        {\r\n                            for (int i = index; i < index + args.ItemCount; i++)\r\n                            {\r\n                                RealizeItem(i);\r\n                            }\r\n                        }\r\n\r\n                        OnItemsChanged(items, new NotifyCollectionChangedEventArgs(action, newItems, index));\r\n                    }\r\n                    else if (action == NotifyCollectionChangedAction.Remove)\r\n                    {\r\n                        var oldIndex = generator.IndexFromGeneratorPosition(args.Position);\r\n                        var oldItems = new ArrayList(args.ItemCount);\r\n\r\n                        // Since we can't actually get the old items directly, and sometimes we can't even get the old index from the generator, we'll get as many as we can from the visuals.\r\n                        for (int i = 0; i < args.ItemUICount; i++)\r\n                        {\r\n                            var element = InternalChildren[args.Position.Index + i];\r\n                            oldItems.Add(ItemFromContainer(element));\r\n                            if (oldIndex == -1)\r\n                            {\r\n                                oldIndex = (int)element.ReadLocalValue(IndexForItemContainerProperty);\r\n                            }\r\n                            element.ClearValue(IndexForItemContainerProperty);\r\n                        }\r\n\r\n                        // Unfortunately ItemContainerGenerator always expects us to remove the child, even if we didn't want to.\r\n                        if (args.ItemUICount > 0)\r\n                        {\r\n                            RemoveInternalChildRange(args.Position.Index, args.ItemUICount);\r\n                        }\r\n\r\n                        OnItemsChanged(items, new NotifyCollectionChangedEventArgs(action, oldItems, oldIndex));\r\n                    }\r\n                    else if (action == NotifyCollectionChangedAction.Move)\r\n                    {\r\n                        var oldIndex = -1;\r\n                        var index = generator.IndexFromGeneratorPosition(args.Position);\r\n                        var movedItems = new VirtualItemsList(items, index, args.ItemCount);\r\n\r\n                        var count = args.ItemUICount;\r\n                        if (count > 0)\r\n                        {\r\n                            var elements = new UIElement[count];\r\n                            for (var i = 0; i < count; i++)\r\n                            {\r\n                                elements[i] = InternalChildren[args.OldPosition.Index + i];\r\n                                if (oldIndex == -1)\r\n                                {\r\n                                    oldIndex = (int)elements[i].ReadLocalValue(IndexForItemContainerProperty);\r\n                                }\r\n                            }\r\n                            RemoveInternalChildRange(args.OldPosition.Index + Math.Min(args.OldPosition.Offset, 1), count);\r\n                            for (var i = 0; i < count; i++)\r\n                            {\r\n                                InsertInternalChild(args.Position.Index + i, elements[i]);\r\n                            }\r\n                        }\r\n\r\n                        OnItemsChanged(items, new NotifyCollectionChangedEventArgs(action, movedItems, index, oldIndex));\r\n                    }\r\n                    else if (action == NotifyCollectionChangedAction.Replace)\r\n                    {\r\n                        var index = generator.IndexFromGeneratorPosition(args.Position);\r\n                        var newItems = new VirtualItemsList(items, index, args.ItemCount);\r\n                        // Todo: Actually get the old items.  ItemContainerGenerator doesn't make this easy.\r\n                        var oldItems = new VirtualItemsList(null, index, args.ItemCount);\r\n\r\n                        OnItemsChanged(items, new NotifyCollectionChangedEventArgs(action, newItems, oldItems, index));\r\n                    }\r\n                }\r\n            }\r\n\r\n            base.OnItemsChanged(sender, args);\r\n\r\n            InvalidateReality();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when the <see cref=\"ItemsControl.Items\"/> collection that is associated with the <see cref=\"ItemsControl\"/> for this <see cref=\"Panel\"/> changes.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The <see cref=\"object\"/> that raised the event.</param>\r\n        /// <param name=\"args\">Provides data for the <see cref=\"ItemsChanged\"/> event.</param>\r\n        [SuppressMessage(\"Microsoft.Security\", \"CA2109:ReviewVisibleEventHandlers\")]\r\n        protected virtual void OnItemsChanged(object sender, NotifyCollectionChangedEventArgs args)\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Realizes an item container for the item with the given index.\r\n        /// </summary>\r\n        /// <param name=\"itemIndex\">The index of the item.</param>\r\n        /// <returns>The child that was created and added to the internal children.</returns>\r\n        protected UIElement RealizeItem(int itemIndex)\r\n        {\r\n            var generator = ItemContainerGenerator;\r\n            var position = generator.GeneratorPositionFromIndex(itemIndex);\r\n            using (generator.StartAt(position, GeneratorDirection.Forward, true))\r\n            {\r\n                var isNewlyRealized = false;\r\n                var container = generator.GenerateNext(out isNewlyRealized) as UIElement;\r\n                if (position.Offset != 0 && container != null && isNewlyRealized)\r\n                {\r\n                    container.SetValue(IndexForItemContainerProperty, itemIndex);\r\n                    InsertInternalChild(position.Index + 1, container);\r\n                    generator.PrepareItemContainer(container);\r\n                }\r\n                return container;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes an item container for the item with the given index.\r\n        /// </summary>\r\n        /// <param name=\"itemIndex\">The index of the item.</param>\r\n        /// <returns><c>true</c> if the child had been previously realized and was now removed; otherwise, <c>false</c>.</returns>\r\n        protected void VirtualizeItem(int itemIndex)\r\n        {\r\n            var generator = ItemContainerGenerator;\r\n            if (generator != null)\r\n            {\r\n                var position = generator.GeneratorPositionFromIndex(itemIndex);\r\n                if (position.Offset == 0)\r\n                {\r\n                    generator.Remove(position, 1);\r\n                    InternalChildren[position.Index].ClearValue(IndexForItemContainerProperty);\r\n                    RemoveInternalChildRange(position.Index, 1);\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a list which represents a subset of the elements in the source list. \r\n        /// </summary>\r\n        /// <remarks>\r\n        /// This list is used in NotifyCollectionChangedEventArgs because we might be dealing with\r\n        /// virtualized lists that raise events for items changing when the items haven't been\r\n        /// loaded into memory yet.  If the client needs to inspect the item, then they can index\r\n        /// into this list and it will retrieve it from the original source, but if they don't need\r\n        /// to inspect the item then we spare the cost of the lookup and retrieval.\r\n        /// </remarks>\r\n        private class VirtualItemsList : IList\r\n        {\r\n            public VirtualItemsList(IList items, int offset, int count)\r\n            {\r\n                Items = items;\r\n                Offset = offset;\r\n                Count = count;\r\n            }\r\n\r\n            public IList Items\r\n            {\r\n                get;\r\n                set;\r\n            }\r\n\r\n            public int Offset\r\n            {\r\n                get;\r\n                set;\r\n            }\r\n\r\n            public int Count\r\n            {\r\n                get;\r\n                set;\r\n            }\r\n\r\n            public object this[int index]\r\n            {\r\n                get\r\n                {\r\n                    if (index < 0 || index >= Count)\r\n                    {\r\n                        throw new ArgumentOutOfRangeException(\"index\");\r\n                    }\r\n\r\n                    if (Items != null && index + Offset < Items.Count)\r\n                    {\r\n                        return Items[index + Offset];\r\n                    }\r\n\r\n                    return null;\r\n                }\r\n                set\r\n                {\r\n                    throw new NotSupportedException();\r\n                }\r\n            }\r\n\r\n            public int IndexOf(object value)\r\n            {\r\n                if (Items != null)\r\n                {\r\n                    for (int i = 0; i < Count && i + Offset < Items.Count; i++)\r\n                    {\r\n                        if (Object.Equals(Items[i + Offset], value))\r\n                        {\r\n                            return i;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                return -1;\r\n            }\r\n\r\n            public bool Contains(object value)\r\n            {\r\n                return IndexOf(value) >= 0;\r\n            }\r\n\r\n            public IEnumerator GetEnumerator()\r\n            {\r\n                if (Items != null)\r\n                {\r\n                    for (int i = 0; i < Count && i + Offset < Items.Count; i++)\r\n                    {\r\n                        yield return Items[i + Offset];\r\n                    }\r\n                }\r\n            }\r\n\r\n            #region Unsupported IList Members\r\n\r\n            public int Add(object value)\r\n            {\r\n                throw new NotSupportedException();\r\n            }\r\n\r\n            public void Clear()\r\n            {\r\n                throw new NotSupportedException();\r\n            }\r\n\r\n            public void Insert(int index, object value)\r\n            {\r\n                throw new NotSupportedException();\r\n            }\r\n\r\n            public void Remove(object value)\r\n            {\r\n                throw new NotSupportedException();\r\n            }\r\n\r\n            public void RemoveAt(int index)\r\n            {\r\n                throw new NotSupportedException();\r\n            }\r\n\r\n            public void CopyTo(Array array, int index)\r\n            {\r\n                throw new NotSupportedException();\r\n            }\r\n\r\n            public bool IsFixedSize\r\n            {\r\n                get { return true; }\r\n            }\r\n\r\n            public bool IsReadOnly\r\n            {\r\n                get { return true; }\r\n            }\r\n\r\n            public bool IsSynchronized\r\n            {\r\n                get { return false; }\r\n            }\r\n\r\n            public object SyncRoot\r\n            {\r\n                get { return null; }\r\n            }\r\n\r\n            #endregion\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Layout/ZoomableCanvas/ZoomableCanvas.cs",
    "content": "﻿using System;\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Collections.Specialized;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\nusing System.Windows.Controls.Extensions;\r\nusing System.Windows.Controls.Primitives;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Shapes;\r\nusing System.Windows.Threading;\r\n\r\nnamespace System.Windows.Controls\r\n{\r\n    /// <summary>\r\n    /// Defines an area within which you can explicitly position an infinite number of child elements by using coordinates that are relative to the <see cref=\"ZoomableCanvas\"/> area.\r\n    /// </summary>\r\n    public class ZoomableCanvas : VirtualPanel, IScrollInfo\r\n    {\r\n        #region ApplyTransformProperty\r\n\r\n        /// <summary>\r\n        /// Identifies the <see cref=\"ApplyTransform\"/> dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ApplyTransformProperty = DependencyProperty.Register(\"ApplyTransform\", typeof(bool), typeof(ZoomableCanvas), new FrameworkPropertyMetadata(true, FrameworkPropertyMetadataOptions.AffectsArrange, OnApplyTransformChanged));\r\n\r\n        /// <summary>\r\n        /// Returns a transform applying the <see cref=\"Scale\"/> and <see cref=\"Offset\"/> when <see cref=\"ApplyTransform\"/> is set to <c>true</c>.\r\n        /// </summary>\r\n        /// <param name=\"d\">Dependency object whos value is being coerced.</param>\r\n        /// <param name=\"value\">The original uncoerced value.</param>\r\n        /// <returns>A new transform if <see cref=\"ApplyTransform\"/> is set to <c>true</c>; otherwise, <paramref name=\"value\"/>.</returns>\r\n        private static object CoerceRenderTransform(DependencyObject d, object value)\r\n        {\r\n            var canvas = d as ZoomableCanvas;\r\n            if (canvas != null && canvas.ApplyTransform)\r\n            {\r\n                var transform = new TransformGroup();\r\n                transform.Children.Add(new ScaleTransform());\r\n                transform.Children.Add(new TranslateTransform());\r\n                return transform;\r\n            }\r\n\r\n            return value;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the event that occurs when the value of the <see cref=\"ApplyTransform\"/> dependency property has changed.\r\n        /// </summary>\r\n        /// <param name=\"d\">The dependency object on which the dependency property has changed.</param>\r\n        /// <param name=\"e\">The event args containing the old and new values of the dependency property.</param>\r\n        private static void OnApplyTransformChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            d.CoerceValue(RenderTransformProperty);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets whether to automatically apply a <see cref=\"ScaleTransform\"/> to the canvas.\r\n        /// </summary>\r\n        /// <value><c>true</c> or <c>false</c>.  The default is <see cref=\"true\"/>.</value>\r\n        /// <remarks>\r\n        /// The value of this dependency property is <c>true</c> by default, meaning that the <see cref=\"RenderTransform\"/> property will contain a <see cref=\"Transform\"/> that scales the canvas and its children automatically.\r\n        /// This property can be set to <c>false</c> prevent the automatic transform.  This means that children are responsible for changing their appearance when the <see cref=\"Scale\"/> property changes.\r\n        /// Note that this property does not affect the <b>placement</b> of the elements; the children are automatically placed with the top-left corners of their elements at the appropriate positions on the screen, regardless of the value of <see cref=\"ApplyTransform\"/>.\r\n        /// <para>\r\n        /// Children will usually do this by simply changing their <see cref=\"Width\"/> and <see cref=\"Height \"/> to become larger or smaller when the <see cref=\"Scale\"/> property increases or decreases.\r\n        /// This is useful when pen widths are important, such as an element surrounded with a <see cref=\"Border\"/> with <see cref=\"Border.BorderThickness\"/> set to <c>1.0</c>.\r\n        /// If <see cref=\"ApplyTransform\"/> is <c>true</c>, then as <see cref=\"Scale\"/> decreases the shape will be scaled down and the border stroke will become thinner than one pixel, possibly too thin to see even with sub-pixel rendering.\r\n        /// This is also true when drawing paths, edges of a graph, or any other element that uses <see cref=\"Pen\"/> to draw lines and strokes.\r\n        /// In these cases setting <see cref=\"ApplyTransform\"/> to <c>false</c> and setting the <see cref=\"Shape\"/>'s <see cref=\"Shape.Stretch\"/> to <see cref=\"Stretch.Fill\"/> while binding its <see cref=\"Width\"/> and <see cref=\"Height\"/> to a factor of <see cref=\"Scale\"/> will often provide a better effect.\r\n        /// </para>\r\n        /// <para>\r\n        /// Another reason to set this property to <c>false</c> is when elements change their representation or visual state based on the scale (also known as \"semantic zoom\").\r\n        /// For example, imagine a canvas showing multiple thumbnails of spreadsheets and the relationships between their formulas and values.\r\n        /// When <see cref=\"Scale\"/> is set to <c>1.0</c> (the default value), each spreadsheet element might be fully interactive, editable, and showing all rows and columns.\r\n        /// When zooming out, and <see cref=\"Scale\"/> gets small enough that there is not enough room for each spreadsheet to show all of its rows and columns, it may change its representation into a bar chart or pie chart with axis values and a legend instead.\r\n        /// When zooming even further out, and <see cref=\"Scale\"/> gets small enough that there is not enough room for the axis and legend, it may simply remove the axis and legend to make more room for the graphical portion of the chart.\r\n        /// Since the children of the canvas can be arbitary rich UIElements, they can dynamically change their representation and be interacted with at all levels of zoom.\r\n        /// This is in sharp contrast to multi-scale-image approaches such as Silverlight's Deep Zoom since those scenarios are simply performing linear scale transformations on pre-computed static bitmaps.\r\n        /// </para>\r\n        /// </remarks>\r\n        public bool ApplyTransform\r\n        {\r\n            get { return (bool)GetValue(ApplyTransformProperty); }\r\n            set { SetValue(ApplyTransformProperty, value); }\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region ActualViewboxProperty\r\n\r\n        /// <summary>\r\n        /// Identifies the <see cref=\"ActualViewbox\"/> dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ActualViewboxProperty = DependencyProperty.RegisterReadOnly(\"ActualViewbox\", typeof(Rect), typeof(ZoomableCanvas), new FrameworkPropertyMetadata(Rect.Empty, OnActualViewboxChanged, CoerceActualViewbox)).DependencyProperty;\r\n\r\n        /// <summary>\r\n        /// Returns a <see cref=\"Rect\"/> representing the area of the canvas that is currently being displayed.\r\n        /// </summary>\r\n        /// <param name=\"d\">Dependency object whos value is being coerced.</param>\r\n        /// <param name=\"value\">The original uncoerced value.</param>\r\n        /// <returns>A <see cref=\"Rect\"/> representing the area of the canvas (in canvas coordinates) that is being displayed by this panel.</returns>\r\n        private static object CoerceActualViewbox(DependencyObject d, object value)\r\n        {\r\n            var canvas = d as ZoomableCanvas;\r\n            if (canvas != null)\r\n            {\r\n                var offset = canvas.Offset;\r\n                var scale = canvas.Scale;\r\n                var renderSize = canvas.RenderSize;\r\n                value = new Rect(offset.X / scale, offset.Y / scale, renderSize.Width / scale, renderSize.Height / scale);\r\n            }\r\n\r\n            return value;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the event that occurs when the value of the <see cref=\"ActualViewbox\"/> dependency property has changed.\r\n        /// </summary>\r\n        /// <param name=\"d\">The dependency object on which the dependency property has changed.</param>\r\n        /// <param name=\"e\">The event args containing the old and new values of the dependency property.</param>\r\n        private static void OnActualViewboxChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var canvas = d as ZoomableCanvas;\r\n            if (canvas != null)\r\n            {\r\n                canvas.InvalidateReality();\r\n            }\r\n            var scrollInfo = d as IScrollInfo;\r\n            if (scrollInfo != null && scrollInfo.ScrollOwner != null)\r\n            {\r\n                scrollInfo.ScrollOwner.InvalidateScrollInfo();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a <see cref=\"Rect\"/> representing the area of the canvas that is currently being displayed by this panel.\r\n        /// </summary>\r\n        /// <value>A <see cref=\"Rect\"/> representing the area of the canvas that is currently being displayed by this panel.</value>\r\n        /// <remarks>\r\n        /// The value of this property is automatically computed based on the <see cref=\"Scale\"/>, <see cref=\"Offset\"/>, and <see cref=\"RenderSize\"/> of this panel.\r\n        /// It is independent (and usually different) from the <see cref=\"Viewbox\"/> dependency property.\r\n        /// </remarks>\r\n        /// <seealso cref=\"Viewbox\"/>\r\n        public Rect ActualViewbox\r\n        {\r\n            get { return (Rect)GetValue(ActualViewboxProperty); }\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region ViewboxProperty\r\n\r\n        /// <summary>\r\n        /// Identifies the <see cref=\"Viewbox\"/> dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ViewboxProperty = DependencyProperty.Register(\"Viewbox\", typeof(Rect), typeof(ZoomableCanvas), new FrameworkPropertyMetadata(Rect.Empty, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnViewboxChanged), IsViewboxValid);\r\n\r\n        /// <summary>\r\n        /// Determines whether the value given is a valid value for the <see cref=\"Viewbox\"/> dependency property.\r\n        /// </summary>\r\n        /// <param name=\"value\">The potential value for the dependency property.</param>\r\n        /// <returns><c>true</c> if the value is a valid value for the property; otherwise, <c>false</c>.</returns>\r\n        private static bool IsViewboxValid(object value)\r\n        {\r\n            var viewbox = (Rect)value;\r\n            return viewbox.IsEmpty \r\n                || (viewbox.X.IsBetween(Double.MinValue, Double.MaxValue)\r\n                && viewbox.Y.IsBetween(Double.MinValue, Double.MaxValue)\r\n                && viewbox.Width.IsBetween(Double.Epsilon, Double.MaxValue)\r\n                && viewbox.Height.IsBetween(Double.Epsilon, Double.MaxValue));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the event that occurs when the value of the <see cref=\"Viewbox\"/> dependency property has changed.\r\n        /// </summary>\r\n        /// <param name=\"d\">The dependency object on which the dependency property has changed.</param>\r\n        /// <param name=\"e\">The event args containing the old and new values of the dependency property.</param>\r\n        private static void OnViewboxChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            d.CoerceValue(ScaleProperty);\r\n            d.CoerceValue(OffsetProperty);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the portion of the canvas (in canvas coordinates) that should be attempted to be displayed by this panel.\r\n        /// </summary>\r\n        /// <value>A <see cref=\"Rect\"/> specifying the portion of the canvas that should be displayed by this panel, or <see cref=\"Rect.Empty\"/> when unspecified.  The default value is <see cref=\"Rect.Empty\"/>.</value>\r\n        /// <remarks>\r\n        /// The area of the canvas shown by this panel can be controlled by either setting <see cref=\"Scale\"/> and <see cref=\"Offset\"/>, or by setting the <see cref=\"Viewbox\"/>, <see cref=\"Stretch\"/>, and <see cref=\"StretchDirection\"/> properties.\r\n        /// When <see cref=\"Viewbox\"/> is set to anything other than <see cref=\"Rect.Empty\"/>, the <see cref=\"Scale\"/> and <see cref=\"Offset\"/> will be automatically coerced to appropriate values according to the <see cref=\"Stretch\"/> and <see cref=\"StretchDirection\"/> properties.\r\n        /// Note that the <see cref=\"Stretch\"/> mode of <see cref=\"Stretch.Fill\"/> is not supported, so unless the aspect ratio of <see cref=\"Viewbox\"/> exactly matches the aspect ratio of <see cref=\"RenderSize\"/> the actual area displayed will be more or less than <see cref=\"Viewbox\"/>.\r\n        /// The exact area that is displayed can be determined by the <see cref=\"ActualViewbox\"/> property in this case.\r\n        /// </remarks>\r\n        /// <seealso cref=\"Stretch\"/>\r\n        /// <seealso cref=\"StretchDirection\"/>\r\n        /// <seealso cref=\"TileBrush.Viewbox\"/>\r\n        public Rect Viewbox\r\n        {\r\n            get { return (Rect)GetValue(ViewboxProperty); }\r\n            set { SetValue(ViewboxProperty, value); }\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region StretchProperty\r\n\r\n        /// <summary>\r\n        /// Identifies the <see cref=\"Stretch\"/> dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty StretchProperty = DependencyProperty.Register(\"Stretch\", typeof(Stretch), typeof(ZoomableCanvas), new FrameworkPropertyMetadata(Stretch.Uniform, OnStretchChanged), IsStretchValid);\r\n\r\n        /// <summary>\r\n        /// Determines whether the value given is a valid value for the <see cref=\"Stretch\"/> dependency property.\r\n        /// </summary>\r\n        /// <param name=\"value\">The potential value for the dependency property.</param>\r\n        /// <returns><c>true</c> if the value is a valid value for the property; otherwise, <c>false</c>.</returns>\r\n        private static bool IsStretchValid(object value)\r\n        {\r\n            var stretch = (Stretch)value;\r\n            return stretch == Stretch.None\r\n                || stretch == Stretch.Uniform\r\n                || stretch == Stretch.UniformToFill;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the event that occurs when the value of the <see cref=\"Stretch\"/> dependency property has changed.\r\n        /// </summary>\r\n        /// <param name=\"d\">The dependency object on which the dependency property has changed.</param>\r\n        /// <param name=\"e\">The event args containing the old and new values of the dependency property.</param>\r\n        private static void OnStretchChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            d.CoerceValue(ScaleProperty);\r\n            d.CoerceValue(OffsetProperty);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value that specifies how the content of the canvas is displayed when <see cref=\"Viewbox\"/> is set.\r\n        /// </summary>\r\n        /// <value>One of the <see cref=\"Stretch\"/> values other than <see cref=\"Stretch.Fill\"/>.  The default is <see cref=\"Stretch.Uniform\"/>.</value>\r\n        /// <remarks>\r\n        /// Please see the documentation of <see cref=\"TileBrush.Stretch\"/> for a detailed explanation of the effects of this property.\r\n        /// The <see cref=\"Stretch\"/> mode of <see cref=\"Stretch.Fill\"/> is not supported, so unless the aspect ratio of <see cref=\"Viewbox\"/> exactly matches the aspect ratio of <see cref=\"RenderSize\"/> the actual area displayed will be more or less than <see cref=\"Viewbox\"/>.\r\n        /// The exact area that is displayed can be determined by the <see cref=\"ActualViewbox\"/> property in this case.\r\n        /// </remarks>\r\n        /// <seealso cref=\"TileBrush.Stretch\"/>\r\n        public Stretch Stretch\r\n        {\r\n            get { return (Stretch)GetValue(StretchProperty); }\r\n            set { SetValue(StretchProperty, value); }\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region StretchDirectionProperty\r\n\r\n        /// <summary>\r\n        /// Identifies the <see cref=\"StretchDirection\"/> dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty StretchDirectionProperty = DependencyProperty.Register(\"StretchDirection\", typeof(StretchDirection), typeof(ZoomableCanvas), new FrameworkPropertyMetadata(StretchDirection.Both, OnStretchDirectionChanged), IsStretchDirectionValid);\r\n\r\n        /// <summary>\r\n        /// Determines whether the value given is a valid value for the <see cref=\"StretchDirection\"/> dependency property.\r\n        /// </summary>\r\n        /// <param name=\"value\">The potential value for the dependency property.</param>\r\n        /// <returns><c>true</c> if the value is a valid value for the property; otherwise, <c>false</c>.</returns>\r\n        private static bool IsStretchDirectionValid(object value)\r\n        {\r\n            var stretch = (StretchDirection)value;\r\n            return stretch == StretchDirection.Both\r\n                || stretch == StretchDirection.UpOnly\r\n                || stretch == StretchDirection.DownOnly;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the event that occurs when the value of the <see cref=\"StretchDirection\"/> dependency property has changed.\r\n        /// </summary>\r\n        /// <param name=\"d\">The dependency object on which the dependency property has changed.</param>\r\n        /// <param name=\"e\">The event args containing the old and new values of the dependency property.</param>\r\n        private static void OnStretchDirectionChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            d.CoerceValue(ScaleProperty);\r\n            d.CoerceValue(OffsetProperty);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets how setting the <see cref=\"Viewbox\"/> property can affect the <see cref=\"Scale\"/>.\r\n        /// </summary>\r\n        /// <value>One of the <see cref=\"StretchDirection\"/> values.  The default is <see cref=\"StretchDirection.Both\"/></value>\r\n        /// <remarks>\r\n        /// When setting the <see cref=\"Viewbox\"/> property, the <see cref=\"Scale\"/> and <see cref=\"Offset\"/> properties are automatically coerced to the appropriate values according to the <see cref=\"Stretch\"/> and <see cref=\"StretchDirection\"/> properties, and any existing values of <see cref=\"Scale\"/> and <see cref=\"Offset\"/> will be overridden.\r\n        /// However, when the value of <see cref=\"StretchDirection\"/> is set to anything other than <see cref=\"StretchDirection.Both\"/>, then the setting of the <see cref=\"Scale\"/> property can limit the range of the automatically computed value.\r\n        /// The exact area that is displayed can be determined by the <see cref=\"ActualViewbox\"/> property in this case.\r\n        /// </remarks>\r\n        public StretchDirection StretchDirection\r\n        {\r\n            get { return (StretchDirection)GetValue(StretchDirectionProperty); }\r\n            set { SetValue(StretchDirectionProperty, value); }\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region OffsetProperty\r\n\r\n        /// <summary>\r\n        /// Identifies the <see cref=\"Offset\"/> dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty OffsetProperty = DependencyProperty.Register(\"Offset\", typeof(Point), typeof(ZoomableCanvas), new FrameworkPropertyMetadata(new Point(0.0, 0.0), FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnOffsetChanged, CoerceOffset), IsOffsetValid);\r\n\r\n        /// <summary>\r\n        /// Determines whether the value given is a valid value for the <see cref=\"Offset\"/> dependency property.\r\n        /// </summary>\r\n        /// <param name=\"value\">The potential value for the dependency property.</param>\r\n        /// <returns><c>true</c> if the value is a valid value for the property; otherwise, <c>false</c>.</returns>\r\n        private static bool IsOffsetValid(object value)\r\n        {\r\n            var point = (Point)value;\r\n            return point.X.IsBetween(Double.MinValue, Double.MaxValue)\r\n                && point.Y.IsBetween(Double.MinValue, Double.MaxValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a <see cref=\"Point\"/> representing top-left point of the canvas (in canvas coordinates) that is currently being displayed after taking <see cref=\"Viewbox\"/> into account.\r\n        /// </summary>\r\n        /// <param name=\"d\">Dependency object whos value is being coerced.</param>\r\n        /// <param name=\"value\">The original uncoerced value.</param>\r\n        /// <returns>A <see cref=\"Point\"/> representing top-left point of the canvas (in canvas coordinates) that is currently being displayed.</returns>\r\n        private static object CoerceOffset(DependencyObject d, object value)\r\n        {\r\n            var canvas = d as ZoomableCanvas;\r\n            if (canvas != null)\r\n            {\r\n                var viewbox = canvas.Viewbox;\r\n                if (!viewbox.IsEmpty)\r\n                {\r\n                    var scale = canvas.Scale;\r\n                    var renderSize = canvas.RenderSize;\r\n                    value = new Point((viewbox.X + viewbox.Width / 2) * scale - renderSize.Width / 2, (viewbox.Y + viewbox.Height / 2) * scale - renderSize.Height / 2);\r\n                }\r\n            }\r\n\r\n            return value;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the event that occurs when the value of the <see cref=\"Offset\"/> dependency property has changed.\r\n        /// </summary>\r\n        /// <param name=\"d\">The dependency object on which the dependency property has changed.</param>\r\n        /// <param name=\"e\">The event args containing the old and new values of the dependency property.</param>\r\n        private static void OnOffsetChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            d.CoerceValue(ActualViewboxProperty);\r\n\r\n            var canvas = d as ZoomableCanvas;\r\n            if (canvas != null)\r\n            {\r\n                canvas.OffsetOverride((Point)e.NewValue);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets (but see remarks) the top-left point of the area of the canvas (in canvas coordinates) that is being displayed by this panel.\r\n        /// </summary>\r\n        /// <value>A <see cref=\"Point\"/> on the canvas (in canvas coordinates).  The default is <c>(0,0)</c>.</value>\r\n        /// <remarks>\r\n        /// This value controls the horizontal and vertical position of the canvas children relative to this panel.\r\n        /// <para>\r\n        /// For example, consider a child element which has its <see cref=\"Canvas.Left\"/> and <see cref=\"Canvas.Top\"/> set to <c>100</c> and <c>100</c>.\r\n        /// Also assume that the value of <see cref=\"Scale\"/> is set to <c>1.0</c> (the default value).\r\n        /// </para>\r\n        /// <para>\r\n        /// By default, the value of <see cref=\"Offset\"/> is <c>(0,0)</c> so the element will be displayed at 100 units to the right and 100 units down from the top-left corner of this panel, exactly how <see cref=\"Canvas\"/> would display it.\r\n        /// If the value of <see cref=\"Offset\"/> is set to <c>(20,40)</c> then the element will be displayed 80 units to the right and 60 units down from the top-left corner of this panel.\r\n        /// In other words, it will have appeared to \"move\" up by 20 units and left by 40 units.\r\n        /// </para>\r\n        /// <para>\r\n        /// If the value of <see cref=\"Offset\"/> is set to <c>(100,100)</c> then the top-left corner of the element will be displayed exactly in the top-left corner of this panel.\r\n        /// Note that this is true regardless of the value of <see cref=\"Scale\"/>!\r\n        /// </para>\r\n        /// <para>\r\n        /// If the value of <see cref=\"Offset\"/> is set to <c>(110,120)</c> then the top-left corner of the element will be displayed 10 units to the left and 20 units above this panel.\r\n        /// In other words, if <see cref=\"ClipToBounds\"/> is set to <c>true</c>, then the top-left corner of the element will not be visible.\r\n        /// </para>\r\n        /// <para>\r\n        /// The value of <see cref=\"Offset\"/> can also be negative, so if the value of <see cref=\"Offset\"/> is set to <c>(-100,-100)</c> then the element will be displayed at 200 pixels to the right and 200 pixels down from the top-left corner of the panel.\r\n        /// </para>\r\n        /// <para>\r\n        /// When the <see cref=\"Viewbox\"/> property is set to a non-<see cref=\"Rect.Empty\"/> value, the value of the <see cref=\"Offset\"/> property will be automatically computed to match the <see cref=\"Viewbox\"/>, <see cref=\"Stretch\"/>, and <see cref=\"StretchDirection\"/> properties.\r\n        /// The value of the <see cref=\"Offset\"/> property will contain the computed value (via the WPF dependency property coersion mechanism), and any attempts to set <see cref=\"Offset\"/> to a different value will be ignored until <see cref=\"Viewbox\"/> is set to <see cref=\"Rect.Empty\"/> again.\r\n        /// <para>\r\n        /// </remarks>\r\n        /// <seealso cref=\"Viewbox\"/>\r\n        public Point Offset\r\n        {\r\n            get { return (Point)GetValue(OffsetProperty); }\r\n            set { SetValue(OffsetProperty, value); }\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region ScaleProperty\r\n\r\n        /// <summary>\r\n        /// Identifies the <see cref=\"Scale\"/> dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty ScaleProperty = DependencyProperty.Register(\"Scale\", typeof(double), typeof(ZoomableCanvas), new FrameworkPropertyMetadata(1.0, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnScaleChanged, CoerceScale), IsScaleValid);\r\n\r\n        /// <summary>\r\n        /// Determines whether the value given is a valid value for the <see cref=\"Scale\"/> dependency property.\r\n        /// </summary>\r\n        /// <param name=\"value\">The potential value for the dependency property.</param>\r\n        /// <returns><c>true</c> if the value is a valid value for the property; otherwise, <c>false</c>.</returns>\r\n        private static bool IsScaleValid(object value)\r\n        {\r\n            return ((double)value).IsBetween(Double.Epsilon, Double.MaxValue);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a <see cref=\"Double\"/> representing the scale of the content that is currently being displayed after taking <see cref=\"Viewbox\"/>, <see cref=\"Stretch\"/>, and <see cref=\"StretchDirection\"/> into account.\r\n        /// </summary>\r\n        /// <param name=\"d\">Dependency object whos value is being coerced.</param>\r\n        /// <param name=\"value\">The original uncoerced value.</param>\r\n        /// <returns>A <see cref=\"Double\"/> representing scale of the content that is currently being displayed.</returns>\r\n        private static object CoerceScale(DependencyObject d, object value)\r\n        {\r\n            var scale = (double)value;\r\n\r\n            var canvas = d as ZoomableCanvas;\r\n            if (canvas != null)\r\n            {\r\n                var renderSize = canvas.RenderSize;\r\n                if (renderSize.Width > 0 && renderSize.Height > 0)\r\n                {\r\n                    var viewbox = canvas.Viewbox;\r\n                    if (!viewbox.IsEmpty)\r\n                    {\r\n                        switch (canvas.Stretch)\r\n                        {\r\n                            case Stretch.Uniform:\r\n                                scale = Math.Min(renderSize.Width / viewbox.Width, renderSize.Height / viewbox.Height);\r\n                                break;\r\n\r\n                            case Stretch.UniformToFill:\r\n                                scale = Math.Max(renderSize.Width / viewbox.Width, renderSize.Height / viewbox.Height);\r\n                                break;\r\n                        }\r\n\r\n                        switch (canvas.StretchDirection)\r\n                        {\r\n                            case StretchDirection.DownOnly:\r\n                                scale = scale.AtMost((double)value);\r\n                                break;\r\n\r\n                            case StretchDirection.UpOnly:\r\n                                scale = scale.AtLeast((double)value);\r\n                                break;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            return scale;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the event that occurs when the value of the <see cref=\"Scale\"/> dependency property has changed.\r\n        /// </summary>\r\n        /// <param name=\"d\">The dependency object on which the dependency property has changed.</param>\r\n        /// <param name=\"e\">The event args containing the old and new values of the dependency property.</param>\r\n        private static void OnScaleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            d.CoerceValue(ActualViewboxProperty);\r\n            d.CoerceValue(OffsetProperty);\r\n\r\n            var canvas = d as ZoomableCanvas;\r\n            if (canvas != null)\r\n            {\r\n                canvas.ScaleOverride((double)e.NewValue);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets (but see remarks) the scale at which the content of the canvas is being displayed.\r\n        /// </summary>\r\n        /// <value>A <see cref=\"Double\"/> between <see cref=\"Double.Epsilon\"/> and <see cref=\"Double.MaxValue\"/>.  The default value is <c>1.0</c>.</value>\r\n        /// <remarks>\r\n        /// This value is what controls the zoom level of the canvas and the amount of the <see cref=\"ScaleTransform\"/> when <see cref=\"ApplyTransform\"/> is set to <c>true</c>.\r\n        /// When <see cref=\"ApplyTransform\"/> is set to <c>false</c>, this value still controls the positioning of the children (i.e. elements are placed closer together when zoomed out and farther apart when zoomed in), but the sizes of the children are unaffected.\r\n        /// <para>\r\n        /// For example, consider a child element which has its <see cref=\"Canvas.Left\"/> and <see cref=\"Canvas.Top\"/> set to <c>100</c> and <c>100</c>, with a <see cref=\"Width\"/> of 50 and a <see cref=\"Height\"/> of 50.\r\n        /// Also assume that the value of <see cref=\"Offset\"/> is set to <c>(0,0)</c> (the default value).\r\n        /// </para>\r\n        /// <para>\r\n        /// By default, the value of <see cref=\"Scale\"/> is <c>1.0</c> so the element will be displayed at 100 units to the right and 100 units down from the top-left corner of this panel, exactly how <see cref=\"Canvas\"/> would display it.\r\n        /// If the value of <see cref=\"Scale\"/> is set to <c>0.8</c> then the top-left corner of the element will be displayed 80 units to the right and 80 units down from the top-left corner of this panel.\r\n        /// If <see cref=\"ApplyTransform\"/> is set to <c>true</c> (the default value), then the element will also be scaled down (shrunk) to 80% of its normal size, so that the bottom-right of the element will be 120 units to the right and 120 units down from the top-left corner of this panel.\r\n        /// If <see cref=\"ApplyTransform\"/> is set to <c>false</c>, then the element will remain its original size, resulting in the bottom-right of the element being 130 units to the right and 130 units down from the top-left corner of this panel.\r\n        /// In other words, it will simply have appeared to \"move\" up by 20 units and left by 20 units without changing its size.\r\n        /// This is not normally what a user would expect when \"zooming out\" (unless the element is some kind of floating label above the canvas), so it is expected that the children of the canvas will be responsible for changing their representation appropriately when <see cref=\"ApplyTransform\"/> is set to <c>false</c>.\r\n        /// </para>\r\n        /// <para>\r\n        /// When the <see cref=\"Viewbox\"/> property is set to a non-<see cref=\"Rect.Empty\"/> value, the value of the <see cref=\"Scale\"/> property will be automatically computed to match the <see cref=\"Viewbox\"/>, <see cref=\"Stretch\"/>, and <see cref=\"StretchDirection\"/> properties.\r\n        /// The value of the <see cref=\"Scale\"/> property will contain the computed value (via the WPF dependency property coersion mechanism), but and any attempts to set <see cref=\"Scale\"/> to a different value will be ignored (if <see cref=\"StretchDirection\"/> is set to <see cref=\"StretchDirection.Both\"/>) until <see cref=\"Viewbox\"/> is set to <see cref=\"Rect.Empty\"/> again.\r\n        /// <para>\r\n        /// </remarks>\r\n        /// <seealso cref=\"Viewbox\"/>\r\n        public double Scale\r\n        {\r\n            get { return (double)GetValue(ScaleProperty); }\r\n            set { SetValue(ScaleProperty, value); }\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region RealizationLimitProperty\r\n\r\n        /// <summary>\r\n        /// Identifies the <see cref=\"RealizationLimit\"/> dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty RealizationLimitProperty = DependencyProperty.Register(\"RealizationLimit\", typeof(int), typeof(ZoomableCanvas), new FrameworkPropertyMetadata(int.MaxValue, OnRealizationLimitChanged), IsRealizationLimitValid);\r\n\r\n        /// <summary>\r\n        /// Determines whether the value given is a valid value for the <see cref=\"RealizationLimit\"/> dependency property.\r\n        /// </summary>\r\n        /// <param name=\"value\">The potential value for the dependency property.</param>\r\n        /// <returns><c>true</c> if the value is a valid value for the property; otherwise, <c>false</c>.</returns>\r\n        private static bool IsRealizationLimitValid(object value)\r\n        {\r\n            return (int)value >= 0;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the event that occurs when the value of the <see cref=\"RealizationLimit\"/> dependency property has changed.\r\n        /// </summary>\r\n        /// <param name=\"d\">The dependency object on which the dependency property has changed.</param>\r\n        /// <param name=\"e\">The event args containing the old and new values of the dependency property.</param>\r\n        private static void OnRealizationLimitChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var canvas = d as ZoomableCanvas;\r\n            if (canvas != null)\r\n            {\r\n                canvas.InvalidateReality();\r\n            }            \r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the maximum number of elements that will be instantiated on the canvas when <see cref=\"IsVirtualizing\"/> is set to <see cref=\"true\"/>.\r\n        /// </summary>\r\n        /// <value>An <see cref=\"Int32\"/> between <c>0</c> and <see cref=\"Int32.MaxValue\"/>.  The default is <see cref=\"Int32.MaxValue\"/>.</value>\r\n        /// <remarks>\r\n        /// When the children of the canvas are being populated through an <see cref=\"ItemsControl\"/>, visual elements will be instantiated for the first <see cref=\"RealizationLimit\"/> items within the <see cref=\"ActualViewbox\"/>.\r\n        /// </remarks>\r\n        public int RealizationLimit\r\n        {\r\n            get { return (int)GetValue(RealizationLimitProperty); }\r\n            set { SetValue(RealizationLimitProperty, value); }\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region RealizationRateProperty\r\n\r\n        /// <summary>\r\n        /// Identifies the <see cref=\"RealizationRate\"/> dependency property.\r\n        /// </summary>\r\n        public static readonly DependencyProperty RealizationRateProperty = DependencyProperty.Register(\"RealizationRate\", typeof(int), typeof(ZoomableCanvas), new FrameworkPropertyMetadata(int.MaxValue, OnRealizationRateChanged), IsRealizationRateValid);\r\n\r\n        /// <summary>\r\n        /// Determines whether the value given is a valid value for the <see cref=\"RealizationRate\"/> dependency property.\r\n        /// </summary>\r\n        /// <param name=\"value\">The potential value for the dependency property.</param>\r\n        /// <returns><c>true</c> if the value is a valid value for the property; otherwise, <c>false</c>.</returns>\r\n        private static bool IsRealizationRateValid(object value)\r\n        {\r\n            return (int)value >= 0;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the event that occurs when the value of the <see cref=\"RealizationRate\"/> dependency property has changed.\r\n        /// </summary>\r\n        /// <param name=\"d\">The dependency object on which the dependency property has changed.</param>\r\n        /// <param name=\"e\">The event args containing the old and new values of the dependency property.</param>\r\n        private static void OnRealizationRateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var canvas = d as ZoomableCanvas;\r\n            if (canvas != null)\r\n            {\r\n                canvas.InvalidateReality();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the maximum number of elements that will be realized or virtualized at one time before yielding control back to the dispatcher when <see cref=\"IsVirtualizing\"/> is set to <see cref=\"true\"/>.\r\n        /// </summary>\r\n        /// <value>An <see cref=\"Int32\"/> between <c>0</c> and <see cref=\"Int32.MaxValue\"/>.  The default is <see cref=\"Int32.MaxValue\"/>.</value>\r\n        /// <remarks>\r\n        /// By default, the value of this property is <see cref=\"Int32.MaxValue\"/> which means that all realization and virtualization happens at once, at the time determined by <see cref=\"RealizationPriority\"/>.\r\n        /// The default behavior is optimized to realize all elements as quickly as possible, at the expensive of application responsiveness while the realization is happening.\r\n        /// Setting the <see cref=\"RealizationPriority\"/> to <see cref=\"DispatcherPriority.Input\"/> and decreasing the <see cref=\"RealizationRate\"/> will make the application feel more responsive but will take longer to realize all items.\r\n        /// </remarks>\r\n        public int RealizationRate\r\n        {\r\n            get { return (int)GetValue(RealizationRateProperty); }\r\n            set { SetValue(RealizationRateProperty, value); }\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region Initialization\r\n\r\n        /// <summary>\r\n        /// Performs a one-time initialization of <see cref=\"ZoomableCanvas\"/>-related metadata.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1810:InitializeReferenceTypeStaticFieldsInline\")]\r\n        static ZoomableCanvas()\r\n        {\r\n            RenderTransformProperty.OverrideMetadata(typeof(ZoomableCanvas), new FrameworkPropertyMetadata(null, CoerceRenderTransform));\r\n\r\n            try\r\n            {\r\n                Canvas.TopProperty.OverrideMetadata(typeof(UIElement), new FrameworkPropertyMetadata(OnPositioningChanged));\r\n                Canvas.LeftProperty.OverrideMetadata(typeof(UIElement), new FrameworkPropertyMetadata(OnPositioningChanged));\r\n                Canvas.BottomProperty.OverrideMetadata(typeof(UIElement), new FrameworkPropertyMetadata(OnPositioningChanged));\r\n                Canvas.RightProperty.OverrideMetadata(typeof(UIElement), new FrameworkPropertyMetadata(OnPositioningChanged));\r\n            }\r\n            catch (ArgumentException)\r\n            {\r\n                // These overrides crash in Expression Blend.\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Ensures coersion routines are invoked with their default values.\r\n        /// </summary>\r\n        public ZoomableCanvas()\r\n        {\r\n            CoerceValue(ScaleProperty);\r\n            CoerceValue(OffsetProperty);\r\n            CoerceValue(ActualViewboxProperty);\r\n            CoerceValue(RenderTransformProperty);\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region Spatial Item Management\r\n\r\n        /// <summary>\r\n        /// Provides a two-dimensional index of items that can be quickly queried for all items that intersect a given rectangle.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// When the <see cref=\"ZoomableCanvas\"/> is hosting items for an <see cref=\"ItemsControl\"/>, the <see cref=\"ItemsControl.ItemsSource\"/> can implement this interface to greatly speed up virtualization in the canvas.\r\n        /// If any of those conditions are not true, then the canvas must realize every item at least once in order to determine its bounds before it can virtualize it, and then once it is virtualized it will have no means of moving spontaneously back into view.\r\n        /// </remarks>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1034:NestedTypesShouldNotBeVisible\", Justification = \"This interface is only used by ZoomableCanvas.\")]\r\n        public interface ISpatialItemsSource\r\n        {\r\n            /// <summary>\r\n            /// Gets the entire extent of the index, which is typically the union of all bounding boxes of all items within the set.\r\n            /// </summary>\r\n            /// <remarks>\r\n            /// This value is used when determining the extent of the scroll bars when the canvas is hosted in a scroll viewer.\r\n            /// </remarks>\r\n            Rect Extent { get; }\r\n\r\n            /// <summary>\r\n            /// Gets the set of items that intersect the given rectangle.\r\n            /// </summary>\r\n            /// <param name=\"rectangle\">The area in which any intersecting items are returned.</param>\r\n            /// <returns>A result set of all items that intersect the given rectangle.</returns>\r\n            /// <remarks>\r\n            /// The enumerator returned by this method is used lazily and sometimes only partially, meaning it should return quickly without computing the entire result set immediately for best results.\r\n            /// </remarks>\r\n            IEnumerable<int> Query(Rect rectangle);\r\n\r\n            /// <summary>\r\n            /// Occurs when the value of the <see cref=\"Extent\"/> property has changed.\r\n            /// </summary>\r\n            event EventHandler ExtentChanged;\r\n\r\n            /// <summary>\r\n            /// Occurs when the results of the last query are no longer valid and should be re-queried.\r\n            /// </summary>\r\n            event EventHandler QueryInvalidated;\r\n        }\r\n\r\n        #region Private SpatialIndex Implementation\r\n\r\n        /// <summary>\r\n        /// Private implementation of <see cref=\"ISpatialItemsSource\"/> when the items source is not one.\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// This class efficiently implements a spatial index by internally using a PriorityQuadTree data structure.\r\n        /// </remarks>\r\n        private class PrivateSpatialIndex : ISpatialItemsSource\r\n        {\r\n            /// <summary>\r\n            /// Private class that holds an index/bounds pair.\r\n            /// </summary>\r\n            /// <remarks>\r\n            /// A Tuple could have been used instead except that we want Index to be mutable.\r\n            /// </remarks>\r\n            private class SpatialItem\r\n            {\r\n                public SpatialItem()\r\n                {\r\n                    Index = -1;\r\n                    Bounds = Rect.Empty;\r\n                }\r\n\r\n                public int Index\r\n                {\r\n                    get;\r\n                    set;\r\n                }\r\n\r\n                public Rect Bounds\r\n                {\r\n                    get;\r\n                    set;\r\n                }\r\n\r\n                public override string ToString()\r\n                {\r\n                    return \"Item[\" + Index + \"].Bounds = \" + Bounds;\r\n                }\r\n            }\r\n\r\n            /// <summary>\r\n            /// We use a PriorityQuadTree to implement our spatial index.\r\n            /// </summary>\r\n            private readonly PriorityQuadTree<SpatialItem> _tree = new PriorityQuadTree<SpatialItem>();\r\n\r\n            /// <summary>\r\n            /// This is a list of all of the spatial items in the index.\r\n            /// </summary>\r\n            private readonly List<SpatialItem> _items = new List<SpatialItem>();\r\n\r\n            /// <summary>\r\n            /// Holds the accurate extent of all item bounds in the index.  This may be different from _tree.Extent.\r\n            /// </summary>\r\n            private Rect _extent = Rect.Empty;\r\n\r\n            /// <summary>\r\n            /// Holds the last query used in order to know when to raise the <see cref=\"QueryInvalidated\"/> event.\r\n            /// </summary>\r\n            private Rect _lastQuery = Rect.Empty;\r\n\r\n            /// <summary>\r\n            /// Occurs when the value of the <see cref=\"Extent\"/> property has changed.\r\n            /// </summary>\r\n            public event EventHandler ExtentChanged;\r\n\r\n            /// <summary>\r\n            /// Occurs when the results of the last query are no longer valid and should be re-queried.\r\n            /// </summary>\r\n            public event EventHandler QueryInvalidated;\r\n\r\n            /// <summary>\r\n            /// Get a list of the items that intersect the given bounds.\r\n            /// </summary>\r\n            /// <param name=\"bounds\">The bounds to test.</param>\r\n            /// <returns>\r\n            /// List of zero or more items that intersect the given bounds, returned in the order given by the priority assigned during Insert.\r\n            /// </returns>\r\n            public IEnumerable<int> Query(Rect bounds)\r\n            {\r\n                _lastQuery = bounds;\r\n                return _tree.GetItemsIntersecting(bounds).Select(i => i.Index);\r\n            }\r\n\r\n            /// <summary>\r\n            /// Gets the computed minimum required rectangle to contain all of the items in the index.  This property is also settable for efficiency the future extent of the items is known.\r\n            /// </summary>\r\n            public Rect Extent\r\n            {\r\n                get\r\n                {\r\n                    if (_extent.IsEmpty)\r\n                    {\r\n                        foreach (var item in _items)\r\n                        {\r\n                            _extent.Union(item.Bounds);\r\n                        }\r\n                    }\r\n                    return _extent;\r\n                }\r\n            }\r\n\r\n            /// <summary>\r\n            /// Gets or sets the bounds for the item with the given <paramref name=\"index\"/>.\r\n            /// </summary>\r\n            /// <param name=\"index\">The index of the item.</param>\r\n            /// <returns>The bounds of the item, or <see cref=\"Rect.Empty\"/> if the bounds are unknown.</returns>\r\n            /// <remarks>\r\n            /// Items with bounnds of <see cref=\"Rect.Empty\"/> are always returned first from any query.\r\n            /// </remarks>\r\n            public Rect this[int index]\r\n            {\r\n                get\r\n                {\r\n                    return _items[index].Bounds;\r\n                }\r\n                set\r\n                {\r\n                    var item = _items[index];\r\n                    var bounds = item.Bounds;\r\n                    if (bounds != value)\r\n                    {\r\n                        _extent = Rect.Empty;\r\n                        _tree.Remove(item, bounds);\r\n                        _tree.Insert(item, value, value.IsEmpty ? Double.PositiveInfinity : value.Width + value.Height);\r\n                        item.Bounds = value;\r\n\r\n                        if (ExtentChanged != null)\r\n                        {\r\n                            ExtentChanged(this, EventArgs.Empty);\r\n                        }\r\n\r\n                        if (QueryInvalidated != null && (bounds.IntersectsWith(_lastQuery) || value.IntersectsWith(_lastQuery)))\r\n                        {\r\n                            QueryInvalidated(this, EventArgs.Empty);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n            /// <summary>\r\n            /// Adds or inserts the given <see cref=\"count\"/> of items at the given <see cref=\"index\"/>.\r\n            /// </summary>\r\n            /// <param name=\"index\">The index at which to insert the items.</param>\r\n            /// <param name=\"count\">The number of items to insert.</param>\r\n            /// <remarks>\r\n            /// All items are inserted with bounds of <see cref=\"Rect.Empty\"/>, meaning they will be returned from all queries.\r\n            /// </remarks>\r\n            public void InsertRange(int index, int count)\r\n            {\r\n                var items = new SpatialItem[count];\r\n                for (int i = 0; i < count; i++)\r\n                {\r\n                    items[i] = new SpatialItem();\r\n                    items[i].Index = index + i;\r\n                    _tree.Insert(items[i], Rect.Empty, Double.PositiveInfinity);\r\n                }\r\n                _items.InsertRange(index, items);\r\n\r\n                if (QueryInvalidated != null)\r\n                {\r\n                    QueryInvalidated(this, EventArgs.Empty);\r\n                }\r\n            }\r\n\r\n            /// <summary>\r\n            /// Removes the given <see cref=\"count\"/> of items at the given <see cref=\"index\"/>.\r\n            /// </summary>\r\n            /// <param name=\"index\">The index at which to remove from.</param>\r\n            /// <param name=\"count\">The number of items to remove.</param>\r\n            public void RemoveRange(int index, int count)\r\n            {\r\n                for (int i = index; i < _items.Count; i++)\r\n                {\r\n                    if (i < index + count)\r\n                    {\r\n                        _tree.Remove(_items[i], _items[i].Bounds);\r\n                    }\r\n                    else\r\n                    {\r\n                        _items[i].Index = i - count;\r\n                    }\r\n                }\r\n                _items.RemoveRange(index, count);\r\n                _extent = Rect.Empty;\r\n\r\n                if (ExtentChanged != null)\r\n                {\r\n                    ExtentChanged(this, EventArgs.Empty);\r\n                }\r\n\r\n                if (QueryInvalidated != null)\r\n                {\r\n                    QueryInvalidated(this, EventArgs.Empty);\r\n                }\r\n            }\r\n\r\n            /// <summary>\r\n            /// Clears and resets the spatial index to hold the given <see cref=\"count\"/> of items.\r\n            /// </summary>\r\n            /// <param name=\"count\">The number of items within the index.</param>\r\n            public void Reset(int count)\r\n            {\r\n                _extent = Rect.Empty;\r\n                _items.Clear();\r\n                InsertRange(0, count);\r\n\r\n                if (ExtentChanged != null)\r\n                {\r\n                    ExtentChanged(this, EventArgs.Empty);\r\n                }\r\n\r\n                if (QueryInvalidated != null)\r\n                {\r\n                    QueryInvalidated(this, EventArgs.Empty);\r\n                }\r\n            }\r\n\r\n            /// <summary>\r\n            /// Optimizes the spatial index based on the current extent if optimization is warranted.\r\n            /// </summary>\r\n            public void Optimize()\r\n            {\r\n                var treeExtent = _tree.Extent;\r\n                var realExtent = Extent;\r\n                if (treeExtent.Top - realExtent.Top > treeExtent.Height ||\r\n                    treeExtent.Left - realExtent.Left > treeExtent.Width ||\r\n                    realExtent.Right - treeExtent.Right > treeExtent.Width ||\r\n                    realExtent.Bottom - treeExtent.Bottom > treeExtent.Height)\r\n                {\r\n                    _tree.Extent = realExtent;\r\n\r\n                    if (QueryInvalidated != null)\r\n                    {\r\n                        QueryInvalidated(this, EventArgs.Empty);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        #endregion\r\n\r\n        /// <summary>\r\n        /// Two-dimentional spatial index of our data items.\r\n        /// </summary>\r\n        private ISpatialItemsSource SpatialIndex;\r\n\r\n        /// <summary>\r\n        /// Private implementation of <see cref=\"ISpatialItemsSource\"/> when the items source does not provide one.\r\n        /// </summary>\r\n        private PrivateSpatialIndex PrivateIndex;\r\n\r\n        /// <summary>\r\n        /// Ordered list of realized items based on the order they are returned from the spatial index.\r\n        /// </summary>\r\n        private LinkedList<int> RealizedItems;\r\n\r\n        /// <summary>\r\n        /// Handles the event that occurs when the value of the <see cref=\"VirtualPanel.IsVirtualizing\"/> property has changed.\r\n        /// </summary>\r\n        protected override void OnIsVirtualizingChanged(bool oldIsVirtualizing, bool newIsVirtualizing)\r\n        {\r\n            OnItemsReset();\r\n            base.OnIsVirtualizingChanged(oldIsVirtualizing, newIsVirtualizing);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Refreshes our data when the <see cref=\"Panel.IsItemsHost\"/> property has changed.\r\n        /// </summary>\r\n        protected override void OnIsItemsHostChanged(bool oldIsItemsHost, bool newIsItemsHost)\r\n        {\r\n            OnItemsReset();\r\n            base.OnIsItemsHostChanged(oldIsItemsHost, newIsItemsHost);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Dispatches to specific methods to update the spatial index when the items have changed.\r\n        /// </summary>\r\n        protected override void OnItemsChanged(object sender, NotifyCollectionChangedEventArgs args)\r\n        {\r\n            if (args == null)\r\n            {\r\n                throw new ArgumentNullException(\"args\");\r\n            }\r\n\r\n            if (args.Action == NotifyCollectionChangedAction.Add)\r\n            {\r\n                OnItemsAdded(args.NewStartingIndex, args.NewItems);\r\n            }\r\n            else if (args.Action == NotifyCollectionChangedAction.Remove)\r\n            {\r\n                OnItemsRemoved(args.OldStartingIndex, args.OldItems);\r\n            }\r\n            else if (args.Action == NotifyCollectionChangedAction.Reset)\r\n            {\r\n                OnItemsReset();\r\n            }\r\n\r\n            InvalidateReality();\r\n            InvalidateExtent();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates our private spatial index when items are added to the item source.\r\n        /// </summary>\r\n        /// <param name=\"index\">The index of the first item that was added.</param>\r\n        /// <param name=\"items\">The items that were added.</param>\r\n        private void OnItemsAdded(int index, IList items)\r\n        {\r\n            if (PrivateIndex != null)\r\n            {\r\n                PrivateIndex.InsertRange(index, items.Count);\r\n            }\r\n\r\n            if (RealizedItems != null)\r\n            {\r\n                var item = RealizedItems.First;\r\n                while (item != null)\r\n                {\r\n                    if (item.Value >= index)\r\n                    {\r\n                        item.Value += items.Count;\r\n                    }\r\n                    item = item.Next;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Updates our private spatial index when items are removed from the item source.\r\n        /// </summary>\r\n        /// <param name=\"index\">The old index of the first item that was removed.</param>\r\n        /// <param name=\"items\">The items that were removed.</param>\r\n        private void OnItemsRemoved(int index, IList items)\r\n        {\r\n            if (PrivateIndex != null)\r\n            {\r\n                PrivateIndex.RemoveRange(index, items.Count);\r\n            }\r\n\r\n            if (RealizedItems != null)\r\n            {\r\n                var item = RealizedItems.First;\r\n                while (item != null)\r\n                {\r\n                    var next = item.Next;\r\n                    if (item.Value >= index)\r\n                    {\r\n                        if (item.Value < index + items.Count)\r\n                        {\r\n                            RealizedItems.Remove(item);\r\n                        }\r\n                        else\r\n                        {\r\n                            item.Value -= items.Count;\r\n                        }\r\n                    }\r\n                    item = next;\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Resets and initializes our spatial indices when the items source has changed.\r\n        /// </summary>\r\n        private void OnItemsReset()\r\n        {\r\n            if (SpatialIndex != null)\r\n            {\r\n                SpatialIndex.ExtentChanged -= OnSpatialExtentChanged;\r\n                SpatialIndex.QueryInvalidated -= OnSpatialQueryInvalidated;\r\n            }\r\n\r\n            RealizedItems = null;\r\n            SpatialIndex = null;\r\n            PrivateIndex = null;\r\n            \r\n            if (IsVirtualizing && IsItemsHost && ItemsOwner != null)\r\n            {\r\n                RealizedItems = new LinkedList<int>();\r\n                SpatialIndex = ItemsOwner.ItemsSource as ISpatialItemsSource;\r\n                if (SpatialIndex == null)\r\n                {\r\n                    PrivateIndex = new PrivateSpatialIndex();\r\n                    PrivateIndex.Reset(ItemsOwner.Items != null ? ItemsOwner.Items.Count : 0);\r\n                    SpatialIndex = PrivateIndex;\r\n                }\r\n\r\n                SpatialIndex.ExtentChanged += OnSpatialExtentChanged;\r\n                SpatialIndex.QueryInvalidated += OnSpatialQueryInvalidated;\r\n            }\r\n\r\n            InvalidateReality();\r\n            InvalidateExtent();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Invalidates reality when the last spatial query is no longer valid.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The spatial index.</param>\r\n        /// <param name=\"e\">The event arguments.</param>\r\n        private void OnSpatialQueryInvalidated(object sender, EventArgs e)\r\n        {\r\n            InvalidateReality();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Invalidates the extent when the spatial index extent has changed.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The spatial index.</param>\r\n        /// <param name=\"e\">The event arguments.</param>\r\n        private void OnSpatialExtentChanged(object sender, EventArgs e)\r\n        {\r\n            InvalidateExtent();\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region Virtualization\r\n\r\n        /// <summary>\r\n        /// Performs realization and virtualization in batches based on the <see cref=\"RealizationRate\"/>. \r\n        /// </summary>\r\n        /// <param name=\"items\">The current items being hosted by this panel.</param>\r\n        /// <param name=\"state\">The previous return value of this method.</param>\r\n        /// <returns>A non-<c>null</c> value if further realization is required; otherwise, <c>null</c>.</returns>\r\n        protected override object RealizeOverride(IEnumerable items, object state)\r\n        {\r\n            var enumerator = state as IEnumerator ?? RealizeOverride();\r\n            var rate = RealizationRate;\r\n            while (rate-- > 0)\r\n            {\r\n                if (!enumerator.MoveNext())\r\n                {\r\n                    return null;\r\n                }\r\n            }\r\n            return enumerator;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Realizes and virtualizes items based on the current viewbox.\r\n        /// </summary>\r\n        /// <returns>An enumerator which allows this method to continue realization where it left off.</returns>\r\n        private IEnumerator RealizeOverride()\r\n        {\r\n            if (SpatialIndex != null)\r\n            {\r\n                // Optimize our private spatial index for the upcoming query.\r\n                if (PrivateIndex != null)\r\n                {\r\n                    PrivateIndex.Optimize();\r\n                }\r\n\r\n                IEnumerable<int> query;\r\n\r\n                if (IsVirtualizing)\r\n                {\r\n                    // Only realize the items within our viewbox.\r\n                    var viewbox = ActualViewbox;\r\n                    var limit = RealizationLimit;\r\n\r\n                    // Buffer the viewbox so that panning by small amounts is smooth.\r\n                    viewbox.Inflate(viewbox.Width / 10, viewbox.Height / 10);\r\n\r\n                    // Query the index for all items that intersect our viewbox, up to our realization limit.\r\n                    query = SpatialIndex.Query(viewbox).Take(limit);\r\n                }\r\n                else\r\n                {\r\n                    // Get all items.\r\n                    query = SpatialIndex.Query(new Rect(Double.NegativeInfinity, Double.NegativeInfinity, Double.PositiveInfinity, Double.PositiveInfinity));\r\n                }\r\n\r\n                // We insert nodes at the head of the linked list in the order they are returned.\r\n                LinkedListNode<int> lastNode = null;\r\n                LinkedListNode<int> nextNode = RealizedItems.First;\r\n\r\n                // Realize them.\r\n                foreach (var index in query)\r\n                {\r\n                    // See if the item was already realized.\r\n                    var node = RealizedItems.FindNext(lastNode, index);\r\n                    if (node == null || node != nextNode)\r\n                    {\r\n                        if (node != null)\r\n                        {\r\n                            // If it was already realized further down the list, remove it from the list so we can add it later.\r\n                            RealizedItems.Remove(node);\r\n                        }\r\n                        else\r\n                        {\r\n                            // If it was not already realized, realize it now and create a new node for it.\r\n                            RealizeItem(index);\r\n                            node = new LinkedListNode<int>(index);\r\n                        }\r\n\r\n                        // Insert the node after the last node, or at the front if this is the first.\r\n                        if (lastNode == null)\r\n                        {\r\n                            RealizedItems.AddFirst(node);\r\n                        }\r\n                        else\r\n                        {\r\n                            RealizedItems.AddAfter(lastNode, node);\r\n                        }\r\n                    }\r\n\r\n                    // Keep track of the last node of the query results.\r\n                    lastNode = node;\r\n                    nextNode = node.Next;\r\n\r\n                    // Yield control for throttling.\r\n                    yield return index;\r\n                }\r\n\r\n                // Virtualize any remaining items that are no longer part of our result set, backwards.\r\n                nextNode = RealizedItems.Last;\r\n                while (nextNode != lastNode)\r\n                {\r\n                    var node = nextNode;\r\n                    nextNode = nextNode.Previous;\r\n\r\n                    var index = node.Value;\r\n                    var container = ContainerFromIndex(index);\r\n                    if (container == null || (!container.IsMouseCaptureWithin && !container.IsKeyboardFocusWithin))\r\n                    {\r\n                        VirtualizeItem(index);\r\n                        RealizedItems.Remove(node);\r\n                    }\r\n\r\n                    // Yield control for throttling.\r\n                    yield return index;\r\n                }\r\n            }\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region Arrange Logic\r\n\r\n        /// <summary>\r\n        /// Updates the calculated <see cref=\"ActualViewbox\"/> and the <see cref=\"Scale\"/> and <see cref=\"Offset\"/> when the size changes.\r\n        /// </summary>\r\n        /// <param name=\"sizeInfo\">Size information about the render size.</param>\r\n        protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)\r\n        {\r\n            CoerceValue(ScaleProperty);\r\n            CoerceValue(OffsetProperty);\r\n            CoerceValue(ActualViewboxProperty);\r\n\r\n            base.OnRenderSizeChanged(sizeInfo);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Invalidates the arrangement of canvases when their children's positions change.\r\n        /// </summary>\r\n        /// <param name=\"d\">Dependency object whos position has changed.</param>\r\n        /// <param name=\"e\">Event arguments related to the change.</param>\r\n        private static void OnPositioningChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            var parent = VisualTreeHelper.GetParent(d);\r\n            var zoomable = parent as ZoomableCanvas;\r\n            if (zoomable != null)\r\n            {\r\n                zoomable.InvalidateArrange();\r\n            }\r\n            else\r\n            {\r\n                var regular = parent as Canvas;\r\n                if (regular != null)\r\n                {\r\n                    regular.InvalidateArrange();\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the applied scale transform if <see cref=\"ApplyTransform\"/> is set to <c>true</c>.\r\n        /// </summary>\r\n        private ScaleTransform AppliedScaleTransform\r\n        {\r\n            get\r\n            {\r\n                if (ApplyTransform)\r\n                {\r\n                    return (ScaleTransform)((TransformGroup)RenderTransform).Children[0];\r\n                }\r\n                return null;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the applied translate transform if <see cref=\"ApplyTransform\"/> is set to <c>true</c>.\r\n        /// </summary>\r\n        private TranslateTransform AppliedTranslateTransform\r\n        {\r\n            get\r\n            {\r\n                if (ApplyTransform)\r\n                {\r\n                    return (TranslateTransform)((TransformGroup)RenderTransform).Children[1];\r\n                }\r\n                return null;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Scales the child elements of a <see cref=\"ZoomableCanvas\"/> by applying a transform if <see cref=\"ApplyTransform\"/> is <c>true</c>, or by calling <see cref=\"FrameworkElement.InvalidateArrange\"/> otherwise.\r\n        /// </summary>\r\n        /// <param name=\"scale\">The new scale of the canvas.</param>\r\n        protected virtual void ScaleOverride(double scale)\r\n        {\r\n            var appliedTransform = AppliedScaleTransform;\r\n            if (appliedTransform != null)\r\n            {\r\n                appliedTransform.ScaleX = scale;\r\n                appliedTransform.ScaleY = scale;\r\n            }\r\n            else\r\n            {\r\n                InvalidateArrange();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Offsets the child elements of a <see cref=\"ZoomableCanvas\"/> by applying a transform if <see cref=\"ApplyTransform\"/> is <c>true</c>, or by calling <see cref=\"FrameworkElement.InvalidateArrange\"/> otherwise.\r\n        /// </summary>\r\n        /// <param name=\"offset\">The new offset of the canvas.</param>\r\n        protected virtual void OffsetOverride(Point offset)\r\n        {\r\n            var appliedTransform = AppliedTranslateTransform;\r\n            if (appliedTransform != null)\r\n            {\r\n                appliedTransform.X = -offset.X;\r\n                appliedTransform.Y = -offset.Y;\r\n            }\r\n            else\r\n            {\r\n                InvalidateArrange();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Measures the child elements of a <see cref=\"ZoomableCanvas\"/> in anticipation of arranging them during the <see cref=\"ArrangeOverride\"/> pass.\r\n        /// </summary>\r\n        /// <param name=\"availableSize\">An upper limit <see cref=\"Size\"/> that should not be exceeded.</param>\r\n        /// <returns>A <see cref=\"Size\"/> that represents the size that is required to arrange child content.</returns>\r\n        protected override Size MeasureOverride(Size availableSize)\r\n        {\r\n            Size childConstraint = new Size(Double.PositiveInfinity, Double.PositiveInfinity);\r\n\r\n            foreach (UIElement child in InternalChildren)\r\n            {\r\n                if (child != null)\r\n                {\r\n                    child.Measure(childConstraint);\r\n                }\r\n            }\r\n\r\n            return new Size();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Arranges the content of a <see cref=\"ZoomableCanvas\"/> element.\r\n        /// </summary>\r\n        /// <param name=\"finalSize\">The size that this <see cref=\"ZoomableCanvas\"/> element should use to arrange its child elements.</param>\r\n        /// <returns>A <see cref=\"Size\"/> that represents the arranged size of this <see cref=\"ZoomableCanvas\"/> element and its descendants.</returns>\r\n        protected override Size ArrangeOverride(Size finalSize)\r\n        {\r\n            bool applyTransform = ApplyTransform;\r\n            Point offset = applyTransform ? new Point() : Offset;\r\n            double scale = applyTransform ? 1.0 : Scale;\r\n\r\n            ChildrenExtent = Rect.Empty;\r\n\r\n            foreach (UIElement child in InternalChildren)\r\n            {\r\n                if (child != null)\r\n                {\r\n                    // Get bounds information from the element.\r\n                    Rect bounds = new Rect(Canvas.GetLeft(child).GetValueOrDefault(), Canvas.GetTop(child).GetValueOrDefault(), child.DesiredSize.Width / scale, child.DesiredSize.Height / scale);\r\n\r\n                    // If we are maintaining our own spatial wrapper then update its bounds.\r\n                    if (PrivateIndex != null)\r\n                    {\r\n                        int index = IndexFromContainer(child);\r\n                        Rect oldBounds = PrivateIndex[index];\r\n                        const double tolerance = .001; // The exact values during arrange can vary slightly.\r\n                        if (Math.Abs(oldBounds.Top - bounds.Top) > tolerance ||\r\n                            Math.Abs(oldBounds.Left - bounds.Left) > tolerance ||\r\n                            Math.Abs(oldBounds.Width - bounds.Width) > tolerance ||\r\n                            Math.Abs(oldBounds.Height - bounds.Height) > tolerance)\r\n                        {\r\n                            PrivateIndex[index] = bounds;\r\n                        }\r\n                    }\r\n\r\n                    // Update the children extent for scrolling.\r\n                    ChildrenExtent.Union(bounds);\r\n\r\n                    // So far everything has been in canvas coordinates.  Here we adjust the result for the final call to Arrange.\r\n                    bounds.X *= scale;\r\n                    bounds.X -= offset.X;\r\n                    bounds.Y *= scale;\r\n                    bounds.Y -= offset.Y;\r\n                    bounds.Width *= scale;\r\n                    bounds.Height *= scale;\r\n\r\n                    // WPF Arrange will crash if the values are too large.\r\n                    bounds.X = bounds.X.AtLeast(Single.MinValue / 2);\r\n                    bounds.Y = bounds.Y.AtLeast(Single.MinValue / 2);\r\n                    bounds.Width = bounds.Width.AtMost(Single.MaxValue);\r\n                    bounds.Height = bounds.Height.AtMost(Single.MaxValue);\r\n\r\n                    child.Arrange(bounds);\r\n                }\r\n            }\r\n\r\n            InvalidateExtent();\r\n\r\n            return finalSize;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a clipping geometry that indicates the area that will be clipped if the <see cref=\"UIElement.ClipToBounds\"/> property is set to <c>true</c>. \r\n        /// </summary>\r\n        /// <param name=\"layoutSlotSize\">The available size of the element.</param>\r\n        /// <returns>A <see cref=\"Geometry\"/> that represents the area that is clipped if <see cref=\"UIElement.ClipToBounds\"/> is <c>true</c>.</returns>\r\n        protected override Geometry GetLayoutClip(Size layoutSlotSize)\r\n        {\r\n            // ZoomableCanvas only clips to bounds if ClipToBounds is set, no automatic clipping.\r\n            return ClipToBounds ? new RectangleGeometry(new Rect(RenderSize)) : null;\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region Utility Methods\r\n\r\n        /// <summary>\r\n        /// Represents the extent of the instantiated UIElements calculated during <see cref=\"ArrangeOverride\"/>.\r\n        /// </summary>\r\n        private Rect ChildrenExtent = Rect.Empty;\r\n\r\n        /// <summary>\r\n        /// Caches the calculated <see cref=\"Extent\"/> based on the spatial index and arranged children of the canvas until <see cref=\"InvalidateExtent\"/> is called.\r\n        /// </summary>\r\n        private Rect ComputedExtent = Rect.Empty;\r\n\r\n        /// <summary>\r\n        /// Gets the extent of the populated area of the canvas (in canvas coordinates).\r\n        /// </summary>\r\n        /// <remarks>\r\n        /// This property is also used to determine the range of the scroll bars when the canvas is hosted within a <see cref=\"ScrollViewer\"/>.\r\n        /// </remarks>\r\n        public virtual Rect Extent\r\n        {\r\n            get\r\n            {\r\n                if (ComputedExtent.IsEmpty)\r\n                {\r\n                    ComputedExtent = Rect.Union(ChildrenExtent, SpatialIndex != null ? SpatialIndex.Extent : Rect.Empty);\r\n                }\r\n                return ComputedExtent;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Re-computes the <see cref=\"Extent\"/> of items in the canvas and updates the parent scroll viewer if there is one.\r\n        /// </summary>\r\n        protected void InvalidateExtent()\r\n        {\r\n            ComputedExtent = Rect.Empty;\r\n            var owner = ((IScrollInfo)this).ScrollOwner;\r\n            if (owner != null)\r\n            {\r\n                owner.InvalidateScrollInfo();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the current visual coordinates for a given <see cref=\"Point\"/> on this <see cref=\"ZoomableCanvas\"/>.\r\n        /// </summary>\r\n        /// <param name=\"canvasPoint\">The <see cref=\"Point\"/> in canvas coordinates.</param>\r\n        /// <returns>The current position of the canvas point on the screen relative to the upper-left corner of this <see cref=\"ZoomableCanvas\"/>.</returns>\r\n        public Point GetVisualPoint(Point canvasPoint)\r\n        {\r\n            return (Point)(((Vector)canvasPoint * Scale) - (Vector)Offset);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the point on the canvas that is currently represented by the given <see cref=\"Point\"/> on the screen.\r\n        /// </summary>\r\n        /// <param name=\"screenPoint\">The <see cref=\"Point\"/> on the screen relative to the upper-left corner of this <see cref=\"ZoomableCanvas\"/>.</param>\r\n        /// <returns>The point on the canvas that corresponds to the given point on the screen.</returns>\r\n        public Point GetCanvasPoint(Point screenPoint)\r\n        {\r\n            return (Point)(((Vector)Offset + (Vector)screenPoint) / Scale);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the the point on the canvas at which the mouse cursor is currently located.\r\n        /// </summary>\r\n        public Point MousePosition\r\n        {\r\n            get\r\n            {\r\n                var position = Mouse.GetPosition(this);\r\n                if (ApplyTransform)\r\n                {\r\n                    return position;\r\n                }\r\n                else\r\n                {\r\n                    return GetCanvasPoint(position);\r\n                }\r\n            }\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region IScrollInfo Implementation\r\n\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\")]\r\n        ScrollViewer IScrollInfo.ScrollOwner\r\n        {\r\n            get;\r\n            set;\r\n        }\r\n\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\")]\r\n        bool IScrollInfo.CanHorizontallyScroll\r\n        {\r\n            get;\r\n            set;\r\n        }\r\n\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\")]\r\n        bool IScrollInfo.CanVerticallyScroll\r\n        {\r\n            get;\r\n            set;\r\n        }\r\n\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\")]\r\n        double IScrollInfo.ViewportHeight\r\n        {\r\n            get\r\n            {\r\n                return ActualViewbox.Height * Scale;\r\n            }\r\n        }\r\n\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\")]\r\n        double IScrollInfo.ViewportWidth\r\n        {\r\n            get\r\n            {\r\n                return ActualViewbox.Width * Scale;\r\n            }\r\n        }\r\n\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\")]\r\n        double IScrollInfo.ExtentHeight\r\n        {\r\n            get\r\n            {\r\n                return Math.Max(Math.Max(this.ActualViewbox.Bottom, this.Extent.Bottom) - Math.Min(this.ActualViewbox.Top, this.Extent.Top), 0.0) * Scale;\r\n            }\r\n        }\r\n\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\")]\r\n        double IScrollInfo.ExtentWidth\r\n        {\r\n            get\r\n            {\r\n                return Math.Max(Math.Max(this.ActualViewbox.Right, this.Extent.Right) - Math.Min(this.ActualViewbox.Left, this.Extent.Left), 0.0) * Scale;\r\n            }\r\n        }\r\n\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\")]\r\n        double IScrollInfo.HorizontalOffset\r\n        {\r\n            get\r\n            {\r\n                return Math.Max(this.ActualViewbox.X - Extent.X, 0.0) * this.Scale;\r\n            }\r\n        }\r\n\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\")]\r\n        double IScrollInfo.VerticalOffset\r\n        {\r\n            get\r\n            {\r\n                return Math.Max(this.ActualViewbox.Y - Extent.Y, 0.0) * this.Scale;\r\n            }\r\n        }\r\n\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\")]\r\n        void IScrollInfo.LineDown()\r\n        {\r\n            ((IScrollInfo)this).SetVerticalOffset(((IScrollInfo)this).VerticalOffset + 16);\r\n        }\r\n\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\")]\r\n        void IScrollInfo.LineLeft()\r\n        {\r\n            ((IScrollInfo)this).SetHorizontalOffset(((IScrollInfo)this).HorizontalOffset - 16);\r\n        }\r\n\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\")]\r\n        void IScrollInfo.LineRight()\r\n        {\r\n            ((IScrollInfo)this).SetHorizontalOffset(((IScrollInfo)this).HorizontalOffset + 16);\r\n        }\r\n\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\")]\r\n        void IScrollInfo.LineUp()\r\n        {\r\n            ((IScrollInfo)this).SetVerticalOffset(((IScrollInfo)this).VerticalOffset - 16);\r\n        }\r\n\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\")]\r\n        void IScrollInfo.MouseWheelDown()\r\n        {\r\n            ((IScrollInfo)this).SetVerticalOffset(((IScrollInfo)this).VerticalOffset + 48);\r\n        }\r\n\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\")]\r\n        void IScrollInfo.MouseWheelLeft()\r\n        {\r\n            ((IScrollInfo)this).SetHorizontalOffset(((IScrollInfo)this).HorizontalOffset - 48);\r\n        }\r\n\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\")]\r\n        void IScrollInfo.MouseWheelRight()\r\n        {\r\n            ((IScrollInfo)this).SetHorizontalOffset(((IScrollInfo)this).HorizontalOffset + 48);\r\n        }\r\n\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\")]\r\n        void IScrollInfo.MouseWheelUp()\r\n        {\r\n            ((IScrollInfo)this).SetVerticalOffset(((IScrollInfo)this).VerticalOffset - 48);\r\n        }\r\n\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\")]\r\n        void IScrollInfo.PageDown()\r\n        {\r\n            ((IScrollInfo)this).SetVerticalOffset(((IScrollInfo)this).VerticalOffset + ((IScrollInfo)this).ViewportHeight);\r\n        }\r\n\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\")]\r\n        void IScrollInfo.PageLeft()\r\n        {\r\n            ((IScrollInfo)this).SetHorizontalOffset(((IScrollInfo)this).HorizontalOffset - ((IScrollInfo)this).ViewportWidth);\r\n        }\r\n\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\")]\r\n        void IScrollInfo.PageRight()\r\n        {\r\n            ((IScrollInfo)this).SetHorizontalOffset(((IScrollInfo)this).HorizontalOffset + ((IScrollInfo)this).ViewportWidth);\r\n        }\r\n\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\")]\r\n        void IScrollInfo.PageUp()\r\n        {\r\n            ((IScrollInfo)this).SetVerticalOffset(((IScrollInfo)this).VerticalOffset - ((IScrollInfo)this).ViewportHeight);\r\n        }\r\n\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\")]\r\n        void IScrollInfo.SetHorizontalOffset(double offset)\r\n        {\r\n            offset = Math.Max(Math.Min(offset, ((IScrollInfo)this).ExtentWidth - ((IScrollInfo)this).ViewportWidth), 0.0);\r\n\r\n            var viewbox = Viewbox;\r\n            if (viewbox.IsEmpty)\r\n            {\r\n                Offset = new Point(Offset.X + offset - ((IScrollInfo)this).HorizontalOffset, Offset.Y);\r\n            }\r\n            else\r\n            {\r\n                viewbox.X += (offset - ((IScrollInfo)this).HorizontalOffset) / Scale;\r\n                Viewbox = viewbox;\r\n            }\r\n        }\r\n\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\")]\r\n        void IScrollInfo.SetVerticalOffset(double offset)\r\n        {\r\n            offset = Math.Max(Math.Min(offset, ((IScrollInfo)this).ExtentHeight - ((IScrollInfo)this).ViewportHeight), 0.0);\r\n\r\n            var viewbox = Viewbox;\r\n            if (viewbox.IsEmpty)\r\n            {\r\n                Offset = new Point(Offset.X, Offset.Y + offset - ((IScrollInfo)this).VerticalOffset);\r\n            }\r\n            else\r\n            {\r\n                viewbox.Y += (offset - ((IScrollInfo)this).VerticalOffset) / Scale;\r\n                Viewbox = viewbox;\r\n            }\r\n        }\r\n\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1033:InterfaceMethodsShouldBeCallableByChildTypes\")]\r\n        Rect IScrollInfo.MakeVisible(Visual visual, Rect rectangle)\r\n        {\r\n            if (rectangle.IsEmpty || visual == null || !IsAncestorOf(visual))\r\n            {\r\n                return Rect.Empty;\r\n            }\r\n\r\n            rectangle = visual.TransformToAncestor(this).TransformBounds(rectangle);\r\n            rectangle = RenderTransform.TransformBounds(rectangle);\r\n\r\n            var width = ((IScrollInfo)this).ViewportWidth;\r\n            var height = ((IScrollInfo)this).ViewportHeight;\r\n            var left = -rectangle.X;\r\n            var right = left + width - rectangle.Width;\r\n            var top = -rectangle.Y;\r\n            var bottom = top + height - rectangle.Height;\r\n            var deltaX = left > 0 && right > 0 ? Math.Min(left, right) : left < 0 && right < 0 ? Math.Max(left, right) : 0.0;\r\n            var deltaY = top > 0 && bottom > 0 ? Math.Min(top, bottom) : top < 0 && bottom < 0 ? Math.Max(top, bottom) : 0.0;\r\n\r\n            var offset = Offset;\r\n            offset.X -= deltaX;\r\n            offset.Y -= deltaY;\r\n            Offset = offset;\r\n\r\n            rectangle.X += deltaX;\r\n            rectangle.Y += deltaY;\r\n            rectangle.Intersect(new Rect(0, 0, width, height));\r\n\r\n            return rectangle;\r\n        }\r\n\r\n        #endregion\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Resources/ExceptionStringTable.txt",
    "content": "\r\n;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r\n;\r\n; US-EN String Table\r\n; Default Resource (used for English and non-represented locales)\r\n;\r\n;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r\n\r\n; DataGrid Automation Strings\r\nDataGridCellItemAutomationPeer_NameCoreFormat=Item: {0}, Column Display Index: {1}\r\n\r\nCalendarAutomationPeer_CalendarButtonLocalizedControlType=Calendar button\r\nCalendarAutomationPeer_DayButtonLocalizedControlType=Day button\r\nCalendarAutomationPeer_BlackoutDayHelpText=Blackout Day - {0}\r\nCalendar_NextButtonName=Next button\r\nCalendar_PreviousButtonName=Previous button\r\n\r\nDatePickerAutomationPeer_LocalizedControlType=date picker\r\nDatePickerTextBox_DefaultWatermarkText=<Enter text here>\r\nDatePicker_DropDownButtonName=Show Calendar\r\nDatePicker_WatermarkText=Select a date\r\n\r\n\r\n;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r\n;\r\n;                          Exception Strings\r\n;\r\n; The following section is for all strings that will be used by exceptions\r\n;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r\n\r\n; DataGrid\r\nDataGrid_ColumnIndexOutOfRange=The index for the DataGridColumn with Header '{0}' is out of range. Index must be greater than or equal to 0 and less than Columns.Count.\r\nDataGrid_ColumnDisplayIndexOutOfRange=The DisplayIndex for the DataGridColumn with Header '{0}' is out of range.  DisplayIndex must be greater than or equal to 0 and less than Columns.Count.\r\nDataGrid_DisplayIndexOutOfRange=The given DisplayIndex is out of range.  DisplayIndex must be greater than or equal to 0 and less than Columns.Count.\r\nDataGrid_InvalidColumnReuse=DataGridColumn with Header '{0}' already exists in the Columns collection of a DataGrid. DataGrids cannot share columns and cannot contain duplicate column instances.\r\nDataGrid_DuplicateDisplayIndex=DisplayIndex is already used for other column.  DisplayIndex should be unique per column.\r\nDataGrid_NewColumnInvalidDisplayIndex=Cannot add a column with an invalid DisplayIndex to the DataGrid.Columns collection.\r\nDataGrid_NullColumn=Cannot add a null column to a DataGrid's column collection.\r\nDataGrid_ReadonlyCellsItemsSource=The ItemsSource for the DataGridCellsPresenter is read-only.\r\nDataGrid_InvalidSortDescription=The SortDescriptions added are not valid. The probable solutions are to set the CanUserSort on the Column to false, or to use SortMemberPath property on the Column, or to handle the Sorting event on DataGrid.\r\nDataGrid_ProbableInvalidSortDescription=Items refresh of the DataGrid failed. One of the probable causes is that the SortDescriptions added are not valid, in which case probable solutions are to set the CanUserSort on the Column to false, or to use SortMemberPath property on the Column, or to handle the Sorting event on DataGrid.\r\nDataGrid_AutomationInvokeFailed=Invoke operation failed. Cannot edit another cell or row while the current one has validation errors.\r\n\r\n; DataGrid Length\r\nDataGridLength_InvalidType=Invalid type.\r\nDataGridLength_Infinity=Value should not be infinity.\r\n\r\n; DataGrid Selection\r\nDataGrid_CannotSelectCell=Cannot change cell selection when the SelectionUnit is FullRow.\r\nDataGridRow_CannotSelectRowWhenCells=The current value of the SelectionUnit property on the parent DataGrid prevents rows from being selected.\r\n\r\n; SelectedCellsCollection\r\nSelectedCellsCollection_InvalidItem=The DataGridItem is invalid.\r\nSelectedCellsCollection_DuplicateItem=The collection already contains the item.\r\n\r\n; VirtualizedCellInfoCollection\r\nVirtualizedCellInfoCollection_IsReadOnly=The collection cannot be modified.\r\nVirtualizedCellInfoCollection_DoesNotSupportIndexChanges=This collection does not support changing values with specific indexes.\r\n\r\n; Copy\r\nClipboardCopyMode_Disabled=Cannot perform copy if ClipboardCopyMode is None.\r\n\r\n;Calendar\r\nCalendar_OnDisplayModePropertyChanged_InvalidValue=DisplayMode value is not valid.\r\nCalendar_OnFirstDayOfWeekChanged_InvalidValue=FirstDayOfWeek value is not valid.\r\nCalendar_OnSelectedDateChanged_InvalidValue=SelectedDate value is not valid.\r\nCalendar_OnSelectedDateChanged_InvalidOperation=The SelectedDate property cannot be set when the selection mode is None.\r\nCalendarCollection_MultiThreadedCollectionChangeNotSupported=This type of Collection does not support changes to its SourceCollection from a thread different from the Dispatcher thread.\r\nCalendar_CheckSelectionMode_InvalidOperation=The SelectedDates collection can be changed only in a multiple selection mode. Use the SelectedDate in a single selection mode.\r\nCalendar_OnSelectionModeChanged_InvalidValue=SelectionMode value is not valid.\r\nCalendar_UnSelectableDates=Value is not valid.\r\n\r\n;DatePicker\r\nDatePickerTextBox_TemplatePartIsOfIncorrectType=The template part {0} is not an instance of {1}.\r\nDatePicker_OnSelectedDateFormatChanged_InvalidValue=DatePickerFormat value is not valid.\r\n\r\n\r\n;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r\n;\r\n;                         UIAutomation strings\r\n;\r\n;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r\n\r\nCalendarAutomationPeer_MonthMode=Month\r\nCalendarAutomationPeer_YearMode=Year\r\nCalendarAutomationPeer_DecadeMode=Decade\r\n\r\n"
  },
  {
    "path": "WpfToolkit/Resources/SR.cs",
    "content": "//---------------------------------------------------------------------------\r\n//\r\n// Copyright (C) Microsoft Corporation.  All rights reserved.\r\n//\r\n//---------------------------------------------------------------------------\r\n\r\nusing System;\r\nusing System.Globalization;\r\nusing System.Resources;\r\n\r\nnamespace Microsoft.Windows.Controls\r\n{\r\n    /// <summary>\r\n    ///     Retrieves exception strings and other localized strings.\r\n    /// </summary>\r\n    internal static class SR\r\n    {\r\n         internal static string Get(SRID id)\r\n         {\r\n             return _resourceManager.GetString(id.String);\r\n         }\r\n\r\n         internal static string Get(SRID id, params object[] args)\r\n         {\r\n             string message = _resourceManager.GetString(id.String);\r\n             if (message != null)\r\n             {\r\n                 // Apply arguments to formatted string (if applicable)\r\n                 if (args != null && args.Length > 0)\r\n                 {\r\n                     message = String.Format(CultureInfo.CurrentCulture, message, args);\r\n                 }\r\n             }\r\n\r\n             return message;\r\n         }\r\n\r\n         // Get exception string resources for current locale\r\n         private static ResourceManager _resourceManager = new ResourceManager(\"ExceptionStringTable\", typeof(SR).Assembly);\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Resources/SRID.cs",
    "content": "//---------------------------------------------------------------------------\r\n//\r\n// Copyright (C) Microsoft Corporation.  All rights reserved.\r\n//\r\n//---------------------------------------------------------------------------\r\n\r\nusing System;\r\nusing System.Globalization;\r\nusing System.Resources;\r\n\r\nnamespace Microsoft.Windows.Controls\r\n{\r\n    // A wrapper around string identifiers.\r\n    internal struct SRID\r\n    {\r\n           private string _string;\r\n\r\n           public string String \r\n           { \r\n               get { return _string; } \r\n           }\r\n\r\n           private SRID(string s) \r\n           { \r\n               _string = s; \r\n           }\r\n\r\n           public static SRID DataGrid_SelectAllCommandText \r\n           { \r\n               get { return new SRID(\"DataGrid_SelectAllCommandText\"); } \r\n           }\r\n\r\n           public static SRID DataGrid_SelectAllKey \r\n           { \r\n               get { return new SRID(\"DataGrid_SelectAllKey\"); } \r\n           }\r\n\r\n           public static SRID DataGrid_SelectAllKeyDisplayString \r\n           { \r\n               get { return new SRID(\"DataGrid_SelectAllKeyDisplayString\"); } \r\n           }\r\n\r\n           public static SRID DataGrid_BeginEditCommandText \r\n           { \r\n               get { return new SRID(\"DataGrid_BeginEditCommandText\"); } \r\n           }\r\n\r\n           public static SRID DataGrid_CommitEditCommandText \r\n           { \r\n               get { return new SRID(\"DataGrid_CommitEditCommandText\"); } \r\n           }\r\n\r\n           public static SRID DataGrid_CancelEditCommandText \r\n           { \r\n               get { return new SRID(\"DataGrid_CancelEditCommandText\"); } \r\n           }\r\n\r\n           public static SRID DataGrid_DeleteCommandText \r\n           { \r\n               get { return new SRID(\"DataGrid_DeleteCommandText\"); } \r\n           }\r\n\r\n           public static SRID DataGridCellItemAutomationPeer_NameCoreFormat\r\n           {\r\n               get { return new SRID(\"DataGridCellItemAutomationPeer_NameCoreFormat\"); }\r\n           }\r\n\r\n           public static SRID CalendarAutomationPeer_CalendarButtonLocalizedControlType \r\n           { \r\n               get { return new SRID(\"CalendarAutomationPeer_CalendarButtonLocalizedControlType\"); } \r\n           }\r\n\r\n           public static SRID CalendarAutomationPeer_DayButtonLocalizedControlType \r\n           { \r\n               get { return new SRID(\"CalendarAutomationPeer_DayButtonLocalizedControlType\"); } \r\n           }\r\n\r\n           public static SRID CalendarAutomationPeer_BlackoutDayHelpText \r\n           { \r\n               get { return new SRID(\"CalendarAutomationPeer_BlackoutDayHelpText\"); } \r\n           }\r\n\r\n           public static SRID Calendar_NextButtonName \r\n           { \r\n               get { return new SRID(\"Calendar_NextButtonName\"); } \r\n           }\r\n\r\n           public static SRID Calendar_PreviousButtonName \r\n           { \r\n               get { return new SRID(\"Calendar_PreviousButtonName\"); } \r\n           }\r\n\r\n           public static SRID DatePickerAutomationPeer_LocalizedControlType \r\n           { \r\n               get { return new SRID(\"DatePickerAutomationPeer_LocalizedControlType\"); } \r\n           }\r\n\r\n           public static SRID DatePickerTextBox_DefaultWatermarkText \r\n           { \r\n               get { return new SRID(\"DatePickerTextBox_DefaultWatermarkText\"); } \r\n           }\r\n\r\n           public static SRID DatePicker_DropDownButtonName \r\n           { \r\n               get { return new SRID(\"DatePicker_DropDownButtonName\"); } \r\n           }\r\n\r\n           public static SRID DataGrid_ColumnIndexOutOfRange \r\n           { \r\n               get { return new SRID(\"DataGrid_ColumnIndexOutOfRange\"); } \r\n           }\r\n\r\n           public static SRID DataGrid_ColumnDisplayIndexOutOfRange \r\n           { \r\n               get { return new SRID(\"DataGrid_ColumnDisplayIndexOutOfRange\"); } \r\n           }\r\n\r\n           public static SRID DataGrid_DisplayIndexOutOfRange \r\n           { \r\n               get { return new SRID(\"DataGrid_DisplayIndexOutOfRange\"); } \r\n           }\r\n\r\n           public static SRID DataGrid_InvalidColumnReuse \r\n           { \r\n               get { return new SRID(\"DataGrid_InvalidColumnReuse\"); } \r\n           }\r\n\r\n           public static SRID DataGrid_DuplicateDisplayIndex \r\n           { \r\n               get { return new SRID(\"DataGrid_DuplicateDisplayIndex\"); } \r\n           }\r\n\r\n           public static SRID DataGrid_NewColumnInvalidDisplayIndex \r\n           { \r\n               get { return new SRID(\"DataGrid_NewColumnInvalidDisplayIndex\"); } \r\n           }\r\n\r\n           public static SRID DataGrid_NullColumn \r\n           { \r\n               get { return new SRID(\"DataGrid_NullColumn\"); } \r\n           }\r\n\r\n           public static SRID DataGrid_ReadonlyCellsItemsSource \r\n           { \r\n               get { return new SRID(\"DataGrid_ReadonlyCellsItemsSource\"); } \r\n           }\r\n\r\n           public static SRID DataGrid_InvalidSortDescription \r\n           { \r\n               get { return new SRID(\"DataGrid_InvalidSortDescription\"); } \r\n           }\r\n\r\n           public static SRID DataGrid_ProbableInvalidSortDescription \r\n           { \r\n               get { return new SRID(\"DataGrid_ProbableInvalidSortDescription\"); } \r\n           }\r\n\r\n           public static SRID DataGridLength_InvalidType\r\n           {\r\n               get { return new SRID(\"DataGridLength_InvalidType\"); }\r\n           }\r\n\r\n           public static SRID DataGridLength_Infinity\r\n           {\r\n               get { return new SRID(\"DataGridLength_Infinity\"); }\r\n           }\r\n\r\n           public static SRID DataGrid_CannotSelectCell \r\n           { \r\n               get { return new SRID(\"DataGrid_CannotSelectCell\"); } \r\n           }\r\n\r\n           public static SRID DataGridRow_CannotSelectRowWhenCells \r\n           { \r\n               get { return new SRID(\"DataGridRow_CannotSelectRowWhenCells\"); } \r\n           }\r\n\r\n           public static SRID DataGrid_AutomationInvokeFailed\r\n           {\r\n               get { return new SRID(\"DataGrid_AutomationInvokeFailed\"); }\r\n           }\r\n\r\n           public static SRID SelectedCellsCollection_InvalidItem \r\n           { \r\n               get { return new SRID(\"SelectedCellsCollection_InvalidItem\"); } \r\n           }\r\n\r\n           public static SRID SelectedCellsCollection_DuplicateItem \r\n           { \r\n               get { return new SRID(\"SelectedCellsCollection_DuplicateItem\"); } \r\n           }\r\n\r\n           public static SRID VirtualizedCellInfoCollection_IsReadOnly \r\n           { \r\n               get { return new SRID(\"VirtualizedCellInfoCollection_IsReadOnly\"); } \r\n           }\r\n\r\n           public static SRID VirtualizedCellInfoCollection_DoesNotSupportIndexChanges \r\n           { \r\n               get { return new SRID(\"VirtualizedCellInfoCollection_DoesNotSupportIndexChanges\"); } \r\n           }\r\n\r\n           public static SRID ClipboardCopyMode_Disabled \r\n           { \r\n               get { return new SRID(\"ClipboardCopyMode_Disabled\"); } \r\n           }\r\n\r\n           public static SRID Calendar_OnDisplayModePropertyChanged_InvalidValue \r\n           { \r\n               get { return new SRID(\"Calendar_OnDisplayModePropertyChanged_InvalidValue\"); } \r\n           }\r\n\r\n           public static SRID Calendar_OnFirstDayOfWeekChanged_InvalidValue \r\n           { \r\n               get { return new SRID(\"Calendar_OnFirstDayOfWeekChanged_InvalidValue\"); } \r\n           }\r\n\r\n           public static SRID Calendar_OnSelectedDateChanged_InvalidValue \r\n           { \r\n               get { return new SRID(\"Calendar_OnSelectedDateChanged_InvalidValue\"); } \r\n           }\r\n\r\n           public static SRID Calendar_OnSelectedDateChanged_InvalidOperation \r\n           { \r\n               get { return new SRID(\"Calendar_OnSelectedDateChanged_InvalidOperation\"); } \r\n           }\r\n\r\n           public static SRID CalendarCollection_MultiThreadedCollectionChangeNotSupported \r\n           { \r\n               get { return new SRID(\"CalendarCollection_MultiThreadedCollectionChangeNotSupported\"); } \r\n           }\r\n\r\n           public static SRID Calendar_CheckSelectionMode_InvalidOperation \r\n           { \r\n               get { return new SRID(\"Calendar_CheckSelectionMode_InvalidOperation\"); } \r\n           }\r\n\r\n           public static SRID Calendar_OnSelectionModeChanged_InvalidValue \r\n           { \r\n               get { return new SRID(\"Calendar_OnSelectionModeChanged_InvalidValue\"); } \r\n           }\r\n\r\n           public static SRID Calendar_UnSelectableDates \r\n           { \r\n               get { return new SRID(\"Calendar_UnSelectableDates\"); } \r\n           }\r\n\r\n           public static SRID DatePickerTextBox_TemplatePartIsOfIncorrectType \r\n           { \r\n               get { return new SRID(\"DatePickerTextBox_TemplatePartIsOfIncorrectType\"); } \r\n           }\r\n\r\n           public static SRID DatePicker_OnSelectedDateFormatChanged_InvalidValue \r\n           { \r\n               get { return new SRID(\"DatePicker_OnSelectedDateFormatChanged_InvalidValue\"); } \r\n           }\r\n\r\n           public static SRID DatePicker_WatermarkText \r\n           { \r\n               get { return new SRID(\"DatePicker_WatermarkText\"); } \r\n           }\r\n\r\n           public static SRID CalendarAutomationPeer_MonthMode \r\n           { \r\n               get { return new SRID(\"CalendarAutomationPeer_MonthMode\"); } \r\n           }\r\n\r\n           public static SRID CalendarAutomationPeer_YearMode \r\n           { \r\n               get { return new SRID(\"CalendarAutomationPeer_YearMode\"); } \r\n           }\r\n\r\n           public static SRID CalendarAutomationPeer_DecadeMode \r\n           { \r\n               get { return new SRID(\"CalendarAutomationPeer_DecadeMode\"); } \r\n           }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Samples/Accordion/AccordionSample.xaml",
    "content": "﻿<!--\r\n// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n-->\r\n\r\n<UserControl x:Class=\"System.Windows.Controls.Samples.AccordionSample\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" \r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" \r\n    xmlns:layoutToolkit=\"clr-namespace:System.Windows.Controls;assembly=DotNetProjects.Layout.Toolkit\"\r\n    xmlns:system=\"clr-namespace:System;assembly=mscorlib\">\r\n  <StackPanel>\r\n    <ContentControl Content=\"Accordion\" Style=\"{StaticResource Header}\" />\r\n\r\n    <Grid Background=\"White\" Width=\"600\" Height=\"700\">\r\n      <Grid.ColumnDefinitions>\r\n        <ColumnDefinition />\r\n        <ColumnDefinition />\r\n      </Grid.ColumnDefinitions>\r\n      <Grid.RowDefinitions >\r\n        <RowDefinition Height=\"Auto\" />\r\n        <RowDefinition Height=\"*\" />\r\n      </Grid.RowDefinitions>\r\n\r\n    <Grid Grid.Column=\"0\" Background=\"Red\">\r\n        <layoutToolkit:Accordion x:Name=\"acc\"  >\r\n            <layoutToolkit:AccordionItem Content=\"item 1\" Header=\"A\"  />\r\n            <layoutToolkit:AccordionItem Content=\"item 2\" Header=\"B -  long header\" />\r\n            <system:String>regular string item 3</system:String>\r\n        </layoutToolkit:Accordion>\r\n    </Grid>\r\n\r\n        <Grid Grid.Column=\"1\" Grid.RowSpan=\"2\" VerticalAlignment=\"Top\" Margin=\"40,0,0,0\" Height=\"400\">\r\n        <Grid.ColumnDefinitions>\r\n          <ColumnDefinition />\r\n          <ColumnDefinition />\r\n        </Grid.ColumnDefinitions>\r\n        <Grid.RowDefinitions>\r\n          <RowDefinition Height=\"Auto\" />\r\n          <RowDefinition Height=\"Auto\" />\r\n          <RowDefinition Height=\"Auto\" />\r\n          <RowDefinition Height=\"Auto\" />\r\n          <RowDefinition Height=\"Auto\" />\r\n          <RowDefinition Height=\"Auto\" />\r\n          <RowDefinition Height=\"Auto\" />\r\n          <RowDefinition Height=\"Auto\" />\r\n        </Grid.RowDefinitions>\r\n\r\n        <TextBlock Text=\"Selection Mode\" Grid.Column=\"0\" Grid.Row=\"0\" Margin=\"4\" />\r\n        <ComboBox x:Name=\"cbSelectionMode\" \r\n                  Grid.Column=\"1\"\r\n                  Grid.Row=\"0\"\r\n                  SelectionChanged=\"SelectionModeChanged\" \r\n                  Margin=\"4\" >\r\n          <ComboBoxItem Content=\"One\" />\r\n          <ComboBoxItem Content=\"OneOrMore\" />\r\n          <ComboBoxItem Content=\"ZeroOrOne\" />\r\n          <ComboBoxItem Content=\"ZeroOrMore\" />\r\n        </ComboBox>\r\n\r\n        <TextBlock Text=\"Expand Direction\" Grid.Column=\"0\" Grid.Row=\"1\" Margin=\"4\" />\r\n        <ComboBox x:Name=\"cbExpandDirection\" \r\n                  Grid.Column=\"1\"\r\n                  Grid.Row=\"1\"\r\n                  SelectionChanged=\"ExpandDirectionChanged\" \r\n                  Margin=\"4\" >\r\n          <ComboBoxItem Content=\"Up\" />\r\n          <ComboBoxItem Content=\"Down\" />\r\n          <ComboBoxItem Content=\"Left\" />\r\n          <ComboBoxItem Content=\"Right\" />\r\n        </ComboBox>\r\n\r\n\r\n        <TextBlock Text=\"Sequence:\" Grid.Column=\"0\" Grid.Row=\"2\" Margin=\"4\" />\r\n        <ComboBox x:Name=\"cbSelectionSequence\" \r\n                  Grid.Column=\"1\"\r\n                  Grid.Row=\"2\"\r\n                  SelectionChanged=\"SelectionSequenceChanged\" \r\n                  Margin=\"4\">\r\n          <ComboBoxItem Content=\"CollapseBeforeExpand\" />\r\n          <ComboBoxItem Content=\"Simultaneous\" />\r\n        </ComboBox>\r\n\r\n        <StackPanel Orientation=\"Horizontal\" Grid.ColumnSpan=\"2\" Grid.Row=\"3\">\r\n          <Button Content=\"select all\" Click=\"SelectAll\" Margin=\"4\" />\r\n          <Button Content=\"unselect all\" Click=\"UnselectAll\" Margin=\"4\" />\r\n        </StackPanel>\r\n\r\n        <StackPanel Orientation=\"Horizontal\" Grid.ColumnSpan=\"2\" Grid.Row=\"4\">\r\n          <Button Content=\"Set explicitHeight\" Click=\"SetHeight\" Margin=\"4\"  />\r\n          <Button Content=\"Remove explicitHeight\" Click=\"RemoveHeight\" Margin=\"4\"  />\r\n        </StackPanel>\r\n\r\n        <StackPanel Orientation=\"Horizontal\" Grid.ColumnSpan=\"2\" Grid.Row=\"5\">\r\n          <Button Content=\"Set explicitWidth\" Click=\"SetWidth\" Margin=\"4\"  />\r\n          <Button Content=\"Remove explicitWidth\" Click=\"RemoveWidth\" Margin=\"4\"  />\r\n        </StackPanel>\r\n\r\n        <TextBlock Text=\"Selected indices\" Grid.Row=\"6\" Margin=\"4\" />\r\n        <ItemsControl x:Name=\"icSelectedIndices\" Margin=\"4\" Grid.Column=\"1\" Grid.Row=\"6\" />\r\n\r\n        <TextBlock Text=\"Selected index\" Grid.Row=\"7\" Margin=\"4\" />\r\n        <TextBox x:Name=\"tbSelectedIndex\" Grid.Row=\"8\" Grid.Column=\"1\" Margin=\"4\" />\r\n\r\n      </Grid>\r\n\r\n       <layoutToolkit:Accordion Grid.Row=\"1\" Margin=\"0,50,0,0\">\r\n            <layoutToolkit:AccordionItem Header=\"item1\" HorizontalAlignment=\"Stretch\" HorizontalContentAlignment=\"Stretch\">\r\n                <StackPanel HorizontalAlignment=\"Stretch\">\r\n                    <Grid HorizontalAlignment=\"Stretch\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition />\r\n                            <ColumnDefinition />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Label Grid.Column=\"0\" Grid.Row=\"0\" Content=\"name\" />\r\n                        <TextBox Grid.Column=\"1\" Grid.Row=\"0\" Text=\"title\" />\r\n                    </Grid>\r\n                    <DockPanel>\r\n                        <Button x:Name=\"button\" Height=\"100\" Width=\"200\" Click=\"Button_OnClick\">Grow Up</Button>\r\n                    </DockPanel>\r\n                </StackPanel>\r\n            </layoutToolkit:AccordionItem>\r\n            </layoutToolkit:Accordion>\r\n        </Grid>\r\n  </StackPanel>\r\n</UserControl>\r\n\r\n"
  },
  {
    "path": "WpfToolkit/Samples/Accordion/AccordionSample.xaml.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System.ComponentModel;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\nusing System.Windows.Data;\r\nusing System.Globalization;\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    /// <summary>\r\n    /// Sample application for Accordion.\r\n    /// </summary>\r\n#if SILVERLIGHT\r\n    [Sample(\"Accordion Playaround sample\", DifficultyLevel.Basic)]\r\n#endif\r\n    [Category(\"Accordion\")]\r\n    public partial class AccordionSample : UserControl\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the <see cref=\"AccordionSample\"/> class.\r\n        /// </summary>\r\n        public AccordionSample()\r\n        {\r\n            InitializeComponent();\r\n\r\n            icSelectedIndices.SetBinding(\r\n                ItemsControl.ItemsSourceProperty,\r\n                new Binding(\"SelectedIndices\") { Source = acc, Mode = BindingMode.OneWay });\r\n\r\n            tbSelectedIndex.SetBinding(\r\n                TextBox.TextProperty,\r\n                new Binding(\"SelectedIndex\") { Source = acc, Mode = BindingMode.TwoWay });\r\n\r\n            acc.SetBinding(\r\n                Accordion.SelectedIndexProperty,\r\n                new Binding(\"Index\") { Source = this, Mode = BindingMode.TwoWay });\r\n\r\n            cbSelectionMode.SelectedItem = cbSelectionMode.Items\r\n                .OfType<ComboBoxItem>()\r\n                .FirstOrDefault(item => item.Content.Equals(acc.SelectionMode.ToString()));\r\n\r\n            cbExpandDirection.SelectedItem = cbExpandDirection.Items\r\n                .OfType<ComboBoxItem>()\r\n                .FirstOrDefault(item => item.Content.Equals(acc.ExpandDirection.ToString()));\r\n\r\n            cbSelectionSequence.SelectedItem = cbSelectionSequence.Items\r\n                .OfType<ComboBoxItem>()\r\n                .FirstOrDefault(item => item.Content.Equals(acc.SelectionSequence.ToString()));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the index.\r\n        /// </summary>\r\n        /// <value>The index.</value>\r\n        public int Index\r\n        {\r\n            get { return index; }\r\n            set\r\n            {\r\n                index = value;\r\n                tbSelectedIndex.Text = value.ToString(CultureInfo.InvariantCulture);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Backingfield for Index.\r\n        /// </summary>\r\n        private int index;\r\n\r\n        /// <summary>\r\n        /// Expands the direction changed.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The sender.</param>\r\n        /// <param name=\"e\">The <see cref=\"System.Windows.Controls.SelectionChangedEventArgs\"/> instance containing the event data.</param>\r\n        [System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Hooked up in Xaml.\")]\r\n        private void ExpandDirectionChanged(object sender, SelectionChangedEventArgs e)\r\n        {\r\n            acc.ExpandDirection = (ExpandDirection)Enum.Parse(\r\n                typeof(ExpandDirection),\r\n                ((ComboBoxItem)cbExpandDirection.SelectedItem).Content.ToString(),\r\n                true);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Sets the height.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The sender.</param>\r\n        /// <param name=\"e\">The <see cref=\"System.Windows.RoutedEventArgs\"/> instance containing the event data.</param>\r\n        [System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Hooked up in Xaml.\")]\r\n        private void SetHeight(object sender, System.Windows.RoutedEventArgs e)\r\n        {\r\n            acc.Height = 500;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes the height.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The sender.</param>\r\n        /// <param name=\"e\">The <see cref=\"System.Windows.RoutedEventArgs\"/> instance containing the event data.</param>\r\n        [System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Hooked up in Xaml.\")]\r\n        private void RemoveHeight(object sender, System.Windows.RoutedEventArgs e)\r\n        {\r\n            acc.ClearValue(Control.HeightProperty);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Selections the mode changed.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The sender.</param>\r\n        /// <param name=\"e\">The <see cref=\"System.Windows.Controls.SelectionChangedEventArgs\"/> instance containing the event data.</param>\r\n        [System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Hooked up in Xaml.\")]\r\n        private void SelectionModeChanged(object sender, SelectionChangedEventArgs e)\r\n        {\r\n            acc.SelectionMode = (AccordionSelectionMode)Enum.Parse(\r\n                typeof(AccordionSelectionMode),\r\n                ((ComboBoxItem)cbSelectionMode.SelectedItem).Content.ToString(),\r\n                true);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Selects all.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The sender.</param>\r\n        /// <param name=\"e\">The <see cref=\"System.Windows.RoutedEventArgs\"/> instance containing the event data.</param>\r\n        [System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Hooked up in Xaml.\")]\r\n        private void SelectAll(object sender, RoutedEventArgs e)\r\n        {\r\n            acc.SelectAll();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Unselects all.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The sender.</param>\r\n        /// <param name=\"e\">The <see cref=\"System.Windows.RoutedEventArgs\"/> instance containing the event data.</param>\r\n        [System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Hooked up in Xaml.\")]\r\n        private void UnselectAll(object sender, RoutedEventArgs e)\r\n        {\r\n            acc.UnselectAll();\r\n        }\r\n\r\n        /// <summary>\r\n        /// React to selectionSequence event.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The sender.</param>\r\n        /// <param name=\"e\">The <see cref=\"System.Windows.Controls.SelectionChangedEventArgs\"/> instance containing the event data.</param>\r\n        [System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Hooked up in Xaml.\")]\r\n        private void SelectionSequenceChanged(object sender, SelectionChangedEventArgs e)\r\n        {\r\n            acc.SelectionSequence = (SelectionSequence)Enum.Parse(\r\n                typeof(SelectionSequence),\r\n                ((ComboBoxItem)cbSelectionSequence.SelectedItem).Content.ToString(),\r\n                true);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes the width.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The sender.</param>\r\n        /// <param name=\"e\">The <see cref=\"System.Windows.RoutedEventArgs\"/> instance containing the event data.</param>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Called by Xaml.\")]\r\n        private void RemoveWidth(object sender, RoutedEventArgs e)\r\n        {\r\n            acc.ClearValue(Control.WidthProperty);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Sets the width.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The sender.</param>\r\n        /// <param name=\"e\">The <see cref=\"System.Windows.RoutedEventArgs\"/> instance containing the event data.</param>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Called by Xaml.\")]\r\n        private void SetWidth(object sender, RoutedEventArgs e)\r\n        {\r\n            acc.Width = 300;\r\n        }\r\n\r\n        private void Button_OnClick(object sender, RoutedEventArgs e)\r\n        {\r\n            button.Height += 50;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Samples/Accordion/AccordionShowcase.xaml",
    "content": "﻿<!--\r\n// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n-->\r\n\r\n<UserControl x:Class=\"System.Windows.Controls.Samples.AccordionShowcase\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" \r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" \r\n    xmlns:layoutToolkit=\"clr-namespace:System.Windows.Controls;assembly=DotNetProjects.Layout.Toolkit\"\r\n    xmlns:vsm=\"clr-namespace:System.Windows;assembly=WPFToolkit\"\r\n    xmlns:layoutToolkitPrimitives=\"clr-namespace:System.Windows.Controls.Primitives;assembly=DotNetProjects.Layout.Toolkit\"\r\n    xmlns:sys=\"clr-namespace:System;assembly=mscorlib\"\r\n     >\r\n    <StackPanel Background=\"White\">\r\n\r\n        <ContentControl Content=\"Accordion restyled (based on ajax toolkit style)\" Style=\"{StaticResource Header}\" />\r\n        <layoutToolkit:Accordion>\r\n            <layoutToolkit:Accordion.Resources>\r\n                <!-- ajax toolkit styled AccordionItemHeader-->\r\n                <ControlTemplate TargetType=\"layoutToolkitPrimitives:AccordionButton\" x:Key=\"AjaxHeader\">\r\n                    <Grid Background=\"Transparent\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <!-- ExpansionStates -->\r\n                            <VisualStateGroup x:Name=\"ExpansionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Collapsed\">\r\n                                    <Storyboard>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Expanded\">\r\n                                    <Storyboard>\r\n                                        <Storyboard>\r\n                                            <ColorAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0030000\" Storyboard.TargetName=\"background\" \r\n                      Storyboard.TargetProperty=\"(Border.Background).(SolidColorBrush.Color)\">\r\n                                                <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#FF5078B3\"/>\r\n                                            </ColorAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <!-- CheckStates -->\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Checked\" >\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\"/>\r\n                            </VisualStateGroup>\r\n                            <!-- CommonStates -->\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\"/>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" From=\"MouseOver\" To=\"Normal\"/>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0030000\" Storyboard.TargetName=\"MouseOverBackground\" \r\n                      Storyboard.TargetProperty=\"(Grid.Background).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#FF2E4D7B\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <!-- FocusStates -->\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n\r\n                        <Border x:Name=\"MouseOverBackground\"\r\n              Background=\"#FF2E4D7B\"\r\n              BorderBrush=\"{TemplateBinding BorderBrush}\" \r\n              BorderThickness=\"{TemplateBinding BorderThickness}\" >\r\n                            <Border x:Name=\"background\" Background=\"Transparent\">\r\n                                <Grid Background=\"Transparent\"\r\n                      Margin=\"{TemplateBinding Padding}\">\r\n                                    <ContentControl x:Name=\"header\"\r\n                    Grid.Column=\"1\" Grid.Row=\"0\"\r\n                    Content=\"{TemplateBinding Content}\" \r\n                    ContentTemplate=\"{TemplateBinding ContentTemplate}\" \r\n                    Foreground=\"{TemplateBinding Foreground}\"\r\n                    FontFamily=\"{TemplateBinding FontFamily}\"\r\n                    FontSize=\"{TemplateBinding FontSize}\"\r\n                    FontStretch=\"{TemplateBinding FontStretch}\"\r\n                    FontStyle=\"{TemplateBinding FontStyle}\"\r\n                    FontWeight=\"{TemplateBinding FontWeight}\"\r\n                    HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" \r\n                    VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\">\r\n                                    </ContentControl>\r\n                                </Grid>\r\n                            </Border>\r\n                        </Border>\r\n                        <Rectangle x:Name=\"FocusVisualElement\"\r\n              IsHitTestVisible=\"false\" \r\n              Stroke=\"Green\" \r\n              StrokeDashArray=\"1 2\" \r\n              StrokeThickness=\"1\" \r\n              Visibility=\"Collapsed\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n                <!-- ajax toolkit styled AccordionItem-->\r\n                <ControlTemplate TargetType=\"layoutToolkit:AccordionItem\" x:Key=\"ajaxTemplate\">\r\n                    <Grid Background=\"Transparent\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <!-- CommonState -->\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" To=\"1\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <!-- FocusStates -->\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <!-- Unfocused -->\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                            <!-- ExpansionStates -->\r\n                            <VisualStateGroup x:Name=\"ExpansionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Collapsed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames\r\n                          BeginTime=\"00:00:00\"\r\n                          Storyboard.TargetName=\"ExpandSite\"\r\n                          Storyboard.TargetProperty=\"(layoutToolkitPrimitives:ExpandableContentControl.Percentage)\">\r\n                                            <SplineDoubleKeyFrame\r\n                            KeyTime=\"00:00:00.3\"\r\n                              KeySpline=\"0.2,0,0,1\"\r\n                              Value=\"0\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Expanded\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames\r\n                            BeginTime=\"00:00:00\"\r\n                            Storyboard.TargetName=\"ExpandSite\"\r\n                            Storyboard.TargetProperty=\"(layoutToolkitPrimitives:ExpandableContentControl.Percentage)\">\r\n                                            <SplineDoubleKeyFrame\r\n                              KeyTime=\"00:00:00.3\"\r\n                              KeySpline=\"0.2,0,0,1\"\r\n                              Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <!-- ExpansionStates -->\r\n                            <VisualStateGroup x:Name=\"LockedStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Locked\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"IsEnabled\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Boolean>False</sys:Boolean>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unlocked\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"IsEnabled\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Boolean>True</sys:Boolean>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"Background\" \r\n              Padding=\"{TemplateBinding Padding}\"\r\n              Background=\"{TemplateBinding Background}\" \r\n              BorderBrush=\"{TemplateBinding BorderBrush}\" \r\n              BorderThickness=\"{TemplateBinding BorderThickness}\" \r\n              CornerRadius=\"4\">\r\n                            <Grid>\r\n                                <Grid.RowDefinitions >\r\n                                    <RowDefinition Height=\"Auto\" />\r\n                                    <RowDefinition Height=\"*\" />\r\n                                </Grid.RowDefinitions>\r\n\r\n                                <layoutToolkitPrimitives:AccordionButton\r\n                  Template=\"{StaticResource AjaxHeader}\"\r\n                  x:Name=\"ExpanderButton\"\r\n                  Content=\"{TemplateBinding Header}\"\r\n                  ContentTemplate=\"{TemplateBinding HeaderTemplate}\"\r\n                  IsChecked=\"{TemplateBinding IsSelected}\"\r\n                  Grid.Column=\"0\"\r\n                  Grid.ColumnSpan=\"2\"\r\n                  Grid.Row=\"0\"\r\n                  Padding=\"4\"\r\n                  Margin=\"0\"\r\n                  FontFamily=\"{TemplateBinding FontFamily}\"\r\n                  FontSize=\"14\"\r\n                  FontStretch=\"{TemplateBinding FontStretch}\"\r\n                  FontStyle=\"{TemplateBinding FontStyle}\"\r\n                  FontWeight=\"Bold\"\r\n                  Foreground=\"#FFFFFFFF\"\r\n                  HorizontalContentAlignment=\"Left\"\r\n                  VerticalContentAlignment=\"Center\" />\r\n\r\n                                <layoutToolkitPrimitives:ExpandableContentControl\r\n                  x:Name=\"ExpandSite\"\r\n                  Grid.Column=\"0\"\r\n                  Grid.ColumnSpan=\"2\"\r\n                  Grid.Row=\"1\"\r\n                  Percentage=\"0\"\r\n                  Background=\"#FFD3DEEF\"\r\n                  RevealMode=\"{TemplateBinding ExpandDirection}\"\r\n                  Content=\"{TemplateBinding Content}\"\r\n                  ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                  Padding=\"2\"\r\n                  Margin=\"1\"\r\n                  FontFamily=\"{TemplateBinding FontFamily}\"\r\n                  FontSize=\"12\"\r\n                  FontStretch=\"{TemplateBinding FontStretch}\"\r\n                  FontStyle=\"{TemplateBinding FontStyle}\"\r\n                  FontWeight=\"{TemplateBinding FontWeight}\"\r\n                  Foreground=\"DarkGray\"\r\n                  HorizontalAlignment=\"Stretch\"\r\n                  HorizontalContentAlignment=\"Left\"\r\n                  VerticalAlignment=\"Stretch\"\r\n                  VerticalContentAlignment=\"Top\" />\r\n\r\n                            </Grid>\r\n                        </Border>\r\n                        <Border x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"#A5FFFFFF\" CornerRadius=\"3\"/>\r\n                        <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderThickness=\"1\" CornerRadius=\"3\">\r\n                            <Border.BorderBrush>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"#FFA3AEB9\"/>\r\n                                    <GradientStop Color=\"#FF8399A9\" Offset=\"0.375\"/>\r\n                                    <GradientStop Color=\"#FF718597\" Offset=\"0.375\"/>\r\n                                    <GradientStop Color=\"#FF617584\" Offset=\"1\"/>\r\n                                </LinearGradientBrush>\r\n                            </Border.BorderBrush>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </layoutToolkit:Accordion.Resources>\r\n\r\n            <layoutToolkit:AccordionItem Header=\"1. Accordion\" Template=\"{StaticResource ajaxTemplate}\">\r\n                <layoutToolkit:AccordionItem.Content>\r\n                    <TextBlock>\r\n            The Accordion is a control that allows you to provide multiple panes and display them.<LineBreak/>\r\n            There are several selection modes, so you can decide if only one pane can be open, <LineBreak/>\r\n            or multiple.<LineBreak/>\r\n            It is also possible to adjust the order in which the panes open and close:<LineBreak/>\r\n            Simultaneous or close first. <LineBreak/>\r\n            <LineBreak/>\r\n            The Accordion is implemented as an itemscontrol that contains AccordionItem controls. <LineBreak/>\r\n            Each AccordionItem control has a template for its Header and its Content. <LineBreak/>\r\n                    </TextBlock>\r\n                </layoutToolkit:AccordionItem.Content>\r\n            </layoutToolkit:AccordionItem>\r\n            <layoutToolkit:AccordionItem Header=\"2. AutoSize\" Template=\"{StaticResource ajaxTemplate}\">\r\n                <TextBlock>\r\n          It also supports filling to a specific height or width. <LineBreak/>\r\n          To do so, either set a Height (or Width) or use a VerticalAlignment <LineBreak/>\r\n          (or HorizontalAlignment) of 'Stretch'. <LineBreak/>\r\n          The Accordion will now always fill to that space. If more than one pane <LineBreak/>\r\n          may be opened, space is divided equally among them.\r\n          <LineBreak/>\r\n          Whether you fill to height or width is determined by the ExpandDirection property.<LineBreak/>\r\n          An accordion will is able to expand to Down, Up, Left and Right directions.\r\n                </TextBlock>\r\n            </layoutToolkit:AccordionItem>\r\n            <layoutToolkit:AccordionItem Header=\"3. Template parts\" Template=\"{StaticResource ajaxTemplate}\">\r\n                <TextBlock>\r\n          The accordion uses AccordionItems that can be fully templated.<LineBreak/>\r\n          In order to 'reveal' contents slowly, an ExpandableContentControl is used. <LineBreak/>\r\n          That control has a percentage property that can be animated. A value of 1 <LineBreak/>\r\n          means that the content is completely shown.<LineBreak/>\r\n          <LineBreak/>\r\n          AccordionItem animates this property using a keyspline to get a nice <LineBreak/>\r\n          easing-in effect. You can retemplate AccordionItem and create your own <LineBreak/>\r\n          transitions!<LineBreak/>\r\n                </TextBlock>\r\n            </layoutToolkit:AccordionItem>\r\n        </layoutToolkit:Accordion>\r\n\r\n        <ContentControl Content=\"Accordion restyled horizontally\" Style=\"{StaticResource Header}\" />\r\n        <layoutToolkit:Accordion ExpandDirection=\"Left\" Background=\"#FFE7E7E7\" >\r\n            <layoutToolkit:Accordion.Resources>\r\n                <!-- horizontal header -->\r\n                <ControlTemplate TargetType=\"layoutToolkitPrimitives:AccordionButton\" x:Key=\"HorizontalHeader\">\r\n                    <Grid Background=\"Transparent\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <!-- ExpandDirectionStates -->\r\n                            <VisualStateGroup x:Name=\"ExpandDirectionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"ExpandDown\">\r\n                                    <Storyboard>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ExpandUp\">\r\n                                    <Storyboard>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ExpandLeft\">\r\n                                    <Storyboard>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ExpandRight\">\r\n                                    <Storyboard>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <!-- ExpansionStates -->\r\n                            <VisualStateGroup x:Name=\"ExpansionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Collapsed\">\r\n                                    <Storyboard>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Expanded\">\r\n                                    <Storyboard>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <!-- CheckStates -->\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Checked\" />\r\n                                <VisualState x:Name=\"Unchecked\"/>\r\n                            </VisualStateGroup>\r\n                            <!-- CommonStates -->\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\"/>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" From=\"MouseOver\" To=\"Normal\"/>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <!-- FocusStates -->\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n\r\n                        <Border x:Name=\"MouseOverBackground\"\r\n              Background=\"Transparent\"\r\n               >\r\n                            <Border x:Name=\"background\" Background=\"Transparent\">\r\n                                <Grid Width=\"20\" Height=\"200\"\r\n                      Margin=\"{TemplateBinding Padding}\">\r\n\r\n                                    <Path Width=\"60\"\r\n                    Data=\"M7.2912064,0.5 C35.733871,0.5 58.791206,44.375938 58.791206,98.5 C58.791206,152.62386 35.734119,196.5 7.2912064,196.5 C5.5135384,196.5 3.7569084,196.32861 2.025631,195.99403 L0.5,195.55096 L3.2518349,194.50899 C13.537304,189.28716 22.366497,174.14719 28.045227,153.29272 C30.884619,142.86546 32.936363,131.00955 33.988701,118.25042 C35.041069,105.49129 35.041069,91.508682 33.988701,78.74958 C31.884027,53.231354 25.781698,31.325907 17.37603,17.23686 C13.173197,10.192317 8.3945103,5.1018929 3.2518349,2.4910123 L0.5,1.4490361 L2.025631,1.0059637 C3.7569084,0.67139101 5.5135384,0.5 7.2912064,0.5 z\" \r\n                    Stretch=\"Fill\" Stroke=\"Black\" StrokeThickness=\"2\" Height=\"197\" Margin=\"-40,0,0,0\">\r\n                                        <Path.Fill>\r\n                                            <LinearGradientBrush EndPoint=\"-0.162,1.001\" StartPoint=\"2.078,0.261\">\r\n                                                <GradientStop Color=\"#FFC4C4C4\"/>\r\n                                                <GradientStop Color=\"#FFF2F2F2\" Offset=\"1\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Path.Fill>\r\n                                    </Path>\r\n\r\n                                    <ContentPresenter x:Name=\"header\"\r\n                    Margin=\"0,0,5,0\"\r\n                    RenderTransformOrigin=\"0.5,0.5\"\r\n                    Content=\"{TemplateBinding Content}\" \r\n                    ContentTemplate=\"{TemplateBinding ContentTemplate}\" \r\n                    HorizontalAlignment=\"Center\" \r\n                    VerticalAlignment=\"Center\">\r\n                                        <ContentPresenter.LayoutTransform>\r\n                                            <RotateTransform Angle=\"90\" />\r\n                                        </ContentPresenter.LayoutTransform>\r\n                                    </ContentPresenter>\r\n                                </Grid>\r\n\r\n                            </Border>\r\n                        </Border>\r\n                        <Rectangle x:Name=\"FocusVisualElement\"\r\n              IsHitTestVisible=\"false\" \r\n              Stroke=\"Green\" \r\n              StrokeDashArray=\"1 2\" \r\n              StrokeThickness=\"1\" \r\n              Visibility=\"Collapsed\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n\r\n\r\n                <!-- horizontal template-->\r\n                <ControlTemplate TargetType=\"layoutToolkit:AccordionItem\" x:Key=\"HorizontalTemplate\">\r\n                    <Grid Background=\"Transparent\"\r\n            HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" \r\n            VerticalAlignment=\"{TemplateBinding VerticalAlignment}\">\r\n\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <!-- CommonState -->\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" To=\"1\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <!-- FocusStates -->\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <!-- Unfocused -->\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                            <!-- ExpansionStates -->\r\n                            <VisualStateGroup x:Name=\"ExpansionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Collapsed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames\r\n                          BeginTime=\"00:00:00\"\r\n                          Storyboard.TargetName=\"ExpandSite\"\r\n                          Storyboard.TargetProperty=\"(layoutToolkitPrimitives:ExpandableContentControl.Percentage)\">\r\n                                            <SplineDoubleKeyFrame\r\n                            KeyTime=\"00:00:00.3\"\r\n                              KeySpline=\"0.2,0,0,1\"\r\n                              Value=\"0\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Expanded\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames\r\n                            BeginTime=\"00:00:00\"\r\n                            Storyboard.TargetName=\"ExpandSite\"\r\n                            Storyboard.TargetProperty=\"(layoutToolkitPrimitives:ExpandableContentControl.Percentage)\">\r\n                                            <SplineDoubleKeyFrame\r\n                              KeyTime=\"00:00:00.3\"\r\n                              KeySpline=\"0.2,0,0,1\"\r\n                              Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <!-- ExpansionStates -->\r\n                            <VisualStateGroup x:Name=\"LockedStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Locked\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"IsEnabled\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Boolean>False</sys:Boolean>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unlocked\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"IsEnabled\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Boolean>True</sys:Boolean>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <!-- ExpandDirectionStates-->\r\n                            <VisualStateGroup x:Name=\"ExpandDirectionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"ExpandDown\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd1\" Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>*</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>*</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ExpandUp\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>0</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>*</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>*</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ExpandLeft\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.ColumnSpan)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.ColumnSpan)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.RowSpan)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>2</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.RowSpan)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>2</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>0</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>*</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>*</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ExpandRight\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.ColumnSpan)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.ColumnSpan)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.RowSpan)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>2</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.RowSpan)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>2</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>0</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>*</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd1\" Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>*</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"Background\" \r\n              Background=\"{TemplateBinding Background}\" \r\n              >\r\n                            <Grid>\r\n                                <Grid.RowDefinitions>\r\n                                    <RowDefinition Height=\"Auto\" x:Name=\"rd0\"/>\r\n                                    <RowDefinition Height=\"Auto\" x:Name=\"rd1\"/>\r\n                                </Grid.RowDefinitions>\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\" x:Name=\"cd0\"/>\r\n                                    <ColumnDefinition Width=\"Auto\" x:Name=\"cd1\"/>\r\n                                </Grid.ColumnDefinitions>\r\n\r\n                                <layoutToolkitPrimitives:AccordionButton\r\n                  x:Name=\"ExpanderButton\"\r\n                  Template=\"{StaticResource HorizontalHeader}\"\r\n                  Content=\"{TemplateBinding Header}\"\r\n                  ContentTemplate=\"{TemplateBinding HeaderTemplate}\"\r\n                  IsChecked=\"{TemplateBinding IsSelected}\"\r\n                  Grid.Column=\"0\"\r\n                  Grid.ColumnSpan=\"2\"\r\n                  Grid.Row=\"0\"\r\n                  Padding=\"2\"\r\n                  Margin=\"1\"\r\n                  FontFamily=\"{TemplateBinding FontFamily}\"\r\n                  FontSize=\"{TemplateBinding FontSize}\"\r\n                  FontStretch=\"{TemplateBinding FontStretch}\"\r\n                  FontStyle=\"{TemplateBinding FontStyle}\"\r\n                  FontWeight=\"{TemplateBinding FontWeight}\"\r\n                  Foreground=\"{TemplateBinding Foreground}\"\r\n                  HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                  VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\" \r\n                  HorizontalAlignment=\"Stretch\"\r\n                  VerticalAlignment=\"Stretch\" />\r\n\r\n                                <layoutToolkitPrimitives:ExpandableContentControl\r\n                  x:Name=\"ExpandSite\"\r\n                  Grid.Column=\"0\"\r\n                  Grid.ColumnSpan=\"2\"\r\n                  Grid.Row=\"1\"\r\n                  Percentage=\"0\"\r\n                  RevealMode=\"{TemplateBinding ExpandDirection}\"\r\n                  Content=\"{TemplateBinding Content}\"\r\n                  ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                  Padding=\"2\"\r\n                  Margin=\"1\"\r\n                  FontFamily=\"{TemplateBinding FontFamily}\"\r\n                  FontSize=\"{TemplateBinding FontSize}\"\r\n                  FontStretch=\"{TemplateBinding FontStretch}\"\r\n                  FontStyle=\"{TemplateBinding FontStyle}\"\r\n                  FontWeight=\"{TemplateBinding FontWeight}\"\r\n                  Foreground=\"{TemplateBinding Foreground}\"\r\n                  HorizontalContentAlignment=\"Left\"\r\n                  VerticalContentAlignment=\"Top\" \r\n                  HorizontalAlignment=\"Stretch\"\r\n                  VerticalAlignment=\"Stretch\" />\r\n\r\n                            </Grid>\r\n                        </Border>\r\n                        <Border x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"#A5FFFFFF\" CornerRadius=\"3\"/>\r\n                        <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderThickness=\"1\" CornerRadius=\"3\">\r\n                            <Border.BorderBrush>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"#FFA3AEB9\"/>\r\n                                    <GradientStop Color=\"#FF8399A9\" Offset=\"0.375\"/>\r\n                                    <GradientStop Color=\"#FF718597\" Offset=\"0.375\"/>\r\n                                    <GradientStop Color=\"#FF617584\" Offset=\"1\"/>\r\n                                </LinearGradientBrush>\r\n                            </Border.BorderBrush>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </layoutToolkit:Accordion.Resources>\r\n\r\n            <layoutToolkit:AccordionItem Margin=\"35,0,0,0\" Header=\"1. Accordion\" Template=\"{StaticResource HorizontalTemplate}\">\r\n                <layoutToolkit:AccordionItem.Content>\r\n                    <TextBlock Margin=\"0,0,30,0\">\r\n            The Accordion is a control that allows you to provide multiple panes and display them.<LineBreak/>\r\n            There are several selection modes, so you can decide if only one pane can be open, <LineBreak/>\r\n            or multiple.<LineBreak/>\r\n            It is also possible to adjust the order in which the panes open and close:<LineBreak/>\r\n            Simultaneous or close first. <LineBreak/>\r\n            <LineBreak/>\r\n            The Accordion is implemented as an itemscontrol that contains AccordionItem controls. <LineBreak/>\r\n            Each AccordionItem control has a template for its Header and its Content. <LineBreak/>\r\n                    </TextBlock>\r\n                </layoutToolkit:AccordionItem.Content>\r\n            </layoutToolkit:AccordionItem>\r\n            <layoutToolkit:AccordionItem Header=\"2. AutoSize\" Template=\"{StaticResource HorizontalTemplate}\">\r\n                <TextBlock Margin=\"0,0,30,0\">\r\n          It also supports filling to a specific height or width. <LineBreak/>\r\n          To do so, either set a Height (or Width) or use a VerticalAlignment <LineBreak/>\r\n          (or HorizontalAlignment) of 'Stretch'. <LineBreak/>\r\n          The Accordion will now always fill to that space. If more than one pane <LineBreak/>\r\n          may be opened, space is divided equally among them.\r\n          <LineBreak/>\r\n          Whether you fill to height or width is determined by the ExpandDirection property.<LineBreak/>\r\n          An accordion will is able to expand to Down, Up, Left and Right directions.\r\n                </TextBlock>\r\n            </layoutToolkit:AccordionItem>\r\n            <layoutToolkit:AccordionItem Header=\"3. Template parts\" Template=\"{StaticResource HorizontalTemplate}\">\r\n                <TextBlock Margin=\"0,0,30,0\">\r\n          The accordion uses AccordionItems that can be fully templated.<LineBreak/>\r\n          In order to 'reveal' contents slowly, an ExpandableContentControl is used. <LineBreak/>\r\n          That control has a percentage property that can be animated. A value of 1 <LineBreak/>\r\n          means that the content is completely shown.<LineBreak/>\r\n          <LineBreak/>\r\n          AccordionItem animates this property using a keyspline to get a nice <LineBreak/>\r\n          easing-in effect. You can retemplate AccordionItem and create your own <LineBreak/>\r\n          transitions!<LineBreak/>\r\n                </TextBlock>\r\n            </layoutToolkit:AccordionItem>\r\n        </layoutToolkit:Accordion>\r\n    </StackPanel>\r\n</UserControl>\r\n"
  },
  {
    "path": "WpfToolkit/Samples/Accordion/AccordionShowcase.xaml.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System.ComponentModel;\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    /// <summary>\r\n    /// Two samples that completely restyles accordion.\r\n    /// </summary>\r\n#if SILVERLIGHT\r\n    [Sample(\"Accordion Showcase\", DifficultyLevel.Basic)]\r\n#endif\r\n    [Category(\"Accordion\")]\r\n    public partial class AccordionShowcase : UserControl\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the \r\n        /// <see cref=\"AccordionShowcase\"/> class.\r\n        /// </summary>\r\n        public AccordionShowcase()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Samples/Accordion/AccordionUsage.xaml",
    "content": "﻿<!--\r\n// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n-->\r\n<UserControl\r\n  x:Class=\"System.Windows.Controls.Samples.AccordionUsage\"\r\n  xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n  xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n  xmlns:layoutToolkit=\"clr-namespace:System.Windows.Controls;assembly=DotNetProjects.Layout.Toolkit\"\r\n  xmlns:layoutToolkitPrimitives=\"clr-namespace:System.Windows.Controls.Primitives;assembly=DotNetProjects.Layout.Toolkit\"\r\n  xmlns:sys=\"clr-namespace:System;assembly=mscorlib\">\r\n    <StackPanel>\r\n        <ContentControl\r\n      Content=\"Hardcoded items - text\"\r\n      Style=\"{StaticResource Header}\" />\r\n        <layoutToolkit:Accordion\r\n      HorizontalAlignment=\"Stretch\">\r\n            <layoutToolkit:AccordionItem\r\n        Header=\"Hello\"\r\n        Content=\"World\" />\r\n            <layoutToolkit:AccordionItem\r\n        Header=\"foo\"\r\n        Content=\"bar\" />\r\n            <layoutToolkit:AccordionItem\r\n        Header=\"mini\"\r\n        Content=\"me\" />\r\n        </layoutToolkit:Accordion>\r\n        <ContentControl\r\n      Content=\"Hardcoded items - UI Elements\"\r\n      Style=\"{StaticResource Header}\" />\r\n        <layoutToolkit:Accordion\r\n      HorizontalAlignment=\"Stretch\">\r\n            <layoutToolkit:AccordionItem>\r\n                <layoutToolkit:AccordionItem.Header>\r\n                    <TextBlock\r\n            Text=\"Image\" />\r\n                </layoutToolkit:AccordionItem.Header>\r\n                <layoutToolkit:AccordionItem.Content>\r\n                    <Image\r\n            Source=\"Bing.png\" />\r\n                </layoutToolkit:AccordionItem.Content>\r\n            </layoutToolkit:AccordionItem >\r\n            <layoutToolkit:AccordionItem>\r\n                <layoutToolkit:AccordionItem.Header>\r\n                    <TextBlock\r\n            Text=\"Button\" />\r\n                </layoutToolkit:AccordionItem.Header>\r\n                <layoutToolkit:AccordionItem.Content>\r\n                    <Button\r\n            Content=\"button as content\"\r\n            Margin=\"10\" />\r\n                </layoutToolkit:AccordionItem.Content>\r\n            </layoutToolkit:AccordionItem>\r\n        </layoutToolkit:Accordion>\r\n        <ContentControl\r\n      Content=\"Orientation left\"\r\n      Style=\"{StaticResource Header}\" />\r\n        <layoutToolkit:Accordion\r\n      ExpandDirection=\"Left\"\r\n      Height=\"150\">\r\n            <layoutToolkit:AccordionItem\r\n        Header=\"Hello\"\r\n        Content=\"World\" />\r\n            <layoutToolkit:AccordionItem\r\n        Header=\"foo\"\r\n        Content=\"bar\" />\r\n            <layoutToolkit:AccordionItem\r\n        Header=\"mini\"\r\n        Content=\"me\" />\r\n        </layoutToolkit:Accordion>\r\n        <ContentControl\r\n      Content=\"One item selected\"\r\n      Style=\"{StaticResource Header}\" />\r\n        <layoutToolkit:Accordion\r\n      HorizontalAlignment=\"Stretch\">\r\n            <layoutToolkit:AccordionItem\r\n        Header=\"Hello\"\r\n        Content=\"World\" />\r\n            <layoutToolkit:AccordionItem\r\n        Header=\"foo\"\r\n        Content=\"bar\" />\r\n            <layoutToolkit:AccordionItem\r\n        Header=\"mini\"\r\n        Content=\"me\"\r\n        IsSelected=\"True\" />\r\n        </layoutToolkit:Accordion>\r\n        <ContentControl\r\n      Content=\"Allowing multiple items\"\r\n      Style=\"{StaticResource Header}\" />\r\n        <layoutToolkit:Accordion\r\n      HorizontalAlignment=\"Stretch\"\r\n      SelectionMode=\"ZeroOrMore\">\r\n            <layoutToolkit:AccordionItem\r\n        Header=\"Hello\"\r\n        Content=\"World\"\r\n        IsSelected=\"True\" />\r\n            <layoutToolkit:AccordionItem\r\n        Header=\"foo\"\r\n        Content=\"bar\"\r\n        IsSelected=\"True\" />\r\n            <layoutToolkit:AccordionItem\r\n        Header=\"mini\"\r\n        Content=\"me\" />\r\n        </layoutToolkit:Accordion>\r\n        <ContentControl\r\n      Content=\"Require one open accordion\"\r\n      Style=\"{StaticResource Header}\" />\r\n        <layoutToolkit:Accordion\r\n      HorizontalAlignment=\"Stretch\"\r\n      SelectionMode=\"OneOrMore\">\r\n            <layoutToolkit:AccordionItem\r\n        Header=\"Hello\"\r\n        Content=\"World\"\r\n        IsSelected=\"True\" />\r\n            <layoutToolkit:AccordionItem\r\n        Header=\"foo\"\r\n        Content=\"bar\" />\r\n            <layoutToolkit:AccordionItem\r\n        Header=\"mini\"\r\n        Content=\"me\" />\r\n        </layoutToolkit:Accordion>\r\n        <ContentControl\r\n      Content=\"Sequential animation\"\r\n      Style=\"{StaticResource Header}\" />\r\n        <layoutToolkit:Accordion\r\n      HorizontalAlignment=\"Stretch\"\r\n      SelectionSequence=\"CollapseBeforeExpand\">\r\n            <layoutToolkit:AccordionItem\r\n        Header=\"Hello\"\r\n        Content=\"World\" />\r\n            <layoutToolkit:AccordionItem\r\n        Header=\"foo\"\r\n        Content=\"bar\" />\r\n            <layoutToolkit:AccordionItem\r\n        Header=\"mini\"\r\n        Content=\"me\" />\r\n        </layoutToolkit:Accordion>\r\n        <ContentControl\r\n      Content=\"Generated content\"\r\n      Style=\"{StaticResource Header}\" />\r\n        <layoutToolkit:Accordion\r\n      HorizontalAlignment=\"Stretch\"\r\n      x:Name=\"accordionGeneratedContent\">\r\n            <layoutToolkit:Accordion.ContentTemplate>\r\n                <DataTemplate>\r\n                    <TextBlock\r\n            Text=\"{Binding Key}\" />\r\n                </DataTemplate>\r\n            </layoutToolkit:Accordion.ContentTemplate >\r\n            <layoutToolkit:Accordion.ItemTemplate>\r\n                <DataTemplate>\r\n                    <TextBlock\r\n            Text=\"{Binding Value}\" />\r\n                </DataTemplate>\r\n            </layoutToolkit:Accordion.ItemTemplate>\r\n        </layoutToolkit:Accordion>\r\n        <ContentControl\r\n      Content=\"Default header template\"\r\n      Style=\"{StaticResource Header}\" />\r\n        <layoutToolkit:Accordion\r\n      HorizontalAlignment=\"Stretch\"\r\n      x:Name=\"accordionDefaultHeaderTemplate\"\r\n      DisplayMemberPath=\"Value\">\r\n            <layoutToolkit:Accordion.ContentTemplate>\r\n                <DataTemplate>\r\n                    <TextBlock\r\n            Text=\"{Binding Key}\" />\r\n                </DataTemplate>\r\n            </layoutToolkit:Accordion.ContentTemplate >\r\n        </layoutToolkit:Accordion>\r\n        <ContentControl\r\n      Content=\"Using selectionChanged event\"\r\n      Style=\"{StaticResource Header}\" />\r\n        <layoutToolkit:Accordion\r\n      HorizontalAlignment=\"Stretch\"\r\n      SelectionMode=\"ZeroOrMore\"\r\n      SelectionChanged=\"Accordion_SelectionChanged\">\r\n            <layoutToolkit:AccordionItem\r\n        Header=\"Hello\"\r\n        Content=\"World\"\r\n        IsSelected=\"True\" />\r\n            <layoutToolkit:AccordionItem\r\n        Header=\"foo\"\r\n        Content=\"bar\"\r\n        IsSelected=\"True\" />\r\n            <layoutToolkit:AccordionItem\r\n        Header=\"mini\"\r\n        Content=\"me\" />\r\n        </layoutToolkit:Accordion>\r\n        <ContentControl\r\n      Content=\"Expanding/collapsing an entire accordion\"\r\n      Style=\"{StaticResource Header}\" />\r\n        <layoutToolkit:Accordion\r\n      HorizontalAlignment=\"Stretch\"\r\n      x:Name=\"accordionExpandCollapse\"\r\n      SelectionMode=\"ZeroOrMore\">\r\n            <layoutToolkit:AccordionItem\r\n        Header=\"Hello\"\r\n        Content=\"World\" />\r\n            <layoutToolkit:AccordionItem\r\n        Header=\"foo\"\r\n        Content=\"bar\" />\r\n            <layoutToolkit:AccordionItem\r\n        Header=\"mini\"\r\n        Content=\"me\" />\r\n        </layoutToolkit:Accordion>\r\n        <StackPanel\r\n      Orientation=\"Horizontal\">\r\n            <Button\r\n        Click=\"ExpandAll_Click\"\r\n        Content=\"Expand Accordion\"\r\n        Margin=\"2\" />\r\n            <Button\r\n        Click=\"CollapseAll_Click\"\r\n        Content=\"Collapse Accordion\"\r\n        Margin=\"2\" />\r\n        </StackPanel>\r\n        <ContentControl\r\n      Content=\"Finding the currently selected clr types\"\r\n      Style=\"{StaticResource Header}\" />\r\n        <layoutToolkit:Accordion\r\n      HorizontalAlignment=\"Stretch\"\r\n      x:Name=\"accordionCLRTypes\"\r\n      SelectionMode=\"ZeroOrMore\"\r\n      SelectedItemsChanged=\"CLRTypesSelectedItemsChanged\">\r\n            <layoutToolkit:Accordion.ContentTemplate>\r\n                <DataTemplate>\r\n                    <TextBlock\r\n            Text=\"{Binding Key}\" />\r\n                </DataTemplate>\r\n            </layoutToolkit:Accordion.ContentTemplate>\r\n            <layoutToolkit:Accordion.ItemTemplate>\r\n                <DataTemplate>\r\n                    <TextBlock\r\n            Text=\"{Binding Value}\" />\r\n                </DataTemplate>\r\n            </layoutToolkit:Accordion.ItemTemplate>\r\n        </layoutToolkit:Accordion>\r\n        <ContentControl\r\n      Content=\"Getting an AccordionItem from an Item\"\r\n      Style=\"{StaticResource Header}\" />\r\n        <layoutToolkit:Accordion\r\n      HorizontalAlignment=\"Stretch\"\r\n      SelectionMode=\"ZeroOrMore\"\r\n      x:Name=\"accordionAccordionItem\"\r\n      Loaded=\"SetMouseEvents\">\r\n            <layoutToolkit:Accordion.ContentTemplate>\r\n                <DataTemplate>\r\n                    <TextBlock\r\n            Text=\"{Binding Key}\" />\r\n                </DataTemplate>\r\n            </layoutToolkit:Accordion.ContentTemplate>\r\n            <layoutToolkit:Accordion.ItemTemplate>\r\n                <DataTemplate>\r\n                    <TextBlock\r\n            Text=\"{Binding Value}\" />\r\n                </DataTemplate>\r\n            </layoutToolkit:Accordion.ItemTemplate>\r\n        </layoutToolkit:Accordion>\r\n        <ContentControl\r\n      Content=\"Restyling and retemplating AccordionItems\"\r\n      Style=\"{StaticResource Header}\" />\r\n        <layoutToolkit:Accordion\r\n      HorizontalAlignment=\"Stretch\">\r\n            <layoutToolkit:AccordionItem\r\n        Header=\"Hello\"\r\n        Content=\"World\" />\r\n            <layoutToolkit:AccordionItem\r\n        Header=\"foo\"\r\n        Content=\"bar\" />\r\n            <layoutToolkit:AccordionItem\r\n        Header=\"mini\"\r\n        Content=\"me\" />\r\n            <layoutToolkit:Accordion.ItemContainerStyle>\r\n                <Style\r\n          TargetType=\"layoutToolkit:AccordionItem\">\r\n                    <Setter\r\n            Property=\"Cursor\"\r\n            Value=\"Hand\" />\r\n                    <Setter\r\n            Property=\"Template\">\r\n                        <Setter.Value>\r\n                            <ControlTemplate\r\n                TargetType=\"layoutToolkit:AccordionItem\">\r\n                                <Grid\r\n                  Background=\"Transparent\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <!-- CommonState -->\r\n                                        <VisualStateGroup\r\n                      x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition\r\n                          GeneratedDuration=\"0\" />\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState\r\n                        x:Name=\"Normal\" />\r\n                                            <VisualState\r\n                        x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimation\r\n                            Duration=\"0\"\r\n                            Storyboard.TargetName=\"DisabledVisualElement\"\r\n                            Storyboard.TargetProperty=\"(UIElement.Opacity)\"\r\n                            To=\"1\" />\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                        <!-- FocusStates -->\r\n                                        <VisualStateGroup\r\n                      x:Name=\"FocusStates\">\r\n                                            <VisualState\r\n                        x:Name=\"Focused\">\r\n                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames\r\n                            Duration=\"0\"\r\n                            Storyboard.TargetName=\"FocusVisualElement\"\r\n                            Storyboard.TargetProperty=\"Visibility\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                            <DiscreteObjectKeyFrame.Value>\r\n                                                                <Visibility>Visible</Visibility>\r\n                                                            </DiscreteObjectKeyFrame.Value>\r\n                                                        </DiscreteObjectKeyFrame>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <!-- Unfocused -->\r\n                                            <VisualState\r\n                        x:Name=\"Unfocused\" />\r\n                                        </VisualStateGroup>\r\n                                        <!-- ExpansionStates -->\r\n                                        <VisualStateGroup\r\n                      x:Name=\"ExpansionStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition\r\n                          GeneratedDuration=\"0\" />\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState\r\n                        x:Name=\"Collapsed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames\r\n                            BeginTime=\"00:00:00\"\r\n                            Storyboard.TargetName=\"ExpandSite\"\r\n                            Storyboard.TargetProperty=\"(layoutToolkitPrimitives:ExpandableContentControl.Percentage)\">\r\n                                                        <SplineDoubleKeyFrame\r\n                              KeyTime=\"00:00:00.3\"\r\n                              KeySpline=\"0.2,0,0,1\"\r\n                              Value=\"0\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState\r\n                        x:Name=\"Expanded\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames\r\n                            BeginTime=\"00:00:00\"\r\n                            Storyboard.TargetName=\"ExpandSite\"\r\n                            Storyboard.TargetProperty=\"(layoutToolkitPrimitives:ExpandableContentControl.Percentage)\">\r\n                                                        <SplineDoubleKeyFrame\r\n                              KeyTime=\"00:00:00.3\"\r\n                              KeySpline=\"0.2,0,0,1\"\r\n                              Value=\"1\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                        <!-- ExpansionStates -->\r\n                                        <VisualStateGroup\r\n                      x:Name=\"LockedStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition\r\n                          GeneratedDuration=\"0\" />\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState\r\n                        x:Name=\"Locked\">\r\n                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames\r\n                            Duration=\"0\"\r\n                            Storyboard.TargetName=\"ExpanderButton\"\r\n                            Storyboard.TargetProperty=\"IsEnabled\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                            <DiscreteObjectKeyFrame.Value>\r\n                                                                <sys:Boolean>False</sys:Boolean>\r\n                                                            </DiscreteObjectKeyFrame.Value>\r\n                                                        </DiscreteObjectKeyFrame>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState\r\n                        x:Name=\"Unlocked\">\r\n                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames\r\n                            Duration=\"0\"\r\n                            Storyboard.TargetName=\"ExpanderButton\"\r\n                            Storyboard.TargetProperty=\"IsEnabled\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                            <DiscreteObjectKeyFrame.Value>\r\n                                                                <sys:Boolean>True</sys:Boolean>\r\n                                                            </DiscreteObjectKeyFrame.Value>\r\n                                                        </DiscreteObjectKeyFrame>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                        <!-- ExpandDirectionStates-->\r\n                                        <VisualStateGroup\r\n                      x:Name=\"ExpandDirectionStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition\r\n                          GeneratedDuration=\"0\" />\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState\r\n                        x:Name=\"ExpandDown\">\r\n                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames\r\n                            Duration=\"0\"\r\n                            Storyboard.TargetName=\"rd1\"\r\n                            Storyboard.TargetProperty=\"Height\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                            <DiscreteObjectKeyFrame.Value>\r\n                                                                <GridLength>*</GridLength>\r\n                                                            </DiscreteObjectKeyFrame.Value>\r\n                                                        </DiscreteObjectKeyFrame>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                    <ObjectAnimationUsingKeyFrames\r\n                            Duration=\"0\"\r\n                            Storyboard.TargetName=\"cd0\"\r\n                            Storyboard.TargetProperty=\"Width\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                            <DiscreteObjectKeyFrame.Value>\r\n                                                                <GridLength>*</GridLength>\r\n                                                            </DiscreteObjectKeyFrame.Value>\r\n                                                        </DiscreteObjectKeyFrame>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState\r\n                        x:Name=\"ExpandUp\">\r\n                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames\r\n                            Duration=\"0\"\r\n                            Storyboard.TargetName=\"ExpanderButton\"\r\n                            Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                            <DiscreteObjectKeyFrame.Value>\r\n                                                                <sys:Int32>1</sys:Int32>\r\n                                                            </DiscreteObjectKeyFrame.Value>\r\n                                                        </DiscreteObjectKeyFrame>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                    <ObjectAnimationUsingKeyFrames\r\n                            Duration=\"0\"\r\n                            Storyboard.TargetName=\"ExpandSite\"\r\n                            Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                            <DiscreteObjectKeyFrame.Value>\r\n                                                                <sys:Int32>0</sys:Int32>\r\n                                                            </DiscreteObjectKeyFrame.Value>\r\n                                                        </DiscreteObjectKeyFrame>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                    <ObjectAnimationUsingKeyFrames\r\n                            Duration=\"0\"\r\n                            Storyboard.TargetName=\"rd0\"\r\n                            Storyboard.TargetProperty=\"Height\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                            <DiscreteObjectKeyFrame.Value>\r\n                                                                <GridLength>*</GridLength>\r\n                                                            </DiscreteObjectKeyFrame.Value>\r\n                                                        </DiscreteObjectKeyFrame>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                    <ObjectAnimationUsingKeyFrames\r\n                            Duration=\"0\"\r\n                            Storyboard.TargetName=\"cd0\"\r\n                            Storyboard.TargetProperty=\"Width\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                            <DiscreteObjectKeyFrame.Value>\r\n                                                                <GridLength>*</GridLength>\r\n                                                            </DiscreteObjectKeyFrame.Value>\r\n                                                        </DiscreteObjectKeyFrame>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState\r\n                        x:Name=\"ExpandLeft\">\r\n                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames\r\n                            Duration=\"0\"\r\n                            Storyboard.TargetName=\"ExpanderButton\"\r\n                            Storyboard.TargetProperty=\"(Grid.ColumnSpan)\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                            <DiscreteObjectKeyFrame.Value>\r\n                                                                <sys:Int32>1</sys:Int32>\r\n                                                            </DiscreteObjectKeyFrame.Value>\r\n                                                        </DiscreteObjectKeyFrame>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                    <ObjectAnimationUsingKeyFrames\r\n                            Duration=\"0\"\r\n                            Storyboard.TargetName=\"ExpandSite\"\r\n                            Storyboard.TargetProperty=\"(Grid.ColumnSpan)\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                            <DiscreteObjectKeyFrame.Value>\r\n                                                                <sys:Int32>1</sys:Int32>\r\n                                                            </DiscreteObjectKeyFrame.Value>\r\n                                                        </DiscreteObjectKeyFrame>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                    <ObjectAnimationUsingKeyFrames\r\n                            Duration=\"0\"\r\n                            Storyboard.TargetName=\"ExpanderButton\"\r\n                            Storyboard.TargetProperty=\"(Grid.RowSpan)\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                            <DiscreteObjectKeyFrame.Value>\r\n                                                                <sys:Int32>2</sys:Int32>\r\n                                                            </DiscreteObjectKeyFrame.Value>\r\n                                                        </DiscreteObjectKeyFrame>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                    <ObjectAnimationUsingKeyFrames\r\n                            Duration=\"0\"\r\n                            Storyboard.TargetName=\"ExpandSite\"\r\n                            Storyboard.TargetProperty=\"(Grid.RowSpan)\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                            <DiscreteObjectKeyFrame.Value>\r\n                                                                <sys:Int32>2</sys:Int32>\r\n                                                            </DiscreteObjectKeyFrame.Value>\r\n                                                        </DiscreteObjectKeyFrame>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                    <ObjectAnimationUsingKeyFrames\r\n                            Duration=\"0\"\r\n                            Storyboard.TargetName=\"ExpanderButton\"\r\n                            Storyboard.TargetProperty=\"(Grid.Column)\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                            <DiscreteObjectKeyFrame.Value>\r\n                                                                <sys:Int32>1</sys:Int32>\r\n                                                            </DiscreteObjectKeyFrame.Value>\r\n                                                        </DiscreteObjectKeyFrame>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                    <ObjectAnimationUsingKeyFrames\r\n                            Duration=\"0\"\r\n                            Storyboard.TargetName=\"ExpandSite\"\r\n                            Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                            <DiscreteObjectKeyFrame.Value>\r\n                                                                <sys:Int32>0</sys:Int32>\r\n                                                            </DiscreteObjectKeyFrame.Value>\r\n                                                        </DiscreteObjectKeyFrame>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                    <ObjectAnimationUsingKeyFrames\r\n                            Duration=\"0\"\r\n                            Storyboard.TargetName=\"rd0\"\r\n                            Storyboard.TargetProperty=\"Height\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                            <DiscreteObjectKeyFrame.Value>\r\n                                                                <GridLength>*</GridLength>\r\n                                                            </DiscreteObjectKeyFrame.Value>\r\n                                                        </DiscreteObjectKeyFrame>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                    <ObjectAnimationUsingKeyFrames\r\n                            Duration=\"0\"\r\n                            Storyboard.TargetName=\"cd0\"\r\n                            Storyboard.TargetProperty=\"Width\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                            <DiscreteObjectKeyFrame.Value>\r\n                                                                <GridLength>*</GridLength>\r\n                                                            </DiscreteObjectKeyFrame.Value>\r\n                                                        </DiscreteObjectKeyFrame>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState\r\n                        x:Name=\"ExpandRight\">\r\n                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames\r\n                            Duration=\"0\"\r\n                            Storyboard.TargetName=\"ExpanderButton\"\r\n                            Storyboard.TargetProperty=\"(Grid.ColumnSpan)\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                            <DiscreteObjectKeyFrame.Value>\r\n                                                                <sys:Int32>1</sys:Int32>\r\n                                                            </DiscreteObjectKeyFrame.Value>\r\n                                                        </DiscreteObjectKeyFrame>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                    <ObjectAnimationUsingKeyFrames\r\n                            Duration=\"0\"\r\n                            Storyboard.TargetName=\"ExpandSite\"\r\n                            Storyboard.TargetProperty=\"(Grid.ColumnSpan)\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                            <DiscreteObjectKeyFrame.Value>\r\n                                                                <sys:Int32>1</sys:Int32>\r\n                                                            </DiscreteObjectKeyFrame.Value>\r\n                                                        </DiscreteObjectKeyFrame>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                    <ObjectAnimationUsingKeyFrames\r\n                            Duration=\"0\"\r\n                            Storyboard.TargetName=\"ExpanderButton\"\r\n                            Storyboard.TargetProperty=\"(Grid.RowSpan)\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                            <DiscreteObjectKeyFrame.Value>\r\n                                                                <sys:Int32>2</sys:Int32>\r\n                                                            </DiscreteObjectKeyFrame.Value>\r\n                                                        </DiscreteObjectKeyFrame>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                    <ObjectAnimationUsingKeyFrames\r\n                            Duration=\"0\"\r\n                            Storyboard.TargetName=\"ExpandSite\"\r\n                            Storyboard.TargetProperty=\"(Grid.RowSpan)\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                            <DiscreteObjectKeyFrame.Value>\r\n                                                                <sys:Int32>2</sys:Int32>\r\n                                                            </DiscreteObjectKeyFrame.Value>\r\n                                                        </DiscreteObjectKeyFrame>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                    <ObjectAnimationUsingKeyFrames\r\n                            Duration=\"0\"\r\n                            Storyboard.TargetName=\"ExpandSite\"\r\n                            Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                            <DiscreteObjectKeyFrame.Value>\r\n                                                                <sys:Int32>0</sys:Int32>\r\n                                                            </DiscreteObjectKeyFrame.Value>\r\n                                                        </DiscreteObjectKeyFrame>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                    <ObjectAnimationUsingKeyFrames\r\n                            Duration=\"0\"\r\n                            Storyboard.TargetName=\"ExpandSite\"\r\n                            Storyboard.TargetProperty=\"(Grid.Column)\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                            <DiscreteObjectKeyFrame.Value>\r\n                                                                <sys:Int32>1</sys:Int32>\r\n                                                            </DiscreteObjectKeyFrame.Value>\r\n                                                        </DiscreteObjectKeyFrame>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                    <ObjectAnimationUsingKeyFrames\r\n                            Duration=\"0\"\r\n                            Storyboard.TargetName=\"rd0\"\r\n                            Storyboard.TargetProperty=\"Height\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                            <DiscreteObjectKeyFrame.Value>\r\n                                                                <GridLength>*</GridLength>\r\n                                                            </DiscreteObjectKeyFrame.Value>\r\n                                                        </DiscreteObjectKeyFrame>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                    <ObjectAnimationUsingKeyFrames\r\n                            Duration=\"0\"\r\n                            Storyboard.TargetName=\"cd1\"\r\n                            Storyboard.TargetProperty=\"Width\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                            <DiscreteObjectKeyFrame.Value>\r\n                                                                <GridLength>*</GridLength>\r\n                                                            </DiscreteObjectKeyFrame.Value>\r\n                                                        </DiscreteObjectKeyFrame>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Border\r\n                    x:Name=\"Background\"\r\n                    Padding=\"{TemplateBinding Padding}\"\r\n                    Background=\"{TemplateBinding Background}\"\r\n                    BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                    BorderThickness=\"{TemplateBinding BorderThickness}\">\r\n                                        <Grid>\r\n                                            <Grid.RowDefinitions>\r\n                                                <RowDefinition\r\n                          Height=\"Auto\"\r\n                          x:Name=\"rd0\" />\r\n                                                <RowDefinition\r\n                          Height=\"Auto\"\r\n                          x:Name=\"rd1\" />\r\n                                            </Grid.RowDefinitions>\r\n                                            <Grid.ColumnDefinitions>\r\n                                                <ColumnDefinition\r\n                          Width=\"Auto\"\r\n                          x:Name=\"cd0\" />\r\n                                                <ColumnDefinition\r\n                          Width=\"Auto\"\r\n                          x:Name=\"cd1\" />\r\n                                            </Grid.ColumnDefinitions>\r\n                                            <layoutToolkitPrimitives:AccordionButton\r\n                        x:Name=\"ExpanderButton\"\r\n                        DataContext=\"{Binding}\"\r\n                        Content=\"{TemplateBinding Header}\"\r\n                        ContentTemplate=\"{TemplateBinding HeaderTemplate}\"\r\n                        IsChecked=\"{TemplateBinding IsSelected}\"\r\n                        Grid.Column=\"0\"\r\n                        Grid.ColumnSpan=\"2\"\r\n                        Grid.Row=\"0\"\r\n                        Padding=\"2\"\r\n                        Margin=\"1\"\r\n                        FontFamily=\"{TemplateBinding FontFamily}\"\r\n                        FontSize=\"{TemplateBinding FontSize}\"\r\n                        FontStretch=\"{TemplateBinding FontStretch}\"\r\n                        FontStyle=\"{TemplateBinding FontStyle}\"\r\n                        FontWeight=\"{TemplateBinding FontWeight}\"\r\n                        Foreground=\"{TemplateBinding Foreground}\"\r\n                        HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                        VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\" />\r\n                                            <layoutToolkitPrimitives:ExpandableContentControl\r\n                        x:Name=\"ExpandSite\"\r\n                        Grid.Column=\"0\"\r\n                        Grid.ColumnSpan=\"2\"\r\n                        Grid.Row=\"1\"\r\n                        Percentage=\"0\"\r\n                        Content=\"{TemplateBinding Content}\"\r\n                        ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                        RevealMode=\"{TemplateBinding ExpandDirection}\"\r\n                        Padding=\"2\"\r\n                        Margin=\"1\"\r\n                        FontFamily=\"{TemplateBinding FontFamily}\"\r\n                        FontSize=\"{TemplateBinding FontSize}\"\r\n                        FontStretch=\"{TemplateBinding FontStretch}\"\r\n                        FontStyle=\"{TemplateBinding FontStyle}\"\r\n                        FontWeight=\"{TemplateBinding FontWeight}\"\r\n                        Foreground=\"{TemplateBinding Foreground}\"\r\n                        HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                        HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                        VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                        VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\" />\r\n                                        </Grid>\r\n                                    </Border>\r\n                                    <Border\r\n                    x:Name=\"DisabledVisualElement\"\r\n                    IsHitTestVisible=\"false\"\r\n                    Opacity=\"0\"\r\n                    Background=\"#A5FFFFFF\"\r\n                    CornerRadius=\"3\" />\r\n                                    <Border\r\n                    x:Name=\"FocusVisualElement\"\r\n                    IsHitTestVisible=\"false\"\r\n                    Visibility=\"Collapsed\"\r\n                    BorderThickness=\"1\"\r\n                    CornerRadius=\"3\">\r\n                                        <Border.BorderBrush>\r\n                                            <LinearGradientBrush\r\n                        EndPoint=\"0.5,1\"\r\n                        StartPoint=\"0.5,0\">\r\n                                                <GradientStop\r\n                          Color=\"#FFA3AEB9\" />\r\n                                                <GradientStop\r\n                          Color=\"#FF8399A9\"\r\n                          Offset=\"0.375\" />\r\n                                                <GradientStop\r\n                          Color=\"#FF718597\"\r\n                          Offset=\"0.375\" />\r\n                                                <GradientStop\r\n                          Color=\"#FF617584\"\r\n                          Offset=\"1\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Border.BorderBrush>\r\n                                    </Border>\r\n                                    <Rectangle\r\n                    StrokeDashArray=\"2 1\"\r\n                    StrokeThickness=\"3\"\r\n                    Stroke=\"Black\"\r\n                    HorizontalAlignment=\"Stretch\"\r\n                    VerticalAlignment=\"Stretch\" />\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                        </Setter.Value>\r\n                    </Setter>\r\n                </Style>\r\n            </layoutToolkit:Accordion.ItemContainerStyle>\r\n        </layoutToolkit:Accordion>\r\n    </StackPanel>\r\n</UserControl>\r\n"
  },
  {
    "path": "WpfToolkit/Samples/Accordion/AccordionUsage.xaml.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Collections.Specialized;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Documents;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows.Shapes;\r\nusing System.Globalization;\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    /// <summary>\r\n    /// Sample page for Accordion, showing usages.\r\n    /// </summary>\r\n#if SILVERLIGHT\r\n    [Sample(\"Accordion Usage samples\", DifficultyLevel.Basic)]\r\n#endif\r\n    [Category(\"Accordion\")]\r\n    public partial class AccordionUsage : UserControl\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the <see cref=\"AccordionUsage\"/> class.\r\n        /// </summary>\r\n        public AccordionUsage()\r\n        {\r\n            InitializeComponent();\r\n\r\n            KeyValuePair<string, string>[] data = new KeyValuePair<string, string>[]\r\n            {\r\n                new KeyValuePair<string, string>(\"Hello\", \"World\"),\r\n                new KeyValuePair<string, string>(\"foo\", \"bar\"),\r\n                new KeyValuePair<string, string>(\"Silverlight\", \"Toolkit\"),\r\n            };\r\n\r\n            // initialize accordions\r\n            accordionGeneratedContent.ItemsSource = data;\r\n            accordionDefaultHeaderTemplate.ItemsSource = data;\r\n            accordionCLRTypes.ItemsSource = data;\r\n            accordionAccordionItem.ItemsSource = data;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the SelectionChanged event of the accordion control.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source of the event.</param>\r\n        /// <param name=\"e\">The <see cref=\"System.Windows.Controls.SelectionChangedEventArgs\"/> instance containing the event data.</param>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Hooked up in Xaml\")]\r\n        private void Accordion_SelectionChanged(object sender, SelectionChangedEventArgs e)\r\n        {\r\n            foreach (AccordionItem SelectedAccordionItem in e.AddedItems)\r\n            {\r\n                Debug.WriteLine(string.Format(\r\n                    CultureInfo.InvariantCulture, \r\n                    \"AccordionItem {0} has been selected.\",\r\n                    SelectedAccordionItem.Header));\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        /// Handles the Click event of the btnExpandAll control.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source of the event.</param>\r\n        /// <param name=\"e\">The <see cref=\"System.Windows.RoutedEventArgs\"/> instance containing the event data.</param>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Hooked up in Xaml\")]\r\n        private void ExpandAll_Click(object sender, RoutedEventArgs e)\r\n        {\r\n            accordionExpandCollapse.SelectAll();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the Click event of the btnCollapseAll control.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source of the event.</param>\r\n        /// <param name=\"e\">The <see cref=\"System.Windows.RoutedEventArgs\"/> instance containing the event data.</param>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Hooked up in Xaml\")]\r\n        private void CollapseAll_Click(object sender, RoutedEventArgs e)\r\n        {\r\n            accordionExpandCollapse.UnselectAll();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the SelectionChanged event for the CLRTypes sample.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The sender.</param>\r\n        /// <param name=\"e\">The <see cref=\"System.Windows.Controls.SelectionChangedEventArgs\"/> instance containing the event data.</param>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Hooked up in Xaml\")]\r\n        private void CLRTypesSelectedItemsChanged(object sender, NotifyCollectionChangedEventArgs e)\r\n        {\r\n                    foreach (\r\n                        KeyValuePair<string, string> keyValuePair in\r\n                            accordionCLRTypes.SelectedItems)\r\n                    {\r\n                        Debug.WriteLine(\"Interesting, people like seeing details on \" +\r\n                                        keyValuePair.Key);\r\n                    }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Hooks up events for the MouseOver sample.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The sender.</param>\r\n        /// <param name=\"e\">The <see cref=\"System.Windows.RoutedEventArgs\"/> instance containing the event data.</param>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1804:RemoveUnusedLocals\", MessageId = \"keyValuePair\", Justification = \"TODO: THIS WILL BE REMOVED ONCE ITEM CONTAINER GENERATOR STUFF IS TAKEN CARE OF. TODO.\")]\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Hooked up in Xaml\")]\r\n        private void SetMouseEvents(object sender, RoutedEventArgs e)\r\n        {\r\n            foreach (KeyValuePair<string, string> keyValuePair in accordionAccordionItem.Items)\r\n            {\r\n                AccordionItem container = accordionAccordionItem.ItemContainerGenerator.ContainerFromItem(keyValuePair) as AccordionItem;\r\n                if (container != null)\r\n                {\r\n                    container.MouseEnter += (s, args) =>\r\n                    {\r\n                        if (!container.IsLocked)\r\n                        {\r\n                            container.IsSelected = true;\r\n                        }\r\n                    };\r\n\r\n                    container.MouseLeave += (s, args) =>\r\n                    {\r\n                        if (!container.IsLocked)\r\n                        {\r\n                            container.IsSelected = false;\r\n                        }\r\n                    };\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Samples/App.xaml",
    "content": "﻿<Application x:Class=\"System.Windows.Controls.Samples.App\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    StartupUri=\"MainWindow.xaml\">\r\n    <Application.Resources>\r\n        <!-- Label used by samples -->\r\n        <Style x:Key=\"Description\" TargetType=\"TextBlock\">\r\n            <Setter Property=\"FontSize\" Value=\"10\" />\r\n            <Setter Property=\"FontFamily\" Value=\"Verdana\" />\r\n            <Setter Property=\"HorizontalAlignment\" Value=\"Center\" />\r\n            <Setter Property=\"VerticalAlignment\" Value=\"Center\" />\r\n            <Setter Property=\"TextWrapping\" Value=\"Wrap\" />\r\n        </Style>\r\n\r\n        <!-- Informational paragraph text -->\r\n        <Style x:Key=\"Information\" TargetType=\"TextBlock\">\r\n            <Setter Property=\"FontSize\" Value=\"12\" />\r\n            <Setter Property=\"FontFamily\" Value=\"Verdana\" />\r\n            <Setter Property=\"HorizontalAlignment\" Value=\"Left\" />\r\n            <Setter Property=\"TextWrapping\" Value=\"Wrap\" />\r\n            <Setter Property=\"Padding\" Value=\"5\" />\r\n        </Style>\r\n\r\n        <!-- API Names -->\r\n        <Style x:Key=\"ApiName\" TargetType=\"TextBlock\">\r\n            <Setter Property=\"Margin\" Value=\"5 0 0 0\" />\r\n            <Setter Property=\"FontSize\" Value=\"10\" />\r\n            <Setter Property=\"FontFamily\" Value=\"Verdana\" />\r\n            <Setter Property=\"FontWeight\" Value=\"Bold\" />\r\n            <Setter Property=\"Foreground\" Value=\"#FF555555\" />\r\n            <Setter Property=\"HorizontalAlignment\" Value=\"Left\" />\r\n            <Setter Property=\"TextWrapping\" Value=\"Wrap\" />\r\n        </Style>\r\n\r\n        <!-- API Descriptions -->\r\n        <Style x:Key=\"ApiDescription\" TargetType=\"TextBlock\">\r\n            <Setter Property=\"Margin\" Value=\"5 0 0 5\" />\r\n            <Setter Property=\"FontSize\" Value=\"11\" />\r\n            <Setter Property=\"FontFamily\" Value=\"Verdana\" />\r\n            <Setter Property=\"HorizontalAlignment\" Value=\"Left\" />\r\n            <Setter Property=\"TextWrapping\" Value=\"Wrap\" />\r\n        </Style>\r\n        \r\n        <!-- Header used to seperate sections in the sample pages -->\r\n        <Style x:Key=\"Header\" TargetType=\"ContentControl\">\r\n            <Setter Property=\"Background\" Value=\"#22D2D2D2\" />\r\n            <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n            <Setter Property=\"Cursor\" Value=\"Arrow\" />\r\n            <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n            <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n            <Setter Property=\"FontSize\" Value=\"14\" />\r\n            <Setter Property=\"FontWeight\" Value=\"Bold\"/>\r\n            <Setter Property=\"FontStretch\" Value=\"UltraExpanded\" />\r\n            <Setter Property=\"Foreground\" Value=\"#FF313861\" />\r\n            <Setter Property=\"Margin\" Value=\"0 8 0 2\" />\r\n            <Setter Property=\"Padding\" Value=\"6 2 2 2\" />\r\n            <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"ContentControl\">\r\n                        <Border\r\n                      Background=\"{TemplateBinding Background}\"\r\n                      BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                      BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                      CornerRadius=\"2\">\r\n                            <ContentControl\r\n                          Content=\"{TemplateBinding Content}\"\r\n                          ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                          Cursor=\"{TemplateBinding Cursor}\"\r\n                          HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                          FontFamily=\"{TemplateBinding FontFamily}\"\r\n                          FontSize=\"{TemplateBinding FontSize}\"\r\n                          FontStretch=\"{TemplateBinding FontStretch}\"\r\n                          Foreground=\"{TemplateBinding Foreground}\"\r\n                          IsTabStop=\"{TemplateBinding IsTabStop}\"\r\n                          Margin=\"{TemplateBinding Padding}\"\r\n                          VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" />\r\n                        </Border>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n    </Application.Resources>\r\n</Application>\r\n"
  },
  {
    "path": "WpfToolkit/Samples/App.xaml.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Configuration;\r\nusing System.Data;\r\nusing System.Linq;\r\nusing System.Windows;\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    /// <summary>\r\n    /// Interaction logic for App.xaml\r\n    /// </summary>\r\n    public partial class App : Application\r\n    {\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Samples/AutoCompleteBox/AutoCompleteBoxSample.xaml",
    "content": "﻿<!--\r\n// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n-->\r\n\r\n<UserControl x:Class=\"System.Windows.Controls.Samples.AutoCompleteBoxSample\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" \r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:toolkit=\"clr-namespace:System.Windows.Controls;assembly=WPFToolkit\"\r\n    xmlns:system=\"clr-namespace:System;assembly=mscorlib\"\r\n    xmlns:samples=\"clr-namespace:System.Windows.Controls.Samples\"\r\n    xmlns:controls=\"clr-namespace:System.Windows.Controls;assembly=PresentationFramework\"\r\n    xmlns:input=\"clr-namespace:System.Windows.Controls;assembly=DotNetProjects.Input.Toolkit\">\r\n\r\n    <UserControl.Resources>\r\n        <samples:SampleEmployeeCollection x:Key=\"SampleEmployees\" />\r\n    </UserControl.Resources>\r\n\r\n    <StackPanel>\r\n\r\n        <ContentControl Content=\"AutoCompleteBox\" Style=\"{StaticResource Header}\" />\r\n        <TextBlock Style=\"{StaticResource Information}\">\r\n            AutoCompleteBox is a control that provides suggested items for a \r\n            TextBox. It can be bound to rich data objects, exposes a \r\n            SelectedItem property, and is highly customizable and extensible.\r\n            \r\n            <LineBreak /><LineBreak />\r\n            \r\n            The following sections cover key properties and settings that \r\n            customize the way that AutoCompleteBox behaves.\r\n            <LineBreak />\r\n        </TextBlock>\r\n\r\n        <controls:TabControl>\r\n            <controls:TabItem Header=\"IsTextCompletionEnabled\">\r\n                <StackPanel>\r\n                    <TextBlock Style=\"{StaticResource Information}\">\r\n                        IsTextCompletionEnabled will automatically select the \r\n                        best matching suggestion when one becomes available. The\r\n                        text will be automatically completed for you. \r\n                        IsTextCompletionEnabled is set to False by default.\r\n                    </TextBlock>\r\n\r\n                    <Grid>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"230\" />\r\n                            <ColumnDefinition Width=\"250\" />\r\n                            <ColumnDefinition />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition />\r\n                            <RowDefinition />\r\n                        </Grid.RowDefinitions>\r\n\r\n                        <TextBlock Padding=\"5\" Grid.Row=\"0\">Default:</TextBlock>\r\n                        <input:AutoCompleteBox \r\n                            IsTextCompletionEnabled=\"False\" \r\n                            Width=\"230\"\r\n                            Grid.Row=\"0\" Grid.Column=\"1\" Margin=\"0, 8, 0, 8\" HorizontalAlignment=\"Left\"\r\n                            ItemsSource=\"{StaticResource SampleEmployees}\"\r\n                            Tag=\"Value1\"\r\n                            SelectionChanged=\"OnSelectionChanged\"\r\n                        />\r\n                        <ContentPresenter Name=\"Value1\" Grid.Row=\"0\" Grid.Column=\"2\" />\r\n\r\n                        <TextBlock Padding=\"5\" Grid.Row=\"1\">IsTextCompletionEnabled:</TextBlock>\r\n                        <input:AutoCompleteBox \r\n                            IsTextCompletionEnabled=\"True\"\r\n                            Width=\"230\"\r\n                            Grid.Row=\"1\" Grid.Column=\"1\" Margin=\"0, 8, 0, 8\" HorizontalAlignment=\"Left\"\r\n                            ItemsSource=\"{StaticResource SampleEmployees}\"\r\n                            Tag=\"Value2\"\r\n                            SelectionChanged=\"OnSelectionChanged\"\r\n                        />\r\n                        <ContentPresenter Grid.Row=\"1\" Name=\"Value2\" Grid.Column=\"2\" />\r\n\r\n                    </Grid>\r\n                </StackPanel>\r\n            </controls:TabItem>\r\n            <controls:TabItem Header=\"FilterMode\">\r\n                <StackPanel>\r\n                    <TextBlock Style=\"{StaticResource Information}\">\r\n            FilterMode makes it easy to customize the search filter that is \r\n            used on the text. The default value is StartsWith: a case-insensitive \r\n            search filter that compares the start of strings.\r\n            \r\n            <LineBreak /><LineBreak />\r\n            \r\n            Other FilterMode values of interest are:<LineBreak />\r\n            • Contains: Search within the entire string for the search text<LineBreak />\r\n            • None: No filtering. Return everything in the ItemsSource collection.\r\n            \r\n            <LineBreak />\r\n                    </TextBlock>\r\n\r\n                    <Grid>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"230\" />\r\n                            <ColumnDefinition Width=\"250\" />\r\n                            <ColumnDefinition />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition />\r\n                            <RowDefinition />\r\n                            <RowDefinition />\r\n                        </Grid.RowDefinitions>\r\n\r\n                        <TextBlock Padding=\"5\">StartsWith (Default):</TextBlock>\r\n\r\n                        <input:AutoCompleteBox \r\n                            ItemsSource=\"{StaticResource SampleEmployees}\"\r\n                            Tag=\"Value3\"\r\n                            SelectionChanged=\"OnSelectionChanged\"\r\n                            Width=\"230\" \r\n                            Grid.Column=\"1\"\r\n                            Margin=\"0, 8, 0, 8\"\r\n                            HorizontalAlignment=\"Left\"\r\n                        />\r\n                        <ContentPresenter Name=\"Value3\" Grid.Column=\"2\" />\r\n\r\n                        <TextBlock Padding=\"5\" Grid.Row=\"1\">Contains:</TextBlock>\r\n                        <input:AutoCompleteBox \r\n                            FilterMode=\"Contains\" \r\n                            MinimumPrefixLength=\"1\" \r\n                            ItemsSource=\"{StaticResource SampleEmployees}\"\r\n                            Tag=\"Value4\"\r\n                            SelectionChanged=\"OnSelectionChanged\"\r\n                            Width=\"230\" \r\n                            Grid.Row=\"1\"\r\n                            Grid.Column=\"1\"\r\n                            Margin=\"0, 8, 0, 8\"\r\n                            HorizontalAlignment=\"Left\"\r\n                        />\r\n                        <ContentPresenter Name=\"Value4\" Grid.Row=\"1\" Grid.Column=\"2\" />\r\n\r\n                        <TextBlock Padding=\"5\" Grid.Row=\"2\">StartsWithCaseSensitive:</TextBlock>\r\n\r\n                        <input:AutoCompleteBox \r\n                            FilterMode=\"StartsWithCaseSensitive\"\r\n                            ItemsSource=\"{StaticResource SampleEmployees}\"\r\n                            Tag=\"Value5\"\r\n                            SelectionChanged=\"OnSelectionChanged\"\r\n                            Width=\"230\"\r\n                            Grid.Row=\"2\"\r\n                            Grid.Column=\"1\"\r\n                            Margin=\"0, 8, 0, 8\"\r\n                            HorizontalAlignment=\"Left\"\r\n                        />\r\n                        <ContentPresenter Name=\"Value5\" Grid.Row=\"2\" Grid.Column=\"2\" />\r\n\r\n                    </Grid>\r\n                </StackPanel>\r\n            </controls:TabItem>\r\n\r\n            <controls:TabItem Header=\"MinimumPopulateDelay\">\r\n                <StackPanel>\r\n                    <TextBlock Style=\"{StaticResource Information}\">\r\n            The MinimumPopulateDelay sets the minimum type that must elapse \r\n            after typing has started and the control waits to filter and find \r\n            suggestions. Setting this to a higher number than the default (0) \r\n            will reduce the load on suggestion web services, or complex data \r\n            filtering. MinimumPopulateDelay has been set to 200ms in this \r\n            example.\r\n            <LineBreak />\r\n                    </TextBlock>\r\n                    <Grid>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"230\" />\r\n                            <ColumnDefinition Width=\"250\" />\r\n                            <ColumnDefinition />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition />\r\n                            <RowDefinition />\r\n                        </Grid.RowDefinitions>\r\n                        <TextBlock Padding=\"5\">Month:</TextBlock>\r\n                        <input:AutoCompleteBox \r\n                            MinimumPopulateDelay=\"200\"\r\n                            Tag=\"Value6\"\r\n                            SelectionChanged=\"OnSelectionChanged\"\r\n                            Grid.Column=\"1\"\r\n                            HorizontalAlignment=\"Left\"\r\n                            Width=\"230\"\r\n                            x:Name=\"DynamicDelayAutoCompleteBox\"\r\n                            >\r\n                            <input:AutoCompleteBox.ItemsSource>\r\n                                <samples:ObjectCollection>\r\n                                    <system:String>January</system:String>\r\n                                    <system:String>February</system:String>\r\n                                    <system:String>March</system:String>\r\n                                    <system:String>April</system:String>\r\n                                    <system:String>May</system:String>\r\n                                    <system:String>June</system:String>\r\n                                    <system:String>July</system:String>\r\n                                    <system:String>August</system:String>\r\n                                    <system:String>September</system:String>\r\n                                    <system:String>October</system:String>\r\n                                    <system:String>November</system:String>\r\n                                    <system:String>December</system:String>\r\n                                </samples:ObjectCollection>\r\n                            </input:AutoCompleteBox.ItemsSource>\r\n                        </input:AutoCompleteBox>\r\n                        <ContentPresenter Name=\"Value6\" Grid.Column=\"2\" />\r\n                        \r\n                        <TextBlock Padding=\"5\" Grid.Row=\"1\">Minimum Delay:</TextBlock>\r\n                        <StackPanel Orientation=\"Horizontal\" Grid.Row=\"1\" Grid.Column=\"1\" Margin=\"8\">\r\n                            <TextBlock>0</TextBlock>\r\n                            <Slider x:Name=\"SetDelay\" Minimum=\"0\" Value=\"200\" SmallChange=\"50\" LargeChange=\"200\" Maximum=\"1000\" Width=\"200\" />\r\n                            <TextBlock>1 second</TextBlock>\r\n                        </StackPanel>\r\n                        <StackPanel Grid.Row=\"1\" Grid.Column=\"2\" Margin=\"8\" Orientation=\"Horizontal\">\r\n                            <TextBlock Text=\"Value:\" />\r\n                            <TextBlock Margin=\"4,0,0,0\" Text=\"{Binding ElementName=SetDelay,Path=Value}\" />\r\n                        </StackPanel>\r\n                    </Grid>\r\n                </StackPanel>\r\n            </controls:TabItem>\r\n\r\n            <controls:TabItem Header=\"MinimumPrefixLength\">\r\n                <StackPanel>\r\n                    <TextBlock Style=\"{StaticResource Information}\">\r\n            The MinimumPrefixLength sets the minimum number of characters that \r\n            must be typed before suggestions appear.\r\n            \r\n            <LineBreak /><LineBreak />\r\n            \r\n            The default value is 1. In this example, there is a collection of \r\n            thousands of words. To make more appropriate suggestions, the value \r\n            of MinimumPrefixLength has been set to 2. For example, search for \r\n            \"th\".\r\n            <LineBreak />\r\n                    </TextBlock>\r\n                    <Grid>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"230\" />\r\n                            <ColumnDefinition Width=\"250\" />\r\n                            <ColumnDefinition />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition />\r\n                            <RowDefinition />\r\n                        </Grid.RowDefinitions>\r\n                        <TextBlock Padding=\"5\">Word lookup:</TextBlock>\r\n                        <input:AutoCompleteBox\r\n                            x:Name=\"WordComplete\" \r\n                            MinimumPopulateDelay=\"200\"\r\n                            MinimumPrefixLength=\"2\"\r\n                            Tag=\"Value7\"\r\n                            SelectionChanged=\"OnSelectionChanged\"\r\n                            Width=\"230\" \r\n                            Grid.Column=\"1\"\r\n                            Margin=\"0, 8, 0, 8\"\r\n                            HorizontalAlignment=\"Left\" />\r\n                        <ContentPresenter Name=\"Value7\" Grid.Column=\"2\" />\r\n                        \r\n                        <TextBlock Padding=\"5\" Grid.Row=\"1\">Minimum Length:</TextBlock>\r\n                        <StackPanel Orientation=\"Horizontal\" Grid.Row=\"1\" Grid.Column=\"1\" Margin=\"8\">\r\n                            <TextBlock>-1</TextBlock>\r\n                            <Slider x:Name=\"SetPrefixLength\" Minimum=\"-1\" Value=\"2\" Maximum=\"8\" SmallChange=\"1\" LargeChange=\"2\" Width=\"200\" />\r\n                            <TextBlock>8</TextBlock>\r\n                        </StackPanel>\r\n                        <StackPanel Grid.Row=\"1\" Grid.Column=\"2\" Margin=\"8\" Orientation=\"Horizontal\">\r\n                            <TextBlock Text=\"Value:\" />\r\n                            <TextBlock Margin=\"4,0,0,0\" Text=\"{Binding ElementName=SetPrefixLength,Path=Value}\" />\r\n                        </StackPanel>\r\n                    </Grid>\r\n                </StackPanel>\r\n            </controls:TabItem>\r\n            <controls:TabItem Header=\"Placeholder\">\r\n                <StackPanel>\r\n                    <TextBlock Style=\"{StaticResource Information}\">\r\n                            The Placeholder can be used to show a placeholder value \r\n                            inside the text box when it is empty.\r\n                    </TextBlock>\r\n\r\n                    <Grid>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"230\" />\r\n                            <ColumnDefinition Width=\"250\" />\r\n                            <ColumnDefinition />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition />\r\n                            <RowDefinition />\r\n                        </Grid.RowDefinitions>\r\n                        <TextBlock Padding=\"5\" Grid.Row=\"0\">Name:</TextBlock>\r\n                        <input:AutoCompleteBox \r\n                            IsTextCompletionEnabled=\"False\" \r\n                            Width=\"230\" \r\n                            Grid.Row=\"0\" Grid.Column=\"1\" Margin=\"0, 8, 0, 8\" HorizontalAlignment=\"Left\"\r\n                            ItemsSource=\"{StaticResource SampleEmployees}\"\r\n                            ValueMemberBinding=\"{Binding LastName}\"\r\n                            Placeholder=\"Ex.: Smith\"\r\n                            Tag=\"Value10\"\r\n                            SelectionChanged=\"OnSelectionChanged\"\r\n                        />\r\n                        <ContentPresenter Name=\"Value10\" Grid.Row=\"0\" Grid.Column=\"2\" />\r\n\r\n                        <TextBlock Padding=\"5\" Grid.Row=\"1\">First name:</TextBlock>\r\n                        <input:AutoCompleteBox \r\n                            IsTextCompletionEnabled=\"False\" \r\n                            Width=\"230\" \r\n                            Grid.Row=\"1\" Grid.Column=\"1\" Margin=\"0, 8, 0, 8\" HorizontalAlignment=\"Left\"\r\n                            ItemsSource=\"{StaticResource SampleEmployees}\"\r\n                            ValueMemberBinding=\"{Binding FirstName}\"\r\n                            Placeholder=\"Ex.: John\"\r\n                            Tag=\"Value11\"\r\n                            SelectionChanged=\"OnSelectionChanged\"\r\n                        />\r\n                        <ContentPresenter Name=\"Value11\" Grid.Row=\"1\" Grid.Column=\"2\" />\r\n                    </Grid>\r\n                </StackPanel>\r\n            </controls:TabItem>\r\n\r\n            <controls:TabItem Header=\"ValueMemberBinding\">\r\n                <StackPanel>\r\n                    <TextBlock Style=\"{StaticResource Information}\">\r\n                        The ValueMemberBinding can be used to select the string \r\n                        value used inside the text box whenever an item is \r\n                        selected or searched for.\r\n                    </TextBlock>\r\n\r\n                    <Grid>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"230\" />\r\n                            <ColumnDefinition Width=\"250\" />\r\n                            <ColumnDefinition />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition />\r\n                            <RowDefinition />\r\n                        </Grid.RowDefinitions>\r\n\r\n                        <TextBlock Padding=\"5\" Grid.Row=\"0\">Name:</TextBlock>\r\n                        <input:AutoCompleteBox \r\n                            IsTextCompletionEnabled=\"False\" \r\n                            Width=\"230\" \r\n                            Grid.Row=\"0\" Grid.Column=\"1\" Margin=\"0, 8, 0, 8\" HorizontalAlignment=\"Left\"\r\n                            ItemsSource=\"{StaticResource SampleEmployees}\"\r\n                            ValueMemberBinding=\"{Binding DisplayName}\"\r\n                            Tag=\"Value8\"\r\n                            SelectionChanged=\"OnSelectionChanged\"\r\n                        />\r\n                        <ContentPresenter Name=\"Value8\" Grid.Row=\"0\" Grid.Column=\"2\" />\r\n                        \r\n                        <TextBlock Padding=\"5\" Grid.Row=\"1\">First name:</TextBlock>\r\n                        <input:AutoCompleteBox \r\n                            IsTextCompletionEnabled=\"False\" \r\n                            Width=\"230\" \r\n                            Grid.Row=\"1\" Grid.Column=\"1\" Margin=\"0, 8, 0, 8\" HorizontalAlignment=\"Left\"\r\n                            ItemsSource=\"{StaticResource SampleEmployees}\"\r\n                            ValueMemberBinding=\"{Binding FirstName}\"\r\n                            Tag=\"Value9\"\r\n                            SelectionChanged=\"OnSelectionChanged\"\r\n                        />\r\n                        <ContentPresenter Name=\"Value9\" Grid.Row=\"1\" Grid.Column=\"2\" />\r\n                    </Grid>\r\n                </StackPanel>\r\n            </controls:TabItem>\r\n        </controls:TabControl>\r\n    </StackPanel>\r\n</UserControl>\r\n"
  },
  {
    "path": "WpfToolkit/Samples/AutoCompleteBox/AutoCompleteBoxSample.xaml.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.ComponentModel;\r\n\r\n// Global suppressions for this sample\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1823:AvoidUnusedPrivateFields\", Scope = \"member\", Target = \"System.Windows.Controls.Samples.AutoCompleteBoxSample.#Value1\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1823:AvoidUnusedPrivateFields\", Scope = \"member\", Target = \"System.Windows.Controls.Samples.AutoCompleteBoxSample.#Value2\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1823:AvoidUnusedPrivateFields\", Scope = \"member\", Target = \"System.Windows.Controls.Samples.AutoCompleteBoxSample.#Value3\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1823:AvoidUnusedPrivateFields\", Scope = \"member\", Target = \"System.Windows.Controls.Samples.AutoCompleteBoxSample.#Value4\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1823:AvoidUnusedPrivateFields\", Scope = \"member\", Target = \"System.Windows.Controls.Samples.AutoCompleteBoxSample.#Value5\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1823:AvoidUnusedPrivateFields\", Scope = \"member\", Target = \"System.Windows.Controls.Samples.AutoCompleteBoxSample.#Value6\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1823:AvoidUnusedPrivateFields\", Scope = \"member\", Target = \"System.Windows.Controls.Samples.AutoCompleteBoxSample.#Value7\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1823:AvoidUnusedPrivateFields\", Scope = \"member\", Target = \"System.Windows.Controls.Samples.AutoCompleteBoxSample.#Value8\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1823:AvoidUnusedPrivateFields\", Scope = \"member\", Target = \"System.Windows.Controls.Samples.AutoCompleteBoxSample.#Value9\")]\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    /// <summary>\r\n    /// The AutoCompleteGettingStarted sample page shows several common uses \r\n    /// of the AutoCompleteBox control.\r\n    /// </summary>\r\n#if SILVERLIGHT\r\n    [Sample(\"(0)AutoCompleteBox\", DifficultyLevel.Basic)]\r\n#endif\r\n    [Category(\"AutoCompleteBox\")]\r\n    public partial class AutoCompleteBoxSample : UserControl\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the AutoCompleteGettingStarted class.\r\n        /// </summary>\r\n        public AutoCompleteBoxSample()\r\n        {\r\n            InitializeComponent();\r\n            Loaded += OnLoaded;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Hook up to the Loaded event.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void OnLoaded(object sender, System.Windows.RoutedEventArgs e)\r\n        {\r\n            // Words\r\n            WordComplete.ItemsSource = Words.GetAliceInWonderland();\r\n\r\n            // Sliders\r\n            SetDelay.ValueChanged += (s, args) => DynamicDelayAutoCompleteBox.MinimumPopulateDelay = (int)Math.Floor(SetDelay.Value);\r\n            SetPrefixLength.ValueChanged += (s, args) => WordComplete.MinimumPrefixLength = (int)Math.Floor(SetPrefixLength.Value);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when an AutoCompleteBox's selected value changes. Uses the \r\n        /// Tag property to identify the content presenter to be updated.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source AutoCompleteBox control.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Event is wired up in XAML.\")]\r\n        private void OnSelectionChanged(object sender, SelectionChangedEventArgs e)\r\n        {\r\n            AutoCompleteBox acb = (AutoCompleteBox)sender;\r\n\r\n            // In these sample scenarios, the Tag is the name of the content \r\n            // presenter to use to display the value.\r\n            string contentPresenterName = (string)acb.Tag;\r\n            ContentPresenter cp = FindName(contentPresenterName) as ContentPresenter;\r\n            if (cp != null)\r\n            {\r\n                cp.Content = acb.SelectedItem;\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Samples/AutoCompleteBox/AutoCompleteComboBox.xaml",
    "content": "﻿<!--\r\n// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n-->\r\n\r\n<!-- \r\n\r\n    Important sample note:\r\n    The purpose of this example is to demonstrate a ComboBox-like template and \r\n    set of properties for AutoCompleteBox that provides some level of \"editable \r\n    ComboBox\" support.\r\n\r\n    This is not intended to be a drop-in replacement for a WPF editable combo \r\n    box.\r\n\r\n    -->\r\n\r\n<UserControl x:Class=\"System.Windows.Controls.Samples.AutoCompleteComboBox\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" \r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" \r\n    xmlns:input=\"clr-namespace:System.Windows.Controls;assembly=DotNetProjects.Input.Toolkit\">\r\n    <StackPanel>\r\n        <StackPanel.Resources>\r\n\r\n            <!-- Custom toggle button template -->\r\n            <Style x:Key=\"ComboToggleButton\" TargetType=\"ToggleButton\">\r\n                <Setter Property=\"Foreground\" Value=\"#FF333333\"/>\r\n                <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n                <Setter Property=\"Background\" Value=\"#FF1F3B53\"/>\r\n                <Setter Property=\"Padding\" Value=\"0\"/>\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"ToggleButton\">\r\n                            <Grid>\r\n                                <Rectangle Fill=\"Transparent\" />\r\n                                <ContentPresenter\r\n                            x:Name=\"contentPresenter\"\r\n                            Content=\"{TemplateBinding Content}\"\r\n                            ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                            HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                            VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                            Margin=\"{TemplateBinding Padding}\"/>\r\n                            </Grid>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n\r\n            <!-- Custom control template used for the IntelliSense sample -->\r\n            <Style x:Key=\"AutoCompleteComboBoxStyle\" TargetType=\"input:AutoCompleteBox\">\r\n\r\n                <!-- ComboBox should not perform text completion by default -->\r\n                <Setter Property=\"IsTextCompletionEnabled\" Value=\"False\" />\r\n\r\n                <!-- The minimum prefix length should be 0 for combo box scenarios -->\r\n                <Setter Property=\"MinimumPrefixLength\" Value=\"0\" />\r\n\r\n                <!-- Regular template values -->\r\n                <Setter Property=\"Background\" Value=\"#FF1F3B53\"/>\r\n                <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n                <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n                <Setter Property=\"BorderBrush\">\r\n                    <Setter.Value>\r\n                        <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                            <GradientStop Color=\"#FFA3AEB9\" Offset=\"0\"/>\r\n                            <GradientStop Color=\"#FF8399A9\" Offset=\"0.375\"/>\r\n                            <GradientStop Color=\"#FF718597\" Offset=\"0.375\"/>\r\n                            <GradientStop Color=\"#FF617584\" Offset=\"1\"/>\r\n                        </LinearGradientBrush>\r\n                    </Setter.Value>\r\n                </Setter>\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"input:AutoCompleteBox\">\r\n                            <Grid Margin=\"{TemplateBinding Padding}\">\r\n                                <TextBox IsTabStop=\"True\" x:Name=\"Text\" Style=\"{TemplateBinding TextBoxStyle}\" Margin=\"0\" />\r\n                                <ToggleButton \r\n                                HorizontalAlignment=\"Right\"\r\n                                VerticalAlignment=\"Center\"\r\n                                Style=\"{StaticResource ComboToggleButton}\"\r\n                                Margin=\"0\"\r\n                                HorizontalContentAlignment=\"Center\" \r\n                                Background=\"{TemplateBinding Background}\" \r\n                                BorderThickness=\"0\" \r\n                                Height=\"16\" Width=\"16\"\r\n                                Click=\"DropDownToggle_Click\">\r\n                                    <ToggleButton.Content>\r\n                                        <Path x:Name=\"BtnArrow\" Height=\"4\" Width=\"8\" Stretch=\"Uniform\" Data=\"F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z \" \r\n                                          Margin=\"0,0,6,0\" HorizontalAlignment=\"Right\">\r\n                                            <Path.Fill>\r\n                                                <SolidColorBrush x:Name=\"BtnArrowColor\" Color=\"#FF333333\"/>\r\n                                            </Path.Fill>\r\n                                        </Path>\r\n                                    </ToggleButton.Content>\r\n                                </ToggleButton>\r\n                                <Popup x:Name=\"Popup\">\r\n                                    <Border x:Name=\"PopupBorder\" HorizontalAlignment=\"Stretch\" Opacity=\"1.0\" BorderThickness=\"0\" CornerRadius=\"3\">\r\n                                        <Border.RenderTransform>\r\n                                            <TranslateTransform X=\"2\" Y=\"2\" />\r\n                                        </Border.RenderTransform>\r\n                                        <Border.Background>\r\n                                            <SolidColorBrush Color=\"#11000000\" />\r\n                                        </Border.Background>\r\n                                        <Border HorizontalAlignment=\"Stretch\" BorderThickness=\"0\" CornerRadius=\"3\">\r\n                                            <Border.Background>\r\n                                                <SolidColorBrush Color=\"#11000000\" />\r\n                                            </Border.Background>\r\n                                            <Border.RenderTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform />\r\n                                                    <SkewTransform />\r\n                                                    <RotateTransform />\r\n                                                    <TranslateTransform X=\"-1\" Y=\"-1\" />\r\n                                                </TransformGroup>\r\n                                            </Border.RenderTransform>\r\n                                            <Border HorizontalAlignment=\"Stretch\" Opacity=\"1.0\" Padding=\"2\" BorderThickness=\"2\" BorderBrush=\"{TemplateBinding BorderBrush}\" CornerRadius=\"3\">\r\n                                                <Border.RenderTransform>\r\n                                                    <TransformGroup>\r\n                                                        <ScaleTransform />\r\n                                                        <SkewTransform />\r\n                                                        <RotateTransform />\r\n                                                        <TranslateTransform X=\"-2\" Y=\"-2\" />\r\n                                                    </TransformGroup>\r\n                                                </Border.RenderTransform>\r\n                                                <Border.Background>\r\n                                                    <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                                        <GradientStop Color=\"#FFDDDDDD\" Offset=\"0\"/>\r\n                                                        <GradientStop Color=\"#AADDDDDD\" Offset=\"1\"/>\r\n                                                    </LinearGradientBrush>\r\n                                                </Border.Background>\r\n                                                <ListBox x:Name=\"Selector\" ScrollViewer.HorizontalScrollBarVisibility=\"Auto\" ScrollViewer.VerticalScrollBarVisibility=\"Auto\" ItemTemplate=\"{TemplateBinding ItemTemplate}\" />\r\n                                            </Border>\r\n                                        </Border>\r\n                                    </Border>\r\n                                </Popup>\r\n                            </Grid>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n\r\n            <!-- DataTemplate for IntelliSense entries -->\r\n            <DataTemplate x:Key=\"IntelliSenseDataTemplate\">\r\n                <Grid>\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"16\" />\r\n                        <ColumnDefinition />\r\n                    </Grid.ColumnDefinitions>\r\n                    <ContentPresenter Content=\"{Binding Icon}\" />\r\n                    <TextBlock Foreground=\"{Binding ForegroundColor}\" Padding=\"6, 0, 0, 0\" Text=\"{Binding Name}\" Grid.Column=\"1\" />\r\n                </Grid>\r\n            </DataTemplate>\r\n\r\n            <!-- DataTemplate for controls -->\r\n            <DataTemplate x:Key=\"ControlDictionaryDataTemplate\">\r\n                <Grid>\r\n                    <TextBlock Text=\"{Binding Key}\" />\r\n                </Grid>\r\n            </DataTemplate>\r\n\r\n        </StackPanel.Resources>\r\n\r\n        <!-- IntelliSense-style AutoCompleteBox -->\r\n        <ContentControl Content=\"API Explorer\" Style=\"{StaticResource Header}\" />\r\n        \r\n\r\n        <TextBlock Style=\"{StaticResource Information}\">\r\n            This AutoCompleteBox control has been styled to look and \r\n            act much like the standard editable ComboBox control. It also \r\n            provides suggestions using the Contains FilterMode.\r\n        </TextBlock>\r\n\r\n        <Grid Margin=\"4\">\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"130\" />\r\n                <ColumnDefinition />\r\n            </Grid.ColumnDefinitions>\r\n            <TextBlock Width=\"130\" Margin=\"5\">Type:</TextBlock>\r\n            <input:AutoCompleteBox\r\n                x:Name=\"ControlPicker\"\r\n                Style=\"{StaticResource AutoCompleteComboBoxStyle}\"\r\n                ItemTemplate=\"{StaticResource ControlDictionaryDataTemplate}\"\r\n                Width=\"400\" \r\n                HorizontalAlignment=\"Left\"\r\n                MinimumPopulateDelay=\"0\"\r\n                MinimumPrefixLength=\"0\"\r\n                IsTextCompletionEnabled=\"True\"\r\n                FilterMode=\"Contains\"\r\n                Opacity=\"0.75\"\r\n                Grid.Column=\"1\"\r\n            />\r\n        </Grid>\r\n        \r\n        <Grid Margin=\"4\">\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"130\" />\r\n                <ColumnDefinition />\r\n            </Grid.ColumnDefinitions>\r\n            <TextBlock Width=\"130\" Margin=\"5\">API ComboBox:</TextBlock>\r\n            <input:AutoCompleteBox \r\n                x:Name=\"ControlApi\" \r\n                ItemTemplate=\"{StaticResource IntelliSenseDataTemplate}\"\r\n                Style=\"{StaticResource AutoCompleteComboBoxStyle}\"\r\n                Width=\"400\"\r\n                IsTextCompletionEnabled=\"False\"\r\n                MinimumPrefixLength=\"0\"\r\n                MinimumPopulateDelay=\"200\"\r\n                IsEnabled=\"False\"\r\n                HorizontalAlignment=\"Left\"\r\n                Grid.Column=\"1\"\r\n                Opacity=\"0.75\"\r\n                />\r\n        </Grid>\r\n\r\n        <Grid Margin=\"4\">\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"130\" />\r\n                <ColumnDefinition />\r\n            </Grid.ColumnDefinitions>\r\n            <TextBlock Width=\"130\" Margin=\"5\">Selected Item:</TextBlock>\r\n            <StackPanel Orientation=\"Horizontal\" Grid.Column=\"1\">\r\n                <ContentPresenter MaxHeight=\"16\" MaxWidth=\"16\" x:Name=\"IntelliSenseIcon\" Margin=\"5\" />\r\n                <TextBlock Margin=\"5\" FontSize=\"18\" x:Name=\"SelectedInformation\" />\r\n            </StackPanel>\r\n        </Grid>\r\n\r\n    </StackPanel>\r\n</UserControl>\r\n"
  },
  {
    "path": "WpfToolkit/Samples/AutoCompleteBox/AutoCompleteComboBox.xaml.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Globalization;\r\nusing System.Reflection;\r\nusing System.Windows.Controls.DataVisualization.Charting;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media;\r\n\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1823:AvoidUnusedPrivateFields\", Scope = \"member\", Target = \"System.Windows.Controls.Samples.AutoCompleteComboBox.#ComboToggleButton\", Justification = \"Artifact of using a name inside the custom control template.\")]\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    /// <summary>\r\n    /// The AutoCompleteComboBox sample page shows the use of custom data\r\n    /// objects, data templates, and a completely custom control template that \r\n    /// acts and looks much like a ComboBox with AutoCompleteBox capabilities.\r\n    /// </summary>\r\n#if SILVERLIGHT\r\n    [Sample(\"(3)Styling\", DifficultyLevel.Intermediate)]\r\n#endif\r\n    [Category(\"AutoCompleteBox\")]\r\n    public partial class AutoCompleteComboBox : UserControl\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the AutoCompleteComboBox class.\r\n        /// </summary>\r\n        public AutoCompleteComboBox()\r\n        {\r\n            InitializeComponent();\r\n            Loaded += OnLoaded;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handle the Loaded event of the page.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"rea\">The event arguments.</param>\r\n        private void OnLoaded(object sender, RoutedEventArgs rea)\r\n        {\r\n            ControlApi.ItemFilter = (prefix, item) =>\r\n            {\r\n                if (string.IsNullOrEmpty(prefix))\r\n                { \r\n                    return true; \r\n                }\r\n                MemberInfoData pme = item as MemberInfoData;\r\n                if (pme == null)\r\n                {\r\n                    return false; \r\n                }\r\n                return (pme.Name.ToUpper(CultureInfo.InvariantCulture).Contains(prefix.ToUpper(CultureInfo.InvariantCulture)));\r\n            };\r\n\r\n            // Reflect and load data\r\n            ControlApi.ItemsSource = MemberInfoData.GetSetForType(typeof(AutoCompleteBox));\r\n            ControlPicker.ItemsSource = InitializeTypeList();\r\n\r\n            // Set the changed handlers\r\n            ControlApi.SelectionChanged += OnApiChanged;\r\n            ControlPicker.SelectionChanged += OnPickerChanged;\r\n            \r\n            // Setup the dictionary converter\r\n            ControlPicker.ValueMemberBinding = new Binding\r\n            {\r\n                Converter = new DictionaryKeyValueConverter<string, Type>()\r\n            };\r\n        }\r\n\r\n        /// <summary>\r\n        /// Update the API system.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The selection changed event data.</param>\r\n        private void OnPickerChanged(object sender, SelectionChangedEventArgs e)\r\n        {\r\n            if (ControlPicker.SelectedItem == null)\r\n            {\r\n                ControlApi.ItemsSource = null;\r\n                ControlApi.Text = null;\r\n                IntelliSenseIcon.Content = null;\r\n                ControlApi.IsEnabled = false;\r\n            }\r\n            else\r\n            {\r\n                KeyValuePair<string, Type> pair = (KeyValuePair<string, Type>)ControlPicker.SelectedItem;\r\n                ControlApi.ItemsSource = MemberInfoData.GetSetForType(pair.Value);\r\n                ControlApi.IsEnabled = true;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Update the visible content.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The selection changed event data.</param>\r\n        private void OnApiChanged(object sender, SelectionChangedEventArgs e)\r\n        {\r\n            MemberInfoData mim = ControlApi.SelectedItem as MemberInfoData;\r\n            IntelliSenseIcon.Content = ControlApi.SelectedItem == null ? null : mim.Icon;\r\n            SelectedInformation.Text = mim == null ? string.Empty : mim.MemberInfo.Name;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes the type list.\r\n        /// </summary>\r\n        /// <returns>Returns a dictionary of string to Type values.</returns>\r\n        private static Dictionary<string, Type> InitializeTypeList()\r\n        {\r\n            Dictionary<string, Type> typeList = new Dictionary<string, Type>();\r\n            Assembly[] assemblies = \r\n            { \r\n                typeof(Button).Assembly,\r\n                typeof(TreeView).Assembly,\r\n                typeof(AutoCompleteBox).Assembly,\r\n                typeof(Chart).Assembly,\r\n            };\r\n            foreach (Assembly assembly in assemblies)\r\n            {\r\n                foreach (Type type in assembly.GetExportedTypes())\r\n                {\r\n                    if (type.IsSubclassOf(typeof(Control))&& !typeList.ContainsKey(type.FullName))\r\n                    {\r\n                        typeList.Add(type.FullName, type);\r\n                    }\r\n                }\r\n            }\r\n            return typeList;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Toggle the drop down for the control, part of the custom template.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event arguments.</param>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Wired up in markup.\")]\r\n        private void DropDownToggle_Click(object sender, RoutedEventArgs e)\r\n        {\r\n            FrameworkElement fe = sender as FrameworkElement;\r\n            AutoCompleteBox acb = null;\r\n            while (fe != null && acb == null)\r\n            {\r\n                fe = VisualTreeHelper.GetParent(fe) as FrameworkElement;\r\n                acb = fe as AutoCompleteBox;\r\n            }\r\n            if (acb != null)\r\n            {\r\n                if (string.IsNullOrEmpty(acb.SearchText))\r\n                {\r\n                    acb.Text = string.Empty;\r\n                }\r\n                acb.IsDropDownOpen = !acb.IsDropDownOpen;\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Samples/AutoCompleteBox/AutoCompleteLambda.xaml",
    "content": "﻿<!--\r\n// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n-->\r\n\r\n<UserControl x:Class=\"System.Windows.Controls.Samples.AutoCompleteLambda\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" \r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" \r\n    xmlns:input=\"clr-namespace:System.Windows.Controls;assembly=DotNetProjects.Input.Toolkit\">\r\n    <StackPanel>\r\n        <StackPanel.Resources>\r\n\r\n            <!-- DataTemplate for airports -->\r\n            <DataTemplate x:Key=\"AirportDataTemplate\">\r\n                <Grid Width=\"370\">\r\n                    <Grid.Background>\r\n                        <SolidColorBrush Color=\"#aa000000\" />\r\n                    </Grid.Background>\r\n                    <TextBlock Foreground=\"#22ffffff\" Margin=\"4,0,2,0\" FontSize=\"34\" Text=\"{Binding CodeFaa}\" />\r\n                    <StackPanel HorizontalAlignment=\"Right\" Margin=\"0, 0, 8, 0\">\r\n                        <TextBlock HorizontalAlignment=\"Right\" Foreground=\"White\" \r\n                               Text=\"{Binding LimitedName}\" Padding=\"2\" />\r\n                        <TextBlock HorizontalAlignment=\"Right\" Foreground=\"White\" \r\n                               FontSize=\"14\" Text=\"{Binding City}\" Padding=\"2\" />\r\n                        <TextBlock HorizontalAlignment=\"Right\" Foreground=\"White\" \r\n                               FontSize=\"14\" Text=\"{Binding State}\" Padding=\"2\" />\r\n                    </StackPanel>\r\n                </Grid>\r\n            </DataTemplate>\r\n        </StackPanel.Resources>\r\n\r\n        <!-- Custom lambda and template -->\r\n        <ContentControl Content=\"ItemFilter with a lambda &amp; a custom DataTemplate\" Style=\"{StaticResource Header}\" />\r\n        \r\n        <StackPanel>\r\n            <TextBlock Style=\"{StaticResource Information}\">\r\n                Search for and select your airports. Once you have made your \r\n                selections, click to search for tickets using Bing Travel.\r\n            </TextBlock>\r\n            \r\n            <Grid Margin=\"0, 16, 0, 16\">\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"180\" />\r\n                    <ColumnDefinition Width=\"*\" />\r\n                </Grid.ColumnDefinitions>\r\n                \r\n                <TextBlock Padding=\"5\">Departure:</TextBlock>\r\n                \r\n                <StackPanel Grid.Column=\"1\">\r\n                    <input:AutoCompleteBox \r\n                        x:Name=\"DepartureAirport\" \r\n                        MinimumPrefixLength=\"1\" \r\n                        FilterMode=\"Custom\" \r\n                        Width=\"400\" \r\n                        IsTextCompletionEnabled=\"False\"\r\n                        HorizontalAlignment=\"Left\" \r\n                        ItemTemplate=\"{StaticResource AirportDataTemplate}\" \r\n                        />\r\n                    <DatePicker \r\n                        x:Name=\"DepartureDate\" \r\n                        HorizontalAlignment=\"Left\"\r\n                        Width=\"125\" />\r\n                </StackPanel>\r\n            </Grid>\r\n\r\n            <Grid Margin=\"0, 16, 0, 16\">\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"180\" />\r\n                    <ColumnDefinition Width=\"*\" />\r\n                </Grid.ColumnDefinitions>\r\n\r\n                <TextBlock Padding=\"5\">Arrival:</TextBlock>\r\n\r\n                <StackPanel Grid.Column=\"1\">\r\n                    <input:AutoCompleteBox \r\n                        x:Name=\"ArrivalAirport\" \r\n                        MinimumPrefixLength=\"1\" \r\n                        FilterMode=\"Custom\" \r\n                        IsTextCompletionEnabled=\"False\"\r\n                        Width=\"400\" \r\n                        HorizontalAlignment=\"Left\" \r\n                        ItemTemplate=\"{StaticResource AirportDataTemplate}\" \r\n                        />\r\n                    <DatePicker \r\n                        x:Name=\"ArrivalDate\" \r\n                        HorizontalAlignment=\"Left\"\r\n                        Width=\"125\" />\r\n                </StackPanel>\r\n            </Grid>\r\n\r\n            <Grid Margin=\"0, 16, 0, 16\">\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"180\" />\r\n                    <ColumnDefinition Width=\"*\" />\r\n                </Grid.ColumnDefinitions>\r\n\r\n                <StackPanel Orientation=\"Horizontal\">\r\n                    <TextBlock Padding=\"5\">Passengers:</TextBlock>\r\n                    <TextBlock Padding=\"5\" Margin=\"5,0,0,0\" Text=\"{Binding ElementName=Passengers,Path=Value}\" />\r\n                </StackPanel>\r\n                \r\n\r\n                <Slider\r\n                    Minimum=\"1\"\r\n                    Maximum=\"5\"\r\n                    SmallChange=\"1\"\r\n                    TickPlacement=\"BottomRight\"\r\n                    Width=\"100\"\r\n                    HorizontalAlignment=\"Left\"\r\n                    Value=\"1\"\r\n                    x:Name=\"Passengers\"\r\n                    Grid.Column=\"1\" />\r\n            </Grid>\r\n\r\n            <Grid Margin=\"0, 16, 0, 16\">\r\n                <Grid.ColumnDefinitions>\r\n                    <ColumnDefinition Width=\"180\" />\r\n                    <ColumnDefinition Width=\"*\" />\r\n                </Grid.ColumnDefinitions>\r\n\r\n                <TextBlock Padding=\"5\">Book flight:</TextBlock>\r\n\r\n                <Button x:Name=\"BookFlight\" \r\n                        IsEnabled=\"False\"\r\n                        Grid.Column=\"1\"\r\n                        Padding=\"6\"\r\n                        HorizontalContentAlignment=\"Left\"\r\n                        HorizontalAlignment=\"Left\"\r\n                        Content=\"Search Bing Travel...\"\r\n                        />\r\n            </Grid>\r\n\r\n            <ContentControl Content=\"Customizing the filter algorithm\" Style=\"{StaticResource Header}\" />\r\n            <TextBlock Style=\"{StaticResource Information}\">\r\n            The above sample uses a custom ItemFilter lambda to match several \r\n            airport properties against the search string, allowing a user to type an \r\n            airport code, city name, or airport name into the field.\r\n\r\n            <LineBreak /><LineBreak />\r\n\r\n            Each filter method takes two parameters: the search string (the \r\n            value of the text box), a second item parameter, and then returns \r\n            either true or false. A true return value means that the item \r\n            should appear in the list of suggestions offered by the \r\n            AutoCompleteBox control.\r\n\r\n            <LineBreak /><LineBreak />\r\n\r\n            As a developer, you can take the search string and tokenize it, \r\n            parse it for an expression or words, or find a new creative way \r\n            of searching through your data and surfacing it through the control.\r\n            </TextBlock>\r\n\r\n\r\n        </StackPanel>\r\n      \r\n    </StackPanel>\r\n</UserControl>\r\n"
  },
  {
    "path": "WpfToolkit/Samples/AutoCompleteBox/AutoCompleteLambda.xaml.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\n#if SILVERLIGHT\r\nusing System.Windows.Browser;\r\n#else\r\nusing System.Web;\r\n#endif\r\nusing System.Windows.Controls;\r\nusing System.ComponentModel;\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    /// <summary>\r\n    /// The AutoCompleteLambda sample page demonstrates using a custom data \r\n    /// template, binding to elements in a rich CLR type, and using a lambda \r\n    /// expression to provide custom search filtering capabilities to the \r\n    /// AutoCompleteBox control.\r\n    /// </summary>\r\n#if SILVERLIGHT\r\n    [Sample(\"(1)ItemFilter lambda\", DifficultyLevel.Basic)]\r\n#endif\r\n    [Category(\"AutoCompleteBox\")]\r\n    public partial class AutoCompleteLambda : UserControl\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the AutoCompleteLambda class.\r\n        /// </summary>\r\n        public AutoCompleteLambda()\r\n        {\r\n            InitializeComponent();\r\n            Loaded += new RoutedEventHandler(Airports_Loaded);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handle the Loaded event of the page.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event arguments.</param>\r\n        private void Airports_Loaded(object sender, RoutedEventArgs e)\r\n        {\r\n            // Provide airport data and a custom filter\r\n            ObjectCollection airports = Airport.SampleAirports;\r\n            DepartureAirport.ItemsSource = airports;\r\n            ArrivalAirport.ItemsSource = airports;\r\n            DepartureAirport.ItemFilter = (search, item) =>\r\n            {\r\n                Airport airport = item as Airport;\r\n                if (airport != null)\r\n                {\r\n                    // Interested in: Name, City, FAA code\r\n                    string filter = search.ToUpper(CultureInfo.InvariantCulture);\r\n                    return (airport.CodeFaa.ToUpper(CultureInfo.InvariantCulture).Contains(filter)\r\n                        || airport.City.ToUpper(CultureInfo.InvariantCulture).Contains(filter)\r\n                        || airport.Name.ToUpper(CultureInfo.InvariantCulture).Contains(filter));\r\n                }\r\n\r\n                return false;\r\n            };\r\n            ArrivalAirport.ItemFilter = DepartureAirport.ItemFilter;\r\n\r\n            // Look for changes\r\n            DepartureAirport.SelectionChanged += SelectedItemsChanged;\r\n            ArrivalAirport.SelectionChanged += SelectedItemsChanged;\r\n            DepartureDate.SelectedDateChanged += SelectedItemsChanged;\r\n            ArrivalDate.SelectedDateChanged += SelectedItemsChanged;\r\n\r\n            // Set the date defaults in code\r\n            DepartureDate.SelectedDate = DateTime.UtcNow + TimeSpan.FromDays(7);\r\n            ArrivalDate.SelectedDate = DateTime.UtcNow + TimeSpan.FromDays(14);\r\n\r\n            // Navigate to Bing Travel\r\n            BookFlight.Click += BookFlight_Click;\r\n        }\r\n\r\n        /// <summary>\r\n        /// The button to book the flight has been clicked.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void BookFlight_Click(object sender, RoutedEventArgs e)\r\n        {\r\n            Airport d = (Airport)DepartureAirport.SelectedItem;\r\n            Airport a = (Airport)ArrivalAirport.SelectedItem;\r\n            DateTime dd = (DateTime)DepartureDate.SelectedDate;\r\n            DateTime ad = (DateTime)ArrivalDate.SelectedDate;\r\n            int p = (int)Passengers.Value;\r\n\r\n            Uri travel = WebServiceHelper.CreateAirfareSearchUri(d, a, dd, ad, p);\r\n#if SILVERLIGHT\r\n            HtmlPage.Window.Navigate(travel, \"_new\");\r\n#else\r\n            System.Diagnostics.Process.Start(travel.ToString());\r\n#endif\r\n        }\r\n\r\n        /// <summary>\r\n        /// Update the form when valid values are present in the controls.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void SelectedItemsChanged(object sender, SelectionChangedEventArgs e)\r\n        {\r\n            BookFlight.IsEnabled = DepartureAirport.SelectedItem != null\r\n                && ArrivalAirport.SelectedItem != null\r\n                && DepartureDate.SelectedDate != null\r\n                && ArrivalDate.SelectedDate != null\r\n                && Passengers.Value > 0;\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Samples/AutoCompleteBox/CustomEvents.xaml",
    "content": "﻿<!--\r\n// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n-->\r\n\r\n<UserControl x:Class=\"System.Windows.Controls.Samples.CustomEvents\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" \r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" \r\n    xmlns:input=\"clr-namespace:System.Windows.Controls;assembly=DotNetProjects.Input.Toolkit\">\r\n    <StackPanel>\r\n\r\n        <ContentControl Content=\"Populating and Populated events\" Style=\"{StaticResource Header}\" />\r\n        <StackPanel>\r\n            <TextBlock Style=\"{StaticResource Information}\">\r\n                The AutoCompleteBox control is able to work with unbound data as \r\n                well. By subscribing to the Populating event of an \r\n                AutoCompleteBox control, as a developer you can cancel the \r\n                population, change ItemsSource data, or otherwise react to the \r\n                input before the control provides suggestions.\r\n            </TextBlock>\r\n        </StackPanel>\r\n\r\n        <ContentControl Content=\"Text completion off\" Style=\"{StaticResource Header}\" />\r\n        <Grid>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"230\" />\r\n                <ColumnDefinition Width=\"*\"/>\r\n                <ColumnDefinition />\r\n            </Grid.ColumnDefinitions>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition />\r\n                <RowDefinition />\r\n            </Grid.RowDefinitions>\r\n            <TextBlock Padding=\"5\">Immediate population:</TextBlock>\r\n\r\n            <input:AutoCompleteBox \r\n                x:Name=\"NowAutoComplete\" \r\n                FilterMode=\"None\"\r\n                IsTextCompletionEnabled=\"False\"\r\n                Grid.Column=\"1\" \r\n                Margin=\"0, 0, 0, 12\"\r\n                Tag=\"Value1\"\r\n                SelectionChanged=\"OnSelectionChanged\"\r\n                />\r\n            <ContentPresenter x:Name=\"Value1\" Grid.Column=\"2\" />\r\n\r\n            <TextBlock Padding=\"5\" Grid.Row=\"1\">Delayed population:</TextBlock>\r\n\r\n            <input:AutoCompleteBox \r\n                x:Name=\"LaterAutoComplete\" \r\n                FilterMode=\"None\"\r\n                IsTextCompletionEnabled=\"False\"\r\n                Grid.Row=\"1\" \r\n                Grid.Column=\"1\" \r\n                Tag=\"Value2\"\r\n                SelectionChanged=\"OnSelectionChanged\"\r\n            />\r\n            <ContentPresenter x:Name=\"Value2\" Grid.Row=\"1\" Grid.Column=\"2\" />\r\n\r\n        </Grid>\r\n\r\n        <ContentControl Content=\"Text completion on\" Style=\"{StaticResource Header}\" />\r\n        <Grid>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"230\" />\r\n                <ColumnDefinition />\r\n                <ColumnDefinition />\r\n            </Grid.ColumnDefinitions>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition />\r\n                <RowDefinition />\r\n            </Grid.RowDefinitions>\r\n            <TextBlock Padding=\"5\">Immediate population:</TextBlock>\r\n\r\n            <input:AutoCompleteBox \r\n                x:Name=\"NowAutoComplete2\" \r\n                FilterMode=\"None\"\r\n                IsTextCompletionEnabled=\"True\"\r\n                Grid.Column=\"1\" \r\n                Margin=\"0, 0, 0, 12\"\r\n                Tag=\"Value3\"\r\n                SelectionChanged=\"OnSelectionChanged\"\r\n                />\r\n            <ContentPresenter x:Name=\"Value3\" Grid.Column=\"2\"/>\r\n\r\n            <TextBlock Padding=\"5\" Grid.Row=\"1\">Delayed population:</TextBlock>\r\n\r\n            <input:AutoCompleteBox\r\n                x:Name=\"LaterAutoComplete2\"\r\n                FilterMode=\"None\"\r\n                IsTextCompletionEnabled=\"True\"\r\n                Grid.Row=\"1\"\r\n                Grid.Column=\"1\"\r\n                Tag=\"Value4\"\r\n                SelectionChanged=\"OnSelectionChanged\"\r\n                />\r\n            <ContentPresenter x:Name=\"Value4\"  Grid.Row=\"1\" Grid.Column=\"2\"/>\r\n            \r\n        </Grid>\r\n    </StackPanel>\r\n</UserControl>\r\n"
  },
  {
    "path": "WpfToolkit/Samples/AutoCompleteBox/CustomEvents.xaml.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.ComponentModel;\r\n\r\n// Global suppressions for this sample\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1823:AvoidUnusedPrivateFields\", Scope = \"member\", Target = \"System.Windows.Controls.Samples.CustomEvents.#Value1\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1823:AvoidUnusedPrivateFields\", Scope = \"member\", Target = \"System.Windows.Controls.Samples.CustomEvents.#Value2\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1823:AvoidUnusedPrivateFields\", Scope = \"member\", Target = \"System.Windows.Controls.Samples.CustomEvents.#Value3\")]\r\n[assembly: SuppressMessage(\"Microsoft.Performance\", \"CA1823:AvoidUnusedPrivateFields\", Scope = \"member\", Target = \"System.Windows.Controls.Samples.CustomEvents.#Value4\")]\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    /// <summary>\r\n    /// The PopulationEvents class shows how a developer might hook into the \r\n    /// population events to provide custom data.\r\n    /// </summary>\r\n#if SILVERLIGHT\r\n    [Sample(\"(2)Custom Events\", DifficultyLevel.Basic)]\r\n#endif\r\n    [Category(\"AutoCompleteBox\")]\r\n    public partial class CustomEvents : UserControl\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the type.\r\n        /// </summary>\r\n        public CustomEvents()\r\n        {\r\n            InitializeComponent();\r\n            Loaded += OnLoaded;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handle the Loaded event of the page.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event arguments.</param>\r\n        private void OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            NowAutoComplete.Populating += OnPopulatingSynchronous;\r\n            NowAutoComplete2.Populating += OnPopulatingSynchronous;\r\n            LaterAutoComplete.Populating += OnPopulatingAsynchronous;\r\n            LaterAutoComplete2.Populating += OnPopulatingAsynchronous;\r\n        }\r\n\r\n        /// <summary>\r\n        /// The Populating event handler.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void OnPopulatingSynchronous(object sender, PopulatingEventArgs e)\r\n        {\r\n            AutoCompleteBox source = (AutoCompleteBox)sender;\r\n\r\n            source.ItemsSource = new string[]\r\n            {\r\n                e.Parameter + \"1\",\r\n                e.Parameter + \"2\",\r\n                e.Parameter + \"3\",\r\n            };\r\n        }\r\n\r\n        /// <summary>\r\n        /// The populating handler.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void OnPopulatingAsynchronous(object sender, PopulatingEventArgs e)\r\n        {\r\n            AutoCompleteBox source = (AutoCompleteBox)sender;\r\n\r\n            // Cancel the populating value: this will allow us to call \r\n            // PopulateComplete as necessary.\r\n            e.Cancel = true;\r\n            \r\n            // Use the dispatcher to simulate an asynchronous callback when \r\n            // data becomes available\r\n            Dispatcher.BeginInvoke(\r\n                new Action(delegate()\r\n                {\r\n                    source.ItemsSource = new string[]\r\n                    {\r\n                        e.Parameter + \"1\",\r\n                        e.Parameter + \"2\",\r\n                        e.Parameter + \"3\",\r\n                    };\r\n\r\n                    // Population is complete\r\n                    source.PopulateComplete();\r\n                }));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Called when an AutoCompleteBox's selected value changes. Uses the \r\n        /// Tag property to identify the content presenter to be updated.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source AutoCompleteBox control.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Event handler is wired up in XAML.\")]\r\n        private void OnSelectionChanged(object sender, SelectionChangedEventArgs e)\r\n        {\r\n            AutoCompleteBox acb = (AutoCompleteBox)sender;\r\n\r\n            // In these sample scenarios, the Tag is the name of the content \r\n            // presenter to use to display the value.\r\n            string contentPresenterName = (string)acb.Tag;\r\n            ContentPresenter cp = FindName(contentPresenterName) as ContentPresenter;\r\n            if (cp != null)\r\n            {\r\n                cp.Content = acb.SelectedItem;\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Samples/AutoCompleteBox/DataGridAutoCompleteBox.xaml",
    "content": "﻿<!--\r\n// (c) Copyright Microsoft Corporation.\r\n// This source is subject to [###LICENSE_NAME###].\r\n// Please see [###LICENSE_LINK###] for details.\r\n// All other rights reserved.\r\n-->\r\n\r\n<UserControl x:Class=\"System.Windows.Controls.Samples.DataGridAutoCompleteBox\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" \r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" \r\n    xmlns:samples=\"clr-namespace:System.Windows.Controls.Samples;assembly=System.Windows.Controls.Samples\"\r\n    xmlns:data=\"clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data\"\r\n    xmlns:input=\"clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input\">\r\n    <StackPanel>\r\n        <StackPanel.Resources>\r\n            <Style x:Key=\"DataGridAutoCompleteTemplate\" TargetType=\"input:AutoCompleteBox\">\r\n                <Setter Property=\"Background\" Value=\"#FF1F3B53\"/>\r\n                <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n                <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n                <Setter Property=\"BorderBrush\">\r\n                    <Setter.Value>\r\n                        <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                            <GradientStop Color=\"#FFA3AEB9\" Offset=\"0\"/>\r\n                            <GradientStop Color=\"#FF8399A9\" Offset=\"0.375\"/>\r\n                            <GradientStop Color=\"#FF718597\" Offset=\"0.375\"/>\r\n                            <GradientStop Color=\"#FF617584\" Offset=\"1\"/>\r\n                        </LinearGradientBrush>\r\n                    </Setter.Value>\r\n                </Setter>\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"input:AutoCompleteBox\">\r\n                            <Grid Margin=\"{TemplateBinding Padding}\">\r\n                                <VisualStateManager.VisualStateGroups>\r\n                                    <VisualStateGroup x:Name=\"PopupStates\">\r\n                                        <VisualStateGroup.Transitions>\r\n                                            <VisualTransition GeneratedDuration=\"0:0:0.2\" To=\"PopupOpened\" />\r\n                                            <VisualTransition GeneratedDuration=\"0:0:0.5\" To=\"PopupClosed\" />\r\n                                        </VisualStateGroup.Transitions>\r\n                                        <VisualState x:Name=\"PopupOpened\">\r\n                                            <Storyboard>\r\n                                                <DoubleAnimation Storyboard.TargetName=\"PopupBorder\" Storyboard.TargetProperty=\"Opacity\" To=\"1.0\" />\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                        <VisualState x:Name=\"PopupClosed\">\r\n                                            <Storyboard>\r\n                                                <DoubleAnimation Storyboard.TargetName=\"PopupBorder\" Storyboard.TargetProperty=\"Opacity\" To=\"0.0\" />\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                    </VisualStateGroup>\r\n                                </VisualStateManager.VisualStateGroups>\r\n                                <TextBox IsTabStop=\"True\" x:Name=\"Text\" Style=\"{TemplateBinding TextBoxStyle}\" Margin=\"0\" />\r\n                                <Popup x:Name=\"Popup\">\r\n                                    <Border x:Name=\"PopupBorder\" HorizontalAlignment=\"Stretch\" Opacity=\"0.0\" BorderThickness=\"0\" CornerRadius=\"3\">\r\n                                        <Border.RenderTransform>\r\n                                            <TranslateTransform X=\"2\" Y=\"2\" />\r\n                                        </Border.RenderTransform>\r\n                                        <Border.Background>\r\n                                            <SolidColorBrush Color=\"#11000000\" />\r\n                                        </Border.Background>\r\n                                        <Border HorizontalAlignment=\"Stretch\" BorderThickness=\"0\" CornerRadius=\"3\">\r\n                                            <Border.Background>\r\n                                                <SolidColorBrush Color=\"#11000000\" />\r\n                                            </Border.Background>\r\n                                            <Border.RenderTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform />\r\n                                                    <SkewTransform />\r\n                                                    <RotateTransform />\r\n                                                    <TranslateTransform X=\"-1\" Y=\"-1\" />\r\n                                                </TransformGroup>\r\n                                            </Border.RenderTransform>\r\n                                            <Border HorizontalAlignment=\"Stretch\" Opacity=\"1.0\" Padding=\"1\" BorderThickness=\"1\" BorderBrush=\"{TemplateBinding BorderBrush}\" CornerRadius=\"3\">\r\n                                                <Border.RenderTransform>\r\n                                                    <TransformGroup>\r\n                                                        <ScaleTransform />\r\n                                                        <SkewTransform />\r\n                                                        <RotateTransform />\r\n                                                        <TranslateTransform X=\"-2\" Y=\"-2\" />\r\n                                                    </TransformGroup>\r\n                                                </Border.RenderTransform>\r\n                                                <Border.Background>\r\n                                                    <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                                        <GradientStop Color=\"#FFDDDDDD\" Offset=\"0\"/>\r\n                                                        <GradientStop Color=\"#AADDDDDD\" Offset=\"1\"/>\r\n                                                    </LinearGradientBrush>\r\n                                                </Border.Background>\r\n                                                <samples:DataGridSelectionAdapter \r\n                                                x:Name=\"SelectionAdapter\" \r\n                                                AutoGenerateColumns=\"False\"\r\n                                                IsReadOnly=\"True\">\r\n                                                    <samples:DataGridSelectionAdapter.Columns>\r\n                                                        <data:DataGridTextColumn Header=\"\" FontWeight=\"Bold\" Foreground=\"#CC000000\" Binding=\"{Binding CodeFaa}\" />\r\n                                                        <data:DataGridTextColumn Header=\"Airport\" Binding=\"{Binding LimitedName}\" />\r\n                                                        <data:DataGridTextColumn Header=\"City\" Binding=\"{Binding City}\" />\r\n                                                        <data:DataGridTextColumn Header=\"State\" Binding=\"{Binding State}\" />\r\n                                                    </samples:DataGridSelectionAdapter.Columns>\r\n                                                </samples:DataGridSelectionAdapter>\r\n                                            </Border>\r\n                                        </Border>\r\n                                    </Border>\r\n                                </Popup>\r\n                            </Grid>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n        </StackPanel.Resources>\r\n            <ContentControl Content=\"AutoCompleteBox with a DataGrid DropDown\" Style=\"{StaticResource Header}\" />\r\n\r\n        <StackPanel>\r\n            \r\n            <TextBlock Style=\"{StaticResource Information}\" UseLayoutRounding=\"False\">\r\n                This sample uses a custom ISelectionAdapter that derives from the \r\n                Silverlight DataGrid.\r\n            </TextBlock>\r\n            \r\n            <input:AutoCompleteBox\r\n                x:Name=\"MyAutoCompleteBox\"\r\n                Style=\"{StaticResource DataGridAutoCompleteTemplate}\" \r\n                />\r\n        </StackPanel>\r\n        \r\n        <src:SourceViewer xmlns:src=\"clr-namespace:System.Windows.Controls.Samples;assembly=System.Windows.Controls.Samples.Common\" xmlns:sys=\"clr-namespace:System;assembly=mscorlib\">\r\n  <src:SourceFile Path=\"DataGridAutoCompleteBox.xaml\">\r\n    <src:SourceFile.Source>\r\n      <sys:String>&lt;!--\r\n// (c) Copyright Microsoft Corporation.\r\n// This source is subject to [###LICENSE_NAME###].\r\n// Please see [###LICENSE_LINK###] for details.\r\n// All other rights reserved.\r\n--&gt;\r\n\r\n&lt;UserControl x:Class=\"System.Windows.Controls.Samples.DataGridAutoCompleteBox\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" \r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" \r\n    xmlns:samples=\"clr-namespace:System.Windows.Controls.Samples;assembly=System.Windows.Controls.Samples\"\r\n    xmlns:data=\"clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data\"\r\n    xmlns:input=\"clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input\"&gt;\r\n    &lt;StackPanel&gt;\r\n        &lt;StackPanel.Resources&gt;\r\n            &lt;Style x:Key=\"DataGridAutoCompleteTemplate\" TargetType=\"input:AutoCompleteBox\"&gt;\r\n                &lt;Setter Property=\"Background\" Value=\"#FF1F3B53\"/&gt;\r\n                &lt;Setter Property=\"IsTabStop\" Value=\"False\" /&gt;\r\n                &lt;Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/&gt;\r\n                &lt;Setter Property=\"BorderBrush\"&gt;\r\n                    &lt;Setter.Value&gt;\r\n                        &lt;LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\"&gt;\r\n                            &lt;GradientStop Color=\"#FFA3AEB9\" Offset=\"0\"/&gt;\r\n                            &lt;GradientStop Color=\"#FF8399A9\" Offset=\"0.375\"/&gt;\r\n                            &lt;GradientStop Color=\"#FF718597\" Offset=\"0.375\"/&gt;\r\n                            &lt;GradientStop Color=\"#FF617584\" Offset=\"1\"/&gt;\r\n                        &lt;/LinearGradientBrush&gt;\r\n                    &lt;/Setter.Value&gt;\r\n                &lt;/Setter&gt;\r\n                &lt;Setter Property=\"Template\"&gt;\r\n                    &lt;Setter.Value&gt;\r\n                        &lt;ControlTemplate TargetType=\"input:AutoCompleteBox\"&gt;\r\n                            &lt;Grid Margin=\"{TemplateBinding Padding}\"&gt;\r\n                                &lt;VisualStateManager.VisualStateGroups&gt;\r\n                                    &lt;VisualStateGroup x:Name=\"PopupStates\"&gt;\r\n                                        &lt;VisualStateGroup.Transitions&gt;\r\n                                            &lt;VisualTransition GeneratedDuration=\"0:0:0.2\" To=\"PopupOpened\" /&gt;\r\n                                            &lt;VisualTransition GeneratedDuration=\"0:0:0.5\" To=\"PopupClosed\" /&gt;\r\n                                        &lt;/VisualStateGroup.Transitions&gt;\r\n                                        &lt;VisualState x:Name=\"PopupOpened\"&gt;\r\n                                            &lt;Storyboard&gt;\r\n                                                &lt;DoubleAnimation Storyboard.TargetName=\"PopupBorder\" Storyboard.TargetProperty=\"Opacity\" To=\"1.0\" /&gt;\r\n                                            &lt;/Storyboard&gt;\r\n                                        &lt;/VisualState&gt;\r\n                                        &lt;VisualState x:Name=\"PopupClosed\"&gt;\r\n                                            &lt;Storyboard&gt;\r\n                                                &lt;DoubleAnimation Storyboard.TargetName=\"PopupBorder\" Storyboard.TargetProperty=\"Opacity\" To=\"0.0\" /&gt;\r\n                                            &lt;/Storyboard&gt;\r\n                                        &lt;/VisualState&gt;\r\n                                    &lt;/VisualStateGroup&gt;\r\n                                &lt;/VisualStateManager.VisualStateGroups&gt;\r\n                                &lt;TextBox IsTabStop=\"True\" x:Name=\"Text\" Style=\"{TemplateBinding TextBoxStyle}\" Margin=\"0\" /&gt;\r\n                                &lt;Popup x:Name=\"Popup\"&gt;\r\n                                    &lt;Border x:Name=\"PopupBorder\" HorizontalAlignment=\"Stretch\" Opacity=\"0.0\" BorderThickness=\"0\" CornerRadius=\"3\"&gt;\r\n                                        &lt;Border.RenderTransform&gt;\r\n                                            &lt;TranslateTransform X=\"2\" Y=\"2\" /&gt;\r\n                                        &lt;/Border.RenderTransform&gt;\r\n                                        &lt;Border.Background&gt;\r\n                                            &lt;SolidColorBrush Color=\"#11000000\" /&gt;\r\n                                        &lt;/Border.Background&gt;\r\n                                        &lt;Border HorizontalAlignment=\"Stretch\" BorderThickness=\"0\" CornerRadius=\"3\"&gt;\r\n                                            &lt;Border.Background&gt;\r\n                                                &lt;SolidColorBrush Color=\"#11000000\" /&gt;\r\n                                            &lt;/Border.Background&gt;\r\n                                            &lt;Border.RenderTransform&gt;\r\n                                                &lt;TransformGroup&gt;\r\n                                                    &lt;ScaleTransform /&gt;\r\n                                                    &lt;SkewTransform /&gt;\r\n                                                    &lt;RotateTransform /&gt;\r\n                                                    &lt;TranslateTransform X=\"-1\" Y=\"-1\" /&gt;\r\n                                                &lt;/TransformGroup&gt;\r\n                                            &lt;/Border.RenderTransform&gt;\r\n                                            &lt;Border HorizontalAlignment=\"Stretch\" Opacity=\"1.0\" Padding=\"1\" BorderThickness=\"1\" BorderBrush=\"{TemplateBinding BorderBrush}\" CornerRadius=\"3\"&gt;\r\n                                                &lt;Border.RenderTransform&gt;\r\n                                                    &lt;TransformGroup&gt;\r\n                                                        &lt;ScaleTransform /&gt;\r\n                                                        &lt;SkewTransform /&gt;\r\n                                                        &lt;RotateTransform /&gt;\r\n                                                        &lt;TranslateTransform X=\"-2\" Y=\"-2\" /&gt;\r\n                                                    &lt;/TransformGroup&gt;\r\n                                                &lt;/Border.RenderTransform&gt;\r\n                                                &lt;Border.Background&gt;\r\n                                                    &lt;LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\"&gt;\r\n                                                        &lt;GradientStop Color=\"#FFDDDDDD\" Offset=\"0\"/&gt;\r\n                                                        &lt;GradientStop Color=\"#AADDDDDD\" Offset=\"1\"/&gt;\r\n                                                    &lt;/LinearGradientBrush&gt;\r\n                                                &lt;/Border.Background&gt;\r\n                                                &lt;samples:DataGridSelectionAdapter \r\n                                                x:Name=\"SelectionAdapter\" \r\n                                                AutoGenerateColumns=\"False\"\r\n                                                IsReadOnly=\"True\"&gt;\r\n                                                    &lt;samples:DataGridSelectionAdapter.Columns&gt;\r\n                                                        &lt;data:DataGridTextColumn Header=\"\" FontWeight=\"Bold\" Foreground=\"#CC000000\" Binding=\"{Binding CodeFaa}\" /&gt;\r\n                                                        &lt;data:DataGridTextColumn Header=\"Airport\" Binding=\"{Binding LimitedName}\" /&gt;\r\n                                                        &lt;data:DataGridTextColumn Header=\"City\" Binding=\"{Binding City}\" /&gt;\r\n                                                        &lt;data:DataGridTextColumn Header=\"State\" Binding=\"{Binding State}\" /&gt;\r\n                                                    &lt;/samples:DataGridSelectionAdapter.Columns&gt;\r\n                                                &lt;/samples:DataGridSelectionAdapter&gt;\r\n                                            &lt;/Border&gt;\r\n                                        &lt;/Border&gt;\r\n                                    &lt;/Border&gt;\r\n                                &lt;/Popup&gt;\r\n                            &lt;/Grid&gt;\r\n                        &lt;/ControlTemplate&gt;\r\n                    &lt;/Setter.Value&gt;\r\n                &lt;/Setter&gt;\r\n            &lt;/Style&gt;\r\n        &lt;/StackPanel.Resources&gt;\r\n            &lt;ContentControl Content=\"AutoCompleteBox with a DataGrid DropDown\" Style=\"{StaticResource Header}\" /&gt;\r\n\r\n        &lt;StackPanel&gt;\r\n            \r\n            &lt;TextBlock Style=\"{StaticResource Information}\" UseLayoutRounding=\"False\"&gt;\r\n                This sample uses a custom ISelectionAdapter that derives from the \r\n                Silverlight DataGrid.\r\n            &lt;/TextBlock&gt;\r\n            \r\n            &lt;input:AutoCompleteBox\r\n                x:Name=\"MyAutoCompleteBox\"\r\n                Style=\"{StaticResource DataGridAutoCompleteTemplate}\" \r\n                /&gt;\r\n        &lt;/StackPanel&gt;\r\n    &lt;/StackPanel&gt;\r\n&lt;/UserControl&gt;\r\n</sys:String>\r\n    </src:SourceFile.Source>\r\n  </src:SourceFile>\r\n  <src:SourceFile Path=\"DataGridAutoCompleteBox.xaml.cs\">\r\n    <src:SourceFile.Source>\r\n      <sys:String>// (c) Copyright Microsoft Corporation.\r\n// This source is subject to [###LICENSE_NAME###].\r\n// Please see [###LICENSE_LINK###] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.ComponentModel;\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    /// &lt;summary&gt;\r\n    /// A sample AutoCompleteBox with a DataGrid selection adapter.\r\n    /// &lt;/summary&gt;\r\n    [Sample(\"DataGrid\", DifficultyLevel.Advanced)]\r\n    [Category(\"AutoCompleteBox\")]\r\n    public partial class DataGridAutoCompleteBox : UserControl\r\n    {\r\n        /// &lt;summary&gt;\r\n        /// Initializes a new instance of the type.\r\n        /// &lt;/summary&gt;\r\n        public DataGridAutoCompleteBox()\r\n        {\r\n            InitializeComponent();\r\n            Loaded += OnLoaded;\r\n        }\r\n\r\n        /// &lt;summary&gt;\r\n        /// Handle the loaded event.\r\n        /// &lt;/summary&gt;\r\n        /// &lt;param name=\"sender\"&gt;The source object.&lt;/param&gt;\r\n        /// &lt;param name=\"e\"&gt;The event data.&lt;/param&gt;\r\n        private void OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            // Bind to the sample airport data\r\n            MyAutoCompleteBox.ItemsSource = Airport.SampleAirports;\r\n            \r\n            // A custom search, the same that is used in the basic lambda file\r\n            MyAutoCompleteBox.FilterMode = AutoCompleteFilterMode.Custom;\r\n            MyAutoCompleteBox.ItemFilter = (search, item) =&gt;\r\n            {\r\n                Airport airport = item as Airport;\r\n                if (airport != null)\r\n                {\r\n                    // Interested in: Name, City, FAA code\r\n                    string filter = search.ToUpper(CultureInfo.InvariantCulture);\r\n                    return (airport.CodeFaa.ToUpper(CultureInfo.InvariantCulture).Contains(filter)\r\n                        || airport.City.ToUpper(CultureInfo.InvariantCulture).Contains(filter)\r\n                        || airport.Name.ToUpper(CultureInfo.InvariantCulture).Contains(filter));\r\n                }\r\n\r\n                return false;\r\n            };\r\n        }\r\n    }\r\n}</sys:String>\r\n    </src:SourceFile.Source>\r\n  </src:SourceFile>\r\n  <src:SourceFile Path=\"DataGridAutoCompleteBox.xaml.vb\">\r\n    <src:SourceFile.Source>\r\n      <sys:String>' (c) Copyright Microsoft Corporation.\r\n' This source is subject to [###LICENSE_NAME###].\r\n' Please see [###LICENSE_LINK###] for details.\r\n' All other rights reserved.\r\n\r\nImports Microsoft.VisualBasic\r\nImports System\r\nImports System.Globalization\r\nImports System.Windows\r\nImports System.Windows.Controls\r\nImports System.ComponentModel\r\n\r\n''' &lt;summary&gt;\r\n''' A sample AutoCompleteBox with a DataGrid selection adapter.\r\n''' &lt;/summary&gt;\r\n&lt;Sample(\"DataGrid\", DifficultyLevel.Advanced), Category(\"AutoCompleteBox\")&gt; _\r\nPartial Public Class DataGridAutoCompleteBox\r\n    Inherits UserControl\r\n    ''' &lt;summary&gt;\r\n    ''' Initializes a new instance of the type.\r\n    ''' &lt;/summary&gt;\r\n    Public Sub New()\r\n        InitializeComponent()\r\n    End Sub\r\n\r\n    ''' &lt;summary&gt;\r\n    ''' Handle the loaded event.\r\n    ''' &lt;/summary&gt;\r\n    ''' &lt;param name=\"sender\"&gt;The source object.&lt;/param&gt;\r\n    ''' &lt;param name=\"e\"&gt;The event data.&lt;/param&gt;\r\n    Private Sub OnLoaded(ByVal sender As Object, ByVal e As RoutedEventArgs) Handles Me.Loaded\r\n        ' Bind to the sample airport data\r\n        MyAutoCompleteBox.ItemsSource = Airport.SampleAirports\r\n\r\n        ' A custom search, the same that is used in the basic lambda file\r\n        MyAutoCompleteBox.FilterMode = AutoCompleteFilterMode.Custom\r\n        MyAutoCompleteBox.ItemFilter = AddressOf MyItemFilter\r\n    End Sub\r\n\r\n    ''' &lt;summary&gt;\r\n    ''' AutoComplete search predicate\r\n    ''' &lt;/summary&gt;\r\n    ''' &lt;param name=\"search\"&gt;The search string.&lt;/param&gt;\r\n    ''' &lt;param name=\"item\"&gt;The target object.&lt;/param&gt;\r\n    Private Function MyItemFilter(ByVal search As String, ByVal item As Object) As Boolean\r\n        Dim airport As Airport = TryCast(item, Airport)\r\n        If airport IsNot Nothing Then\r\n            Dim filter As String = search.ToUpper(CultureInfo.InvariantCulture)\r\n            Return (airport.CodeFaa.ToUpper(CultureInfo.InvariantCulture).Contains(filter) OrElse _\r\n                    airport.City.ToUpper(CultureInfo.InvariantCulture).Contains(filter) OrElse _\r\n                    airport.Name.ToUpper(CultureInfo.InvariantCulture).Contains(filter))\r\n        End If\r\n        Return False\r\n    End Function\r\nEnd Class\r\n</sys:String>\r\n    </src:SourceFile.Source>\r\n  </src:SourceFile>\r\n  <src:SourceFile Path=\"DataGridSelectionAdapter.cs\">\r\n    <src:SourceFile.Source>\r\n      <sys:String>// (c) Copyright Microsoft Corporation.\r\n// This source is subject to [###LICENSE_NAME###].\r\n// Please see [###LICENSE_LINK###] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections;\r\nusing System.Collections.ObjectModel;\r\nusing System.Collections.Specialized;\r\nusing System.Windows;\r\nusing System.Windows.Automation.Peers;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    /// &lt;summary&gt;\r\n    /// An implementation of ISelectionAdapter for the DataGrid control. This \r\n    /// adapter, unlike the standard SelectorSelectionAdapter, actually derives \r\n    /// directly from DataGrid.\r\n    /// &lt;/summary&gt;\r\n    public class DataGridSelectionAdapter : DataGrid, ISelectionAdapter\r\n    {\r\n        /// &lt;summary&gt;\r\n        /// Gets or sets a value indicating whether the selection should be \r\n        /// ignored. Since the DataGrid automatically selects the first row \r\n        /// whenever the data changes, this simple implementation only works \r\n        /// with key navigation and mouse clicks. This prevents the text box \r\n        /// of the AutoCompleteBox control from being updated continuously.\r\n        /// &lt;/summary&gt;\r\n        private bool IgnoreAnySelection { get; set; }\r\n\r\n        /// &lt;summary&gt;\r\n        /// Gets or sets a value indicating whether the selection change event \r\n        /// should not be fired.\r\n        /// &lt;/summary&gt;\r\n        private bool IgnoringSelectionChanged { get; set; }\r\n\r\n        /// &lt;summary&gt;\r\n        /// Occurs when the currently selected item changes.\r\n        /// &lt;/summary&gt;\r\n        public new event SelectionChangedEventHandler SelectionChanged;\r\n\r\n        /// &lt;summary&gt;\r\n        /// An event that indicates that a selection is complete and has been \r\n        /// made, effectively a commit action.\r\n        /// &lt;/summary&gt;\r\n        public event RoutedEventHandler Commit;\r\n\r\n        /// &lt;summary&gt;\r\n        /// An event that indicates that the selection operation has been \r\n        /// canceled.\r\n        /// &lt;/summary&gt;\r\n        public event RoutedEventHandler Cancel;\r\n\r\n        /// &lt;summary&gt;\r\n        /// Initializes a new instance of the SelectorSelectionAdapter class.\r\n        /// &lt;/summary&gt;\r\n        public DataGridSelectionAdapter()\r\n        {\r\n            base.SelectionChanged += OnSelectionChanged;\r\n            MouseLeftButtonUp += OnSelectorMouseLeftButtonUp;\r\n        }\r\n\r\n        /// &lt;summary&gt;\r\n        /// Gets or sets the selected item through the adapter.\r\n        /// &lt;/summary&gt;\r\n        public new object SelectedItem\r\n        {\r\n            get\r\n            {\r\n                return base.SelectedItem;\r\n            }\r\n\r\n            set\r\n            {\r\n                IgnoringSelectionChanged = true;\r\n                base.SelectedItem = value;\r\n                IgnoringSelectionChanged = false;\r\n            }\r\n        }\r\n\r\n        /// &lt;summary&gt;\r\n        /// Handles the mouse left button up event on the selector control.\r\n        /// &lt;/summary&gt;\r\n        /// &lt;param name=\"sender\"&gt;The source object.&lt;/param&gt;\r\n        /// &lt;param name=\"e\"&gt;The event data.&lt;/param&gt;\r\n        private void OnSelectorMouseLeftButtonUp(object sender, MouseButtonEventArgs e)\r\n        {\r\n            IgnoreAnySelection = false;\r\n\r\n            OnSelectionChanged(this, null);\r\n            OnCommit(this, new RoutedEventArgs());\r\n        }\r\n\r\n        /// &lt;summary&gt;\r\n        /// Handles the SelectionChanged event on the Selector control.\r\n        /// &lt;/summary&gt;\r\n        /// &lt;param name=\"sender\"&gt;The source object.&lt;/param&gt;\r\n        /// &lt;param name=\"e\"&gt;The selection changed event data.&lt;/param&gt;\r\n        private void OnSelectionChanged(object sender, SelectionChangedEventArgs e)\r\n        {\r\n            if (IgnoringSelectionChanged)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (IgnoreAnySelection)\r\n            {\r\n                return;\r\n            }\r\n\r\n            SelectionChangedEventHandler handler = this.SelectionChanged;\r\n            if (handler != null)\r\n            {\r\n                handler(sender, e);\r\n            }\r\n        }\r\n\r\n        /// &lt;summary&gt;\r\n        /// Gets or sets the items source.\r\n        /// &lt;/summary&gt;\r\n        public new IEnumerable ItemsSource\r\n        {\r\n            get { return base.ItemsSource; }\r\n            \r\n            set\r\n            {\r\n                if (base.ItemsSource != null)\r\n                {\r\n                    INotifyCollectionChanged notify = base.ItemsSource as INotifyCollectionChanged;\r\n                    if (notify != null)\r\n                    {\r\n                        notify.CollectionChanged -= OnCollectionChanged;\r\n                    }\r\n                }\r\n\r\n                base.ItemsSource = value;\r\n\r\n                if (base.ItemsSource != null)\r\n                {\r\n                    INotifyCollectionChanged notify = base.ItemsSource as INotifyCollectionChanged;\r\n                    if (notify != null)\r\n                    {\r\n                        notify.CollectionChanged += OnCollectionChanged;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        /// &lt;summary&gt;\r\n        /// Handles the CollectionChanged event, resetting the selection \r\n        /// ignore flag.\r\n        /// &lt;/summary&gt;\r\n        /// &lt;param name=\"sender\"&gt;The source object.&lt;/param&gt;\r\n        /// &lt;param name=\"e\"&gt;The event data.&lt;/param&gt;\r\n        private void OnCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)\r\n        {\r\n            IgnoreAnySelection = true;\r\n        }\r\n\r\n        /// &lt;summary&gt;\r\n        /// Gets the observable collection set by AutoCompleteBox.\r\n        /// &lt;/summary&gt;\r\n        private ObservableCollection&lt;object&gt; Items\r\n        {\r\n            get { return ItemsSource as ObservableCollection&lt;object&gt;; }\r\n        }\r\n\r\n        /// &lt;summary&gt;\r\n        /// Increment the selected index, or wrap.\r\n        /// &lt;/summary&gt;\r\n        private void SelectedIndexIncrement()\r\n        {\r\n            SelectedIndex = SelectedIndex + 1 &gt;= Items.Count ? -1 : SelectedIndex + 1;\r\n            ScrollIntoView(SelectedItem, this.Columns[0]);\r\n        }\r\n\r\n        /// &lt;summary&gt;\r\n        /// Decrement the SelectedIndex, or wrap around, inside the nested \r\n        /// SelectionAdapter's control.\r\n        /// &lt;/summary&gt;\r\n        private void SelectedIndexDecrement()\r\n        {\r\n            int index = SelectedIndex;\r\n            if (index &gt;= 0)\r\n            {\r\n                SelectedIndex--;\r\n            }\r\n            else if (index == -1)\r\n            {\r\n                SelectedIndex = Items.Count - 1;\r\n            }\r\n\r\n            ScrollIntoView(SelectedItem, this.Columns[0]);\r\n        }\r\n\r\n        /// &lt;summary&gt;\r\n        /// Process a key down event.\r\n        /// &lt;/summary&gt;\r\n        /// &lt;param name=\"e\"&gt;The key event arguments object.&lt;/param&gt;\r\n        public void HandleKeyDown(KeyEventArgs e)\r\n        {\r\n            switch (e.Key)\r\n            {\r\n                case Key.Enter:\r\n                    OnCommit(this, e);\r\n                    e.Handled = true;\r\n                    break;\r\n\r\n                case Key.Up:\r\n                    IgnoreAnySelection = false; \r\n                    SelectedIndexDecrement();\r\n                    e.Handled = true;\r\n                    break;\r\n\r\n                case Key.Down:\r\n                    if ((ModifierKeys.Alt &amp; Keyboard.Modifiers) == ModifierKeys.None)\r\n                    {\r\n                        IgnoreAnySelection = false;\r\n                        SelectedIndexIncrement();\r\n                        e.Handled = true;\r\n                    }\r\n                    break;\r\n\r\n                case Key.Escape:\r\n                    OnCancel(this, e);\r\n                    e.Handled = true;\r\n                    break;\r\n\r\n                default:\r\n                    break;\r\n            }\r\n        }\r\n\r\n        /// &lt;summary&gt;\r\n        /// Fires the Commit event.\r\n        /// &lt;/summary&gt;\r\n        /// &lt;param name=\"sender\"&gt;The source object.&lt;/param&gt;\r\n        /// &lt;param name=\"e\"&gt;The event data.&lt;/param&gt;\r\n        private void OnCommit(object sender, RoutedEventArgs e)\r\n        {\r\n            RoutedEventHandler handler = Commit;\r\n            if (handler != null)\r\n            {\r\n                handler(sender, e);\r\n            }\r\n\r\n            AfterAdapterAction();\r\n        }\r\n\r\n        /// &lt;summary&gt;\r\n        /// Fires the Cancel event.\r\n        /// &lt;/summary&gt;\r\n        /// &lt;param name=\"sender\"&gt;The source object.&lt;/param&gt;\r\n        /// &lt;param name=\"e\"&gt;The event data.&lt;/param&gt;\r\n        private void OnCancel(object sender, RoutedEventArgs e)\r\n        {\r\n            RoutedEventHandler handler = Cancel;\r\n            if (handler != null)\r\n            {\r\n                handler(sender, e);\r\n            }\r\n\r\n            AfterAdapterAction();\r\n        }\r\n\r\n        /// &lt;summary&gt;\r\n        /// Change the selection after the actions are complete.\r\n        /// &lt;/summary&gt;\r\n        private void AfterAdapterAction()\r\n        {\r\n            IgnoringSelectionChanged = true;\r\n            SelectedItem = null;\r\n            SelectedIndex = -1;\r\n            IgnoringSelectionChanged = false;\r\n\r\n            // Reset, to ignore any future changes\r\n            IgnoreAnySelection = true;\r\n        }\r\n\r\n        /// &lt;summary&gt;\r\n        /// Initializes a new instance of a DataGridAutomationPeer.\r\n        /// &lt;/summary&gt;\r\n        /// &lt;returns&gt;Returns a new DataGridAutomationPeer.&lt;/returns&gt;\r\n        public AutomationPeer CreateAutomationPeer()\r\n        {\r\n            return new DataGridAutomationPeer(this);\r\n        }\r\n    }\r\n}</sys:String>\r\n    </src:SourceFile.Source>\r\n  </src:SourceFile>\r\n  <src:SourceFile Path=\"DataGridSelectionAdapter.vb\">\r\n    <src:SourceFile.Source>\r\n      <sys:String>' (c) Copyright Microsoft Corporation.\r\n' This source is subject to [###LICENSE_NAME###].\r\n' Please see [###LICENSE_LINK###] for details.\r\n' All other rights reserved.\r\n\r\n\r\nImports Microsoft.VisualBasic\r\nImports System\r\nImports System.Collections\r\nImports System.Collections.ObjectModel\r\nImports System.Collections.Specialized\r\nImports System.Windows\r\nImports System.Windows.Automation.Peers\r\nImports System.Windows.Controls\r\nImports System.Windows.Input\r\n\r\n''' &lt;summary&gt;\r\n''' An implementation of ISelectionAdapter for the DataGrid control. This \r\n''' adapter, unlike the standard SelectorSelectionAdapter, actually derives \r\n''' directly from DataGrid.\r\n''' &lt;/summary&gt;\r\nPublic Class DataGridSelectionAdapter\r\n    Inherits DataGrid\r\n    Implements ISelectionAdapter\r\n    ''' &lt;summary&gt;\r\n    ''' Gets or sets a value indicating whether the selection should be \r\n    ''' ignored. Since the DataGrid automatically selects the first row \r\n    ''' whenever the data changes, this simple implementation only works \r\n    ''' with key navigation and mouse clicks. This prevents the text box \r\n    ''' of the AutoCompleteBox control from being updated continuously.\r\n    ''' &lt;/summary&gt;\r\n    Private privateIgnoreAnySelection As Boolean\r\n    Private Property IgnoreAnySelection() As Boolean\r\n        Get\r\n            Return privateIgnoreAnySelection\r\n        End Get\r\n        Set(ByVal value As Boolean)\r\n            privateIgnoreAnySelection = value\r\n        End Set\r\n    End Property\r\n\r\n    ''' &lt;summary&gt;\r\n    ''' Gets or sets a value indicating whether the selection change event \r\n    ''' should not be fired.\r\n    ''' &lt;/summary&gt;\r\n    Private privateIgnoringSelectionChanged As Boolean\r\n    Private Property IgnoringSelectionChanged() As Boolean\r\n        Get\r\n            Return privateIgnoringSelectionChanged\r\n        End Get\r\n        Set(ByVal value As Boolean)\r\n            privateIgnoringSelectionChanged = value\r\n        End Set\r\n    End Property\r\n\r\n    ''' &lt;summary&gt;\r\n    ''' Occurs when the currently selected item changes.\r\n    ''' &lt;/summary&gt;\r\n    Public Shadows Event SelectionChanged As SelectionChangedEventHandler Implements ISelectionAdapter.SelectionChanged\r\n\r\n    ''' &lt;summary&gt;\r\n    ''' An event that indicates that a selection is complete and has been \r\n    ''' made, effectively a commit action.\r\n    ''' &lt;/summary&gt;\r\n    Public Event Commit As RoutedEventHandler Implements ISelectionAdapter.Commit\r\n\r\n    ''' &lt;summary&gt;\r\n    ''' An event that indicates that the selection operation has been \r\n    ''' canceled.\r\n    ''' &lt;/summary&gt;\r\n    Public Event Cancel As RoutedEventHandler Implements ISelectionAdapter.Cancel\r\n\r\n    ''' &lt;summary&gt;\r\n    ''' Gets or sets the selected item through the adapter.\r\n    ''' &lt;/summary&gt;\r\n    Public Shadows Property SelectedItem() As Object Implements ISelectionAdapter.SelectedItem\r\n        Get\r\n            Return MyBase.SelectedItem\r\n        End Get\r\n\r\n        Set(ByVal value As Object)\r\n            IgnoringSelectionChanged = True\r\n            MyBase.SelectedItem = value\r\n            IgnoringSelectionChanged = False\r\n        End Set\r\n    End Property\r\n\r\n    ''' &lt;summary&gt;\r\n    ''' Handles the mouse left button up event on the selector control.\r\n    ''' &lt;/summary&gt;\r\n    ''' &lt;param name=\"sender\"&gt;The source object.&lt;/param&gt;\r\n    ''' &lt;param name=\"e\"&gt;The event data.&lt;/param&gt;\r\n    Private Sub OnSelectorMouseLeftButtonUp(ByVal sender As Object, ByVal e As MouseButtonEventArgs) Handles Me.MouseLeftButtonUp\r\n        IgnoreAnySelection = False\r\n\r\n        OnSelectionChanged(Me, Nothing)\r\n        OnCommit(Me, New RoutedEventArgs())\r\n    End Sub\r\n\r\n    ''' &lt;summary&gt;\r\n    ''' Handles the SelectionChanged event on the Selector control.\r\n    ''' &lt;/summary&gt;\r\n    ''' &lt;param name=\"sender\"&gt;The source object.&lt;/param&gt;\r\n    ''' &lt;param name=\"e\"&gt;The selection changed event data.&lt;/param&gt;\r\n    Private Shadows Sub OnSelectionChanged(ByVal sender As Object, ByVal e As SelectionChangedEventArgs) Handles MyBase.SelectionChanged\r\n        If IgnoringSelectionChanged Then\r\n            Return\r\n        End If\r\n\r\n        If IgnoreAnySelection Then\r\n            Return\r\n        End If\r\n\r\n        Dim handler As SelectionChangedEventHandler = Me.SelectionChangedEvent\r\n        If handler IsNot Nothing Then\r\n            handler(sender, e)\r\n        End If\r\n    End Sub\r\n\r\n    ''' &lt;summary&gt;\r\n    ''' Gets or sets the items source.\r\n    ''' &lt;/summary&gt;\r\n    Public Shadows Property ItemsSource() As IEnumerable Implements ISelectionAdapter.ItemsSource\r\n        Get\r\n            Return MyBase.ItemsSource\r\n        End Get\r\n\r\n        Set(ByVal value As IEnumerable)\r\n            If MyBase.ItemsSource IsNot Nothing Then\r\n                Dim notify As INotifyCollectionChanged = TryCast(MyBase.ItemsSource, INotifyCollectionChanged)\r\n                If notify IsNot Nothing Then\r\n                    RemoveHandler notify.CollectionChanged, AddressOf OnCollectionChanged\r\n                End If\r\n            End If\r\n\r\n            MyBase.ItemsSource = value\r\n\r\n            If MyBase.ItemsSource IsNot Nothing Then\r\n                Dim notify As INotifyCollectionChanged = TryCast(MyBase.ItemsSource, INotifyCollectionChanged)\r\n                If notify IsNot Nothing Then\r\n                    AddHandler notify.CollectionChanged, AddressOf OnCollectionChanged\r\n                End If\r\n            End If\r\n        End Set\r\n    End Property\r\n\r\n    ''' &lt;summary&gt;\r\n    ''' Handles the CollectionChanged event, resetting the selection \r\n    ''' ignore flag.\r\n    ''' &lt;/summary&gt;\r\n    ''' &lt;param name=\"sender\"&gt;The source object.&lt;/param&gt;\r\n    ''' &lt;param name=\"e\"&gt;The event data.&lt;/param&gt;\r\n    Private Sub OnCollectionChanged(ByVal sender As Object, ByVal e As NotifyCollectionChangedEventArgs)\r\n        IgnoreAnySelection = True\r\n    End Sub\r\n\r\n    ''' &lt;summary&gt;\r\n    ''' Gets the observable collection set by AutoCompleteBox.\r\n    ''' &lt;/summary&gt;\r\n    Private ReadOnly Property Items() As ObservableCollection(Of Object)\r\n        Get\r\n            Return TryCast(ItemsSource, ObservableCollection(Of Object))\r\n        End Get\r\n    End Property\r\n\r\n    ''' &lt;summary&gt;\r\n    ''' Increment the selected index, or wrap.\r\n    ''' &lt;/summary&gt;\r\n    Private Sub SelectedIndexIncrement()\r\n        SelectedIndex = If(SelectedIndex + 1 &gt;= Items.Count, -1, SelectedIndex + 1)\r\n        ScrollIntoView(SelectedItem, Me.Columns(0))\r\n    End Sub\r\n\r\n    ''' &lt;summary&gt;\r\n    ''' Decrement the SelectedIndex, or wrap around, inside the nested \r\n    ''' SelectionAdapter's control.\r\n    ''' &lt;/summary&gt;\r\n    Private Sub SelectedIndexDecrement()\r\n        Dim index As Integer = SelectedIndex\r\n        If index &gt;= 0 Then\r\n            SelectedIndex -= 1\r\n        ElseIf index = -1 Then\r\n            SelectedIndex = Items.Count - 1\r\n        End If\r\n\r\n        ScrollIntoView(SelectedItem, Me.Columns(0))\r\n    End Sub\r\n\r\n    ''' &lt;summary&gt;\r\n    ''' Process a key down event.\r\n    ''' &lt;/summary&gt;\r\n    ''' &lt;param name=\"e\"&gt;The key event arguments object.&lt;/param&gt;\r\n    Public Sub HandleKeyDown(ByVal e As KeyEventArgs) Implements ISelectionAdapter.HandleKeyDown\r\n        Select Case e.Key\r\n            Case Key.Enter\r\n                OnCommit(Me, e)\r\n                e.Handled = True\r\n\r\n            Case Key.Up\r\n                IgnoreAnySelection = False\r\n                SelectedIndexDecrement()\r\n                e.Handled = True\r\n\r\n            Case Key.Down\r\n                If (ModifierKeys.Alt And Keyboard.Modifiers) = ModifierKeys.None Then\r\n                    IgnoreAnySelection = False\r\n                    SelectedIndexIncrement()\r\n                    e.Handled = True\r\n                End If\r\n\r\n            Case Key.Escape\r\n                OnCancel(Me, e)\r\n                e.Handled = True\r\n\r\n            Case Else\r\n        End Select\r\n    End Sub\r\n\r\n    ''' &lt;summary&gt;\r\n    ''' Fires the Commit event.\r\n    ''' &lt;/summary&gt;\r\n    ''' &lt;param name=\"sender\"&gt;The source object.&lt;/param&gt;\r\n    ''' &lt;param name=\"e\"&gt;The event data.&lt;/param&gt;\r\n    Private Sub OnCommit(ByVal sender As Object, ByVal e As RoutedEventArgs)\r\n        Dim handler As RoutedEventHandler = CommitEvent\r\n        If handler IsNot Nothing Then\r\n            handler(sender, e)\r\n        End If\r\n\r\n        AfterAdapterAction()\r\n    End Sub\r\n\r\n    ''' &lt;summary&gt;\r\n    ''' Fires the Cancel event.\r\n    ''' &lt;/summary&gt;\r\n    ''' &lt;param name=\"sender\"&gt;The source object.&lt;/param&gt;\r\n    ''' &lt;param name=\"e\"&gt;The event data.&lt;/param&gt;\r\n    Private Sub OnCancel(ByVal sender As Object, ByVal e As RoutedEventArgs)\r\n        Dim handler As RoutedEventHandler = CancelEvent\r\n        If handler IsNot Nothing Then\r\n            handler(sender, e)\r\n        End If\r\n\r\n        AfterAdapterAction()\r\n    End Sub\r\n\r\n    ''' &lt;summary&gt;\r\n    ''' Change the selection after the actions are complete.\r\n    ''' &lt;/summary&gt;\r\n    Private Sub AfterAdapterAction()\r\n        IgnoringSelectionChanged = True\r\n        SelectedItem = Nothing\r\n        SelectedIndex = -1\r\n        IgnoringSelectionChanged = False\r\n\r\n        ' Reset, to ignore any future changes\r\n        IgnoreAnySelection = True\r\n    End Sub\r\n\r\n    ''' &lt;summary&gt;\r\n    ''' Initializes a new instance of a DataGridAutomationPeer.\r\n    ''' &lt;/summary&gt;\r\n    ''' &lt;returns&gt;Returns a new DataGridAutomationPeer.&lt;/returns&gt;\r\n    Public Function CreateAutomationPeer() As AutomationPeer Implements ISelectionAdapter.CreateAutomationPeer\r\n        Return New DataGridAutomationPeer(Me)\r\n    End Function\r\nEnd Class\r\n</sys:String>\r\n    </src:SourceFile.Source>\r\n  </src:SourceFile>\r\n</src:SourceViewer>\r\n    </StackPanel>\r\n</UserControl>\r\n"
  },
  {
    "path": "WpfToolkit/Samples/AutoCompleteBox/DataGridAutoCompleteBox.xaml.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to [###LICENSE_NAME###].\r\n// Please see [###LICENSE_LINK###] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Globalization;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.ComponentModel;\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    /// <summary>\r\n    /// A sample AutoCompleteBox with a DataGrid selection adapter.\r\n    /// </summary>\r\n    [Sample(\"DataGrid\", DifficultyLevel.Advanced)]\r\n    [Category(\"AutoCompleteBox\")]\r\n    public partial class DataGridAutoCompleteBox : UserControl\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the type.\r\n        /// </summary>\r\n        public DataGridAutoCompleteBox()\r\n        {\r\n            InitializeComponent();\r\n            Loaded += OnLoaded;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handle the loaded event.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            // Bind to the sample airport data\r\n            MyAutoCompleteBox.ItemsSource = Airport.SampleAirports;\r\n            \r\n            // A custom search, the same that is used in the basic lambda file\r\n            MyAutoCompleteBox.FilterMode = AutoCompleteFilterMode.Custom;\r\n            MyAutoCompleteBox.ItemFilter = (search, item) =>\r\n            {\r\n                Airport airport = item as Airport;\r\n                if (airport != null)\r\n                {\r\n                    // Interested in: Name, City, FAA code\r\n                    string filter = search.ToUpper(CultureInfo.InvariantCulture);\r\n                    return (airport.CodeFaa.ToUpper(CultureInfo.InvariantCulture).Contains(filter)\r\n                        || airport.City.ToUpper(CultureInfo.InvariantCulture).Contains(filter)\r\n                        || airport.Name.ToUpper(CultureInfo.InvariantCulture).Contains(filter));\r\n                }\r\n\r\n                return false;\r\n            };\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Samples/AutoCompleteBox/DataGridAutoCompleteBoxEdit.xaml",
    "content": "﻿<!--\r\n// (c) Copyright Microsoft Corporation.\r\n// This source is subject to [###LICENSE_NAME###].\r\n// Please see [###LICENSE_LINK###] for details.\r\n// All other rights reserved.\r\n-->\r\n\r\n<UserControl x:Class=\"System.Windows.Controls.Samples.DataGridAutoCompleteBoxEdit\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" \r\n    xmlns:data=\"clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" \r\n    xmlns:samples=\"clr-namespace:System.Windows.Controls.Samples;assembly=System.Windows.Controls.Samples\"\r\n    xmlns:input=\"clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input\">\r\n    <StackPanel>\r\n        <StackPanel.Resources>\r\n            <samples:SampleEmployeeCollection x:Key=\"SampleEmployees\" />\r\n        </StackPanel.Resources>\r\n        \r\n        <ContentControl Content=\"AutoCompleteBox inside a DataGrid editing cell template\" Style=\"{StaticResource Header}\" />\r\n        \r\n        <StackPanel>\r\n            <TextBlock UseLayoutRounding=\"False\">\r\n                This example sets the DataGridTemplateColumn.CellEditingTemplate \r\n                to an AutoCompleteBox control that is bound to a set of known \r\n                names.\r\n                <LineBreak /><LineBreak />\r\n                \r\n                Double-click on a column with a name to display the \r\n                AutoCompleteBox.\r\n                <LineBreak />\r\n            </TextBlock>\r\n            \r\n            <data:DataGrid x:Name=\"MyDataGrid\" AutoGenerateColumns=\"False\">\r\n                <data:DataGrid.Columns>\r\n                    <data:DataGridTextColumn Binding=\"{Binding RandomNumber}\" Header=\"Random Number\" />\r\n                    <data:DataGridTemplateColumn Header=\"Name\">\r\n                        <data:DataGridTemplateColumn.CellTemplate>\r\n                            <DataTemplate>\r\n                               <TextBlock Text=\"{Binding Name}\" Margin=\"4\" />\r\n                            </DataTemplate>\r\n                        </data:DataGridTemplateColumn.CellTemplate>\r\n                        <data:DataGridTemplateColumn.CellEditingTemplate>\r\n                            <DataTemplate>\r\n                                <input:AutoCompleteBox \r\n                                    HorizontalAlignment=\"Left\"\r\n                                    Width=\"180\"\r\n                                    IsTabStop=\"True\"\r\n                                    ItemsSource=\"{StaticResource SampleEmployees}\"\r\n                                    Text=\"{Binding Name, Mode=TwoWay}\"\r\n                                    />\r\n                            </DataTemplate>\r\n                        </data:DataGridTemplateColumn.CellEditingTemplate>\r\n                    </data:DataGridTemplateColumn>\r\n                    <data:DataGridCheckBoxColumn Binding=\"{Binding RandomTrueFalse}\" Header=\"Random Bool\" />\r\n                </data:DataGrid.Columns>\r\n            </data:DataGrid>\r\n        </StackPanel>\r\n\r\n        <src:SourceViewer xmlns:src=\"clr-namespace:System.Windows.Controls.Samples;assembly=System.Windows.Controls.Samples.Common\" xmlns:sys=\"clr-namespace:System;assembly=mscorlib\">\r\n  <src:SourceFile Path=\"DataGridAutoCompleteBoxEdit.xaml\">\r\n    <src:SourceFile.Source>\r\n      <sys:String>&lt;!--\r\n// (c) Copyright Microsoft Corporation.\r\n// This source is subject to [###LICENSE_NAME###].\r\n// Please see [###LICENSE_LINK###] for details.\r\n// All other rights reserved.\r\n--&gt;\r\n\r\n&lt;UserControl x:Class=\"System.Windows.Controls.Samples.DataGridAutoCompleteBoxEdit\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" \r\n    xmlns:data=\"clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" \r\n    xmlns:samples=\"clr-namespace:System.Windows.Controls.Samples;assembly=System.Windows.Controls.Samples\"\r\n    xmlns:input=\"clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input\"&gt;\r\n    &lt;StackPanel&gt;\r\n        &lt;StackPanel.Resources&gt;\r\n            &lt;samples:SampleEmployeeCollection x:Key=\"SampleEmployees\" /&gt;\r\n        &lt;/StackPanel.Resources&gt;\r\n        \r\n        &lt;ContentControl Content=\"AutoCompleteBox inside a DataGrid editing cell template\" Style=\"{StaticResource Header}\" /&gt;\r\n        \r\n        &lt;StackPanel&gt;\r\n            &lt;TextBlock UseLayoutRounding=\"False\"&gt;\r\n                This example sets the DataGridTemplateColumn.CellEditingTemplate \r\n                to an AutoCompleteBox control that is bound to a set of known \r\n                names.\r\n                &lt;LineBreak /&gt;&lt;LineBreak /&gt;\r\n                \r\n                Double-click on a column with a name to display the \r\n                AutoCompleteBox.\r\n                &lt;LineBreak /&gt;\r\n            &lt;/TextBlock&gt;\r\n            \r\n            &lt;data:DataGrid x:Name=\"MyDataGrid\" AutoGenerateColumns=\"False\"&gt;\r\n                &lt;data:DataGrid.Columns&gt;\r\n                    &lt;data:DataGridTextColumn Binding=\"{Binding RandomNumber}\" Header=\"Random Number\" /&gt;\r\n                    &lt;data:DataGridTemplateColumn Header=\"Name\"&gt;\r\n                        &lt;data:DataGridTemplateColumn.CellTemplate&gt;\r\n                            &lt;DataTemplate&gt;\r\n                               &lt;TextBlock Text=\"{Binding Name}\" Margin=\"4\" /&gt;\r\n                            &lt;/DataTemplate&gt;\r\n                        &lt;/data:DataGridTemplateColumn.CellTemplate&gt;\r\n                        &lt;data:DataGridTemplateColumn.CellEditingTemplate&gt;\r\n                            &lt;DataTemplate&gt;\r\n                                &lt;input:AutoCompleteBox \r\n                                    HorizontalAlignment=\"Left\"\r\n                                    Width=\"180\"\r\n                                    IsTabStop=\"True\"\r\n                                    ItemsSource=\"{StaticResource SampleEmployees}\"\r\n                                    Text=\"{Binding Name, Mode=TwoWay}\"\r\n                                    /&gt;\r\n                            &lt;/DataTemplate&gt;\r\n                        &lt;/data:DataGridTemplateColumn.CellEditingTemplate&gt;\r\n                    &lt;/data:DataGridTemplateColumn&gt;\r\n                    &lt;data:DataGridCheckBoxColumn Binding=\"{Binding RandomTrueFalse}\" Header=\"Random Bool\" /&gt;\r\n                &lt;/data:DataGrid.Columns&gt;\r\n            &lt;/data:DataGrid&gt;\r\n        &lt;/StackPanel&gt;\r\n    &lt;/StackPanel&gt;\r\n&lt;/UserControl&gt;\r\n</sys:String>\r\n    </src:SourceFile.Source>\r\n  </src:SourceFile>\r\n  <src:SourceFile Path=\"DataGridAutoCompleteBoxEdit.xaml.cs\">\r\n    <src:SourceFile.Source>\r\n      <sys:String>// (c) Copyright Microsoft Corporation.\r\n// This source is subject to [###LICENSE_NAME###].\r\n// Please see [###LICENSE_LINK###] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.ComponentModel;\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    /// &lt;summary&gt;\r\n    /// The DataGridAutoCompleteBoxEdit class selects a small set of data to \r\n    /// display in the DataGrid. The XAML file contains the custom editing \r\n    /// template for AutoCompleteBox.\r\n    /// &lt;/summary&gt;\r\n    [Sample(\"DataGrid Editing\", DifficultyLevel.Advanced)]\r\n    [Category(\"AutoCompleteBox\")]\r\n    public partial class DataGridAutoCompleteBoxEdit : UserControl\r\n    {\r\n        /// &lt;summary&gt;\r\n        /// Initializes a new instance of the DataGridAutoCompleteBoxEdit type.\r\n        /// &lt;/summary&gt;\r\n        public DataGridAutoCompleteBoxEdit()\r\n        {\r\n            InitializeComponent();\r\n            Loaded += OnLoaded;\r\n        }\r\n\r\n        /// &lt;summary&gt;\r\n        /// Handle the Loaded event of the page. This creates a small, random \r\n        /// set of data to display in the grid.\r\n        /// &lt;/summary&gt;\r\n        /// &lt;param name=\"sender\"&gt;The source object.&lt;/param&gt;\r\n        /// &lt;param name=\"e\"&gt;The event arguments.&lt;/param&gt;\r\n        private void OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            List&lt;RandomEmployeeDetails&gt; data = new List&lt;RandomEmployeeDetails&gt;();\r\n            Random random = new Random();\r\n\r\n            // Select up to 8 random employees\r\n            foreach (Employee employee in \r\n                new SampleEmployeeCollection()\r\n                    .Where(item =&gt; random.Next(2) == 0)\r\n                    .Distinct()\r\n                    .Take(8))\r\n            {\r\n                data.Add(new RandomEmployeeDetails(employee));\r\n            }\r\n            MyDataGrid.ItemsSource = data;\r\n        }\r\n    }\r\n}</sys:String>\r\n    </src:SourceFile.Source>\r\n  </src:SourceFile>\r\n  <src:SourceFile Path=\"DataGridAutoCompleteBoxEdit.xaml.vb\">\r\n    <src:SourceFile.Source>\r\n      <sys:String>' (c) Copyright Microsoft Corporation.\r\n' This source is subject to [###LICENSE_NAME###].\r\n' Please see [###LICENSE_LINK###] for details.\r\n' All other rights reserved.\r\n\r\nImports Microsoft.VisualBasic\r\nImports System\r\nImports System.Collections.Generic\r\nImports System.Linq\r\nImports System.Windows\r\nImports System.Windows.Controls\r\nImports System.ComponentModel\r\n\r\n''' &lt;summary&gt;\r\n''' The DataGridAutoCompleteBoxEdit class selects a small set of data to \r\n''' display in the DataGrid. The XAML file contains the custom editing \r\n''' template for AutoCompleteBox.\r\n''' &lt;/summary&gt;\r\n&lt;Sample(\"DataGrid Editing\", DifficultyLevel.Advanced), Category(\"AutoCompleteBox\")&gt; _\r\nPartial Public Class DataGridAutoCompleteBoxEdit\r\n    Inherits UserControl\r\n    ''' &lt;summary&gt;\r\n    ''' Initializes a new instance of the DataGridAutoCompleteBoxEdit type.\r\n    ''' &lt;/summary&gt;\r\n    Public Sub New()\r\n        InitializeComponent()\r\n    End Sub\r\n\r\n    ''' &lt;summary&gt;\r\n    ''' Handle the Loaded event of the page. This creates a small, random \r\n    ''' set of data to display in the grid.\r\n    ''' &lt;/summary&gt;\r\n    ''' &lt;param name=\"sender\"&gt;The source object.&lt;/param&gt;\r\n    ''' &lt;param name=\"e\"&gt;The event arguments.&lt;/param&gt;\r\n    Private Sub OnLoaded(ByVal sender As Object, ByVal e As RoutedEventArgs) Handles Me.Loaded\r\n        Dim data As List(Of RandomEmployeeDetails) = New List(Of RandomEmployeeDetails)()\r\n        Dim random As New Random()\r\n\r\n        ' Select up to 8 random employees\r\n        For Each employee As Employee In New SampleEmployeeCollection().Where(Function(item) random.Next(2) = 0).Distinct().Take(8)\r\n            data.Add(New RandomEmployeeDetails(employee))\r\n        Next employee\r\n        MyDataGrid.ItemsSource = data\r\n    End Sub\r\nEnd Class\r\n</sys:String>\r\n    </src:SourceFile.Source>\r\n  </src:SourceFile>\r\n  <src:SourceFile Path=\"RandomEmployeeDetails.cs\">\r\n    <src:SourceFile.Source>\r\n      <sys:String>// (c) Copyright Microsoft Corporation.\r\n// This source is subject to [###LICENSE_NAME###].\r\n// Please see [###LICENSE_LINK###] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections;\r\nusing System.Collections.ObjectModel;\r\nusing System.Collections.Specialized;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    /// &lt;summary&gt;\r\n    /// RandomEmployeeDetails is a sample type that contains mostly random data \r\n    /// for use in DataGrid sample scenarios.\r\n    /// &lt;/summary&gt;\r\n    public class RandomEmployeeDetails\r\n    {\r\n        /// &lt;summary&gt;\r\n        /// A random number generator.\r\n        /// &lt;/summary&gt;\r\n        private static Random RandomGenerator = new Random();\r\n\r\n        /// &lt;summary&gt;\r\n        /// Initializes a new instance of the RandomEmployeeDetails type. A \r\n        /// random number and bool value will be generated in the constructor.\r\n        /// &lt;/summary&gt;\r\n        public RandomEmployeeDetails()\r\n        {\r\n            RandomNumber = RandomGenerator.Next();\r\n            RandomTrueFalse = RandomGenerator.Next(0, 2) == 1;\r\n        }\r\n\r\n        /// &lt;summary&gt;\r\n        /// Initializes a new instance of the RandomEmployeeDetails type.\r\n        /// &lt;/summary&gt;\r\n        /// &lt;param name=\"employee\"&gt;An Employee object to read the Name from.&lt;/param&gt;\r\n        public RandomEmployeeDetails(Employee employee) : this()\r\n        {\r\n            Name = employee.DisplayName;\r\n        }\r\n\r\n        /// &lt;summary&gt;\r\n        /// Gets or sets a name.\r\n        /// &lt;/summary&gt;\r\n        public string Name { get; set; }\r\n\r\n        /// &lt;summary&gt;\r\n        /// Gets or sets a random number.\r\n        /// &lt;/summary&gt;\r\n        public int RandomNumber { get; set; }\r\n\r\n        /// &lt;summary&gt;\r\n        /// Gets or sets a value indicating whether the value is true or false.\r\n        /// &lt;/summary&gt;\r\n        public bool RandomTrueFalse { get; set; }\r\n    }\r\n}</sys:String>\r\n    </src:SourceFile.Source>\r\n  </src:SourceFile>\r\n  <src:SourceFile Path=\"RandomEmployeeDetails.vb\">\r\n    <src:SourceFile.Source>\r\n      <sys:String>' (c) Copyright Microsoft Corporation.\r\n' This source is subject to [###LICENSE_NAME###].\r\n' Please see [###LICENSE_LINK###] for details.\r\n' All other rights reserved.\r\n\r\n\r\nImports Microsoft.VisualBasic\r\nImports System\r\nImports System.Collections\r\nImports System.Collections.ObjectModel\r\nImports System.Collections.Specialized\r\nImports System.Windows\r\nImports System.Windows.Controls\r\nImports System.Windows.Input\r\n\r\n''' &lt;summary&gt;\r\n''' RandomEmployeeDetails is a sample type that contains mostly random data \r\n''' for use in DataGrid sample scenarios.\r\n''' &lt;/summary&gt;\r\nPublic Class RandomEmployeeDetails\r\n    ''' &lt;summary&gt;\r\n    ''' A random number generator.\r\n    ''' &lt;/summary&gt;\r\n    Private Shared RandomGenerator As New Random()\r\n\r\n    ''' &lt;summary&gt;\r\n    ''' Initializes a new instance of the RandomEmployeeDetails type. A \r\n    ''' random number and bool value will be generated in the constructor.\r\n    ''' &lt;/summary&gt;\r\n    Public Sub New()\r\n        RandomNumber = RandomGenerator.Next()\r\n        RandomTrueFalse = RandomGenerator.Next(0, 2) = 1\r\n    End Sub\r\n\r\n    ''' &lt;summary&gt;\r\n    ''' Initializes a new instance of the RandomEmployeeDetails type.\r\n    ''' &lt;/summary&gt;\r\n    ''' &lt;param name=\"employee\"&gt;An Employee object to read the Name from.&lt;/param&gt;\r\n    Public Sub New(ByVal employee As Employee)\r\n        Me.New()\r\n        Name = employee.DisplayName\r\n    End Sub\r\n\r\n    ''' &lt;summary&gt;\r\n    ''' Gets or sets a name.\r\n    ''' &lt;/summary&gt;\r\n    Private privateName As String\r\n    Public Property Name() As String\r\n        Get\r\n            Return privateName\r\n        End Get\r\n        Set(ByVal value As String)\r\n            privateName = value\r\n        End Set\r\n    End Property\r\n\r\n    ''' &lt;summary&gt;\r\n    ''' Gets or sets a random number.\r\n    ''' &lt;/summary&gt;\r\n    Private privateRandomNumber As Integer\r\n    Public Property RandomNumber() As Integer\r\n        Get\r\n            Return privateRandomNumber\r\n        End Get\r\n        Set(ByVal value As Integer)\r\n            privateRandomNumber = value\r\n        End Set\r\n    End Property\r\n\r\n    ''' &lt;summary&gt;\r\n    ''' Gets or sets a value indicating whether the value is true or false.\r\n    ''' &lt;/summary&gt;\r\n    Private privateRandomTrueFalse As Boolean\r\n    Public Property RandomTrueFalse() As Boolean\r\n        Get\r\n            Return privateRandomTrueFalse\r\n        End Get\r\n        Set(ByVal value As Boolean)\r\n            privateRandomTrueFalse = value\r\n        End Set\r\n    End Property\r\nEnd Class\r\n</sys:String>\r\n    </src:SourceFile.Source>\r\n  </src:SourceFile>\r\n  <src:SourceFile Path=\"SampleEmployeeCollection.cs\">\r\n    <src:SourceFile.Source>\r\n      <sys:String>// (c) Copyright Microsoft Corporation.\r\n// This source is subject to [###LICENSE_NAME###].\r\n// Please see [###LICENSE_LINK###] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections;\r\nusing System.Windows.Controls;\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    /// &lt;summary&gt;\r\n    /// A collection type that makes it easy to place sample employee data into \r\n    /// XAML.\r\n    /// &lt;/summary&gt;\r\n    public class SampleEmployeeCollection : ObjectCollection\r\n    {\r\n        /// &lt;summary&gt;\r\n        /// Initializes a new instance of the SampleEmployeeCollection class.\r\n        /// &lt;/summary&gt;\r\n        public SampleEmployeeCollection()\r\n            : base(Employee.AllExecutives)\r\n        {\r\n        }\r\n    }\r\n}</sys:String>\r\n    </src:SourceFile.Source>\r\n  </src:SourceFile>\r\n  <src:SourceFile Path=\"SampleEmployeeCollection.vb\">\r\n    <src:SourceFile.Source>\r\n      <sys:String>' (c) Copyright Microsoft Corporation.\r\n' This source is subject to [###LICENSE_NAME###].\r\n' Please see [###LICENSE_LINK###] for details.\r\n' All other rights reserved.\r\n\r\nImports Microsoft.VisualBasic\r\nImports System\r\nImports System.Collections\r\nImports System.Windows.Controls\r\n\r\n''' &lt;summary&gt;\r\n''' A collection type that makes it easy to place sample employee data into \r\n''' XAML.\r\n''' &lt;/summary&gt;\r\nPublic Class SampleEmployeeCollection\r\n    Inherits ObjectCollection\r\n    ''' &lt;summary&gt;\r\n    ''' Initializes a new instance of the SampleEmployeeCollection class.\r\n    ''' &lt;/summary&gt;\r\n    Public Sub New()\r\n        MyBase.New(Employee.AllExecutives)\r\n    End Sub\r\nEnd Class\r\n</sys:String>\r\n    </src:SourceFile.Source>\r\n  </src:SourceFile>\r\n</src:SourceViewer>\r\n    </StackPanel>\r\n</UserControl>\r\n"
  },
  {
    "path": "WpfToolkit/Samples/AutoCompleteBox/DataGridAutoCompleteBoxEdit.xaml.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to [###LICENSE_NAME###].\r\n// Please see [###LICENSE_LINK###] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.ComponentModel;\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    /// <summary>\r\n    /// The DataGridAutoCompleteBoxEdit class selects a small set of data to \r\n    /// display in the DataGrid. The XAML file contains the custom editing \r\n    /// template for AutoCompleteBox.\r\n    /// </summary>\r\n    [Sample(\"DataGrid Editing\", DifficultyLevel.Advanced)]\r\n    [Category(\"AutoCompleteBox\")]\r\n    public partial class DataGridAutoCompleteBoxEdit : UserControl\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the DataGridAutoCompleteBoxEdit type.\r\n        /// </summary>\r\n        public DataGridAutoCompleteBoxEdit()\r\n        {\r\n            InitializeComponent();\r\n            Loaded += OnLoaded;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handle the Loaded event of the page. This creates a small, random \r\n        /// set of data to display in the grid.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event arguments.</param>\r\n        private void OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            List<RandomEmployeeDetails> data = new List<RandomEmployeeDetails>();\r\n            Random random = new Random();\r\n\r\n            // Select up to 8 random employees\r\n            foreach (Employee employee in \r\n                new SampleEmployeeCollection()\r\n                    .Where(item => random.Next(2) == 0)\r\n                    .Distinct()\r\n                    .Take(8))\r\n            {\r\n                data.Add(new RandomEmployeeDetails(employee));\r\n            }\r\n            MyDataGrid.ItemsSource = data;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Samples/AutoCompleteBox/DataGridSelectionAdapter.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections;\r\nusing System.Collections.ObjectModel;\r\nusing System.Collections.Specialized;\r\nusing System.Windows;\r\nusing System.Windows.Automation.Peers;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    /// <summary>\r\n    /// An implementation of ISelectionAdapter for the DataGrid control. This \r\n    /// adapter, unlike the standard SelectorSelectionAdapter, actually derives \r\n    /// directly from DataGrid.\r\n    /// </summary>\r\n    public class DataGridSelectionAdapter : DataGrid, ISelectionAdapter\r\n    {\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether the selection should be \r\n        /// ignored. Since the DataGrid automatically selects the first row \r\n        /// whenever the data changes, this simple implementation only works \r\n        /// with key navigation and mouse clicks. This prevents the text box \r\n        /// of the AutoCompleteBox control from being updated continuously.\r\n        /// </summary>\r\n        private bool IgnoreAnySelection { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether the selection change event \r\n        /// should not be fired.\r\n        /// </summary>\r\n        private bool IgnoringSelectionChanged { get; set; }\r\n\r\n        /// <summary>\r\n        /// Occurs when the currently selected item changes.\r\n        /// </summary>\r\n        public new event SelectionChangedEventHandler SelectionChanged;\r\n\r\n        /// <summary>\r\n        /// An event that indicates that a selection is complete and has been \r\n        /// made, effectively a commit action.\r\n        /// </summary>\r\n        public event RoutedEventHandler Commit;\r\n\r\n        /// <summary>\r\n        /// An event that indicates that the selection operation has been \r\n        /// canceled.\r\n        /// </summary>\r\n        public event RoutedEventHandler Cancel;\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the SelectorSelectionAdapter class.\r\n        /// </summary>\r\n        public DataGridSelectionAdapter()\r\n        {\r\n            base.SelectionChanged += OnSelectionChanged;\r\n            MouseLeftButtonUp += OnSelectorMouseLeftButtonUp;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the selected item through the adapter.\r\n        /// </summary>\r\n        public new object SelectedItem\r\n        {\r\n            get\r\n            {\r\n                return base.SelectedItem;\r\n            }\r\n\r\n            set\r\n            {\r\n                IgnoringSelectionChanged = true;\r\n                base.SelectedItem = value;\r\n                IgnoringSelectionChanged = false;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the mouse left button up event on the selector control.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void OnSelectorMouseLeftButtonUp(object sender, MouseButtonEventArgs e)\r\n        {\r\n            IgnoreAnySelection = false;\r\n\r\n            OnSelectionChanged(this, null);\r\n            OnCommit(this, new RoutedEventArgs());\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the SelectionChanged event on the Selector control.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The selection changed event data.</param>\r\n        private void OnSelectionChanged(object sender, SelectionChangedEventArgs e)\r\n        {\r\n            if (IgnoringSelectionChanged)\r\n            {\r\n                return;\r\n            }\r\n\r\n            if (IgnoreAnySelection)\r\n            {\r\n                return;\r\n            }\r\n\r\n            SelectionChangedEventHandler handler = this.SelectionChanged;\r\n            if (handler != null)\r\n            {\r\n                handler(sender, e);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the items source.\r\n        /// </summary>\r\n        public new IEnumerable ItemsSource\r\n        {\r\n            get { return base.ItemsSource; }\r\n            \r\n            set\r\n            {\r\n                if (base.ItemsSource != null)\r\n                {\r\n                    INotifyCollectionChanged notify = base.ItemsSource as INotifyCollectionChanged;\r\n                    if (notify != null)\r\n                    {\r\n                        notify.CollectionChanged -= OnCollectionChanged;\r\n                    }\r\n                }\r\n\r\n                base.ItemsSource = value;\r\n\r\n                if (base.ItemsSource != null)\r\n                {\r\n                    INotifyCollectionChanged notify = base.ItemsSource as INotifyCollectionChanged;\r\n                    if (notify != null)\r\n                    {\r\n                        notify.CollectionChanged += OnCollectionChanged;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the CollectionChanged event, resetting the selection \r\n        /// ignore flag.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void OnCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)\r\n        {\r\n            IgnoreAnySelection = true;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the observable collection set by AutoCompleteBox.\r\n        /// </summary>\r\n        private new ObservableCollection<object> Items\r\n        {\r\n            get { return ItemsSource as ObservableCollection<object>; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Increment the selected index, or wrap.\r\n        /// </summary>\r\n        private void SelectedIndexIncrement()\r\n        {\r\n            SelectedIndex = SelectedIndex + 1 >= Items.Count ? -1 : SelectedIndex + 1;\r\n            ScrollIntoView(SelectedItem, this.Columns[0]);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Decrement the SelectedIndex, or wrap around, inside the nested \r\n        /// SelectionAdapter's control.\r\n        /// </summary>\r\n        private void SelectedIndexDecrement()\r\n        {\r\n            int index = SelectedIndex;\r\n            if (index >= 0)\r\n            {\r\n                SelectedIndex--;\r\n            }\r\n            else if (index == -1)\r\n            {\r\n                SelectedIndex = Items.Count - 1;\r\n            }\r\n\r\n            ScrollIntoView(SelectedItem, this.Columns[0]);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Process a key down event.\r\n        /// </summary>\r\n        /// <param name=\"e\">The key event arguments object.</param>\r\n        public void HandleKeyDown(KeyEventArgs e)\r\n        {\r\n            switch (e.Key)\r\n            {\r\n                case Key.Enter:\r\n                    OnCommit(this, e);\r\n                    e.Handled = true;\r\n                    break;\r\n\r\n                case Key.Up:\r\n                    IgnoreAnySelection = false; \r\n                    SelectedIndexDecrement();\r\n                    e.Handled = true;\r\n                    break;\r\n\r\n                case Key.Down:\r\n                    if ((ModifierKeys.Alt & Keyboard.Modifiers) == ModifierKeys.None)\r\n                    {\r\n                        IgnoreAnySelection = false;\r\n                        SelectedIndexIncrement();\r\n                        e.Handled = true;\r\n                    }\r\n                    break;\r\n\r\n                case Key.Escape:\r\n                    OnCancel(this, e);\r\n                    e.Handled = true;\r\n                    break;\r\n\r\n                default:\r\n                    break;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Fires the Commit event.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void OnCommit(object sender, RoutedEventArgs e)\r\n        {\r\n            RoutedEventHandler handler = Commit;\r\n            if (handler != null)\r\n            {\r\n                handler(sender, e);\r\n            }\r\n\r\n            AfterAdapterAction();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Fires the Cancel event.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void OnCancel(object sender, RoutedEventArgs e)\r\n        {\r\n            RoutedEventHandler handler = Cancel;\r\n            if (handler != null)\r\n            {\r\n                handler(sender, e);\r\n            }\r\n\r\n            AfterAdapterAction();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Change the selection after the actions are complete.\r\n        /// </summary>\r\n        private void AfterAdapterAction()\r\n        {\r\n            IgnoringSelectionChanged = true;\r\n            SelectedItem = null;\r\n            SelectedIndex = -1;\r\n            IgnoringSelectionChanged = false;\r\n\r\n            // Reset, to ignore any future changes\r\n            IgnoreAnySelection = true;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of a DataGridAutomationPeer.\r\n        /// </summary>\r\n        /// <returns>Returns a new DataGridAutomationPeer.</returns>\r\n        public AutomationPeer CreateAutomationPeer()\r\n        {\r\n            return new DataGridAutomationPeer(this);\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Samples/AutoCompleteBox/DictionaryKeyValueConverter.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Diagnostics;\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.Reflection;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Data;\r\nusing System.Windows.Media.Imaging;\r\nusing System.Windows.Controls;\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    /// <summary>\r\n    /// A simple value converter.\r\n    /// </summary>\r\n    /// <typeparam name=\"TKey\">The key type.</typeparam>\r\n    /// <typeparam name=\"TValue\">The value type.</typeparam>\r\n    public class DictionaryKeyValueConverter<TKey, TValue> : IValueConverter\r\n    {\r\n        /// <summary>\r\n        /// Converts the value back.\r\n        /// </summary>\r\n        /// <param name=\"value\">The object reference.</param>\r\n        /// <param name=\"targetType\">The type object.</param>\r\n        /// <param name=\"parameter\">The optional parameter.</param>\r\n        /// <param name=\"culture\">The optional culture.</param>\r\n        /// <returns>Returns an object or null.</returns>\r\n        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            return null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Convert the object to a string.\r\n        /// </summary>\r\n        /// <param name=\"value\">The object reference.</param>\r\n        /// <param name=\"targetType\">The type object.</param>\r\n        /// <param name=\"parameter\">The optional parameter.</param>\r\n        /// <param name=\"culture\">The optional culture.</param>\r\n        /// <returns>Returns an object or null.</returns>\r\n        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r\n        {\r\n            if (value is KeyValuePair<TKey, TValue>)\r\n            {\r\n                KeyValuePair<TKey, TValue> pair = (KeyValuePair<TKey, TValue>)value;\r\n                return pair.Key.ToString();\r\n            }\r\n\r\n            return null;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Samples/AutoCompleteBox/RandomEmployeeDetails.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections;\r\nusing System.Collections.ObjectModel;\r\nusing System.Collections.Specialized;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Input;\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    /// <summary>\r\n    /// RandomEmployeeDetails is a sample type that contains mostly random data \r\n    /// for use in DataGrid sample scenarios.\r\n    /// </summary>\r\n    public class RandomEmployeeDetails\r\n    {\r\n        /// <summary>\r\n        /// A random number generator.\r\n        /// </summary>\r\n        private static Random RandomGenerator = new Random();\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the RandomEmployeeDetails type. A \r\n        /// random number and bool value will be generated in the constructor.\r\n        /// </summary>\r\n        public RandomEmployeeDetails()\r\n        {\r\n            RandomNumber = RandomGenerator.Next();\r\n            RandomTrueFalse = RandomGenerator.Next(0, 2) == 1;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the RandomEmployeeDetails type.\r\n        /// </summary>\r\n        /// <param name=\"employee\">An Employee object to read the Name from.</param>\r\n        public RandomEmployeeDetails(Employee employee) : this()\r\n        {\r\n            Name = employee.DisplayName;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a name.\r\n        /// </summary>\r\n        public string Name { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a random number.\r\n        /// </summary>\r\n        public int RandomNumber { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether the value is true or false.\r\n        /// </summary>\r\n        public bool RandomTrueFalse { get; set; }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Samples/AutoCompleteBox/SampleEmployeeCollection.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections;\r\nusing System.Windows.Controls;\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    /// <summary>\r\n    /// A collection type that makes it easy to place sample employee data into \r\n    /// XAML.\r\n    /// </summary>\r\n    public class SampleEmployeeCollection : ObjectCollection\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the SampleEmployeeCollection class.\r\n        /// </summary>\r\n        public SampleEmployeeCollection()\r\n            : base(Employee.AllExecutives)\r\n        {\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Samples/AutoCompleteBox/SearchSuggestionSample.xaml",
    "content": "﻿<!--\r\n// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n-->\r\n\r\n<UserControl x:Class=\"System.Windows.Controls.Samples.SearchSuggestionSample\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" \r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:system=\"clr-namespace:System;assembly=mscorlib\"\r\n    xmlns:samplesCommon=\"clr-namespace:System.Windows.Controls.Samples\"\r\n    xmlns:input=\"clr-namespace:System.Windows.Controls;assembly=DotNetProjects.Input.Toolkit\">\r\n\r\n    <UserControl.Resources>\r\n        <ImageBrush x:Key=\"SearchSuggestionsImageBrush\" ImageSource=\"Venice.jpg\" Stretch=\"None\" />\r\n        \r\n        <Style x:Key=\"SearchTextBoxStyle\" TargetType=\"TextBox\">\r\n            <Setter Property=\"Background\" Value=\"#AAFFFFFF\" />\r\n            <Setter Property=\"FontFamily\" Value=\"Verdana\" />\r\n            <Setter Property=\"FontSize\" Value=\"18\" />\r\n            <Setter Property=\"Padding\" Value=\"2\" />\r\n        </Style>\r\n    </UserControl.Resources>\r\n    \r\n    <StackPanel>\r\n        <ContentControl Content=\"Bing Search Suggestions\" Style=\"{StaticResource Header}\" />\r\n\r\n        <!-- AutoCompleteBox example -->\r\n        <Grid Width=\"650\" Height=\"406\" Background=\"{StaticResource SearchSuggestionsImageBrush}\">\r\n            <StackPanel Width=\"490\" Orientation=\"Horizontal\" VerticalAlignment=\"Top\" Margin=\"10,119,10,0\">\r\n\r\n                <Image Source=\"Bing.png\" Stretch=\"None\" />\r\n\r\n                <Grid Width=\"300\" Height=\"34\" Margin=\"8,0,0,0\">\r\n\r\n                    <input:AutoCompleteBox \r\n                        FilterMode=\"None\"\r\n                        x:Name=\"Search\" \r\n                        TextBoxStyle=\"{StaticResource SearchTextBoxStyle}\"\r\n                        IsEnabled=\"False\" />\r\n                    <Button x:Name=\"Go\" Cursor=\"Hand\" IsEnabled=\"False\" Width=\"32\" Height=\"32\" HorizontalAlignment=\"Right\" BorderThickness=\"0,0,0,0\" RenderTransformOrigin=\"0.5,0.5\">\r\n                        <Button.RenderTransform>\r\n                            <TransformGroup>\r\n                                <ScaleTransform ScaleX=\"0.85\" ScaleY=\"0.85\"/>\r\n                                <SkewTransform/>\r\n                                <RotateTransform/>\r\n                                <TranslateTransform/>\r\n                            </TransformGroup>\r\n                        </Button.RenderTransform>\r\n                        <Button.Template>\r\n                            <ControlTemplate TargetType=\"Button\">\r\n                                <Grid Margin=\"0\" x:Name=\"RootElement\">\r\n                                    <Rectangle Margin=\"0\" Stroke=\"#FF000000\" StrokeThickness=\"0\" RadiusX=\"2.5\" RadiusY=\"2.5\">\r\n                                        <Rectangle.Fill>\r\n                                            <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                                <GradientStop Color=\"#FFFCAA24\" Offset=\"0\" />\r\n                                                <GradientStop Color=\"#FFFF860A\" Offset=\"1\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Rectangle.Fill>\r\n                                    </Rectangle>\r\n                                    <Ellipse Height=\"16.105\" Margin=\"0,6.438,5,0\" VerticalAlignment=\"Top\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"2\" Width=\"15.938\" HorizontalAlignment=\"Right\"/>\r\n                                    <Path Height=\"7.875\" HorizontalAlignment=\"Left\" Margin=\"7.754,0,0,6.467\" VerticalAlignment=\"Bottom\" Width=\"7.75\" Fill=\"#FFFFFFFF\" Stretch=\"Fill\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"2\" Data=\"M14.097251,19.182762 L8.7665224,24.552877\"/>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                        </Button.Template>\r\n                    </Button>\r\n                </Grid>\r\n            </StackPanel>\r\n\r\n\r\n            <!-- Hosting warning message -->\r\n            <StackPanel x:Name=\"HostingWarning\" Background=\"#88000000\">\r\n                <StackPanel Background=\"#aaffffff\" Margin=\"6\">\r\n                    <TextBlock Margin=\"6\" FontWeight=\"Bold\">This sample must be hosted on a web server.</TextBlock>\r\n                    <TextBlock Margin=\"6\" TextWrapping=\"Wrap\">A cross-domain web service call can only be made when the page is hosted from a server via the HTTP scheme. Consider hosting this using IIS, the built-in Web Development Server in Visual Studio, or another server technology. At this time, this sample is also not supported in Out of Browser scenarios.</TextBlock>\r\n                </StackPanel>\r\n            </StackPanel>\r\n\r\n        </Grid>\r\n    </StackPanel>\r\n</UserControl>"
  },
  {
    "path": "WpfToolkit/Samples/AutoCompleteBox/SearchSuggestionSample.xaml.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\nusing System.Net;\r\nusing System.Windows;\r\n#if SILVERLIGHT\r\nusing System.Json;\r\nusing System.Windows.Browser;\r\n#else\r\nusing System.Web;\r\n#endif\r\nusing System.Windows.Controls;\r\nusing System.ComponentModel;\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    /// <summary>\r\n    /// A simple auto complete search suggestions sample that connects to a \r\n    /// real web service.\r\n    /// </summary>\r\n#if SILVERLIGHT\r\n    [Sample(\"Search Suggestions\", DifficultyLevel.Scenario)]\r\n#endif\r\n    [Category(\"AutoCompleteBox\")]\r\n    public partial class SearchSuggestionSample : UserControl\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the SearchSuggestionSample class.\r\n        /// </summary>\r\n        public SearchSuggestionSample()\r\n        {\r\n            InitializeComponent();\r\n            Loaded += OnLoaded;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles the Loaded event by initializing the control for live web \r\n        /// service use if the stack is available.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void OnLoaded(object sender, RoutedEventArgs e)\r\n        {\r\n            if (WebServiceHelper.CanMakeHttpRequests)\r\n            {\r\n                HostingWarning.Visibility = Visibility.Collapsed;\r\n                Go.IsEnabled = true;\r\n                Search.IsEnabled = true;\r\n\r\n                Search.Populating += Search_Populating;\r\n#if SILVERLIGHT\r\n                Action go = () => HtmlPage.Window.Navigate(WebServiceHelper.CreateWebSearchUri(Search.Text), \"_blank\");\r\n#else\r\n                Action go = () => System.Diagnostics.Process.Start(WebServiceHelper.CreateWebSearchUri(Search.Text).ToString());\r\n#endif\r\n                Search.KeyUp += (s, args) =>\r\n                    {\r\n                        if (args.Key == System.Windows.Input.Key.Enter)\r\n                        {\r\n                            go();\r\n                        }\r\n                    };\r\n                Go.Click += (s, args) => go();\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handle and cancel the Populating event, and kick off the web service\r\n        /// request.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        private void Search_Populating(object sender, PopulatingEventArgs e)\r\n        {\r\n            AutoCompleteBox autoComplete = (AutoCompleteBox)sender;\r\n\r\n            // Allow us to wait for the response\r\n            e.Cancel = true;\r\n\r\n            // Create a request for suggestion\r\n            WebClient wc = new WebClient();\r\n            wc.DownloadStringCompleted += OnDownloadStringCompleted;\r\n            wc.DownloadStringAsync(WebServiceHelper.CreateWebSearchSuggestionsUri(autoComplete.SearchText), autoComplete);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handle the string download completed event of WebClient.\r\n        /// </summary>\r\n        /// <param name=\"sender\">The source object.</param>\r\n        /// <param name=\"e\">The event data.</param>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1031:DoNotCatchGeneralExceptionTypes\", Justification = \"Any failure in the Json or request parsing should not be surfaced.\")]\r\n        private void OnDownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)\r\n        {\r\n            AutoCompleteBox autoComplete = e.UserState as AutoCompleteBox;\r\n            if (autoComplete != null && e.Error == null && !e.Cancelled && !string.IsNullOrEmpty(e.Result))\r\n            {\r\n                List<string> data = new List<string>();\r\n                try\r\n                {\r\n#if SILVERLIGHT\r\n                    JsonArray result = (JsonArray)JsonArray.Parse(e.Result);\r\n                    if (result.Count > 1)\r\n                    {\r\n                        string originalSearchString = result[0];\r\n                        if (originalSearchString == autoComplete.SearchText)\r\n                        {\r\n                            JsonArray suggestions = (JsonArray)result[1];\r\n                            foreach (JsonPrimitive suggestion in suggestions)\r\n                            {\r\n                                data.Add(suggestion);\r\n                            }\r\n                        }\r\n                    }\r\n#else\r\n                    System.Text.RegularExpressions.Regex jsonRegEx = new System.Text.RegularExpressions.Regex(\r\n                              \"^\\\\[(?<SearchItem>.*),\\\\[(?:(?<Items>[^,\\\\n]+),)*(?<LastItem>\" +\r\n                              \".*)?\\\\]\\\\]$\", System.Text.RegularExpressions.RegexOptions.Multiline\r\n                                    | System.Text.RegularExpressions.RegexOptions.Compiled);\r\n                    System.Text.RegularExpressions.Match match = jsonRegEx.Match(e.Result);\r\n                    if (match.Groups[\"Items\"] != null)\r\n                    {\r\n                        foreach (System.Text.RegularExpressions.Capture capture in match.Groups[\"Items\"].Captures)\r\n                        {\r\n                            if (!String.IsNullOrEmpty(capture.Value))\r\n                            {\r\n                                data.Add(capture.Value.TrimStart('\"').TrimEnd('\"'));\r\n                            }\r\n                        }\r\n                    }\r\n                    if (match.Groups[\"LastItem\"] != null && match.Groups[\"LastItem\"].Captures.Count == 1 && !String.IsNullOrEmpty(match.Groups[\"LastItem\"].Captures[0].Value))\r\n                    {\r\n                        data.Add(match.Groups[\"LastItem\"].Captures[0].Value.TrimStart('\"').TrimEnd('\"'));\r\n                    }\r\n#endif\r\n\r\n                    // Diplay the AutoCompleteBox drop down with any suggestions\r\n                    if (data.Count > 0)\r\n                    {\r\n                        autoComplete.ItemsSource = data;\r\n                        autoComplete.PopulateComplete();\r\n                    }\r\n                }\r\n                catch\r\n                {\r\n                }\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Samples/BlogPostData.xml",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Posts>\r\n  <Post>\r\n    <Title>Why me? Why now?? [Introduction and technical background]</Title>\r\n    <Date>2006-02-24T20:29:00</Date>\r\n    <Tags>\r\n      <Tag>Miscellaneous</Tag>\r\n    </Tags>\r\n    <Length>1453</Length>\r\n    <Popularity>0.0035809018567639259</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>ASP.Newbie [Learning ASP.NET for fun and profit]</Title>\r\n    <Date>2006-02-25T06:23:00</Date>\r\n    <Tags>\r\n      <Tag>Technical</Tag>\r\n    </Tags>\r\n    <Length>1810</Length>\r\n    <Popularity>0.00610079575596817</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>An image is worth a thousand HTML tags [How to: Display a custom image with an ASP.NET web page]</Title>\r\n    <Date>2006-02-27T11:00:00</Date>\r\n    <Tags>\r\n      <Tag>Technical</Tag>\r\n    </Tags>\r\n    <Length>5038</Length>\r\n    <Popularity>0.013527851458885942</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Start using using today! [A bit about the IDisposable interface and the using statement]</Title>\r\n    <Date>2006-03-01T11:44:00</Date>\r\n    <Tags>\r\n      <Tag>Technical</Tag>\r\n    </Tags>\r\n    <Length>4937</Length>\r\n    <Popularity>0.0050397877984084882</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>An image is now worth two thousand HTML tags [How to: Use ASP.NET's IHttpHandler interface to display a custom image]</Title>\r\n    <Date>2006-03-07T23:58:00</Date>\r\n    <Tags>\r\n      <Tag>Technical</Tag>\r\n    </Tags>\r\n    <Length>3972</Length>\r\n    <Popularity>0.0042440318302387264</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Working hard / hardly working [A bit about my new team]</Title>\r\n    <Date>2006-03-15T09:50:00</Date>\r\n    <Tags>\r\n      <Tag>Miscellaneous</Tag>\r\n    </Tags>\r\n    <Length>1014</Length>\r\n    <Popularity>0.0027851458885941646</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>When the GAC makes you gack (Part 1) [How something can be both IN and NOT IN the GAC at the same time]</Title>\r\n    <Date>2006-03-23T11:09:00</Date>\r\n    <Tags>\r\n      <Tag>Technical</Tag>\r\n    </Tags>\r\n    <Length>3933</Length>\r\n    <Popularity>0.1026525198938992</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>When the GAC makes you gack (Part 2) [How something can be both IN and NOT IN the GAC at the same time]</Title>\r\n    <Date>2006-03-27T16:00:00</Date>\r\n    <Tags>\r\n      <Tag>Technical</Tag>\r\n    </Tags>\r\n    <Length>4313</Length>\r\n    <Popularity>0.029045092838196288</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>ASP.NET and \"Atlas\" make AJAX easy [The Agility Team's \"Atlas\" Control Toolkit is available for download!]</Title>\r\n    <Date>2006-04-12T16:14:00</Date>\r\n    <Tags>\r\n      <Tag>AJAX Control Toolkit</Tag>\r\n    </Tags>\r\n    <Length>3298</Length>\r\n    <Popularity>0.0029177718832891246</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Good news is good news! [Coverage of the \"Atlas\" Control Toolkit release is favorable!]</Title>\r\n    <Date>2006-04-14T11:06:00</Date>\r\n    <Tags>\r\n      <Tag>AJAX Control Toolkit</Tag>\r\n    </Tags>\r\n    <Length>4321</Length>\r\n    <Popularity>0.0005305039787798408</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Three weeks since we shipped? Must be time to ship again! [\"Atlas\" Control Toolkit updated!]</Title>\r\n    <Date>2006-05-05T10:34:00</Date>\r\n    <Tags>\r\n      <Tag>AJAX Control Toolkit</Tag>\r\n    </Tags>\r\n    <Length>3792</Length>\r\n    <Popularity>0.000663129973474801</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>A brief bit 'bout backups [My current backup strategy]</Title>\r\n    <Date>2006-05-31T07:24:00</Date>\r\n    <Tags>\r\n      <Tag>Technical</Tag>\r\n    </Tags>\r\n    <Length>7244</Length>\r\n    <Popularity>0.0055702917771883291</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>A late announcement and an even later announcement [\"Atlas\" Control Toolkit updated (twice)!]</Title>\r\n    <Date>2006-08-14T10:42:00</Date>\r\n    <Tags>\r\n      <Tag>AJAX Control Toolkit</Tag>\r\n    </Tags>\r\n    <Length>4045</Length>\r\n    <Popularity>0.00079575596816976125</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>An example of watermark-friendly popping [How to: Integrate the PopupControl and TextBoxWatermark]</Title>\r\n    <Date>2006-08-15T17:47:00</Date>\r\n    <Tags>\r\n      <Tag>AJAX Control Toolkit</Tag>\r\n    </Tags>\r\n    <Length>18981</Length>\r\n    <Popularity>0.0486737400530504</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Nearly breaking news [\"Atlas\" Control Toolkit updated again!]</Title>\r\n    <Date>2006-09-19T11:29:00</Date>\r\n    <Tags>\r\n      <Tag>AJAX Control Toolkit</Tag>\r\n    </Tags>\r\n    <Length>4302</Length>\r\n    <Popularity>0.0013262599469496021</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Dynamic content made easy [How to: Use the new dynamic population support for Toolkit controls]</Title>\r\n    <Date>2006-09-19T14:16:00</Date>\r\n    <Tags>\r\n      <Tag>AJAX Control Toolkit</Tag>\r\n    </Tags>\r\n    <Length>21718</Length>\r\n    <Popularity>0.28315649867374004</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Talkin' Toolkit [Speaking at the ASP.NET Connections conference in November]</Title>\r\n    <Date>2006-10-06T12:21:00</Date>\r\n    <Tags>\r\n      <Tag>AJAX Control Toolkit</Tag>\r\n    </Tags>\r\n    <Length>1231</Length>\r\n    <Popularity>0.000663129973474801</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>ASP.NET AJAX née \"Atlas\" - and all that entails... [AJAX Control Toolkit update!]</Title>\r\n    <Date>2006-10-20T16:13:00</Date>\r\n    <Tags>\r\n      <Tag>AJAX Control Toolkit</Tag>\r\n    </Tags>\r\n    <Length>4483</Length>\r\n    <Popularity>0.0025198938992042441</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Talked Toolkit [Spoke at the ASP.NET Connections conference]</Title>\r\n    <Date>2006-11-07T17:07:00</Date>\r\n    <Tags>\r\n      <Tag>AJAX Control Toolkit</Tag>\r\n    </Tags>\r\n    <Length>1383</Length>\r\n    <Popularity>0.011273209549071617</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Just what it takes for Beta 2 [AJAX Control Toolkit update!]</Title>\r\n    <Date>2006-11-08T16:55:00</Date>\r\n    <Tags>\r\n      <Tag>AJAX Control Toolkit</Tag>\r\n    </Tags>\r\n    <Length>1760</Length>\r\n    <Popularity>0</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Dynamic content made easy *redux* [How to: Use the new dynamic population support for Toolkit controls]</Title>\r\n    <Date>2006-11-17T19:55:00</Date>\r\n    <Tags>\r\n      <Tag>AJAX Control Toolkit</Tag>\r\n    </Tags>\r\n    <Length>21522</Length>\r\n    <Popularity>0.32201591511936339</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Another quick, small-scale release [AJAX Control Toolkit update!]</Title>\r\n    <Date>2006-11-21T17:24:00</Date>\r\n    <Tags>\r\n      <Tag>AJAX Control Toolkit</Tag>\r\n    </Tags>\r\n    <Length>4127</Length>\r\n    <Popularity>0.0047745358090185673</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Dynamic content made easy *remix* [How to: Use the new dynamic population support for Toolkit controls]</Title>\r\n    <Date>2006-11-30T15:08:00</Date>\r\n    <Tags>\r\n      <Tag>AJAX Control Toolkit</Tag>\r\n    </Tags>\r\n    <Length>6905</Length>\r\n    <Popularity>0.0383289124668435</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Runnin' on the RC [AJAX Control Toolkit update!]</Title>\r\n    <Date>2006-12-14T15:25:00</Date>\r\n    <Tags>\r\n      <Tag>AJAX Control Toolkit</Tag>\r\n    </Tags>\r\n    <Length>1732</Length>\r\n    <Popularity>0.00092838196286472148</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>ASP.NET AJAX 1.0 is on the loose! [AJAX Control Toolkit update!]</Title>\r\n    <Date>2007-01-23T17:01:00</Date>\r\n    <Tags>\r\n      <Tag>AJAX Control Toolkit</Tag>\r\n    </Tags>\r\n    <Length>3315</Length>\r\n    <Popularity>0.010477453580901857</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>A quick update to address some top customer issues [AJAX Control Toolkit update!]</Title>\r\n    <Date>2007-02-01T16:07:00</Date>\r\n    <Tags>\r\n      <Tag>AJAX Control Toolkit</Tag>\r\n    </Tags>\r\n    <Length>2378</Length>\r\n    <Popularity>0.0021220159151193632</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Safely avoiding the \"access denied\" dialog [How to: Work around the access denied cross-domain IFRAME issue in the AJAX Control Toolkit]</Title>\r\n    <Date>2007-02-05T16:46:00</Date>\r\n    <Tags>\r\n      <Tag>AJAX Control Toolkit</Tag>\r\n    </Tags>\r\n    <Length>9874</Length>\r\n    <Popularity>0.53620689655172415</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Toolkit talk, take two [Spoke at the TechReady4 conference]</Title>\r\n    <Date>2007-02-08T19:43:00</Date>\r\n    <Tags>\r\n      <Tag>AJAX Control Toolkit</Tag>\r\n    </Tags>\r\n    <Length>2821</Length>\r\n    <Popularity>0.0005305039787798408</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Lost (Sk)in Translation [AJAX Control Toolkit update!]</Title>\r\n    <Date>2007-03-02T04:28:00</Date>\r\n    <Tags>\r\n      <Tag>AJAX Control Toolkit</Tag>\r\n    </Tags>\r\n    <Length>5249</Length>\r\n    <Popularity>0.019893899204244031</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>\"You're gonna need a bigger boat.\" [A brief look at data storage requirements in today's world]</Title>\r\n    <Date>2007-03-13T12:03:00</Date>\r\n    <Tags>\r\n      <Tag>Technical</Tag>\r\n    </Tags>\r\n    <Length>4096</Length>\r\n    <Popularity>0.0035809018567639259</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Computing the size of your boat [Sample code to help analyze storage space requirements]</Title>\r\n    <Date>2007-03-14T11:40:00</Date>\r\n    <Tags>\r\n      <Tag>Technical</Tag>\r\n    </Tags>\r\n    <Length>9886</Length>\r\n    <Popularity>0.0046419098143236073</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Toolkit talk two-fer! [Spoke at the ASP.NET Connections conference]</Title>\r\n    <Date>2007-03-26T15:16:00</Date>\r\n    <Tags>\r\n      <Tag>AJAX Control Toolkit</Tag>\r\n    </Tags>\r\n    <Length>2541</Length>\r\n    <Popularity>0.0014588859416445623</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>AutoComplete++ [How to: Create a multi-word auto-complete text box]</Title>\r\n    <Date>2007-03-30T16:39:00</Date>\r\n    <Tags>\r\n      <Tag>AJAX Control Toolkit</Tag>\r\n    </Tags>\r\n    <Length>12011</Length>\r\n    <Popularity>0.053846153846153849</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Toolkit patching made easy [Announcing the AJAX Control Toolkit Patch Utility]</Title>\r\n    <Date>2007-04-13T11:35:00</Date>\r\n    <Tags>\r\n      <Tag>AJAX Control Toolkit</Tag>\r\n    </Tags>\r\n    <Length>4661</Length>\r\n    <Popularity>0.010477453580901857</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>The web just got even better... [Silverlight announced at MIX07!]</Title>\r\n    <Date>2007-05-01T16:56:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n    </Tags>\r\n    <Length>6619</Length>\r\n    <Popularity>0.46777188328912467</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Lighting up the XML Paper Specification [Proof-of-concept XPS reader for Silverlight!]</Title>\r\n    <Date>2007-05-22T12:27:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n    </Tags>\r\n    <Length>9028</Length>\r\n    <Popularity>0.68156498673740051</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Silverlight \"Surface\" Demonstration [Silverlight implementation of Surface's \"photo table\" UI]</Title>\r\n    <Date>2007-06-01T01:12:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n    </Tags>\r\n    <Length>3656</Length>\r\n    <Popularity>1</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Fixes and features by popular demand [AJAX Control Toolkit update!]</Title>\r\n    <Date>2007-06-06T17:28:00</Date>\r\n    <Tags>\r\n      <Tag>AJAX Control Toolkit</Tag>\r\n    </Tags>\r\n    <Length>5482</Length>\r\n    <Popularity>0.018832891246684351</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Script combining made easy [Overview of the AJAX Control Toolkit's ToolkitScriptManager]</Title>\r\n    <Date>2007-06-11T15:39:00</Date>\r\n    <Tags>\r\n      <Tag>AJAX Control Toolkit</Tag>\r\n    </Tags>\r\n    <Length>15551</Length>\r\n    <Popularity>0.51034482758620692</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Tweaks and improvements by popular demand [AJAX Control Toolkit update!]</Title>\r\n    <Date>2007-06-18T17:59:00</Date>\r\n    <Tags>\r\n      <Tag>AJAX Control Toolkit</Tag>\r\n    </Tags>\r\n    <Length>3383</Length>\r\n    <Popularity>0.00623342175066313</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Script combining made better [Overview of improvements to the AJAX Control Toolkit's ToolkitScriptManager]</Title>\r\n    <Date>2007-06-20T15:14:00</Date>\r\n    <Tags>\r\n      <Tag>AJAX Control Toolkit</Tag>\r\n    </Tags>\r\n    <Length>11315</Length>\r\n    <Popularity>0.20344827586206896</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Powerful log file analysis for everyone [Releasing TextAnalysisTool.NET!]</Title>\r\n    <Date>2007-06-21T17:47:00</Date>\r\n    <Tags>\r\n      <Tag>Technical</Tag>\r\n      <Tag>TextAnalysisTool</Tag>\r\n    </Tags>\r\n    <Length>7132</Length>\r\n    <Popularity>0.13169761273209549</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>An easy way to keep your windows where you want them [Releasing WindowPlacementTool with source code!]</Title>\r\n    <Date>2007-07-03T15:13:00</Date>\r\n    <Tags>\r\n      <Tag>Technical</Tag>\r\n    </Tags>\r\n    <Length>5481</Length>\r\n    <Popularity>0.0033156498673740055</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>A new Framework deserves a new Toolkit [AJAX Control Toolkit updated for .NET 3.5 Beta 2!]</Title>\r\n    <Date>2007-07-26T20:32:00</Date>\r\n    <Tags>\r\n      <Tag>AJAX Control Toolkit</Tag>\r\n    </Tags>\r\n    <Length>2083</Length>\r\n    <Popularity>0.003183023872679045</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>A new Silverlight version has been released! [Samples updated for the 1.1 Refresh]</Title>\r\n    <Date>2007-07-27T16:13:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n    </Tags>\r\n    <Length>5045</Length>\r\n    <Popularity>0.033952254641909811</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Time for a little fun and games (Silverlight helps play Sudoku!)</Title>\r\n    <Date>2007-08-21T11:21:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n    </Tags>\r\n    <Length>5255</Length>\r\n    <Popularity>0.10172413793103448</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Bringing a bit of HTML to Silverlight [HtmlTextBlock makes rich text display easy!]</Title>\r\n    <Date>2007-09-10T12:53:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n    </Tags>\r\n    <Length>7865</Length>\r\n    <Popularity>0.95039787798408493</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>You voted lots, we fixed lots [AJAX Control Toolkit release!]</Title>\r\n    <Date>2007-09-21T12:17:00</Date>\r\n    <Tags>\r\n      <Tag>AJAX Control Toolkit</Tag>\r\n    </Tags>\r\n    <Length>5671</Length>\r\n    <Popularity>0.091909814323607425</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Bringing more HTML to Silverlight [HtmlTextBlock improvements]</Title>\r\n    <Date>2007-09-24T11:15:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n    </Tags>\r\n    <Length>7232</Length>\r\n    <Popularity>0.090716180371352789</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Something fun for the little ones [SilverlightKidsDoodler develops mouse skills!]</Title>\r\n    <Date>2007-10-15T21:38:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n    </Tags>\r\n    <Length>3995</Length>\r\n    <Popularity>0.066445623342175061</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Bigger isn't always better [How to: Resize images without reloading them with WPF]</Title>\r\n    <Date>2007-11-11T23:30:00</Date>\r\n    <Tags>\r\n      <Tag>WPF</Tag>\r\n    </Tags>\r\n    <Length>9093</Length>\r\n    <Popularity>0.20503978779840848</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>A big day for development tools [AJAX Control Toolkit release!]</Title>\r\n    <Date>2007-11-19T17:53:00</Date>\r\n    <Tags>\r\n      <Tag>AJAX Control Toolkit</Tag>\r\n    </Tags>\r\n    <Length>2811</Length>\r\n    <Popularity>0.0047745358090185673</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Getting the Toolkit working with the VS 2008 web site designer [AJAX Control Toolkit 11119 release update!]</Title>\r\n    <Date>2007-11-29T14:26:00</Date>\r\n    <Tags>\r\n      <Tag>AJAX Control Toolkit</Tag>\r\n    </Tags>\r\n    <Length>1479</Length>\r\n    <Popularity>0.069628647214854109</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>A better web is coming [Silverlight 2 is on the way!]</Title>\r\n    <Date>2008-02-24T23:51:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n    </Tags>\r\n    <Length>4347</Length>\r\n    <Popularity>0.0025198938992042441</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Brought to you by community contributions [AJAX Control Toolkit release!]</Title>\r\n    <Date>2008-02-29T12:58:00</Date>\r\n    <Tags>\r\n      <Tag>AJAX Control Toolkit</Tag>\r\n    </Tags>\r\n    <Length>1999</Length>\r\n    <Popularity>0.035145888594164454</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>LB-SV-FAQ [Examples, Notes, Tips, and More for Silverlight 2 Beta 1's ListBox and ScrollViewer controls!]</Title>\r\n    <Date>2008-03-05T16:12:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n    </Tags>\r\n    <Length>66125</Length>\r\n    <Popularity>0.69403183023872683</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>LB-SV-WPF [Silverlight 2's ListBox and ScrollViewer controls running on WPF!]</Title>\r\n    <Date>2008-03-10T16:24:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n    </Tags>\r\n    <Length>8385</Length>\r\n    <Popularity>0.11273209549071618</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>LB-SV-WHY [Three wacky uses for Silverlight 2's ListBox and ScrollViewer!]</Title>\r\n    <Date>2008-03-12T13:58:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n    </Tags>\r\n    <Length>22863</Length>\r\n    <Popularity>0.5115384615384615</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Blogging code samples should be easy [Free ConvertClipboardRtfToHtmlText tool and source code!]</Title>\r\n    <Date>2008-03-13T21:48:00</Date>\r\n    <Tags>\r\n      <Tag>Technical</Tag>\r\n    </Tags>\r\n    <Length>21622</Length>\r\n    <Popularity>0.04880636604774536</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Continuing support for simple HTML display in Silverlight [HtmlTextBlock sample updated for Silverlight 2 Beta 1!]</Title>\r\n    <Date>2008-03-17T12:46:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n    </Tags>\r\n    <Length>4336</Length>\r\n    <Popularity>0.18713527851458886</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Code to support new features doesn't write itself [HtmlTextBlock sample gets data binding support!]</Title>\r\n    <Date>2008-03-18T13:31:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n    </Tags>\r\n    <Length>2327</Length>\r\n    <Popularity>0.0071618037135278518</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Improving everyone's access to Silverlight 2's generic.xaml resources [SilverlightDefaultStyleBrowser tool and source code]</Title>\r\n    <Date>2008-03-22T00:01:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>WPF</Tag>\r\n    </Tags>\r\n    <Length>5490</Length>\r\n    <Popularity>0.21830238726790452</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Improved access to Silverlight 2's generic.xaml resources [SilverlightDefaultStyleBrowser available via ClickOnce]</Title>\r\n    <Date>2008-03-22T15:53:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>WPF</Tag>\r\n    </Tags>\r\n    <Length>3009</Length>\r\n    <Popularity>0.12122015915119363</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Blogging code samples a tad more easily [Updated free ConvertClipboardRtfToHtmlText tool and source code!]</Title>\r\n    <Date>2008-04-02T23:53:00</Date>\r\n    <Tags>\r\n      <Tag>Technical</Tag>\r\n    </Tags>\r\n    <Length>1621</Length>\r\n    <Popularity>0.0099469496021220155</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Proof-of-concept Silverlight XPS reader gets some Beta 1 love [SimpleSilverlightXpsViewer updated for Silverlight 2 Beta 1!]</Title>\r\n    <Date>2008-04-08T15:04:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n    </Tags>\r\n    <Length>4382</Length>\r\n    <Popularity>0.049469496021220159</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Buttons in a ListBox, and More [Demonstration of some useful Silverlight techniques]</Title>\r\n    <Date>2008-04-21T12:15:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n    </Tags>\r\n    <Length>12729</Length>\r\n    <Popularity>0.072546419098143231</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>IValueConverter: The Swiss Army Knife of Bindings [PropertyViewer sample is a WPF/Silverlight visualization and debugging aid!]</Title>\r\n    <Date>2008-05-04T16:21:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>WPF</Tag>\r\n    </Tags>\r\n    <Length>10394</Length>\r\n    <Popularity>0.32055702917771883</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Lying to the layout system for a good cause [Bringing LayoutTransform to Silverlight 2!]</Title>\r\n    <Date>2008-05-27T10:52:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>WPF</Tag>\r\n    </Tags>\r\n    <Length>12730</Length>\r\n    <Popularity>0.083156498673740059</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Continuing access to Silverlight 2's generic.xaml resources [SilverlightDefaultStyleBrowser updated for Silverlight 2 Beta 2!]</Title>\r\n    <Date>2008-06-06T22:58:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>WPF</Tag>\r\n    </Tags>\r\n    <Length>6318</Length>\r\n    <Popularity>0.078514588859416451</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Again with the support for simple HTML display in Silverlight [HtmlTextBlock sample updated for Silverlight 2 Beta 2!]</Title>\r\n    <Date>2008-06-11T10:14:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n    </Tags>\r\n    <Length>4007</Length>\r\n    <Popularity>0.09496021220159151</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Proof-of-concept Silverlight XPS reader comes to Beta 2 [SimpleSilverlightXpsViewer sample updated for Silverlight 2 Beta 2!]</Title>\r\n    <Date>2008-06-13T00:35:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n    </Tags>\r\n    <Length>3471</Length>\r\n    <Popularity>0.31803713527851457</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Text; from a slightly different perspective [VerticalTextBlock Control sample for Silverlight 2]</Title>\r\n    <Date>2008-06-19T22:39:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>WPF</Tag>\r\n    </Tags>\r\n    <Length>11581</Length>\r\n    <Popularity>0.051856763925729445</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>The layout system lies have become a bit more elaborate [LayoutTransform functionality updated and enhanced for Silverlight 2 Beta 2!]</Title>\r\n    <Date>2008-07-03T02:00:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>WPF</Tag>\r\n    </Tags>\r\n    <Length>15802</Length>\r\n    <Popularity>0.068567639257294435</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Smaller is better! [A simple step to shrink the download size of Silverlight 2 applications]</Title>\r\n    <Date>2008-07-16T22:47:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n    </Tags>\r\n    <Length>8862</Length>\r\n    <Popularity>0.20358090185676392</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Maintaining access to Silverlight 2's generic.xaml resources [SilverlightDefaultStyleBrowser updated for build 2.0.30523.8 and beyond!]</Title>\r\n    <Date>2008-07-20T18:59:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>WPF</Tag>\r\n    </Tags>\r\n    <Length>6047</Length>\r\n    <Popularity>0.042970822281167109</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Read a Silverlight book - with Silverlight! [SimpleSilverlightXpsViewer adaptation by Laurence Moroney]</Title>\r\n    <Date>2008-07-29T23:10:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n    </Tags>\r\n    <Length>2069</Length>\r\n    <Popularity>0.022944297082228116</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Successfully passing the baton [AJAX Control Toolkit release!]</Title>\r\n    <Date>2008-08-21T22:23:00</Date>\r\n    <Tags>\r\n      <Tag>AJAX Control Toolkit</Tag>\r\n    </Tags>\r\n    <Length>1985</Length>\r\n    <Popularity>0.016312997347480106</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Video frame grabbing made easy [How to: Quickly capture multiple video frames with WPF]</Title>\r\n    <Date>2008-09-03T01:51:00</Date>\r\n    <Tags>\r\n      <Tag>WPF</Tag>\r\n    </Tags>\r\n    <Length>7567</Length>\r\n    <Popularity>0.12294429708222812</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Make life a little easier for designers [WPF Triggers with a little less XAML and a little less code]</Title>\r\n    <Date>2008-09-12T00:21:00</Date>\r\n    <Tags>\r\n      <Tag>WPF</Tag>\r\n    </Tags>\r\n    <Length>20310</Length>\r\n    <Popularity>0.10928381962864721</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>\"MouseButtonClicker clicks the mouse so you don't have to!\" [Releasing binaries and source for a nifty mouse utility]</Title>\r\n    <Date>2008-09-24T22:55:00</Date>\r\n    <Tags>\r\n      <Tag>Technical</Tag>\r\n    </Tags>\r\n    <Length>28810</Length>\r\n    <Popularity>0.060477453580901855</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Preserving access to Silverlight 2's generic.xaml resources [SilverlightDefaultStyleBrowser updated for the Silverlight 2 RC!]</Title>\r\n    <Date>2008-09-26T10:28:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>WPF</Tag>\r\n    </Tags>\r\n    <Length>4238</Length>\r\n    <Popularity>0.10424403183023873</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Maintaining pretenses with the layout system [LayoutTransform functionality updated for Silverlight 2!]</Title>\r\n    <Date>2008-09-29T01:04:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>WPF</Tag>\r\n    </Tags>\r\n    <Length>7090</Length>\r\n    <Popularity>0.061273209549071617</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Just a little too eager with the clicking... [Updated binaries and source for MouseButtonClicker]</Title>\r\n    <Date>2008-10-09T23:18:00</Date>\r\n    <Tags>\r\n      <Tag>Technical</Tag>\r\n    </Tags>\r\n    <Length>2970</Length>\r\n    <Popularity>0.0025198938992042441</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Silverlight 2 has released! [Congratulations to everyone involved!]</Title>\r\n    <Date>2008-10-14T15:40:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n    </Tags>\r\n    <Length>1017</Length>\r\n    <Popularity>0.0026525198938992041</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Roadblock in the way of migrating the proof-of-concept Silverlight XPS reader [SimpleSilverlightXpsViewer sample does not work on Silverlight 2 RTW]</Title>\r\n    <Date>2008-10-18T00:06:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n    </Tags>\r\n    <Length>6078</Length>\r\n    <Popularity>0.12188328912466843</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Announcing a free, open source Charting solution for Silverlight [Silverlight Toolkit released today at PDC!]</Title>\r\n    <Date>2008-10-28T10:55:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>Silverlight Toolkit</Tag>\r\n    </Tags>\r\n    <Length>29632</Length>\r\n    <Popularity>0.75596816976127323</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Click your way to great Silverlight charts [Live ChartBuilder sample and source code!]</Title>\r\n    <Date>2008-10-29T17:25:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>Silverlight Toolkit</Tag>\r\n    </Tags>\r\n    <Length>18002</Length>\r\n    <Popularity>0.42413793103448277</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Smaller is still better! [A simple step continues to shrink the download size of Silverlight 2 applications]</Title>\r\n    <Date>2008-11-04T16:20:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n    </Tags>\r\n    <Length>3280</Length>\r\n    <Popularity>0.080901856763925736</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Easily create an ISO from a CD/DVD [Releasing ExtractISO tool and source]</Title>\r\n    <Date>2008-11-05T23:34:00</Date>\r\n    <Tags>\r\n      <Tag>Technical</Tag>\r\n    </Tags>\r\n    <Length>7409</Length>\r\n    <Popularity>0.13607427055702917</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Improving ChartBuilder's cultural sensitivity [ChartBuilder app/source updated!]</Title>\r\n    <Date>2008-11-06T11:17:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>Silverlight Toolkit</Tag>\r\n    </Tags>\r\n    <Length>3739</Length>\r\n    <Popularity>0.08461538461538462</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>My new home page [A collection of great Silverlight Charting resources!]</Title>\r\n    <Date>2008-11-10T17:34:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>Silverlight Toolkit</Tag>\r\n    </Tags>\r\n    <Length>6785</Length>\r\n    <Popularity>0.2746684350132626</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>My take on simple HTML display in Silverlight [HtmlTextBlock sample updated for Silverlight 2 RTW!]</Title>\r\n    <Date>2008-11-11T22:08:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n    </Tags>\r\n    <Length>3960</Length>\r\n    <Popularity>0.10649867374005305</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>A fix for simple HTML display in Silverlight [HtmlTextBlock bug fix for Silverlight 2 RTW!]</Title>\r\n    <Date>2008-11-12T12:15:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n    </Tags>\r\n    <Length>5700</Length>\r\n    <Popularity>0.1310344827586207</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Shamelessly benefitting from the work of others [Links to Silverlight Airlines and Surface samples for RTW!]</Title>\r\n    <Date>2008-11-13T09:09:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n    </Tags>\r\n    <Length>2892</Length>\r\n    <Popularity>0.14787798408488065</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>An unexceptional layout improvement [Two LayoutTransformControl fixes for Silverlight 2!]</Title>\r\n    <Date>2008-11-18T10:33:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>WPF</Tag>\r\n    </Tags>\r\n    <Length>5449</Length>\r\n    <Popularity>0.13461538461538461</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Having problems with layout? Switch to Plan B! [LayoutTransformControl scenarios for WPF]</Title>\r\n    <Date>2008-11-20T10:50:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>WPF</Tag>\r\n    </Tags>\r\n    <Length>11613</Length>\r\n    <Popularity>0.09973474801061008</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Silverlight Charting gets a host of improvements [Silverlight Toolkit December 08 release now available!]</Title>\r\n    <Date>2008-12-09T17:07:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>Silverlight Toolkit</Tag>\r\n    </Tags>\r\n    <Length>45069</Length>\r\n    <Popularity>0.59694960212201587</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Great Silverlight charts are still just a click away [ChartBuilder sample and source code updated for Charting's December 08 release]</Title>\r\n    <Date>2008-12-10T23:37:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>Silverlight Toolkit</Tag>\r\n    </Tags>\r\n    <Length>4031</Length>\r\n    <Popularity>0.21326259946949602</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Expanded access to Silverlight 2's generic.xaml resources [SilverlightDefaultStyleBrowser updated for better compatibility!]</Title>\r\n    <Date>2008-12-14T22:34:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>WPF</Tag>\r\n      <Tag>Silverlight Toolkit</Tag>\r\n    </Tags>\r\n    <Length>7919</Length>\r\n    <Popularity>0.24124668435013263</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Yummier pies! [A technique for more flexible gradient styling of Silverlight Toolkit pie charts]</Title>\r\n    <Date>2008-12-30T01:07:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>Silverlight Toolkit</Tag>\r\n    </Tags>\r\n    <Length>19636</Length>\r\n    <Popularity>0.11326259946949602</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>The source code IS the executable [Releasing CSI, a C# interpreter (with source and tests) for .NET]</Title>\r\n    <Date>2009-01-07T00:26:00</Date>\r\n    <Tags>\r\n      <Tag>Technical</Tag>\r\n    </Tags>\r\n    <Length>10311</Length>\r\n    <Popularity>0.085411140583554382</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Trust, but verify [Free tool (and source code) for computing commonly used hash codes!]</Title>\r\n    <Date>2009-01-13T00:52:00</Date>\r\n    <Tags>\r\n      <Tag>Technical</Tag>\r\n    </Tags>\r\n    <Length>12499</Length>\r\n    <Popularity>0.067108753315649861</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Free hash [A reusable CRC-32 HashAlgorithm implementation for .NET]</Title>\r\n    <Date>2009-01-14T00:44:00</Date>\r\n    <Tags>\r\n      <Tag>Technical</Tag>\r\n    </Tags>\r\n    <Length>15377</Length>\r\n    <Popularity>0.10159151193633953</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>The doctor will see you now... [WaitingRoom is a reusable synchronization object for .NET]</Title>\r\n    <Date>2009-01-15T00:10:00</Date>\r\n    <Tags>\r\n      <Tag>Technical</Tag>\r\n    </Tags>\r\n    <Length>15193</Length>\r\n    <Popularity>0.037400530503978777</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Gratuitous platform support [ComputeFileHashes works on the command-line, on WPF, on Silverlight, and via ClickOnce!]</Title>\r\n    <Date>2009-01-21T02:13:00</Date>\r\n    <Tags>\r\n      <Tag>Technical</Tag>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>WPF</Tag>\r\n    </Tags>\r\n    <Length>13427</Length>\r\n    <Popularity>0.060875331564986736</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Math is hard, let's go shopping. [Minor bug fix for free CRC-32 HashAlgorithm implementation for .NET]</Title>\r\n    <Date>2009-01-23T00:21:00</Date>\r\n    <Tags>\r\n      <Tag>Technical</Tag>\r\n    </Tags>\r\n    <Length>2750</Length>\r\n    <Popularity>0.014986737400530505</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Cross-platform feature parity: achieved [Silverlight version of ComputeFileHashes now includes MD5!]</Title>\r\n    <Date>2009-01-26T23:09:00</Date>\r\n    <Tags>\r\n      <Tag>Technical</Tag>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>WPF</Tag>\r\n    </Tags>\r\n    <Length>6889</Length>\r\n    <Popularity>0.048143236074270554</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Thank goodness for reference implementations [Low-overhead .NET MD5 implementation (source code and tests) works great on Silverlight!]</Title>\r\n    <Date>2009-01-28T00:25:00</Date>\r\n    <Tags>\r\n      <Tag>Technical</Tag>\r\n      <Tag>Silverlight</Tag>\r\n    </Tags>\r\n    <Length>65188</Length>\r\n    <Popularity>0.099867374005305043</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>The proverbial \"one line fix\" [ComputeFileHashes works around a troublesome Silverlight-on-Mac issue]</Title>\r\n    <Date>2009-02-01T00:42:00</Date>\r\n    <Tags>\r\n      <Tag>Technical</Tag>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>WPF</Tag>\r\n    </Tags>\r\n    <Length>7093</Length>\r\n    <Popularity>0.05424403183023873</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Columns of a different color [Customizing the appearance of Silverlight charts with re-templating and MVVM]</Title>\r\n    <Date>2009-02-04T00:27:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>Silverlight Toolkit</Tag>\r\n    </Tags>\r\n    <Length>44622</Length>\r\n    <Popularity>0.25490716180371353</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>My new home page, expanded [Updated collection of great Silverlight Charting resources!]</Title>\r\n    <Date>2009-02-05T23:27:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>Silverlight Toolkit</Tag>\r\n    </Tags>\r\n    <Length>13101</Length>\r\n    <Popularity>0.330106100795756</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Sometimes all it takes is a little encouragement [How to: Automatically update the widths of ListView columns]</Title>\r\n    <Date>2009-02-16T00:06:00</Date>\r\n    <Tags>\r\n      <Tag>WPF</Tag>\r\n    </Tags>\r\n    <Length>23768</Length>\r\n    <Popularity>0.059946949602122018</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Ambiguous contract is ambiguous [Minor bug fix for CRC32 and MD5Managed HashAlgorithm implementations]</Title>\r\n    <Date>2009-02-17T00:12:00</Date>\r\n    <Tags>\r\n      <Tag>Technical</Tag>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>WPF</Tag>\r\n    </Tags>\r\n    <Length>6215</Length>\r\n    <Popularity>0.034482758620689655</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>DesignerProperties.GetIsInDesignMode_ForRealz [How to: Reliably detect Silverlight design mode in Blend and Visual Studio]</Title>\r\n    <Date>2009-02-26T19:23:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>Silverlight Toolkit</Tag>\r\n    </Tags>\r\n    <Length>6842</Length>\r\n    <Popularity>0.14058355437665782</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>A rose by any other name... [LayoutTransformControl on track to ship in the Silverlight Toolkit under the name LayoutTransformer!]</Title>\r\n    <Date>2009-03-02T12:39:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>WPF</Tag>\r\n      <Tag>Silverlight Toolkit</Tag>\r\n    </Tags>\r\n    <Length>10496</Length>\r\n    <Popularity>0.11458885941644563</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Controls are like diapers: you don't want a leaky one [Implementing the WeakEvent pattern on Silverlight with the WeakEventListener class]</Title>\r\n    <Date>2009-03-09T17:59:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>WPF</Tag>\r\n      <Tag>Silverlight Toolkit</Tag>\r\n    </Tags>\r\n    <Length>26319</Length>\r\n    <Popularity>0.21830238726790452</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Where's your leak at? [Using WinDbg, SOS, and GCRoot to diagnose a .NET memory leak]</Title>\r\n    <Date>2009-03-11T22:45:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>WPF</Tag>\r\n    </Tags>\r\n    <Length>10894</Length>\r\n    <Popularity>0.44615384615384618</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Silverlight Charting is faster and better than ever [Silverlight Toolkit March 09 release now available!]</Title>\r\n    <Date>2009-03-19T00:31:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>Silverlight Toolkit</Tag>\r\n    </Tags>\r\n    <Length>42243</Length>\r\n    <Popularity>0.47705570291777188</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Silverlight Charting remains just a click away - and runs on WPF, too!! [ChartBuilder sample and source code updated for Charting's March 09 release]</Title>\r\n    <Date>2009-03-20T01:13:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>WPF</Tag>\r\n      <Tag>Silverlight Toolkit</Tag>\r\n    </Tags>\r\n    <Length>7092</Length>\r\n    <Popularity>0.78514588859416445</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Supporting the unsupported [Two fixes for the unofficial WPF Charting assembly!]</Title>\r\n    <Date>2009-03-25T11:25:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>WPF</Tag>\r\n      <Tag>Silverlight Toolkit</Tag>\r\n    </Tags>\r\n    <Length>5994</Length>\r\n    <Popularity>0.0726790450928382</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>If they can build it, they will come... [Enabling anyone to compile WPF Charting from the Silverlight Charting sources!]</Title>\r\n    <Date>2009-03-26T13:01:00</Date>\r\n    <Tags>\r\n      <Tag>WPF</Tag>\r\n      <Tag>Silverlight Toolkit</Tag>\r\n    </Tags>\r\n    <Length>10152</Length>\r\n    <Popularity>0.0720159151193634</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Don't let the gotchas getcha [Adding the ScrollIntoViewCentered method to WPF's ListBox]</Title>\r\n    <Date>2009-03-30T18:25:00</Date>\r\n    <Tags>\r\n      <Tag>WPF</Tag>\r\n    </Tags>\r\n    <Length>12034</Length>\r\n    <Popularity>0.033687002652519893</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>If you could have this... would you even *want* it? [Playing around with writing a flexible source control repository browser in WPF]</Title>\r\n    <Date>2009-04-03T01:34:00</Date>\r\n    <Tags>\r\n      <Tag>WPF</Tag>\r\n    </Tags>\r\n    <Length>5208</Length>\r\n    <Popularity>0.038859416445623345</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Nobody likes seeing the hourglass... [Keep your application responsive with BackgroundTaskManager on WPF and Silverlight]</Title>\r\n    <Date>2009-04-08T00:38:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>WPF</Tag>\r\n    </Tags>\r\n    <Length>19873</Length>\r\n    <Popularity>0.12387267904509283</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>A bit more than meets the eye [Easily animate LayoutTransformer with AnimationMediator!]</Title>\r\n    <Date>2009-04-09T13:03:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>Silverlight Toolkit</Tag>\r\n    </Tags>\r\n    <Length>21875</Length>\r\n    <Popularity>0.0883289124668435</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>A bit more(er) than meets the eye [Easily animate and update LayoutTransformer with AnimationMediator!]</Title>\r\n    <Date>2009-04-10T23:28:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>Silverlight Toolkit</Tag>\r\n    </Tags>\r\n    <Length>20927</Length>\r\n    <Popularity>0.067108753315649861</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>If one proxy is good, two must be better [Socks5to4a gives your SOCKS 4a proxy a free upgrade!]</Title>\r\n    <Date>2009-04-15T12:21:00</Date>\r\n    <Tags>\r\n      <Tag>Technical</Tag>\r\n    </Tags>\r\n    <Length>4406</Length>\r\n    <Popularity>0.014058355437665782</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Comma quibbling a la Eric and Jafar [A slightly wacky approach to the problem in C#]</Title>\r\n    <Date>2009-04-16T16:29:00</Date>\r\n    <Tags>\r\n      <Tag>Technical</Tag>\r\n    </Tags>\r\n    <Length>5866</Length>\r\n    <Popularity>0.011671087533156498</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Fewer gotchas to getcha [Enhancing the ScrollIntoViewCentered method for WPF's ListBox]</Title>\r\n    <Date>2009-04-19T23:23:00</Date>\r\n    <Tags>\r\n      <Tag>WPF</Tag>\r\n    </Tags>\r\n    <Length>15962</Length>\r\n    <Popularity>0.046949602122015918</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Another round of (un)support [Quick fix for the unofficial WPF Charting assembly!]</Title>\r\n    <Date>2009-04-22T00:11:00</Date>\r\n    <Tags>\r\n      <Tag>WPF</Tag>\r\n      <Tag>Silverlight Toolkit</Tag>\r\n    </Tags>\r\n    <Length>5214</Length>\r\n    <Popularity>0.041379310344827586</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>My new home page, extended [Updated collection of great Silverlight and WPF Charting resources!]</Title>\r\n    <Date>2009-04-24T00:23:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>WPF</Tag>\r\n      <Tag>Silverlight Toolkit</Tag>\r\n    </Tags>\r\n    <Length>20972</Length>\r\n    <Popularity>0.44257294429708222</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Trying to get the story straight [A brief summary of Storyboard differences between WPF and Silverlight]</Title>\r\n    <Date>2009-04-28T23:05:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>WPF</Tag>\r\n      <Tag>Silverlight Toolkit</Tag>\r\n    </Tags>\r\n    <Length>9916</Length>\r\n    <Popularity>0.12891246684350133</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Going \"extreme\" with Silverlight 3 [Sharing the source code for a real-world sample application]</Title>\r\n    <Date>2009-05-04T11:41:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>Silverlight Toolkit</Tag>\r\n    </Tags>\r\n    <Length>5191</Length>\r\n    <Popularity>0.39575596816976127</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>One more platform difference more-or-less tamed [SetterValueBindingHelper makes Silverlight Setters better!]</Title>\r\n    <Date>2009-05-07T01:40:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>Silverlight Toolkit</Tag>\r\n    </Tags>\r\n    <Length>37747</Length>\r\n    <Popularity>0.12984084880636604</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Pineapple upside-down chart [How to: Invert the axis of a chart for \"smaller is better\" scenarios]</Title>\r\n    <Date>2009-05-12T11:31:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>WPF</Tag>\r\n      <Tag>Silverlight Toolkit</Tag>\r\n    </Tags>\r\n    <Length>25014</Length>\r\n    <Popularity>0.10411140583554376</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Chart tweaking made easy [How to: Make four simple color/ToolTip changes with Silverlight/WPF Charting]</Title>\r\n    <Date>2009-05-19T23:34:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>WPF</Tag>\r\n      <Tag>Silverlight Toolkit</Tag>\r\n    </Tags>\r\n    <Length>26829</Length>\r\n    <Popularity>0.14018567639257296</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>You've got to know where you've been to know where you're going [Some background on Charting's ordered multiple dictionary implementation]</Title>\r\n    <Date>2009-05-26T23:39:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>WPF</Tag>\r\n      <Tag>Silverlight Toolkit</Tag>\r\n    </Tags>\r\n    <Length>9364</Length>\r\n    <Popularity>0.080503978779840848</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Maintaining balance [A versatile red-black tree implementation for .NET (via Silverlight/WPF Charting)]</Title>\r\n    <Date>2009-06-02T10:34:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>WPF</Tag>\r\n      <Tag>Silverlight Toolkit</Tag>\r\n    </Tags>\r\n    <Length>32048</Length>\r\n    <Popularity>0.18740053050397878</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>Peanut butter jelly time [How to: Create a pleasing visual effect with Silverlight/WPF Charting]</Title>\r\n    <Date>2009-06-15T12:13:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>WPF</Tag>\r\n      <Tag>Silverlight Toolkit</Tag>\r\n    </Tags>\r\n    <Length>21801</Length>\r\n    <Popularity>0.1696286472148541</Popularity>\r\n  </Post>\r\n  <Post>\r\n    <Title>WPF Charting: It's official! [June 2009 release of the WPF Toolkit is now available!]</Title>\r\n    <Date>2009-06-25T11:52:00</Date>\r\n    <Tags>\r\n      <Tag>Silverlight</Tag>\r\n      <Tag>WPF</Tag>\r\n      <Tag>Silverlight Toolkit</Tag>\r\n      <Tag>WPF Toolkit</Tag>\r\n    </Tags>\r\n    <Length>12301</Length>\r\n    <Popularity>0.32175066312997347</Popularity>\r\n  </Post>\r\n</Posts>"
  },
  {
    "path": "WpfToolkit/Samples/Common/BusinessObjects/Airport.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Globalization;\r\nusing System.Windows.Controls;\r\n\r\n[assembly: SuppressMessage(\"General\", \"SWC1001:XmlDocumentationCommentShouldBeSpelledCorrectly\", MessageId = \"Bing\", Justification = \"Bing is a Microsoft web site.\")]\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    /// <summary>\r\n    /// An Airport class.\r\n    /// </summary>\r\n    public class Airport\r\n    {\r\n        /// <summary>\r\n        /// Gets or sets the friendly airport name.\r\n        /// </summary>\r\n        public string Name { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets a sometimes shorter representation of the Name property.\r\n        /// </summary>\r\n        public string LimitedName\r\n        {\r\n            get\r\n            {\r\n                if (Name == null || Name.Length < 30)\r\n                {\r\n                    return Name;\r\n                }\r\n\r\n                return Name.Substring(0, 30) + \"...\";\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the airport city or cities name.\r\n        /// </summary>\r\n        public string City { get; set; }\r\n        \r\n        /// <summary>\r\n        /// Gets or sets the state, region, or territory name.\r\n        /// </summary>\r\n        public string State { get; set; }\r\n        \r\n        /// <summary>\r\n        /// Gets or sets the Federal Aviation Administration code.\r\n        /// </summary>\r\n        public string CodeFaa { get; set; }\r\n        \r\n        /// <summary>\r\n        /// Gets or sets the International Air Transport Association code.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Iata\", Justification = \"This is a recognized abbreviation for the code.\")]\r\n        public string CodeIata { get; set; }\r\n        \r\n        /// <summary>\r\n        /// Gets or sets the four-digit International Civil Aviation \r\n        /// Organization code.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Icao\", Justification = \"This is a recognized abbreviation for the code.\")]\r\n        public string CodeIcao { get; set; }\r\n\r\n        /// <summary>\r\n        /// Initializes a new Airport class instance.\r\n        /// </summary>\r\n        public Airport()\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new Airport class instance. This is a data-entry \r\n        /// friendly constructor.\r\n        /// </summary>\r\n        /// <param name=\"city\">The city or cities name.</param>\r\n        /// <param name=\"state\">The state or region.</param>\r\n        /// <param name=\"faa\">The Federal Aviation Administration code.</param>\r\n        /// <param name=\"iata\">The International Air Transport Association code.</param>\r\n        /// <param name=\"icao\">The four-digit International Civil Aviation\r\n        /// Organization code.</param>\r\n        /// <param name=\"airport\">The friendly airport name.</param>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"icao\", Justification = \"This is a recognized abbreviation for the code.\")]\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"iata\", Justification = \"This is a recognized abbreviation for the code.\")]\r\n        public Airport(string city, string state, string faa, string iata, string icao, string airport)\r\n        {\r\n            City = city;\r\n            State = state;\r\n            CodeFaa = faa;\r\n            CodeIata = iata;\r\n            CodeIcao = icao;\r\n            Name = airport;\r\n        }\r\n\r\n        /// <summary>\r\n        /// The code and name together.\r\n        /// </summary>\r\n        /// <returns>Returns a string.</returns>\r\n        public override string ToString()\r\n        {\r\n            return CodeFaa;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a collection of sample airports.\r\n        /// </summary>\r\n        public static ObjectCollection SampleAirports\r\n        {\r\n            get\r\n            {\r\n                ObjectCollection airports = new ObjectCollection();\r\n                airports.Add(new Airport(\"Phoenix\", \"Arizona\", \"PHX\", \"PHX\", \"KPHX\", \"Phoenix Sky Harbor International Airport\"));\r\n                airports.Add(new Airport(\"Los Angeles\", \"California\", \"LAX\", \"LAX\", \"KLAX\", \"Los Angeles International Airport\"));\r\n                airports.Add(new Airport(\"San Diego\", \"California\", \"SAN\", \"SAN\", \"KSAN\", \"San Diego International Airport\"));\r\n                airports.Add(new Airport(\"San Francisco\", \"California\", \"SFO\", \"SFO\", \"KSFO\", \"San Francisco International Airport\"));\r\n                airports.Add(new Airport(\"Denver\", \"Colorado\", \"DEN\", \"DEN\", \"KDEN\", \"Denver International Airport\"));\r\n                airports.Add(new Airport(\"Fort Lauderdale\", \"Florida\", \"FLL\", \"FLL\", \"KFLL\", \"Fort Lauderdale-Hollywood International Airport\"));\r\n                airports.Add(new Airport(\"Miami\", \"Florida\", \"MIA\", \"MIA\", \"KMIA\", \"Miami International Airport\"));\r\n                airports.Add(new Airport(\"Orlando\", \"Florida\", \"MCO\", \"MCO\", \"KMCO\", \"Orlando International Airport\"));\r\n                airports.Add(new Airport(\"Tampa\", \"Florida\", \"TPA\", \"TPA\", \"KTPA\", \"Tampa International Airport\"));\r\n                airports.Add(new Airport(\"Atlanta\", \"Georgia\", \"ATL\", \"ATL\", \"KATL\", \"Hartsfield-Jackson Atlanta International Airport\"));\r\n                airports.Add(new Airport(\"Honolulu\", \"Hawaii\", \"HNL\", \"HNL\", \"PHNL\", \"Honolulu International Airport / Hickam AFB\"));\r\n                airports.Add(new Airport(\"Boise\", \"Idaho\", \"BOI\", \"BOI\", \"KBOI\", \"Boise Air Terminal (Gowen Field)\"));\r\n                airports.Add(new Airport(\"Chicago\", \"Illinois\", \"ORD\", \"ORD\", \"KORD\", \"Chicago O'Hare International Airport\"));\r\n                airports.Add(new Airport(\"Chicago\", \"Illinois\", \"MDW\", \"MDW\", \"KMDW\", \"Chicago Midway International Airport\"));\r\n                airports.Add(new Airport(\"Indianapolis\", \"Indiana\", \"IND\", \"IND\", \"KIND\", \"Indianapolis International Airport\"));\r\n                airports.Add(new Airport(\"Covington\", \"Kentucky\", \"CVG\", \"CVG\", \"KCVG\", \"Cincinnati/Northern Kentucky International Airport\"));\r\n                airports.Add(new Airport(\"Louisville\", \"Kentucky\", \"SDF\", \"SDF\", \"KSDF\", \"Louisville International Airport (Standiford Field)\"));\r\n                airports.Add(new Airport(\"New Orleans\", \"Louisiana\", \"MSY\", \"MSY\", \"KMSY\", \"Louis Armstrong New Orleans International Airport\"));\r\n                airports.Add(new Airport(\"Baltimore / Glen Burnie\", \"Maryland\", \"BWI\", \"BWI\", \"KBWI\", \"Baltimore-Washington International Thurgood Marshall Airport\"));\r\n                airports.Add(new Airport(\"Boston\", \"Massachusetts\", \"BOS\", \"BOS\", \"KBOS\", \"Gen. Edward Lawrence Logan International Airport\"));\r\n                airports.Add(new Airport(\"Detroit\", \"Michigan\", \"DTW\", \"DTW\", \"KDTW\", \"Detroit Metropolitan Wayne County Airport\"));\r\n                airports.Add(new Airport(\"Grand Rapids\", \"Michigan\", \"GRR\", \"GRR\", \"KGRR\", \"Gerald R. Ford International Airport\"));\r\n                airports.Add(new Airport(\"Minneapolis\", \"Minnesota\", \"MSP\", \"MSP\", \"KMSP\", \"Minneapolis-St. Paul International Airport (Wold-Chamberlain Field)\"));\r\n                airports.Add(new Airport(\"Kansas City\", \"Missouri\", \"MCI\", \"MCI\", \"KMCI\", \"Kansas City International Airport\"));\r\n                airports.Add(new Airport(\"St. Louis\", \"Missouri\", \"STL\", \"STL\", \"KSTL\", \"Lambert-St. Louis International Airport\"));\r\n                airports.Add(new Airport(\"Omaha\", \"Nebraska\", \"OMA\", \"OMA\", \"KOMA\", \"Eppley Airfield\"));\r\n                airports.Add(new Airport(\"Las Vegas\", \"Nevada\", \"LAS\", \"LAS\", \"KLAS\", \"McCarran International Airport\"));\r\n                airports.Add(new Airport(\"Reno\", \"Nevada\", \"RNO\", \"RNO\", \"KRNO\", \"Reno-Tahoe International Airport\"));\r\n                airports.Add(new Airport(\"Manchester\", \"New Hampshire\", \"MHT\", \"MHT\", \"KMHT\", \"Manchester-Boston Regional Airport\"));\r\n                airports.Add(new Airport(\"Newark\", \"New Jersey\", \"EWR\", \"EWR\", \"KEWR\", \"Newark Liberty International Airport\"));\r\n                airports.Add(new Airport(\"Albuquerque\", \"New Mexico\", \"ABQ\", \"ABQ\", \"KABQ\", \"Albuquerque International Sunport\"));\r\n                airports.Add(new Airport(\"Albany\", \"New York\", \"ALB\", \"ALB\", \"KALB\", \"Albany International Airport\"));\r\n                airports.Add(new Airport(\"Buffalo\", \"New York\", \"BUF\", \"BUF\", \"KBUF\", \"Buffalo Niagara International Airport\"));\r\n                airports.Add(new Airport(\"Islip\", \"New York\", \"ISP\", \"ISP\", \"KISP\", \"Long Island MacArthur Airport\"));\r\n                airports.Add(new Airport(\"New York\", \"New York\", \"JFK\", \"JFK\", \"KJFK\", \"John F. Kennedy International Airport\"));\r\n                airports.Add(new Airport(\"New York\", \"New York\", \"LGA\", \"LGA\", \"KLGA\", \"LaGuardia Airport\"));\r\n                airports.Add(new Airport(\"Rochester\", \"New York\", \"ROC\", \"ROC\", \"KROC\", \"Greater Rochester International Airport\"));\r\n                airports.Add(new Airport(\"Syracuse\", \"New York\", \"SYR\", \"SYR\", \"KSYR\", \"Syracuse Hancock International Airport\"));\r\n                airports.Add(new Airport(\"Charlotte\", \"North Carolina\", \"CLT\", \"CLT\", \"KCLT\", \"Charlotte/Douglas International Airport\"));\r\n                airports.Add(new Airport(\"Greensboro\", \"North Carolina\", \"GSO\", \"GSO\", \"KGSO\", \"Piedmont Triad International Airport\"));\r\n                airports.Add(new Airport(\"Raleigh\", \"North Carolina\", \"RDU\", \"RDU\", \"KRDU\", \"Raleigh-Durham International Airport\"));\r\n                airports.Add(new Airport(\"Cleveland\", \"Ohio\", \"CLE\", \"CLE\", \"KCLE\", \"Cleveland-Hopkins International Airport\"));\r\n                airports.Add(new Airport(\"Columbus\", \"Ohio\", \"CMH\", \"CMH\", \"KCMH\", \"Port Columbus International Airport\"));\r\n                airports.Add(new Airport(\"Dayton\", \"Ohio\", \"DAY\", \"DAY\", \"KDAY\", \"James M. Cox Dayton International Airport\"));\r\n                airports.Add(new Airport(\"Oklahoma City\", \"Oklahoma\", \"OKC\", \"OKC\", \"KOKC\", \"Will Rogers World Airport\"));\r\n                airports.Add(new Airport(\"Tulsa\", \"Oklahoma\", \"TUL\", \"TUL\", \"KTUL\", \"Tulsa International Airport\"));\r\n                airports.Add(new Airport(\"Portland\", \"Oregon\", \"PDX\", \"PDX\", \"KPDX\", \"Portland International Airport\"));\r\n                airports.Add(new Airport(\"Philadelphia\", \"Pennsylvania\", \"PHL\", \"PHL\", \"KPHL\", \"Philadelphia International Airport\"));\r\n                airports.Add(new Airport(\"Pittsburgh\", \"Pennsylvania\", \"PIT\", \"PIT\", \"KPIT\", \"Pittsburgh International Airport\"));\r\n                airports.Add(new Airport(\"Providence\", \"Rhode Island\", \"PVD\", \"PVD\", \"KPVD\", \"Theodore Francis Green State Airport\"));\r\n                airports.Add(new Airport(\"Memphis\", \"Tennessee\", \"MEM\", \"MEM\", \"KMEM\", \"Memphis International Airport\"));\r\n                airports.Add(new Airport(\"Nashville\", \"Tennessee\", \"BNA\", \"BNA\", \"KBNA\", \"Nashville International Airport (Berry Field)\"));\r\n                airports.Add(new Airport(\"Austin\", \"Texas\", \"AUS\", \"AUS\", \"KAUS\", \"Austin-Bergstrom International Airport\"));\r\n                airports.Add(new Airport(\"Dallas\", \"Texas\", \"DAL\", \"DAL\", \"KDAL\", \"Dallas Love Field\"));\r\n                airports.Add(new Airport(\"Dallas-Fort Worth\", \"Texas\", \"DFW\", \"DFW\", \"KDFW\", \"Dallas-Fort Worth International Airport\"));\r\n                airports.Add(new Airport(\"El Paso\", \"Texas\", \"ELP\", \"ELP\", \"KELP\", \"El Paso International Airport\"));\r\n                airports.Add(new Airport(\"Houston\", \"Texas\", \"IAH\", \"IAH\", \"KIAH\", \"George Bush Intercontinental Airport\"));\r\n                airports.Add(new Airport(\"Houston\", \"Texas\", \"HOU\", \"HOU\", \"KHOU\", \"William P. Hobby Airport\"));\r\n                airports.Add(new Airport(\"San Antonio\", \"Texas\", \"SAT\", \"SAT\", \"KSAT\", \"San Antonio International Airport\"));\r\n                airports.Add(new Airport(\"Salt Lake City\", \"Utah\", \"SLC\", \"SLC\", \"KSLC\", \"Salt Lake City International Airport\"));\r\n                airports.Add(new Airport(\"Norfolk\", \"Virginia\", \"ORF\", \"ORF\", \"KORF\", \"Norfolk International Airport\"));\r\n                airports.Add(new Airport(\"Richmond\", \"Virginia\", \"RIC\", \"RIC\", \"KRIC\", \"Richmond International Airport\"));\r\n                airports.Add(new Airport(\"Washington, D.C. (Arlington County)\", \"Virginia\", \"DCA\", \"DCA\", \"KDCA\", \"Ronald Reagan Washington National Airport\"));\r\n                airports.Add(new Airport(\"Washington, D.C. (Chantilly / Dulles)\", \"Virginia\", \"IAD\", \"IAD\", \"KIAD\", \"Washington Dulles International Airport\"));\r\n                airports.Add(new Airport(\"Seattle / Tacoma (SeaTac)\", \"Washington\", \"SEA\", \"SEA\", \"KSEA\", \"Seattle-Tacoma International Airport\"));\r\n                airports.Add(new Airport(\"Spokane\", \"Washington\", \"GEG\", \"GEG\", \"KGEG\", \"Spokane International Airport (Geiger Field)\"));\r\n                airports.Add(new Airport(\"Milwaukee\", \"Wisconsin\", \"MKE\", \"MKE\", \"KMKE\", \"General Mitchell International Airport\"));\r\n                airports.Add(new Airport(\"San Juan\", \"Puerto Rico\", \"SJU\", \"SJU\", \"TJSJ\", \"Luis Muñoz Marín International Airport\"));\r\n                return airports;\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Samples/Common/BusinessObjects/City.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections;\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    /// <summary>\r\n    /// City business object used for charting samples.\r\n    /// </summary>\r\n    public class City\r\n    {\r\n        /// <summary>\r\n        /// Gets or sets the name of the city.\r\n        /// </summary>\r\n        public string Name { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the population of the city.\r\n        /// </summary>\r\n        public int Population { get; set; }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the City class.\r\n        /// </summary>\r\n        public City()\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns a string that represents the current object.\r\n        /// </summary>\r\n        /// <returns>A string that represents the current object.</returns>\r\n        public override string ToString()\r\n        {\r\n            return Name;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a collection of cities in the Puget Sound area.\r\n        /// </summary>\r\n        public static ObjectCollection PugetSound\r\n        {\r\n            get\r\n            {\r\n                ObjectCollection pugetSound = new ObjectCollection();\r\n                pugetSound.Add(new City { Name = \"Bellevue\", Population = 112344 });\r\n                pugetSound.Add(new City { Name = \"Issaquah\", Population = 11212 });\r\n                pugetSound.Add(new City { Name = \"Redmond\", Population = 46391 });\r\n                pugetSound.Add(new City { Name = \"Seattle\", Population = 592800 });\r\n                return pugetSound;\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Samples/Common/BusinessObjects/Contact.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to [###LICENSE_NAME###].\r\n// Please see [###LICENSE_LINK###] for details.\r\n// All other rights reserved.\r\n\r\n/* \r\n * The example companies, organizations, products, domain names,\r\n * e-mail addresses, logos, people, places, and events depicted\r\n * herein are fictitious.  No association with any real company,\r\n * organization, product, domain name, email address, logo, person,\r\n * places, or events is intended or should be inferred.\r\n*/\r\n\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.ComponentModel;\r\nusing System.ComponentModel.DataAnnotations;\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    /// <summary>\r\n    /// Represents a person's contact information.\r\n    /// </summary>\r\n    public class Contact : INotifyPropertyChanged, IEditableObject\r\n    {\r\n        /// <summary>\r\n        /// Represents the first name of the contact.\r\n        /// </summary>\r\n        private string firstName;\r\n\r\n        /// <summary>\r\n        /// Represents the last name of the contact.\r\n        /// </summary>\r\n        private string lastName;\r\n\r\n        /// <summary>\r\n        /// Represents the contact's phone number.\r\n        /// </summary>\r\n        private string phone;\r\n\r\n        /// <summary>\r\n        /// Represents the contact's street address.\r\n        /// </summary>\r\n        private string street1;\r\n\r\n        /// <summary>\r\n        /// Represents the contact's extended street address (such as an apartment number of P.O. Box).\r\n        /// </summary>\r\n        private string street2;\r\n\r\n        /// <summary>\r\n        /// Represents the contact's city.\r\n        /// </summary>\r\n        private string city;\r\n\r\n        /// <summary>\r\n        /// Represents the contact's state.\r\n        /// </summary>\r\n        private string state;\r\n\r\n        /// <summary>\r\n        /// Represents the contact's e-mail address.\r\n        /// </summary>\r\n        private string email;\r\n\r\n        /// <summary>\r\n        /// Represents the contact's zip code.\r\n        /// </summary>\r\n        private int zip;\r\n\r\n        /// <summary>\r\n        /// Indicates whether the address for the contact is a business address.\r\n        /// </summary>\r\n        private bool isBusinessAddress;\r\n\r\n        /// <summary>\r\n        /// Initializes a new contact.\r\n        /// </summary>\r\n        public Contact()\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the first name of the contact.\r\n        /// </summary>\r\n        [Required]\r\n        [Display(Name = \"First Name\", GroupName = \"Name\")]\r\n        public string FirstName\r\n        {\r\n            get\r\n            {\r\n                return firstName;\r\n            }\r\n            set\r\n            {\r\n                if (value != firstName)\r\n                {\r\n                    firstName = value;\r\n                    OnPropertyChanged(\"FirstName\");\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the last name of the contact.\r\n        /// </summary>\r\n        [Required]\r\n        [Display(Name = \"Last Name\", GroupName = \"Name\")]\r\n        public string LastName\r\n        {\r\n            get\r\n            {\r\n                return lastName;\r\n            }\r\n            set\r\n            {\r\n                if (value != lastName)\r\n                {\r\n                    lastName = value;\r\n                    OnPropertyChanged(\"LastName\");\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the phone number of the contact in the form (###) ###-####.\r\n        /// </summary>\r\n        [Display(Name = \"Phone\", Description = \"Phone number of the form (###) ###-####\")]\r\n        [RegularExpression(@\"^\\(\\d\\d\\d\\) \\d\\d\\d\\-\\d\\d\\d\\d$\", ErrorMessage = \"Not a valid phone number.  Please enter a phone number that matches the format (###) ###-####\")]\r\n        public string Phone\r\n        {\r\n            get\r\n            {\r\n                return phone;\r\n            }\r\n            set\r\n            {\r\n                if (value != phone)\r\n                {\r\n                    Validator.ValidateProperty(value, new ValidationContext(this, null, null) { MemberName = \"Phone\" });\r\n                    phone = value;\r\n                    OnPropertyChanged(\"Phone\");\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the street address of the contact.\r\n        /// </summary>\r\n        [Required]\r\n        [Display(Name = \"Street Address\", GroupName = \"Address\")]\r\n        public string Street1\r\n        {\r\n            get\r\n            {\r\n                return street1;\r\n            }\r\n            set\r\n            {\r\n                if (value != street1)\r\n                {\r\n                    street1 = value;\r\n                    OnPropertyChanged(\"Street1\");\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the secondary street address information for the contact, such as apartment number or P.O. Box.\r\n        /// </summary>\r\n        [Display(Name = \"Secondary Street Address\", Description = \"Additional street address information, such as apartment number or P.O. Box\", GroupName = \"Address\")]\r\n        public string Street2\r\n        {\r\n            get\r\n            {\r\n                return street2;\r\n            }\r\n            set\r\n            {\r\n                if (value != street2)\r\n                {\r\n                    street2 = value;\r\n                    OnPropertyChanged(\"Street2\");\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the city of the contact.\r\n        /// </summary>\r\n        [Required]\r\n        [Display(Name = \"City\", Description = \"City of residence\", GroupName = \"Address\")]\r\n        public string City\r\n        {\r\n            get\r\n            {\r\n                return city;\r\n            }\r\n            set\r\n            {\r\n                if (value != city)\r\n                {\r\n                    city = value;\r\n                    OnPropertyChanged(\"City\");\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the abbreviated state name of the contact (e.g. CA or TN).\r\n        /// </summary>\r\n        [Required]\r\n        [RegularExpression(@\"^[a-zA-Z][a-zA-Z]$\", ErrorMessage = \"Not a valid state abbreviation (e.g. CA or TN)\")]\r\n        [Display(Name = \"State\", Description = \"State abbreviation\", GroupName = \"Address\")]\r\n        public string State\r\n        {\r\n            get\r\n            {\r\n                return state;\r\n            }\r\n            set\r\n            {\r\n                if (value != state)\r\n                {\r\n                    Validator.ValidateProperty(value, new ValidationContext(this, null, null) { MemberName = \"State\" });\r\n                    state = value;\r\n                    OnPropertyChanged(\"State\");\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether this contact's address is a business address.\r\n        /// </summary>\r\n        [Display(Name = \"Business Address\", Description = \"Indicates that the address is a business address.\")]\r\n        public bool IsBusinessAddress\r\n        {\r\n            get\r\n            {\r\n                return isBusinessAddress;\r\n            }\r\n            set\r\n            {\r\n                if (value != isBusinessAddress)\r\n                {\r\n                    isBusinessAddress = value;\r\n                    OnPropertyChanged(\"IsBusinessAddress\");\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the e-mail address (e.g. someone@somewhere.com) for the contact.\r\n        /// </summary>\r\n        [RegularExpression(@\"^([a-zA-Z0-9\\!\\%\\$\\%\\*\\/\\?\\|\\^\\{\\}\\`\\~\\&\\'\\+\\-\\=_]\\.?)*[a-zA-Z0-9\\!\\%\\$\\%\\*\\/\\?\\|\\^\\{\\}\\`\\~\\&\\'\\+\\-\\=_]@((([a-zA-Z0-9\\!\\%\\$\\%\\*\\/\\?\\|\\^\\{\\}\\`\\~\\&\\'\\+\\-\\=_]\\.?)*[a-zA-Z0-9\\!\\%\\$\\%\\*\\/\\?\\|\\^\\{\\}\\`\\~\\&\\'\\+\\-\\=_])|(\\[\\d+\\.\\d+\\.\\d+\\.\\d+\\]))$\", ErrorMessage = \"Not a valid e-mail address.\")]\r\n        [Display(Name = \"Email\", Description = \"An e-mail address of the form <name>@<domain>, such as john@johndoe.com\")]\r\n        public string Email\r\n        {\r\n            get\r\n            {\r\n                return email;\r\n            }\r\n            set\r\n            {\r\n                if (value != email)\r\n                {\r\n                    Validator.ValidateProperty(value, new ValidationContext(this, null, null) { MemberName = \"Email\" });\r\n                    email = value;\r\n                    OnPropertyChanged(\"Email\");\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the zip code of the contact.\r\n        /// </summary>\r\n        [Required]\r\n        [RegularExpression(@\"^\\d\\d\\d\\d\\d$\", ErrorMessage = \"Zip codes must be 5-digit numbers.\")]\r\n        [Display(Name = \"Zip\", Description = \"Five-digit zip code\", GroupName = \"Address\")]\r\n        public int Zip\r\n        {\r\n            get\r\n            {\r\n                return zip;\r\n            }\r\n            set\r\n            {\r\n                if (value != zip)\r\n                {\r\n                    Validator.ValidateProperty(value, new ValidationContext(this, null, null) { MemberName = \"Zip\" });\r\n                    zip = value;\r\n                    OnPropertyChanged(\"Zip\");\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Raises a property changed notification for the specified property name.\r\n        /// </summary>\r\n        /// <param name=\"propName\">The name of the property that changed.</param>\r\n        protected virtual void OnPropertyChanged(string propName)\r\n        {\r\n            if (PropertyChanged != null)\r\n            {\r\n                PropertyChanged(this, new PropertyChangedEventArgs(propName));\r\n            }\r\n        }\r\n\r\n        #region INotifyPropertyChanged Members\r\n\r\n        /// <summary>\r\n        /// Raised when a property on the contact changes.\r\n        /// </summary>\r\n        public event PropertyChangedEventHandler PropertyChanged;\r\n\r\n        #endregion\r\n\r\n        /// <summary>\r\n        /// Gets a stock \"John Doe\" contact.\r\n        /// </summary>\r\n        public static Contact JohnDoe\r\n        {\r\n            get\r\n            {\r\n                return new Contact\r\n                {\r\n                    FirstName = \"John\",\r\n                    LastName = \"Doe\",\r\n                    Phone = \"(555) 555-5555\",\r\n                    Street1 = \"1 Anywhere Street\",\r\n                    City = \"Anytown\",\r\n                    State = \"WA\",\r\n                    Zip = 98000\r\n                };\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a stock group of contacts with valid contact information.\r\n        /// </summary>\r\n        public static IEnumerable<Contact> People\r\n        {\r\n            get\r\n            {\r\n                return new ObservableCollection<Contact>\r\n                {\r\n                    new Contact\r\n                    {\r\n                        FirstName = \"Kim\",\r\n                        LastName = \"Abercrombie\",\r\n                        Phone = \"(555) 555-0000\",\r\n                        Street1 = \"1 Anywhere Street\",\r\n                        City = \"Anytown\",\r\n                        State = \"WA\",\r\n                        Zip = 12345\r\n                    },\r\n                    new Contact\r\n                    {\r\n                        FirstName = \"Hadaya\",\r\n                        LastName = \"Sagiv\",\r\n                        Phone = \"(555) 555-0001\",\r\n                        Street1 = \"2 Anywhere Street\",\r\n                        City = \"AnotherTown\",\r\n                        State = \"HI\",\r\n                        Zip = 55555\r\n                    },\r\n                    new Contact\r\n                    {\r\n                        FirstName = \"Jeff\",\r\n                        LastName = \"Price\",\r\n                        Phone = \"(555) 555-0002\",\r\n                        Street1 = \"3 Somewhere Street\",\r\n                        City = \"Anytown\",\r\n                        State = \"OR\",\r\n                        Zip = 77777\r\n                    },\r\n                    new Contact\r\n                    {\r\n                        FirstName = \"Chris\",\r\n                        LastName = \"Hill\",\r\n                        Phone = \"(555) 555-0431\",\r\n                        Street1 = \"17 Anywhere Lane\",\r\n                        City = \"AnotherTown\",\r\n                        State = \"WA\",\r\n                        Zip = 28145\r\n                    },\r\n                    new Contact\r\n                    {\r\n                        FirstName = \"Prithvi\",\r\n                        LastName = \"Raj\",\r\n                        Phone = \"(555) 555-8543\",\r\n                        Street1 = \"9144 Somewhere Street\",\r\n                        City = \"Anytown\",\r\n                        State = \"OR\",\r\n                        Zip = 75812\r\n                    },\r\n                    new Contact\r\n                    {\r\n                        FirstName = \"Ryan\",\r\n                        LastName = \"Ihrig\",\r\n                        Phone = \"(555) 555-1345\",\r\n                        Street1 = \"19 Anywhere Lane\",\r\n                        City = \"AnotherTown\",\r\n                        State = \"OR\",\r\n                        Zip = 58104\r\n                    },\r\n                    new Contact\r\n                    {\r\n                        FirstName = \"Jim\",\r\n                        LastName = \"Ptaszynski\",\r\n                        Phone = \"(555) 555-5832\",\r\n                        Street1 = \"1 Anywhere Street\",\r\n                        City = \"Anytown\",\r\n                        State = \"NH\",\r\n                        Zip = 74584\r\n                    },\r\n                    new Contact\r\n                    {\r\n                        FirstName = \"Dan\",\r\n                        LastName = \"Bacon\",\r\n                        Phone = \"(555) 555-1914\",\r\n                        Street1 = \"144 Anywhere Lane\",\r\n                        City = \"Anytown\",\r\n                        State = \"WA\",\r\n                        Zip = 13412\r\n                    },\r\n                    new Contact\r\n                    {\r\n                        FirstName = \"Steve\",\r\n                        LastName = \"Kastner\",\r\n                        Phone = \"(555) 555-4581\",\r\n                        Street1 = \"121 Anywhere Street\",\r\n                        City = \"AnotherTown\",\r\n                        State = \"WA\",\r\n                        Zip = 45828\r\n                    },\r\n                    new Contact\r\n                    {\r\n                        FirstName = \"Andy\",\r\n                        LastName = \"Ruth\",\r\n                        Phone = \"(555) 555-4258\",\r\n                        Street1 = \"391 Somewhere Lane\",\r\n                        City = \"Anytown\",\r\n                        State = \"WA\",\r\n                        Zip = 38447\r\n                    },\r\n                    new Contact\r\n                    {\r\n                        FirstName = \"Brian\",\r\n                        LastName = \"Bredehoeft\",\r\n                        Phone = \"(555) 555-4853\",\r\n                        Street1 = \"1234 Anywhere Street\",\r\n                        City = \"Anytown\",\r\n                        State = \"WA\",\r\n                        Zip = 14834\r\n                    },\r\n                    new Contact\r\n                    {\r\n                        FirstName = \"Esko\",\r\n                        LastName = \"Sario\",\r\n                        Phone = \"(555) 555-3248\",\r\n                        Street1 = \"1 Someplace Street\",\r\n                        City = \"Anytown\",\r\n                        State = \"CA\",\r\n                        Zip = 41834\r\n                    },\r\n                    new Contact\r\n                    {\r\n                        FirstName = \"Joel\",\r\n                        LastName = \"Lachance\",\r\n                        Phone = \"(555) 555-1482\",\r\n                        Street1 = \"48 Anywhere Lane\",\r\n                        City = \"Anytown\",\r\n                        State = \"NY\",\r\n                        Zip = 91934\r\n                    },\r\n                    new Contact\r\n                    {\r\n                        FirstName = \"Bonnie\",\r\n                        LastName = \"Skelly\",\r\n                        Phone = \"(555) 555-8582\",\r\n                        Street1 = \"1 Anywhere Street\",\r\n                        City = \"Anytown\",\r\n                        State = \"NY\",\r\n                        Zip = 95812\r\n                    },\r\n                    new Contact\r\n                    {\r\n                        FirstName = \"James\",\r\n                        LastName = \"Doe\",\r\n                        Phone = \"(555) 555-5555\",\r\n                        Street1 = \"1 Anywhere Street\",\r\n                        City = \"AnotherTown\",\r\n                        State = \"WA\",\r\n                        Zip = 58433\r\n                    },\r\n                    new Contact\r\n                    {\r\n                        FirstName = \"John\",\r\n                        LastName = \"Somebody\",\r\n                        Phone = \"(555) 555-5555\",\r\n                        Street1 = \"1 Anywhere Street\",\r\n                        City = \"Anytown\",\r\n                        State = \"WA\",\r\n                        Zip = 15852\r\n                    },\r\n                    new Contact\r\n                    {\r\n                        FirstName = \"Jane\",\r\n                        LastName = \"Somebody\",\r\n                        Phone = \"(555) 555-5555\",\r\n                        Street1 = \"1 Anywhere Street\",\r\n                        City = \"Anytown\",\r\n                        State = \"HI\",\r\n                        Zip = 18824\r\n                    },\r\n                    new Contact\r\n                    {\r\n                        FirstName = \"Andrew\",\r\n                        LastName = \"Ma\",\r\n                        Phone = \"(555) 555-2384\",\r\n                        Street1 = \"1 Anywhere Drive\",\r\n                        City = \"Anytown\",\r\n                        State = \"OR\",\r\n                        Zip = 12420\r\n                    },\r\n                    new Contact\r\n                    {\r\n                        FirstName = \"Shannon\",\r\n                        LastName = \"Dascher\",\r\n                        Phone = \"(555) 555-7378\",\r\n                        Street1 = \"231 Anywhere Lane\",\r\n                        City = \"Anytown\",\r\n                        State = \"WA\",\r\n                        Zip = 14855\r\n                    },\r\n                    new Contact\r\n                    {\r\n                        FirstName = \"William\",\r\n                        LastName = \"Looney\",\r\n                        Phone = \"(555) 555-5555\",\r\n                        Street1 = \"145 Somwhere Street\",\r\n                        City = \"Anytown\",\r\n                        State = \"OR\",\r\n                        Zip = 19855\r\n                    },\r\n                    new Contact\r\n                    {\r\n                        FirstName = \"Louise\",\r\n                        LastName = \"Toubro\",\r\n                        Phone = \"(555) 555-4832\",\r\n                        Street1 = \"123 Somewhere Lane\",\r\n                        City = \"AnotherTown\",\r\n                        State = \"OR\",\r\n                        Zip = 12842\r\n                    },\r\n                    new Contact\r\n                    {\r\n                        FirstName = \"Tim\",\r\n                        LastName = \"Toyoshima\",\r\n                        Phone = \"(555) 555-3849\",\r\n                        Street1 = \"1234 Anywhere Street\",\r\n                        City = \"Anytown\",\r\n                        State = \"NH\",\r\n                        Zip = 12843\r\n                    },\r\n                    new Contact\r\n                    {\r\n                        FirstName = \"Peter\",\r\n                        LastName = \"Mullen\",\r\n                        Phone = \"(555) 555-7758\",\r\n                        Street1 = \"1233 Anywhere Street\",\r\n                        City = \"Anytown\",\r\n                        State = \"WA\",\r\n                        Zip = 12484\r\n                    },\r\n                    new Contact\r\n                    {\r\n                        FirstName = \"Ming-Yang\",\r\n                        LastName = \"Xie\",\r\n                        Phone = \"(555) 555-9283\",\r\n                        Street1 = \"1423 Somewhere Street\",\r\n                        City = \"Anytown\",\r\n                        State = \"WA\",\r\n                        Zip = 12348\r\n                    },\r\n                    new Contact\r\n                    {\r\n                        FirstName = \"Smuel\",\r\n                        LastName = \"Yair\",\r\n                        Phone = \"(555) 555-4821\",\r\n                        Street1 = \"138 Anywhere Street\",\r\n                        City = \"Anytown\",\r\n                        State = \"WA\",\r\n                        Zip = 48439\r\n                    },\r\n                    new Contact\r\n                    {\r\n                        FirstName = \"John\",\r\n                        LastName = \"Woods\",\r\n                        Phone = \"(555) 555-5859\",\r\n                        Street1 = \"9583 Anywhere Street\",\r\n                        City = \"Anytown\",\r\n                        State = \"WA\",\r\n                        Zip = 93205\r\n                    },\r\n                    new Contact\r\n                    {\r\n                        FirstName = \"Pieter\",\r\n                        LastName = \"Wycoff\",\r\n                        Phone = \"(555) 555-9292\",\r\n                        Street1 = \"321 Anywhere Lane\",\r\n                        City = \"Anytown\",\r\n                        State = \"CA\",\r\n                        Zip = 95839\r\n                    },\r\n                    new Contact\r\n                    {\r\n                        FirstName = \"Michiel\",\r\n                        LastName = \"Wories\",\r\n                        Phone = \"(555) 555-8584\",\r\n                        Street1 = \"199 Anywhere Street\",\r\n                        City = \"AnotherTown\",\r\n                        State = \"NY\",\r\n                        Zip = 39495\r\n                    },\r\n                    new Contact\r\n                    {\r\n                        FirstName = \"John\",\r\n                        LastName = \"Yokim\",\r\n                        Phone = \"(555) 555-4843\",\r\n                        Street1 = \"3241 Someplace Street\",\r\n                        City = \"Anytown\",\r\n                        State = \"NY\",\r\n                        Zip = 93258\r\n                    },\r\n                    new Contact\r\n                    {\r\n                        FirstName = \"Yanlai\",\r\n                        LastName = \"Guo\",\r\n                        Phone = \"(555) 555-4999\",\r\n                        Street1 = \"2241 Somewhere Street\",\r\n                        City = \"Anytown\",\r\n                        State = \"WA\",\r\n                        Zip = 18444\r\n                    }\r\n                };\r\n            }\r\n        }\r\n\r\n        #region IEditableObject Members\r\n        /// <summary>\r\n        /// Keeps a copy of the original contact for editing.\r\n        /// </summary>\r\n        private Contact cache;\r\n\r\n        /// <summary>\r\n        /// Indicates that the contact will undergo a cancellable edit.\r\n        /// </summary>\r\n        public void BeginEdit()\r\n        {\r\n            cache = new Contact();\r\n            cache.City = this.City;\r\n            cache.Email = this.Email;\r\n            cache.FirstName = this.FirstName;\r\n            cache.LastName = this.LastName;\r\n            cache.Phone = this.Phone;\r\n            cache.State = this.State;\r\n            cache.Street1 = this.Street1;\r\n            cache.Street2 = this.Street2;\r\n            cache.Zip = this.Zip;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Indicates that the edit was cancelled and that the old state should be restored.\r\n        /// </summary>\r\n        public void CancelEdit()\r\n        {\r\n            this.City = cache.City;\r\n            this.Email = cache.Email;\r\n            this.FirstName = cache.FirstName;\r\n            this.LastName = cache.LastName;\r\n            this.Phone = cache.Phone;\r\n            this.State = cache.State;\r\n            this.Street1 = cache.Street1;\r\n            this.Street2 = cache.Street2;\r\n            this.Zip = cache.Zip;\r\n            cache = null;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Indicates that the edit completed and that changed fields should be committed.\r\n        /// </summary>\r\n        public void EndEdit()\r\n        {\r\n            cache = null;\r\n        }\r\n\r\n        #endregion\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Samples/Common/BusinessObjects/Customer.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.ObjectModel;\r\nusing System.ComponentModel;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Windows.Media;\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    /// <summary>\r\n    /// Indicates the status of a customer's payment or complaint.\r\n    /// </summary>\r\n    public enum Status\r\n    {\r\n        /// <summary>\r\n        /// Indicates that the item is closed.\r\n        /// </summary>\r\n        Closed,\r\n\r\n        /// <summary>\r\n        /// Indicates that the item is active.\r\n        /// </summary>\r\n        Active,\r\n\r\n        /// <summary>\r\n        /// Indicates that the item is resolved.\r\n        /// </summary>\r\n        Resolved\r\n    }\r\n\r\n    /// <summary>\r\n    /// Represents a customer.\r\n    /// </summary>\r\n    public class Customer : INotifyPropertyChanged, IEditableObject\r\n    {\r\n        /// <summary>\r\n        /// Random number generator.\r\n        /// </summary>\r\n        private static Random random = new Random(DateTime.Now.Millisecond);\r\n\r\n        /// <summary>\r\n        /// Holds the data backing a customer.\r\n        /// </summary>\r\n        private struct CustomerData\r\n        {\r\n            /// <summary>\r\n            /// The customer's first name.\r\n            /// </summary>\r\n            internal string FirstName;\r\n\r\n            /// <summary>\r\n            /// The customer's last name.\r\n            /// </summary>\r\n            internal string LastName;\r\n\r\n            /// <summary>\r\n            /// The customer's preferred color.\r\n            /// </summary>\r\n            internal Color PreferredColor;\r\n\r\n            /// <summary>\r\n            /// The customer's rating.\r\n            /// </summary>\r\n            internal int Rating;\r\n\r\n            /// <summary>\r\n            /// The customer's renewal date.\r\n            /// </summary>\r\n            internal DateTime RenewalDate;\r\n\r\n            /// <summary>\r\n            /// The customer's full address.\r\n            /// </summary>\r\n            internal string FullAddress;\r\n\r\n            /// <summary>\r\n            /// The customer's yearly fees.\r\n            /// </summary>\r\n            internal decimal YearlyFees;\r\n\r\n            /// <summary>\r\n            /// The customer's registration status.\r\n            /// </summary>\r\n            internal bool IsRegistered;\r\n\r\n            /// <summary>\r\n            /// The customer entry's validity.\r\n            /// </summary>\r\n            internal bool? IsValid;\r\n\r\n            /// <summary>\r\n            /// The customer's age.\r\n            /// </summary>\r\n            internal int? Age;\r\n\r\n            /// <summary>\r\n            /// The customer's payment status.\r\n            /// </summary>\r\n            internal Status Payment;\r\n\r\n            /// <summary>\r\n            /// The customer's complaint status.\r\n            /// </summary>\r\n            internal Status? Complaint;\r\n        }\r\n\r\n        #region Data\r\n\r\n        /// <summary>\r\n        /// Stores the data for the customer.\r\n        /// </summary>\r\n        private CustomerData _data;\r\n\r\n        /// <summary>\r\n        /// Stores a backup of the customer's data during edits.\r\n        /// </summary>\r\n        private CustomerData _backupData;\r\n\r\n        /// <summary>\r\n        /// Indicates whether the customer is being edited.\r\n        /// </summary>\r\n        private bool _editing;\r\n\r\n        /// <summary>\r\n        /// Indicates whether property change notifications should be enabled.\r\n        /// </summary>\r\n        private bool _delayPropertyChangeNotifications;\r\n\r\n        #endregion Data\r\n\r\n        /// <summary>\r\n        /// Initializes a customer object.\r\n        /// </summary>\r\n        public Customer()\r\n        {\r\n            this._delayPropertyChangeNotifications = true;\r\n            this._data = new CustomerData();\r\n            this._data.RenewalDate = DateTime.Today;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a customer object.\r\n        /// </summary>\r\n        /// <param name=\"firstName\">Customer's first name.</param>\r\n        /// <param name=\"lastName\">Customer's last name.</param>\r\n        /// <param name=\"preferredColor\">Customer's preferred color.</param>\r\n        /// <param name=\"rating\">Customer's rating.</param>\r\n        /// <param name=\"fullAddress\">Customer's full address.</param>\r\n        /// <param name=\"yearlyFees\">Customer's yearly fees.</param>\r\n        /// <param name=\"isRegistered\">Customer's registration status.</param>\r\n        /// <param name=\"isValid\">Customer's validity.</param>\r\n        /// <param name=\"age\">Customer's age.</param>\r\n        /// <param name=\"payment\">Customer's payment status.</param>\r\n        /// <param name=\"complaint\">Customer's complaint status.</param>\r\n        public Customer(\r\n            string firstName,\r\n            string lastName,\r\n            Color preferredColor,\r\n            int rating,\r\n            string fullAddress,\r\n            decimal yearlyFees,\r\n            bool isRegistered,\r\n            bool? isValid,\r\n            int? age,\r\n            Status payment,\r\n            Status? complaint)\r\n            : this()\r\n        {\r\n            this._data.FirstName = firstName;\r\n            this._data.LastName = lastName;\r\n            this._data.PreferredColor = preferredColor;\r\n            this._data.Rating = rating;\r\n            this._data.FullAddress = fullAddress;\r\n            this._data.YearlyFees = yearlyFees;\r\n            this._data.IsRegistered = isRegistered;\r\n            this._data.IsValid = isValid;\r\n            this._data.Age = age;\r\n            this._data.Payment = payment;\r\n            this._data.Complaint = complaint;\r\n        }\r\n\r\n        #region INotifyPropertyChanged Members\r\n\r\n        /// <summary>\r\n        /// Raised when a property on the customer changes.\r\n        /// </summary>\r\n        public event PropertyChangedEventHandler PropertyChanged;\r\n\r\n        #endregion INotifyPropertyChanged Members\r\n\r\n        #region IEditableObject Members\r\n\r\n        /// <summary>\r\n        /// Indicates that the contact will undergo a cancellable edit.\r\n        /// </summary>\r\n        public void BeginEdit()\r\n        {\r\n            if (!this._editing)\r\n            {\r\n                this._backupData = this._data;\r\n                this._editing = true;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Indicates that the edit was cancelled and that the old state should be restored.\r\n        /// </summary>\r\n        public void CancelEdit()\r\n        {\r\n            if (this._editing)\r\n            {\r\n                if (!this._delayPropertyChangeNotifications)\r\n                {\r\n                    if (string.Compare(this._data.FirstName, this._backupData.FirstName, StringComparison.CurrentCulture) != 0)\r\n                    {\r\n                        RaisePropertyChanged(\"FirstName\");\r\n                    }\r\n                    if (string.Compare(this._data.LastName, this._backupData.LastName, StringComparison.CurrentCulture) != 0)\r\n                    {\r\n                        RaisePropertyChanged(\"LastName\");\r\n                    }\r\n                    if (this._data.Rating != this._backupData.Rating)\r\n                    {\r\n                        RaisePropertyChanged(\"Rating\");\r\n                    }\r\n                    if (this._data.RenewalDate != this._backupData.RenewalDate)\r\n                    {\r\n                        RaisePropertyChanged(\"RenewalDate\");\r\n                    }\r\n                    if (string.Compare(this._data.FullAddress, this._backupData.FullAddress, StringComparison.CurrentCulture) != 0)\r\n                    {\r\n                        RaisePropertyChanged(\"FullAddress\");\r\n                    }\r\n                    if (this._data.YearlyFees != this._backupData.YearlyFees)\r\n                    {\r\n                        RaisePropertyChanged(\"YearlyFees\");\r\n                    }\r\n                    if (this._data.IsRegistered != this._backupData.IsRegistered)\r\n                    {\r\n                        RaisePropertyChanged(\"IsRegistered\");\r\n                    }\r\n                    if (this._data.IsValid != this._backupData.IsValid)\r\n                    {\r\n                        RaisePropertyChanged(\"IsValid\");\r\n                    }\r\n                    if (this._data.Payment != this._backupData.Payment)\r\n                    {\r\n                        RaisePropertyChanged(\"Payment\");\r\n                    }\r\n                    if (this._data.Complaint != this._backupData.Complaint)\r\n                    {\r\n                        RaisePropertyChanged(\"Complaint\");\r\n                    }\r\n                }\r\n                this._data = this._backupData;\r\n                this._editing = false;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Indicates that the edit completed and that changed fields should be committed.\r\n        /// </summary>\r\n        public void EndEdit()\r\n        {\r\n            if (this._editing)\r\n            {\r\n                if (this._delayPropertyChangeNotifications)\r\n                {\r\n                    if (string.Compare(this._data.FirstName, this._backupData.FirstName, StringComparison.CurrentCulture) != 0)\r\n                    {\r\n                        RaisePropertyChanged(\"FirstName\");\r\n                    }\r\n                    if (string.Compare(this._data.LastName, this._backupData.LastName, StringComparison.CurrentCulture) != 0)\r\n                    {\r\n                        RaisePropertyChanged(\"LastName\");\r\n                    }\r\n                    if (this._data.Rating != this._backupData.Rating)\r\n                    {\r\n                        RaisePropertyChanged(\"Rating\");\r\n                    }\r\n                    if (this._data.RenewalDate != this._backupData.RenewalDate)\r\n                    {\r\n                        RaisePropertyChanged(\"RenewalDate\");\r\n                    }\r\n                    if (string.Compare(this._data.FullAddress, this._backupData.FullAddress, StringComparison.CurrentCulture) != 0)\r\n                    {\r\n                        RaisePropertyChanged(\"FullAddress\");\r\n                    }\r\n                    if (this._data.YearlyFees != this._backupData.YearlyFees)\r\n                    {\r\n                        RaisePropertyChanged(\"YearlyFees\");\r\n                    }\r\n                    if (this._data.IsRegistered != this._backupData.IsRegistered)\r\n                    {\r\n                        RaisePropertyChanged(\"IsRegistered\");\r\n                    }\r\n                    if (this._data.IsValid != this._backupData.IsValid)\r\n                    {\r\n                        RaisePropertyChanged(\"IsValid\");\r\n                    }\r\n                    if (this._data.Payment != this._backupData.Payment)\r\n                    {\r\n                        RaisePropertyChanged(\"Payment\");\r\n                    }\r\n                    if (this._data.Complaint != this._backupData.Complaint)\r\n                    {\r\n                        RaisePropertyChanged(\"Complaint\");\r\n                    }\r\n                }\r\n                this._backupData = new CustomerData();\r\n                this._editing = false;\r\n            }\r\n        }\r\n\r\n        #endregion IEditableObject Members\r\n\r\n        #region Public Properties\r\n\r\n        /// <summary>\r\n        /// Gets or sets the customer's Age.\r\n        /// </summary>\r\n        public int? Age\r\n        {\r\n            get\r\n            {\r\n                return this._data.Age;\r\n            }\r\n            set\r\n            {\r\n                if (this._data.Age != value)\r\n                {\r\n                    this._data.Age = value;\r\n                    if (!this._delayPropertyChangeNotifications || !this._editing)\r\n                    {\r\n                        RaisePropertyChanged(\"Age\");\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the customer's complaint status.\r\n        /// </summary>\r\n        public Status? Complaint\r\n        {\r\n            get\r\n            {\r\n                return this._data.Complaint;\r\n            }\r\n            set\r\n            {\r\n                if (this._data.Complaint != value)\r\n                {\r\n                    this._data.Complaint = value;\r\n                    if (!this._delayPropertyChangeNotifications || !this._editing)\r\n                    {\r\n                        RaisePropertyChanged(\"Complaint\");\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the customer's first name.\r\n        /// </summary>\r\n        public string FirstName\r\n        {\r\n            get\r\n            {\r\n                return this._data.FirstName;\r\n            }\r\n            set\r\n            {\r\n                if (this._data.FirstName != value)\r\n                {\r\n                    this._data.FirstName = value;\r\n                    if (!this._delayPropertyChangeNotifications || !this._editing)\r\n                    {\r\n                        RaisePropertyChanged(\"FirstName\");\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the customer's full address.\r\n        /// </summary>\r\n        public string FullAddress\r\n        {\r\n            get\r\n            {\r\n                return this._data.FullAddress;\r\n            }\r\n            set\r\n            {\r\n                if (this._data.FullAddress != value)\r\n                {\r\n                    this._data.FullAddress = value;\r\n                    if (!this._delayPropertyChangeNotifications || !this._editing)\r\n                    {\r\n                        RaisePropertyChanged(\"FullAddress\");\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether the customer is registered.\r\n        /// </summary>\r\n        public bool IsRegistered\r\n        {\r\n            get\r\n            {\r\n                return this._data.IsRegistered;\r\n            }\r\n            set\r\n            {\r\n                if (this._data.IsRegistered != value)\r\n                {\r\n                    this._data.IsRegistered = value;\r\n                    if (!this._delayPropertyChangeNotifications || !this._editing)\r\n                    {\r\n                        RaisePropertyChanged(\"IsRegistered\");\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a value indicating whether the customer is valid.\r\n        /// </summary>\r\n        public bool? IsValid\r\n        {\r\n            get\r\n            {\r\n                return this._data.IsValid;\r\n            }\r\n            set\r\n            {\r\n                if (this._data.IsValid != value)\r\n                {\r\n                    this._data.IsValid = value;\r\n                    if (!this._delayPropertyChangeNotifications || !this._editing)\r\n                    {\r\n                        RaisePropertyChanged(\"IsValid\");\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the customer's last name.\r\n        /// </summary>\r\n        public string LastName\r\n        {\r\n            get\r\n            {\r\n                return this._data.LastName;\r\n            }\r\n            set\r\n            {\r\n                if (this._data.LastName != value)\r\n                {\r\n                    this._data.LastName = value;\r\n                    if (!this._delayPropertyChangeNotifications || !this._editing)\r\n                    {\r\n                        RaisePropertyChanged(\"LastName\");\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the customer's payment status.\r\n        /// </summary>\r\n        public Status Payment\r\n        {\r\n            get\r\n            {\r\n                return this._data.Payment;\r\n            }\r\n            set\r\n            {\r\n                if (this._data.Payment != value)\r\n                {\r\n                    this._data.Payment = value;\r\n                    if (!this._delayPropertyChangeNotifications || !this._editing)\r\n                    {\r\n                        RaisePropertyChanged(\"Payment\");\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the customer's preferred color.\r\n        /// </summary>\r\n        public Color PreferredColor\r\n        {\r\n            get\r\n            {\r\n                return this._data.PreferredColor;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a random customer.\r\n        /// </summary>\r\n        public static Customer FakeCustomer\r\n        {\r\n            get\r\n            {\r\n                return CreateFakeCustomer(-1);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the customer's rating.\r\n        /// </summary>\r\n        public int Rating\r\n        {\r\n            get\r\n            {\r\n                return this._data.Rating;\r\n            }\r\n            set\r\n            {\r\n                if (this._data.Rating != value)\r\n                {\r\n                    this._data.Rating = value;\r\n                    if (!this._delayPropertyChangeNotifications || !this._editing)\r\n                    {\r\n                        RaisePropertyChanged(\"Rating\");\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the customer's renewal date.\r\n        /// </summary>\r\n        public DateTime RenewalDate\r\n        {\r\n            get\r\n            {\r\n                return this._data.RenewalDate;\r\n            }\r\n            set\r\n            {\r\n                if (this._data.RenewalDate != value)\r\n                {\r\n                    this._data.RenewalDate = value;\r\n                    if (!this._delayPropertyChangeNotifications || !this._editing)\r\n                    {\r\n                        RaisePropertyChanged(\"RenewalDate\");\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the customer's yearly fees.\r\n        /// </summary>\r\n        public decimal YearlyFees\r\n        {\r\n            get\r\n            {\r\n                return this._data.YearlyFees;\r\n            }\r\n            set\r\n            {\r\n                if (this._data.YearlyFees != value)\r\n                {\r\n                    this._data.YearlyFees = value;\r\n                    if (!this._delayPropertyChangeNotifications || !this._editing)\r\n                    {\r\n                        RaisePropertyChanged(\"YearlyFees\");\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a collection of the characters in the customer's first name.\r\n        /// </summary>\r\n        public Collection<char> Chars\r\n        {\r\n            get\r\n            {\r\n                return new Collection<char>(this.FirstName.ToCharArray().ToList());\r\n            }\r\n        }\r\n        #endregion Public Properties\r\n\r\n        #region Public Methods\r\n\r\n        /// <summary>\r\n        /// Gets a random customer.\r\n        /// </summary>\r\n        /// <param name=\"index\">The index of the random customer.</param>\r\n        /// <returns>A customer based upon the index.</returns>\r\n        public static Customer GetRandomCustomer(int index)\r\n        {\r\n            return CreateFakeCustomer(index);\r\n        }\r\n\r\n        #endregion Public Methods\r\n\r\n        #region Internal Methods\r\n\r\n        /// <summary>\r\n        /// Gets a random status.\r\n        /// </summary>\r\n        /// <param name=\"random\">Random number generator.</param>\r\n        /// <returns>A random status.</returns>\r\n        internal static Status GetFakeStatus(Random random)\r\n        {\r\n            switch (random.Next(0, 3000) % 3)\r\n            {\r\n                case 0:\r\n                    return Status.Active;\r\n                case 1:\r\n                    return Status.Closed;\r\n                default:\r\n                    return Status.Resolved;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a random string of characters.\r\n        /// </summary>\r\n        /// <param name=\"random\">Random number generator.</param>\r\n        /// <returns>A string of randomly selected characters.</returns>\r\n        internal static string GetFakeString(Random random)\r\n        {\r\n            StringBuilder stringBuilder = new StringBuilder();\r\n            for (int i = 0; i < 8; i++)\r\n            {\r\n                stringBuilder.Append((char)random.Next(65, 90));\r\n            }\r\n            return stringBuilder.ToString();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a random bool value.\r\n        /// </summary>\r\n        /// <param name=\"random\">Random number generator.</param>\r\n        /// <returns>A random bool value.</returns>\r\n        internal static bool GetFakeBool(Random random)\r\n        {\r\n            return random.Next(0, 2000) % 2 == 0;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a random nullable bool value.\r\n        /// </summary>\r\n        /// <param name=\"random\">Random number generator.</param>\r\n        /// <returns>A random nullable bool value.</returns>\r\n        internal static bool? GetFakeNullableBool(Random random)\r\n        {\r\n            switch (random.Next(0, 3000) % 3)\r\n            {\r\n                case 0:\r\n                    return null;\r\n                case 1:\r\n                    return true;\r\n                default:\r\n                    return false;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a random integer with a 1 in 6 chance of being null.\r\n        /// </summary>\r\n        /// <param name=\"random\">Random number generator.</param>\r\n        /// <returns>A random nullable integer.</returns>\r\n        internal static int? GetFakeNullableInteger(Random random)\r\n        {\r\n            int i = random.Next(0, 100);\r\n            return (i % 6 == 0) ? null : (int?)i;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a random status, with a 1 in 4 chance of being null.\r\n        /// </summary>\r\n        /// <param name=\"random\">Random number generator.</param>\r\n        /// <returns>A random nullable status.</returns>\r\n        internal static Status? GetFakeNullableStatus(Random random)\r\n        {\r\n            switch (random.Next(0, 4000) % 4)\r\n            {\r\n                case 0:\r\n                    return Status.Active;\r\n                case 1:\r\n                    return Status.Closed;\r\n                case 2:\r\n                    return Status.Resolved;\r\n                default:\r\n                    return null;\r\n            }\r\n        }\r\n\r\n        #endregion Internal Methods\r\n\r\n        #region Private Methods\r\n\r\n        /// <summary>\r\n        /// Creates a customer with random data.\r\n        /// </summary>\r\n        /// <param name=\"index\">Index of the customer to generate.</param>\r\n        /// <returns>A random customer.</returns>\r\n        private static Customer CreateFakeCustomer(int index)\r\n        {\r\n            return new Customer(\r\n                GetFakeString(random) + ((index > -1) ? index.ToString(CultureInfo.CurrentCulture) : string.Empty),\r\n                GetFakeString(random),\r\n                GetFakeColor(random),\r\n                random.Next(5),\r\n                GetFakeString(random),\r\n                (decimal)(random.Next(100, 10000) / 100.0),\r\n                GetFakeBool(random),\r\n                GetFakeNullableBool(random),\r\n                GetFakeNullableInteger(random),\r\n                GetFakeStatus(random),\r\n                GetFakeNullableStatus(random));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Randomly chooses a color from {Blue, Brown, Cyan, Gray, Green, Magenta, Orange, Purple, Red, Yellow}.\r\n        /// </summary>\r\n        /// <param name=\"random\">Random number generator.</param>\r\n        /// <returns>A random color.</returns>\r\n        private static Color GetFakeColor(Random random)\r\n        {\r\n            switch (random.Next(0, 9))\r\n            {\r\n                case 0:\r\n                    return Colors.Blue;\r\n                case 1:\r\n                    return Colors.Brown;\r\n                case 2:\r\n                    return Colors.Cyan;\r\n                case 3:\r\n                    return Colors.Gray;\r\n                case 4:\r\n                    return Colors.Green;\r\n                case 5:\r\n                    return Colors.Magenta;\r\n                case 6:\r\n                    return Colors.Orange;\r\n                case 7:\r\n                    return Colors.Purple;\r\n                case 8:\r\n                    return Colors.Red;\r\n                default:\r\n                    return Colors.Yellow;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Raises a property changed notification.\r\n        /// </summary>\r\n        /// <param name=\"propertyName\">Name of the property that changed.</param>\r\n        private void RaisePropertyChanged(string propertyName)\r\n        {\r\n            if (this.PropertyChanged != null)\r\n            {\r\n                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));\r\n            }\r\n        }\r\n\r\n        #endregion Private Methods\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Samples/Common/BusinessObjects/CustomerList.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Collections.Specialized;\r\nusing System.Windows.Media;\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    /// <summary>\r\n    /// Represents a collection of Customer objects.\r\n    /// </summary>\r\n    public class CustomerCollection : IList<Customer>, IList, INotifyCollectionChanged\r\n    {\r\n        /// <summary>\r\n        /// The underlying list of customers.\r\n        /// </summary>\r\n        private List<Customer> _customers;\r\n\r\n        /// <summary>\r\n        /// Notifies of changes to the collection.\r\n        /// </summary>\r\n        public event NotifyCollectionChangedEventHandler CollectionChanged;\r\n\r\n        /// <summary>\r\n        /// Initializes a CustomerCollection object with 25 customers.\r\n        /// </summary>\r\n        public CustomerCollection()\r\n            : this(25)\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a CustomerCollection.\r\n        /// </summary>\r\n        /// <param name=\"customerCount\">The number of customers to generate.</param>\r\n        public CustomerCollection(int customerCount)\r\n        {\r\n            this._customers = new List<Customer>();\r\n\r\n            // Fake Data\r\n            if (customerCount > 0)\r\n            {\r\n                Add(new Customer(\"John\", \"Doe\", Colors.Orange, 1, \"Obere Str. 57, Berlin 12209, Germany\", (decimal)12.25, false, null, 35, Status.Active, Status.Closed));\r\n            }\r\n            if (customerCount > 1)\r\n            {\r\n                Add(new Customer(\"Jane\", \"Doe\", Colors.Purple, 5, \"24, place Kléber, 67000 Strasbourg, France\", (decimal)15.55, true, null, 57, Status.Resolved, null));\r\n            }\r\n            if (customerCount > 2)\r\n            {\r\n                Add(new Customer(\"Joe\", \"Anybody\", Colors.Yellow, 1, \"Strada Provinciale 124, 42100 Reggio Emilia, Italy\", (decimal)11.5, true, false, null, Status.Closed, Status.Closed));\r\n            }\r\n            if (customerCount > 3)\r\n            {\r\n                Add(new Customer(\"Jill\", \"Anybody\", Colors.Green, 1, \"Geislweg 36, Salzburg 5020, Austria\", (decimal)9.99, false, true, null, Status.Active, null));\r\n            }\r\n            for (int customer = 4; customer < customerCount; customer++)\r\n            {\r\n                Add(Customer.GetRandomCustomer(customer));\r\n            }\r\n        }\r\n\r\n        #region ICollection Members\r\n\r\n        /// <summary>\r\n        /// Copies the collection.\r\n        /// </summary>\r\n        /// <param name=\"array\">Destination array.</param>\r\n        /// <param name=\"index\">Index to copy to.</param>\r\n        public void CopyTo(System.Array array, int index)\r\n        {\r\n            throw new NotImplementedException();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether the collection supports asynchronous operations.\r\n        /// </summary>\r\n        public bool IsSynchronized\r\n        {\r\n            get\r\n            {\r\n                return false;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets an object to use for synchronization.\r\n        /// </summary>\r\n        public object SyncRoot\r\n        {\r\n            get\r\n            {\r\n                return this;\r\n            }\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region IList Members\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether the collection has a fixed size.\r\n        /// </summary>\r\n        public bool IsFixedSize\r\n        {\r\n            get\r\n            {\r\n                return false;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether the collection is read-only.\r\n        /// </summary>\r\n        public bool IsReadOnly\r\n        {\r\n            get\r\n            {\r\n                return false;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Returns the customer at an index.\r\n        /// </summary>\r\n        /// <param name=\"index\">Index to retrieve.</param>\r\n        /// <returns>The customer at the given index in the collection.</returns>\r\n        object IList.this[int index]\r\n        {\r\n            get\r\n            {\r\n                return this._customers[index];\r\n            }\r\n            set\r\n            {\r\n                Customer customer = value as Customer;\r\n                if (customer == null)\r\n                {\r\n                    throw new ArgumentNullException(\"value\");\r\n                }\r\n                this._customers[index] = customer;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Adds an item to the collection.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value to add to the collection.</param>\r\n        /// <returns>The index at which the value was added.</returns>\r\n        public int Add(object value)\r\n        {\r\n            Customer customer = value as Customer;\r\n            if (customer == null)\r\n            {\r\n                throw new ArgumentException(\"Invalid argument to Add\", \"value\");\r\n            }\r\n            Add(customer);\r\n            return this.Count - 1;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Determines whether the collection contains the given value.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value to search for.</param>\r\n        /// <returns>True if the collection contains the value.  False otherwise.</returns>\r\n        public bool Contains(object value)\r\n        {\r\n            if (value == null)\r\n            {\r\n                throw new ArgumentNullException(\"value\");\r\n            }\r\n            return Contains(value as Customer);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Determines the index of the given value.\r\n        /// </summary>\r\n        /// <param name=\"value\">The value to search for.</param>\r\n        /// <returns>The index of the value, or -1 if not found.</returns>\r\n        public int IndexOf(object value)\r\n        {\r\n            return IndexOf(value as Customer);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Inserts an object at the given index.\r\n        /// </summary>\r\n        /// <param name=\"index\">Index where the value should be inserted.</param>\r\n        /// <param name=\"value\">The value to insert.</param>\r\n        public void Insert(int index, object value)\r\n        {\r\n            Insert(index, value as Customer);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes the given value from the collection.\r\n        /// </summary>\r\n        /// <param name=\"value\">Value to remove.</param>\r\n        public void Remove(object value)\r\n        {\r\n            Remove(value as Customer);\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region IList<Customer> Members\r\n\r\n        /// <summary>\r\n        /// Determines the index of the given customer.\r\n        /// </summary>\r\n        /// <param name=\"item\">The customer to search for.</param>\r\n        /// <returns>The index of the customer, or -1 if not found.</returns>\r\n        public int IndexOf(Customer item)\r\n        {\r\n            return this._customers.IndexOf(item);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Inserts a customer at the given index.\r\n        /// </summary>\r\n        /// <param name=\"index\">Index where the value should be inserted.</param>\r\n        /// <param name=\"item\">Customer to insert.</param>\r\n        public void Insert(int index, Customer item)\r\n        {\r\n            if (item == null)\r\n            {\r\n                throw new ArgumentNullException(\"item\");\r\n            }\r\n            this._customers.Insert(index, item);\r\n            RaiseCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, item, index));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes the item at the given index.\r\n        /// </summary>\r\n        /// <param name=\"index\">Index at which the item should be removed.</param>\r\n        public void RemoveAt(int index)\r\n        {\r\n            Customer customer = this._customers[index];\r\n            this._customers.RemoveAt(index);\r\n            RaiseCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, customer, index));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the customer at the given index.\r\n        /// </summary>\r\n        /// <param name=\"index\">Index of the customer.</param>\r\n        /// <returns>The customer at the given index.</returns>\r\n        public Customer this[int index]\r\n        {\r\n            get\r\n            {\r\n                return this._customers[index];\r\n            }\r\n            set\r\n            {\r\n                if (this._customers[index] != value)\r\n                {\r\n                    if (value == null)\r\n                    {\r\n                        throw new ArgumentNullException(\"value\");\r\n                    }\r\n                    this._customers[index] = value;\r\n                    RaiseCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Replace, value, index));\r\n                }\r\n            }\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region ICollection<Customer> Members\r\n\r\n        /// <summary>\r\n        /// Adds a customer to the collection.\r\n        /// </summary>\r\n        /// <param name=\"item\">Customer to add.</param>\r\n        public void Add(Customer item)\r\n        {\r\n            if (item == null)\r\n            {\r\n                throw new ArgumentNullException(\"item\");\r\n            }\r\n            this._customers.Add(item);\r\n            RaiseCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, item, this.Count - 1));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Clears the collection.\r\n        /// </summary>\r\n        public void Clear()\r\n        {\r\n            this._customers.Clear();\r\n            RaiseCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Determines whether the collection contains the given customer.\r\n        /// </summary>\r\n        /// <param name=\"item\">The customer to search for.</param>\r\n        /// <returns>True if the collection contains the customer.  False otherwise.</returns>\r\n        public bool Contains(Customer item)\r\n        {\r\n            if (item == null)\r\n            {\r\n                throw new ArgumentNullException(\"item\");\r\n            }\r\n            return this._customers.Contains(item);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Copies customers from this collection into an array.\r\n        /// </summary>\r\n        /// <param name=\"array\">Destination array.</param>\r\n        /// <param name=\"arrayIndex\">Start index in the array into which customers will be copied.</param>\r\n        public void CopyTo(Customer[] array, int arrayIndex)\r\n        {\r\n            this._customers.CopyTo(array, arrayIndex);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the number of items in the collection.\r\n        /// </summary>\r\n        public int Count\r\n        {\r\n            get\r\n            {\r\n                return this._customers.Count;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Removes a customer from the collection.\r\n        /// </summary>\r\n        /// <param name=\"item\">Customer to remove.</param>\r\n        /// <returns>True if the customer was found and removed.  False otherwise.</returns>\r\n        public bool Remove(Customer item)\r\n        {\r\n            if (item == null)\r\n            {\r\n                throw new ArgumentNullException(\"item\");\r\n            }\r\n            int index = this._customers.IndexOf(item);\r\n            if (index > -1)\r\n            {\r\n                this._customers.RemoveAt(index);\r\n                RaiseCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, item, index));\r\n                return true;\r\n            }\r\n            return false;\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region IEnumerable<Customer> Members\r\n\r\n        /// <summary>\r\n        /// Enumerates over the customers in the collection.\r\n        /// </summary>\r\n        /// <returns>An enumerator for the customers.</returns>\r\n        public IEnumerator<Customer> GetEnumerator()\r\n        {\r\n            return this._customers.GetEnumerator();\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region IEnumerable Members\r\n\r\n        /// <summary>\r\n        /// Enumerates over the customers in the collection.\r\n        /// </summary>\r\n        /// <returns>An enumerator for the customers.</returns>\r\n        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()\r\n        {\r\n            return this._customers.GetEnumerator();\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region Private methods\r\n\r\n        /// <summary>\r\n        /// Raises the CollectionChanged event.\r\n        /// </summary>\r\n        /// <param name=\"e\">Event arguments.</param>\r\n        private void RaiseCollectionChanged(NotifyCollectionChangedEventArgs e)\r\n        {\r\n            if (CollectionChanged != null)\r\n            {\r\n                CollectionChanged(this, e);\r\n            }\r\n        }\r\n\r\n        #endregion Private methods\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Samples/Common/BusinessObjects/Department.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.Generic;\r\nusing System.Collections.ObjectModel;\r\nusing System.Linq;\r\nusing System.Windows;\r\nusing System.Windows.Markup;\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    /// <summary>\r\n    /// Represents a department in an organization.\r\n    /// </summary>\r\n    [ContentProperty(\"Divisions\")]\r\n    public class Department\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the Department class.\r\n        /// </summary>\r\n        public Department()\r\n        {\r\n            Divisions = new Collection<Department>();\r\n            Employees = new Collection<Employee>();\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the title of the department.\r\n        /// </summary>\r\n        public string Title { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets a collection of employees in the department.\r\n        /// </summary>\r\n        public Collection<Employee> Employees { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Gets a collection of divisions inside the department.\r\n        /// </summary>\r\n        public Collection<Department> Divisions { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Gets a sample hierarchy of departments and employees.\r\n        /// </summary>\r\n        public static IEnumerable<Department> AllDepartments\r\n        {\r\n            get\r\n            {\r\n                IEnumerable<object> data = Application.Current.Resources[\"DepartmentOrganization\"] as IEnumerable<object>;\r\n                return (data != null) ?\r\n                    data.Cast<Department>() :\r\n                    Enumerable.Empty<Department>();\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Samples/Common/BusinessObjects/Employee.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics.CodeAnalysis;\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    /// <summary>\r\n    /// Employee business object used in DataTemplate examples.\r\n    /// </summary>\r\n    public sealed partial class Employee\r\n    {\r\n        /// <summary>\r\n        /// Gets or sets the first name of the employee.\r\n        /// </summary>\r\n        public string FirstName { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the last name of the employee.\r\n        /// </summary>\r\n        public string LastName { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets a Photograph of the employee.\r\n        /// </summary>\r\n        public Photograph Photograph { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets the display name for the employee. Uses simple concatenation \r\n        /// currently.\r\n        /// </summary>\r\n        public string DisplayName\r\n        {\r\n            get\r\n            {\r\n                return FirstName + \" \" + LastName;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the Employee class.\r\n        /// </summary>\r\n        public Employee()\r\n        {\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the Employee class.\r\n        /// </summary>\r\n        /// <param name=\"firstName\">First name of the employee.</param>\r\n        /// <param name=\"lastName\">Last name of the employee.</param>\r\n        /// <param name=\"resourceName\">\r\n        /// Name of a resource containing a photograph of the employee.\r\n        /// </param>\r\n        internal Employee(string firstName, string lastName, string resourceName) : this(firstName, lastName)\r\n        {\r\n            Photograph = new Photograph(resourceName);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the Employee class.\r\n        /// </summary>\r\n        /// <param name=\"firstName\">First name of the employee.</param>\r\n        /// <param name=\"lastName\">Last name of the employee.</param>\r\n        internal Employee(string firstName, string lastName)\r\n        {\r\n            FirstName = firstName;\r\n            LastName = lastName;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Overrides the ToString method to return the DisplayName for the \r\n        /// Employee.\r\n        /// </summary>\r\n        /// <returns>Returns the full name of the employee.</returns>\r\n        public override string ToString()\r\n        {\r\n            return DisplayName;\r\n        }\r\n\r\n        #region Sample data\r\n\r\n        /// <summary>\r\n        /// Gets an Employee object that represents Bill Gates.\r\n        /// </summary>\r\n        public static Employee BillGates\r\n        {\r\n            get { return new Employee(\"Bill\", \"Gates\", \"BillGates.jpg\"); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets an Employee object that represents Steve Ballmer.\r\n        /// </summary>\r\n        public static Employee SteveBallmer\r\n        {\r\n            get { return new Employee(\"Steve\", \"Ballmer\", \"SteveBallmer.jpg\"); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets an Employee object that represents S. Somasegar.\r\n        /// </summary>\r\n        [SuppressMessage(\"Microsoft.Naming\", \"CA1704:IdentifiersShouldBeSpelledCorrectly\", MessageId = \"Somasegar\", Justification = \"It's his name.\")]\r\n        public static Employee Somasegar\r\n        {\r\n            get { return new Employee(\"S.\", \"Somasegar\", \"Somasegar.jpg\"); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets an Employee object that represents Scott Guthrie.\r\n        /// </summary>\r\n        public static Employee ScottGuthrie\r\n        {\r\n            get { return new Employee(\"Scott\", \"Guthrie\", \"ScottGuthrie.jpg\"); }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a collection of various executives at the company.\r\n        /// </summary>\r\n        public static IEnumerable<Employee> Executives\r\n        {\r\n            get { return new Employee[] { BillGates, SteveBallmer, Somasegar, ScottGuthrie }; }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets a collection of executive leaders as defined online, as of \r\n        /// 10/14/08.\r\n        /// </summary>\r\n        public static IEnumerable<Employee> AllExecutives\r\n        {\r\n            get\r\n            {\r\n                yield return new Employee(\"Walid\", \"Abu-Hadba\");\r\n                yield return new Employee(\"J\", \"Allard\");\r\n                yield return new Employee(\"Klaus\", \"Holse Andersen\");\r\n                yield return new Employee(\"Nancy\", \"Anderson\");\r\n                yield return new Employee(\"Brian\", \"Arbogast\");\r\n                yield return new Employee(\"Orlando\", \"Ayala\");\r\n                yield return new Employee(\"Robert J.\", \"Bach\");\r\n                yield return SteveBallmer;\r\n                yield return new Employee(\"Martha\", \"Béjar\");\r\n                yield return new Employee(\"Joe\", \"Belfiore\");\r\n                yield return new Employee(\"Sue\", \"Bevington\");\r\n                yield return new Employee(\"Frank H.\", \"Brod\");\r\n                yield return new Employee(\"Brad\", \"Brooks\");\r\n                yield return new Employee(\"Lisa\", \"Brummel\");\r\n                yield return new Employee(\"Tom\", \"Burt\");\r\n                yield return new Employee(\"Chris\", \"Capossela\");\r\n                yield return new Employee(\"Scott\", \"Charney\");\r\n                yield return new Employee(\"Debra\", \"Chrapaty\");\r\n                yield return new Employee(\"Jean-Philippe\", \"Courtois\");\r\n                yield return new Employee(\"Alain\", \"Crozier\");\r\n                yield return new Employee(\"Kurt\", \"DelBene\");\r\n                yield return new Employee(\"Michael\", \"Delman\");\r\n                yield return new Employee(\"Joe\", \"DeVaan\");\r\n                yield return new Employee(\"Gerri\", \"Elliott\");\r\n                yield return new Employee(\"Stephen\", \"Elop\");\r\n                yield return new Employee(\"Ben\", \"Fathi\");\r\n                yield return BillGates;\r\n                yield return new Employee(\"Grant\", \"George\");\r\n                yield return new Employee(\"Tom\", \"Gibbons\");\r\n                yield return new Employee(\"L. Michael\", \"Golden\");\r\n                yield return new Employee(\"Alexander\", \"Gounares\");\r\n                yield return new Employee(\"Steve\", \"Guggenheimer\");\r\n                yield return new Employee(\"Anoop\", \"Gupta\");\r\n                yield return ScottGuthrie;\r\n                yield return new Employee(\"Tony\", \"Hey\");\r\n                yield return new Employee(\"Yasuyuki\", \"Higuchi\");\r\n                yield return new Employee(\"Roz\", \"Ho\");\r\n                yield return new Employee(\"Kathleen\", \"Hogan\");\r\n                yield return new Employee(\"Frank\", \"Holland\");\r\n                yield return new Employee(\"Todd\", \"Holmdahl\");\r\n                yield return new Employee(\"Darren\", \"Huston\");\r\n                yield return new Employee(\"Rajesh\", \"Jha\");\r\n                yield return new Employee(\"Chris\", \"Jones\");\r\n                yield return new Employee(\"Erik\", \"Jorgensen\");\r\n                yield return new Employee(\"Rich\", \"Kaplan\");\r\n                yield return new Employee(\"Bob\", \"Kelly\");\r\n                yield return new Employee(\"Jawad\", \"Khaki\");\r\n                yield return new Employee(\"Shane\", \"Kim\");\r\n                yield return new Employee(\"Peter\", \"Klein\");\r\n                yield return new Employee(\"Mitchell L.\", \"Koch\");\r\n                yield return new Employee(\"Ted\", \"Kummert\");\r\n                yield return new Employee(\"Julie\", \"Larson-Green\");\r\n                yield return new Employee(\"Antoine\", \"Leblond\");\r\n                yield return new Employee(\"Andrew\", \"Lees\");\r\n                yield return new Employee(\"John M.\", \"Lervik\");\r\n                yield return new Employee(\"Lewis\", \"Levin\");\r\n                yield return new Employee(\"Dan'l\", \"Lewin\");\r\n                yield return new Employee(\"Moshe\", \"Lichtman\");\r\n                yield return new Employee(\"Christopher\", \"Liddell\");\r\n                yield return new Employee(\"Steve\", \"Liffick\");\r\n                yield return new Employee(\"Brian\", \"MacDonald\");\r\n                yield return new Employee(\"Ron\", \"Markezich\");\r\n                yield return new Employee(\"Maria\", \"Martinez\");\r\n                yield return new Employee(\"Mich\", \"Mathews\");\r\n                yield return new Employee(\"Don A.\", \"Mattrick\");\r\n                yield return new Employee(\"Joe\", \"Matz\");\r\n                yield return new Employee(\"Brian\", \"McAndrews\");\r\n                yield return new Employee(\"Richard\", \"McAniff\");\r\n                yield return new Employee(\"Yusuf\", \"Mehdi\");\r\n                yield return new Employee(\"Jim\", \"Minervino\");\r\n                yield return new Employee(\"William H.\", \"Mitchell\");\r\n                yield return new Employee(\"Jens Winther\", \"Moberg\");\r\n                yield return new Employee(\"Mindy\", \"Mount\");\r\n                yield return new Employee(\"Bob\", \"Muglia\");\r\n                yield return new Employee(\"Craig\", \"Mundie\");\r\n                yield return new Employee(\"Terry\", \"Myerson\");\r\n                yield return new Employee(\"Satya\", \"Nadella\");\r\n                yield return new Employee(\"Mike\", \"Nash\");\r\n                yield return new Employee(\"Peter\", \"Neupert\");\r\n                yield return new Employee(\"Ray\", \"Ozzie\");\r\n                yield return new Employee(\"Gurdeep\", \"Singh Pall\");\r\n                yield return new Employee(\"Michael\", \"Park\");\r\n                yield return new Employee(\"Umberto\", \"Paolucci\");\r\n                yield return new Employee(\"Sanjay\", \"Parthasarathy\");\r\n                yield return new Employee(\"Pamela\", \"Passman\");\r\n                yield return new Employee(\"Alain\", \"Peracca\");\r\n                yield return new Employee(\"Todd\", \"Peters\");\r\n                yield return new Employee(\"Joe\", \"Peterson\");\r\n                yield return new Employee(\"Marshall C.\", \"Phelps, Jr.\");\r\n                yield return new Employee(\"Scott\", \"Pitasky\");\r\n                yield return new Employee(\"Will\", \"Poole\");\r\n                yield return new Employee(\"Rick\", \"Rashid\");\r\n                yield return new Employee(\"Tami\", \"Reller\");\r\n                yield return new Employee(\"J.\", \"Ritchie\");\r\n                yield return new Employee(\"Enrique\", \"Rodriguez\");\r\n                yield return new Employee(\"Eduardo\", \"Rosini\");\r\n                yield return new Employee(\"Jon\", \"Roskill\");\r\n                yield return new Employee(\"Eric\", \"Rudder\");\r\n                yield return new Employee(\"John\", \"Schappert\");\r\n                yield return new Employee(\"Tony\", \"Scott\");\r\n                yield return new Employee(\"Jeanne\", \"Sheldon\");\r\n                yield return new Employee(\"Harry\", \"Shum\");\r\n                yield return new Employee(\"Steven\", \"Sinofsky\");\r\n                yield return new Employee(\"Brad\", \"Smith\");\r\n                yield return new Employee(\"Mary E.\", \"Snapp\");\r\n                yield return Somasegar;\r\n                yield return new Employee(\"Amitabh\", \"Srivastava\");\r\n                yield return new Employee(\"Kirill\", \"Tatarinov\");\r\n                yield return new Employee(\"Jeff\", \"Teper\");\r\n                yield return new Employee(\"David\", \"Thompson\");\r\n                yield return new Employee(\"Rick\", \"Thompson\");\r\n                yield return new Employee(\"Brian\", \"Tobey\");\r\n                yield return new Employee(\"David\", \"Treadwell\");\r\n                yield return new Employee(\"B. Kevin\", \"Turner\");\r\n                yield return new Employee(\"David\", \"Vaskevitch\");\r\n                yield return new Employee(\"Bill\", \"Veghte\");\r\n                yield return new Employee(\"Henry P.\", \"Vigil\");\r\n                yield return new Employee(\"Robert\", \"Wahbe\");\r\n                yield return new Employee(\"Todd\", \"Warren\");\r\n                yield return new Employee(\"Allison\", \"Watson\");\r\n                yield return new Employee(\"Blair\", \"Westlake\");\r\n                yield return new Employee(\"Simon\", \"Witts\");\r\n                yield return new Employee(\"Robert\", \"Youngjohns\");\r\n                yield return new Employee(\"Ya-Qin\", \"Zhang\");\r\n                yield return new Employee(\"George\", \"Zinn\");\r\n            }\r\n        }\r\n        #endregion\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Samples/Common/BusinessObjects/Feature.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System.Collections.ObjectModel;\r\nusing System.ComponentModel;\r\nusing System.Windows.Markup;\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    /// <summary>\r\n    /// Represents a feature that can be installed.\r\n    /// </summary>\r\n    [ContentProperty(\"Subcomponents\")]\r\n    public class Feature : INotifyPropertyChanged\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the Feature class.\r\n        /// </summary>\r\n        public Feature()\r\n        {\r\n            Subcomponents = new Collection<Feature>();\r\n            ShouldInstall = true;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the name of the feature.\r\n        /// </summary>\r\n        public string FeatureName { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the description of the feature.\r\n        /// </summary>\r\n        public string Description { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets a collection of sub-components that make up the feature.\r\n        /// </summary>\r\n        public Collection<Feature> Subcomponents { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether the feature has subcomponents.\r\n        /// </summary>\r\n        public bool HasSubcomponents\r\n        {\r\n            get\r\n            {\r\n                return Subcomponents.Count > 0;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Backing variable for the ShouldInstall property.\r\n        /// </summary>\r\n        private bool? _shouldInstall;\r\n\r\n        /// <summary>\r\n        /// Gets or sets whether the feature should be installed.\r\n        /// </summary>\r\n        public bool? ShouldInstall\r\n        {\r\n            get\r\n            {\r\n                return _shouldInstall;\r\n            }\r\n            set\r\n            {\r\n                if (value != _shouldInstall)\r\n                {\r\n                    _shouldInstall = value;\r\n                    OnPropertyChanged(\"ShouldInstall\");\r\n                }\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Implements the INotifyPropertyChanged interface.\r\n        /// </summary>\r\n        public event PropertyChangedEventHandler PropertyChanged;\r\n\r\n        /// <summary>\r\n        /// Fires the PropertyChanged event.\r\n        /// </summary>\r\n        /// <param name=\"propertyName\">Property that changed.</param>\r\n        private void OnPropertyChanged(string propertyName)\r\n        {\r\n            PropertyChangedEventHandler handler = PropertyChanged;\r\n            if (null != handler)\r\n            {\r\n                handler.Invoke(this, new PropertyChangedEventArgs(propertyName));\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Samples/Common/BusinessObjects/MemberInfoData.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Linq;\r\nusing System.Reflection;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Imaging;\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    /// <summary>\r\n    /// A wrapper type that can be used for visually displaying reflected type \r\n    /// information.\r\n    /// </summary>\r\n    public class MemberInfoData\r\n    {\r\n        /// <summary>\r\n        /// Gets an enumerable set of PME information objects.\r\n        /// </summary>\r\n        /// <param name=\"type\">The type to reflect over.</param>\r\n        /// <returns>Returns the set of MemberInfoData objects.</returns>\r\n        public static IEnumerable<MemberInfoData> GetSetForType(Type type)\r\n        {\r\n            MemberInfo[] members = type.GetMembers();\r\n            if (members.Length > 0)\r\n            {\r\n                foreach (MemberInfo member in members)\r\n                {\r\n                    if (member.Name.Contains(\"get_\") || member.Name.Contains(\"set_\") || member.Name.Contains(\"add_\") || member.Name.Contains(\"remove_\"))\r\n                    {\r\n                        continue;\r\n                    }\r\n\r\n                    MemberInfoData pme = new MemberInfoData(member);\r\n                    yield return pme;\r\n                }\r\n            }\r\n            else\r\n            {\r\n                yield break;\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the MemberInfoData class \r\n        /// with the provided MemberInfo object's data.\r\n        /// </summary>\r\n        /// <param name=\"mi\">The member info object.</param>\r\n        public MemberInfoData(MemberInfo mi)\r\n        {\r\n            MemberInfo = mi;\r\n            Name = mi.Name;\r\n\r\n            if (mi is PropertyInfo)\r\n            {\r\n                IconName = \"Property.png\";\r\n            }\r\n\r\n            MethodInfo methodInfo = mi as MethodInfo;\r\n            if (methodInfo != null)\r\n            {\r\n                IconName = methodInfo.IsStatic ? \"Static.png\" : \"Method.png\";\r\n            }\r\n\r\n            if (mi is EventInfo)\r\n            {\r\n                IconName = \"Event.png\";\r\n            }\r\n\r\n            FieldInfo field = mi as FieldInfo;\r\n            if (field != null)\r\n            {\r\n                IconName = \"Static.png\";\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets the member information object.\r\n        /// </summary>\r\n        public MemberInfo MemberInfo { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the icon string name.\r\n        /// </summary>\r\n        private string IconName { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets the icon.\r\n        /// </summary>\r\n        public Image Icon\r\n        {\r\n            get\r\n            {\r\n                return IconName == null ? null : SharedResources.GetIcon(IconName);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Gets or sets the name.\r\n        /// </summary>\r\n        public string Name { get; set; }\r\n\r\n        /// <summary>\r\n        /// Gets the foreground color based on method properties.\r\n        /// </summary>\r\n        public Brush ForegroundColor\r\n        {\r\n            get\r\n            {\r\n                Color c = MemberInfo.DeclaringType == MemberInfo.ReflectedType ? Colors.Black : Colors.DarkGray;\r\n                return new SolidColorBrush(c);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Overrides the ToString method to display the name.\r\n        /// </summary>\r\n        /// <returns>Returns the name as a string.</returns>\r\n        public override string ToString()\r\n        {\r\n            return Name;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Samples/Common/BusinessObjects/ObjectCollection.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Collections.ObjectModel;\r\nusing System.Collections;\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    public partial class ObjectCollection : Collection<Object>\r\n    {\r\n        public ObjectCollection()\r\n            : base()\r\n        {\r\n        }\r\n\r\n        public ObjectCollection(IEnumerable enumerable)\r\n        {\r\n            if (enumerable == null)\r\n            {\r\n                throw new ArgumentNullException(\"enumerable\");\r\n            }\r\n\r\n            foreach (Object item in enumerable)\r\n            {\r\n                Add(item);\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Samples/Common/BusinessObjects/Photograph.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Windows.Controls;\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    /// <summary>\r\n    /// Photograph business object used in examples.\r\n    /// </summary>\r\n    public sealed partial class Photograph\r\n    {\r\n        /// <summary>\r\n        /// Gets the name of the Photograph.\r\n        /// </summary>\r\n        public string Name { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Gets an Image control containing the Photograph.\r\n        /// </summary>\r\n        public Image Image { get; private set; }\r\n\r\n        /// <summary>\r\n        /// Initializes a new instance of the Photograph class.\r\n        /// </summary>\r\n        /// <param name=\"resourceName\">\r\n        /// Name of the resource defining the photograph.\r\n        /// </param>\r\n        internal Photograph(string resourceName)\r\n        {\r\n            Name = resourceName;\r\n            Image = SharedResources.GetImage(resourceName);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Overrides the string to return the name.\r\n        /// </summary>\r\n        /// <returns>Returns the photograph name.</returns>\r\n        public override string ToString()\r\n        {\r\n            return Name;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Get all of the photographs defined in the assembly as embedded\r\n        /// resources.\r\n        /// </summary>\r\n        /// <returns>\r\n        /// All of the photographs defined in the assembly as embedded\r\n        /// resources.\r\n        /// </returns>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1024:UsePropertiesWhereAppropriate\", Justification = \"Doing more work than a property should\")]\r\n        public static IEnumerable<Photograph> GetPhotographs()\r\n        {\r\n            foreach (string resourceName in SharedResources.GetImageNames())\r\n            {\r\n                yield return new Photograph(resourceName);\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Samples/Common/BusinessObjects/Words.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections;\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    /// <summary>\r\n    /// A set of words to use in control samples.\r\n    /// </summary>\r\n    public static class Words\r\n    {\r\n        /// <summary>\r\n        /// Gets a list of words from the book Alice in Wonderland.\r\n        /// </summary>\r\n        /// <returns>Returns a very large string array.</returns>\r\n        public static string[] GetAliceInWonderland()\r\n        {\r\n            return AliceInWonderland;\r\n        }\r\n\r\n        /// <summary>\r\n        /// A static string array of words.\r\n        /// </summary>\r\n        private static readonly string[] AliceInWonderland =\r\n        {\r\n            \"a\", \r\n            \"abide\", \r\n            \"able\", \r\n            \"about\", \r\n            \"above\", \r\n            \"absence\", \r\n            \"absurd\", \r\n            \"accept\", \r\n            \"acceptance\", \r\n            \"accepted\", \r\n            \"accepting\", \r\n            \"access\", \r\n            \"accessed\", \r\n            \"accessible\", \r\n            \"accident\", \r\n            \"accidentally\", \r\n            \"accordance\", \r\n            \"account\", \r\n            \"accounting\", \r\n            \"accounts\", \r\n            \"accusation\", \r\n            \"accustomed\", \r\n            \"ache\", \r\n            \"across\", \r\n            \"act\", \r\n            \"active\", \r\n            \"actual\", \r\n            \"actually\", \r\n            \"ada\", \r\n            \"added\", \r\n            \"adding\", \r\n            \"addition\", \r\n            \"additional\", \r\n            \"additions\", \r\n            \"address\", \r\n            \"addressed\", \r\n            \"addresses\", \r\n            \"addressing\", \r\n            \"adjourn\", \r\n            \"adoption\", \r\n            \"advance\", \r\n            \"advantage\", \r\n            \"adventures\", \r\n            \"advice\", \r\n            \"advisable\", \r\n            \"advise\", \r\n            \"affair\", \r\n            \"affectionately\", \r\n            \"afford\", \r\n            \"afore\", \r\n            \"afraid\", \r\n            \"after\", \r\n            \"afterwards\", \r\n            \"again\", \r\n            \"against\", \r\n            \"age\", \r\n            \"aged\", \r\n            \"agent\", \r\n            \"ago\", \r\n            \"agony\", \r\n            \"agree\", \r\n            \"agreed\", \r\n            \"agreement\", \r\n            \"ah\", \r\n            \"ahem\", \r\n            \"air\", \r\n            \"airs\", \r\n            \"ak\", \r\n            \"alarm\", \r\n            \"alarmed\", \r\n            \"alas\", \r\n            \"alice\", \r\n            \"alive\", \r\n            \"all\", \r\n            \"allow\", \r\n            \"almost\", \r\n            \"alone\", \r\n            \"along\", \r\n            \"aloud\", \r\n            \"already\", \r\n            \"also\", \r\n            \"alteration\", \r\n            \"altered\", \r\n            \"alternate\", \r\n            \"alternately\", \r\n            \"altogether\", \r\n            \"always\", \r\n            \"am\", \r\n            \"ambition\", \r\n            \"among\", \r\n            \"an\", \r\n            \"ancient\", \r\n            \"and\", \r\n            \"anger\", \r\n            \"angrily\", \r\n            \"angry\", \r\n            \"animal\", \r\n            \"animals\", \r\n            \"ann\", \r\n            \"annoy\", \r\n            \"annoyed\", \r\n            \"another\", \r\n            \"answer\", \r\n            \"answered\", \r\n            \"answers\", \r\n            \"antipathies\", \r\n            \"anxious\", \r\n            \"anxiously\", \r\n            \"any\", \r\n            \"anyone\", \r\n            \"anything\", \r\n            \"anywhere\", \r\n            \"appealed\", \r\n            \"appear\", \r\n            \"appearance\", \r\n            \"appeared\", \r\n            \"appearing\", \r\n            \"appears\", \r\n            \"applause\", \r\n            \"apple\", \r\n            \"apples\", \r\n            \"applicable\", \r\n            \"apply\", \r\n            \"approach\", \r\n            \"arch\", \r\n            \"archbishop\", \r\n            \"arches\", \r\n            \"archive\", \r\n            \"are\", \r\n            \"argue\", \r\n            \"argued\", \r\n            \"argument\", \r\n            \"arguments\", \r\n            \"arise\", \r\n            \"arithmetic\", \r\n            \"arm\", \r\n            \"arms\", \r\n            \"around\", \r\n            \"arranged\", \r\n            \"array\", \r\n            \"arrived\", \r\n            \"arrow\", \r\n            \"arrum\", \r\n            \"as\", \r\n            \"ascii\", \r\n            \"ashamed\", \r\n            \"ask\", \r\n            \"askance\", \r\n            \"asked\", \r\n            \"asking\", \r\n            \"asleep\", \r\n            \"assembled\", \r\n            \"assistance\", \r\n            \"associated\", \r\n            \"at\", \r\n            \"ate\", \r\n            \"atheling\", \r\n            \"atom\", \r\n            \"attached\", \r\n            \"attempt\", \r\n            \"attempted\", \r\n            \"attempts\", \r\n            \"attended\", \r\n            \"attending\", \r\n            \"attends\", \r\n            \"audibly\", \r\n            \"australia\", \r\n            \"author\", \r\n            \"authority\", \r\n            \"available\", \r\n            \"avoid\", \r\n            \"away\", \r\n            \"awfully\", \r\n            \"axes\", \r\n            \"axis\", \r\n            \"b\", \r\n            \"baby\", \r\n            \"back\", \r\n            \"backs\", \r\n            \"bad\", \r\n            \"bag\", \r\n            \"baked\", \r\n            \"balanced\", \r\n            \"bank\", \r\n            \"banks\", \r\n            \"banquet\", \r\n            \"bark\", \r\n            \"barking\", \r\n            \"barley\", \r\n            \"barrowful\", \r\n            \"based\", \r\n            \"bat\", \r\n            \"bathing\", \r\n            \"bats\", \r\n            \"bawled\", \r\n            \"be\", \r\n            \"beak\", \r\n            \"bear\", \r\n            \"beast\", \r\n            \"beasts\", \r\n            \"beat\", \r\n            \"beating\", \r\n            \"beau\", \r\n            \"beauti\", \r\n            \"beautiful\", \r\n            \"beautifully\", \r\n            \"beautify\", \r\n            \"became\", \r\n            \"because\", \r\n            \"become\", \r\n            \"becoming\", \r\n            \"bed\", \r\n            \"beds\", \r\n            \"bee\", \r\n            \"been\", \r\n            \"before\", \r\n            \"beg\", \r\n            \"began\", \r\n            \"begged\", \r\n            \"begin\", \r\n            \"beginning\", \r\n            \"begins\", \r\n            \"begun\", \r\n            \"behead\", \r\n            \"beheaded\", \r\n            \"beheading\", \r\n            \"behind\", \r\n            \"being\", \r\n            \"believe\", \r\n            \"believed\", \r\n            \"bells\", \r\n            \"belong\", \r\n            \"belongs\", \r\n            \"beloved\", \r\n            \"below\", \r\n            \"belt\", \r\n            \"bend\", \r\n            \"bent\", \r\n            \"besides\", \r\n            \"best\", \r\n            \"better\", \r\n            \"between\", \r\n            \"bill\", \r\n            \"binary\", \r\n            \"bird\", \r\n            \"birds\", \r\n            \"birthday\", \r\n            \"bit\", \r\n            \"bite\", \r\n            \"bitter\", \r\n            \"blacking\", \r\n            \"blades\", \r\n            \"blame\", \r\n            \"blasts\", \r\n            \"bleeds\", \r\n            \"blew\", \r\n            \"blow\", \r\n            \"blown\", \r\n            \"blows\", \r\n            \"body\", \r\n            \"boldly\", \r\n            \"bone\", \r\n            \"bones\", \r\n            \"book\", \r\n            \"books\", \r\n            \"boon\", \r\n            \"boots\", \r\n            \"bore\", \r\n            \"both\", \r\n            \"bother\", \r\n            \"bottle\", \r\n            \"bottom\", \r\n            \"bough\", \r\n            \"bound\", \r\n            \"bowed\", \r\n            \"bowing\", \r\n            \"box\", \r\n            \"boxed\", \r\n            \"boy\", \r\n            \"brain\", \r\n            \"branch\", \r\n            \"branches\", \r\n            \"brandy\", \r\n            \"brass\", \r\n            \"brave\", \r\n            \"breach\", \r\n            \"bread\", \r\n            \"break\", \r\n            \"breath\", \r\n            \"breathe\", \r\n            \"breeze\", \r\n            \"bright\", \r\n            \"brightened\", \r\n            \"bring\", \r\n            \"bringing\", \r\n            \"bristling\", \r\n            \"broke\", \r\n            \"broken\", \r\n            \"brother\", \r\n            \"brought\", \r\n            \"brown\", \r\n            \"brush\", \r\n            \"brushing\", \r\n            \"burn\", \r\n            \"burning\", \r\n            \"burnt\", \r\n            \"burst\", \r\n            \"bursting\", \r\n            \"busily\", \r\n            \"business\", \r\n            \"business@pglaf\", \r\n            \"busy\", \r\n            \"but\", \r\n            \"butter\", \r\n            \"buttercup\", \r\n            \"buttered\", \r\n            \"butterfly\", \r\n            \"buttons\", \r\n            \"by\", \r\n            \"bye\", \r\n            \"c\", \r\n            \"cackled\", \r\n            \"cake\", \r\n            \"cakes\", \r\n            \"calculate\", \r\n            \"calculated\", \r\n            \"call\", \r\n            \"called\", \r\n            \"calling\", \r\n            \"calmly\", \r\n            \"came\", \r\n            \"camomile\", \r\n            \"can\", \r\n            \"canary\", \r\n            \"candle\", \r\n            \"cannot\", \r\n            \"canterbury\", \r\n            \"canvas\", \r\n            \"capering\", \r\n            \"capital\", \r\n            \"card\", \r\n            \"cardboard\", \r\n            \"cards\", \r\n            \"care\", \r\n            \"carefully\", \r\n            \"cares\", \r\n            \"carried\", \r\n            \"carrier\", \r\n            \"carroll\", \r\n            \"carry\", \r\n            \"carrying\", \r\n            \"cart\", \r\n            \"cartwheels\", \r\n            \"case\", \r\n            \"cat\", \r\n            \"catch\", \r\n            \"catching\", \r\n            \"caterpillar\", \r\n            \"cats\", \r\n            \"cattle\", \r\n            \"caucus\", \r\n            \"caught\", \r\n            \"cauldron\", \r\n            \"cause\", \r\n            \"caused\", \r\n            \"cautiously\", \r\n            \"cease\", \r\n            \"ceiling\", \r\n            \"centre\", \r\n            \"certain\", \r\n            \"certainly\", \r\n            \"chain\", \r\n            \"chains\", \r\n            \"chair\", \r\n            \"chance\", \r\n            \"chanced\", \r\n            \"change\", \r\n            \"changed\", \r\n            \"changes\", \r\n            \"changing\", \r\n            \"chapter\", \r\n            \"character\", \r\n            \"charge\", \r\n            \"charges\", \r\n            \"charitable\", \r\n            \"charities\", \r\n            \"chatte\", \r\n            \"cheap\", \r\n            \"cheated\", \r\n            \"check\", \r\n            \"checked\", \r\n            \"checks\", \r\n            \"cheeks\", \r\n            \"cheered\", \r\n            \"cheerfully\", \r\n            \"cherry\", \r\n            \"cheshire\", \r\n            \"chief\", \r\n            \"child\", \r\n            \"childhood\", \r\n            \"children\", \r\n            \"chimney\", \r\n            \"chimneys\", \r\n            \"chin\", \r\n            \"choice\", \r\n            \"choke\", \r\n            \"choked\", \r\n            \"choking\", \r\n            \"choose\", \r\n            \"choosing\", \r\n            \"chop\", \r\n            \"chorus\", \r\n            \"chose\", \r\n            \"christmas\", \r\n            \"chrysalis\", \r\n            \"chuckled\", \r\n            \"circle\", \r\n            \"circumstances\", \r\n            \"city\", \r\n            \"civil\", \r\n            \"claim\", \r\n            \"clamour\", \r\n            \"clapping\", \r\n            \"clasped\", \r\n            \"classics\", \r\n            \"claws\", \r\n            \"clean\", \r\n            \"clear\", \r\n            \"cleared\", \r\n            \"clearer\", \r\n            \"clearly\", \r\n            \"clever\", \r\n            \"climb\", \r\n            \"clinging\", \r\n            \"clock\", \r\n            \"close\", \r\n            \"closed\", \r\n            \"closely\", \r\n            \"closer\", \r\n            \"clubs\", \r\n            \"coast\", \r\n            \"coaxing\", \r\n            \"codes\", \r\n            \"coils\", \r\n            \"cold\", \r\n            \"collar\", \r\n            \"collected\", \r\n            \"collection\", \r\n            \"come\", \r\n            \"comes\", \r\n            \"comfits\", \r\n            \"comfort\", \r\n            \"comfortable\", \r\n            \"comfortably\", \r\n            \"coming\", \r\n            \"commercial\", \r\n            \"committed\", \r\n            \"common\", \r\n            \"commotion\", \r\n            \"company\", \r\n            \"compilation\", \r\n            \"complained\", \r\n            \"complaining\", \r\n            \"completely\", \r\n            \"compliance\", \r\n            \"comply\", \r\n            \"complying\", \r\n            \"compressed\", \r\n            \"computer\", \r\n            \"computers\", \r\n            \"concept\", \r\n            \"concerning\", \r\n            \"concert\", \r\n            \"concluded\", \r\n            \"conclusion\", \r\n            \"condemn\", \r\n            \"conduct\", \r\n            \"confirmation\", \r\n            \"confirmed\", \r\n            \"confused\", \r\n            \"confusing\", \r\n            \"confusion\", \r\n            \"conger\", \r\n            \"conqueror\", \r\n            \"conquest\", \r\n            \"consented\", \r\n            \"consequential\", \r\n            \"consider\", \r\n            \"considerable\", \r\n            \"considered\", \r\n            \"considering\", \r\n            \"constant\", \r\n            \"consultation\", \r\n            \"contact\", \r\n            \"contain\", \r\n            \"containing\", \r\n            \"contempt\", \r\n            \"contemptuous\", \r\n            \"contemptuously\", \r\n            \"content\", \r\n            \"continued\", \r\n            \"contract\", \r\n            \"contradicted\", \r\n            \"contributions\", \r\n            \"conversation\", \r\n            \"conversations\", \r\n            \"convert\", \r\n            \"cook\", \r\n            \"cool\", \r\n            \"copied\", \r\n            \"copies\", \r\n            \"copy\", \r\n            \"copying\", \r\n            \"copyright\", \r\n            \"corner\", \r\n            \"corners\", \r\n            \"corporation\", \r\n            \"corrupt\", \r\n            \"cost\", \r\n            \"costs\", \r\n            \"could\", \r\n            \"couldn\", \r\n            \"counting\", \r\n            \"countries\", \r\n            \"country\", \r\n            \"couple\", \r\n            \"couples\", \r\n            \"courage\", \r\n            \"course\", \r\n            \"court\", \r\n            \"courtiers\", \r\n            \"coward\", \r\n            \"crab\", \r\n            \"crash\", \r\n            \"crashed\", \r\n            \"crawled\", \r\n            \"crawling\", \r\n            \"crazy\", \r\n            \"created\", \r\n            \"creating\", \r\n            \"creation\", \r\n            \"creature\", \r\n            \"creatures\", \r\n            \"credit\", \r\n            \"creep\", \r\n            \"crept\", \r\n            \"cried\", \r\n            \"cries\", \r\n            \"crimson\", \r\n            \"critical\", \r\n            \"crocodile\", \r\n            \"croquet\", \r\n            \"croqueted\", \r\n            \"croqueting\", \r\n            \"cross\", \r\n            \"crossed\", \r\n            \"crossly\", \r\n            \"crouched\", \r\n            \"crowd\", \r\n            \"crowded\", \r\n            \"crown\", \r\n            \"crumbs\", \r\n            \"crust\", \r\n            \"cry\", \r\n            \"crying\", \r\n            \"cucumber\", \r\n            \"cunning\", \r\n            \"cup\", \r\n            \"cupboards\", \r\n            \"cur\", \r\n            \"curiosity\", \r\n            \"curious\", \r\n            \"curiouser\", \r\n            \"curled\", \r\n            \"curls\", \r\n            \"curly\", \r\n            \"currants\", \r\n            \"current\", \r\n            \"curtain\", \r\n            \"curtsey\", \r\n            \"curtseying\", \r\n            \"curving\", \r\n            \"cushion\", \r\n            \"custard\", \r\n            \"custody\", \r\n            \"cut\", \r\n            \"cutting\", \r\n            \"d\", \r\n            \"dainties\", \r\n            \"daisies\", \r\n            \"daisy\", \r\n            \"damage\", \r\n            \"damaged\", \r\n            \"damages\", \r\n            \"dance\", \r\n            \"dancing\", \r\n            \"dare\", \r\n            \"daresay\", \r\n            \"dark\", \r\n            \"darkness\", \r\n            \"data\", \r\n            \"date\", \r\n            \"dates\", \r\n            \"daughter\", \r\n            \"day\", \r\n            \"days\", \r\n            \"dead\", \r\n            \"deal\", \r\n            \"dear\", \r\n            \"dears\", \r\n            \"death\", \r\n            \"decided\", \r\n            \"decidedly\", \r\n            \"declare\", \r\n            \"declared\", \r\n            \"deductible\", \r\n            \"deep\", \r\n            \"deepest\", \r\n            \"deeply\", \r\n            \"defect\", \r\n            \"defective\", \r\n            \"defects\", \r\n            \"delay\", \r\n            \"deletions\", \r\n            \"delight\", \r\n            \"delighted\", \r\n            \"delightful\", \r\n            \"demand\", \r\n            \"denial\", \r\n            \"denied\", \r\n            \"denies\", \r\n            \"deny\", \r\n            \"denying\", \r\n            \"depends\", \r\n            \"derision\", \r\n            \"derivative\", \r\n            \"derive\", \r\n            \"derived\", \r\n            \"described\", \r\n            \"deserved\", \r\n            \"desk\", \r\n            \"desks\", \r\n            \"despair\", \r\n            \"desperate\", \r\n            \"desperately\", \r\n            \"despite\", \r\n            \"destroy\", \r\n            \"detach\", \r\n            \"determine\", \r\n            \"diamonds\", \r\n            \"did\", \r\n            \"didn\", \r\n            \"die\", \r\n            \"died\", \r\n            \"different\", \r\n            \"difficult\", \r\n            \"difficulties\", \r\n            \"difficulty\", \r\n            \"dig\", \r\n            \"digging\", \r\n            \"diligently\", \r\n            \"dinah\", \r\n            \"dinn\", \r\n            \"dinner\", \r\n            \"dipped\", \r\n            \"direct\", \r\n            \"directed\", \r\n            \"direction\", \r\n            \"directions\", \r\n            \"directly\", \r\n            \"director\", \r\n            \"disagree\", \r\n            \"disappeared\", \r\n            \"disappointment\", \r\n            \"disclaim\", \r\n            \"disclaimer\", \r\n            \"disclaimers\", \r\n            \"discontinue\", \r\n            \"discover\", \r\n            \"discovered\", \r\n            \"disgust\", \r\n            \"dish\", \r\n            \"dishes\", \r\n            \"disk\", \r\n            \"dismay\", \r\n            \"disobey\", \r\n            \"display\", \r\n            \"displayed\", \r\n            \"displaying\", \r\n            \"dispute\", \r\n            \"distance\", \r\n            \"distant\", \r\n            \"distraction\", \r\n            \"distribute\", \r\n            \"distributed\", \r\n            \"distributing\", \r\n            \"distribution\", \r\n            \"distributor\", \r\n            \"dive\", \r\n            \"do\", \r\n            \"dodged\", \r\n            \"dodo\", \r\n            \"does\", \r\n            \"doesn\", \r\n            \"dog\", \r\n            \"dogs\", \r\n            \"doing\", \r\n            \"domain\", \r\n            \"don\", \r\n            \"donate\", \r\n            \"donation\", \r\n            \"donations\", \r\n            \"done\", \r\n            \"donors\", \r\n            \"door\", \r\n            \"doors\", \r\n            \"doorway\", \r\n            \"dormouse\", \r\n            \"doth\", \r\n            \"double\", \r\n            \"doubled\", \r\n            \"doubling\", \r\n            \"doubt\", \r\n            \"doubtful\", \r\n            \"doubtfully\", \r\n            \"down\", \r\n            \"downloading\", \r\n            \"downward\", \r\n            \"downwards\", \r\n            \"doze\", \r\n            \"dozing\", \r\n            \"dr\", \r\n            \"draggled\", \r\n            \"draw\", \r\n            \"drawing\", \r\n            \"drawling\", \r\n            \"dreadful\", \r\n            \"dreadfully\", \r\n            \"dream\", \r\n            \"dreamed\", \r\n            \"dreaming\", \r\n            \"dreamy\", \r\n            \"dressed\", \r\n            \"drew\", \r\n            \"dried\", \r\n            \"driest\", \r\n            \"drink\", \r\n            \"drinking\", \r\n            \"dripping\", \r\n            \"drive\", \r\n            \"drop\", \r\n            \"dropped\", \r\n            \"dropping\", \r\n            \"drowned\", \r\n            \"drunk\", \r\n            \"dry\", \r\n            \"duchess\", \r\n            \"duck\", \r\n            \"dull\", \r\n            \"dunce\", \r\n            \"e\", \r\n            \"each\", \r\n            \"eager\", \r\n            \"eagerly\", \r\n            \"eaglet\", \r\n            \"ear\", \r\n            \"earls\", \r\n            \"earnestly\", \r\n            \"ears\", \r\n            \"earth\", \r\n            \"easily\", \r\n            \"easy\", \r\n            \"eat\", \r\n            \"eaten\", \r\n            \"eating\", \r\n            \"eats\", \r\n            \"ebook\", \r\n            \"ebooks\", \r\n            \"edgar\", \r\n            \"edge\", \r\n            \"edition\", \r\n            \"editions\", \r\n            \"educational\", \r\n            \"educations\", \r\n            \"edwin\", \r\n            \"eel\", \r\n            \"eels\", \r\n            \"effect\", \r\n            \"effort\", \r\n            \"efforts\", \r\n            \"egg\", \r\n            \"eggs\", \r\n            \"eh\", \r\n            \"ein\", \r\n            \"either\", \r\n            \"elbow\", \r\n            \"elbows\", \r\n            \"elect\", \r\n            \"electronic\", \r\n            \"electronically\", \r\n            \"elegant\", \r\n            \"eleventh\", \r\n            \"else\", \r\n            \"elsie\", \r\n            \"em\", \r\n            \"email\", \r\n            \"emphasis\", \r\n            \"employee\", \r\n            \"employees\", \r\n            \"empty\", \r\n            \"encoding\", \r\n            \"encourage\", \r\n            \"encouraged\", \r\n            \"encouraging\", \r\n            \"end\", \r\n            \"ending\", \r\n            \"energetic\", \r\n            \"engaged\", \r\n            \"engine\", \r\n            \"england\", \r\n            \"english\", \r\n            \"engraved\", \r\n            \"enjoy\", \r\n            \"enormous\", \r\n            \"enough\", \r\n            \"ensuring\", \r\n            \"entangled\", \r\n            \"entirely\", \r\n            \"entity\", \r\n            \"entrance\", \r\n            \"equipment\", \r\n            \"errors\", \r\n            \"escape\", \r\n            \"especially\", \r\n            \"esq\", \r\n            \"est\", \r\n            \"even\", \r\n            \"evening\", \r\n            \"ever\", \r\n            \"every\", \r\n            \"everybody\", \r\n            \"everything\", \r\n            \"evidence\", \r\n            \"evidently\", \r\n            \"exact\", \r\n            \"exactly\", \r\n            \"examine\", \r\n            \"examining\", \r\n            \"excellent\", \r\n            \"except\", \r\n            \"exclaimed\", \r\n            \"exclamation\", \r\n            \"exclusion\", \r\n            \"execute\", \r\n            \"executed\", \r\n            \"executes\", \r\n            \"execution\", \r\n            \"executioner\", \r\n            \"executions\", \r\n            \"executive\", \r\n            \"exempt\", \r\n            \"existence\", \r\n            \"exists\", \r\n            \"expected\", \r\n            \"expecting\", \r\n            \"expend\", \r\n            \"expense\", \r\n            \"expenses\", \r\n            \"experiment\", \r\n            \"explain\", \r\n            \"explained\", \r\n            \"explanation\", \r\n            \"explanations\", \r\n            \"exporting\", \r\n            \"express\", \r\n            \"expressing\", \r\n            \"expression\", \r\n            \"extent\", \r\n            \"extra\", \r\n            \"extraordinary\", \r\n            \"extras\", \r\n            \"extremely\", \r\n            \"eye\", \r\n            \"eyed\", \r\n            \"eyelids\", \r\n            \"eyes\", \r\n            \"f\", \r\n            \"face\", \r\n            \"faces\", \r\n            \"facility\", \r\n            \"fact\", \r\n            \"fading\", \r\n            \"failure\", \r\n            \"faint\", \r\n            \"fainting\", \r\n            \"faintly\", \r\n            \"fair\", \r\n            \"fairbanks\", \r\n            \"fairly\", \r\n            \"fall\", \r\n            \"fallen\", \r\n            \"falling\", \r\n            \"familiarly\", \r\n            \"family\", \r\n            \"fan\", \r\n            \"fancied\", \r\n            \"fancy\", \r\n            \"fancying\", \r\n            \"fanned\", \r\n            \"fanning\", \r\n            \"far\", \r\n            \"farm\", \r\n            \"farmer\", \r\n            \"farther\", \r\n            \"fashion\", \r\n            \"fast\", \r\n            \"faster\", \r\n            \"fat\", \r\n            \"father\", \r\n            \"favoured\", \r\n            \"favourite\", \r\n            \"fear\", \r\n            \"feared\", \r\n            \"feather\", \r\n            \"feathers\", \r\n            \"federal\", \r\n            \"fee\", \r\n            \"feeble\", \r\n            \"feebly\", \r\n            \"feel\", \r\n            \"feeling\", \r\n            \"feelings\", \r\n            \"fees\", \r\n            \"feet\", \r\n            \"fell\", \r\n            \"fellow\", \r\n            \"fellows\", \r\n            \"felt\", \r\n            \"fender\", \r\n            \"ferrets\", \r\n            \"fetch\", \r\n            \"few\", \r\n            \"fidgeted\", \r\n            \"field\", \r\n            \"fifteen\", \r\n            \"fifteenth\", \r\n            \"fifth\", \r\n            \"fig\", \r\n            \"fight\", \r\n            \"fighting\", \r\n            \"figure\", \r\n            \"figures\", \r\n            \"file\", \r\n            \"files\", \r\n            \"filled\", \r\n            \"fills\", \r\n            \"financial\", \r\n            \"find\", \r\n            \"finding\", \r\n            \"finds\", \r\n            \"fine\", \r\n            \"finger\", \r\n            \"finish\", \r\n            \"finished\", \r\n            \"finishing\", \r\n            \"fire\", \r\n            \"fireplace\", \r\n            \"first\", \r\n            \"fish\", \r\n            \"fishes\", \r\n            \"fit\", \r\n            \"fitness\", \r\n            \"fits\", \r\n            \"fitted\", \r\n            \"five\", \r\n            \"fix\", \r\n            \"fixed\", \r\n            \"flame\", \r\n            \"flamingo\", \r\n            \"flamingoes\", \r\n            \"flapper\", \r\n            \"flappers\", \r\n            \"flashed\", \r\n            \"flat\", \r\n            \"flavour\", \r\n            \"flew\", \r\n            \"flinging\", \r\n            \"flock\", \r\n            \"floor\", \r\n            \"flower\", \r\n            \"flowers\", \r\n            \"flown\", \r\n            \"flung\", \r\n            \"flurry\", \r\n            \"flustered\", \r\n            \"fluttered\", \r\n            \"fly\", \r\n            \"flying\", \r\n            \"folded\", \r\n            \"folding\", \r\n            \"follow\", \r\n            \"followed\", \r\n            \"following\", \r\n            \"follows\", \r\n            \"fond\", \r\n            \"foolish\", \r\n            \"foot\", \r\n            \"footman\", \r\n            \"footmen\", \r\n            \"footsteps\", \r\n            \"for\", \r\n            \"forehead\", \r\n            \"forepaws\", \r\n            \"forget\", \r\n            \"forgetting\", \r\n            \"forgot\", \r\n            \"forgotten\", \r\n            \"fork\", \r\n            \"form\", \r\n            \"format\", \r\n            \"formats\", \r\n            \"forth\", \r\n            \"fortunately\", \r\n            \"forty\", \r\n            \"forwards\", \r\n            \"found\", \r\n            \"foundation\", \r\n            \"fountains\", \r\n            \"four\", \r\n            \"fourteenth\", \r\n            \"fourth\", \r\n            \"frame\", \r\n            \"frames\", \r\n            \"france\", \r\n            \"free\", \r\n            \"freely\", \r\n            \"french\", \r\n            \"friend\", \r\n            \"friends\", \r\n            \"fright\", \r\n            \"frighten\", \r\n            \"frightened\", \r\n            \"from\", \r\n            \"front\", \r\n            \"frontispiece\", \r\n            \"frowning\", \r\n            \"frying\", \r\n            \"ful\", \r\n            \"fulcrum\", \r\n            \"full\", \r\n            \"fumbled\", \r\n            \"fun\", \r\n            \"fundraising\", \r\n            \"funny\", \r\n            \"fur\", \r\n            \"furious\", \r\n            \"furiously\", \r\n            \"furrow\", \r\n            \"furrows\", \r\n            \"further\", \r\n            \"fury\", \r\n            \"future\", \r\n            \"gained\", \r\n            \"gallons\", \r\n            \"game\", \r\n            \"games\", \r\n            \"garden\", \r\n            \"gardeners\", \r\n            \"gather\", \r\n            \"gave\", \r\n            \"gay\", \r\n            \"gazing\", \r\n            \"gbnewby@pglaf\", \r\n            \"general\", \r\n            \"generally\", \r\n            \"generations\", \r\n            \"gently\", \r\n            \"geography\", \r\n            \"get\", \r\n            \"getting\", \r\n            \"giddy\", \r\n            \"girl\", \r\n            \"girls\", \r\n            \"give\", \r\n            \"given\", \r\n            \"giving\", \r\n            \"glad\", \r\n            \"glanced\", \r\n            \"glaring\", \r\n            \"glass\", \r\n            \"globe\", \r\n            \"gloomily\", \r\n            \"gloves\", \r\n            \"go\", \r\n            \"goals\", \r\n            \"goes\", \r\n            \"going\", \r\n            \"golden\", \r\n            \"goldfish\", \r\n            \"gone\", \r\n            \"good\", \r\n            \"goose\", \r\n            \"got\", \r\n            \"govern\", \r\n            \"graceful\", \r\n            \"grammar\", \r\n            \"grand\", \r\n            \"grant\", \r\n            \"granted\", \r\n            \"grass\", \r\n            \"gratefully\", \r\n            \"grave\", \r\n            \"gravely\", \r\n            \"gravy\", \r\n            \"grazed\", \r\n            \"great\", \r\n            \"green\", \r\n            \"gregory\", \r\n            \"grew\", \r\n            \"grey\", \r\n            \"grief\", \r\n            \"grin\", \r\n            \"grinned\", \r\n            \"grinning\", \r\n            \"grins\", \r\n            \"gross\", \r\n            \"ground\", \r\n            \"group\", \r\n            \"grow\", \r\n            \"growing\", \r\n            \"growl\", \r\n            \"growled\", \r\n            \"growling\", \r\n            \"growls\", \r\n            \"grown\", \r\n            \"grumbled\", \r\n            \"grunt\", \r\n            \"grunted\", \r\n            \"gryphon\", \r\n            \"guard\", \r\n            \"guess\", \r\n            \"guessed\", \r\n            \"guests\", \r\n            \"guilt\", \r\n            \"guinea\", \r\n            \"gutenberg\", \r\n            \"had\", \r\n            \"hadn\", \r\n            \"hair\", \r\n            \"half\", \r\n            \"hall\", \r\n            \"hand\", \r\n            \"handed\", \r\n            \"hands\", \r\n            \"handsome\", \r\n            \"handwriting\", \r\n            \"hanging\", \r\n            \"happen\", \r\n            \"happened\", \r\n            \"happening\", \r\n            \"happens\", \r\n            \"happy\", \r\n            \"hard\", \r\n            \"hardly\", \r\n            \"hare\", \r\n            \"harm\", \r\n            \"harmless\", \r\n            \"hart\", \r\n            \"has\", \r\n            \"hasn\", \r\n            \"haste\", \r\n            \"hastily\", \r\n            \"hat\", \r\n            \"hatching\", \r\n            \"hate\", \r\n            \"hated\", \r\n            \"hatter\", \r\n            \"hatters\", \r\n            \"have\", \r\n            \"haven\", \r\n            \"having\", \r\n            \"he\", \r\n            \"head\", \r\n            \"heads\", \r\n            \"heap\", \r\n            \"hear\", \r\n            \"heard\", \r\n            \"hearing\", \r\n            \"heart\", \r\n            \"hearth\", \r\n            \"hearthrug\", \r\n            \"hearts\", \r\n            \"heavy\", \r\n            \"hedge\", \r\n            \"hedgehog\", \r\n            \"hedgehogs\", \r\n            \"hedges\", \r\n            \"heels\", \r\n            \"height\", \r\n            \"held\", \r\n            \"help\", \r\n            \"helped\", \r\n            \"helpless\", \r\n            \"her\", \r\n            \"herald\", \r\n            \"here\", \r\n            \"hers\", \r\n            \"herself\", \r\n            \"hid\", \r\n            \"hide\", \r\n            \"high\", \r\n            \"highest\", \r\n            \"him\", \r\n            \"himself\", \r\n            \"hint\", \r\n            \"hippopotamus\", \r\n            \"his\", \r\n            \"hiss\", \r\n            \"histories\", \r\n            \"history\", \r\n            \"hit\", \r\n            \"hjckrrh\", \r\n            \"hm\", \r\n            \"hoarse\", \r\n            \"hoarsely\", \r\n            \"hold\", \r\n            \"holder\", \r\n            \"holding\", \r\n            \"hole\", \r\n            \"holiday\", \r\n            \"hollow\", \r\n            \"home\", \r\n            \"honest\", \r\n            \"honour\", \r\n            \"hookah\", \r\n            \"hope\", \r\n            \"hoped\", \r\n            \"hopeful\", \r\n            \"hopeless\", \r\n            \"hoping\", \r\n            \"horse\", \r\n            \"hot\", \r\n            \"hour\", \r\n            \"hours\", \r\n            \"house\", \r\n            \"housemaid\", \r\n            \"houses\", \r\n            \"how\", \r\n            \"however\", \r\n            \"howled\", \r\n            \"howling\", \r\n            \"http\", \r\n            \"humble\", \r\n            \"humbly\", \r\n            \"hundred\", \r\n            \"hundreds\", \r\n            \"hung\", \r\n            \"hungry\", \r\n            \"hunting\", \r\n            \"hurried\", \r\n            \"hurriedly\", \r\n            \"hurry\", \r\n            \"hurrying\", \r\n            \"hurt\", \r\n            \"hush\", \r\n            \"hypertext\", \r\n            \"i\", \r\n            \"idea\", \r\n            \"identification\", \r\n            \"identify\", \r\n            \"idiotic\", \r\n            \"if\", \r\n            \"ignorant\", \r\n            \"ii\", \r\n            \"iii\", \r\n            \"ill\", \r\n            \"imagine\", \r\n            \"imitated\", \r\n            \"immediate\", \r\n            \"immediately\", \r\n            \"immense\", \r\n            \"impatient\", \r\n            \"impatiently\", \r\n            \"impertinent\", \r\n            \"implied\", \r\n            \"important\", \r\n            \"imposed\", \r\n            \"impossible\", \r\n            \"improve\", \r\n            \"in\", \r\n            \"inaccurate\", \r\n            \"incessantly\", \r\n            \"inches\", \r\n            \"incidental\", \r\n            \"inclined\", \r\n            \"include\", \r\n            \"included\", \r\n            \"includes\", \r\n            \"including\", \r\n            \"incomplete\", \r\n            \"increasing\", \r\n            \"indeed\", \r\n            \"indemnify\", \r\n            \"indemnity\", \r\n            \"indicate\", \r\n            \"indicating\", \r\n            \"indignant\", \r\n            \"indignantly\", \r\n            \"indirect\", \r\n            \"indirectly\", \r\n            \"individual\", \r\n            \"information\", \r\n            \"infringement\", \r\n            \"injure\", \r\n            \"ink\", \r\n            \"inkstand\", \r\n            \"inquired\", \r\n            \"inquisitively\", \r\n            \"inside\", \r\n            \"insolence\", \r\n            \"instance\", \r\n            \"instantly\", \r\n            \"instead\", \r\n            \"insult\", \r\n            \"intellectual\", \r\n            \"interest\", \r\n            \"interesting\", \r\n            \"internal\", \r\n            \"international\", \r\n            \"interpreted\", \r\n            \"interrupt\", \r\n            \"interrupted\", \r\n            \"interrupting\", \r\n            \"into\", \r\n            \"introduce\", \r\n            \"introduced\", \r\n            \"invalidity\", \r\n            \"invent\", \r\n            \"invented\", \r\n            \"invitation\", \r\n            \"invited\", \r\n            \"involved\", \r\n            \"inwards\", \r\n            \"irons\", \r\n            \"irritated\", \r\n            \"irs\", \r\n            \"is\", \r\n            \"isn\", \r\n            \"it\", \r\n            \"its\", \r\n            \"itself\", \r\n            \"iv\", \r\n            \"ix\", \r\n            \"jack\", \r\n            \"jar\", \r\n            \"jaw\", \r\n            \"jaws\", \r\n            \"jelly\", \r\n            \"jogged\", \r\n            \"join\", \r\n            \"joined\", \r\n            \"journey\", \r\n            \"joys\", \r\n            \"judge\", \r\n            \"judging\", \r\n            \"jug\", \r\n            \"jumped\", \r\n            \"jumping\", \r\n            \"june\", \r\n            \"juror\", \r\n            \"jurors\", \r\n            \"jury\", \r\n            \"jurymen\", \r\n            \"just\", \r\n            \"justice\", \r\n            \"keep\", \r\n            \"keeping\", \r\n            \"kept\", \r\n            \"kettle\", \r\n            \"key\", \r\n            \"kick\", \r\n            \"kid\", \r\n            \"kill\", \r\n            \"killing\", \r\n            \"kills\", \r\n            \"kind\", \r\n            \"kindly\", \r\n            \"king\", \r\n            \"kings\", \r\n            \"kiss\", \r\n            \"kissed\", \r\n            \"kitchen\", \r\n            \"knave\", \r\n            \"knee\", \r\n            \"kneel\", \r\n            \"knelt\", \r\n            \"knew\", \r\n            \"knife\", \r\n            \"knock\", \r\n            \"knocked\", \r\n            \"knocking\", \r\n            \"knot\", \r\n            \"know\", \r\n            \"knowing\", \r\n            \"knowledge\", \r\n            \"known\", \r\n            \"knows\", \r\n            \"knuckles\", \r\n            \"label\", \r\n            \"labelled\", \r\n            \"lacie\", \r\n            \"lad\", \r\n            \"ladder\", \r\n            \"lady\", \r\n            \"laid\", \r\n            \"lake\", \r\n            \"lamps\", \r\n            \"land\", \r\n            \"language\", \r\n            \"languid\", \r\n            \"lap\", \r\n            \"large\", \r\n            \"larger\", \r\n            \"largest\", \r\n            \"lark\", \r\n            \"last\", \r\n            \"lasted\", \r\n            \"lastly\", \r\n            \"late\", \r\n            \"lately\", \r\n            \"later\", \r\n            \"latin\", \r\n            \"latitude\", \r\n            \"laugh\", \r\n            \"laughed\", \r\n            \"laughing\", \r\n            \"laughter\", \r\n            \"law\", \r\n            \"laws\", \r\n            \"lay\", \r\n            \"lazily\", \r\n            \"lazy\", \r\n            \"leaders\", \r\n            \"leading\", \r\n            \"leaning\", \r\n            \"leant\", \r\n            \"leap\", \r\n            \"learn\", \r\n            \"learned\", \r\n            \"learning\", \r\n            \"learnt\", \r\n            \"least\", \r\n            \"leave\", \r\n            \"leaves\", \r\n            \"leaving\", \r\n            \"led\", \r\n            \"ledge\", \r\n            \"left\", \r\n            \"lefthand\", \r\n            \"legal\", \r\n            \"legally\", \r\n            \"legged\", \r\n            \"legs\", \r\n            \"length\", \r\n            \"less\", \r\n            \"lessen\", \r\n            \"lesson\", \r\n            \"lessons\", \r\n            \"lest\", \r\n            \"let\", \r\n            \"letter\", \r\n            \"letters\", \r\n            \"lewis\", \r\n            \"liability\", \r\n            \"liable\", \r\n            \"library\", \r\n            \"license\", \r\n            \"licensed\", \r\n            \"licking\", \r\n            \"lie\", \r\n            \"lieu\", \r\n            \"life\", \r\n            \"lifted\", \r\n            \"like\", \r\n            \"liked\", \r\n            \"likely\", \r\n            \"likes\", \r\n            \"limbs\", \r\n            \"limitation\", \r\n            \"limited\", \r\n            \"line\", \r\n            \"lines\", \r\n            \"linked\", \r\n            \"links\", \r\n            \"lips\", \r\n            \"list\", \r\n            \"listen\", \r\n            \"listened\", \r\n            \"listeners\", \r\n            \"listening\", \r\n            \"lit\", \r\n            \"literary\", \r\n            \"little\", \r\n            \"live\", \r\n            \"lived\", \r\n            \"livery\", \r\n            \"lives\", \r\n            \"living\", \r\n            \"lizard\", \r\n            \"ll\", \r\n            \"lobster\", \r\n            \"lobsters\", \r\n            \"located\", \r\n            \"locations\", \r\n            \"lock\", \r\n            \"locked\", \r\n            \"locks\", \r\n            \"lodging\", \r\n            \"london\", \r\n            \"lonely\", \r\n            \"long\", \r\n            \"longed\", \r\n            \"longer\", \r\n            \"longitude\", \r\n            \"look\", \r\n            \"looked\", \r\n            \"looking\", \r\n            \"loose\", \r\n            \"lory\", \r\n            \"lose\", \r\n            \"losing\", \r\n            \"lost\", \r\n            \"lot\", \r\n            \"loud\", \r\n            \"louder\", \r\n            \"loudly\", \r\n            \"love\", \r\n            \"loveliest\", \r\n            \"lovely\", \r\n            \"loving\", \r\n            \"low\", \r\n            \"lower\", \r\n            \"lowing\", \r\n            \"luckily\", \r\n            \"lullaby\", \r\n            \"lying\", \r\n            \"m\", \r\n            \"ma\", \r\n            \"mabel\", \r\n            \"machine\", \r\n            \"machines\", \r\n            \"mad\", \r\n            \"made\", \r\n            \"magic\", \r\n            \"magpie\", \r\n            \"mail\", \r\n            \"main\", \r\n            \"maintaining\", \r\n            \"majesty\", \r\n            \"make\", \r\n            \"makes\", \r\n            \"making\", \r\n            \"mallets\", \r\n            \"man\", \r\n            \"manage\", \r\n            \"managed\", \r\n            \"managing\", \r\n            \"manner\", \r\n            \"manners\", \r\n            \"many\", \r\n            \"maps\", \r\n            \"march\", \r\n            \"marched\", \r\n            \"mark\", \r\n            \"marked\", \r\n            \"marmalade\", \r\n            \"mary\", \r\n            \"master\", \r\n            \"matter\", \r\n            \"matters\", \r\n            \"maximum\", \r\n            \"may\", \r\n            \"maybe\", \r\n            \"mayn\", \r\n            \"me\", \r\n            \"meal\", \r\n            \"mean\", \r\n            \"meaning\", \r\n            \"means\", \r\n            \"meant\", \r\n            \"meanwhile\", \r\n            \"measure\", \r\n            \"meat\", \r\n            \"medium\", \r\n            \"meekly\", \r\n            \"meet\", \r\n            \"meeting\", \r\n            \"melan\", \r\n            \"melancholy\", \r\n            \"memorandum\", \r\n            \"memory\", \r\n            \"men\", \r\n            \"mentioned\", \r\n            \"merchantibility\", \r\n            \"mercia\", \r\n            \"merely\", \r\n            \"merrily\", \r\n            \"messages\", \r\n            \"met\", \r\n            \"method\", \r\n            \"methods\", \r\n            \"mice\", \r\n            \"michael\", \r\n            \"middle\", \r\n            \"might\", \r\n            \"mile\", \r\n            \"miles\", \r\n            \"milk\", \r\n            \"millennium\", \r\n            \"mind\", \r\n            \"minded\", \r\n            \"minding\", \r\n            \"mine\", \r\n            \"mineral\", \r\n            \"minute\", \r\n            \"minutes\", \r\n            \"mischief\", \r\n            \"miserable\", \r\n            \"miss\", \r\n            \"missed\", \r\n            \"mission\", \r\n            \"mississippi\", \r\n            \"mistake\", \r\n            \"mixed\", \r\n            \"mock\", \r\n            \"moderate\", \r\n            \"modern\", \r\n            \"modification\", \r\n            \"modified\", \r\n            \"moment\", \r\n            \"money\", \r\n            \"month\", \r\n            \"moon\", \r\n            \"moral\", \r\n            \"morals\", \r\n            \"morcar\", \r\n            \"more\", \r\n            \"morning\", \r\n            \"morsel\", \r\n            \"most\", \r\n            \"mostly\", \r\n            \"mournful\", \r\n            \"mournfully\", \r\n            \"mouse\", \r\n            \"mouth\", \r\n            \"mouths\", \r\n            \"move\", \r\n            \"moved\", \r\n            \"moving\", \r\n            \"much\", \r\n            \"muchness\", \r\n            \"muddle\", \r\n            \"multiplication\", \r\n            \"murder\", \r\n            \"murdering\", \r\n            \"muscular\", \r\n            \"mushroom\", \r\n            \"music\", \r\n            \"must\", \r\n            \"mustard\", \r\n            \"muttered\", \r\n            \"muttering\", \r\n            \"my\", \r\n            \"myself\", \r\n            \"mystery\", \r\n            \"name\", \r\n            \"named\", \r\n            \"names\", \r\n            \"narrow\", \r\n            \"nasty\", \r\n            \"natural\", \r\n            \"natured\", \r\n            \"naturedly\", \r\n            \"nay\", \r\n            \"near\", \r\n            \"nearer\", \r\n            \"nearly\", \r\n            \"neat\", \r\n            \"neatly\", \r\n            \"necessarily\", \r\n            \"neck\", \r\n            \"need\", \r\n            \"needn\", \r\n            \"needs\", \r\n            \"negligence\", \r\n            \"neighbour\", \r\n            \"neighbouring\", \r\n            \"neither\", \r\n            \"nervous\", \r\n            \"nest\", \r\n            \"network\", \r\n            \"never\", \r\n            \"nevertheless\", \r\n            \"new\", \r\n            \"newby\", \r\n            \"newsletter\", \r\n            \"newspapers\", \r\n            \"next\", \r\n            \"nibbled\", \r\n            \"nibbling\", \r\n            \"nice\", \r\n            \"nicely\", \r\n            \"night\", \r\n            \"nile\", \r\n            \"nine\", \r\n            \"no\", \r\n            \"nobody\", \r\n            \"nodded\", \r\n            \"noise\", \r\n            \"noises\", \r\n            \"non\", \r\n            \"none\", \r\n            \"nonproprietary\", \r\n            \"nonsense\", \r\n            \"nor\", \r\n            \"normans\", \r\n            \"north\", \r\n            \"northumbria\", \r\n            \"nose\", \r\n            \"not\", \r\n            \"note\", \r\n            \"nothing\", \r\n            \"notice\", \r\n            \"noticed\", \r\n            \"noticing\", \r\n            \"notifies\", \r\n            \"notion\", \r\n            \"now\", \r\n            \"nowhere\", \r\n            \"number\", \r\n            \"numerous\", \r\n            \"nurse\", \r\n            \"nursing\", \r\n            \"o\", \r\n            \"obliged\", \r\n            \"oblong\", \r\n            \"obsolete\", \r\n            \"obstacle\", \r\n            \"obtain\", \r\n            \"obtaining\", \r\n            \"occasional\", \r\n            \"occasionally\", \r\n            \"occur\", \r\n            \"occurred\", \r\n            \"odd\", \r\n            \"of\", \r\n            \"off\", \r\n            \"offend\", \r\n            \"offended\", \r\n            \"offer\", \r\n            \"offers\", \r\n            \"office\", \r\n            \"officer\", \r\n            \"officers\", \r\n            \"official\", \r\n            \"often\", \r\n            \"oh\", \r\n            \"ointment\", \r\n            \"old\", \r\n            \"older\", \r\n            \"oldest\", \r\n            \"on\", \r\n            \"once\", \r\n            \"one\", \r\n            \"ones\", \r\n            \"oneself\", \r\n            \"onions\", \r\n            \"online\", \r\n            \"only\", \r\n            \"oop\", \r\n            \"ootiful\", \r\n            \"open\", \r\n            \"opened\", \r\n            \"opening\", \r\n            \"opinion\", \r\n            \"opportunities\", \r\n            \"opportunity\", \r\n            \"opposite\", \r\n            \"or\", \r\n            \"orange\", \r\n            \"order\", \r\n            \"ordered\", \r\n            \"ordering\", \r\n            \"org\", \r\n            \"organized\", \r\n            \"original\", \r\n            \"originator\", \r\n            \"ornamented\", \r\n            \"other\", \r\n            \"others\", \r\n            \"otherwise\", \r\n            \"ou\", \r\n            \"ought\", \r\n            \"our\", \r\n            \"ours\", \r\n            \"ourselves\", \r\n            \"out\", \r\n            \"outdated\", \r\n            \"outside\", \r\n            \"over\", \r\n            \"overcome\", \r\n            \"overhead\", \r\n            \"owed\", \r\n            \"owl\", \r\n            \"own\", \r\n            \"owner\", \r\n            \"owns\", \r\n            \"oyster\", \r\n            \"pace\", \r\n            \"pack\", \r\n            \"page\", \r\n            \"pages\", \r\n            \"paid\", \r\n            \"paint\", \r\n            \"painting\", \r\n            \"pair\", \r\n            \"pairs\", \r\n            \"pale\", \r\n            \"pan\", \r\n            \"panted\", \r\n            \"panther\", \r\n            \"panting\", \r\n            \"paper\", \r\n            \"paperwork\", \r\n            \"paragraph\", \r\n            \"paragraphs\", \r\n            \"parchment\", \r\n            \"pardon\", \r\n            \"pardoned\", \r\n            \"paris\", \r\n            \"part\", \r\n            \"particular\", \r\n            \"particularly\", \r\n            \"partner\", \r\n            \"partners\", \r\n            \"parts\", \r\n            \"party\", \r\n            \"pass\", \r\n            \"passage\", \r\n            \"passed\", \r\n            \"passing\", \r\n            \"passion\", \r\n            \"passionate\", \r\n            \"past\", \r\n            \"pat\", \r\n            \"patience\", \r\n            \"patiently\", \r\n            \"patriotic\", \r\n            \"patted\", \r\n            \"pattering\", \r\n            \"pattern\", \r\n            \"pause\", \r\n            \"paused\", \r\n            \"paw\", \r\n            \"paws\", \r\n            \"pay\", \r\n            \"paying\", \r\n            \"payments\", \r\n            \"pebbles\", \r\n            \"peeped\", \r\n            \"peeping\", \r\n            \"peering\", \r\n            \"pegs\", \r\n            \"pence\", \r\n            \"pencil\", \r\n            \"pencils\", \r\n            \"pennyworth\", \r\n            \"people\", \r\n            \"pepper\", \r\n            \"perfectly\", \r\n            \"perform\", \r\n            \"performances\", \r\n            \"performed\", \r\n            \"performing\", \r\n            \"perhaps\", \r\n            \"periodic\", \r\n            \"permanent\", \r\n            \"permission\", \r\n            \"permitted\", \r\n            \"persisted\", \r\n            \"person\", \r\n            \"personal\", \r\n            \"persons\", \r\n            \"pet\", \r\n            \"pg\", \r\n            \"pglaf\", \r\n            \"phrase\", \r\n            \"physical\", \r\n            \"picked\", \r\n            \"picking\", \r\n            \"picture\", \r\n            \"pictured\", \r\n            \"pictures\", \r\n            \"pie\", \r\n            \"piece\", \r\n            \"pieces\", \r\n            \"pig\", \r\n            \"pigeon\", \r\n            \"pigs\", \r\n            \"pinch\", \r\n            \"pinched\", \r\n            \"pine\", \r\n            \"pink\", \r\n            \"piteous\", \r\n            \"pitied\", \r\n            \"pity\", \r\n            \"place\", \r\n            \"placed\", \r\n            \"places\", \r\n            \"plain\", \r\n            \"plainly\", \r\n            \"plan\", \r\n            \"planning\", \r\n            \"plate\", \r\n            \"plates\", \r\n            \"play\", \r\n            \"played\", \r\n            \"players\", \r\n            \"playing\", \r\n            \"pleaded\", \r\n            \"pleasant\", \r\n            \"pleasanter\", \r\n            \"please\", \r\n            \"pleased\", \r\n            \"pleases\", \r\n            \"pleasing\", \r\n            \"pleasure\", \r\n            \"plenty\", \r\n            \"pocket\", \r\n            \"pointed\", \r\n            \"pointing\", \r\n            \"poison\", \r\n            \"poker\", \r\n            \"poky\", \r\n            \"politely\", \r\n            \"pool\", \r\n            \"poor\", \r\n            \"pop\", \r\n            \"pope\", \r\n            \"porpoise\", \r\n            \"position\", \r\n            \"positively\", \r\n            \"possessed\", \r\n            \"possession\", \r\n            \"possibility\", \r\n            \"possible\", \r\n            \"possibly\", \r\n            \"posted\", \r\n            \"posting\", \r\n            \"pounds\", \r\n            \"pour\", \r\n            \"poured\", \r\n            \"powdered\", \r\n            \"practically\", \r\n            \"practice\", \r\n            \"pray\", \r\n            \"precious\", \r\n            \"prepare\", \r\n            \"present\", \r\n            \"presented\", \r\n            \"presently\", \r\n            \"presents\", \r\n            \"preserve\", \r\n            \"pressed\", \r\n            \"pressing\", \r\n            \"pretend\", \r\n            \"pretending\", \r\n            \"pretexts\", \r\n            \"prettier\", \r\n            \"pretty\", \r\n            \"prevent\", \r\n            \"previous\", \r\n            \"principal\", \r\n            \"print\", \r\n            \"printed\", \r\n            \"prison\", \r\n            \"prisoner\", \r\n            \"prize\", \r\n            \"prizes\", \r\n            \"problem\", \r\n            \"proceed\", \r\n            \"processing\", \r\n            \"procession\", \r\n            \"processions\", \r\n            \"produce\", \r\n            \"produced\", \r\n            \"producing\", \r\n            \"production\", \r\n            \"professor\", \r\n            \"profit\", \r\n            \"profits\", \r\n            \"prohibition\", \r\n            \"project\", \r\n            \"prominently\", \r\n            \"promise\", \r\n            \"promised\", \r\n            \"promising\", \r\n            \"promoting\", \r\n            \"promotion\", \r\n            \"pronounced\", \r\n            \"proofread\", \r\n            \"proper\", \r\n            \"property\", \r\n            \"proposal\", \r\n            \"proprietary\", \r\n            \"prosecute\", \r\n            \"protect\", \r\n            \"protection\", \r\n            \"proud\", \r\n            \"prove\", \r\n            \"proved\", \r\n            \"proves\", \r\n            \"provide\", \r\n            \"provided\", \r\n            \"providing\", \r\n            \"provision\", \r\n            \"provisions\", \r\n            \"provoking\", \r\n            \"public\", \r\n            \"puffed\", \r\n            \"pulled\", \r\n            \"pulling\", \r\n            \"pun\", \r\n            \"punching\", \r\n            \"punished\", \r\n            \"punitive\", \r\n            \"puppy\", \r\n            \"purple\", \r\n            \"purpose\", \r\n            \"purring\", \r\n            \"push\", \r\n            \"put\", \r\n            \"putting\", \r\n            \"puzzle\", \r\n            \"puzzled\", \r\n            \"puzzling\", \r\n            \"quadrille\", \r\n            \"quarrel\", \r\n            \"quarrelled\", \r\n            \"quarrelling\", \r\n            \"queen\", \r\n            \"queens\", \r\n            \"queerest\", \r\n            \"question\", \r\n            \"questions\", \r\n            \"quick\", \r\n            \"quicker\", \r\n            \"quickly\", \r\n            \"quiet\", \r\n            \"quietly\", \r\n            \"quite\", \r\n            \"quiver\", \r\n            \"rabbit\", \r\n            \"rabbits\", \r\n            \"race\", \r\n            \"railway\", \r\n            \"raised\", \r\n            \"raising\", \r\n            \"ran\", \r\n            \"rapidly\", \r\n            \"rapped\", \r\n            \"rat\", \r\n            \"rate\", \r\n            \"rather\", \r\n            \"rats\", \r\n            \"rattle\", \r\n            \"rattling\", \r\n            \"raven\", \r\n            \"ravens\", \r\n            \"raving\", \r\n            \"raw\", \r\n            \"re\", \r\n            \"reach\", \r\n            \"reaching\", \r\n            \"read\", \r\n            \"readable\", \r\n            \"readily\", \r\n            \"reading\", \r\n            \"ready\", \r\n            \"real\", \r\n            \"reality\", \r\n            \"really\", \r\n            \"rearing\", \r\n            \"reason\", \r\n            \"reasonable\", \r\n            \"reasons\", \r\n            \"receipt\", \r\n            \"receive\", \r\n            \"received\", \r\n            \"receiving\", \r\n            \"recognised\", \r\n            \"recovered\", \r\n            \"red\", \r\n            \"redistribute\", \r\n            \"redistributing\", \r\n            \"redistribution\", \r\n            \"reduced\", \r\n            \"reeds\", \r\n            \"reeling\", \r\n            \"references\", \r\n            \"refreshments\", \r\n            \"refund\", \r\n            \"refused\", \r\n            \"registered\", \r\n            \"regular\", \r\n            \"regulating\", \r\n            \"release\", \r\n            \"relief\", \r\n            \"relieved\", \r\n            \"remain\", \r\n            \"remained\", \r\n            \"remaining\", \r\n            \"remark\", \r\n            \"remarkable\", \r\n            \"remarked\", \r\n            \"remarking\", \r\n            \"remarks\", \r\n            \"remedies\", \r\n            \"remember\", \r\n            \"remembered\", \r\n            \"remembering\", \r\n            \"reminding\", \r\n            \"remove\", \r\n            \"removed\", \r\n            \"renamed\", \r\n            \"repeat\", \r\n            \"repeated\", \r\n            \"repeating\", \r\n            \"replace\", \r\n            \"replacement\", \r\n            \"replied\", \r\n            \"reply\", \r\n            \"reported\", \r\n            \"reports\", \r\n            \"representations\", \r\n            \"request\", \r\n            \"require\", \r\n            \"required\", \r\n            \"requirements\", \r\n            \"research\", \r\n            \"resource\", \r\n            \"respect\", \r\n            \"respectable\", \r\n            \"respectful\", \r\n            \"rest\", \r\n            \"resting\", \r\n            \"restrictions\", \r\n            \"result\", \r\n            \"retire\", \r\n            \"return\", \r\n            \"returned\", \r\n            \"returning\", \r\n            \"returns\", \r\n            \"revenue\", \r\n            \"rich\", \r\n            \"riddle\", \r\n            \"riddles\", \r\n            \"ridge\", \r\n            \"ridges\", \r\n            \"ridiculous\", \r\n            \"right\", \r\n            \"righthand\", \r\n            \"rightly\", \r\n            \"ring\", \r\n            \"ringlets\", \r\n            \"riper\", \r\n            \"rippling\", \r\n            \"rise\", \r\n            \"rises\", \r\n            \"rising\", \r\n            \"roared\", \r\n            \"roast\", \r\n            \"rock\", \r\n            \"rocket\", \r\n            \"rome\", \r\n            \"roof\", \r\n            \"room\", \r\n            \"roots\", \r\n            \"rope\", \r\n            \"rose\", \r\n            \"roses\", \r\n            \"rosetree\", \r\n            \"roughly\", \r\n            \"round\", \r\n            \"row\", \r\n            \"royal\", \r\n            \"royalties\", \r\n            \"royalty\", \r\n            \"rubbed\", \r\n            \"rubbing\", \r\n            \"rude\", \r\n            \"rudeness\", \r\n            \"rule\", \r\n            \"rules\", \r\n            \"rumbling\", \r\n            \"run\", \r\n            \"running\", \r\n            \"rush\", \r\n            \"rushed\", \r\n            \"rustled\", \r\n            \"rustling\", \r\n            \"s\", \r\n            \"sad\", \r\n            \"sadly\", \r\n            \"safe\", \r\n            \"sage\", \r\n            \"said\", \r\n            \"salmon\", \r\n            \"salt\", \r\n            \"same\", \r\n            \"sand\", \r\n            \"sands\", \r\n            \"sang\", \r\n            \"sat\", \r\n            \"saucepan\", \r\n            \"saucepans\", \r\n            \"saucer\", \r\n            \"savage\", \r\n            \"save\", \r\n            \"saves\", \r\n            \"saw\", \r\n            \"say\", \r\n            \"saying\", \r\n            \"says\", \r\n            \"scale\", \r\n            \"scaly\", \r\n            \"scattered\", \r\n            \"school\", \r\n            \"schoolroom\", \r\n            \"scolded\", \r\n            \"scrambling\", \r\n            \"scratching\", \r\n            \"scream\", \r\n            \"screamed\", \r\n            \"screaming\", \r\n            \"scroll\", \r\n            \"sea\", \r\n            \"seals\", \r\n            \"seaography\", \r\n            \"search\", \r\n            \"seaside\", \r\n            \"seated\", \r\n            \"second\", \r\n            \"secondly\", \r\n            \"secret\", \r\n            \"section\", \r\n            \"sections\", \r\n            \"secure\", \r\n            \"see\", \r\n            \"seeing\", \r\n            \"seem\", \r\n            \"seemed\", \r\n            \"seems\", \r\n            \"seen\", \r\n            \"seldom\", \r\n            \"sell\", \r\n            \"send\", \r\n            \"sending\", \r\n            \"sends\", \r\n            \"sensation\", \r\n            \"sense\", \r\n            \"sent\", \r\n            \"sentence\", \r\n            \"sentenced\", \r\n            \"series\", \r\n            \"seriously\", \r\n            \"serpent\", \r\n            \"serpents\", \r\n            \"service\", \r\n            \"set\", \r\n            \"setting\", \r\n            \"settle\", \r\n            \"settled\", \r\n            \"settling\", \r\n            \"seven\", \r\n            \"several\", \r\n            \"severely\", \r\n            \"severity\", \r\n            \"sh\", \r\n            \"shade\", \r\n            \"shake\", \r\n            \"shakespeare\", \r\n            \"shaking\", \r\n            \"shall\", \r\n            \"shan\", \r\n            \"shape\", \r\n            \"shaped\", \r\n            \"share\", \r\n            \"shared\", \r\n            \"sharing\", \r\n            \"shark\", \r\n            \"sharks\", \r\n            \"sharp\", \r\n            \"sharply\", \r\n            \"she\", \r\n            \"shedding\", \r\n            \"sheep\", \r\n            \"shelves\", \r\n            \"shepherd\", \r\n            \"shifting\", \r\n            \"shilling\", \r\n            \"shillings\", \r\n            \"shingle\", \r\n            \"shining\", \r\n            \"shiny\", \r\n            \"shiver\", \r\n            \"shock\", \r\n            \"shoes\", \r\n            \"shook\", \r\n            \"shore\", \r\n            \"short\", \r\n            \"shorter\", \r\n            \"should\", \r\n            \"shoulder\", \r\n            \"shoulders\", \r\n            \"shouldn\", \r\n            \"shouted\", \r\n            \"shouting\", \r\n            \"show\", \r\n            \"shower\", \r\n            \"showing\", \r\n            \"shriek\", \r\n            \"shrieked\", \r\n            \"shrieks\", \r\n            \"shrill\", \r\n            \"shrimp\", \r\n            \"shrink\", \r\n            \"shrinking\", \r\n            \"shut\", \r\n            \"shutting\", \r\n            \"shy\", \r\n            \"shyly\", \r\n            \"side\", \r\n            \"sides\", \r\n            \"sigh\", \r\n            \"sighed\", \r\n            \"sighing\", \r\n            \"sight\", \r\n            \"sign\", \r\n            \"signed\", \r\n            \"signifies\", \r\n            \"signify\", \r\n            \"silence\", \r\n            \"silent\", \r\n            \"simple\", \r\n            \"simpleton\", \r\n            \"simply\", \r\n            \"since\", \r\n            \"sing\", \r\n            \"singers\", \r\n            \"singing\", \r\n            \"sink\", \r\n            \"sir\", \r\n            \"sister\", \r\n            \"sisters\", \r\n            \"sit\", \r\n            \"site\", \r\n            \"sits\", \r\n            \"sitting\", \r\n            \"six\", \r\n            \"sixpence\", \r\n            \"sixteenth\", \r\n            \"size\", \r\n            \"sizes\", \r\n            \"skimming\", \r\n            \"skirt\", \r\n            \"skurried\", \r\n            \"sky\", \r\n            \"slate\", \r\n            \"slates\", \r\n            \"sleep\", \r\n            \"sleepy\", \r\n            \"slightest\", \r\n            \"slipped\", \r\n            \"slippery\", \r\n            \"slowly\", \r\n            \"sluggard\", \r\n            \"small\", \r\n            \"smaller\", \r\n            \"smallest\", \r\n            \"smile\", \r\n            \"smiled\", \r\n            \"smiling\", \r\n            \"smoke\", \r\n            \"smoking\", \r\n            \"snail\", \r\n            \"snappishly\", \r\n            \"sneeze\", \r\n            \"sneezed\", \r\n            \"sneezes\", \r\n            \"sneezing\", \r\n            \"snorting\", \r\n            \"snout\", \r\n            \"so\", \r\n            \"sobbed\", \r\n            \"sobbing\", \r\n            \"sobs\", \r\n            \"soft\", \r\n            \"softly\", \r\n            \"soldier\", \r\n            \"soldiers\", \r\n            \"solemn\", \r\n            \"solemnly\", \r\n            \"soles\", \r\n            \"solicit\", \r\n            \"solicitation\", \r\n            \"solid\", \r\n            \"some\", \r\n            \"somebody\", \r\n            \"somehow\", \r\n            \"someone\", \r\n            \"somersault\", \r\n            \"something\", \r\n            \"sometimes\", \r\n            \"somewhere\", \r\n            \"son\", \r\n            \"song\", \r\n            \"soo\", \r\n            \"soon\", \r\n            \"sooner\", \r\n            \"soothing\", \r\n            \"sorrow\", \r\n            \"sorrowful\", \r\n            \"sorrows\", \r\n            \"sorry\", \r\n            \"sort\", \r\n            \"sorts\", \r\n            \"sound\", \r\n            \"sounded\", \r\n            \"sounds\", \r\n            \"soup\", \r\n            \"sour\", \r\n            \"spades\", \r\n            \"speak\", \r\n            \"speaker\", \r\n            \"speaking\", \r\n            \"special\", \r\n            \"specific\", \r\n            \"specified\", \r\n            \"spectacles\", \r\n            \"speech\", \r\n            \"speed\", \r\n            \"spell\", \r\n            \"spirited\", \r\n            \"spite\", \r\n            \"splash\", \r\n            \"splashed\", \r\n            \"splashing\", \r\n            \"splendidly\", \r\n            \"spoke\", \r\n            \"spoken\", \r\n            \"spoon\", \r\n            \"spot\", \r\n            \"sprawling\", \r\n            \"spread\", \r\n            \"spreading\", \r\n            \"squeaked\", \r\n            \"squeaking\", \r\n            \"squeeze\", \r\n            \"squeezed\", \r\n            \"staff\", \r\n            \"stairs\", \r\n            \"stalk\", \r\n            \"stamping\", \r\n            \"stand\", \r\n            \"standing\", \r\n            \"star\", \r\n            \"staring\", \r\n            \"start\", \r\n            \"started\", \r\n            \"startled\", \r\n            \"state\", \r\n            \"statements\", \r\n            \"states\", \r\n            \"station\", \r\n            \"status\", \r\n            \"stay\", \r\n            \"stays\", \r\n            \"steady\", \r\n            \"steam\", \r\n            \"sternly\", \r\n            \"stick\", \r\n            \"sticks\", \r\n            \"stiff\", \r\n            \"stigand\", \r\n            \"still\", \r\n            \"stingy\", \r\n            \"stirring\", \r\n            \"stockings\", \r\n            \"stole\", \r\n            \"stolen\", \r\n            \"stood\", \r\n            \"stool\", \r\n            \"stoop\", \r\n            \"stop\", \r\n            \"stopped\", \r\n            \"stopping\", \r\n            \"stored\", \r\n            \"story\", \r\n            \"straight\", \r\n            \"straightened\", \r\n            \"straightening\", \r\n            \"strange\", \r\n            \"strength\", \r\n            \"stretched\", \r\n            \"stretching\", \r\n            \"strict\", \r\n            \"strings\", \r\n            \"struck\", \r\n            \"stuff\", \r\n            \"stupid\", \r\n            \"stupidest\", \r\n            \"stupidly\", \r\n            \"subdued\", \r\n            \"subject\", \r\n            \"subjects\", \r\n            \"submitted\", \r\n            \"subscribe\", \r\n            \"succeeded\", \r\n            \"such\", \r\n            \"sudden\", \r\n            \"suddenly\", \r\n            \"suet\", \r\n            \"sugar\", \r\n            \"suit\", \r\n            \"sulkily\", \r\n            \"sulky\", \r\n            \"summer\", \r\n            \"sun\", \r\n            \"supple\", \r\n            \"support\", \r\n            \"suppose\", \r\n            \"suppress\", \r\n            \"suppressed\", \r\n            \"sure\", \r\n            \"surprise\", \r\n            \"surprised\", \r\n            \"survive\", \r\n            \"swallow\", \r\n            \"swallowed\", \r\n            \"swallowing\", \r\n            \"swam\", \r\n            \"swamp\", \r\n            \"sweet\", \r\n            \"swim\", \r\n            \"swimming\", \r\n            \"synonymous\", \r\n            \"t\", \r\n            \"table\", \r\n            \"tail\", \r\n            \"tails\", \r\n            \"take\", \r\n            \"taken\", \r\n            \"takes\", \r\n            \"taking\", \r\n            \"tale\", \r\n            \"tales\", \r\n            \"talk\", \r\n            \"talking\", \r\n            \"taller\", \r\n            \"tart\", \r\n            \"tarts\", \r\n            \"taste\", \r\n            \"tasted\", \r\n            \"tastes\", \r\n            \"taught\", \r\n            \"tax\", \r\n            \"taxes\", \r\n            \"tea\", \r\n            \"teaching\", \r\n            \"teacup\", \r\n            \"teacups\", \r\n            \"teapot\", \r\n            \"tears\", \r\n            \"teases\", \r\n            \"teeth\", \r\n            \"telescope\", \r\n            \"telescopes\", \r\n            \"tell\", \r\n            \"telling\", \r\n            \"tells\", \r\n            \"temper\", \r\n            \"tempered\", \r\n            \"ten\", \r\n            \"terms\", \r\n            \"terribly\", \r\n            \"terrier\", \r\n            \"terror\", \r\n            \"than\", \r\n            \"thank\", \r\n            \"thanked\", \r\n            \"that\", \r\n            \"thatched\", \r\n            \"the\", \r\n            \"their\", \r\n            \"theirs\", \r\n            \"them\", \r\n            \"themselves\", \r\n            \"then\", \r\n            \"there\", \r\n            \"therefore\", \r\n            \"these\", \r\n            \"they\", \r\n            \"thick\", \r\n            \"thimble\", \r\n            \"thin\", \r\n            \"thing\", \r\n            \"things\", \r\n            \"think\", \r\n            \"thinking\", \r\n            \"thirteen\", \r\n            \"thirty\", \r\n            \"this\", \r\n            \"thistle\", \r\n            \"thoroughly\", \r\n            \"those\", \r\n            \"though\", \r\n            \"thought\", \r\n            \"thoughtfully\", \r\n            \"thoughts\", \r\n            \"thousand\", \r\n            \"three\", \r\n            \"threw\", \r\n            \"throat\", \r\n            \"throne\", \r\n            \"through\", \r\n            \"throughout\", \r\n            \"throw\", \r\n            \"throwing\", \r\n            \"thrown\", \r\n            \"thump\", \r\n            \"thunder\", \r\n            \"thunderstorm\", \r\n            \"thus\", \r\n            \"tide\", \r\n            \"tidy\", \r\n            \"tie\", \r\n            \"tied\", \r\n            \"tight\", \r\n            \"till\", \r\n            \"tillie\", \r\n            \"time\", \r\n            \"times\", \r\n            \"timid\", \r\n            \"timidly\", \r\n            \"tinkling\", \r\n            \"tiny\", \r\n            \"tipped\", \r\n            \"tiptoe\", \r\n            \"tired\", \r\n            \"tis\", \r\n            \"title\", \r\n            \"tittered\", \r\n            \"tm\", \r\n            \"to\", \r\n            \"toast\", \r\n            \"today\", \r\n            \"toes\", \r\n            \"toffee\", \r\n            \"together\", \r\n            \"told\", \r\n            \"tomorrow\", \r\n            \"tone\", \r\n            \"tones\", \r\n            \"tongue\", \r\n            \"too\", \r\n            \"took\", \r\n            \"top\", \r\n            \"tops\", \r\n            \"tortoise\", \r\n            \"toss\", \r\n            \"tossing\", \r\n            \"touch\", \r\n            \"tougher\", \r\n            \"towards\", \r\n            \"toys\", \r\n            \"trademark\", \r\n            \"trampled\", \r\n            \"transcribe\", \r\n            \"transcription\", \r\n            \"traps\", \r\n            \"tray\", \r\n            \"treacle\", \r\n            \"treading\", \r\n            \"treat\", \r\n            \"treated\", \r\n            \"treatment\", \r\n            \"tree\", \r\n            \"trees\", \r\n            \"tremble\", \r\n            \"trembled\", \r\n            \"trembling\", \r\n            \"tremulous\", \r\n            \"trial\", \r\n            \"trials\", \r\n            \"trickling\", \r\n            \"tricks\", \r\n            \"tried\", \r\n            \"trims\", \r\n            \"triumphantly\", \r\n            \"trot\", \r\n            \"trotting\", \r\n            \"trouble\", \r\n            \"true\", \r\n            \"trumpet\", \r\n            \"trusts\", \r\n            \"truth\", \r\n            \"truthful\", \r\n            \"try\", \r\n            \"trying\", \r\n            \"tucked\", \r\n            \"tulip\", \r\n            \"tumbled\", \r\n            \"tumbling\", \r\n            \"tunnel\", \r\n            \"tureen\", \r\n            \"turkey\", \r\n            \"turn\", \r\n            \"turned\", \r\n            \"turning\", \r\n            \"turns\", \r\n            \"turtle\", \r\n            \"turtles\", \r\n            \"tut\", \r\n            \"twelfth\", \r\n            \"twelve\", \r\n            \"twentieth\", \r\n            \"twenty\", \r\n            \"twice\", \r\n            \"twinkle\", \r\n            \"twinkled\", \r\n            \"twinkling\", \r\n            \"twist\", \r\n            \"two\", \r\n            \"txt\", \r\n            \"types\", \r\n            \"u\", \r\n            \"ugh\", \r\n            \"uglification\", \r\n            \"uglify\", \r\n            \"uglifying\", \r\n            \"ugly\", \r\n            \"unable\", \r\n            \"uncivil\", \r\n            \"uncomfortable\", \r\n            \"uncomfortably\", \r\n            \"uncommon\", \r\n            \"uncommonly\", \r\n            \"uncorked\", \r\n            \"under\", \r\n            \"underneath\", \r\n            \"understand\", \r\n            \"understood\", \r\n            \"undertone\", \r\n            \"undo\", \r\n            \"undoing\", \r\n            \"uneasily\", \r\n            \"uneasy\", \r\n            \"unenforceability\", \r\n            \"unfolded\", \r\n            \"unfortunate\", \r\n            \"unhappy\", \r\n            \"uniform\", \r\n            \"unimportant\", \r\n            \"united\", \r\n            \"unjust\", \r\n            \"unless\", \r\n            \"unlink\", \r\n            \"unlocking\", \r\n            \"unpleasant\", \r\n            \"unrolled\", \r\n            \"unsolicited\", \r\n            \"until\", \r\n            \"untwist\", \r\n            \"unusually\", \r\n            \"unwillingly\", \r\n            \"up\", \r\n            \"updated\", \r\n            \"upon\", \r\n            \"upright\", \r\n            \"upset\", \r\n            \"upsetting\", \r\n            \"upstairs\", \r\n            \"us\", \r\n            \"use\", \r\n            \"used\", \r\n            \"useful\", \r\n            \"user\", \r\n            \"using\", \r\n            \"usual\", \r\n            \"usually\", \r\n            \"usurpation\", \r\n            \"ut\", \r\n            \"v\", \r\n            \"vague\", \r\n            \"vanilla\", \r\n            \"vanished\", \r\n            \"vanishing\", \r\n            \"variations\", \r\n            \"variety\", \r\n            \"various\", \r\n            \"ve\", \r\n            \"vegetable\", \r\n            \"velvet\", \r\n            \"venture\", \r\n            \"ventured\", \r\n            \"verdict\", \r\n            \"verse\", \r\n            \"verses\", \r\n            \"version\", \r\n            \"very\", \r\n            \"vi\", \r\n            \"viewed\", \r\n            \"viewing\", \r\n            \"vii\", \r\n            \"viii\", \r\n            \"vinegar\", \r\n            \"violates\", \r\n            \"violence\", \r\n            \"violent\", \r\n            \"violently\", \r\n            \"virus\", \r\n            \"visit\", \r\n            \"voice\", \r\n            \"voices\", \r\n            \"void\", \r\n            \"volunteer\", \r\n            \"volunteers\", \r\n            \"vote\", \r\n            \"vulgar\", \r\n            \"w\", \r\n            \"wag\", \r\n            \"wags\", \r\n            \"waist\", \r\n            \"waistcoat\", \r\n            \"wait\", \r\n            \"waited\", \r\n            \"waiting\", \r\n            \"wake\", \r\n            \"walk\", \r\n            \"walked\", \r\n            \"walking\", \r\n            \"walks\", \r\n            \"walrus\", \r\n            \"wander\", \r\n            \"wandered\", \r\n            \"wandering\", \r\n            \"want\", \r\n            \"wanted\", \r\n            \"wants\", \r\n            \"warning\", \r\n            \"warranties\", \r\n            \"warranty\", \r\n            \"was\", \r\n            \"wash\", \r\n            \"washing\", \r\n            \"wasn\", \r\n            \"waste\", \r\n            \"wasting\", \r\n            \"watch\", \r\n            \"watched\", \r\n            \"watching\", \r\n            \"water\", \r\n            \"waters\", \r\n            \"waving\", \r\n            \"way\", \r\n            \"ways\", \r\n            \"we\", \r\n            \"weak\", \r\n            \"wearily\", \r\n            \"web\", \r\n            \"week\", \r\n            \"weeks\", \r\n            \"welcome\", \r\n            \"well\", \r\n            \"went\", \r\n            \"wept\", \r\n            \"were\", \r\n            \"weren\", \r\n            \"west\", \r\n            \"wet\", \r\n            \"what\", \r\n            \"whatever\", \r\n            \"whatsoever\", \r\n            \"when\", \r\n            \"whenever\", \r\n            \"where\", \r\n            \"whereupon\", \r\n            \"wherever\", \r\n            \"whether\", \r\n            \"which\", \r\n            \"while\", \r\n            \"whiles\", \r\n            \"whiskers\", \r\n            \"whisper\", \r\n            \"whispered\", \r\n            \"whispers\", \r\n            \"whistle\", \r\n            \"whistling\", \r\n            \"white\", \r\n            \"whiting\", \r\n            \"who\", \r\n            \"whoever\", \r\n            \"whole\", \r\n            \"whom\", \r\n            \"whose\", \r\n            \"why\", \r\n            \"wide\", \r\n            \"wider\", \r\n            \"widest\", \r\n            \"wife\", \r\n            \"wig\", \r\n            \"wild\", \r\n            \"wildly\", \r\n            \"will\", \r\n            \"william\", \r\n            \"win\", \r\n            \"wind\", \r\n            \"window\", \r\n            \"wine\", \r\n            \"wings\", \r\n            \"wink\", \r\n            \"winter\", \r\n            \"wise\", \r\n            \"wish\", \r\n            \"with\", \r\n            \"within\", \r\n            \"without\", \r\n            \"witness\", \r\n            \"wits\", \r\n            \"woke\", \r\n            \"woman\", \r\n            \"won\", \r\n            \"wonder\", \r\n            \"wondered\", \r\n            \"wonderful\", \r\n            \"wondering\", \r\n            \"wonderland\", \r\n            \"wood\", \r\n            \"wooden\", \r\n            \"word\", \r\n            \"words\", \r\n            \"wore\", \r\n            \"work\", \r\n            \"works\", \r\n            \"world\", \r\n            \"worm\", \r\n            \"worried\", \r\n            \"worry\", \r\n            \"worse\", \r\n            \"worth\", \r\n            \"would\", \r\n            \"wouldn\", \r\n            \"wow\", \r\n            \"wrapping\", \r\n            \"wretched\", \r\n            \"wriggling\", \r\n            \"write\", \r\n            \"writhing\", \r\n            \"writing\", \r\n            \"written\", \r\n            \"wrong\", \r\n            \"wrote\", \r\n            \"www\", \r\n            \"x\", \r\n            \"xi\", \r\n            \"xii\", \r\n            \"yard\", \r\n            \"yards\", \r\n            \"yawned\", \r\n            \"yawning\", \r\n            \"ye\", \r\n            \"year\", \r\n            \"years\", \r\n            \"yelled\", \r\n            \"yelp\", \r\n            \"yer\", \r\n            \"yes\", \r\n            \"yesterday\", \r\n            \"yet\", \r\n            \"you\", \r\n            \"young\", \r\n            \"your\", \r\n            \"yours\", \r\n            \"yourself\", \r\n            \"youth\", \r\n            \"zealand\", \r\n            \"zigzag\", \r\n            \"zip\", \r\n        };\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Samples/Common/GridLengthAnimation.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Windows.Media.Animation;\r\nusing System.Windows;\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    public class GridLengthAnimation : AnimationTimeline\r\n    {\r\n        public static readonly DependencyProperty FromProperty;\r\n        public static readonly DependencyProperty ToProperty;\r\n\r\n        static GridLengthAnimation()\r\n        {\r\n            FromProperty = DependencyProperty.Register(\"From\", typeof(GridLength), typeof(GridLengthAnimation));\r\n            ToProperty = DependencyProperty.Register(\"To\", typeof(GridLength), typeof(GridLengthAnimation));\r\n        }\r\n\r\n        protected override Freezable CreateInstanceCore()\r\n        {\r\n            return new GridLengthAnimation();\r\n        }\r\n\r\n        public override Type TargetPropertyType\r\n        {\r\n            get { return typeof(GridLength); }\r\n        }\r\n\r\n        public GridLength From\r\n        {\r\n            get\r\n            {\r\n                return (GridLength)GetValue(GridLengthAnimation.FromProperty);\r\n            }\r\n            set\r\n            {\r\n                SetValue(GridLengthAnimation.FromProperty, value);\r\n            }\r\n        }\r\n\r\n        public GridLength To\r\n        {\r\n            get\r\n            {\r\n                return (GridLength)GetValue(GridLengthAnimation.ToProperty);\r\n            }\r\n            set\r\n            {\r\n                SetValue(GridLengthAnimation.ToProperty, value);\r\n            }\r\n        }\r\n\r\n        public override object GetCurrentValue(object defaultOriginValue, object defaultDestinationValue, AnimationClock animationClock)\r\n        {\r\n            double fromValue = ((GridLength)GetValue(GridLengthAnimation.FromProperty)).Value;\r\n            double toValue = ((GridLength)GetValue(GridLengthAnimation.ToProperty)).Value;\r\n\r\n            if (fromValue > toValue)\r\n            {\r\n                return new GridLength((1 - animationClock.CurrentProgress.Value) * (fromValue - toValue) + toValue, this.To.IsStar ? GridUnitType.Star : GridUnitType.Pixel);\r\n            }\r\n            else\r\n            {\r\n                return new GridLength((animationClock.CurrentProgress.Value) * (toValue - fromValue) + fromValue, this.To.IsStar ? GridUnitType.Star : GridUnitType.Pixel);\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Samples/Common/SharedResources.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.IO;\r\nusing System.Linq;\r\nusing System.Reflection;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Markup;\r\nusing System.Windows.Media.Imaging;\r\nusing System.Xml.Linq;\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    /// <summary>\r\n    /// Utility to to load shared resources into another ResourceDictionary.\r\n    /// </summary>\r\n    public static class SharedResources\r\n    {\r\n        /// <summary>\r\n        /// Prefix of images loaded as resources.\r\n        /// </summary>\r\n        private const string ResourceImagePrefix = \"System.Windows.Controls.Samples.Images.\";\r\n\r\n        /// <summary>\r\n        /// Prefix of icons loaded as resources.\r\n        /// </summary>\r\n        private const string ResourceIconPrefix = \"System.Windows.Controls.Samples.Icons.\";\r\n\r\n        /// <summary>\r\n        /// Get an embedded resource image from the assembly.\r\n        /// </summary>\r\n        /// <param name=\"name\">Name of the image resource.</param>\r\n        /// <returns>\r\n        /// Desired embedded resource image from the assembly.\r\n        /// </returns>\r\n        public static Image GetImage(string name)\r\n        {\r\n            return CreateImage(ResourceImagePrefix, name);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Get an embedded resource icon from the assembly.\r\n        /// </summary>\r\n        /// <param name=\"name\">Name of the icon resource.</param>\r\n        /// <returns>\r\n        /// Desired embedded resource icon from the assembly.\r\n        /// </returns>\r\n        public static Image GetIcon(string name)\r\n        {\r\n            return CreateImage(ResourceIconPrefix, name);\r\n        }\r\n\r\n        /// <summary>\r\n        /// A cached dictionary of the bitmap images.\r\n        /// </summary>\r\n        private static IDictionary<string, BitmapImage> cachedBitmapImages = new Dictionary<string, BitmapImage>();\r\n\r\n        /// <summary>\r\n        /// Get an embedded resource image from the assembly.\r\n        /// </summary>\r\n        /// <param name=\"prefix\">The prefix of the full name of the resource.</param>\r\n        /// <param name=\"name\">Name of the image resource.</param>\r\n        /// <returns>\r\n        /// Desired embedded resource image from the assembly.\r\n        /// </returns>\r\n        public static Image CreateImage(string prefix, string name)\r\n        {\r\n            Image image = new Image { Tag = name };\r\n\r\n            BitmapImage source = null;\r\n            string resourceName = prefix + name;\r\n            if (!cachedBitmapImages.TryGetValue(resourceName, out source))\r\n            {\r\n                Assembly assembly = typeof(SharedResources).Assembly;\r\n\r\n                using (Stream resource = assembly.GetManifestResourceStream(resourceName))\r\n                {\r\n                    if (resource != null)\r\n                    {\r\n                        source = new BitmapImage();\r\n#if SILVERLIGHT\r\n                        source.SetSource(resource);\r\n#else\r\n                        source.StreamSource = resource;\r\n#endif\r\n                    }\r\n                }\r\n                cachedBitmapImages[resourceName] = source;\r\n            }\r\n            image.Source = source;\r\n            return image;\r\n        }\r\n\r\n        /// <summary>\r\n        /// Get all of the names of embedded resources images in the assembly.\r\n        /// </summary>\r\n        /// <returns>\r\n        /// All of the names of embedded resources images in the assembly.\r\n        /// </returns>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1024:UsePropertiesWhereAppropriate\", Justification = \"Does more work than a property should.\")]\r\n        public static IEnumerable<string> GetImageNames()\r\n        {\r\n            return GetResourceNames(ResourceImagePrefix);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Get all of the names of embedded resources icons in the assembly.\r\n        /// </summary>\r\n        /// <returns>\r\n        /// All of the names of embedded resources icons in the assembly.\r\n        /// </returns>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1024:UsePropertiesWhereAppropriate\", Justification = \"Does more work than a property should.\")]\r\n        public static IEnumerable<string> GetIconNames()\r\n        {\r\n            return GetResourceNames(ResourceIconPrefix);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Get all of the images in the assembly.\r\n        /// </summary>\r\n        /// <returns>All of the images in the assembly.</returns>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1024:UsePropertiesWhereAppropriate\", Justification = \"Does more work than a property should\")]\r\n        public static IEnumerable<Image> GetImages()\r\n        {\r\n            foreach (string name in GetImageNames())\r\n            {\r\n                yield return GetImage(name);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Get all of the icons in the assembly.\r\n        /// </summary>\r\n        /// <returns>All of the icons in the assembly.</returns>\r\n        [SuppressMessage(\"Microsoft.Design\", \"CA1024:UsePropertiesWhereAppropriate\", Justification = \"Does more work than a property should\")]\r\n        public static IEnumerable<Image> GetIcons()\r\n        {\r\n            foreach (string name in GetIconNames())\r\n            {\r\n                yield return GetImage(name);\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Get all the names of embedded resources in the assembly with the \r\n        /// provided prefix value.\r\n        /// </summary>\r\n        /// <param name=\"prefix\">The prefix for the full resource name.</param>\r\n        /// <returns>Returns an enumerable of all the resource names that match.</returns>\r\n        private static IEnumerable<string> GetResourceNames(string prefix)\r\n        {\r\n            Assembly assembly = typeof(SharedResources).Assembly;\r\n            foreach (string name in assembly.GetManifestResourceNames())\r\n            {\r\n                // Ignore resources that don't share the images prefix\r\n                if (!name.StartsWith(prefix, StringComparison.OrdinalIgnoreCase))\r\n                {\r\n                    continue;\r\n                }\r\n\r\n                // Trim the prefix off of the name\r\n                yield return name.Substring(prefix.Length, name.Length - prefix.Length);\r\n            }\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Samples/Common/WebServiceHelper.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System.Globalization;\r\n\r\n#if SILVERLIGHT\r\nusing System.Windows.Browser;\r\n#else\r\nusing System.Web;\r\n#endif\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    /// <summary>\r\n    /// A set of simple helpers to enable the creation of more robust web \r\n    /// service samples. Includes a centralized place to get generic addresses \r\n    /// for service requests and web pages.\r\n    /// </summary>\r\n    public static class WebServiceHelper\r\n    {\r\n        /// <summary>\r\n        /// The format of the URI for JSON requests to Bing Suggestions.\r\n        /// </summary>\r\n        private const string SearchSuggestionsJsonUriFormat = \"http://api.bing.net/osjson.aspx?query={0}\";\r\n\r\n        /// <summary>\r\n        /// Standard Bing Search address.\r\n        /// </summary>\r\n        private const string WebSearchUriFormat = \"http://www.bing.com/search?q={0}\";\r\n\r\n        /// <summary>\r\n        /// A format string for creating a link to look at airline fares online.\r\n        /// </summary>\r\n        private const string AirfareSearchUriFormat = \"http://www.bing.com/travel/flight/flightSearch?t=r&o={0}&e={1}&d1={2}&r1={3}&p={4}&b=COACH\"; \r\n\r\n        /// <summary>\r\n        /// Gets a value indicating whether the document scheme allows for web \r\n        /// service access.\r\n        /// </summary>\r\n        /// <returns>Returns true when the scheme should permit web requests.</returns>\r\n        public static bool CanMakeHttpRequests\r\n        {\r\n            get\r\n            {\r\n#if SILVERLIGHT\r\n                if (!HtmlPage.IsEnabled)\r\n                {\r\n                    return false;\r\n                }\r\n\r\n                string scheme = HtmlPage.Document.DocumentUri.Scheme ?? string.Empty;\r\n                return string.Compare(scheme, \"http\", StringComparison.OrdinalIgnoreCase) == 0;\r\n#else\r\n                return true;\r\n#endif\r\n            }\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates a Uri to navigate to a web search service.\r\n        /// </summary>\r\n        /// <param name=\"searchText\">The search string.</param>\r\n        /// <returns>Returns a new Uri instance.</returns>\r\n        public static Uri CreateWebSearchUri(string searchText)\r\n        {\r\n            return new Uri(string.Format(CultureInfo.InvariantCulture, WebSearchUriFormat, HttpUtility.UrlEncode(searchText)));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates a Uri for retrieving search suggestion phrases.\r\n        /// </summary>\r\n        /// <param name=\"searchText\">The search string.</param>\r\n        /// <returns>Returns a new Uri instance.</returns>\r\n        public static Uri CreateWebSearchSuggestionsUri(string searchText)\r\n        {\r\n            return new Uri(string.Format(CultureInfo.InvariantCulture, SearchSuggestionsJsonUriFormat, HttpUtility.UrlEncode(searchText)));\r\n        }\r\n\r\n        /// <summary>\r\n        /// Creates a Uri to look up flight pricing trends online using Bing\r\n        /// Travel.\r\n        /// </summary>\r\n        /// <param name=\"departureAirport\">The departure airport object.</param>\r\n        /// <param name=\"arrivalAirport\">The arrival airport object.</param>\r\n        /// <param name=\"departure\">The departure date.</param>\r\n        /// <param name=\"arrival\">The arrival date.</param>\r\n        /// <param name=\"persons\">The number of people that will be traveling.</param>\r\n        /// <returns>Returns a new Uri object.</returns>\r\n        public static Uri CreateAirfareSearchUri(Airport departureAirport, Airport arrivalAirport, DateTime departure, DateTime arrival, int persons)\r\n        {\r\n            return new Uri(string.Format(CultureInfo.InvariantCulture, AirfareSearchUriFormat, departureAirport.CodeFaa, arrivalAirport.CodeFaa, HttpUtility.UrlEncode(departure.ToShortDateString()), HttpUtility.UrlEncode(arrival.ToShortDateString()), persons.ToString(CultureInfo.InvariantCulture)));\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Samples/DataVisualisation/DataVisualisationSample.xaml",
    "content": "﻿<UserControl x:Class=\"System.Windows.Controls.Samples.DataVisualisation.DataVisualisationSample\"\r\n             xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n             xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n             xmlns:chartingToolkit=\"clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=DotNetProjects.DataVisualization.Toolkit\"\r\n             xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n             xmlns:dataVisualisation=\"clr-namespace:System.Windows.Controls.Samples.DataVisualisation\"\r\n             xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n             d:DesignHeight=\"300\"\r\n             mc:Ignorable=\"d\">\r\n    <UserControl.DataContext>\r\n        <dataVisualisation:SampleDataVM />\r\n    </UserControl.DataContext>\r\n    <ScrollViewer CanContentScroll=\"False\" VerticalScrollBarVisibility=\"Visible\">\r\n        <Grid Height=\"2000\">\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition />\r\n                <ColumnDefinition />\r\n            </Grid.ColumnDefinitions>\r\n            <Grid.RowDefinitions>\r\n                <RowDefinition />\r\n                <RowDefinition />\r\n                <RowDefinition />\r\n                <RowDefinition />\r\n                <RowDefinition />\r\n                <RowDefinition />\r\n                <RowDefinition />\r\n            </Grid.RowDefinitions>\r\n            <chartingToolkit:Chart Title=\"Demo\" CrosshairVisibility=\"Visible\"\r\n                                   HorizontalAlignment=\"Stretch\"\r\n                                   VerticalAlignment=\"Stretch\">\r\n                <chartingToolkit:ColumnSeries Grid.Row=\"0\"\r\n                                              Grid.Column=\"0\"\r\n                                              DependentValuePath=\"Value\"\r\n                                              IndependentValuePath=\"Key\"\r\n                                              ItemsSource=\"{Binding Data}\" />\r\n            </chartingToolkit:Chart>\r\n            <chartingToolkit:Chart Title=\"Demo\"\r\n                                   Grid.Row=\"0\"\r\n                                   Grid.Column=\"1\"\r\n                                   HorizontalAlignment=\"Stretch\"\r\n                                   VerticalAlignment=\"Stretch\">\r\n                <chartingToolkit:PieSeries DependentValuePath=\"Value\"\r\n                                           IndependentValuePath=\"Key\"\r\n                                           ItemsSource=\"{Binding Data}\" />\r\n            </chartingToolkit:Chart>\r\n            <chartingToolkit:Chart Title=\"Demo\"\r\n                                   Grid.Row=\"1\"\r\n                                   Grid.Column=\"0\"\r\n                                   HorizontalAlignment=\"Stretch\"\r\n                                   VerticalAlignment=\"Stretch\">\r\n                <chartingToolkit:AreaSeries DependentValuePath=\"Value\"\r\n                                            IndependentValuePath=\"Key\"\r\n                                            ItemsSource=\"{Binding Data}\" />\r\n            </chartingToolkit:Chart>\r\n            <chartingToolkit:Chart Title=\"Demo\"\r\n                                   Grid.Row=\"1\"\r\n                                   Grid.Column=\"1\"\r\n                                   CrosshairVisibility=\"Visible\"\r\n                                   HorizontalAlignment=\"Stretch\"\r\n                                   VerticalAlignment=\"Stretch\">\r\n                <chartingToolkit:Chart.Axes>\r\n                    <chartingToolkit:CategoryAxis Orientation=\"X\" ShowGridLines=\"True\" />\r\n                    <chartingToolkit:LogarithmicAxis Title=\"Frequency (Hz)\"\r\n                                                     MajorValues=\"1;10;20;40;80\"\r\n                                                     Maximum=\"100\"\r\n                                                     Minimum=\"1\"\r\n                                                     Orientation=\"Y\"\r\n                                                     ShowGridLines=\"True\" />\r\n                </chartingToolkit:Chart.Axes>\r\n                <chartingToolkit:LineSeries DependentValuePath=\"Value\"\r\n                                            IndependentValuePath=\"Key\"\r\n                                            IsSelectionEnabled=\"True\"\r\n                                            ItemsSource=\"{Binding Data}\" />\r\n            </chartingToolkit:Chart>\r\n            <chartingToolkit:Chart Title=\"Demo\"\r\n                                   Grid.Row=\"2\"\r\n                                   Grid.Column=\"0\"\r\n                                   HorizontalAlignment=\"Stretch\"\r\n                                   VerticalAlignment=\"Stretch\">\r\n                <chartingToolkit:ScatterSeries DependentValuePath=\"Value\"\r\n                                               IndependentValuePath=\"Key\"\r\n                                               ItemsSource=\"{Binding Data}\" />\r\n            </chartingToolkit:Chart>\r\n            <chartingToolkit:Chart Title=\"Demo\"\r\n                                   Grid.Row=\"2\"\r\n                                   Grid.Column=\"1\"\r\n                                   HorizontalAlignment=\"Stretch\"\r\n                                   VerticalAlignment=\"Stretch\">\r\n                <chartingToolkit:BubbleSeries DependentValuePath=\"Value\"\r\n                                              IndependentValuePath=\"Key\"\r\n                                              ItemsSource=\"{Binding Data}\" />\r\n            </chartingToolkit:Chart>\r\n            <chartingToolkit:Chart Title=\"Demo\"\r\n                                   Grid.Row=\"3\"\r\n                                   Grid.Column=\"0\"\r\n                                   HorizontalAlignment=\"Stretch\"\r\n                                   VerticalAlignment=\"Stretch\">\r\n                <chartingToolkit:BarSeries DependentValuePath=\"Value\"\r\n                                           IndependentValuePath=\"Key\"\r\n                                           ItemsSource=\"{Binding Data}\" />\r\n            </chartingToolkit:Chart>\r\n            <chartingToolkit:Chart Title=\"Demo\"\r\n                                   Grid.Row=\"3\"\r\n                                   Grid.Column=\"1\"\r\n                                   HorizontalAlignment=\"Stretch\"\r\n                                   VerticalAlignment=\"Stretch\">\r\n                <chartingToolkit:Stacked100BarSeries>\r\n                    <chartingToolkit:SeriesDefinition Title=\"Actual\"\r\n                                                      DependentValuePath=\"Value\"\r\n                                                      IndependentValuePath=\"Key\"\r\n                                                      ItemsSource=\"{Binding Data}\" />\r\n                    <chartingToolkit:SeriesDefinition Title=\"Test\"\r\n                                                      DependentValuePath=\"Value\"\r\n                                                      IndependentValuePath=\"Key\"\r\n                                                      ItemsSource=\"{Binding Data}\" />\r\n                </chartingToolkit:Stacked100BarSeries>\r\n            </chartingToolkit:Chart>\r\n            <chartingToolkit:Chart Title=\"Demo\"\r\n                                   Grid.Row=\"4\"\r\n                                   Grid.Column=\"0\"\r\n                                   HorizontalAlignment=\"Stretch\"\r\n                                   VerticalAlignment=\"Stretch\">\r\n                <chartingToolkit:CandlestickSeries Title=\"MSFT\"\r\n                                                   CloseValueBinding=\"{Binding Close}\"\r\n                                                   DependentValueBinding=\"{Binding High}\"\r\n                                                   HighValueBinding=\"{Binding High}\"\r\n                                                   IndependentValueBinding=\"{Binding Date}\"\r\n                                                   ItemsSource=\"{Binding Microsoft}\"\r\n                                                   LowValueBinding=\"{Binding Low}\"\r\n                                                   OpenValueBinding=\"{Binding Open}\" />\r\n            </chartingToolkit:Chart>\r\n\r\n            <chartingToolkit:Chart Title=\"Demo\"\r\n                                   Grid.Row=\"4\"\r\n                                   Grid.Column=\"1\"\r\n                                   HorizontalAlignment=\"Stretch\"\r\n                                   VerticalAlignment=\"Stretch\">\r\n                <chartingToolkit:Chart.Axes>\r\n                    <chartingToolkit:CategoryAxis Orientation=\"X\" ShowGridLines=\"True\" />\r\n                    <chartingToolkit:LinearAxis Title=\"Frequency (Hz)\"\r\n                                                Maximum=\"100\"\r\n                                                Minimum=\"1\"\r\n                                                Orientation=\"Y\"\r\n                                                ShowGridLines=\"True\" />\r\n                </chartingToolkit:Chart.Axes>\r\n                <chartingToolkit:SplineSeries DependentValuePath=\"Value\"\r\n                                              IndependentValuePath=\"Key\"\r\n                                              IsSelectionEnabled=\"True\"\r\n                                              ItemsSource=\"{Binding Data}\" />\r\n            </chartingToolkit:Chart>\r\n\r\n            <chartingToolkit:Chart Title=\"Demo\"\r\n                                   Grid.Row=\"5\"\r\n                                   Grid.RowSpan=\"2\"\r\n                                   Grid.Column=\"0\"\r\n                                   HorizontalAlignment=\"Stretch\"\r\n                                   VerticalAlignment=\"Stretch\">\r\n                <chartingToolkit:LabeledPieSeries DependentValuePath=\"Value\"\r\n                                                  IndependentValuePath=\"Key\" LabelDisplayMode=\"Connected\"\r\n                                                  ItemsSource=\"{Binding Data}\" />\r\n            </chartingToolkit:Chart>\r\n            <chartingToolkit:Chart Title=\"Demo\"\r\n                                   Grid.Row=\"5\"\r\n                                   Grid.RowSpan=\"2\"\r\n                                   Grid.Column=\"1\"\r\n                                   HorizontalAlignment=\"Stretch\"\r\n                                   VerticalAlignment=\"Stretch\">\r\n                <chartingToolkit:LabeledPieSeries DependentValuePath=\"Value\"\r\n                                                  IndependentValuePath=\"Key\" LabelDisplayMode=\"InsideArc\"\r\n                                                  ItemsSource=\"{Binding Data}\" />\r\n            </chartingToolkit:Chart>\r\n        </Grid>\r\n    </ScrollViewer>\r\n</UserControl>\r\n"
  },
  {
    "path": "WpfToolkit/Samples/DataVisualisation/DataVisualisationSample.xaml.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing System.Windows.Documents;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Imaging;\r\nusing System.Windows.Navigation;\r\nusing System.Windows.Shapes;\r\n\r\nnamespace System.Windows.Controls.Samples.DataVisualisation\r\n{\r\n    /// <summary>\r\n    /// Interaction logic for DataVisualisationSample.xaml\r\n    /// </summary>\r\n    public partial class DataVisualisationSample : UserControl\r\n    {\r\n        public DataVisualisationSample()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Samples/DataVisualisation/SampleDataVM.cs",
    "content": "﻿using System.Collections.Generic;\r\n\r\nnamespace System.Windows.Controls.Samples.DataVisualisation\r\n{\r\n    public class SampleDataVM\r\n    {\r\n        public Dictionary<string,int>  Data { get; private set; }\r\n\r\n        public SampleDataVM()\r\n        {\r\n            Data = new Dictionary<string, int>();\r\n\r\n            Data.Add(\"aaaa\", 10);\r\n            Data.Add(\"bbbb\", 60);\r\n            Data.Add(\"cccc\", 30);\r\n            Data.Add(\"dddd\", 40);\r\n            Data.Add(\"eeee\", 50);\r\n            Data.Add(\"ffff\", 80);\r\n            Data.Add(\"gggg\", 20);\r\n        }\r\n\r\n        public ObjectCollection Microsoft\r\n        {\r\n            get\r\n            {\r\n                ObjectCollection financialData = new ObjectCollection();\r\n                financialData.Add(new FinancialData { Date = new DateTime(2009, 2, 13), Open = 19.27, High = 19.47, Low = 19.04, Close = 19.09 });\r\n                financialData.Add(new FinancialData { Date = new DateTime(2009, 2, 12), Open = 18.97, High = 19.32, Low = 18.54, Close = 19.26 });\r\n                financialData.Add(new FinancialData { Date = new DateTime(2009, 2, 11), Open = 18.94, High = 19.49, Low = 18.92, Close = 19.21 });\r\n                financialData.Add(new FinancialData { Date = new DateTime(2009, 2, 10), Open = 19.25, High = 19.8, Low = 18.7, Close = 18.8 });\r\n                financialData.Add(new FinancialData { Date = new DateTime(2009, 2, 9), Open = 19.64, High = 19.77, Low = 19.26, Close = 19.44 });\r\n                financialData.Add(new FinancialData { Date = new DateTime(2009, 2, 6), Open = 19.16, High = 19.93, Low = 19.06, Close = 19.66 });\r\n                financialData.Add(new FinancialData { Date = new DateTime(2009, 2, 5), Open = 18.51, High = 19.14, Low = 18.25, Close = 19.04 });\r\n                financialData.Add(new FinancialData { Date = new DateTime(2009, 2, 4), Open = 18.54, High = 19, Low = 18.5, Close = 18.63 });\r\n                financialData.Add(new FinancialData { Date = new DateTime(2009, 2, 3), Open = 17.85, High = 18.61, Low = 17.6, Close = 18.5 });\r\n                financialData.Add(new FinancialData { Date = new DateTime(2009, 2, 2), Open = 17.03, High = 18.13, Low = 17, Close = 17.83 });\r\n                financialData.Add(new FinancialData { Date = new DateTime(2009, 1, 30), Open = 17.74, High = 17.79, Low = 17.1, Close = 17.1 });\r\n                financialData.Add(new FinancialData { Date = new DateTime(2009, 1, 29), Open = 17.78, High = 17.96, Low = 17.56, Close = 17.59 });\r\n                financialData.Add(new FinancialData { Date = new DateTime(2009, 1, 28), Open = 17.8, High = 18.31, Low = 17.76, Close = 18.04 });\r\n                financialData.Add(new FinancialData { Date = new DateTime(2009, 1, 27), Open = 17.78, High = 17.97, Low = 17.43, Close = 17.66 });\r\n                financialData.Add(new FinancialData { Date = new DateTime(2009, 1, 26), Open = 17.29, High = 17.81, Low = 17.23, Close = 17.63 });\r\n                financialData.Add(new FinancialData { Date = new DateTime(2009, 1, 23), Open = 16.97, High = 17.49, Low = 16.75, Close = 17.2 });\r\n                financialData.Add(new FinancialData { Date = new DateTime(2009, 1, 22), Open = 18.05, High = 18.18, Low = 17.07, Close = 17.11 });\r\n                financialData.Add(new FinancialData { Date = new DateTime(2009, 1, 21), Open = 18.87, High = 19.45, Low = 18.46, Close = 19.38 });\r\n                financialData.Add(new FinancialData { Date = new DateTime(2009, 1, 20), Open = 19.46, High = 19.62, Low = 18.37, Close = 18.48 });\r\n                financialData.Add(new FinancialData { Date = new DateTime(2009, 1, 16), Open = 19.63, High = 19.91, Low = 19.15, Close = 19.71 });\r\n                financialData.Add(new FinancialData { Date = new DateTime(2009, 1, 15), Open = 19.07, High = 19.3, Low = 18.52, Close = 19.24 });\r\n                return financialData;\r\n            }\r\n        }\r\n        public class FinancialData\r\n    {\r\n        public DateTime Date { get; set; }\r\n        public double Open { get; set; }\r\n        public double Close { get; set; }\r\n        public double High { get; set; }\r\n        public double Low { get; set; }\r\n        public double Volume { get; set; }\r\n        \r\n        public FinancialData()\r\n        { }      \r\n    }\r\n\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Samples/MainWindow.xaml",
    "content": "﻿<Window x:Class=\"System.Windows.Controls.Samples.MainWindow\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:samples=\"clr-namespace:System.Windows.Controls.Samples\"\r\n    xmlns:dataVisualisation=\"clr-namespace:System.Windows.Controls.Samples.DataVisualisation\"\r\n    xmlns:themes=\"clr-namespace:System.Windows.Controls.Samples.Themes\"\r\n    xmlns:treeMap=\"clr-namespace:System.Windows.Controls.Samples.TreeMap\"\r\n    xmlns:primitives=\"clr-namespace:System.Windows.Controls.Primitives;assembly=DotNetProjects.Layout.Toolkit\"\r\n    Title=\"Main Window\" Height=\"800\" Width=\"900\">\r\n    <Grid>\r\n        <TabControl>\r\n            <TabItem Header=\"TreeMap\">\r\n                <treeMap:TreeMapIntroduction />\r\n            </TabItem>\r\n            <TabItem Header=\"DataVisualisation\">\r\n                <dataVisualisation:DataVisualisationSample />\r\n            </TabItem>\r\n            <TabItem Header=\"Themes\">\r\n                <themes:ThemesExample />\r\n            </TabItem>\r\n            <TabItem Header=\"AutoCompleteBoxSample\">\r\n                <samples:AutoCompleteBoxSample />\r\n            </TabItem>\r\n            <TabItem Header=\"AutoCompleteComboBox\">\r\n                <samples:AutoCompleteComboBox />\r\n            </TabItem>\r\n            <TabItem Header=\"AutoCompleteLambda\">\r\n                <samples:AutoCompleteLambda />\r\n            </TabItem>\r\n            <TabItem Header=\"CustomEvents\">\r\n                <samples:CustomEvents />\r\n            </TabItem>\r\n            <TabItem Header=\"SearchSuggestionSample\">\r\n                <samples:SearchSuggestionSample />\r\n            </TabItem>\r\n            <TabItem Header=\"AccordionSample\">\r\n                <samples:AccordionSample />\r\n            </TabItem>\r\n            <TabItem Header=\"AccordionShowcase\">\r\n                <samples:AccordionShowcase />\r\n            </TabItem>\r\n            <TabItem Header=\"AccordionUsage\">\r\n                <samples:AccordionUsage />\r\n            </TabItem>\r\n            <TabItem Header=\"RatingSample\">\r\n                <samples:RatingSample />\r\n            </TabItem>\r\n            <TabItem Header=\"Issue#16\">\r\n                <Grid>\r\n                    <primitives:ExpandableContentControl Percentage=\"1\" RevealMode=\"Right\">\r\n                        <Button Width=\"300\" Height=\"300\">123</Button>\r\n                    </primitives:ExpandableContentControl>\r\n                </Grid>\r\n            </TabItem>\r\n        </TabControl>\r\n    </Grid>\r\n</Window>\r\n"
  },
  {
    "path": "WpfToolkit/Samples/MainWindow.xaml.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing System.Windows.Documents;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Imaging;\r\nusing System.Windows.Navigation;\r\nusing System.Windows.Shapes;\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    /// <summary>\r\n    /// Interaction logic for MainWindow.xaml\r\n    /// </summary>\r\n    public partial class MainWindow : Window\r\n    {\r\n        public MainWindow()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Samples/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Windows;\r\n\r\n[assembly: ThemeInfo(\r\n    ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located\r\n    //(used if a resource is not found in the page, \r\n    // or application resource dictionaries)\r\n    ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located\r\n    //(used if a resource is not found in the page, \r\n    // app, or any theme specific resource dictionaries)\r\n)]\r\n"
  },
  {
    "path": "WpfToolkit/Samples/Properties/Resources.Designer.cs",
    "content": "﻿//------------------------------------------------------------------------------\r\n// <auto-generated>\r\n//     This code was generated by a tool.\r\n//     Runtime Version:4.0.30319.18213\r\n//\r\n//     Changes to this file may cause incorrect behavior and will be lost if\r\n//     the code is regenerated.\r\n// </auto-generated>\r\n//------------------------------------------------------------------------------\r\n\r\nnamespace System.Windows.Controls.Samples.Properties {\r\n    using System;\r\n    \r\n    \r\n    /// <summary>\r\n    ///   A strongly-typed resource class, for looking up localized strings, etc.\r\n    /// </summary>\r\n    // This class was auto-generated by the StronglyTypedResourceBuilder\r\n    // class via a tool like ResGen or Visual Studio.\r\n    // To add or remove a member, edit your .ResX file then rerun ResGen\r\n    // with the /str option, or rebuild your VS project.\r\n    [global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Resources.Tools.StronglyTypedResourceBuilder\", \"4.0.0.0\")]\r\n    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r\n    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\r\n    internal class Resources {\r\n        \r\n        private static global::System.Resources.ResourceManager resourceMan;\r\n        \r\n        private static global::System.Globalization.CultureInfo resourceCulture;\r\n        \r\n        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\")]\r\n        internal Resources() {\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Returns the cached ResourceManager instance used by this class.\r\n        /// </summary>\r\n        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\r\n        internal static global::System.Resources.ResourceManager ResourceManager {\r\n            get {\r\n                if (object.ReferenceEquals(resourceMan, null)) {\r\n                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager(\"System.Windows.Controls.Samples.Properties.Resources\", typeof(Resources).Assembly);\r\n                    resourceMan = temp;\r\n                }\r\n                return resourceMan;\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Overrides the current thread's CurrentUICulture property for all\r\n        ///   resource lookups using this strongly typed resource class.\r\n        /// </summary>\r\n        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\r\n        internal static global::System.Globalization.CultureInfo Culture {\r\n            get {\r\n                return resourceCulture;\r\n            }\r\n            set {\r\n                resourceCulture = value;\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Samples/Properties/Resources.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n  <!-- \r\n    Microsoft ResX Schema \r\n    \r\n    Version 2.0\r\n    \r\n    The primary goals of this format is to allow a simple XML format \r\n    that is mostly human readable. The generation and parsing of the \r\n    various data types are done through the TypeConverter classes \r\n    associated with the data types.\r\n    \r\n    Example:\r\n    \r\n    ... ado.net/XML headers & schema ...\r\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\r\n    <resheader name=\"version\">2.0</resheader>\r\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\r\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\r\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\r\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\r\n    </data>\r\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\r\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r\n        <comment>This is a comment</comment>\r\n    </data>\r\n                \r\n    There are any number of \"resheader\" rows that contain simple \r\n    name/value pairs.\r\n    \r\n    Each data row contains a name, and value. The row also contains a \r\n    type or mimetype. Type corresponds to a .NET class that support \r\n    text/value conversion through the TypeConverter architecture. \r\n    Classes that don't support this are serialized and stored with the \r\n    mimetype set.\r\n    \r\n    The mimetype is used for serialized objects, and tells the \r\n    ResXResourceReader how to depersist the object. This is currently not \r\n    extensible. For a given mimetype the value must be set accordingly:\r\n    \r\n    Note - application/x-microsoft.net.object.binary.base64 is the format \r\n    that the ResXResourceWriter will generate, however the reader can \r\n    read any of the formats listed below.\r\n    \r\n    mimetype: application/x-microsoft.net.object.binary.base64\r\n    value   : The object must be serialized with \r\n            : System.Serialization.Formatters.Binary.BinaryFormatter\r\n            : and then encoded with base64 encoding.\r\n    \r\n    mimetype: application/x-microsoft.net.object.soap.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r\n            : and then encoded with base64 encoding.\r\n\r\n    mimetype: application/x-microsoft.net.object.bytearray.base64\r\n    value   : The object must be serialized into a byte array \r\n            : using a System.ComponentModel.TypeConverter\r\n            : and then encoded with base64 encoding.\r\n    -->\r\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\r\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\r\n      <xsd:complexType>\r\n        <xsd:choice maxOccurs=\"unbounded\">\r\n          <xsd:element name=\"metadata\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"assembly\">\r\n            <xsd:complexType>\r\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"data\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" msdata:Ordinal=\"1\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"resheader\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n        </xsd:choice>\r\n      </xsd:complexType>\r\n    </xsd:element>\r\n  </xsd:schema>\r\n  <resheader name=\"resmimetype\">\r\n    <value>text/microsoft-resx</value>\r\n  </resheader>\r\n  <resheader name=\"version\">\r\n    <value>2.0</value>\r\n  </resheader>\r\n  <resheader name=\"reader\">\r\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <resheader name=\"writer\">\r\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n</root>"
  },
  {
    "path": "WpfToolkit/Samples/Properties/Settings.Designer.cs",
    "content": "﻿//------------------------------------------------------------------------------\r\n// <auto-generated>\r\n//     This code was generated by a tool.\r\n//     Runtime Version:4.0.30319.18213\r\n//\r\n//     Changes to this file may cause incorrect behavior and will be lost if\r\n//     the code is regenerated.\r\n// </auto-generated>\r\n//------------------------------------------------------------------------------\r\n\r\nnamespace System.Windows.Controls.Samples.Properties {\r\n    \r\n    \r\n    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\r\n    [global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator\", \"11.0.0.0\")]\r\n    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {\r\n        \r\n        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));\r\n        \r\n        public static Settings Default {\r\n            get {\r\n                return defaultInstance;\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Samples/Properties/Settings.settings",
    "content": "﻿<?xml version='1.0' encoding='utf-8'?>\r\n<SettingsFile xmlns=\"uri:settings\" CurrentProfile=\"(Default)\">\r\n  <Profiles>\r\n    <Profile Name=\"(Default)\" />\r\n  </Profiles>\r\n  <Settings />\r\n</SettingsFile>"
  },
  {
    "path": "WpfToolkit/Samples/Rating/RatingSample.xaml",
    "content": "﻿<!--\r\n// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n-->\r\n\r\n<UserControl\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" \r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"    \r\n    xmlns:inputToolkit=\"clr-namespace:System.Windows.Controls;assembly=DotNetProjects.Input.Toolkit\"\r\n    xmlns:inputToolkitPrimitives=\"clr-namespace:System.Windows.Controls.Primitives;assembly=DotNetProjects.Input.Toolkit\"\r\n    x:Class=\"System.Windows.Controls.Samples.RatingSample\">\r\n    \r\n    <UserControl.Resources>\r\n        <Style x:Key=\"RatingItemNetflixStyle\" TargetType=\"inputToolkit:RatingItem\">\r\n            <Setter Property=\"BorderBrush\" Value=\"#FF545454\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"inputToolkit:RatingItem\">\r\n                        <Grid Height=\"20\" Width=\"20\" Background=\"{TemplateBinding Background}\">\r\n                            <VisualStateManager.VisualStateGroups>\r\n                                <VisualStateGroup x:Name=\"CommonStates\">\r\n                                    <VisualState x:Name=\"Normal\"/>\r\n                                    <VisualState x:Name=\"MouseOver\">\r\n                                        <Storyboard>\r\n                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"MouseOverRatingItem\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                            </DoubleAnimationUsingKeyFrames>\r\n                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"MouseOverHighlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.36\"/>\r\n                                            </DoubleAnimationUsingKeyFrames>\r\n                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"MouseOverHighlight\" Storyboard.TargetProperty=\"(Shape.Fill).(SolidColorBrush.Color)\">\r\n                                                <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#FFFFFFFF\"/>\r\n                                            </ColorAnimationUsingKeyFrames>\r\n                                            <DoubleAnimationUsingKeyFrames  Storyboard.TargetName=\"MouseOverRatingItem\" Storyboard.TargetProperty=\"(UIElement.Effect).(DropShadowEffect.BlurRadius)\">\r\n                                                <DiscreteDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"4\" />\r\n                                            </DoubleAnimationUsingKeyFrames>\r\n                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"MouseOverRatingItem\" Storyboard.TargetProperty=\"(UIElement.Effect).(DropShadowEffect.ShadowDepth)\">\r\n                                                <DiscreteDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n                                            </DoubleAnimationUsingKeyFrames>\r\n                                            <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"MouseOverRatingItem\" Storyboard.TargetProperty=\"(UIElement.Effect).(DropShadowEffect.Color)\">\r\n                                                <DiscreteColorKeyFrame KeyTime=\"00:00:00\" Value=\"#FF3A3A3A\" />\r\n                                            </ColorAnimationUsingKeyFrames>\r\n                                        </Storyboard>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"Pressed\">\r\n                                        <Storyboard/>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"Disabled\"/>\r\n                                    <VisualState x:Name=\"ReadOnly\"/>\r\n                                </VisualStateGroup>\r\n                                <VisualStateGroup x:Name=\"FocusStates\">\r\n                                    <VisualState x:Name=\"Focused\">\r\n                                        <Storyboard/>\r\n                                    </VisualState>\r\n                                    <VisualState x:Name=\"Unfocused\"/>\r\n                                </VisualStateGroup>\r\n                                <VisualStateGroup x:Name=\"FillStates\">\r\n                                    <VisualState x:Name=\"Empty\"/>\r\n                                    <VisualState x:Name=\"Partial\"/>\r\n                                    <VisualState x:Name=\"Filled\"/>\r\n                                </VisualStateGroup>\r\n                            </VisualStateManager.VisualStateGroups>\r\n                            <Border Background=\"#02FFFFFF\" BorderThickness=\"0\"/>\r\n                            <Path x:Name=\"DefaultRatingItem\" Fill=\"White\" Stretch=\"Fill\" StrokeLineJoin=\"Round\" StrokeThickness=\"0.6\" VerticalAlignment=\"Stretch\" Opacity=\"1\" Data=\"M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z\" Stroke=\"#FF969696\">\r\n                                <Path.Effect>\r\n                                    <DropShadowEffect Color=\"#FFC4C4C4\" ShadowDepth=\"1\"/>\r\n                                </Path.Effect>\r\n                            </Path>\r\n                            <inputToolkitPrimitives:LinearClipper RatioVisible=\"{TemplateBinding DisplayValue}\" ExpandDirection=\"Right\">\r\n                                <Path Fill=\"{TemplateBinding Foreground}\" Stretch=\"Fill\" Stroke=\"{x:Null}\" StrokeLineJoin=\"Round\" VerticalAlignment=\"Stretch\" Opacity=\"1\" Data=\"M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z\"/>\r\n                            </inputToolkitPrimitives:LinearClipper>\r\n                            <Path x:Name=\"MouseOverRatingItem\" Stretch=\"Fill\" Stroke=\"{x:Null}\" StrokeLineJoin=\"Round\" VerticalAlignment=\"Stretch\" Data=\"M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z\" Fill=\"#FFFFCB00\" Opacity=\"0\">\r\n                                <Path.Effect>\r\n                                    <DropShadowEffect/>\r\n                                </Path.Effect>\r\n                            </Path>\r\n                            <Path x:Name=\"MouseOverHighlight\" Fill=\"#FFFFFFFF\" Stretch=\"Fill\" Stroke=\"{x:Null}\" StrokeLineJoin=\"Round\" VerticalAlignment=\"Stretch\" Opacity=\"0\" Data=\"M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z\"/>\r\n                            <Path x:Name=\"FocusRatingItem\" Stretch=\"Fill\" Stroke=\"#FF6DBDD1\" StrokeLineJoin=\"Round\" StrokeThickness=\"0.01\" VerticalAlignment=\"Stretch\" Opacity=\"0\" Data=\"M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z\"/>\r\n                            <ContentPresenter x:Name=\"Content\" Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"Left\" Margin=\"{TemplateBinding Padding}\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n    </UserControl.Resources>\r\n      \r\n    <StackPanel>\r\n    \r\n        <!-- Default Style -->\r\n        <ContentControl Content=\"Default Style\" Style=\"{StaticResource Header}\" />\r\n        <inputToolkit:Rating x:Name=\"rating\"  Value=\"0.65\" ItemCount=\"5\" HorizontalAlignment=\"Left\">\r\n            <inputToolkit:Rating.ItemsPanel>\r\n                <ItemsPanelTemplate>\r\n                    <StackPanel Orientation=\"Horizontal\" VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\"/>\r\n                </ItemsPanelTemplate>\r\n            </inputToolkit:Rating.ItemsPanel>\r\n        </inputToolkit:Rating>\r\n        <Slider Minimum=\"0\" Maximum=\"1\" SmallChange=\"0.1\" Margin=\"0,2,0,0\" Value=\"{Binding Path=Value, ElementName=rating, Mode=TwoWay}\" HorizontalAlignment=\"Left\" Width=\"148\"/>\r\n        \r\n        <!-- CONTENT TO ADD BACK -->\r\n        \r\n        \r\n        <!-- NetFlix Style Sample -->\r\n        <ContentControl Content=\"NetFlix Style\" Style=\"{StaticResource Header}\" />\r\n        <Border Width=\"164\" Padding=\"2\" BorderBrush=\"#FFB30000\" BorderThickness=\"1\" Margin=\"0,2,0,0\">\r\n            <StackPanel Orientation=\"Vertical\" Margin=\"0\">\r\n                <Button Margin=\"0\" Content=\"Casablanca\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Foreground=\"#FF0F5A9B\"/>\r\n                <Image Source=\"Images/Casablanca.jpg\" Height=\"191\" Margin=\"9,0\"/>\r\n                <inputToolkit:Rating x:Name=\"netflix\" Value=\"0.65\" ItemCount=\"5\" ItemContainerStyle=\"{StaticResource RatingItemNetflixStyle}\"  HorizontalAlignment=\"Center\" BorderBrush=\"Black\">\r\n                    <inputToolkit:Rating.Foreground>\r\n                        <RadialGradientBrush Center=\"0.449000000953674,0.128000006079674\" GradientOrigin=\"0.646000027656555,-1.17299997806549\" RadiusX=\"-0.74299997091293335\" RadiusY=\"0.37799999117851257\">\r\n                            <GradientStop Color=\"#FFF70202\" Offset=\"0.989\"/>\r\n                            <GradientStop Color=\"#FFF62C2C\" Offset=\"0.817\"/>\r\n                            <GradientStop Color=\"#FFF60202\" Offset=\"0.005\"/>\r\n                            <GradientStop Color=\"#FFFFA043\" Offset=\"0.934\"/>\r\n                        </RadialGradientBrush>\r\n                    </inputToolkit:Rating.Foreground>\r\n                </inputToolkit:Rating>\r\n                <Button Click=\"Button_Click\"  Height=\"14\" HorizontalAlignment=\"Center\" Margin=\"0,5,0,0\" VerticalAlignment=\"Center\" FontSize=\"8\" Foreground=\"#FF484848\" Padding=\"3,1,3,3\">\r\n                    <StackPanel Orientation=\"Horizontal\">\r\n                        <Path Stretch=\"Fill\" StrokeThickness=\"0.1\" StrokeLineJoin=\"Round\" Stroke=\"#FF000000\" Fill=\"Red\" Data=\"F1 M 328.514,227.5C 336.47,227.5 342.919,233.768 342.919,241.5C 342.919,249.232 336.47,255.5 328.514,255.5C 320.559,255.5 314.11,249.232 314.11,241.5C 314.11,233.768 320.559,227.5 328.514,227.5 Z M 328.514,229.862C 321.902,229.862 316.541,235.073 316.541,241.5C 316.541,244.397 317.63,247.047 319.432,249.084L 336.056,232.461C 333.997,230.836 331.373,229.862 328.514,229.862 Z M 328.514,253.138C 335.127,253.138 340.488,247.927 340.488,241.5C 340.488,238.603 339.399,235.953 337.597,233.916L 320.973,250.54C 323.031,252.164 325.656,253.138 328.514,253.138 Z \" Height=\"8.1\" HorizontalAlignment=\"Center\" Width=\"8.333\" VerticalAlignment=\"Center\" Margin=\"0,1,3,0\"/>\r\n                        <TextBlock Height=\"23\" Text=\"Not Interested\" TextWrapping=\"Wrap\" />\r\n                    </StackPanel>\r\n                </Button>\r\n            </StackPanel>\r\n        </Border>\r\n\r\n    </StackPanel>\r\n</UserControl>\r\n"
  },
  {
    "path": "WpfToolkit/Samples/Rating/RatingSample.xaml.cs",
    "content": "﻿// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993] for details.\r\n// All other rights reserved.\r\n\r\nusing System.ComponentModel;\r\nusing System.Diagnostics.CodeAnalysis;\r\nusing System.Globalization;\r\nusing System.Windows.Media;\r\n\r\nnamespace System.Windows.Controls.Samples\r\n{\r\n    /// <summary>\r\n    /// A class that demonstrates the Rating control.\r\n    /// </summary>\r\n#if SILVERLIGHT\r\n    [Sample(\"(0)Rating\", DifficultyLevel.Basic)]\r\n#endif\r\n    [Category(\"Rating\")]\r\n    public partial class RatingSample : UserControl\r\n    {\r\n        /// <summary>\r\n        /// Initializes a new instance of the RatingSample class.\r\n        /// </summary>\r\n        public RatingSample()\r\n        {\r\n            InitializeComponent();\r\n            netflix.ValueChanged += Netflix_ValueChanged;\r\n        } \r\n\r\n        /// <summary>\r\n        /// Changes the foreground of the rating control to yellow.\r\n        /// </summary>\r\n         /// <param name=\"sender\">Sender Rating.</param>\r\n        /// <param name=\"e\">Event args.</param>\r\n        private void Netflix_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double?> e)\r\n        {\r\n            netflix.Foreground = new SolidColorBrush(Color.FromArgb(255, 255, 203, 0));\r\n        }\r\n\r\n        /// <summary>\r\n        ///  Set the value of the rating control to 0.\r\n        /// </summary>\r\n        /// <param name=\"sender\">Sender Button.</param>\r\n        /// <param name=\"e\">Event args.</param>\r\n        [SuppressMessage(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\", Justification = \"Method is called in XAML.\")]\r\n        private void Button_Click(object sender, RoutedEventArgs e)\r\n        {\r\n            netflix.Value = 0;\r\n        }\r\n    }\r\n}"
  },
  {
    "path": "WpfToolkit/Samples/Themes/ThemesExample.xaml",
    "content": "﻿<UserControl x:Class=\"System.Windows.Controls.Samples.Themes.ThemesExample\"\r\n             xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n             xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n             xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" \r\n             xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n             xmlns:themes=\"http://schemas.rudigrobler.net/wpfthemes\"\r\n             xmlns:controls=\"clr-namespace:System.Windows.Controls;assembly=DotNetProjects.Input.Toolkit\"\r\n             mc:Ignorable=\"d\" \r\n             d:DesignHeight=\"600\" d:DesignWidth=\"300\">\r\n    <Grid>\r\n        <ComboBox Margin=\"10,10,10,0\" VerticalAlignment=\"Top\" Height=\"20\"\r\n                  ItemsSource=\"{Binding Source={x:Static themes:ThemeManager.Themes}}\"\r\n                  SelectionChanged=\"ComboBox_SelectionChanged\"/>\r\n        <GroupBox Header=\"Examples\" Margin=\"10,37,10,10\">\r\n            <StackPanel>\r\n                <CheckBox Content=\"CheckBox\" HorizontalAlignment=\"Left\" Margin=\"10\" VerticalAlignment=\"Top\"/>\r\n                <Button Content=\"Button\" HorizontalAlignment=\"Left\" Margin=\"10\" VerticalAlignment=\"Top\" Width=\"75\"/>\r\n                <RadioButton Content=\"RadioButton\" HorizontalAlignment=\"Left\" Margin=\"10\" VerticalAlignment=\"Top\"/>\r\n                <ProgressBar HorizontalAlignment=\"Left\" Height=\"20\" Margin=\"10\" VerticalAlignment=\"Top\" Width=\"160\"/>\r\n                <TextBox HorizontalAlignment=\"Left\" Height=\"23\" Margin=\"10\" TextWrapping=\"Wrap\" Text=\"TextBox\" VerticalAlignment=\"Top\" Width=\"120\"/>\r\n                <CheckBox Margin=\"10\" Style=\"{DynamicResource CheckBoxSwitcher}\" Content=\"Test\"/>\r\n                <CheckBox Margin=\"10\" Width=\"150\" Height=\"20\" Style=\"{DynamicResource CheckToogleButton}\" Content=\"Test\" HorizontalAlignment=\"Left\"/>\r\n                <Slider Margin=\"10\" />\r\n                <controls:Rating Margin=\"10\" Height=\"20\" />\r\n                <ListBox Margin=\"10\">\r\n                    <TextBlock Text=\"AAAA\" />\r\n                    <TextBlock Text=\"BBBB\" />\r\n                </ListBox>\r\n                <DataGrid Margin=\"10\" Height=\"100\">\r\n                    <DataGrid.Columns>\r\n                        <DataGridTextColumn Header=\"AAAA\" />\r\n                        <DataGridCheckBoxColumn Header=\"BBBB\" />\r\n                    </DataGrid.Columns>\r\n                </DataGrid>\r\n            </StackPanel>\r\n        </GroupBox>\r\n\r\n    </Grid>\r\n</UserControl>\r\n"
  },
  {
    "path": "WpfToolkit/Samples/Themes/ThemesExample.xaml.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\nusing System.Windows.Data;\r\nusing System.Windows.Documents;\r\nusing System.Windows.Input;\r\nusing System.Windows.Media;\r\nusing System.Windows.Media.Imaging;\r\nusing System.Windows.Navigation;\r\nusing System.Windows.Shapes;\r\nusing WPF.Themes;\r\n\r\nnamespace System.Windows.Controls.Samples.Themes\r\n{\r\n    /// <summary>\r\n    /// Interaction logic for ThemesExample.xaml\r\n    /// </summary>\r\n    public partial class ThemesExample : UserControl\r\n    {\r\n        public ThemesExample()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n\r\n        private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)\r\n        {\r\n            if (e.AddedItems.Count > 0)\r\n            {\r\n                string theme = e.AddedItems[0].ToString();\r\n\r\n                // Application Level\r\n                Application.Current.ApplyTheme(theme);\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Samples/TreeMap/BlogPost.cs",
    "content": "﻿using System.Collections.Generic;\r\nusing System.Linq;\r\n\r\nnamespace System.Windows.Controls.Samples.TreeMap\r\n{\r\n    public class BlogPost\r\n    {\r\n        public string Title { get; set; }\r\n        public DateTime Date { get; set; }\r\n        public int Length { get; set; }\r\n        public double Popularity { get; set; }\r\n        public IEnumerable<string> Tags { get; set; }\r\n\r\n        public string ShortTitle\r\n        {\r\n            get { return Title.Split('[').First(); }\r\n        }\r\n        public string FormattedDate\r\n        {\r\n            get { return Date.ToShortDateString(); }\r\n        }\r\n        public double FormattedPopularity\r\n        {\r\n            get { return Math.Round(Popularity, 2); }\r\n        }\r\n        public string FormattedTags\r\n        {\r\n            get { return \"{\" + string.Join(\", \", Tags.ToArray()) + \"}\"; }\r\n        }\r\n    }\r\n\r\n    public class BlogTag\r\n    {\r\n        public string Tag { get; set; }\r\n        public IEnumerable<BlogPost> Posts { get; set; }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Samples/TreeMap/TreeMapIntroduction.xaml",
    "content": "﻿<UserControl x:Class=\"System.Windows.Controls.Samples.TreeMap.TreeMapIntroduction\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:datavis=\"clr-namespace:System.Windows.Controls.DataVisualization;assembly=DotNetProjects.DataVisualization.Toolkit\"\r\n    xmlns:treeMap=\"clr-namespace:System.Windows.Controls.Samples.TreeMap\">\r\n    <Grid>\r\n        <Grid.ColumnDefinitions>\r\n            <ColumnDefinition/>\r\n            <ColumnDefinition/>\r\n        </Grid.ColumnDefinitions>\r\n        <Grid.RowDefinitions>\r\n            <RowDefinition/>\r\n            <RowDefinition/>\r\n            <RowDefinition/>\r\n        </Grid.RowDefinitions>\r\n        <Grid.Resources>\r\n            <Style x:Key=\"ContainerStyle\" TargetType=\"Panel\">\r\n                <Setter Property=\"Margin\" Value=\"8\"/>\r\n            </Style>\r\n            <Style x:Key=\"TitleStyle\" TargetType=\"TextBlock\">\r\n                <Setter Property=\"HorizontalAlignment\" Value=\"Center\"/>\r\n                <Setter Property=\"FontSize\" Value=\"14\"/>\r\n                <Setter Property=\"FontWeight\" Value=\"Bold\"/>\r\n            </Style>\r\n            <LinearGradientBrush x:Key=\"GradientOverlay\">\r\n                <GradientStop Color=\"#55ffffff\" Offset=\"0\"/>\r\n                <GradientStop Color=\"#00ffffff\" Offset=\"1\"/>\r\n            </LinearGradientBrush>\r\n        </Grid.Resources>\r\n\r\n        <!-- Simple visualization of one variable -->\r\n        <treeMap:DockPanel\r\n            Grid.Column=\"0\"\r\n            Grid.Row=\"0\"\r\n            Style=\"{StaticResource ContainerStyle}\">\r\n            <TextBlock\r\n                treeMap:DockPanel.Dock=\"Top\"\r\n                Text=\"All Posts by Popularity\"\r\n                Style=\"{StaticResource TitleStyle}\"/>\r\n            <datavis:TreeMap\r\n                x:Name=\"AllPosts\"\r\n                ItemsSource=\"{Binding}\">\r\n                <datavis:TreeMap.ItemDefinition>\r\n                    <datavis:TreeMapItemDefinition\r\n                        ValueBinding=\"{Binding Popularity}\">\r\n                        <DataTemplate>\r\n                            <Grid>\r\n                                <Border\r\n                                    BorderBrush=\"Black\"\r\n                                    BorderThickness=\"1\"\r\n                                    Background=\"#ff7fc3ff\"\r\n                                    Margin=\"0 0 1 1\">\r\n                                    <Grid Background=\"{StaticResource GradientOverlay}\">\r\n                                        <treeMap:Viewbox Margin=\"3 0 3 0\">\r\n                                            <TextBlock Text=\"{Binding FormattedDate}\"/>\r\n                                        </treeMap:Viewbox>\r\n                                    </Grid>\r\n                                    <ToolTipService.ToolTip>\r\n                                        <StackPanel>\r\n                                            <TextBlock Text=\"{Binding Title}\"/>\r\n                                            <TextBlock Text=\"{Binding FormattedTags}\" FontStyle=\"Italic\"/>\r\n                                            <TextBlock Text=\"{Binding FormattedDate}\"/>\r\n                                        </StackPanel>\r\n                                    </ToolTipService.ToolTip>\r\n                                </Border>\r\n                            </Grid>\r\n                        </DataTemplate>\r\n                    </datavis:TreeMapItemDefinition>\r\n                </datavis:TreeMap.ItemDefinition>\r\n            </datavis:TreeMap>\r\n        </treeMap:DockPanel>\r\n\r\n        <!-- Visualization of two variables -->\r\n        <treeMap:DockPanel\r\n            Grid.Column=\"1\"\r\n            Grid.Row=\"0\"\r\n            Style=\"{StaticResource ContainerStyle}\">\r\n            <TextBlock\r\n                treeMap:DockPanel.Dock=\"Top\"\r\n                Text=\"10 Latest Posts by Popularity/Length\"\r\n                Style=\"{StaticResource TitleStyle}\"/>\r\n            <datavis:TreeMap\r\n                x:Name=\"RecentPosts\"\r\n                ItemsSource=\"{Binding}\">\r\n                <datavis:TreeMap.Interpolators>\r\n                    <datavis:SolidColorBrushInterpolator\r\n                        TargetName=\"Border\"\r\n                        TargetProperty=\"Background\"\r\n                        DataRangeBinding=\"{Binding Length}\"\r\n                        From=\"#ffeeeeff\"\r\n                        To=\"#ff8080ff\"/>\r\n                </datavis:TreeMap.Interpolators>\r\n                <datavis:TreeMap.ItemDefinition>\r\n                    <datavis:TreeMapItemDefinition\r\n                        ValueBinding=\"{Binding Popularity}\">\r\n                        <DataTemplate>\r\n                            <Grid>\r\n                                <Border\r\n                                    x:Name=\"Border\"\r\n                                    BorderBrush=\"Black\"\r\n                                    BorderThickness=\"1\"\r\n                                    Margin=\"0 0 1 1\">\r\n                                    <Grid Background=\"{StaticResource GradientOverlay}\">\r\n                                        <TextBlock\r\n                                            Text=\"{Binding ShortTitle}\"\r\n                                            TextWrapping=\"Wrap\"\r\n                                            FontSize=\"10\"\r\n                                            VerticalAlignment=\"Center\"\r\n                                            Margin=\"2\"/>\r\n                                    </Grid>\r\n                                    <ToolTipService.ToolTip>\r\n                                        <StackPanel>\r\n                                            <TextBlock Text=\"{Binding Title}\"/>\r\n                                            <TextBlock Text=\"{Binding FormattedTags}\" FontStyle=\"Italic\"/>\r\n                                            <StackPanel Orientation=\"Horizontal\">\r\n                                                <TextBlock Text=\"{Binding Length}\"/>\r\n                                                <TextBlock Text=\" characters\"/>\r\n                                            </StackPanel>\r\n                                            <TextBlock Text=\"{Binding FormattedDate}\"/>\r\n                                        </StackPanel>\r\n                                    </ToolTipService.ToolTip>\r\n                                </Border>\r\n                            </Grid>\r\n                        </DataTemplate>\r\n                    </datavis:TreeMapItemDefinition>\r\n                </datavis:TreeMap.ItemDefinition>\r\n            </datavis:TreeMap>\r\n        </treeMap:DockPanel>\r\n\r\n        <!-- Visualization of a Linq-aggregated variable -->\r\n        <treeMap:DockPanel\r\n            Grid.Column=\"0\"\r\n            Grid.Row=\"1\"\r\n            Style=\"{StaticResource ContainerStyle}\">\r\n            <TextBlock\r\n                treeMap:DockPanel.Dock=\"Top\"\r\n                Text=\"Tags by Number of Posts\"\r\n                Style=\"{StaticResource TitleStyle}\"/>\r\n            <datavis:TreeMap\r\n                x:Name=\"ByTag\"\r\n                ItemsSource=\"{Binding}\">\r\n                <datavis:TreeMap.ItemDefinition>\r\n                    <datavis:TreeMapItemDefinition\r\n                        ValueBinding=\"{Binding Posts.Length}\">\r\n                        <DataTemplate>\r\n                            <Border\r\n                                Background=\"#ff90f070\"\r\n                                BorderBrush=\"Black\"\r\n                                BorderThickness=\"1\">\r\n                                <Grid Background=\"{StaticResource GradientOverlay}\">\r\n                                    <Grid\r\n                                        HorizontalAlignment=\"Center\"\r\n                                        VerticalAlignment=\"Center\">\r\n                                        <TextBlock Text=\"{Binding Tag}\" FontStyle=\"Italic\"/>\r\n                                    </Grid>\r\n                                </Grid>\r\n                                <ToolTipService.ToolTip>\r\n                                    <StackPanel Orientation=\"Horizontal\">\r\n                                        <TextBlock Text=\"{Binding Tag}\"/>\r\n                                        <TextBlock Text=\": \"/>\r\n                                        <TextBlock Text=\"{Binding Posts.Length}\"/>\r\n                                        <TextBlock Text=\" posts\"/>\r\n                                    </StackPanel>\r\n                                </ToolTipService.ToolTip>\r\n                            </Border>\r\n                        </DataTemplate>\r\n                    </datavis:TreeMapItemDefinition>\r\n                </datavis:TreeMap.ItemDefinition>\r\n            </datavis:TreeMap>\r\n        </treeMap:DockPanel>\r\n\r\n        <!-- Visualization of aggregated data and sub-TreeMaps -->\r\n        <treeMap:DockPanel\r\n            Grid.Column=\"1\"\r\n            Grid.Row=\"1\"\r\n            Style=\"{StaticResource ContainerStyle}\">\r\n            <TextBlock\r\n                treeMap:DockPanel.Dock=\"Top\"\r\n                Text=\"Tags by Number of Posts/Popularity\"\r\n                Style=\"{StaticResource TitleStyle}\"/>\r\n            <datavis:TreeMap\r\n                x:Name=\"ByTagDetailed\"\r\n                ItemsSource=\"{Binding}\"\r\n                BorderBrush=\"Black\"\r\n                BorderThickness=\"0 0 2 2\">\r\n                <datavis:TreeMap.ItemDefinition>\r\n                    <datavis:TreeMapItemDefinition\r\n                        ValueBinding=\"{Binding Posts.Length}\">\r\n                        <DataTemplate>\r\n                            <Border\r\n                                BorderBrush=\"Black\"\r\n                                BorderThickness=\"2 2 0 0\"\r\n                                Canvas.ZIndex=\"1\">\r\n                                <Grid>\r\n                                    <datavis:TreeMap\r\n                                        ItemsSource=\"{Binding Posts}\">\r\n                                        <datavis:TreeMap.ItemDefinition>\r\n                                            <datavis:TreeMapItemDefinition\r\n                                                ValueBinding=\"{Binding Popularity}\">\r\n                                                <DataTemplate>\r\n                                                    <Border\r\n                                                        BorderBrush=\"Gray\"\r\n                                                        BorderThickness=\"1 1 0 0\"\r\n                                                        Background=\"#ffefb028\"\r\n                                                        ToolTipService.ToolTip=\"{Binding Title}\">\r\n                                                        <Grid Background=\"{StaticResource GradientOverlay}\">\r\n                                                            <treeMap:Viewbox Margin=\"3 0 3 0\">\r\n                                                                <TextBlock\r\n                                                                    Text=\"{Binding FormattedDate}\"\r\n                                                                    FontFamily=\"Arial\"/>\r\n                                                            </treeMap:Viewbox>\r\n                                                        </Grid>\r\n                                                    </Border>\r\n                                                </DataTemplate>\r\n                                            </datavis:TreeMapItemDefinition>\r\n                                        </datavis:TreeMap.ItemDefinition>\r\n                                    </datavis:TreeMap>\r\n                                    <Border\r\n                                        Background=\"#c0ffffff\"\r\n                                        CornerRadius=\"5\"\r\n                                        HorizontalAlignment=\"Center\"\r\n                                        VerticalAlignment=\"Center\">\r\n                                        <TextBlock\r\n                                            Text=\"{Binding Tag}\"\r\n                                            FontSize=\"18\"\r\n                                            FontStyle=\"Italic\"\r\n                                            FontWeight=\"Bold\"\r\n                                            FontFamily=\"Arial\"\r\n                                            Margin=\"3\"\r\n                                            ToolTipService.ToolTip=\"{Binding Tag}\"/>\r\n                                    </Border>\r\n                                </Grid>\r\n                            </Border>\r\n                        </DataTemplate>\r\n                    </datavis:TreeMapItemDefinition>\r\n                </datavis:TreeMap.ItemDefinition>\r\n            </datavis:TreeMap>\r\n        </treeMap:DockPanel>\r\n\r\n        <treeMap:DockPanel\r\n            Grid.Column=\"0\"\r\n            Grid.Row=\"2\"\r\n            Style=\"{StaticResource ContainerStyle}\">\r\n            <TextBlock\r\n                treeMap:DockPanel.Dock=\"Top\"\r\n                Text=\"10 Latest Posts by Popularity/Length\"\r\n                Style=\"{StaticResource TitleStyle}\"/>\r\n            <datavis:TreeMap\r\n                x:Name=\"RecentPosts2\"\r\n                ItemsSource=\"{Binding}\">\r\n                <datavis:TreeMap.Interpolators>\r\n                    <datavis:HSLSolidColorBrushInterpolator\r\n                        TargetName=\"Border\"\r\n                        TargetProperty=\"Background\"\r\n                        DataRangeBinding=\"{Binding Length}\"\r\n                        From=\"Green\"\r\n                        To=\"Red\"/>                    \r\n                </datavis:TreeMap.Interpolators>\r\n                <datavis:TreeMap.ItemDefinition>\r\n                    <datavis:TreeMapItemDefinition\r\n                        ValueBinding=\"{Binding Popularity}\">\r\n                        <DataTemplate>\r\n                            <Grid>\r\n                                <Border\r\n                                    x:Name=\"Border\"\r\n                                    BorderBrush=\"Black\"\r\n                                    BorderThickness=\"1\"\r\n                                    Margin=\"0 0 1 1\">\r\n                                    <Grid Background=\"{StaticResource GradientOverlay}\">\r\n                                        <TextBlock\r\n                                            Text=\"{Binding ShortTitle}\"\r\n                                            TextWrapping=\"Wrap\"\r\n                                            FontSize=\"10\"\r\n                                            VerticalAlignment=\"Center\"\r\n                                            Margin=\"2\"/>\r\n                                    </Grid>\r\n                                    <ToolTipService.ToolTip>\r\n                                        <StackPanel>\r\n                                            <TextBlock Text=\"{Binding Title}\"/>\r\n                                            <TextBlock Text=\"{Binding FormattedTags}\" FontStyle=\"Italic\"/>\r\n                                            <StackPanel Orientation=\"Horizontal\">\r\n                                                <TextBlock Text=\"{Binding Length}\"/>\r\n                                                <TextBlock Text=\" characters\"/>\r\n                                            </StackPanel>\r\n                                            <TextBlock Text=\"{Binding FormattedDate}\"/>\r\n                                        </StackPanel>\r\n                                    </ToolTipService.ToolTip>\r\n                                </Border>\r\n                            </Grid>\r\n                        </DataTemplate>\r\n                    </datavis:TreeMapItemDefinition>\r\n                </datavis:TreeMap.ItemDefinition>\r\n            </datavis:TreeMap>\r\n        </treeMap:DockPanel>\r\n    </Grid>\r\n</UserControl>\r\n"
  },
  {
    "path": "WpfToolkit/Samples/TreeMap/TreeMapIntroduction.xaml.cs",
    "content": "﻿using System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.Linq;\r\nusing System.Reflection;\r\nusing System.Xml;\r\nusing System.Xml.Linq;\r\n\r\nnamespace System.Windows.Controls.Samples.TreeMap\r\n{\r\n    public partial class TreeMapIntroduction : UserControl\r\n    {\r\n        public TreeMapIntroduction()\r\n        {\r\n            InitializeComponent();\r\n\r\n            IEnumerable<BlogPost> blogPosts;\r\n            using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(\r\n                \"System.Windows.Controls.Samples.BlogPostData.xml\"\r\n                ))\r\n            {\r\n                using (var reader = XmlReader.Create(stream))\r\n                {\r\n                    var doc = XDocument.Load(reader);\r\n                    blogPosts = doc\r\n                        .Element(\"Posts\")\r\n                        .Elements(\"Post\")\r\n                        .Select(p => new BlogPost\r\n                        {\r\n                            Title = p.Element(\"Title\").Value,\r\n                            Date = DateTime.Parse(p.Element(\"Date\").Value, CultureInfo.InvariantCulture),\r\n                            Tags = p.Element(\"Tags\").Elements(\"Tag\").Select(t => t.Value),\r\n                            Length = int.Parse(p.Element(\"Length\").Value, CultureInfo.InvariantCulture),\r\n                            Popularity = double.Parse(p.Element(\"Popularity\").Value, CultureInfo.InvariantCulture),\r\n                        });\r\n                }\r\n            }\r\n\r\n            var blogPostsByTag = blogPosts\r\n                .SelectMany(p => p.Tags.Select(t => new { Tag = t, Post = p }))\r\n                .GroupBy(p => p.Tag)\r\n                .Select(g => new BlogTag { Tag = g.Key, Posts = g.Select(p => p.Post).ToArray() });\r\n\r\n            AllPosts.DataContext = blogPosts;\r\n            RecentPosts.DataContext = blogPosts.Reverse().Take(10).Reverse();\r\n            ByTag.DataContext = blogPostsByTag;\r\n            ByTagDetailed.DataContext = blogPostsByTag;\r\n            RecentPosts2.DataContext = blogPosts.Reverse().Take(10).Reverse();\r\n        }\r\n    }\r\n\r\n    public class DockPanel : System.Windows.Controls.DockPanel\r\n    {\r\n    }\r\n\r\n#if SILVERLIGHT\r\n    // Silverlight's Viewbox is sealed; simulate it with a ContentControl wrapper\r\n    public class Viewbox : ContentControl\r\n    {\r\n        public Viewbox()\r\n        {\r\n            Template = (ControlTemplate)XamlReader.Load(@\"\r\n                <ControlTemplate\r\n                    xmlns=\"\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\" \" +\r\n#if !NO_CORE_VIEWBOX\r\n                    @\">\r\n                    <Viewbox>\r\n                        <ContentPresenter/>\r\n                    </Viewbox>\" +\r\n#else\r\n                    @\"xmlns:controls=\"\"clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit\"\">\r\n                    <controls:Viewbox>\r\n                        <ContentPresenter/>\r\n                    </controls:Viewbox>\" +\r\n#endif\r\n                @\"</ControlTemplate>\");\r\n        }\r\n    }\r\n#else\r\n    public class Viewbox : System.Windows.Controls.Viewbox\r\n    {\r\n    }\r\n#endif\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/Samples/WPFToolkitSamples.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk.WindowsDesktop\">\r\n<PropertyGroup>\r\n        <OutputType>WinExe</OutputType>\r\n        <RootNamespace>System.Windows.Controls.Samples</RootNamespace>\r\n        <TargetFramework>net45</TargetFramework>\r\n    <UseWPF>true</UseWPF>\r\n        <ApplicationIcon />\r\n        <StartupObject />\r\n    </PropertyGroup>\r\n    <ItemGroup>\r\n        <Reference Include=\"System.ComponentModel.DataAnnotations\" />\r\n        <Reference Include=\"System.Web\" />\r\n    </ItemGroup>\r\n    <ItemGroup>\r\n        <ProjectReference Include=\"..\\DataVisualization\\DotNetProjects.DataVisualization.Toolkit.csproj\" />\r\n        <ProjectReference Include=\"..\\Input\\DotNetProjects.Input.Toolkit.csproj\" />\r\n        <ProjectReference Include=\"..\\Layout\\DotNetProjects.Layout.Toolkit.csproj\" />\r\n        <ProjectReference Include=\"..\\WPF.Themes\\DotNetProjects.WPF.Themes.csproj\" />\r\n    </ItemGroup>\r\n    <ItemGroup>\r\n        <Compile Remove=\"AutoCompleteBox\\DataGridAutoCompleteBox.xaml.cs\" />\r\n        <Compile Remove=\"AutoCompleteBox\\DataGridAutoCompleteBoxEdit.xaml.cs\" />\r\n    </ItemGroup>\r\n    <ItemGroup>\r\n        <None Remove=\"AutoCompleteBox\\DataGridAutoCompleteBox.xaml\" />\r\n        <None Remove=\"AutoCompleteBox\\DataGridAutoCompleteBoxEdit.xaml\" />\r\n    </ItemGroup>\r\n    <ItemGroup>\r\n        <Page Remove=\"AutoCompleteBox\\DataGridAutoCompleteBox.xaml\" />\r\n        <Page Remove=\"AutoCompleteBox\\DataGridAutoCompleteBoxEdit.xaml\" />\r\n    </ItemGroup>\r\n    <ItemGroup>\r\n        <Resource Include=\"AutoCompleteBox\\Bing.png\" />\r\n        <Resource Include=\"AutoCompleteBox\\Venice.jpg\" />\r\n        <Resource Include=\"Accordion\\Bing.png\" />\r\n        <Resource Include=\"Rating\\Images\\Casablanca.jpg\" />\r\n        <EmbeddedResource Include=\"BlogPostData.xml\" />\r\n    </ItemGroup>\r\n</Project>\r\n"
  },
  {
    "path": "WpfToolkit/Samples/app.config",
    "content": "<?xml version=\"1.0\"?>\r\n<configuration>\r\n<startup><supportedRuntime version=\"v4.0\" sku=\".NETFramework,Version=v4.0\"/></startup></configuration>\r\n"
  },
  {
    "path": "WpfToolkit/Themes/Aero.NormalColor.xaml",
    "content": "﻿<!--=================================================================\r\nCopyright (C) Microsoft Corporation.  All rights reserved.\r\n==================================================================-->\r\n\r\n<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\">\r\n    <ResourceDictionary.MergedDictionaries>\r\n        <ResourceDictionary Source=\"/WPFToolkit;component/DataGrid/Themes/Aero.NormalColor.xaml\" />\r\n        <ResourceDictionary Source=\"/WPFToolkit;component/Calendar/Themes/Aero.NormalColor.xaml\" />\r\n        <ResourceDictionary Source=\"/WPFToolkit;component/DatePicker/Themes/Aero.NormalColor.xaml\" />\r\n    </ResourceDictionary.MergedDictionaries>\r\n</ResourceDictionary>\r\n"
  },
  {
    "path": "WpfToolkit/Themes/Classic.xaml",
    "content": "﻿<!--=================================================================\r\nCopyright (C) Microsoft Corporation.  All rights reserved.\r\n==================================================================-->\r\n\r\n<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\">\r\n    <ResourceDictionary.MergedDictionaries>\r\n        <ResourceDictionary Source=\"/WPFToolkit;component/DataGrid/Themes/Classic.xaml\" />\r\n        <ResourceDictionary Source=\"/WPFToolkit;component/Calendar/Themes/Classic.xaml\" />\r\n        <ResourceDictionary Source=\"/WPFToolkit;component/DatePicker/Themes/Classic.xaml\" />\r\n    </ResourceDictionary.MergedDictionaries>\r\n</ResourceDictionary>\r\n"
  },
  {
    "path": "WpfToolkit/Themes/Generic.xaml",
    "content": "﻿<!--=================================================================\r\nCopyright (C) Microsoft Corporation.  All rights reserved.\r\n==================================================================-->\r\n\r\n<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\">\r\n    <ResourceDictionary.MergedDictionaries>\r\n      <ResourceDictionary Source=\"/WPFToolkit;component/DataGrid/Themes/generic.xaml\" />\r\n      <ResourceDictionary Source=\"/WPFToolkit;component/Calendar/Themes/generic.xaml\" />\r\n      <ResourceDictionary Source=\"/WPFToolkit;component/DatePicker/Themes/generic.xaml\" />\r\n    </ResourceDictionary.MergedDictionaries>\r\n</ResourceDictionary>\r\n"
  },
  {
    "path": "WpfToolkit/Themes/Luna.HomeStead.xaml",
    "content": "﻿<!--=================================================================\r\nCopyright (C) Microsoft Corporation.  All rights reserved.\r\n==================================================================-->\r\n\r\n<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\">\r\n    <ResourceDictionary.MergedDictionaries>\r\n        <ResourceDictionary Source=\"/WPFToolkit;component/DataGrid/Themes/Luna.HomeStead.xaml\" />\r\n        <ResourceDictionary Source=\"/WPFToolkit;component/Calendar/Themes/Luna.HomeStead.xaml\" />\r\n        <ResourceDictionary Source=\"/WPFToolkit;component/DatePicker/Themes/Luna.HomeStead.xaml\" />\r\n    </ResourceDictionary.MergedDictionaries>\r\n</ResourceDictionary>\r\n"
  },
  {
    "path": "WpfToolkit/Themes/Luna.Metallic.xaml",
    "content": "﻿<!--=================================================================\r\nCopyright (C) Microsoft Corporation.  All rights reserved.\r\n==================================================================-->\r\n\r\n<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\">\r\n    <ResourceDictionary.MergedDictionaries>\r\n        <ResourceDictionary Source=\"/WPFToolkit;component/DataGrid/Themes/Luna.Metallic.xaml\" />\r\n        <ResourceDictionary Source=\"/WPFToolkit;component/Calendar/Themes/Luna.Metallic.xaml\" />\r\n        <ResourceDictionary Source=\"/WPFToolkit;component/DatePicker/Themes/Luna.Metallic.xaml\" />\r\n    </ResourceDictionary.MergedDictionaries>\r\n</ResourceDictionary>\r\n"
  },
  {
    "path": "WpfToolkit/Themes/Luna.NormalColor.xaml",
    "content": "﻿<!--=================================================================\r\nCopyright (C) Microsoft Corporation.  All rights reserved.\r\n==================================================================-->\r\n\r\n<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\">\r\n    <ResourceDictionary.MergedDictionaries>\r\n        <ResourceDictionary Source=\"/WPFToolkit;component/DataGrid/Themes/Luna.NormalColor.xaml\" />\r\n        <ResourceDictionary Source=\"/WPFToolkit;component/Calendar/Themes/Luna.NormalColor.xaml\" />\r\n        <ResourceDictionary Source=\"/WPFToolkit;component/DatePicker/Themes/Luna.NormalColor.xaml\" />\r\n    </ResourceDictionary.MergedDictionaries>\r\n</ResourceDictionary>\r\n"
  },
  {
    "path": "WpfToolkit/Themes/Royale.NormalColor.xaml",
    "content": "﻿<!--=================================================================\r\nCopyright (C) Microsoft Corporation.  All rights reserved.\r\n==================================================================-->\r\n\r\n<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\">\r\n    <ResourceDictionary.MergedDictionaries>\r\n        <ResourceDictionary Source=\"/WPFToolkit;component/DataGrid/Themes/Royale.NormalColor.xaml\" />\r\n        <ResourceDictionary Source=\"/WPFToolkit;component/Calendar/Themes/Royale.NormalColor.xaml\" />\r\n        <ResourceDictionary Source=\"/WPFToolkit;component/DatePicker/Themes/Royale.NormalColor.xaml\" />\r\n    </ResourceDictionary.MergedDictionaries>\r\n</ResourceDictionary>\r\n"
  },
  {
    "path": "WpfToolkit/WPF.Themes/BubbleCreme/Theme.xaml",
    "content": "﻿<!--\r\n// (c) Copyright Microsoft Corporation.\r\n// This source is subject to Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n-->\r\n\r\n<ResourceDictionary\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:basic=\"clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit\" \r\n    xmlns:primitives=\"clr-namespace:Microsoft.Windows.Controls.Primitives;assembly=WPFToolkit\" \r\n    xmlns:vsm=\"clr-namespace:System.Windows;assembly=WPFToolkit\" \r\n    mc:Ignorable=\"d\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\">\r\n\r\n    <LinearGradientBrush x:Key=\"WindowBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFE1E4BE\" Offset=\"0\"/>\r\n        <GradientStop Color=\"#FFF9F9E4\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <!--  Basic Brushes -->\r\n    <SolidColorBrush x:Key=\"TextBrush\" Color=\"#66603a\" />\r\n    <Color x:Key=\"PrimaryColor\">#f9f9e4</Color>\r\n    <Color x:Key=\"SecondaryColor\">#e0e3bc</Color>\r\n    <SolidColorBrush x:Key=\"PrimaryBrush\" Color=\"{DynamicResource PrimaryColor}\" />\r\n    <SolidColorBrush x:Key=\"SecondaryBrush\" Color=\"{DynamicResource SecondaryColor}\" />\r\n    <Color x:Key=\"DisabledColor\">#8CFFFFFF</Color>\r\n\r\n    <RadialGradientBrush x:Key=\"HaloMask\">\r\n        <RadialGradientBrush.RelativeTransform>\r\n            <TransformGroup>\r\n                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.25\" ScaleY=\"4\" />\r\n                <TranslateTransform Y=\"-.2\" />\r\n            </TransformGroup>\r\n        </RadialGradientBrush.RelativeTransform>\r\n        <GradientStop Color=\"#00ffffff\" Offset=\"0.528\" />\r\n        <GradientStop Color=\"#26FFFFFF\" Offset=\"0.776\" />\r\n        <GradientStop Color=\"#BFFFFFFF\" Offset=\"1\" />\r\n    </RadialGradientBrush>\r\n    <LinearGradientBrush x:Key=\"FocusMask\" EndPoint=\"0,.5\" StartPoint=\"1,.5\">\r\n        <GradientStop Color=\"#99000000\" Offset=\"0\" />\r\n        <GradientStop Color=\"#33FFFFFF\" Offset=\".5\" />\r\n        <GradientStop Color=\"#99000000\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"BottomShadowMask\" EndPoint=\"0.5,1.75\" StartPoint=\"0.5,-.25\">\r\n        <GradientStop Color=\"#00000000\" Offset=\"0.2\" />\r\n        <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"BoxBottomShadowMask\" EndPoint=\"0.5,1\" StartPoint=\"0.5,-1\">\r\n        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n        <GradientStop Color=\"#00000000\" Offset=\"0.675\" />\r\n    </LinearGradientBrush>\r\n\r\n    <!--Button-->\r\n    <Style TargetType=\"Button\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource PrimaryBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource SecondaryBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\".5,.5,1.5,1.5\" />\r\n        <Setter Property=\"Padding\" Value=\"8,3\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Button\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"HasFocus\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.2000000\" />\r\n                                    <VisualTransition From=\"MouseOver\" GeneratedDuration=\"00:00:00\" To=\"Pressed\" />\r\n                                    <VisualTransition From=\"Pressed\" GeneratedDuration=\"00:00:00\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"InnerShadow\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ThicknessAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Border.BorderThickness)\">\r\n                                            <SplineThicknessKeyFrame KeyTime=\"0\" Value=\"2.5,2.5,0.5,0.5\" />\r\n                                        </ThicknessAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ThicknessAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Border.BorderThickness)\">\r\n                                            <SplineThicknessKeyFrame KeyTime=\"0\" Value=\"0.5,0.5,0.5,0.5\" />\r\n                                        </ThicknessAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"InnerShadow\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.65\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.35\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"Background\" CornerRadius=\"12\" BorderBrush=\"{TemplateBinding BorderBrush}\" Background=\"{TemplateBinding Background}\" BorderThickness=\"0.5,0.5,1.5,1.5\" />\r\n                        <Grid x:Name=\"InnerShadow\" Grid.RowSpan=\"2\" Grid.ColumnSpan=\"2\">\r\n                            <Border x:Name=\"BottomShadow\" Background=\"{TemplateBinding BorderBrush}\" CornerRadius=\"12\" OpacityMask=\"{StaticResource BottomShadowMask}\" />\r\n                            <Border x:Name=\"Halo\" CornerRadius=\"12\" Background=\"{TemplateBinding BorderBrush}\" OpacityMask=\"{StaticResource HaloMask}\" />\r\n                        </Grid>\r\n                        <ContentPresenter x:Name=\"contentPresenter\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" RenderTransformOrigin=\"0.5,0.5\">\r\n                            <ContentPresenter.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <TranslateTransform />\r\n                                </TransformGroup>\r\n                            </ContentPresenter.RenderTransform>\r\n                        </ContentPresenter>\r\n                        <Border x:Name=\"HasFocus\" CornerRadius=\"13\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1\" Margin=\"-3\" Visibility=\"Collapsed\" OpacityMask=\"{StaticResource FocusMask}\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"BorderThickness\" TargetName=\"Background\" Value=\"0.5,0.5,0.5,0.5\" />\r\n                            <Setter Property=\"Opacity\" TargetName=\"InnerShadow\" Value=\"0.65\" />\r\n                            <Setter Property=\"Opacity\" TargetName=\"contentPresenter\" Value=\"0.35\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--ToggleButton-->\r\n    <!--ToggleButton-->\r\n    <Style TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource PrimaryBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource SecondaryBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\".5,.5,1.5,1.5\" />\r\n        <Setter Property=\"Padding\" Value=\"8,3\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.2\" />\r\n                                    <VisualTransition From=\"MouseOver\" GeneratedDuration=\"00:00:00\" To=\"Pressed\" />\r\n                                    <VisualTransition From=\"Pressed\" GeneratedDuration=\"00:00:00\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"InnerShadow\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ThicknessAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Border.BorderThickness)\">\r\n                                            <SplineThicknessKeyFrame KeyTime=\"0\" Value=\"2.5,2.5,0.5,0.5\" />\r\n                                        </ThicknessAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.X)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.Y)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ThicknessAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Border.BorderThickness)\">\r\n                                            <SplineThicknessKeyFrame KeyTime=\"0\" Value=\"0.5,0.5,0.5,0.5\" />\r\n                                        </ThicknessAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"InnerShadow\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.65\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.35\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <ThicknessAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Border.BorderThickness)\">\r\n                                            <SplineThicknessKeyFrame KeyTime=\"0\" Value=\"1.75,1.75,0.5,0.5\" />\r\n                                        </ThicknessAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.X)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.Y)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Toggled\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\" />\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"HasFocus\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"HasFocus\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"HasFocus\" CornerRadius=\"13\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1\" Margin=\"-3\" Visibility=\"Visible\" OpacityMask=\"{DynamicResource FocusMask}\" Background=\"#00000000\" Opacity=\"0\" />\r\n                        <Border x:Name=\"Background\" CornerRadius=\"12\" BorderBrush=\"{TemplateBinding BorderBrush}\" Background=\"{TemplateBinding Background}\" BorderThickness=\"0.5,0.5,1.5,1.5\">\r\n                            <Border x:Name=\"Toggled\" CornerRadius=\"11\" Background=\"{TemplateBinding BorderBrush}\" Opacity=\".2\" Visibility=\"Collapsed\" />\r\n                        </Border>\r\n                        <Grid x:Name=\"InnerShadow\" Grid.RowSpan=\"2\" Grid.ColumnSpan=\"2\">\r\n                            <Border x:Name=\"BottomShadow\" Background=\"{TemplateBinding BorderBrush}\" CornerRadius=\"12\" OpacityMask=\"{StaticResource BottomShadowMask}\" />\r\n                            <Border x:Name=\"Halo\" CornerRadius=\"12\" Background=\"{TemplateBinding BorderBrush}\" OpacityMask=\"{StaticResource HaloMask}\" />\r\n                        </Grid>\r\n                        <ContentPresenter x:Name=\"contentPresenter\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" RenderTransformOrigin=\"0.5,0.5\">\r\n                            <ContentPresenter.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                </TransformGroup>\r\n                            </ContentPresenter.RenderTransform>\r\n                        </ContentPresenter>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"BorderThickness\" TargetName=\"Background\" Value=\"0.5,0.5,0.5,0.5\" />\r\n                            <Setter Property=\"Opacity\" TargetName=\"InnerShadow\" Value=\"0.65\" />\r\n                            <Setter Property=\"Opacity\" TargetName=\"contentPresenter\" Value=\"0.35\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n\r\n    </Style>\r\n\r\n    <!--CheckBox-->\r\n    <Style TargetType=\"{x:Type CheckBox}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource PrimaryBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource SecondaryBrush}\" />\r\n        <Setter Property=\"Content\" Value=\"CheckBox\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"Padding\" Value=\"4,1,0,0\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"0.5,0.5,1.5,1.5\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type CheckBox}\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.2\" To=\"MouseOver\" />\r\n                                    <VisualTransition From=\"MouseOver\" GeneratedDuration=\"00:00:00.2\" />\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00\" To=\"Pressed\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Bullet\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Shadow\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Bullet\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ThicknessAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Border\" Storyboard.TargetProperty=\"(Border.BorderThickness)\">\r\n                                            <SplineThicknessKeyFrame KeyTime=\"0\" Value=\"1.5,1.5,0.5,0.5\" />\r\n                                        </ThicknessAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Bullet\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.55\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ThicknessAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Border\" Storyboard.TargetProperty=\"(Border.BorderThickness)\">\r\n                                            <SplineThicknessKeyFrame KeyTime=\"0\" Value=\"0.5,0.5,0.5,0.5\" />\r\n                                        </ThicknessAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"grid\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Bullet\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\" />\r\n                                <VisualState x:Name=\"Indeterminate\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"IndeterminateRectangle\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Focus\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"16\" />\r\n                            <ColumnDefinition Width=\"*\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid Height=\"16\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Top\" Width=\"16\" x:Name=\"grid\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"*\" />\r\n                            </Grid.RowDefinitions>\r\n                            <Border x:Name=\"Border\" Grid.RowSpan=\"1\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"2,2,2,2\" Background=\"{TemplateBinding Background}\" />\r\n                            <Border x:Name=\"Shadow\" Grid.RowSpan=\"1\" Background=\"{TemplateBinding BorderBrush}\" CornerRadius=\"2,2,2,2\">\r\n                                <Border.OpacityMask>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                        <GradientStop Color=\"#59FFFFFF\" Offset=\"0\" />\r\n                                        <GradientStop Color=\"#59FFFFFF\" Offset=\"1\" />\r\n                                        <GradientStop Color=\"#00FFFFFF\" Offset=\"0.393\" />\r\n                                        <GradientStop Color=\"#00FFFFFF\" Offset=\"0.567\" />\r\n                                    </LinearGradientBrush>\r\n                                </Border.OpacityMask>\r\n                            </Border>\r\n                            <Grid Opacity=\"0.8\" Visibility=\"Collapsed\" x:Name=\"Bullet\" Margin=\"-0.25,-0.25,0,0\" RenderTransformOrigin=\"0.5,0.5\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" Grid.RowSpan=\"1\">\r\n                                <Path Fill=\"{TemplateBinding Foreground}\" Data=\"M1.6045539,4.9657478 L3.9166667,6.7270508 L8.7999792,0.13644244 L10.335848,1.2280303 L4.1581869,9.0391064 L0.39386681,6.6038928 z\" Margin=\"1.75,1.49,1.94,1.427\" Stretch=\"Fill\" StrokeLineJoin=\"Miter\" StrokeMiterLimit=\"10\" VerticalAlignment=\"Stretch\" />\r\n                            </Grid>\r\n                            <Rectangle Stroke=\"{x:Null}\" StrokeThickness=\"0\" x:Name=\"IndeterminateRectangle\" Fill=\"{StaticResource TextBrush}\" Visibility=\"Collapsed\" Height=\"3\" Margin=\"4,4,4,4\" Grid.RowSpan=\"2\" RadiusX=\"1\" RadiusY=\"1\" />\r\n                            <Border BorderBrush=\"{TemplateBinding BorderBrush}\" OpacityMask=\"{DynamicResource FocusMask}\" CornerRadius=\"4,4,4,4\" BorderThickness=\"1,1,1,1\" Margin=\"-3,-3,-2.75,-2.75\" x:Name=\"Focus\" Visibility=\"Collapsed\" />\r\n                        </Grid>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" RecognizesAccessKey=\"True\" Margin=\"{TemplateBinding Padding}\" x:Name=\"contentPresenter\" Grid.Column=\"1\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"grid\" Value=\"0.5\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--RadioButton-->\r\n    <Style TargetType=\"{x:Type RadioButton}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource PrimaryBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource SecondaryBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"0.5,0.5,1.5,1.5\" />\r\n        <Setter Property=\"Padding\" Value=\"4,1,0,0\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type RadioButton}\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Bullet\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"InnerBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.6\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Bullet\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ThicknessAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Border.BorderThickness)\">\r\n                                            <SplineThicknessKeyFrame KeyTime=\"0\" Value=\"1.5,1.5,0.5,0.5\" />\r\n                                        </ThicknessAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Bullet\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.55\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.2\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ThicknessAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Border.BorderThickness)\">\r\n                                            <SplineThicknessKeyFrame KeyTime=\"0\" Value=\"0.5,0.5,0.5,0.5\" />\r\n                                        </ThicknessAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"grid\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Bullet\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Bullet\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\" />\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Focus\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"16\" />\r\n                            <ColumnDefinition Width=\"*\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid Height=\"16\" Width=\"16\" x:Name=\"grid\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"*\" />\r\n                            </Grid.RowDefinitions>\r\n                            <Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"0.5,0.5,1.5,1.5\" CornerRadius=\"8\" x:Name=\"Background\" Opacity=\"1\" Grid.RowSpan=\"1\" Background=\"{TemplateBinding Background}\" />\r\n                            <Border Background=\"{TemplateBinding BorderBrush}\" CornerRadius=\"8,8,8,8\" x:Name=\"InnerBorder\" Grid.RowSpan=\"1\">\r\n                                <Border.OpacityMask>\r\n                                    <RadialGradientBrush>\r\n                                        <GradientStop Color=\"#00000000\" Offset=\"0.223\" />\r\n                                        <GradientStop Color=\"#66FFFFFF\" Offset=\"1\" />\r\n                                    </RadialGradientBrush>\r\n                                </Border.OpacityMask>\r\n                            </Border>\r\n                            <Border CornerRadius=\"13,13,13,13\" x:Name=\"Focus\" Margin=\"-3,-3,-2.75,-2.75\" Grid.RowSpan=\"1\" BorderThickness=\"1,1,1,1\" BorderBrush=\"{TemplateBinding BorderBrush}\" OpacityMask=\"{DynamicResource FocusMask}\" Visibility=\"Collapsed\" />\r\n                            <Grid Width=\"8\" Height=\"8\" Visibility=\"Collapsed\" x:Name=\"Bullet\" Margin=\"-0.25,-0.25,0,0\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                <Grid.RenderTransform>\r\n                                    <TransformGroup>\r\n                                        <TranslateTransform />\r\n                                    </TransformGroup>\r\n                                </Grid.RenderTransform>\r\n                                <Path Fill=\"{TemplateBinding Foreground}\" Stretch=\"Fill\" Data=\"M4.0000014,5.9604645E-07 C2.8954322,5.364418E-07 2.0000014,0.89543074 2.0000014,2.0000005 C2.0000014,3.1045699 2.895432,4.0000005 4.0000014,4.0000005 C5.1045709,4.0000005 6.0000014,3.1045697 6.0000014,2.0000005 C6.0000014,0.89543092 5.1045709,5.364418E-07 4.0000014,5.9604645E-07 z M4,0 C6.2091379,0 8,1.7908604 8,4 C8,6.2091393 6.2091393,8 4,8 C1.7908604,8 0,6.2091379 0,4 C0,1.7908616 1.7908616,0 4,0 z\" />\r\n                            </Grid>\r\n                        </Grid>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" RecognizesAccessKey=\"True\" Grid.Column=\"1\" Margin=\"{TemplateBinding Padding}\" IsEnabled=\"False\" Content=\"{TemplateBinding Content}\" x:Name=\"contentPresenter\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"grid\" Value=\"0.5\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--Expander-->\r\n    <Style TargetType=\"{x:Type Expander}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"{x:Null}\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"#00FFFFFF\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Expander}\">\r\n                    <ControlTemplate.Resources>\r\n                        <ControlTemplate TargetType=\"{x:Type ToggleButton}\" x:Key=\"ExpanderRightHeaderTemplate\">\r\n                            <Border Padding=\"{TemplateBinding Padding}\">\r\n                                <Grid SnapsToDevicePixels=\"False\" Background=\"Transparent\">\r\n                                    <Grid.RowDefinitions>\r\n                                        <RowDefinition Height=\"19\" />\r\n                                        <RowDefinition Height=\"*\" />\r\n                                    </Grid.RowDefinitions>\r\n                                    <Grid>\r\n                                        <Grid.LayoutTransform>\r\n                                            <TransformGroup>\r\n                                                <TransformGroup.Children>\r\n                                                    <TransformCollection>\r\n                                                        <RotateTransform Angle=\"-90\" />\r\n                                                    </TransformCollection>\r\n                                                </TransformGroup.Children>\r\n                                            </TransformGroup>\r\n                                        </Grid.LayoutTransform>\r\n                                        <Grid Width=\"16\" Height=\"16\">\r\n                                            <Grid.LayoutTransform>\r\n                                                <TransformGroup>\r\n                                                    <RotateTransform Angle=\"90\" />\r\n                                                </TransformGroup>\r\n                                            </Grid.LayoutTransform>\r\n                                            <Grid.RowDefinitions>\r\n                                                <RowDefinition Height=\"*\" />\r\n                                            </Grid.RowDefinitions>\r\n                                            <Border CornerRadius=\"8,8,8,8\" x:Name=\"White\" BorderBrush=\"{DynamicResource SecondaryBrush}\" BorderThickness=\"0.75,0.75,1.25,1.25\" Grid.RowSpan=\"1\" Width=\"16\" Height=\"16\" Margin=\"0,0,-1,-1\">\r\n                                                <Border.Background>\r\n                                                    <LinearGradientBrush EndPoint=\"1.438,0.5\" StartPoint=\"-0.438,0.5\">\r\n                                                        <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"0\" />\r\n                                                        <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                                        <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.018\" />\r\n                                                        <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.25\" />\r\n                                                    </LinearGradientBrush>\r\n                                                </Border.Background>\r\n                                            </Border>\r\n                                        </Grid>\r\n                                        <Path Stroke=\"{DynamicResource SecondaryBrush}\" StrokeThickness=\"2\" HorizontalAlignment=\"Center\" x:Name=\"arrow\" VerticalAlignment=\"Center\" SnapsToDevicePixels=\"false\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                            <Path.RenderTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform ScaleX=\"1\" ScaleY=\"-1\" />\r\n                                                </TransformGroup>\r\n                                            </Path.RenderTransform>\r\n                                        </Path>\r\n                                    </Grid>\r\n                                    <ContentPresenter HorizontalAlignment=\"Center\" Margin=\"0,4,0,0\" VerticalAlignment=\"Top\" SnapsToDevicePixels=\"True\" Grid.Row=\"1\" RecognizesAccessKey=\"True\" />\r\n                                </Grid>\r\n                            </Border>\r\n                            <ControlTemplate.Triggers>\r\n                                <Trigger Property=\"IsChecked\" Value=\"True\">\r\n                                    <Setter Property=\"RenderTransformOrigin\" TargetName=\"arrow\" Value=\"0.5,0.5\" />\r\n                                    <Setter Property=\"RenderTransform\" TargetName=\"arrow\">\r\n                                        <Setter.Value>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                            </TransformGroup>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsPressed\" Value=\"True\">\r\n                                    <Setter Property=\"Background\" TargetName=\"White\">\r\n                                        <Setter.Value>\r\n                                            <LinearGradientBrush EndPoint=\"1.438,0.5\" StartPoint=\"-0.438,0.5\">\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"0.219\" />\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.522\" />\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.518\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                    <Setter Property=\"BorderThickness\" TargetName=\"White\" Value=\"1.5,1.5,0.5,0.5\" />\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                                    <Setter Property=\"Background\" TargetName=\"White\">\r\n                                        <Setter.Value>\r\n                                            <LinearGradientBrush EndPoint=\"1.438,0.5\" StartPoint=\"-0.438,0.5\">\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"0\" />\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.018\" />\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.594\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                </Trigger>\r\n                            </ControlTemplate.Triggers>\r\n                        </ControlTemplate>\r\n                        <ControlTemplate x:Key=\"ExpanderUpHeaderTemplate\" TargetType=\"{x:Type ToggleButton}\">\r\n                            <Border Padding=\"{TemplateBinding Padding}\">\r\n                                <Grid SnapsToDevicePixels=\"False\" Background=\"Transparent\">\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition Width=\"19\" />\r\n                                        <ColumnDefinition Width=\"*\" />\r\n                                    </Grid.ColumnDefinitions>\r\n                                    <Grid Width=\"16\" Height=\"16\">\r\n                                        <Grid.RowDefinitions>\r\n                                            <RowDefinition Height=\"*\" />\r\n                                        </Grid.RowDefinitions>\r\n                                        <Border CornerRadius=\"8,8,8,8\" x:Name=\"White\" BorderBrush=\"{DynamicResource SecondaryBrush}\" BorderThickness=\"1.25,1.25,0.75,0.75\" Grid.RowSpan=\"1\" Width=\"16\" Height=\"16\" Margin=\"-1,-1,0,0\">\r\n                                            <Border.Background>\r\n                                                <LinearGradientBrush EndPoint=\"0.5,-0.508\" StartPoint=\"0.5,1.508\">\r\n                                                    <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"0\" />\r\n                                                    <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                                    <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.299\" />\r\n                                                    <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.013\" />\r\n                                                </LinearGradientBrush>\r\n                                            </Border.Background>\r\n                                        </Border>\r\n                                        <Path StrokeThickness=\"2\" HorizontalAlignment=\"Center\" x:Name=\"arrow\" VerticalAlignment=\"Center\" SnapsToDevicePixels=\"false\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\" Grid.RowSpan=\"1\" RenderTransformOrigin=\"0.5,0.5\" Stroke=\"{DynamicResource SecondaryBrush}\">\r\n                                            <Path.RenderTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                                </TransformGroup>\r\n                                            </Path.RenderTransform>\r\n                                        </Path>\r\n                                    </Grid>\r\n                                    <ContentPresenter HorizontalAlignment=\"Left\" Margin=\"4,0,0,0\" VerticalAlignment=\"Center\" SnapsToDevicePixels=\"True\" Grid.Column=\"1\" RecognizesAccessKey=\"True\" />\r\n                                </Grid>\r\n                            </Border>\r\n                            <ControlTemplate.Triggers>\r\n                                <Trigger Property=\"IsChecked\" Value=\"True\">\r\n                                    <Setter Property=\"RenderTransform\" TargetName=\"arrow\">\r\n                                        <Setter.Value>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform ScaleX=\"1\" ScaleY=\"-1\" />\r\n                                            </TransformGroup>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsPressed\" Value=\"True\">\r\n                                    <Setter Property=\"Background\" TargetName=\"White\">\r\n                                        <Setter.Value>\r\n                                            <LinearGradientBrush EndPoint=\"0.5,-0.508\" StartPoint=\"0.5,1.508\">\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"0.33\" />\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.531\" />\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.5\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                    <Setter Property=\"BorderThickness\" TargetName=\"White\" Value=\"1.5,1.5,0.5,0.5\" />\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                                    <Setter Property=\"Background\" TargetName=\"White\">\r\n                                        <Setter.Value>\r\n                                            <LinearGradientBrush EndPoint=\"0.5,-0.508\" StartPoint=\"0.5,1.508\">\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"0\" />\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.647\" />\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.013\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                </Trigger>\r\n                            </ControlTemplate.Triggers>\r\n                        </ControlTemplate>\r\n                        <ControlTemplate TargetType=\"{x:Type ToggleButton}\" x:Key=\"ExpanderLeftHeaderTemplate\">\r\n                            <Border Padding=\"{TemplateBinding Padding}\">\r\n                                <Grid SnapsToDevicePixels=\"False\" Background=\"Transparent\">\r\n                                    <Grid.RowDefinitions>\r\n                                        <RowDefinition Height=\"19\" />\r\n                                        <RowDefinition Height=\"*\" />\r\n                                    </Grid.RowDefinitions>\r\n                                    <Grid>\r\n                                        <Grid.LayoutTransform>\r\n                                            <TransformGroup>\r\n                                                <TransformGroup.Children>\r\n                                                    <TransformCollection>\r\n                                                        <RotateTransform Angle=\"90\" />\r\n                                                    </TransformCollection>\r\n                                                </TransformGroup.Children>\r\n                                            </TransformGroup>\r\n                                        </Grid.LayoutTransform>\r\n                                        <Grid Width=\"16\" Height=\"16\">\r\n                                            <Grid.LayoutTransform>\r\n                                                <TransformGroup>\r\n                                                    <RotateTransform Angle=\"-90\" />\r\n                                                </TransformGroup>\r\n                                            </Grid.LayoutTransform>\r\n                                            <Grid.RowDefinitions>\r\n                                                <RowDefinition Height=\"*\" />\r\n                                            </Grid.RowDefinitions>\r\n                                            <Border CornerRadius=\"8,8,8,8\" x:Name=\"White\" BorderBrush=\"{DynamicResource SecondaryBrush}\" BorderThickness=\"0.75,0.75,1.25,1.25\" Grid.RowSpan=\"1\" Width=\"16\" Height=\"16\" Margin=\"0,0,-1,-1\">\r\n                                                <Border.Background>\r\n                                                    <LinearGradientBrush EndPoint=\"-0.852,0.5\" StartPoint=\"1.852,0.5\">\r\n                                                        <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"0\" />\r\n                                                        <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                                        <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.299\" />\r\n                                                        <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.013\" />\r\n                                                    </LinearGradientBrush>\r\n                                                </Border.Background>\r\n                                            </Border>\r\n                                            <Path Stroke=\"{DynamicResource SecondaryBrush}\" StrokeThickness=\"2\" HorizontalAlignment=\"Center\" x:Name=\"arrow\" VerticalAlignment=\"Center\" SnapsToDevicePixels=\"false\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\" RenderTransformOrigin=\"0.5,0.5\" Grid.RowSpan=\"1\">\r\n                                                <Path.RenderTransform>\r\n                                                    <TransformGroup>\r\n                                                        <ScaleTransform ScaleX=\"-1\" ScaleY=\"1\" />\r\n                                                        <RotateTransform Angle=\"-90\" />\r\n                                                    </TransformGroup>\r\n                                                </Path.RenderTransform>\r\n                                            </Path>\r\n                                        </Grid>\r\n                                    </Grid>\r\n                                    <ContentPresenter HorizontalAlignment=\"Center\" Margin=\"0,4,0,0\" VerticalAlignment=\"Top\" SnapsToDevicePixels=\"True\" Grid.Row=\"1\" RecognizesAccessKey=\"True\" />\r\n                                </Grid>\r\n                            </Border>\r\n                            <ControlTemplate.Triggers>\r\n                                <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                                    <Setter Property=\"Data\" TargetName=\"arrow\" Value=\"M 1,4.5  L 4.5,1  L 8,4.5\" />\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                                    <Setter Property=\"Background\" TargetName=\"White\">\r\n                                        <Setter.Value>\r\n                                            <LinearGradientBrush EndPoint=\"-0.852,0.5\" StartPoint=\"1.852,0.5\">\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"0\" />\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.562\" />\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.013\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                                    <Setter Property=\"BorderThickness\" TargetName=\"White\" Value=\"1.5,1.5,0.5,0.5\" />\r\n                                    <Setter Property=\"Background\" TargetName=\"White\">\r\n                                        <Setter.Value>\r\n                                            <LinearGradientBrush EndPoint=\"-0.852,0.5\" StartPoint=\"1.852,0.5\">\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"0.357\" />\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.54\" />\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.518\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                </Trigger>\r\n                            </ControlTemplate.Triggers>\r\n                        </ControlTemplate>\r\n                        <ControlTemplate TargetType=\"{x:Type ToggleButton}\" x:Key=\"ExpanderDownHeaderTemplate\">\r\n                            <Border Padding=\"{TemplateBinding Padding}\">\r\n                                <Grid SnapsToDevicePixels=\"False\" Background=\"Transparent\">\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition Width=\"19\" />\r\n                                        <ColumnDefinition Width=\"*\" />\r\n                                    </Grid.ColumnDefinitions>\r\n                                    <Grid HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" Width=\"19\" Height=\"19\">\r\n                                        <Grid.RowDefinitions>\r\n                                            <RowDefinition Height=\"*\" />\r\n                                        </Grid.RowDefinitions>\r\n                                        <Border CornerRadius=\"8,8,8,8\" x:Name=\"White\" BorderBrush=\"{DynamicResource SecondaryBrush}\" BorderThickness=\"0.75,0.75,1.25,1.25\" Grid.RowSpan=\"1\" Width=\"16\" Height=\"16\" Margin=\"0,0,-1,-1\">\r\n                                            <Border.Background>\r\n                                                <LinearGradientBrush EndPoint=\"0.5,1.531\" StartPoint=\"0.5,-0.615\">\r\n                                                    <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"0\" />\r\n                                                    <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                                    <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.013\" />\r\n                                                    <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.308\" />\r\n                                                </LinearGradientBrush>\r\n                                            </Border.Background>\r\n                                        </Border>\r\n                                        <Path Stroke=\"{DynamicResource SecondaryBrush}\" StrokeThickness=\"2\" HorizontalAlignment=\"Center\" x:Name=\"arrow\" VerticalAlignment=\"Center\" SnapsToDevicePixels=\"false\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\" Grid.RowSpan=\"1\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                            <Path.RenderTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform ScaleX=\"1\" ScaleY=\"-1\" />\r\n                                                </TransformGroup>\r\n                                            </Path.RenderTransform>\r\n                                        </Path>\r\n                                    </Grid>\r\n                                    <ContentPresenter HorizontalAlignment=\"Left\" Margin=\"4,0,0,0\" VerticalAlignment=\"Center\" SnapsToDevicePixels=\"True\" Grid.Column=\"1\" RecognizesAccessKey=\"True\" />\r\n                                </Grid>\r\n                            </Border>\r\n                            <ControlTemplate.Triggers>\r\n                                <Trigger Property=\"IsChecked\" Value=\"True\">\r\n                                    <Setter Property=\"RenderTransformOrigin\" TargetName=\"arrow\" Value=\"0.5,0.5\" />\r\n                                    <Setter Property=\"RenderTransform\" TargetName=\"arrow\">\r\n                                        <Setter.Value>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                            </TransformGroup>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsPressed\" Value=\"True\">\r\n                                    <Setter Property=\"BorderThickness\" TargetName=\"White\" Value=\"1.5,1.5,0.5,0.5\" />\r\n                                    <Setter Property=\"RenderTransform\" TargetName=\"arrow\">\r\n                                        <Setter.Value>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                                <TranslateTransform X=\"0.5\" Y=\"0.5\" />\r\n                                            </TransformGroup>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                    <Setter Property=\"Background\" TargetName=\"White\">\r\n                                        <Setter.Value>\r\n                                            <LinearGradientBrush EndPoint=\"0.5,1.531\" StartPoint=\"0.5,-0.615\">\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"0.362\" />\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.509\" />\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.598\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                                    <Setter Property=\"Background\" TargetName=\"White\">\r\n                                        <Setter.Value>\r\n                                            <LinearGradientBrush EndPoint=\"0.5,1.531\" StartPoint=\"0.5,-0.615\">\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"0\" />\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.013\" />\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.665\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                                    <Setter Property=\"BorderThickness\" TargetName=\"White\" Value=\"0.75,0.75,2,2\" />\r\n                                    <Setter Property=\"Margin\" TargetName=\"White\" Value=\"0,0,-1.25,-1.25\" />\r\n                                </Trigger>\r\n                            </ControlTemplate.Triggers>\r\n                        </ControlTemplate>\r\n                    </ControlTemplate.Resources>\r\n                    <Border SnapsToDevicePixels=\"true\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" x:Name=\"border\" Background=\"#00A7A6A6\">\r\n                        <DockPanel>\r\n                            <ToggleButton Margin=\"1\" MinHeight=\"0\" MinWidth=\"0\" x:Name=\"HeaderSite\" Template=\"{StaticResource ExpanderDownHeaderTemplate}\" Content=\"{TemplateBinding Header}\" ContentTemplate=\"{TemplateBinding HeaderTemplate}\" ContentTemplateSelector=\"{TemplateBinding HeaderTemplateSelector}\" FontFamily=\"{TemplateBinding FontFamily}\" FontSize=\"{TemplateBinding FontSize}\" FontStretch=\"{TemplateBinding FontStretch}\" FontStyle=\"{TemplateBinding FontStyle}\" FontWeight=\"{TemplateBinding FontWeight}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\" IsChecked=\"{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" DockPanel.Dock=\"Top\" Background=\"#FF000000\" BorderBrush=\"{TemplateBinding BorderBrush}\" Opacity=\"1\" />\r\n                            <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"ExpandSite\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Focusable=\"false\" Visibility=\"Collapsed\" />\r\n                        </DockPanel>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsExpanded\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"ExpandSite\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Right\">\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Right\" />\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Left\" />\r\n                            <Setter Property=\"Template\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderRightHeaderTemplate}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Up\">\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Top\" />\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Bottom\" />\r\n                            <Setter Property=\"Template\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderUpHeaderTemplate}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Left\">\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Left\" />\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Right\" />\r\n                            <Setter Property=\"Template\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderLeftHeaderTemplate}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"ExpandSite\" Value=\"0.5\" />\r\n                            <Setter Property=\"Opacity\" TargetName=\"HeaderSite\" Value=\"0.5\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- TextBox -->\r\n    <Style TargetType=\"{x:Type TextBox}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource PrimaryBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource SecondaryBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1,1.5,0.5,0.5\" />\r\n        <Setter Property=\"Padding\" Value=\"1\" />\r\n        <Setter Property=\"AllowDrop\" Value=\"true\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\" />\r\n        <Setter Property=\"MinWidth\" Value=\"0\" />\r\n        <Setter Property=\"MinHeight\" Value=\"0\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TextBox}\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"InnerShadow\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"PART_ContentHost\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.35\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ThicknessAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"White\" Storyboard.TargetProperty=\"(Border.BorderThickness)\">\r\n                                            <SplineThicknessKeyFrame KeyTime=\"0\" Value=\"0.5,0.5,0.5,0.5\" />\r\n                                        </ThicknessAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"InnerShadow\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.65\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ReadOnly\" />\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusedStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ThicknessAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"White\" Storyboard.TargetProperty=\"(Border.BorderThickness)\">\r\n                                            <SplineThicknessKeyFrame KeyTime=\"0\" Value=\"1.75,2,0.5,0.5\" />\r\n                                        </ThicknessAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"border\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border Background=\"{TemplateBinding Background}\" x:Name=\"White\" BorderBrush=\"{TemplateBinding BorderBrush}\" CornerRadius=\"4,4,4,4\" BorderThickness=\"1,1.5,0.5,0.5\" />\r\n                        <Grid x:Name=\"InnerShadow\">\r\n                            <Border x:Name=\"BottomShadow\" Background=\"{TemplateBinding BorderBrush}\" CornerRadius=\"4,4,4,4\" OpacityMask=\"{DynamicResource BoxBottomShadowMask}\" />\r\n                            <Border x:Name=\"Halo\" Background=\"{TemplateBinding BorderBrush}\" CornerRadius=\"4,4,4,4\" OpacityMask=\"{DynamicResource HaloMask}\" />\r\n                        </Grid>\r\n                        <ScrollViewer x:Name=\"PART_ContentHost\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" />\r\n                        <Border CornerRadius=\"7,7,7,7\" Margin=\"-3,-3,-3,-3\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1,1,1,1\" OpacityMask=\"{DynamicResource FocusMask}\" Visibility=\"Collapsed\" x:Name=\"border\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"BorderThickness\" TargetName=\"White\" Value=\"0.5,0.5,0.5,0.5\" />\r\n                            <Setter Property=\"Opacity\" TargetName=\"InnerShadow\" Value=\"0.65\" />\r\n                            <Setter Property=\"Opacity\" TargetName=\"PART_ContentHost\" Value=\"0.35\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- PasswordBox -->\r\n    <Style TargetType=\"{x:Type PasswordBox}\">\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource PrimaryBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource SecondaryBrush}\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Times New Roman\" />\r\n        <Setter Property=\"PasswordChar\" Value=\"●\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"Padding\" Value=\"1\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\" />\r\n        <Setter Property=\"AllowDrop\" Value=\"true\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type PasswordBox}\">\r\n                    <Grid>\r\n                        <Border x:Name=\"Background\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"4,4,4,4\" />\r\n                        <Grid x:Name=\"grid\">\r\n                            <Border x:Name=\"BottomShadow\" OpacityMask=\"{DynamicResource BoxBottomShadowMask}\" Background=\"{TemplateBinding BorderBrush}\" CornerRadius=\"4,4,4,4\" />\r\n                            <Border x:Name=\"Halo\" OpacityMask=\"{DynamicResource HaloMask}\" Background=\"{TemplateBinding BorderBrush}\" CornerRadius=\"4,4,4,4\" />\r\n                        </Grid>\r\n                        <ScrollViewer x:Name=\"PART_ContentHost\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" />\r\n                        <Border Margin=\"-3,-3,-3,-3\" x:Name=\"Focus\" OpacityMask=\"{DynamicResource FocusMask}\" Visibility=\"Collapsed\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"7,7,7,7\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"grid\" Value=\"0.5\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Setter Property=\"BorderThickness\" TargetName=\"Background\" Value=\"1.75,2,0.5,0.5\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Focus\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"BorderThickness\" TargetName=\"Background\" Value=\"0.5,0.5,0.5,0.5\" />\r\n                            <Setter Property=\"Opacity\" TargetName=\"grid\" Value=\"0.65\" />\r\n                            <Setter Property=\"Opacity\" TargetName=\"PART_ContentHost\" Value=\"0.35\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- RichTextBox -->\r\n    <Style TargetType=\"{x:Type RichTextBox}\">\r\n        <Style.Resources>\r\n            <Style x:Key=\"{x:Type FlowDocument}\" TargetType=\"{x:Type FlowDocument}\">\r\n                <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n            </Style>\r\n        </Style.Resources>\r\n        <Setter Property=\"MinWidth\" Value=\"10\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource PrimaryBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource SecondaryBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Padding\" Value=\"1\" />\r\n        <Setter Property=\"AllowDrop\" Value=\"true\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TextBoxBase}\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"grid\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"PART_ContentHost\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"grid\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.65\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ThicknessAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Border.BorderThickness)\">\r\n                                            <SplineThicknessKeyFrame KeyTime=\"0\" Value=\"0.5,0.5,0.5,0.5\" />\r\n                                        </ThicknessAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ReadOnly\" />\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusedStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ThicknessAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Border.BorderThickness)\">\r\n                                            <SplineThicknessKeyFrame KeyTime=\"0\" Value=\"1.75,2,0.5,0.5\" />\r\n                                        </ThicknessAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Focus\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"UnFocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border CornerRadius=\"4,4,4,4\" BorderThickness=\"1,1.5,0.5,0.5\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" x:Name=\"Background\" />\r\n                        <Grid x:Name=\"grid\">\r\n                            <Border Margin=\"0,0,0,0\" CornerRadius=\"4,4,4,4\" Background=\"{TemplateBinding BorderBrush}\" OpacityMask=\"{DynamicResource BoxBottomShadowMask}\" x:Name=\"Shadow\" />\r\n                            <Border Margin=\"0,0,0,0\" x:Name=\"Halo\" CornerRadius=\"4,4,4,4\" Background=\"{TemplateBinding BorderBrush}\" OpacityMask=\"{DynamicResource HaloMask}\" />\r\n                        </Grid>\r\n                        <ScrollViewer x:Name=\"PART_ContentHost\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" />\r\n                        <Border x:Name=\"Focus\" BorderThickness=\"1,1,1,1\" CornerRadius=\"7,7,7,7\" Margin=\"-3,-3,-3,-3\" BorderBrush=\"{DynamicResource SecondaryBrush}\" OpacityMask=\"{DynamicResource FocusMask}\" Visibility=\"Collapsed\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- Thumb -->\r\n    <Style TargetType=\"{x:Type Thumb}\">\r\n        <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\" />\r\n        <Setter Property=\"Background\" Value=\"#FF1F3B53\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource SecondaryBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <Grid Margin=\"1,0,3,2\" x:Name=\"grid\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"*\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Border CornerRadius=\"8,8,8,8\" Opacity=\"1\" x:Name=\"Background\" BorderThickness=\"0.5,0.5,1.5,1.5\" BorderBrush=\"{TemplateBinding BorderBrush}\">\r\n                            <Border.Background>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.714\" ScaleY=\"2.148\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.121\" />\r\n                                    <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <Border CornerRadius=\"8,8,8,8\" Background=\"white\" Opacity=\"0\" x:Name=\"DisableEllipse\" />\r\n                        <Border x:Name=\"HasFocus\" CornerRadius=\"13\" BorderThickness=\"1\" Visibility=\"Collapsed\" OpacityMask=\"{StaticResource FocusMask}\" BorderBrush=\"{TemplateBinding BorderBrush}\" Margin=\"-2,-2,-2,-2\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Setter Property=\"BorderThickness\" TargetName=\"Background\" Value=\"1,1,1,1\" />\r\n                            <Setter Property=\"Background\" TargetName=\"Background\">\r\n                                <Setter.Value>\r\n                                    <RadialGradientBrush>\r\n                                        <RadialGradientBrush.RelativeTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.531\" ScaleY=\"1.918\" />\r\n                                                <TranslateTransform X=\"-0.037\" Y=\"-0.04\" />\r\n                                            </TransformGroup>\r\n                                        </RadialGradientBrush.RelativeTransform>\r\n                                        <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.121\" />\r\n                                        <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"0.491\" />\r\n                                    </RadialGradientBrush>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                            <Setter Property=\"Visibility\" TargetName=\"HasFocus\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"Background\" Value=\"1\" />\r\n                            <Setter Property=\"Background\" TargetName=\"Background\">\r\n                                <Setter.Value>\r\n                                    <RadialGradientBrush>\r\n                                        <RadialGradientBrush.RelativeTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.531\" ScaleY=\"1.918\" />\r\n                                                <TranslateTransform X=\"-0.037\" Y=\"-0.04\" />\r\n                                            </TransformGroup>\r\n                                        </RadialGradientBrush.RelativeTransform>\r\n                                        <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.397\" />\r\n                                        <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"0.674\" />\r\n                                    </RadialGradientBrush>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsDragging\" Value=\"true\">\r\n                            <Setter Property=\"Background\" TargetName=\"Background\">\r\n                                <Setter.Value>\r\n                                    <RadialGradientBrush>\r\n                                        <RadialGradientBrush.RelativeTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.531\" ScaleY=\"1.918\" />\r\n                                                <TranslateTransform X=\"-0.037\" Y=\"-0.04\" />\r\n                                            </TransformGroup>\r\n                                        </RadialGradientBrush.RelativeTransform>\r\n                                        <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.362\" />\r\n                                        <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"0.54\" />\r\n                                    </RadialGradientBrush>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                            <Setter Property=\"BorderThickness\" TargetName=\"Background\" Value=\"1.75,1.75,0.5,0.5\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"DisableEllipse\" Value=\"0.65\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Focusable\" Value=\"True\" />\r\n    </Style>\r\n\r\n    <!-- Slider -->\r\n    <Style TargetType=\"{x:Type Slider}\">\r\n        <Style.Resources>\r\n            <Style x:Key=\"SliderRepeatButtonStyle\" TargetType=\"{x:Type RepeatButton}\">\r\n                <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n                <Setter Property=\"IsTabStop\" Value=\"false\" />\r\n                <Setter Property=\"Focusable\" Value=\"false\" />\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n                            <Rectangle Fill=\"Transparent\" />\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n        </Style.Resources>\r\n        <Setter Property=\"Stylus.IsPressAndHoldEnabled\" Value=\"false\" />\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"Foreground\" Value=\"#FFC4C4C4\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Slider}\">\r\n                    <Border SnapsToDevicePixels=\"true\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\">\r\n                        <Grid>\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\" />\r\n                                <RowDefinition Height=\"Auto\" MinHeight=\"{TemplateBinding MinHeight}\" />\r\n                                <RowDefinition Height=\"Auto\" />\r\n                            </Grid.RowDefinitions>\r\n                            <TickBar x:Name=\"TopTick\" Height=\"4\" Visibility=\"Collapsed\" Fill=\"{TemplateBinding Foreground}\" Placement=\"Top\" />\r\n                            <TickBar x:Name=\"BottomTick\" Height=\"4\" Visibility=\"Collapsed\" Grid.Row=\"2\" Fill=\"{TemplateBinding Foreground}\" Placement=\"Bottom\" />\r\n                            <Border Margin=\"5,0\" x:Name=\"TrackBackground\" VerticalAlignment=\"center\" Height=\"4.0\" Grid.Row=\"1\" Background=\"{DynamicResource SecondaryBrush}\" BorderBrush=\"{x:Null}\" BorderThickness=\"1\" CornerRadius=\"1\">\r\n                                <Canvas Margin=\"-6,-1\">\r\n                                    <Rectangle StrokeThickness=\"1.0\" x:Name=\"PART_SelectionRange\" Height=\"4.0\" Visibility=\"Hidden\" />\r\n                                </Canvas>\r\n                            </Border>\r\n                            <Track x:Name=\"PART_Track\" Grid.Row=\"1\">\r\n                                <Track.DecreaseRepeatButton>\r\n                                    <RepeatButton Style=\"{StaticResource SliderRepeatButtonStyle}\" Command=\"{x:Static Slider.DecreaseLarge}\" />\r\n                                </Track.DecreaseRepeatButton>\r\n                                <Track.IncreaseRepeatButton>\r\n                                    <RepeatButton Style=\"{StaticResource SliderRepeatButtonStyle}\" Command=\"{x:Static Slider.IncreaseLarge}\" />\r\n                                </Track.IncreaseRepeatButton>\r\n                                <Track.Thumb>\r\n                                    <Thumb x:Name=\"Thumb\" Width=\"18\" Height=\"18\" />\r\n                                </Track.Thumb>\r\n                            </Track>\r\n                        </Grid>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"TickPlacement\" Value=\"TopLeft\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"TopTick\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"TickPlacement\" Value=\"BottomRight\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"BottomTick\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"TickPlacement\" Value=\"Both\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"TopTick\" Value=\"Visible\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"BottomTick\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsSelectionRangeEnabled\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"PART_SelectionRange\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                            <Setter Property=\"Foreground\" TargetName=\"Thumb\" Value=\"Blue\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Style.Triggers>\r\n            <Trigger Property=\"Orientation\" Value=\"Vertical\">\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"{x:Type Slider}\">\r\n                            <Border SnapsToDevicePixels=\"true\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\">\r\n                                <Grid>\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition Width=\"Auto\" />\r\n                                        <ColumnDefinition MinWidth=\"{TemplateBinding MinWidth}\" Width=\"Auto\" />\r\n                                        <ColumnDefinition Width=\"Auto\" />\r\n                                    </Grid.ColumnDefinitions>\r\n                                    <TickBar x:Name=\"TopTick\" Width=\"4\" Visibility=\"Collapsed\" Fill=\"{TemplateBinding Foreground}\" Placement=\"Left\" />\r\n                                    <TickBar x:Name=\"BottomTick\" Width=\"4\" Visibility=\"Collapsed\" Grid.Column=\"2\" Fill=\"{TemplateBinding Foreground}\" Placement=\"Right\" />\r\n                                    <Border HorizontalAlignment=\"center\" Margin=\"0,5\" x:Name=\"TrackBackground\" Width=\"4.0\" Grid.Column=\"1\" BorderThickness=\"1\" CornerRadius=\"1\" Background=\"{DynamicResource SecondaryBrush}\" BorderBrush=\"{x:Null}\">\r\n                                        <Canvas Margin=\"-1,-6\">\r\n                                            <Rectangle StrokeThickness=\"1.0\" x:Name=\"PART_SelectionRange\" Width=\"4.0\" Visibility=\"Hidden\" />\r\n                                        </Canvas>\r\n                                    </Border>\r\n                                    <Track x:Name=\"PART_Track\" Grid.Column=\"1\">\r\n                                        <Track.DecreaseRepeatButton>\r\n                                            <RepeatButton Style=\"{StaticResource SliderRepeatButtonStyle}\" Command=\"{x:Static Slider.DecreaseLarge}\" />\r\n                                        </Track.DecreaseRepeatButton>\r\n                                        <Track.IncreaseRepeatButton>\r\n                                            <RepeatButton Style=\"{StaticResource SliderRepeatButtonStyle}\" Command=\"{x:Static Slider.IncreaseLarge}\" />\r\n                                        </Track.IncreaseRepeatButton>\r\n                                        <Track.Thumb>\r\n                                            <Thumb x:Name=\"Thumb\" RenderTransformOrigin=\"0.5,0.5\" Width=\"18\" Height=\"18\" />\r\n                                        </Track.Thumb>\r\n                                    </Track>\r\n                                </Grid>\r\n                            </Border>\r\n                            <ControlTemplate.Triggers>\r\n                                <Trigger Property=\"TickPlacement\" Value=\"TopLeft\">\r\n                                    <Setter Property=\"Visibility\" TargetName=\"TopTick\" Value=\"Visible\" />\r\n                                </Trigger>\r\n                                <Trigger Property=\"TickPlacement\" Value=\"BottomRight\">\r\n                                    <Setter Property=\"Visibility\" TargetName=\"BottomTick\" Value=\"Visible\" />\r\n                                </Trigger>\r\n                                <Trigger Property=\"TickPlacement\" Value=\"Both\">\r\n                                    <Setter Property=\"Visibility\" TargetName=\"TopTick\" Value=\"Visible\" />\r\n                                    <Setter Property=\"Visibility\" TargetName=\"BottomTick\" Value=\"Visible\" />\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsSelectionRangeEnabled\" Value=\"true\">\r\n                                    <Setter Property=\"Visibility\" TargetName=\"PART_SelectionRange\" Value=\"Visible\" />\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                                    <Setter Property=\"Foreground\" TargetName=\"Thumb\" Value=\"Blue\" />\r\n                                </Trigger>\r\n                            </ControlTemplate.Triggers>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Trigger>\r\n        </Style.Triggers>\r\n    </Style>\r\n\r\n    <!-- ScrollBar -->\r\n    <Style TargetType=\"{x:Type ScrollBar}\">\r\n        <Style.Resources>\r\n            <Style x:Key=\"ScrollBarButton\" TargetType=\"{x:Type RepeatButton}\">\r\n                <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n                <Setter Property=\"Focusable\" Value=\"false\" />\r\n                <Setter Property=\"IsTabStop\" Value=\"false\" />\r\n                <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n                <Setter Property=\"Background\" Value=\"#00000000\" />\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n                            <Border Background=\"{TemplateBinding Background}\">\r\n                                <Path Fill=\"{TemplateBinding Foreground}\" Stretch=\"Fill\" Stroke=\"{x:Null}\" Width=\"8\" Height=\"4\" Data=\"M3.9375,0.5 L7.5,3.5 0.5,3.5 z\" />\r\n                            </Border>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n            <Style x:Key=\"ScrollBarPageButton\" TargetType=\"{x:Type RepeatButton}\">\r\n                <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n                <Setter Property=\"Background\" Value=\"Transparent\" />\r\n                <Setter Property=\"Focusable\" Value=\"false\" />\r\n                <Setter Property=\"IsTabStop\" Value=\"false\" />\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n                            <Rectangle Fill=\"{TemplateBinding Background}\" Width=\"{TemplateBinding Width}\" Height=\"{TemplateBinding Height}\" />\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n            <Style x:Key=\"ScrollBarThumb\" TargetType=\"{x:Type Thumb}\">\r\n                <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n                <Setter Property=\"IsTabStop\" Value=\"false\" />\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                            <Grid x:Name=\"grid\">\r\n                                <Grid.RowDefinitions>\r\n                                    <RowDefinition Height=\"*\" />\r\n                                </Grid.RowDefinitions>\r\n                                <Rectangle Stroke=\"{DynamicResource SecondaryBrush}\" StrokeThickness=\"0.5\" Grid.RowSpan=\"1\" x:Name=\"Background\">\r\n                                    <Rectangle.Fill>\r\n                                        <LinearGradientBrush EndPoint=\"1.629,0.503\" StartPoint=\"0.004,0.5\">\r\n                                            <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0\" />\r\n                                            <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                        </LinearGradientBrush>\r\n                                    </Rectangle.Fill>\r\n                                </Rectangle>\r\n                                <Rectangle Stroke=\"{x:Null}\" Grid.RowSpan=\"1\" Visibility=\"Collapsed\" x:Name=\"Disable\">\r\n                                    <Rectangle.Fill>\r\n                                        <SolidColorBrush Color=\"{DynamicResource DisabledColor}\" />\r\n                                    </Rectangle.Fill>\r\n                                </Rectangle>\r\n                            </Grid>\r\n                            <ControlTemplate.Triggers>\r\n                                <Trigger Property=\"IsDragging\" Value=\"True\">\r\n                                    <Setter Property=\"Fill\" TargetName=\"Background\">\r\n                                        <Setter.Value>\r\n                                            <LinearGradientBrush EndPoint=\"1.629,0.503\" StartPoint=\"0.004,0.5\">\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.21\" />\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                                    <Setter Property=\"Visibility\" TargetName=\"Disable\" Value=\"Visible\" />\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsMouseOver\" Value=\"True\" SourceName=\"Background\">\r\n                                    <Setter Property=\"Fill\" TargetName=\"Background\">\r\n                                        <Setter.Value>\r\n                                            <LinearGradientBrush EndPoint=\"1.629,0.503\" StartPoint=\"0.004,0.5\">\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.625\" />\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                </Trigger>\r\n                            </ControlTemplate.Triggers>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n        </Style.Resources>\r\n        <Setter Property=\"Stylus.IsPressAndHoldEnabled\" Value=\"false\" />\r\n        <Setter Property=\"Stylus.IsFlicksEnabled\" Value=\"false\" />\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\" />\r\n        <Setter Property=\"Width\" Value=\"{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}\" />\r\n        <Setter Property=\"MinWidth\" Value=\"{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ScrollBar}\">\r\n                    <Grid x:Name=\"Bg\" SnapsToDevicePixels=\"true\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition MaxHeight=\"{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}\" />\r\n                            <RowDefinition Height=\"*\" />\r\n                            <RowDefinition MaxHeight=\"{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Border Grid.RowSpan=\"3\" BorderBrush=\"{DynamicResource SecondaryBrush}\" BorderThickness=\"0.5,0.5,1.5,1.5\" CornerRadius=\"8,8,8,8\">\r\n                            <Border.Background>\r\n                                <LinearGradientBrush EndPoint=\"1.046,0.517\" StartPoint=\"-0.087,0.476\">\r\n                                    <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#FFFFF7EC\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <RepeatButton Style=\"{StaticResource ScrollBarButton}\" IsEnabled=\"{TemplateBinding IsMouseOver}\" Command=\"{x:Static ScrollBar.LineUpCommand}\" />\r\n                        <Track x:Name=\"PART_Track\" IsEnabled=\"{TemplateBinding IsMouseOver}\" Grid.Row=\"1\" IsDirectionReversed=\"true\">\r\n                            <Track.DecreaseRepeatButton>\r\n                                <RepeatButton Style=\"{StaticResource ScrollBarPageButton}\" Command=\"{x:Static ScrollBar.PageUpCommand}\" Background=\"{DynamicResource SecondaryBrush}\">\r\n                                    <RepeatButton.OpacityMask>\r\n                                        <LinearGradientBrush EndPoint=\"0.5,0.105\" StartPoint=\"0.5,0.96\">\r\n                                            <GradientStop Color=\"#A5FFFFFF\" Offset=\"0\" />\r\n                                            <GradientStop Color=\"#00FFFFFF\" Offset=\"1\" />\r\n                                            <GradientStop Color=\"#59FFFFFF\" Offset=\"0.339\" />\r\n                                        </LinearGradientBrush>\r\n                                    </RepeatButton.OpacityMask>\r\n                                </RepeatButton>\r\n                            </Track.DecreaseRepeatButton>\r\n                            <Track.IncreaseRepeatButton>\r\n                                <RepeatButton Style=\"{StaticResource ScrollBarPageButton}\" Command=\"{x:Static ScrollBar.PageDownCommand}\" Background=\"{DynamicResource SecondaryBrush}\">\r\n                                    <RepeatButton.OpacityMask>\r\n                                        <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                            <GradientStop Color=\"#A5000000\" Offset=\"0\" />\r\n                                            <GradientStop Color=\"#00FFFFFF\" Offset=\"1\" />\r\n                                            <GradientStop Color=\"#592F2F2F\" Offset=\"0.232\" />\r\n                                        </LinearGradientBrush>\r\n                                    </RepeatButton.OpacityMask>\r\n                                </RepeatButton>\r\n                            </Track.IncreaseRepeatButton>\r\n                            <Track.Thumb>\r\n                                <Thumb Style=\"{StaticResource ScrollBarThumb}\" x:Name=\"thumb\" Margin=\"0,0,0.5,0\" BorderThickness=\"1,1,1,1\" />\r\n                            </Track.Thumb>\r\n                        </Track>\r\n                        <RepeatButton Style=\"{StaticResource ScrollBarButton}\" IsEnabled=\"{TemplateBinding IsMouseOver}\" Grid.Row=\"2\" Command=\"{x:Static ScrollBar.LineDownCommand}\" RenderTransformOrigin=\"0.5,0.5\">\r\n                            <RepeatButton.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform ScaleX=\"1\" ScaleY=\"-1\" />\r\n                                </TransformGroup>\r\n                            </RepeatButton.RenderTransform>\r\n                        </RepeatButton>\r\n                        <Border BorderBrush=\"{DynamicResource SecondaryBrush}\" CornerRadius=\"8,8,8,8\" Grid.RowSpan=\"3\" x:Name=\"DisableLayer\" Visibility=\"Collapsed\">\r\n                            <Border.Background>\r\n                                <SolidColorBrush Color=\"{DynamicResource DisabledColor}\" />\r\n                            </Border.Background>\r\n                        </Border>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"DisableLayer\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource SecondaryBrush}\" />\r\n        <Style.Triggers>\r\n            <Trigger Property=\"Orientation\" Value=\"Horizontal\">\r\n                <Setter Property=\"MinWidth\" Value=\"0\" />\r\n                <Setter Property=\"Height\" Value=\"{DynamicResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}}\" />\r\n                <Setter Property=\"MinHeight\" Value=\"{DynamicResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}}\" />\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"{x:Type ScrollBar}\">\r\n                            <Grid x:Name=\"Bg\" SnapsToDevicePixels=\"true\">\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition MaxWidth=\"{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}\" />\r\n                                    <ColumnDefinition Width=\"0.00001*\" />\r\n                                    <ColumnDefinition MaxWidth=\"{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}\" />\r\n                                </Grid.ColumnDefinitions>\r\n                                <Border Grid.ColumnSpan=\"3\" Grid.RowSpan=\"1\" BorderThickness=\"0.5,0.5,1.5,1.5\" CornerRadius=\"8,8,8,8\">\r\n                                    <Border.Background>\r\n                                        <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                            <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"0\" />\r\n                                            <GradientStop Color=\"#FFFFF7EC\" Offset=\"1\" />\r\n                                        </LinearGradientBrush>\r\n                                    </Border.Background>\r\n                                </Border>\r\n                                <RepeatButton Style=\"{StaticResource ScrollBarButton}\" IsEnabled=\"{TemplateBinding IsMouseOver}\" Command=\"{x:Static ScrollBar.LineLeftCommand}\">\r\n                                    <RepeatButton.LayoutTransform>\r\n                                        <TransformGroup>\r\n                                            <RotateTransform Angle=\"-90\" />\r\n                                        </TransformGroup>\r\n                                    </RepeatButton.LayoutTransform>\r\n                                </RepeatButton>\r\n                                <Track x:Name=\"PART_Track\" IsEnabled=\"{TemplateBinding IsMouseOver}\" Grid.Column=\"1\">\r\n                                    <Track.DecreaseRepeatButton>\r\n                                        <RepeatButton Style=\"{StaticResource ScrollBarPageButton}\" Command=\"{x:Static ScrollBar.PageLeftCommand}\" Background=\"{DynamicResource SecondaryBrush}\">\r\n                                            <RepeatButton.OpacityMask>\r\n                                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                                    <GradientStop Color=\"#A5000000\" Offset=\"0\" />\r\n                                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"1\" />\r\n                                                    <GradientStop Color=\"#593A3A3A\" Offset=\"0.254\" />\r\n                                                </LinearGradientBrush>\r\n                                            </RepeatButton.OpacityMask>\r\n                                        </RepeatButton>\r\n                                    </Track.DecreaseRepeatButton>\r\n                                    <Track.IncreaseRepeatButton>\r\n                                        <RepeatButton Style=\"{StaticResource ScrollBarPageButton}\" Command=\"{x:Static ScrollBar.PageRightCommand}\" Background=\"{DynamicResource SecondaryBrush}\">\r\n                                            <RepeatButton.OpacityMask>\r\n                                                <LinearGradientBrush EndPoint=\"0.5,0\" StartPoint=\"0.5,1\">\r\n                                                    <GradientStop Color=\"#A5000000\" Offset=\"0\" />\r\n                                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"1\" />\r\n                                                    <GradientStop Color=\"#595C5C5C\" Offset=\"0.304\" />\r\n                                                </LinearGradientBrush>\r\n                                            </RepeatButton.OpacityMask>\r\n                                        </RepeatButton>\r\n                                    </Track.IncreaseRepeatButton>\r\n                                    <Track.Thumb>\r\n                                        <Thumb Style=\"{StaticResource ScrollBarThumb}\" />\r\n                                    </Track.Thumb>\r\n                                </Track>\r\n                                <RepeatButton Style=\"{StaticResource ScrollBarButton}\" IsEnabled=\"{TemplateBinding IsMouseOver}\" Grid.Column=\"2\" Command=\"{x:Static ScrollBar.LineRightCommand}\">\r\n                                    <RepeatButton.LayoutTransform>\r\n                                        <TransformGroup>\r\n                                            <RotateTransform Angle=\"90\" />\r\n                                        </TransformGroup>\r\n                                    </RepeatButton.LayoutTransform>\r\n                                </RepeatButton>\r\n                                <Border CornerRadius=\"8,8,8,8\" Grid.ColumnSpan=\"3\" x:Name=\"DisableLayer\" Visibility=\"Collapsed\">\r\n                                    <Border.Background>\r\n                                        <SolidColorBrush Color=\"{DynamicResource DisabledColor}\" />\r\n                                    </Border.Background>\r\n                                </Border>\r\n                            </Grid>\r\n                            <ControlTemplate.Triggers>\r\n                                <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                                    <Setter Property=\"Visibility\" TargetName=\"DisableLayer\" Value=\"Visible\" />\r\n                                </Trigger>\r\n                            </ControlTemplate.Triggers>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n                <Setter Property=\"Width\" Value=\"Auto\" />\r\n            </Trigger>\r\n        </Style.Triggers>\r\n    </Style>\r\n\r\n    <!-- ScrollViewer -->\r\n    <Style TargetType=\"{x:Type ScrollViewer}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ScrollViewer}\">\r\n                    <Grid x:Name=\"Grid\" Background=\"{TemplateBinding Background}\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\" />\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"*\" />\r\n                            <RowDefinition Height=\"Auto\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Rectangle Fill=\"{TemplateBinding Background}\" x:Name=\"Corner\" Grid.Column=\"1\" Grid.Row=\"1\" />\r\n                        <ScrollContentPresenter Margin=\"{TemplateBinding Padding}\" x:Name=\"PART_ScrollContentPresenter\" Grid.Column=\"0\" Grid.Row=\"0\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" CanContentScroll=\"{TemplateBinding CanContentScroll}\" CanHorizontallyScroll=\"False\" CanVerticallyScroll=\"False\" />\r\n                        <ScrollBar Cursor=\"Arrow\" x:Name=\"PART_VerticalScrollBar\" Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Grid.Column=\"1\" Grid.Row=\"0\" ViewportSize=\"{TemplateBinding ViewportHeight}\" Maximum=\"{TemplateBinding ScrollableHeight}\" Minimum=\"0\" Value=\"{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" AutomationProperties.AutomationId=\"VerticalScrollBar\" />\r\n                        <ScrollBar Cursor=\"Arrow\" x:Name=\"PART_HorizontalScrollBar\" Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Grid.Column=\"0\" Grid.Row=\"1\" Orientation=\"Horizontal\" ViewportSize=\"{TemplateBinding ViewportWidth}\" Maximum=\"{TemplateBinding ScrollableWidth}\" Minimum=\"0\" Value=\"{Binding Path=HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" AutomationProperties.AutomationId=\"HorizontalScrollBar\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"#00FFFFFF\" />\r\n    </Style>\r\n\r\n    <!-- FlowDocumentScrollViewer -->\r\n    <Style TargetType=\"{x:Type FlowDocumentScrollViewer}\">\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource PrimaryBrush}\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"Local\" />\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"0\" />\r\n                    <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"BorderThickness\" Value=\"1,1,1,1\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type FlowDocumentScrollViewer}\">\r\n                    <Grid Language=\"en-us\" Uid=\"Grid_26\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"*\" />\r\n                            <RowDefinition Height=\"Auto\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Border Margin=\"{TemplateBinding Padding}\" Uid=\"Border_49\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"4,4,4,4\" Background=\"{TemplateBinding Background}\">\r\n                            <ScrollViewer HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" x:Name=\"PART_ContentHost\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Uid=\"ScrollViewer_8\" CanContentScroll=\"True\" />\r\n                        </Border>\r\n                        <Border x:Name=\"PART_ToolBarHost\" Uid=\"Border_51\" Grid.Row=\"1\" Background=\"{TemplateBinding Background}\">\r\n                            <Grid Uid=\"Grid_34\">\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"*\" />\r\n                                    <ColumnDefinition Width=\"*\" />\r\n                                </Grid.ColumnDefinitions>\r\n                                <Border HorizontalAlignment=\"Left\" x:Name=\"PART_FindToolBarHost\" VerticalAlignment=\"Center\" Uid=\"Border_61\" Visibility=\"Collapsed\" />\r\n                                <Grid HorizontalAlignment=\"Right\" VerticalAlignment=\"Center\" Uid=\"Grid_27\" Grid.Column=\"1\">\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition Width=\"Auto\" />\r\n                                        <ColumnDefinition />\r\n                                        <ColumnDefinition Width=\"Auto\" />\r\n                                    </Grid.ColumnDefinitions>\r\n                                    <RepeatButton ToolTip=\"Decrease Zoom\" Width=\"{TemplateBinding FontSize}\" Height=\"{TemplateBinding FontSize}\" BorderBrush=\"{TemplateBinding BorderBrush}\" Foreground=\"{TemplateBinding Foreground}\" IsEnabled=\"{TemplateBinding CanDecreaseZoom}\" Uid=\"RepeatButton_7\" Command=\"NavigationCommands.DecreaseZoom\">\r\n                                        <RepeatButton.Style>\r\n                                            <Style TargetType=\"{x:Type RepeatButton}\">\r\n                                                <Setter Property=\"Padding\" Value=\"2,2,0,2\" />\r\n                                                <Setter Property=\"Template\">\r\n                                                    <Setter.Value>\r\n                                                        <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n                                                            <Border Uid=\"Border_41\" Background=\"#00FFFFFF\" Padding=\"{Binding Path=Padding, RelativeSource={RelativeSource TemplatedParent}}\">\r\n                                                                <Viewbox x:Name=\"Content\" RenderTransformOrigin=\"0.5,0.5\" Uid=\"Viewbox_2\">\r\n                                                                    <Grid Width=\"32\" Height=\"32\" Uid=\"Canvas_4\">\r\n                                                                        <Grid.RowDefinitions>\r\n                                                                            <RowDefinition Height=\"*\" />\r\n                                                                        </Grid.RowDefinitions>\r\n                                                                        <Border Grid.RowSpan=\"1\" CornerRadius=\"16,16,16,16\" BorderThickness=\"1.5,1.5,0.5,0.5\" BorderBrush=\"{DynamicResource SecondaryBrush}\" x:Name=\"border\">\r\n                                                                            <Border.Background>\r\n                                                                                <RadialGradientBrush>\r\n                                                                                    <RadialGradientBrush.RelativeTransform>\r\n                                                                                        <TransformGroup>\r\n                                                                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.788\" ScaleY=\"1.788\" />\r\n                                                                                        </TransformGroup>\r\n                                                                                    </RadialGradientBrush.RelativeTransform>\r\n                                                                                    <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0\" />\r\n                                                                                    <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                                                                </RadialGradientBrush>\r\n                                                                            </Border.Background>\r\n                                                                        </Border>\r\n                                                                        <Path StrokeThickness=\"3\" Uid=\"Path_9\" HorizontalAlignment=\"Right\" Margin=\"0,15.993,6,13.507\" VerticalAlignment=\"Stretch\" Stroke=\"{DynamicResource SecondaryBrush}\">\r\n                                                                            <Path.Data>\r\n                                                                                <LineGeometry EndPoint=\"10,0\" StartPoint=\"-10,0\" />\r\n                                                                            </Path.Data>\r\n                                                                        </Path>\r\n                                                                    </Grid>\r\n                                                                </Viewbox>\r\n                                                            </Border>\r\n                                                            <ControlTemplate.Triggers>\r\n                                                                <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                                                                    <Setter Property=\"Background\" TargetName=\"border\">\r\n                                                                        <Setter.Value>\r\n                                                                            <RadialGradientBrush>\r\n                                                                                <RadialGradientBrush.RelativeTransform>\r\n                                                                                    <TransformGroup>\r\n                                                                                        <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.788\" ScaleY=\"1.788\" />\r\n                                                                                    </TransformGroup>\r\n                                                                                </RadialGradientBrush.RelativeTransform>\r\n                                                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.5\" />\r\n                                                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                                                            </RadialGradientBrush>\r\n                                                                        </Setter.Value>\r\n                                                                    </Setter>\r\n                                                                </Trigger>\r\n                                                                <Trigger Property=\"IsPressed\" Value=\"True\">\r\n                                                                    <Setter Property=\"RenderTransform\" TargetName=\"Content\">\r\n                                                                        <Setter.Value>\r\n                                                                            <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                                                        </Setter.Value>\r\n                                                                    </Setter>\r\n                                                                    <Setter Property=\"Background\" TargetName=\"border\">\r\n                                                                        <Setter.Value>\r\n                                                                            <RadialGradientBrush>\r\n                                                                                <RadialGradientBrush.RelativeTransform>\r\n                                                                                    <TransformGroup>\r\n                                                                                        <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.788\" ScaleY=\"1.788\" />\r\n                                                                                    </TransformGroup>\r\n                                                                                </RadialGradientBrush.RelativeTransform>\r\n                                                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.362\" />\r\n                                                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"0.741\" />\r\n                                                                            </RadialGradientBrush>\r\n                                                                        </Setter.Value>\r\n                                                                    </Setter>\r\n                                                                    <Setter Property=\"BorderThickness\" TargetName=\"border\" Value=\"0.5,0.5,1.75,1.75\" />\r\n                                                                </Trigger>\r\n                                                            </ControlTemplate.Triggers>\r\n                                                        </ControlTemplate>\r\n                                                    </Setter.Value>\r\n                                                </Setter>\r\n                                                <Setter Property=\"BorderBrush\" Value=\"{DynamicResource PrimaryBrush}\" />\r\n                                                <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n                                                <Setter Property=\"Opacity\" Value=\"1\" />\r\n                                                <Style.BasedOn>\r\n                                                    <Style TargetType=\"{x:Type RepeatButton}\">\r\n                                                        <Setter Property=\"Padding\" Value=\"5,5,5,5\" />\r\n                                                        <Setter Property=\"Delay\" Value=\"1000\" />\r\n                                                        <Setter Property=\"Interval\" Value=\"250\" />\r\n                                                        <Style.BasedOn>\r\n                                                            <Style TargetType=\"{x:Type ButtonBase}\">\r\n                                                                <Setter Property=\"Focusable\" Value=\"False\" />\r\n                                                                <Setter Property=\"Opacity\" Value=\"0.5\" />\r\n                                                                <Setter Property=\"Cursor\" Value=\"Hand\" />\r\n                                                                <Setter Property=\"Background\" Value=\"#00FFFFFF\" />\r\n                                                                <Setter Property=\"Padding\" Value=\"3,1,3,1\" />\r\n                                                                <Setter Property=\"BorderBrush\" Value=\"{x:Null}\" />\r\n                                                                <Setter Property=\"BorderThickness\" Value=\"0,0,0,0\" />\r\n                                                                <Setter Property=\"MinWidth\" Value=\"0\" />\r\n                                                                <Setter Property=\"MinHeight\" Value=\"0\" />\r\n                                                                <Setter Property=\"Template\">\r\n                                                                    <Setter.Value>\r\n                                                                        <ControlTemplate TargetType=\"{x:Type ButtonBase}\">\r\n                                                                            <Border Uid=\"Border_39\" Background=\"{TemplateBinding Background}\">\r\n                                                                                <ContentPresenter x:Name=\"Content\" RenderTransformOrigin=\"0.5,0.5\" Uid=\"ContentPresenter_2\" Content=\"{TemplateBinding Content}\" ContentStringFormat=\"{TemplateBinding ContentStringFormat}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" />\r\n                                                                            </Border>\r\n                                                                            <ControlTemplate.Triggers>\r\n                                                                                <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                                                                                    <Setter Property=\"RenderTransform\" TargetName=\"Content\">\r\n                                                                                        <Setter.Value>\r\n                                                                                            <ScaleTransform ScaleX=\"1.1\" ScaleY=\"1.1\" />\r\n                                                                                        </Setter.Value>\r\n                                                                                    </Setter>\r\n                                                                                </Trigger>\r\n                                                                                <Trigger Property=\"IsPressed\" Value=\"True\">\r\n                                                                                    <Setter Property=\"RenderTransform\" TargetName=\"Content\">\r\n                                                                                        <Setter.Value>\r\n                                                                                            <ScaleTransform ScaleX=\"0.9\" ScaleY=\"0.9\" />\r\n                                                                                        </Setter.Value>\r\n                                                                                    </Setter>\r\n                                                                                </Trigger>\r\n                                                                            </ControlTemplate.Triggers>\r\n                                                                        </ControlTemplate>\r\n                                                                    </Setter.Value>\r\n                                                                </Setter>\r\n                                                                <Style.Triggers>\r\n                                                                    <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                                                                        <Setter Property=\"Opacity\" Value=\"0.3\" />\r\n                                                                    </Trigger>\r\n                                                                    <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                                                                        <Setter Property=\"Opacity\" Value=\"1\" />\r\n                                                                    </Trigger>\r\n                                                                </Style.Triggers>\r\n                                                            </Style>\r\n                                                        </Style.BasedOn>\r\n                                                    </Style>\r\n                                                </Style.BasedOn>\r\n                                            </Style>\r\n                                        </RepeatButton.Style>\r\n                                        <RepeatButton.LayoutTransform>\r\n                                            <ScaleTransform ScaleX=\"2.2\" ScaleY=\"2.2\" />\r\n                                        </RepeatButton.LayoutTransform>\r\n                                    </RepeatButton>\r\n                                    <Slider HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Center\" MinWidth=\"50\" FontSize=\"{TemplateBinding FontSize}\" Uid=\"Slider_2\" Grid.Column=\"1\" TickFrequency=\"{TemplateBinding ZoomIncrement}\" LargeChange=\"{TemplateBinding ZoomIncrement}\" Maximum=\"{TemplateBinding MaxZoom}\" Minimum=\"{TemplateBinding MinZoom}\" SmallChange=\"{TemplateBinding ZoomIncrement}\" Value=\"{Binding Path=Zoom, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" />\r\n                                    <RepeatButton ToolTip=\"Increase Zoom\" Width=\"{TemplateBinding FontSize}\" Height=\"{TemplateBinding FontSize}\" BorderBrush=\"{TemplateBinding BorderBrush}\" Foreground=\"{TemplateBinding Foreground}\" IsEnabled=\"{TemplateBinding CanIncreaseZoom}\" Uid=\"RepeatButton_8\" Grid.Column=\"2\" Command=\"NavigationCommands.IncreaseZoom\">\r\n                                        <RepeatButton.Style>\r\n                                            <Style TargetType=\"{x:Type RepeatButton}\">\r\n                                                <Setter Property=\"Padding\" Value=\"2,2,0,2\" />\r\n                                                <Setter Property=\"Template\">\r\n                                                    <Setter.Value>\r\n                                                        <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n                                                            <Border Uid=\"Border_41\" Background=\"#00FFFFFF\" Padding=\"{Binding Path=Padding, RelativeSource={RelativeSource TemplatedParent}}\">\r\n                                                                <Viewbox x:Name=\"Content\" RenderTransformOrigin=\"0.5,0.5\" Uid=\"Viewbox_2\">\r\n                                                                    <Grid Width=\"32\" Height=\"32\" Uid=\"Canvas_4\">\r\n                                                                        <Grid.RowDefinitions>\r\n                                                                            <RowDefinition Height=\"*\" />\r\n                                                                        </Grid.RowDefinitions>\r\n                                                                        <Border Grid.RowSpan=\"1\" BorderThickness=\"1.75,1.75,0.5,0.5\" CornerRadius=\"16,16,16,16\" BorderBrush=\"{DynamicResource SecondaryBrush}\" x:Name=\"border\">\r\n                                                                            <Border.Background>\r\n                                                                                <RadialGradientBrush>\r\n                                                                                    <RadialGradientBrush.RelativeTransform>\r\n                                                                                        <TransformGroup>\r\n                                                                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2.068\" ScaleY=\"2.068\" />\r\n                                                                                        </TransformGroup>\r\n                                                                                    </RadialGradientBrush.RelativeTransform>\r\n                                                                                    <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0\" />\r\n                                                                                    <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                                                                </RadialGradientBrush>\r\n                                                                            </Border.Background>\r\n                                                                        </Border>\r\n                                                                        <Path StrokeThickness=\"3\" Uid=\"Path_12\" Grid.RowSpan=\"1\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Stretch\" Margin=\"0,15.872,6,6\" x:Name=\"path\" Stroke=\"{DynamicResource SecondaryBrush}\">\r\n                                                                            <Path.Data>\r\n                                                                                <GeometryGroup>\r\n                                                                                    <LineGeometry EndPoint=\"10,0\" StartPoint=\"-10,0\" />\r\n                                                                                    <LineGeometry EndPoint=\"0,10\" StartPoint=\"0,-10\" />\r\n                                                                                </GeometryGroup>\r\n                                                                            </Path.Data>\r\n                                                                        </Path>\r\n                                                                    </Grid>\r\n                                                                </Viewbox>\r\n                                                            </Border>\r\n                                                            <ControlTemplate.Triggers>\r\n                                                                <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                                                                    <Setter Property=\"Background\" TargetName=\"border\">\r\n                                                                        <Setter.Value>\r\n                                                                            <RadialGradientBrush>\r\n                                                                                <RadialGradientBrush.RelativeTransform>\r\n                                                                                    <TransformGroup>\r\n                                                                                        <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2.068\" ScaleY=\"2.068\" />\r\n                                                                                    </TransformGroup>\r\n                                                                                </RadialGradientBrush.RelativeTransform>\r\n                                                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.5\" />\r\n                                                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                                                            </RadialGradientBrush>\r\n                                                                        </Setter.Value>\r\n                                                                    </Setter>\r\n                                                                </Trigger>\r\n                                                                <Trigger Property=\"IsPressed\" Value=\"True\">\r\n                                                                    <Setter Property=\"RenderTransform\" TargetName=\"Content\">\r\n                                                                        <Setter.Value>\r\n                                                                            <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                                                        </Setter.Value>\r\n                                                                    </Setter>\r\n                                                                    <Setter Property=\"Background\" TargetName=\"border\">\r\n                                                                        <Setter.Value>\r\n                                                                            <RadialGradientBrush>\r\n                                                                                <RadialGradientBrush.RelativeTransform>\r\n                                                                                    <TransformGroup>\r\n                                                                                        <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2.068\" ScaleY=\"2.068\" />\r\n                                                                                    </TransformGroup>\r\n                                                                                </RadialGradientBrush.RelativeTransform>\r\n                                                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.357\" />\r\n                                                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"0.612\" />\r\n                                                                            </RadialGradientBrush>\r\n                                                                        </Setter.Value>\r\n                                                                    </Setter>\r\n                                                                    <Setter Property=\"BorderThickness\" TargetName=\"border\" Value=\"0.5,0.5,1.75,1.75\" />\r\n                                                                </Trigger>\r\n                                                            </ControlTemplate.Triggers>\r\n                                                        </ControlTemplate>\r\n                                                    </Setter.Value>\r\n                                                </Setter>\r\n                                                <Setter Property=\"BorderBrush\" Value=\"{DynamicResource PrimaryBrush}\" />\r\n                                                <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n                                                <Setter Property=\"Opacity\" Value=\"1\" />\r\n                                                <Style.BasedOn>\r\n                                                    <Style TargetType=\"{x:Type RepeatButton}\">\r\n                                                        <Setter Property=\"Padding\" Value=\"5,5,5,5\" />\r\n                                                        <Setter Property=\"Delay\" Value=\"1000\" />\r\n                                                        <Setter Property=\"Interval\" Value=\"250\" />\r\n                                                        <Style.BasedOn>\r\n                                                            <Style TargetType=\"{x:Type ButtonBase}\">\r\n                                                                <Setter Property=\"Focusable\" Value=\"False\" />\r\n                                                                <Setter Property=\"Opacity\" Value=\"0.5\" />\r\n                                                                <Setter Property=\"Cursor\" Value=\"Hand\" />\r\n                                                                <Setter Property=\"Background\" Value=\"#00FFFFFF\" />\r\n                                                                <Setter Property=\"Padding\" Value=\"3,1,3,1\" />\r\n                                                                <Setter Property=\"BorderBrush\" Value=\"{x:Null}\" />\r\n                                                                <Setter Property=\"BorderThickness\" Value=\"0,0,0,0\" />\r\n                                                                <Setter Property=\"MinWidth\" Value=\"0\" />\r\n                                                                <Setter Property=\"MinHeight\" Value=\"0\" />\r\n                                                                <Setter Property=\"Template\">\r\n                                                                    <Setter.Value>\r\n                                                                        <ControlTemplate TargetType=\"{x:Type ButtonBase}\">\r\n                                                                            <Border Uid=\"Border_39\" Background=\"{TemplateBinding Background}\">\r\n                                                                                <ContentPresenter x:Name=\"Content\" RenderTransformOrigin=\"0.5,0.5\" Uid=\"ContentPresenter_2\" Content=\"{TemplateBinding Content}\" ContentStringFormat=\"{TemplateBinding ContentStringFormat}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" />\r\n                                                                            </Border>\r\n                                                                            <ControlTemplate.Triggers>\r\n                                                                                <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                                                                                    <Setter Property=\"RenderTransform\" TargetName=\"Content\">\r\n                                                                                        <Setter.Value>\r\n                                                                                            <ScaleTransform ScaleX=\"1.1\" ScaleY=\"1.1\" />\r\n                                                                                        </Setter.Value>\r\n                                                                                    </Setter>\r\n                                                                                </Trigger>\r\n                                                                                <Trigger Property=\"IsPressed\" Value=\"True\">\r\n                                                                                    <Setter Property=\"RenderTransform\" TargetName=\"Content\">\r\n                                                                                        <Setter.Value>\r\n                                                                                            <ScaleTransform ScaleX=\"0.9\" ScaleY=\"0.9\" />\r\n                                                                                        </Setter.Value>\r\n                                                                                    </Setter>\r\n                                                                                </Trigger>\r\n                                                                            </ControlTemplate.Triggers>\r\n                                                                        </ControlTemplate>\r\n                                                                    </Setter.Value>\r\n                                                                </Setter>\r\n                                                                <Style.Triggers>\r\n                                                                    <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                                                                        <Setter Property=\"Opacity\" Value=\"0.3\" />\r\n                                                                    </Trigger>\r\n                                                                    <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                                                                        <Setter Property=\"Opacity\" Value=\"1\" />\r\n                                                                    </Trigger>\r\n                                                                </Style.Triggers>\r\n                                                            </Style>\r\n                                                        </Style.BasedOn>\r\n                                                    </Style>\r\n                                                </Style.BasedOn>\r\n                                            </Style>\r\n                                        </RepeatButton.Style>\r\n                                        <RepeatButton.LayoutTransform>\r\n                                            <ScaleTransform ScaleX=\"2.2\" ScaleY=\"2.2\" />\r\n                                        </RepeatButton.LayoutTransform>\r\n                                    </RepeatButton>\r\n                                </Grid>\r\n                            </Grid>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- ListBox -->\r\n    <Style TargetType=\"{x:Type ListBox}\">\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource PrimaryBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\" />\r\n        <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\" />\r\n        <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"true\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource SecondaryBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListBox}\">\r\n                    <Border x:Name=\"Bd\" SnapsToDevicePixels=\"true\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"1\" CornerRadius=\"4,4,4,4\">\r\n                        <Grid x:Name=\"grid\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"*\" />\r\n                            </Grid.RowDefinitions>\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"*\" />\r\n                            </Grid.ColumnDefinitions>\r\n                            <Border BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"4,4,4,4\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" Opacity=\"1\" x:Name=\"border\" />\r\n                            <Grid x:Name=\"Shadow\">\r\n                                <Grid.RowDefinitions>\r\n                                    <RowDefinition Height=\"6\" />\r\n                                    <RowDefinition Height=\"*\" />\r\n                                    <RowDefinition Height=\"6\" />\r\n                                </Grid.RowDefinitions>\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"6\" />\r\n                                    <ColumnDefinition Width=\"*\" />\r\n                                    <ColumnDefinition Width=\"6\" />\r\n                                </Grid.ColumnDefinitions>\r\n                                <Border Background=\"{StaticResource SecondaryBrush}\" CornerRadius=\"2.5,0,0,0\">\r\n                                    <Border.OpacityMask>\r\n                                        <RadialGradientBrush GradientOrigin=\"0.655,0.644\">\r\n                                            <RadialGradientBrush.RelativeTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"3.489\" ScaleY=\"3.489\" />\r\n                                                    <SkewTransform AngleX=\"0\" AngleY=\"0\" CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                                                    <RotateTransform Angle=\"0\" CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                                                    <TranslateTransform X=\"-0.063\" Y=\"-0.025\" />\r\n                                                </TransformGroup>\r\n                                            </RadialGradientBrush.RelativeTransform>\r\n                                            <GradientStop />\r\n                                            <GradientStop Color=\"#A5FFFFFF\" Offset=\"1\" />\r\n                                        </RadialGradientBrush>\r\n                                    </Border.OpacityMask>\r\n                                </Border>\r\n                                <Border Background=\"{StaticResource SecondaryBrush}\" Grid.Column=\"1\">\r\n                                    <Border.OpacityMask>\r\n                                        <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,-1.025\">\r\n                                            <GradientStop Color=\"#A5FFFFFF\" Offset=\"0\" />\r\n                                            <GradientStop Offset=\"1\" />\r\n                                        </LinearGradientBrush>\r\n                                    </Border.OpacityMask>\r\n                                </Border>\r\n                                <Border Background=\"{StaticResource SecondaryBrush}\" CornerRadius=\"0,2.5,0,0\" Grid.Column=\"2\">\r\n                                    <Border.OpacityMask>\r\n                                        <RadialGradientBrush GradientOrigin=\"0.283,0.71\">\r\n                                            <RadialGradientBrush.RelativeTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2.805\" ScaleY=\"2.805\" />\r\n                                                    <SkewTransform AngleX=\"0\" AngleY=\"0\" CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                                                    <RotateTransform Angle=\"0\" CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                                                    <TranslateTransform X=\"0.144\" Y=\"-0.125\" />\r\n                                                </TransformGroup>\r\n                                            </RadialGradientBrush.RelativeTransform>\r\n                                            <GradientStop />\r\n                                            <GradientStop Color=\"#A5FFFFFF\" Offset=\"1\" />\r\n                                        </RadialGradientBrush>\r\n                                    </Border.OpacityMask>\r\n                                </Border>\r\n                                <Border Background=\"{StaticResource SecondaryBrush}\" Grid.Row=\"1\">\r\n                                    <Border.OpacityMask>\r\n                                        <LinearGradientBrush EndPoint=\"1,.5\" StartPoint=\"-0.972,0.5\">\r\n                                            <GradientStop Color=\"#00000000\" Offset=\"1\" />\r\n                                            <GradientStop Color=\"#A5FFFFFF\" Offset=\"0\" />\r\n                                        </LinearGradientBrush>\r\n                                    </Border.OpacityMask>\r\n                                </Border>\r\n                                <Border Background=\"{StaticResource SecondaryBrush}\" OpacityMask=\"#00000000\" Grid.Column=\"1\" Grid.Row=\"1\" />\r\n                                <Border Background=\"{StaticResource SecondaryBrush}\" Grid.Column=\"2\" Grid.Row=\"1\">\r\n                                    <Border.OpacityMask>\r\n                                        <LinearGradientBrush EndPoint=\"0,0.5\" StartPoint=\"2.01,0.5\">\r\n                                            <GradientStop Color=\"#A5FFFFFF\" Offset=\"0\" />\r\n                                            <GradientStop Color=\"#00FFFFFF\" Offset=\"1\" />\r\n                                        </LinearGradientBrush>\r\n                                    </Border.OpacityMask>\r\n                                </Border>\r\n                                <Border Background=\"{StaticResource SecondaryBrush}\" CornerRadius=\"0,0,0,2.5\" Grid.Row=\"2\">\r\n                                    <Border.OpacityMask>\r\n                                        <RadialGradientBrush GradientOrigin=\"0.646,0.361\">\r\n                                            <RadialGradientBrush.RelativeTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"3.438\" ScaleY=\"3.438\" />\r\n                                                    <SkewTransform AngleX=\"0\" AngleY=\"0\" CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                                                    <RotateTransform Angle=\"0\" CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                                                    <TranslateTransform X=\"-0.072\" Y=\"0.072\" />\r\n                                                </TransformGroup>\r\n                                            </RadialGradientBrush.RelativeTransform>\r\n                                            <GradientStop />\r\n                                            <GradientStop Color=\"#A5FFFFFF\" Offset=\"1\" />\r\n                                        </RadialGradientBrush>\r\n                                    </Border.OpacityMask>\r\n                                </Border>\r\n                                <Border Background=\"{StaticResource SecondaryBrush}\" Margin=\"0,0,0,0\" Grid.Column=\"1\" Grid.Row=\"2\">\r\n                                    <Border.OpacityMask>\r\n                                        <LinearGradientBrush EndPoint=\"0.5,2.065\" StartPoint=\"0.5,0\">\r\n                                            <GradientStop Color=\"#00000000\" Offset=\"0\" />\r\n                                            <GradientStop Color=\"#A5FFFFFF\" Offset=\"1\" />\r\n                                        </LinearGradientBrush>\r\n                                    </Border.OpacityMask>\r\n                                </Border>\r\n                                <Border Background=\"{StaticResource SecondaryBrush}\" CornerRadius=\"0,0,2.5,0\" Grid.Column=\"2\" Grid.Row=\"2\">\r\n                                    <Border.OpacityMask>\r\n                                        <RadialGradientBrush GradientOrigin=\"0.287,0.495\">\r\n                                            <RadialGradientBrush.RelativeTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"4.282\" ScaleY=\"3.792\" />\r\n                                                    <SkewTransform AngleX=\"0\" AngleY=\"0\" CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                                                    <RotateTransform Angle=\"0\" CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                                                    <TranslateTransform X=\"0.495\" Y=\"-0.463\" />\r\n                                                </TransformGroup>\r\n                                            </RadialGradientBrush.RelativeTransform>\r\n                                            <GradientStop />\r\n                                            <GradientStop Color=\"#A5FFFFFF\" Offset=\"1\" />\r\n                                        </RadialGradientBrush>\r\n                                    </Border.OpacityMask>\r\n                                </Border>\r\n                            </Grid>\r\n                            <ScrollViewer Padding=\"{TemplateBinding Padding}\" Focusable=\"false\" Grid.ColumnSpan=\"1\" Grid.RowSpan=\"1\" Margin=\"4,4,4,4\" Foreground=\"{DynamicResource TextBrush}\" x:Name=\"scrollViewer\">\r\n                                <ItemsPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" />\r\n                            </ScrollViewer>\r\n                        </Grid>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"border\" Value=\"0.65\" />\r\n                            <Setter Property=\"Opacity\" TargetName=\"scrollViewer\" Value=\"0.65\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                            <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- ListBoxItem -->\r\n    <Style TargetType=\"{x:Type ListBoxItem}\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"MinHeight\" Value=\"20\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListBoxItem}\">\r\n                    <Border x:Name=\"Bd\" SnapsToDevicePixels=\"true\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.2000000\" To=\"MouseOver\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.35\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualState x:Name=\"Unselected\" />\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"rectangleSelected\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"rectangleSelected\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.75\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"rectangle1\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid>\r\n                            <Rectangle x:Name=\"rectangleSelected\" Opacity=\"0\" RadiusX=\"3\" RadiusY=\"3\" Stroke=\"{DynamicResource SecondaryBrush}\">\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                        <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0\" />\r\n                                        <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                            <Rectangle x:Name=\"rectangle\" Opacity=\"0\" Stroke=\"{DynamicResource SecondaryBrush}\" RadiusX=\"3\" RadiusY=\"3\">\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                        <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0\" />\r\n                                        <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                            <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"contentPresenter\" />\r\n                            <Rectangle Stroke=\"{DynamicResource SecondaryBrush}\" Margin=\"0,0,0,0\" RadiusX=\"3\" RadiusY=\"3\" Visibility=\"Collapsed\" x:Name=\"rectangle1\" />\r\n                        </Grid>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"contentPresenter\" Value=\"0.55\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- TabControl -->\r\n    <Style TargetType=\"{x:Type TabControl}\">\r\n        <Setter Property=\"Background\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0\" />\r\n                    <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"1\" />\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Padding\" Value=\"4,4,4,4\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource SecondaryBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TabControl}\">\r\n                    <Grid ClipToBounds=\"true\" SnapsToDevicePixels=\"true\" KeyboardNavigation.TabNavigation=\"Local\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition x:Name=\"ColumnDefinition0\" />\r\n                            <ColumnDefinition x:Name=\"ColumnDefinition1\" Width=\"0\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition x:Name=\"RowDefinition0\" Height=\"Auto\" />\r\n                            <RowDefinition x:Name=\"RowDefinition1\" Height=\"*\" />\r\n                        </Grid.RowDefinitions>\r\n                        <TabPanel Margin=\"8,2,8,0\" x:Name=\"HeaderPanel\" IsItemsHost=\"true\" Panel.ZIndex=\"1\" KeyboardNavigation.TabIndex=\"1\" />\r\n                        <Border CornerRadius=\"4,4,4,4\" x:Name=\"Background\" Grid.Row=\"1\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\">\r\n                            <Border.BorderBrush>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1.522\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Border.BorderBrush>\r\n                            <Grid>\r\n                                <Grid x:Name=\"Shadow\">\r\n                                    <Grid.RowDefinitions>\r\n                                        <RowDefinition Height=\"6\" />\r\n                                        <RowDefinition Height=\"*\" />\r\n                                        <RowDefinition Height=\"6\" />\r\n                                    </Grid.RowDefinitions>\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition Width=\"6\" />\r\n                                        <ColumnDefinition Width=\"*\" />\r\n                                        <ColumnDefinition Width=\"6\" />\r\n                                    </Grid.ColumnDefinitions>\r\n                                    <Border Background=\"{StaticResource SecondaryBrush}\" CornerRadius=\"2.5,0,0,0\">\r\n                                        <Border.OpacityMask>\r\n                                            <RadialGradientBrush GradientOrigin=\"0.655,0.644\">\r\n                                                <RadialGradientBrush.RelativeTransform>\r\n                                                    <TransformGroup>\r\n                                                        <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"3.489\" ScaleY=\"3.489\" />\r\n                                                        <TranslateTransform X=\"-0.063\" Y=\"-0.025\" />\r\n                                                    </TransformGroup>\r\n                                                </RadialGradientBrush.RelativeTransform>\r\n                                                <GradientStop />\r\n                                                <GradientStop Color=\"#A5FFFFFF\" Offset=\"1\" />\r\n                                            </RadialGradientBrush>\r\n                                        </Border.OpacityMask>\r\n                                    </Border>\r\n                                    <Border Background=\"{StaticResource SecondaryBrush}\" Grid.Column=\"1\">\r\n                                        <Border.OpacityMask>\r\n                                            <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,-1.025\">\r\n                                                <GradientStop Color=\"#A5FFFFFF\" Offset=\"0\" />\r\n                                                <GradientStop Offset=\"1\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Border.OpacityMask>\r\n                                    </Border>\r\n                                    <Border Background=\"{StaticResource SecondaryBrush}\" CornerRadius=\"0,2.5,0,0\" Grid.Column=\"2\">\r\n                                        <Border.OpacityMask>\r\n                                            <RadialGradientBrush GradientOrigin=\"0.283,0.71\">\r\n                                                <RadialGradientBrush.RelativeTransform>\r\n                                                    <TransformGroup>\r\n                                                        <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2.805\" ScaleY=\"2.805\" />\r\n                                                        <TranslateTransform X=\"0.144\" Y=\"-0.125\" />\r\n                                                    </TransformGroup>\r\n                                                </RadialGradientBrush.RelativeTransform>\r\n                                                <GradientStop />\r\n                                                <GradientStop Color=\"#A5FFFFFF\" Offset=\"1\" />\r\n                                            </RadialGradientBrush>\r\n                                        </Border.OpacityMask>\r\n                                    </Border>\r\n                                    <Border Background=\"{StaticResource SecondaryBrush}\" Grid.Row=\"1\">\r\n                                        <Border.OpacityMask>\r\n                                            <LinearGradientBrush EndPoint=\"1,.5\" StartPoint=\"-0.972,0.5\">\r\n                                                <GradientStop Color=\"#00000000\" Offset=\"1\" />\r\n                                                <GradientStop Color=\"#A5FFFFFF\" Offset=\"0\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Border.OpacityMask>\r\n                                    </Border>\r\n                                    <Border Background=\"{StaticResource SecondaryBrush}\" OpacityMask=\"#00000000\" Grid.Column=\"1\" Grid.Row=\"1\" />\r\n                                    <Border Background=\"{StaticResource SecondaryBrush}\" Grid.Column=\"2\" Grid.Row=\"1\">\r\n                                        <Border.OpacityMask>\r\n                                            <LinearGradientBrush EndPoint=\"0,0.5\" StartPoint=\"2.01,0.5\">\r\n                                                <GradientStop Color=\"#A5FFFFFF\" Offset=\"0\" />\r\n                                                <GradientStop Color=\"#00FFFFFF\" Offset=\"1\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Border.OpacityMask>\r\n                                    </Border>\r\n                                    <Border Background=\"{StaticResource SecondaryBrush}\" CornerRadius=\"0,0,0,2.5\" Grid.Row=\"2\">\r\n                                        <Border.OpacityMask>\r\n                                            <RadialGradientBrush GradientOrigin=\"0.646,0.361\">\r\n                                                <RadialGradientBrush.RelativeTransform>\r\n                                                    <TransformGroup>\r\n                                                        <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"3.438\" ScaleY=\"3.438\" />\r\n                                                        <TranslateTransform X=\"-0.072\" Y=\"0.072\" />\r\n                                                    </TransformGroup>\r\n                                                </RadialGradientBrush.RelativeTransform>\r\n                                                <GradientStop />\r\n                                                <GradientStop Color=\"#A5FFFFFF\" Offset=\"1\" />\r\n                                            </RadialGradientBrush>\r\n                                        </Border.OpacityMask>\r\n                                    </Border>\r\n                                    <Border Background=\"{StaticResource SecondaryBrush}\" Margin=\"0,0,0,0\" Grid.Column=\"1\" Grid.Row=\"2\">\r\n                                        <Border.OpacityMask>\r\n                                            <LinearGradientBrush EndPoint=\"0.5,2.065\" StartPoint=\"0.5,0\">\r\n                                                <GradientStop Color=\"#00000000\" Offset=\"0\" />\r\n                                                <GradientStop Color=\"#A5FFFFFF\" Offset=\"1\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Border.OpacityMask>\r\n                                    </Border>\r\n                                    <Border Background=\"{StaticResource SecondaryBrush}\" CornerRadius=\"0,0,2.5,0\" Grid.Column=\"2\" Grid.Row=\"2\">\r\n                                        <Border.OpacityMask>\r\n                                            <RadialGradientBrush GradientOrigin=\"0.287,0.495\">\r\n                                                <RadialGradientBrush.RelativeTransform>\r\n                                                    <TransformGroup>\r\n                                                        <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"4.282\" ScaleY=\"3.792\" />\r\n                                                        <TranslateTransform X=\"0.495\" Y=\"-0.463\" />\r\n                                                    </TransformGroup>\r\n                                                </RadialGradientBrush.RelativeTransform>\r\n                                                <GradientStop />\r\n                                                <GradientStop Color=\"#A5FFFFFF\" Offset=\"1\" />\r\n                                            </RadialGradientBrush>\r\n                                        </Border.OpacityMask>\r\n                                    </Border>\r\n                                </Grid>\r\n                                <Border x:Name=\"ContentPanel\" KeyboardNavigation.DirectionalNavigation=\"Contained\" KeyboardNavigation.TabIndex=\"2\" KeyboardNavigation.TabNavigation=\"Local\">\r\n                                    <Grid Margin=\"6,6,6,6\">\r\n                                        <ContentPresenter Margin=\"1,1,1,1\" x:Name=\"PART_SelectedContentHost\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" ContentSource=\"SelectedContent\" />\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Grid>\r\n                        </Border>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Bottom\">\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"HeaderPanel\" Value=\"1\" />\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition1\" Value=\"Auto\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"HeaderPanel\" Value=\"8,0,8,2\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"ContentPanel\" Value=\"3,3,0,0\" />\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"Background\" Value=\"0\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Left\">\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"HeaderPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"HeaderPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"ContentPanel\" Value=\"1\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition0\" Value=\"Auto\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition1\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition1\" Value=\"0\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"HeaderPanel\" Value=\"2,8,0,8\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"ContentPanel\" Value=\"0,3,3,0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"Background\" Value=\"1\" />\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"Background\" Value=\"0\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Right\">\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"HeaderPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"HeaderPanel\" Value=\"1\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition1\" Value=\"Auto\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition1\" Value=\"0\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"HeaderPanel\" Value=\"0,8,2,8\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"ContentPanel\" Value=\"3,0,0,3\" />\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"Background\" Value=\"0\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"PART_SelectedContentHost\" Value=\"0.5\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- TabItem -->\r\n    <Style TargetType=\"{x:Type TabItem}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Padding\" Value=\"6,1,6,1\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource SecondaryBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource PrimaryBrush}\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TabItem}\">\r\n                    <Grid SnapsToDevicePixels=\"true\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"*\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Border Grid.RowSpan=\"1\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1,1,1,0\" CornerRadius=\"6,6,0,0\" x:Name=\"Background\" Opacity=\"0.65\">\r\n                            <Border.Background>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1.546\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.344\" />\r\n                                    <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <Border x:Name=\"BdSelected\" CornerRadius=\"8,8,0,0\" Visibility=\"Collapsed\" Margin=\"-2,-2,-2,-6\" Background=\"{TemplateBinding Background}\">\r\n                            <Border CornerRadius=\"7,7,0,0\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1,1,1,0\" Visibility=\"Collapsed\" x:Name=\"borderSelected\" Margin=\"0,0,0,5\" />\r\n                        </Border>\r\n                        <ContentPresenter HorizontalAlignment=\"{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\" x:Name=\"Content\" VerticalAlignment=\"{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" ContentSource=\"Header\" RecognizesAccessKey=\"True\" Grid.RowSpan=\"1\" Margin=\"{TemplateBinding Padding}\" />\r\n                        <Border BorderBrush=\"{x:Null}\" CornerRadius=\"8,8,0,0\" x:Name=\"Disabled\" Grid.RowSpan=\"1\" Background=\"#8CFFFFFF\" Visibility=\"Collapsed\" Margin=\"-2,-2,-2,-2\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"BdSelected\" Value=\"0.8\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsSelected\" Value=\"true\">\r\n                            <Setter Property=\"Panel.ZIndex\" Value=\"1\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Background\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"BdSelected\" Value=\"Visible\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"borderSelected\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsSelected\" Value=\"false\" />\r\n                                <Condition Property=\"IsMouseOver\" Value=\"true\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <Setter Property=\"Background\" TargetName=\"Background\">\r\n                                <Setter.Value>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,1.546\" StartPoint=\"0.5,0\">\r\n                                        <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0\" />\r\n                                        <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"0.621\" />\r\n                                    </LinearGradientBrush>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Bottom\">\r\n                            <Setter Property=\"BorderThickness\" TargetName=\"BdSelected\" Value=\"1,0,1,1\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"BdSelected\" Value=\"0,0,3,3\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"borderSelected\" Value=\"0,0,3,3\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"Background\" Value=\"0,0,6,6\" />\r\n                            <Setter Property=\"BorderThickness\" TargetName=\"Background\" Value=\"1,0,1,1\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"Disabled\" Value=\"0,0,0,0\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"Disabled\" Value=\"0,0,6,6\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Disabled\" Value=\"Collapsed\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Left\">\r\n                            <Setter Property=\"BorderThickness\" TargetName=\"BdSelected\" Value=\"1,1,0,1\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"BdSelected\" Value=\"3,0,0,3\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"borderSelected\" Value=\"3,0,0,3\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"Background\" Value=\"6,0,0,6\" />\r\n                            <Setter Property=\"BorderThickness\" TargetName=\"Background\" Value=\"1,1,0,1\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"Disabled\" Value=\"0,0,0,0\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"Disabled\" Value=\"6,0,0,6\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Disabled\" Value=\"Collapsed\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Right\">\r\n                            <Setter Property=\"BorderThickness\" TargetName=\"BdSelected\" Value=\"0,1,1,1\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"BdSelected\" Value=\"0,3,3,0\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"borderSelected\" Value=\"0,3,3,0\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"Background\" Value=\"0,6,6,0\" />\r\n                            <Setter Property=\"BorderThickness\" TargetName=\"Background\" Value=\"0,1,1,1\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"Disabled\" Value=\"0,0,0,0\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"Disabled\" Value=\"0,6,6,0\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Disabled\" Value=\"Collapsed\" />\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsSelected\" Value=\"true\" />\r\n                                <Condition Property=\"TabStripPlacement\" Value=\"Top\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <Setter Property=\"Visibility\" TargetName=\"Background\" Value=\"Hidden\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"BdSelected\" Value=\"Visible\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"borderSelected\" Value=\"Visible\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"BdSelected\" Value=\"-2,0,-2,-6\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"Disabled\" Value=\"-2,0,-2,-2\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Disabled\" Value=\"Collapsed\" />\r\n                        </MultiTrigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsSelected\" Value=\"true\" />\r\n                                <Condition Property=\"TabStripPlacement\" Value=\"Bottom\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <Setter Property=\"Margin\" Value=\"-2,-1,-2,-2\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"Content\" Value=\"6,1,6,1\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"BdSelected\" Value=\"Visible\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"borderSelected\" Value=\"Visible\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Background\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"BorderThickness\" TargetName=\"borderSelected\" Value=\"1,0,1,1\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"BdSelected\" Value=\"0,0,8,8\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"BdSelected\" Value=\"-2,-6,-2,0\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"borderSelected\" Value=\"0,0,7,7\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"borderSelected\" Value=\"0,5,0,0\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"Disabled\" Value=\"-2,-2,-2,0\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"Disabled\" Value=\"0,0,8,8\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Disabled\" Value=\"Collapsed\" />\r\n                        </MultiTrigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsSelected\" Value=\"true\" />\r\n                                <Condition Property=\"TabStripPlacement\" Value=\"Left\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <Setter Property=\"Margin\" Value=\"-2,-2,-1,-2\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"Content\" Value=\"6,1,6,1\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Background\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"BdSelected\" Value=\"Visible\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"borderSelected\" Value=\"Visible\" />\r\n                            <Setter Property=\"BorderThickness\" TargetName=\"borderSelected\" Value=\"1,1,0,1\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"BdSelected\" Value=\"8,0,0,8\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"BdSelected\" Value=\"0,-2,-6,-2\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"borderSelected\" Value=\"7,0,0,7\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"borderSelected\" Value=\"0,0,6,0\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"Disabled\" Value=\"8,0,0,8\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"Disabled\" Value=\"0,-2,-2,-2\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Disabled\" Value=\"Collapsed\" />\r\n                        </MultiTrigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsSelected\" Value=\"true\" />\r\n                                <Condition Property=\"TabStripPlacement\" Value=\"Right\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <Setter Property=\"Margin\" Value=\"-1,-2,-2,-2\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"Content\" Value=\"6,1,6,1\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Background\" Value=\"Hidden\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"BdSelected\" Value=\"Visible\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"borderSelected\" Value=\"Visible\" />\r\n                            <Setter Property=\"BorderThickness\" TargetName=\"borderSelected\" Value=\"0,1,1,1\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"BdSelected\" Value=\"0,8,8,0\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"BdSelected\" Value=\"-6,-2,0,-2\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"borderSelected\" Value=\"6,0,0,0\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"borderSelected\" Value=\"0,7,7,0\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"Disabled\" Value=\"0,8,8,0\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"Disabled\" Value=\"-2,-2,0,-2\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Disabled\" Value=\"Collapsed\" />\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"Disabled\" Value=\"Visible\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"Disabled\" Value=\"0,0,0,0\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"Disabled\" Value=\"6,6,0,0\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"IsSelected\" Value=\"False\" />\r\n    </Style>\r\n\r\n    <!-- ComboBox -->\r\n    <Style TargetType=\"{x:Type ComboBox}\">\r\n        <Style.Resources>\r\n            <Geometry x:Key=\"DownArrowGeometry\">M 0 0 L 3.5 4 L 7 0 Z</Geometry>\r\n            <Style x:Key=\"ComboBoxReadonlyToggleButton\" TargetType=\"{x:Type ToggleButton}\">\r\n                <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n                <Setter Property=\"IsTabStop\" Value=\"false\" />\r\n                <Setter Property=\"Focusable\" Value=\"false\" />\r\n                <Setter Property=\"ClickMode\" Value=\"Press\" />\r\n                <Setter Property=\"Background\" Value=\"{DynamicResource PrimaryBrush}\" />\r\n                <Setter Property=\"BorderBrush\" Value=\"{DynamicResource SecondaryBrush}\" />\r\n                <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                            <Grid>\r\n                                <VisualStateManager.VisualStateGroups>\r\n                                    <VisualStateGroup x:Name=\"CommonStates\">\r\n                                        <VisualStateGroup.Transitions>\r\n                                            <VisualTransition GeneratedDuration=\"00:00:00.2000000\" />\r\n                                            <VisualTransition From=\"MouseOver\" GeneratedDuration=\"00:00:00\" To=\"Pressed\" />\r\n                                            <VisualTransition From=\"Pressed\" GeneratedDuration=\"00:00:00\" />\r\n                                        </VisualStateGroup.Transitions>\r\n                                        <VisualState x:Name=\"Normal\" />\r\n                                        <VisualState x:Name=\"MouseOver\">\r\n                                            <Storyboard>\r\n                                                <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Shadow\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                    <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\" />\r\n                                                </DoubleAnimationUsingKeyFrames>\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                        <VisualState x:Name=\"Pressed\">\r\n                                            <Storyboard>\r\n                                                <ThicknessAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"border\" Storyboard.TargetProperty=\"(Border.BorderThickness)\">\r\n                                                    <SplineThicknessKeyFrame KeyTime=\"0\" Value=\"2.5,2.5,0.5,0.5\" />\r\n                                                </ThicknessAnimationUsingKeyFrames>\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                    </VisualStateGroup>\r\n                                    <VisualStateGroup x:Name=\"FocusStates\">\r\n                                        <VisualState x:Name=\"Focused\">\r\n                                            <Storyboard>\r\n                                                <ObjectAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Focus\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                        <VisualState x:Name=\"Unfocused\" />\r\n                                    </VisualStateGroup>\r\n                                </VisualStateManager.VisualStateGroups>\r\n                                <Grid.RowDefinitions>\r\n                                    <RowDefinition Height=\"*\" />\r\n                                </Grid.RowDefinitions>\r\n                                <Border Grid.RowSpan=\"1\" CornerRadius=\"12,12,12,12\" BorderThickness=\"1,1,1,1\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" x:Name=\"border\" />\r\n                                <Grid x:Name=\"Shadow\">\r\n                                    <Border Background=\"{TemplateBinding BorderBrush}\" OpacityMask=\"{DynamicResource BottomShadowMask}\" CornerRadius=\"12,12,12,12\" />\r\n                                    <Border CornerRadius=\"12,12,12,12\" Background=\"{TemplateBinding BorderBrush}\" OpacityMask=\"{DynamicResource HaloMask}\" />\r\n                                </Grid>\r\n                                <Grid Width=\"{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}\" HorizontalAlignment=\"Right\" Grid.RowSpan=\"1\">\r\n                                    <Path Fill=\"{TemplateBinding Foreground}\" HorizontalAlignment=\"Center\" x:Name=\"Arrow\" VerticalAlignment=\"Center\" Data=\"{StaticResource DownArrowGeometry}\" />\r\n                                </Grid>\r\n                                <Border Grid.RowSpan=\"1\" Margin=\"-3,-3,-3,-3\" CornerRadius=\"13,13,13,13\" BorderThickness=\"1,1,1,1\" BorderBrush=\"{DynamicResource SecondaryBrush}\" Visibility=\"Collapsed\" OpacityMask=\"{DynamicResource FocusMask}\" x:Name=\"Focus\" />\r\n                                <Border CornerRadius=\"12,12,12,12\" Visibility=\"Collapsed\" x:Name=\"Disabled\">\r\n                                    <Border.Background>\r\n                                        <SolidColorBrush Color=\"{DynamicResource DisabledColor}\" />\r\n                                    </Border.Background>\r\n                                </Border>\r\n                            </Grid>\r\n                            <ControlTemplate.Triggers>\r\n                                <Trigger Property=\"IsChecked\" Value=\"true\" />\r\n                                <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                                    <Setter Property=\"Visibility\" TargetName=\"Focus\" Value=\"Visible\" />\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                                    <Setter Property=\"Fill\" TargetName=\"Arrow\" Value=\"#AFAFAF\" />\r\n                                    <Setter Property=\"Visibility\" TargetName=\"Disabled\" Value=\"Visible\" />\r\n                                </Trigger>\r\n                            </ControlTemplate.Triggers>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n            <ControlTemplate x:Key=\"ComboBoxEditableTemplate\" TargetType=\"{x:Type ComboBox}\">\r\n                <ControlTemplate.Resources>\r\n                    <Style x:Name=\"EditComboTextBox\" TargetType=\"{x:Type TextBox}\">\r\n                        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n                        <Setter Property=\"Background\" Value=\"{DynamicResource PrimaryBrush}\" />\r\n                        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource SecondaryBrush}\" />\r\n                        <Setter Property=\"BorderThickness\" Value=\"1,1.5,0.5,0.5\" />\r\n                        <Setter Property=\"Padding\" Value=\"1\" />\r\n                        <Setter Property=\"AllowDrop\" Value=\"true\" />\r\n                        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\" />\r\n                        <Setter Property=\"MinWidth\" Value=\"0\" />\r\n                        <Setter Property=\"MinHeight\" Value=\"0\" />\r\n                        <Setter Property=\"Template\">\r\n                            <Setter.Value>\r\n                                <ControlTemplate TargetType=\"{x:Type TextBox}\">\r\n                                    <Grid>\r\n                                        <VisualStateManager.VisualStateGroups>\r\n                                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                                <VisualState x:Name=\"Normal\" />\r\n                                                <VisualState x:Name=\"MouseOver\">\r\n                                                    <Storyboard>\r\n                                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"InnerShadow\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\" />\r\n                                                        </DoubleAnimationUsingKeyFrames>\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                                <VisualState x:Name=\"Disabled\">\r\n                                                    <Storyboard>\r\n                                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"PART_ContentHost\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.35\" />\r\n                                                        </DoubleAnimationUsingKeyFrames>\r\n                                                        <ThicknessAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"White\" Storyboard.TargetProperty=\"(Border.BorderThickness)\">\r\n                                                            <SplineThicknessKeyFrame KeyTime=\"0\" Value=\"0.5,0.5,0.5,0.5\" />\r\n                                                        </ThicknessAnimationUsingKeyFrames>\r\n                                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"InnerShadow\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.65\" />\r\n                                                        </DoubleAnimationUsingKeyFrames>\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                                <VisualState x:Name=\"ReadOnly\" />\r\n                                            </VisualStateGroup>\r\n                                        </VisualStateManager.VisualStateGroups>\r\n                                        <Border Background=\"{TemplateBinding Background}\" x:Name=\"White\" BorderBrush=\"{TemplateBinding BorderBrush}\" CornerRadius=\"4,4,4,4\" BorderThickness=\"1,1.5,0.5,0.5\" />\r\n                                        <Grid x:Name=\"InnerShadow\">\r\n                                            <Border x:Name=\"BottomShadow\" Background=\"{TemplateBinding BorderBrush}\" CornerRadius=\"4,4,4,4\" OpacityMask=\"{DynamicResource BoxBottomShadowMask}\" />\r\n                                            <Border x:Name=\"Halo\" Background=\"{TemplateBinding BorderBrush}\" CornerRadius=\"4,4,4,4\" OpacityMask=\"{DynamicResource HaloMask}\" />\r\n                                        </Grid>\r\n                                        <ScrollViewer x:Name=\"PART_ContentHost\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" />\r\n                                        <Border CornerRadius=\"7,7,7,7\" Margin=\"-3,-3,-3,-3\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1,1,1,1\" OpacityMask=\"{DynamicResource FocusMask}\" Visibility=\"Collapsed\" x:Name=\"border\" />\r\n                                    </Grid>\r\n                                    <ControlTemplate.Triggers>\r\n                                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                                            <Setter Property=\"BorderThickness\" TargetName=\"White\" Value=\"0.5,0.5,0.5,0.5\" />\r\n                                            <Setter Property=\"Opacity\" TargetName=\"InnerShadow\" Value=\"0.65\" />\r\n                                            <Setter Property=\"Opacity\" TargetName=\"PART_ContentHost\" Value=\"0.35\" />\r\n                                        </Trigger>\r\n                                    </ControlTemplate.Triggers>\r\n                                </ControlTemplate>\r\n                            </Setter.Value>\r\n                        </Setter>\r\n                    </Style>\r\n                </ControlTemplate.Resources>\r\n                <Grid x:Name=\"Placement\" SnapsToDevicePixels=\"true\">\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"*\" />\r\n                    </Grid.ColumnDefinitions>\r\n                    <Popup x:Name=\"PART_Popup\" AllowsTransparency=\"true\" IsOpen=\"{Binding Path=IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Bottom\" PopupAnimation=\"{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}\" Grid.ColumnSpan=\"1\">\r\n                        <Border MaxHeight=\"{TemplateBinding MaxDropDownHeight}\" MinWidth=\"{Binding Path=ActualWidth, ElementName=Placement}\" x:Name=\"Shdw\">\r\n                            <Border x:Name=\"DropDownBorder\" Background=\"{DynamicResource PrimaryBrush}\" BorderBrush=\"{DynamicResource SecondaryBrush}\" BorderThickness=\"1\" CornerRadius=\"4,4,4,4\">\r\n                                <ScrollViewer>\r\n                                    <ItemsPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" KeyboardNavigation.DirectionalNavigation=\"Contained\" />\r\n                                </ScrollViewer>\r\n                            </Border>\r\n                        </Border>\r\n                    </Popup>\r\n                    <Border CornerRadius=\"4,4,4,4\" x:Name=\"Border\">\r\n                        <Grid>\r\n                            <ToggleButton Style=\"{DynamicResource ComboBoxReadonlyToggleButton}\" IsChecked=\"{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" HorizontalAlignment=\"Stretch\" />\r\n                            <TextBox x:Name=\"PART_EditableTextBox\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\" IsReadOnly=\"{Binding Path=IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}\" Margin=\"6,2,21,2\" Background=\"{x:Null}\" Style=\"{DynamicResource EditComboTextBox}\" />\r\n                        </Grid>\r\n                    </Border>\r\n                </Grid>\r\n                <ControlTemplate.Triggers>\r\n                    <Trigger Property=\"IsKeyboardFocusWithin\" Value=\"true\">\r\n                        <Setter Property=\"Foreground\" Value=\"Black\" />\r\n                    </Trigger>\r\n                    <Trigger Property=\"IsDropDownOpen\" Value=\"true\" />\r\n                    <Trigger Property=\"HasItems\" Value=\"false\">\r\n                        <Setter Property=\"Height\" TargetName=\"DropDownBorder\" Value=\"95\" />\r\n                    </Trigger>\r\n                    <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                        <Setter Property=\"Background\" Value=\"#FFF4F4F4\" />\r\n                    </Trigger>\r\n                    <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                        <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\" />\r\n                    </Trigger>\r\n                </ControlTemplate.Triggers>\r\n            </ControlTemplate>\r\n        </Style.Resources>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource SecondaryBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\" />\r\n        <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\" />\r\n        <Setter Property=\"Padding\" Value=\"4,3\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource PrimaryBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ComboBox}\">\r\n                    <Grid x:Name=\"MainGrid\" SnapsToDevicePixels=\"true\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\" />\r\n                            <ColumnDefinition MinWidth=\"{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}\" Width=\"0\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Popup Margin=\"1\" x:Name=\"PART_Popup\" AllowsTransparency=\"true\" IsOpen=\"{Binding Path=IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Bottom\" PopupAnimation=\"{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}\" Grid.ColumnSpan=\"2\">\r\n                            <Border x:Name=\"DropDownBorder\" Background=\"{DynamicResource PrimaryBrush}\" BorderBrush=\"{DynamicResource SecondaryBrush}\" BorderThickness=\"1\" MaxHeight=\"{TemplateBinding MaxDropDownHeight}\" MinWidth=\"{Binding Path=ActualWidth, ElementName=MainGrid}\" CornerRadius=\"4,4,4,4\">\r\n                                <ScrollViewer CanContentScroll=\"true\">\r\n                                    <ItemsPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" KeyboardNavigation.DirectionalNavigation=\"Contained\" />\r\n                                </ScrollViewer>\r\n                            </Border>\r\n                        </Popup>\r\n                        <ToggleButton Style=\"{StaticResource ComboBoxReadonlyToggleButton}\" Grid.ColumnSpan=\"2\" IsChecked=\"{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" />\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" IsHitTestVisible=\"false\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Content=\"{TemplateBinding SelectionBoxItem}\" ContentTemplate=\"{TemplateBinding SelectionBoxItemTemplate}\" ContentTemplateSelector=\"{TemplateBinding ItemTemplateSelector}\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"HasItems\" Value=\"false\">\r\n                            <Setter Property=\"Height\" TargetName=\"DropDownBorder\" Value=\"95\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Background\" Value=\"#FFF4F4F4\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                            <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Style.Triggers>\r\n            <Trigger Property=\"IsEditable\" Value=\"true\">\r\n                <Setter Property=\"IsTabStop\" Value=\"false\" />\r\n                <Setter Property=\"Template\" Value=\"{StaticResource ComboBoxEditableTemplate}\" />\r\n            </Trigger>\r\n        </Style.Triggers>\r\n    </Style>\r\n\r\n    <!-- ComboBoxItem -->\r\n    <Style TargetType=\"{x:Type ComboBoxItem}\">\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\" />\r\n        <Setter Property=\"Padding\" Value=\"3,0,3,0\" />\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ComboBoxItem}\">\r\n                    <Grid>\r\n                        <Rectangle Stroke=\"{DynamicResource SecondaryBrush}\" RadiusX=\"3\" RadiusY=\"3\" x:Name=\"Hover\" Opacity=\"0\">\r\n                            <Rectangle.Fill>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                        <Rectangle RadiusX=\"3\" RadiusY=\"3\" x:Name=\"Selected\" Opacity=\"0\" Stroke=\"{DynamicResource SecondaryBrush}\">\r\n                            <Rectangle.Fill>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                        <Border x:Name=\"Bd\" SnapsToDevicePixels=\"true\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\">\r\n                            <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" x:Name=\"contentPresenter\" />\r\n                        </Border>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"Hover\" Value=\"0.35\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsHighlighted\" Value=\"true\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"Selected\" Value=\"0.75\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"Bd\" Value=\"0.5\" />\r\n                            <Setter Property=\"Opacity\" TargetName=\"contentPresenter\" Value=\"1\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n    </Style>\r\n\r\n    <!-- Menu -->\r\n    <Style TargetType=\"{x:Type Menu}\">\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource PrimaryBrush}\" />\r\n        <Setter Property=\"FontFamily\" Value=\"{DynamicResource {x:Static SystemFonts.MenuFontFamilyKey}}\" />\r\n        <Setter Property=\"FontSize\" Value=\"{DynamicResource {x:Static SystemFonts.MenuFontSizeKey}}\" />\r\n        <Setter Property=\"FontStyle\" Value=\"{DynamicResource {x:Static SystemFonts.MenuFontStyleKey}}\" />\r\n        <Setter Property=\"FontWeight\" Value=\"{DynamicResource {x:Static SystemFonts.MenuFontWeightKey}}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource SecondaryBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1,1,1,1\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Menu}\">\r\n                    <Border Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" CornerRadius=\"4,4,4,4\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"1,1,1,1\">\r\n                        <Grid>\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"*\" />\r\n                            </Grid.RowDefinitions>\r\n                            <Grid x:Name=\"Shadow\">\r\n                                <Grid.RowDefinitions>\r\n                                    <RowDefinition Height=\"6\" />\r\n                                    <RowDefinition Height=\"*\" />\r\n                                    <RowDefinition Height=\"6\" />\r\n                                </Grid.RowDefinitions>\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"6\" />\r\n                                    <ColumnDefinition Width=\"*\" />\r\n                                    <ColumnDefinition Width=\"6\" />\r\n                                </Grid.ColumnDefinitions>\r\n                                <Border Background=\"{StaticResource SecondaryBrush}\" CornerRadius=\"2.5,0,0,0\">\r\n                                    <Border.OpacityMask>\r\n                                        <RadialGradientBrush GradientOrigin=\"0.655,0.644\">\r\n                                            <RadialGradientBrush.RelativeTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"3.489\" ScaleY=\"3.489\" />\r\n                                                    <SkewTransform AngleX=\"0\" AngleY=\"0\" CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                                                    <RotateTransform Angle=\"0\" CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                                                    <TranslateTransform X=\"-0.063\" Y=\"-0.025\" />\r\n                                                </TransformGroup>\r\n                                            </RadialGradientBrush.RelativeTransform>\r\n                                            <GradientStop />\r\n                                            <GradientStop Color=\"#A5FFFFFF\" Offset=\"1\" />\r\n                                        </RadialGradientBrush>\r\n                                    </Border.OpacityMask>\r\n                                </Border>\r\n                                <Border Background=\"{StaticResource SecondaryBrush}\" Grid.Column=\"1\">\r\n                                    <Border.OpacityMask>\r\n                                        <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,-1.025\">\r\n                                            <GradientStop Color=\"#A5FFFFFF\" Offset=\"0\" />\r\n                                            <GradientStop Offset=\"1\" />\r\n                                        </LinearGradientBrush>\r\n                                    </Border.OpacityMask>\r\n                                </Border>\r\n                                <Border Background=\"{StaticResource SecondaryBrush}\" CornerRadius=\"0,2.5,0,0\" Grid.Column=\"2\">\r\n                                    <Border.OpacityMask>\r\n                                        <RadialGradientBrush GradientOrigin=\"0.283,0.71\">\r\n                                            <RadialGradientBrush.RelativeTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2.805\" ScaleY=\"2.805\" />\r\n                                                    <SkewTransform AngleX=\"0\" AngleY=\"0\" CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                                                    <RotateTransform Angle=\"0\" CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                                                    <TranslateTransform X=\"0.144\" Y=\"-0.125\" />\r\n                                                </TransformGroup>\r\n                                            </RadialGradientBrush.RelativeTransform>\r\n                                            <GradientStop />\r\n                                            <GradientStop Color=\"#A5FFFFFF\" Offset=\"1\" />\r\n                                        </RadialGradientBrush>\r\n                                    </Border.OpacityMask>\r\n                                </Border>\r\n                                <Border Background=\"{StaticResource SecondaryBrush}\" Grid.Row=\"1\">\r\n                                    <Border.OpacityMask>\r\n                                        <LinearGradientBrush EndPoint=\"1,.5\" StartPoint=\"-0.972,0.5\">\r\n                                            <GradientStop Color=\"#00000000\" Offset=\"1\" />\r\n                                            <GradientStop Color=\"#A5FFFFFF\" Offset=\"0\" />\r\n                                        </LinearGradientBrush>\r\n                                    </Border.OpacityMask>\r\n                                </Border>\r\n                                <Border Background=\"{StaticResource SecondaryBrush}\" OpacityMask=\"#00000000\" Grid.Column=\"1\" Grid.Row=\"1\" />\r\n                                <Border Background=\"{StaticResource SecondaryBrush}\" Grid.Column=\"2\" Grid.Row=\"1\">\r\n                                    <Border.OpacityMask>\r\n                                        <LinearGradientBrush EndPoint=\"0,0.5\" StartPoint=\"2.01,0.5\">\r\n                                            <GradientStop Color=\"#A5FFFFFF\" Offset=\"0\" />\r\n                                            <GradientStop Color=\"#00FFFFFF\" Offset=\"1\" />\r\n                                        </LinearGradientBrush>\r\n                                    </Border.OpacityMask>\r\n                                </Border>\r\n                                <Border Background=\"{StaticResource SecondaryBrush}\" CornerRadius=\"0,0,0,2.5\" Grid.Row=\"2\">\r\n                                    <Border.OpacityMask>\r\n                                        <RadialGradientBrush GradientOrigin=\"0.646,0.361\">\r\n                                            <RadialGradientBrush.RelativeTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"3.438\" ScaleY=\"3.438\" />\r\n                                                    <SkewTransform AngleX=\"0\" AngleY=\"0\" CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                                                    <RotateTransform Angle=\"0\" CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                                                    <TranslateTransform X=\"-0.072\" Y=\"0.072\" />\r\n                                                </TransformGroup>\r\n                                            </RadialGradientBrush.RelativeTransform>\r\n                                            <GradientStop />\r\n                                            <GradientStop Color=\"#A5FFFFFF\" Offset=\"1\" />\r\n                                        </RadialGradientBrush>\r\n                                    </Border.OpacityMask>\r\n                                </Border>\r\n                                <Border Background=\"{StaticResource SecondaryBrush}\" Margin=\"0,0,0,0\" Grid.Column=\"1\" Grid.Row=\"2\">\r\n                                    <Border.OpacityMask>\r\n                                        <LinearGradientBrush EndPoint=\"0.5,2.065\" StartPoint=\"0.5,0\">\r\n                                            <GradientStop Color=\"#00000000\" Offset=\"0\" />\r\n                                            <GradientStop Color=\"#A5FFFFFF\" Offset=\"1\" />\r\n                                        </LinearGradientBrush>\r\n                                    </Border.OpacityMask>\r\n                                </Border>\r\n                                <Border Background=\"{StaticResource SecondaryBrush}\" CornerRadius=\"0,0,2.5,0\" Grid.Column=\"2\" Grid.Row=\"2\">\r\n                                    <Border.OpacityMask>\r\n                                        <RadialGradientBrush GradientOrigin=\"0.287,0.495\">\r\n                                            <RadialGradientBrush.RelativeTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"4.282\" ScaleY=\"3.792\" />\r\n                                                    <SkewTransform AngleX=\"0\" AngleY=\"0\" CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                                                    <RotateTransform Angle=\"0\" CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                                                    <TranslateTransform X=\"0.495\" Y=\"-0.463\" />\r\n                                                </TransformGroup>\r\n                                            </RadialGradientBrush.RelativeTransform>\r\n                                            <GradientStop />\r\n                                            <GradientStop Color=\"#A5FFFFFF\" Offset=\"1\" />\r\n                                        </RadialGradientBrush>\r\n                                    </Border.OpacityMask>\r\n                                </Border>\r\n                            </Grid>\r\n                            <Border SnapsToDevicePixels=\"true\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\" Grid.RowSpan=\"1\">\r\n                                <ItemsPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Margin=\"4,0,4,0\" />\r\n                            </Border>\r\n                        </Grid>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- MenuItem -->\r\n    <Style TargetType=\"{x:Type MenuItem}\">\r\n        <Style.Resources>\r\n            <Geometry x:Key=\"Checkmark\">M 0,5.1 L 1.7,5.2 L 3.4,7.1 L 8,0.4 L 9.2,0 L 3.3,10.8 Z</Geometry>\r\n            <Style x:Key=\"MenuScrollButton\" BasedOn=\"{x:Null}\" TargetType=\"{x:Type RepeatButton}\">\r\n                <Setter Property=\"ClickMode\" Value=\"Hover\" />\r\n                <Setter Property=\"MinWidth\" Value=\"0\" />\r\n                <Setter Property=\"MinHeight\" Value=\"0\" />\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n                            <DockPanel SnapsToDevicePixels=\"true\" Background=\"Transparent\">\r\n                                <Rectangle Fill=\"Transparent\" x:Name=\"R1\" Width=\"1\" DockPanel.Dock=\"Right\" />\r\n                                <Rectangle Fill=\"Transparent\" x:Name=\"B1\" Height=\"1\" DockPanel.Dock=\"Bottom\" />\r\n                                <Rectangle Fill=\"Transparent\" x:Name=\"L1\" Width=\"1\" DockPanel.Dock=\"Left\" />\r\n                                <Rectangle Fill=\"Transparent\" x:Name=\"T1\" Height=\"1\" DockPanel.Dock=\"Top\" />\r\n                                <ContentPresenter HorizontalAlignment=\"Center\" Margin=\"2,2,2,2\" x:Name=\"ContentContainer\" VerticalAlignment=\"Center\" />\r\n                            </DockPanel>\r\n                            <ControlTemplate.Triggers>\r\n                                <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                                    <Setter Property=\"Margin\" TargetName=\"ContentContainer\" Value=\"3,3,1,1\" />\r\n                                </Trigger>\r\n                            </ControlTemplate.Triggers>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n            <Geometry x:Key=\"UpArrow\">M 0,4 L 3.5,0 L 7,4 Z</Geometry>\r\n            <MenuScrollingVisibilityConverter x:Key=\"MenuScrollingVisibilityConverter\" />\r\n            <Geometry x:Key=\"DownArrow\">M 0,0 L 3.5,4 L 7,0 Z</Geometry>\r\n            <Geometry x:Key=\"RightArrow\">M 0,0 L 4,3.5 L 0,7 Z</Geometry>\r\n            <Style x:Key=\"{ComponentResourceKey ResourceId=MenuScrollViewer, TypeInTargetAssembly={x:Type FrameworkElement}}\" BasedOn=\"{x:Null}\" TargetType=\"{x:Type ScrollViewer}\">\r\n                <Setter Property=\"HorizontalScrollBarVisibility\" Value=\"Hidden\" />\r\n                <Setter Property=\"VerticalScrollBarVisibility\" Value=\"Auto\" />\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"{x:Type ScrollViewer}\">\r\n                            <Grid SnapsToDevicePixels=\"true\">\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"*\" />\r\n                                </Grid.ColumnDefinitions>\r\n                                <Grid.RowDefinitions>\r\n                                    <RowDefinition Height=\"Auto\" />\r\n                                    <RowDefinition Height=\"*\" />\r\n                                    <RowDefinition Height=\"Auto\" />\r\n                                </Grid.RowDefinitions>\r\n                                <Border Grid.Row=\"1\">\r\n                                    <ScrollContentPresenter Margin=\"{TemplateBinding Padding}\" />\r\n                                </Border>\r\n                                <RepeatButton Style=\"{StaticResource MenuScrollButton}\" Focusable=\"false\" Command=\"{x:Static ScrollBar.LineUpCommand}\" CommandTarget=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\">\r\n                                    <RepeatButton.Visibility>\r\n                                        <MultiBinding FallbackValue=\"Visibility.Collapsed\" Converter=\"{StaticResource MenuScrollingVisibilityConverter}\" ConverterParameter=\"0\">\r\n                                            <Binding Path=\"ComputedVerticalScrollBarVisibility\" RelativeSource=\"{RelativeSource TemplatedParent}\" />\r\n                                            <Binding Path=\"VerticalOffset\" RelativeSource=\"{RelativeSource TemplatedParent}\" />\r\n                                            <Binding Path=\"ExtentHeight\" RelativeSource=\"{RelativeSource TemplatedParent}\" />\r\n                                            <Binding Path=\"ViewportHeight\" RelativeSource=\"{RelativeSource TemplatedParent}\" />\r\n                                        </MultiBinding>\r\n                                    </RepeatButton.Visibility>\r\n                                    <Path Fill=\"{DynamicResource {x:Static SystemColors.MenuTextBrushKey}}\" Data=\"{StaticResource UpArrow}\" />\r\n                                </RepeatButton>\r\n                                <RepeatButton Style=\"{StaticResource MenuScrollButton}\" Focusable=\"false\" Grid.Row=\"2\" Command=\"{x:Static ScrollBar.LineDownCommand}\" CommandTarget=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\">\r\n                                    <RepeatButton.Visibility>\r\n                                        <MultiBinding FallbackValue=\"Visibility.Collapsed\" Converter=\"{StaticResource MenuScrollingVisibilityConverter}\" ConverterParameter=\"100\">\r\n                                            <Binding Path=\"ComputedVerticalScrollBarVisibility\" RelativeSource=\"{RelativeSource TemplatedParent}\" />\r\n                                            <Binding Path=\"VerticalOffset\" RelativeSource=\"{RelativeSource TemplatedParent}\" />\r\n                                            <Binding Path=\"ExtentHeight\" RelativeSource=\"{RelativeSource TemplatedParent}\" />\r\n                                            <Binding Path=\"ViewportHeight\" RelativeSource=\"{RelativeSource TemplatedParent}\" />\r\n                                        </MultiBinding>\r\n                                    </RepeatButton.Visibility>\r\n                                    <Path Fill=\"{DynamicResource {x:Static SystemColors.MenuTextBrushKey}}\" Data=\"{StaticResource DownArrow}\" />\r\n                                </RepeatButton>\r\n                            </Grid>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n            <ControlTemplate x:Key=\"{ComponentResourceKey ResourceId=SubmenuContent, TypeInTargetAssembly={x:Type FrameworkElement}}\" TargetType=\"{x:Type ContentControl}\">\r\n                <Grid>\r\n                    <Grid x:Name=\"Shadow\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"6\" />\r\n                            <RowDefinition Height=\"*\" />\r\n                            <RowDefinition Height=\"6\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"6\" />\r\n                            <ColumnDefinition Width=\"*\" />\r\n                            <ColumnDefinition Width=\"6\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Border Background=\"{StaticResource SecondaryBrush}\" CornerRadius=\"2.5,0,0,0\">\r\n                            <Border.OpacityMask>\r\n                                <RadialGradientBrush GradientOrigin=\"0.655,0.644\">\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"3.489\" ScaleY=\"3.489\" />\r\n                                            <SkewTransform AngleX=\"0\" AngleY=\"0\" CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                                            <RotateTransform Angle=\"0\" CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                                            <TranslateTransform X=\"-0.063\" Y=\"-0.025\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop />\r\n                                    <GradientStop Color=\"#A5FFFFFF\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.OpacityMask>\r\n                        </Border>\r\n                        <Border Background=\"{StaticResource SecondaryBrush}\" Grid.Column=\"1\">\r\n                            <Border.OpacityMask>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,-1.025\">\r\n                                    <GradientStop Color=\"#A5FFFFFF\" Offset=\"0\" />\r\n                                    <GradientStop Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Border.OpacityMask>\r\n                        </Border>\r\n                        <Border Background=\"{StaticResource SecondaryBrush}\" CornerRadius=\"0,2.5,0,0\" Grid.Column=\"2\">\r\n                            <Border.OpacityMask>\r\n                                <RadialGradientBrush GradientOrigin=\"0.283,0.71\">\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2.805\" ScaleY=\"2.805\" />\r\n                                            <SkewTransform AngleX=\"0\" AngleY=\"0\" CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                                            <RotateTransform Angle=\"0\" CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                                            <TranslateTransform X=\"0.144\" Y=\"-0.125\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop />\r\n                                    <GradientStop Color=\"#A5FFFFFF\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.OpacityMask>\r\n                        </Border>\r\n                        <Border Background=\"{StaticResource SecondaryBrush}\" Grid.Row=\"1\">\r\n                            <Border.OpacityMask>\r\n                                <LinearGradientBrush EndPoint=\"1,.5\" StartPoint=\"-0.972,0.5\">\r\n                                    <GradientStop Color=\"#00000000\" Offset=\"1\" />\r\n                                    <GradientStop Color=\"#A5FFFFFF\" Offset=\"0\" />\r\n                                </LinearGradientBrush>\r\n                            </Border.OpacityMask>\r\n                        </Border>\r\n                        <Border Background=\"{StaticResource SecondaryBrush}\" OpacityMask=\"#00000000\" Grid.Column=\"1\" Grid.Row=\"1\" />\r\n                        <Border Background=\"{StaticResource SecondaryBrush}\" Grid.Column=\"2\" Grid.Row=\"1\">\r\n                            <Border.OpacityMask>\r\n                                <LinearGradientBrush EndPoint=\"0,0.5\" StartPoint=\"2.01,0.5\">\r\n                                    <GradientStop Color=\"#A5FFFFFF\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Border.OpacityMask>\r\n                        </Border>\r\n                        <Border Background=\"{StaticResource SecondaryBrush}\" CornerRadius=\"0,0,0,2.5\" Grid.Row=\"2\">\r\n                            <Border.OpacityMask>\r\n                                <RadialGradientBrush GradientOrigin=\"0.646,0.361\">\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"3.438\" ScaleY=\"3.438\" />\r\n                                            <SkewTransform AngleX=\"0\" AngleY=\"0\" CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                                            <RotateTransform Angle=\"0\" CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                                            <TranslateTransform X=\"-0.072\" Y=\"0.072\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop />\r\n                                    <GradientStop Color=\"#A5FFFFFF\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.OpacityMask>\r\n                        </Border>\r\n                        <Border Background=\"{StaticResource SecondaryBrush}\" Margin=\"0,0,0,0\" Grid.Column=\"1\" Grid.Row=\"2\">\r\n                            <Border.OpacityMask>\r\n                                <LinearGradientBrush EndPoint=\"0.5,2.065\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"#00000000\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#A5FFFFFF\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Border.OpacityMask>\r\n                        </Border>\r\n                        <Border Background=\"{StaticResource SecondaryBrush}\" CornerRadius=\"0,0,2.5,0\" Grid.Column=\"2\" Grid.Row=\"2\">\r\n                            <Border.OpacityMask>\r\n                                <RadialGradientBrush GradientOrigin=\"0.287,0.495\">\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"4.282\" ScaleY=\"3.792\" />\r\n                                            <SkewTransform AngleX=\"0\" AngleY=\"0\" CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                                            <RotateTransform Angle=\"0\" CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                                            <TranslateTransform X=\"0.495\" Y=\"-0.463\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop />\r\n                                    <GradientStop Color=\"#A5FFFFFF\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.OpacityMask>\r\n                        </Border>\r\n                    </Grid>\r\n                    <Border Background=\"{DynamicResource PrimaryBrush}\" BorderBrush=\"{DynamicResource SecondaryBrush}\" BorderThickness=\"1\" CornerRadius=\"4,4,4,4\" Margin=\"1,1,1,1\">\r\n                        <Grid>\r\n                            <ContentPresenter Margin=\"1,0\" Grid.ColumnSpan=\"2\" />\r\n                        </Grid>\r\n                    </Border>\r\n                </Grid>\r\n            </ControlTemplate>\r\n            <ControlTemplate x:Key=\"{ComponentResourceKey ResourceId=SubmenuItemTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}\" TargetType=\"{x:Type MenuItem}\">\r\n                <Grid SnapsToDevicePixels=\"true\">\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"*\" />\r\n                    </Grid.RowDefinitions>\r\n                    <Grid x:Name=\"SelectHoverGrid\" Opacity=\"0\">\r\n                        <Border x:Name=\"Background\" CornerRadius=\"12\" BorderThickness=\"0.5,0.5,1.5,1.5\" HorizontalAlignment=\"Stretch\" Visibility=\"Visible\" BorderBrush=\"{DynamicResource SecondaryBrush}\">\r\n                            <Border.Background>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <Grid x:Name=\"InnerShadow\" HorizontalAlignment=\"Stretch\">\r\n                            <Border x:Name=\"BottomShadow\" CornerRadius=\"12\" OpacityMask=\"{StaticResource BottomShadowMask}\">\r\n                                <Border.Background>\r\n                                    <SolidColorBrush Color=\"{DynamicResource SecondaryColor}\" />\r\n                                </Border.Background>\r\n                            </Border>\r\n                            <Border x:Name=\"Halo\" CornerRadius=\"12\" OpacityMask=\"{StaticResource HaloMask}\">\r\n                                <Border.Background>\r\n                                    <SolidColorBrush Color=\"{DynamicResource SecondaryColor}\" />\r\n                                </Border.Background>\r\n                            </Border>\r\n                        </Grid>\r\n                    </Grid>\r\n                    <Grid Grid.RowSpan=\"1\" Margin=\"4,0,4,0\" VerticalAlignment=\"Center\" x:Name=\"grid\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition SharedSizeGroup=\"MenuItemIconColumnGroup\" MinWidth=\"24\" Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"4\" />\r\n                            <ColumnDefinition Width=\"*\" />\r\n                            <ColumnDefinition Width=\"37\" />\r\n                            <ColumnDefinition SharedSizeGroup=\"MenuItemIGTColumnGroup\" Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"17\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <ContentPresenter Margin=\"1\" x:Name=\"Icon\" VerticalAlignment=\"Center\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" ContentSource=\"Icon\" />\r\n                        <Border Margin=\"1\" x:Name=\"GlyphPanel\" Width=\"22\" Height=\"22\" Visibility=\"Hidden\" Background=\"{DynamicResource PrimaryBrush}\" BorderBrush=\"{DynamicResource SecondaryBrush}\" BorderThickness=\"1\" CornerRadius=\"3\">\r\n                            <Path Fill=\"{DynamicResource TextBrush}\" FlowDirection=\"LeftToRight\" x:Name=\"Glyph\" Width=\"9\" Height=\"11\" Data=\"{StaticResource Checkmark}\" />\r\n                        </Border>\r\n                        <ContentPresenter Margin=\"{TemplateBinding Padding}\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Grid.Column=\"2\" ContentSource=\"Header\" RecognizesAccessKey=\"True\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" />\r\n                        <TextBlock Margin=\"{TemplateBinding Padding}\" Grid.Column=\"4\" Foreground=\"{DynamicResource TextBrush}\" Text=\"{TemplateBinding InputGestureText}\" />\r\n                    </Grid>\r\n                    <Border x:Name=\"focused\" BorderBrush=\"{DynamicResource SecondaryBrush}\" CornerRadius=\"12,12,12,12\" BorderThickness=\"1,1,1,1\" Visibility=\"Collapsed\" />\r\n                </Grid>\r\n                <ControlTemplate.Triggers>\r\n                    <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                        <Setter Property=\"Visibility\" TargetName=\"focused\" Value=\"Visible\" />\r\n                    </Trigger>\r\n                    <Trigger Property=\"Icon\" Value=\"{x:Null}\">\r\n                        <Setter Property=\"Visibility\" TargetName=\"Icon\" Value=\"Collapsed\" />\r\n                    </Trigger>\r\n                    <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                        <Setter Property=\"Visibility\" TargetName=\"GlyphPanel\" Value=\"Visible\" />\r\n                        <Setter Property=\"Visibility\" TargetName=\"Icon\" Value=\"Collapsed\" />\r\n                    </Trigger>\r\n                    <Trigger Property=\"IsHighlighted\" Value=\"true\">\r\n                        <Setter Property=\"Opacity\" TargetName=\"SelectHoverGrid\" Value=\"1\" />\r\n                        <Setter Property=\"BorderBrush\" TargetName=\"Background\" Value=\"#FFCCCCCC\" />\r\n                    </Trigger>\r\n                    <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                        <Setter Property=\"Foreground\" Value=\"#FF9A9A9A\" />\r\n                        <Setter Property=\"Background\" TargetName=\"GlyphPanel\" Value=\"#EEE9E9\" />\r\n                        <Setter Property=\"BorderBrush\" TargetName=\"GlyphPanel\" Value=\"#DBD6D6\" />\r\n                        <Setter Property=\"Fill\" TargetName=\"Glyph\" Value=\"#848589\" />\r\n                        <Setter Property=\"Opacity\" TargetName=\"grid\" Value=\"0.65\" />\r\n                    </Trigger>\r\n                </ControlTemplate.Triggers>\r\n            </ControlTemplate>\r\n            <ControlTemplate x:Key=\"{ComponentResourceKey ResourceId=TopLevelHeaderTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}\" TargetType=\"{x:Type MenuItem}\">\r\n                <Grid SnapsToDevicePixels=\"true\">\r\n                    <Rectangle RadiusX=\"3\" RadiusY=\"3\" x:Name=\"OuterBorder\" />\r\n                    <Rectangle Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"1\" RadiusX=\"4\" RadiusY=\"4\" Margin=\"1\" x:Name=\"Bg\" Opacity=\"0\">\r\n                        <Rectangle.Fill>\r\n                            <LinearGradientBrush EndPoint=\"0.5,1.47\" StartPoint=\"0.5,0\">\r\n                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0\" />\r\n                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                            </LinearGradientBrush>\r\n                        </Rectangle.Fill>\r\n                    </Rectangle>\r\n                    <DockPanel>\r\n                        <ContentPresenter Margin=\"4,0,6,0\" x:Name=\"Icon\" VerticalAlignment=\"Center\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" ContentSource=\"Icon\" />\r\n                        <Path Fill=\"{TemplateBinding Foreground}\" FlowDirection=\"LeftToRight\" Margin=\"7,0,0,0\" x:Name=\"GlyphPanel\" VerticalAlignment=\"Center\" Visibility=\"Collapsed\" Data=\"{StaticResource Checkmark}\" />\r\n                        <ContentPresenter Margin=\"{TemplateBinding Padding}\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" ContentSource=\"Header\" RecognizesAccessKey=\"True\" />\r\n                    </DockPanel>\r\n                    <Popup x:Name=\"PART_Popup\" AllowsTransparency=\"true\" HorizontalOffset=\"1\" IsOpen=\"{Binding Path=IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Bottom\" PopupAnimation=\"{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}\" VerticalOffset=\"-1\" Focusable=\"false\">\r\n                        <Border x:Name=\"Shdw\" CornerRadius=\"4,4,4,4\">\r\n                            <ContentControl x:Name=\"SubMenuBorder\" IsTabStop=\"false\" Template=\"{DynamicResource {ComponentResourceKey ResourceId=SubmenuContent, TypeInTargetAssembly={x:Type FrameworkElement}}}\">\r\n                                <ScrollViewer Style=\"{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer, TypeInTargetAssembly={x:Type FrameworkElement}}}\" CanContentScroll=\"true\">\r\n                                    <ItemsPresenter Margin=\"2\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Grid.IsSharedSizeScope=\"true\" KeyboardNavigation.DirectionalNavigation=\"Cycle\" KeyboardNavigation.TabNavigation=\"Cycle\" />\r\n                                </ScrollViewer>\r\n                            </ContentControl>\r\n                        </Border>\r\n                    </Popup>\r\n                </Grid>\r\n                <ControlTemplate.Triggers>\r\n                    <Trigger Property=\"IsSuspendingPopupAnimation\" Value=\"true\">\r\n                        <Setter Property=\"PopupAnimation\" TargetName=\"PART_Popup\" Value=\"None\" />\r\n                    </Trigger>\r\n                    <Trigger Property=\"Icon\" Value=\"{x:Null}\">\r\n                        <Setter Property=\"Visibility\" TargetName=\"Icon\" Value=\"Collapsed\" />\r\n                    </Trigger>\r\n                    <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                        <Setter Property=\"Visibility\" TargetName=\"GlyphPanel\" Value=\"Visible\" />\r\n                        <Setter Property=\"Visibility\" TargetName=\"Icon\" Value=\"Collapsed\" />\r\n                    </Trigger>\r\n                    <Trigger Property=\"IsHighlighted\" Value=\"true\">\r\n                        <Setter Property=\"Opacity\" TargetName=\"Bg\" Value=\"0.65\" />\r\n                    </Trigger>\r\n                    <MultiTrigger>\r\n                        <MultiTrigger.Conditions>\r\n                            <Condition Property=\"IsMouseOver\" Value=\"True\" />\r\n                            <Condition Property=\"IsChecked\" Value=\"True\" />\r\n                        </MultiTrigger.Conditions>\r\n                        <Setter Property=\"Opacity\" TargetName=\"Bg\" Value=\"0.65\" />\r\n                        <Setter Property=\"Visibility\" TargetName=\"Icon\" Value=\"Collapsed\" />\r\n                        <Setter Property=\"Visibility\" TargetName=\"GlyphPanel\" Value=\"Visible\" />\r\n                    </MultiTrigger>\r\n                    <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                        <Setter Property=\"Stroke\" TargetName=\"Bg\" Value=\"#E0717070\" />\r\n                    </Trigger>\r\n                    <Trigger Property=\"IsSubmenuOpen\" Value=\"true\">\r\n                        <Setter Property=\"Opacity\" TargetName=\"Bg\" Value=\"0.65\" />\r\n                    </Trigger>\r\n                    <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                        <Setter Property=\"Foreground\" Value=\"#FF9A9A9A\" />\r\n                        <Setter Property=\"Fill\" TargetName=\"GlyphPanel\" Value=\"#848589\" />\r\n                    </Trigger>\r\n                </ControlTemplate.Triggers>\r\n            </ControlTemplate>\r\n            <ControlTemplate x:Key=\"{ComponentResourceKey ResourceId=TopLevelItemTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}\" TargetType=\"{x:Type MenuItem}\">\r\n                <Grid SnapsToDevicePixels=\"true\">\r\n                    <Rectangle RadiusX=\"4\" RadiusY=\"4\" x:Name=\"OuterBorder\" />\r\n                    <Rectangle StrokeThickness=\"1\" RadiusX=\"3\" RadiusY=\"3\" Margin=\"1\" x:Name=\"Bg\" />\r\n                    <Rectangle Margin=\"2\" x:Name=\"InnerBorder\" />\r\n                    <DockPanel>\r\n                        <ContentPresenter Margin=\"4,0,6,0\" x:Name=\"Icon\" VerticalAlignment=\"Center\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" ContentSource=\"Icon\" />\r\n                        <Path Fill=\"{TemplateBinding Foreground}\" FlowDirection=\"LeftToRight\" Margin=\"7,0,0,0\" x:Name=\"GlyphPanel\" VerticalAlignment=\"Center\" Visibility=\"Collapsed\" Data=\"{StaticResource Checkmark}\" />\r\n                        <ContentPresenter Margin=\"{TemplateBinding Padding}\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" ContentSource=\"Header\" RecognizesAccessKey=\"True\" />\r\n                    </DockPanel>\r\n                </Grid>\r\n                <ControlTemplate.Triggers>\r\n                    <MultiTrigger>\r\n                        <MultiTrigger.Conditions>\r\n                            <Condition Property=\"IsChecked\" Value=\"True\" />\r\n                            <Condition Property=\"IsHighlighted\" Value=\"True\" />\r\n                        </MultiTrigger.Conditions>\r\n                        <Setter Property=\"Visibility\" TargetName=\"Icon\" Value=\"Collapsed\" />\r\n                        <Setter Property=\"Visibility\" TargetName=\"GlyphPanel\" Value=\"Visible\" />\r\n                        <Setter Property=\"Fill\" TargetName=\"Bg\">\r\n                            <Setter.Value>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Setter.Value>\r\n                        </Setter>\r\n                        <Setter Property=\"Opacity\" TargetName=\"Bg\" Value=\"0.65\" />\r\n                    </MultiTrigger>\r\n                    <Trigger Property=\"Icon\" Value=\"{x:Null}\">\r\n                        <Setter Property=\"Visibility\" TargetName=\"Icon\" Value=\"Collapsed\" />\r\n                    </Trigger>\r\n                    <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                        <Setter Property=\"Visibility\" TargetName=\"GlyphPanel\" Value=\"Visible\" />\r\n                        <Setter Property=\"Visibility\" TargetName=\"Icon\" Value=\"Collapsed\" />\r\n                    </Trigger>\r\n                    <Trigger Property=\"IsHighlighted\" Value=\"true\">\r\n                        <Setter Property=\"RadiusX\" TargetName=\"Bg\" Value=\"4\" />\r\n                        <Setter Property=\"RadiusY\" TargetName=\"Bg\" Value=\"4\" />\r\n                        <Setter Property=\"Fill\" TargetName=\"Bg\">\r\n                            <Setter.Value>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Setter.Value>\r\n                        </Setter>\r\n                        <Setter Property=\"Opacity\" TargetName=\"Bg\" Value=\"0.65\" />\r\n                    </Trigger>\r\n                    <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                        <Setter Property=\"Stroke\" TargetName=\"Bg\" Value=\"#E0717070\" />\r\n                        <Setter Property=\"Stroke\" TargetName=\"InnerBorder\" Value=\"#50747272\" />\r\n                    </Trigger>\r\n                    <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                        <Setter Property=\"Foreground\" Value=\"#FF9A9A9A\" />\r\n                        <Setter Property=\"Fill\" TargetName=\"GlyphPanel\" Value=\"#848589\" />\r\n                    </Trigger>\r\n                </ControlTemplate.Triggers>\r\n            </ControlTemplate>\r\n            <ControlTemplate x:Key=\"{ComponentResourceKey ResourceId=SubmenuHeaderTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}\" TargetType=\"{x:Type MenuItem}\">\r\n                <Grid SnapsToDevicePixels=\"true\">\r\n                    <Rectangle StrokeThickness=\"1\" RadiusX=\"3\" RadiusY=\"3\" x:Name=\"Bg\" Opacity=\"0\" Margin=\"1,1,1,1\" Stroke=\"{TemplateBinding BorderBrush}\">\r\n                        <Rectangle.Fill>\r\n                            <LinearGradientBrush EndPoint=\"0.5,1.758\" StartPoint=\"0.5,0\">\r\n                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0\" />\r\n                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                            </LinearGradientBrush>\r\n                        </Rectangle.Fill>\r\n                    </Rectangle>\r\n                    <Rectangle StrokeThickness=\"1\" RadiusX=\"3\" RadiusY=\"3\" Margin=\"1\" x:Name=\"InnerBorder\" Opacity=\"0\" Stroke=\"{TemplateBinding BorderBrush}\">\r\n                        <Rectangle.Fill>\r\n                            <LinearGradientBrush EndPoint=\"0.5,1.758\" StartPoint=\"0.5,0\">\r\n                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0\" />\r\n                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                            </LinearGradientBrush>\r\n                        </Rectangle.Fill>\r\n                    </Rectangle>\r\n                    <Grid x:Name=\"SelectHoverGrid\" Opacity=\"0\">\r\n                        <Border x:Name=\"Background\" CornerRadius=\"12\" BorderThickness=\"0.5,0.5,1.5,1.5\" HorizontalAlignment=\"Stretch\" Visibility=\"Visible\" BorderBrush=\"{DynamicResource SecondaryBrush}\">\r\n                            <Border.Background>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <Grid x:Name=\"InnerShadow\" HorizontalAlignment=\"Stretch\">\r\n                            <Border x:Name=\"BottomShadow\" CornerRadius=\"12\" OpacityMask=\"{StaticResource BottomShadowMask}\">\r\n                                <Border.Background>\r\n                                    <SolidColorBrush Color=\"{DynamicResource SecondaryColor}\" />\r\n                                </Border.Background>\r\n                            </Border>\r\n                            <Border x:Name=\"Halo\" CornerRadius=\"12\" OpacityMask=\"{StaticResource HaloMask}\">\r\n                                <Border.Background>\r\n                                    <SolidColorBrush Color=\"{DynamicResource SecondaryColor}\" />\r\n                                </Border.Background>\r\n                            </Border>\r\n                        </Grid>\r\n                    </Grid>\r\n                    <Grid>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition SharedSizeGroup=\"MenuItemIconColumnGroup\" MinWidth=\"24\" Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"4\" />\r\n                            <ColumnDefinition Width=\"*\" />\r\n                            <ColumnDefinition Width=\"37\" />\r\n                            <ColumnDefinition SharedSizeGroup=\"MenuItemIGTColumnGroup\" Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"17\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <ContentPresenter Margin=\"1\" x:Name=\"Icon\" VerticalAlignment=\"Center\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" ContentSource=\"Icon\" />\r\n                        <Border Margin=\"1\" x:Name=\"GlyphPanel\" Width=\"22\" Height=\"22\" Visibility=\"Hidden\" Background=\"{DynamicResource PrimaryBrush}\" BorderBrush=\"{DynamicResource SecondaryBrush}\" BorderThickness=\"1\" CornerRadius=\"3\">\r\n                            <Path Fill=\"{TemplateBinding Foreground}\" FlowDirection=\"LeftToRight\" x:Name=\"Glyph\" Width=\"9\" Height=\"11\" Data=\"{StaticResource Checkmark}\" />\r\n                        </Border>\r\n                        <ContentPresenter Margin=\"{TemplateBinding Padding}\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Grid.Column=\"2\" ContentSource=\"Header\" RecognizesAccessKey=\"True\" />\r\n                        <TextBlock Margin=\"{TemplateBinding Padding}\" Visibility=\"Collapsed\" Grid.Column=\"4\" Text=\"{TemplateBinding InputGestureText}\" Foreground=\"{TemplateBinding Foreground}\" />\r\n                        <Path Fill=\"{TemplateBinding Foreground}\" Margin=\"4,0,0,0\" VerticalAlignment=\"Center\" Grid.Column=\"5\" Data=\"{StaticResource RightArrow}\" />\r\n                    </Grid>\r\n                    <Popup x:Name=\"PART_Popup\" AllowsTransparency=\"true\" HorizontalOffset=\"-2\" IsOpen=\"{Binding Path=IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Right\" PopupAnimation=\"{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}\" VerticalOffset=\"-3\" Focusable=\"false\">\r\n                        <Border x:Name=\"Shdw\" Background=\"{x:Null}\" CornerRadius=\"4,4,4,4\">\r\n                            <ContentControl x:Name=\"SubMenuBorder\" IsTabStop=\"false\" Template=\"{DynamicResource {ComponentResourceKey ResourceId=SubmenuContent, TypeInTargetAssembly={x:Type FrameworkElement}}}\">\r\n                                <ScrollViewer Style=\"{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer, TypeInTargetAssembly={x:Type FrameworkElement}}}\" CanContentScroll=\"true\">\r\n                                    <ItemsPresenter Margin=\"2\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Grid.IsSharedSizeScope=\"true\" KeyboardNavigation.DirectionalNavigation=\"Cycle\" KeyboardNavigation.TabNavigation=\"Cycle\" />\r\n                                </ScrollViewer>\r\n                            </ContentControl>\r\n                        </Border>\r\n                    </Popup>\r\n                </Grid>\r\n                <ControlTemplate.Triggers>\r\n                    <Trigger Property=\"IsSuspendingPopupAnimation\" Value=\"true\">\r\n                        <Setter Property=\"PopupAnimation\" TargetName=\"PART_Popup\" Value=\"None\" />\r\n                    </Trigger>\r\n                    <Trigger Property=\"Icon\" Value=\"{x:Null}\">\r\n                        <Setter Property=\"Visibility\" TargetName=\"Icon\" Value=\"Collapsed\" />\r\n                    </Trigger>\r\n                    <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                        <Setter Property=\"Visibility\" TargetName=\"GlyphPanel\" Value=\"Visible\" />\r\n                        <Setter Property=\"Visibility\" TargetName=\"Icon\" Value=\"Collapsed\" />\r\n                    </Trigger>\r\n                    <Trigger Property=\"IsHighlighted\" Value=\"true\">\r\n                        <Setter Property=\"Opacity\" TargetName=\"SelectHoverGrid\" Value=\"1\" />\r\n                    </Trigger>\r\n                    <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                        <Setter Property=\"Foreground\" Value=\"#FF9A9A9A\" />\r\n                        <Setter Property=\"Background\" TargetName=\"GlyphPanel\" Value=\"#EEE9E9\" />\r\n                        <Setter Property=\"BorderBrush\" TargetName=\"GlyphPanel\" Value=\"#DBD6D6\" />\r\n                        <Setter Property=\"Fill\" TargetName=\"Glyph\" Value=\"#848589\" />\r\n                    </Trigger>\r\n                </ControlTemplate.Triggers>\r\n            </ControlTemplate>\r\n        </Style.Resources>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\" />\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"Template\" Value=\"{DynamicResource {ComponentResourceKey ResourceId=SubmenuItemTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Style.Triggers>\r\n            <Trigger Property=\"Role\" Value=\"TopLevelHeader\">\r\n                <Setter Property=\"Padding\" Value=\"7,2,8,3\" />\r\n                <Setter Property=\"Template\" Value=\"{DynamicResource {ComponentResourceKey ResourceId=TopLevelHeaderTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}}\" />\r\n                <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n            </Trigger>\r\n            <Trigger Property=\"Role\" Value=\"TopLevelItem\">\r\n                <Setter Property=\"Padding\" Value=\"7,2,8,3\" />\r\n                <Setter Property=\"Template\" Value=\"{DynamicResource {ComponentResourceKey ResourceId=TopLevelItemTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}}\" />\r\n            </Trigger>\r\n            <Trigger Property=\"Role\" Value=\"SubmenuHeader\">\r\n                <Setter Property=\"Padding\" Value=\"2,3,2,3\" />\r\n                <Setter Property=\"Template\" Value=\"{DynamicResource {ComponentResourceKey ResourceId=SubmenuHeaderTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}}\" />\r\n                <Setter Property=\"BorderBrush\" Value=\"{DynamicResource SecondaryBrush}\" />\r\n            </Trigger>\r\n            <Trigger Property=\"Role\" Value=\"SubmenuItem\">\r\n                <Setter Property=\"Padding\" Value=\"2,3,2,3\" />\r\n            </Trigger>\r\n        </Style.Triggers>\r\n    </Style>\r\n\r\n    <!-- ToolBar -->\r\n    <Style TargetType=\"{x:Type ToolBar}\">\r\n        <Style.Resources>\r\n            <Style x:Key=\"ToolBarVerticalOverflowButtonStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n                <Setter Property=\"MinHeight\" Value=\"0\" />\r\n                <Setter Property=\"MinWidth\" Value=\"0\" />\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                            <Border x:Name=\"Bd\" SnapsToDevicePixels=\"true\" CornerRadius=\"0,0,3,3\" BorderThickness=\"1,1,1,1\" BorderBrush=\"{DynamicResource SecondaryBrush}\">\r\n                                <Border.Background>\r\n                                    <LinearGradientBrush EndPoint=\"0,1.407\" StartPoint=\"0,0\">\r\n                                        <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"0\" />\r\n                                        <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"1\" />\r\n                                    </LinearGradientBrush>\r\n                                </Border.Background>\r\n                                <Canvas HorizontalAlignment=\"Right\" Margin=\"2,7,2,2\" VerticalAlignment=\"Bottom\" Width=\"7\" Height=\"6\" SnapsToDevicePixels=\"true\">\r\n                                    <Path Stroke=\"White\" Data=\"M 1.5 1 L 1.5 6\" x:Name=\"path\" />\r\n                                    <Path Stroke=\"{TemplateBinding Foreground}\" Data=\"M 0.5 0 L 0.5 5\" x:Name=\"path1\" />\r\n                                    <Path Fill=\"White\" Data=\"M 3.5 0.5 L 7 3.5 L 4 6.5 Z\" x:Name=\"path2\" />\r\n                                    <Path Fill=\"{TemplateBinding Foreground}\" Data=\"M 3 -0.5 L 6 2.5 L 3 5.5 Z\" x:Name=\"path3\" />\r\n                                </Canvas>\r\n                            </Border>\r\n                            <ControlTemplate.Triggers>\r\n                                <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                                    <Setter Property=\"Background\" TargetName=\"Bd\">\r\n                                        <Setter.Value>\r\n                                            <LinearGradientBrush EndPoint=\"0,1.407\" StartPoint=\"0,0\">\r\n                                                <GradientStop Color=\"#FFCCCCCC\" Offset=\"0\" />\r\n                                                <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.522\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                                    <Setter Property=\"BorderBrush\" TargetName=\"Bd\" Value=\"{DynamicResource TextBrush}\" />\r\n                                    <Setter Property=\"BorderThickness\" TargetName=\"Bd\" Value=\"1,0,1,1\" />\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                                    <Setter Property=\"Background\" TargetName=\"Bd\">\r\n                                        <Setter.Value>\r\n                                            <LinearGradientBrush EndPoint=\"0,1.407\" StartPoint=\"0,0\">\r\n                                                <GradientStop Color=\"{DynamicResource DisabledColor}\" Offset=\"0.671\" />\r\n                                                <GradientStop Color=\"{DynamicResource DisabledColor}\" Offset=\"1\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                    <Setter Property=\"Opacity\" TargetName=\"path\" Value=\"0.5\" />\r\n                                    <Setter Property=\"Opacity\" TargetName=\"path1\" Value=\"0.5\" />\r\n                                    <Setter Property=\"Opacity\" TargetName=\"path2\" Value=\"0.5\" />\r\n                                    <Setter Property=\"Opacity\" TargetName=\"path3\" Value=\"0.5\" />\r\n                                </Trigger>\r\n                            </ControlTemplate.Triggers>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n            <Style x:Key=\"ToolBarHorizontalOverflowButtonStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n                <Setter Property=\"MinHeight\" Value=\"0\" />\r\n                <Setter Property=\"MinWidth\" Value=\"0\" />\r\n                <Setter Property=\"Background\" Value=\"#00FFFFFF\" />\r\n                <Setter Property=\"BorderBrush\" Value=\"{DynamicResource PrimaryBrush}\" />\r\n                <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                            <Border x:Name=\"Bd\" SnapsToDevicePixels=\"true\" CornerRadius=\"0,3,3,0\" BorderBrush=\"{DynamicResource SecondaryBrush}\" BorderThickness=\"1,1,1,1\">\r\n                                <Border.Background>\r\n                                    <LinearGradientBrush EndPoint=\"0,1.307\" StartPoint=\"0,-0.524\">\r\n                                        <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"0\" />\r\n                                        <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"1\" />\r\n                                    </LinearGradientBrush>\r\n                                </Border.Background>\r\n                                <Canvas HorizontalAlignment=\"Right\" Margin=\"7,2,2,2\" VerticalAlignment=\"Bottom\" Width=\"6\" Height=\"7\" SnapsToDevicePixels=\"true\">\r\n                                    <Path Stroke=\"White\" Data=\"M 1 1.5 L 6 1.5\" x:Name=\"path2\" />\r\n                                    <Path Stroke=\"{TemplateBinding Foreground}\" Data=\"M 0 0.5 L 5 0.5\" x:Name=\"path\" />\r\n                                    <Path Fill=\"White\" Data=\"M 0.5 4 L 6.5 4 L 3.5 7 Z\" x:Name=\"path3\" />\r\n                                    <Path Fill=\"{TemplateBinding Foreground}\" Data=\"M -0.5 3 L 5.5 3 L 2.5 6 Z\" x:Name=\"path1\" />\r\n                                </Canvas>\r\n                            </Border>\r\n                            <ControlTemplate.Triggers>\r\n                                <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                                    <Setter Property=\"Background\" TargetName=\"Bd\">\r\n                                        <Setter.Value>\r\n                                            <LinearGradientBrush EndPoint=\"0,1.307\" StartPoint=\"0,-0.524\">\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"0\" />\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.643\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                                    <Setter Property=\"BorderThickness\" TargetName=\"Bd\" Value=\"0,1,1,1\" />\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                                    <Setter Property=\"Background\" TargetName=\"Bd\">\r\n                                        <Setter.Value>\r\n                                            <LinearGradientBrush EndPoint=\"0,1.307\" StartPoint=\"0,0\">\r\n                                                <GradientStop Color=\"{DynamicResource DisabledColor}\" Offset=\"0.74\" />\r\n                                                <GradientStop Color=\"{DynamicResource DisabledColor}\" Offset=\"1\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                    <Setter Property=\"Opacity\" TargetName=\"path\" Value=\"0.5\" />\r\n                                    <Setter Property=\"Opacity\" TargetName=\"path1\" Value=\"0.5\" />\r\n                                    <Setter Property=\"Opacity\" TargetName=\"path2\" Value=\"0.5\" />\r\n                                    <Setter Property=\"Opacity\" TargetName=\"path3\" Value=\"0.5\" />\r\n                                </Trigger>\r\n                            </ControlTemplate.Triggers>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n            <Style x:Key=\"ToolBarThumbStyle\" TargetType=\"{x:Type Thumb}\">\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                            <Border SnapsToDevicePixels=\"True\" Background=\"Transparent\" Padding=\"{TemplateBinding Padding}\">\r\n                                <Rectangle>\r\n                                    <Rectangle.Fill>\r\n                                        <DrawingBrush TileMode=\"Tile\" Viewbox=\"0,0,4,4\" ViewboxUnits=\"Absolute\" Viewport=\"0,0,4,4\" ViewportUnits=\"Absolute\">\r\n                                            <DrawingBrush.Drawing>\r\n                                                <DrawingGroup>\r\n                                                    <GeometryDrawing Brush=\"#FFCCCCCC\" Geometry=\"M1,1L1,3 3,3 3,1z\" />\r\n                                                    <GeometryDrawing Brush=\"#FF333333\" Geometry=\"M0,0L0,2 2,2 2,0z\" />\r\n                                                </DrawingGroup>\r\n                                            </DrawingBrush.Drawing>\r\n                                        </DrawingBrush>\r\n                                    </Rectangle.Fill>\r\n                                </Rectangle>\r\n                            </Border>\r\n                            <ControlTemplate.Triggers>\r\n                                <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                                    <Setter Property=\"Cursor\" Value=\"SizeAll\" />\r\n                                </Trigger>\r\n                            </ControlTemplate.Triggers>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n            <Style x:Key=\"ToolBarButtonBaseStyle\" TargetType=\"{x:Type ButtonBase}\">\r\n                <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n                <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"{x:Type ButtonBase}\">\r\n                            <Border x:Name=\"Border\" BorderThickness=\"1\" Background=\"Transparent\" BorderBrush=\"Transparent\">\r\n                                <ContentPresenter Margin=\"10,5\" HorizontalAlignment=\"Center\" x:Name=\"contentPresenter\" />\r\n                            </Border>\r\n                            <ControlTemplate.Triggers>\r\n                                <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                                    <Setter Property=\"Background\" TargetName=\"Border\">\r\n                                        <Setter.Value>\r\n                                            <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0\" />\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                    <Setter Property=\"BorderBrush\" TargetName=\"Border\" Value=\"{DynamicResource SecondaryBrush}\" />\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                                    <Setter Property=\"Background\" TargetName=\"Border\">\r\n                                        <Setter.Value>\r\n                                            <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0\" />\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                    <Setter Property=\"BorderBrush\" TargetName=\"Border\" Value=\"{DynamicResource SecondaryBrush}\" />\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                                    <Setter Property=\"Background\" TargetName=\"Border\">\r\n                                        <Setter.Value>\r\n                                            <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.161\" />\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"0\" />\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.875\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                    <Setter Property=\"BorderBrush\" TargetName=\"Border\">\r\n                                        <Setter.Value>\r\n                                            <SolidColorBrush Color=\"{DynamicResource SecondaryColor}\" />\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                </Trigger>\r\n                                <Trigger Property=\"ToggleButton.IsChecked\" Value=\"true\">\r\n                                    <Setter Property=\"Background\" TargetName=\"Border\">\r\n                                        <Setter.Value>\r\n                                            <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"0\" />\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.129\" />\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.884\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                    <Setter Property=\"BorderBrush\" TargetName=\"Border\">\r\n                                        <Setter.Value>\r\n                                            <SolidColorBrush Color=\"{DynamicResource SecondaryColor}\" />\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                                    <Setter Property=\"Opacity\" TargetName=\"contentPresenter\" Value=\"0.5\" />\r\n                                </Trigger>\r\n                            </ControlTemplate.Triggers>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n            <Style x:Key=\"{x:Static ToolBar.ButtonStyleKey}\" BasedOn=\"{StaticResource ToolBarButtonBaseStyle}\" TargetType=\"{x:Type Button}\" />\r\n        </Style.Resources>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource PrimaryBrush}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource SecondaryBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1,1,1,1\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToolBar}\">\r\n                    <Grid Margin=\"3,1,1,1\" x:Name=\"Grid\" SnapsToDevicePixels=\"true\">\r\n                        <Grid HorizontalAlignment=\"Right\" x:Name=\"OverflowGrid\">\r\n                            <ToggleButton FocusVisualStyle=\"{x:Null}\" x:Name=\"OverflowButton\" Style=\"{StaticResource ToolBarHorizontalOverflowButtonStyle}\" IsEnabled=\"{TemplateBinding HasOverflowItems}\" IsChecked=\"{Binding Path=IsOverflowOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" ClickMode=\"Press\" />\r\n                            <Popup x:Name=\"OverflowPopup\" AllowsTransparency=\"true\" IsOpen=\"{Binding Path=IsOverflowOpen, RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Bottom\" PopupAnimation=\"{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}\" StaysOpen=\"false\" Focusable=\"false\">\r\n                                <Border x:Name=\"Shdw\">\r\n                                    <Border Background=\"{DynamicResource PrimaryBrush}\" BorderBrush=\"{DynamicResource SecondaryBrush}\" BorderThickness=\"1\" CornerRadius=\"4,4,4,4\">\r\n                                        <ToolBarOverflowPanel FocusVisualStyle=\"{x:Null}\" Margin=\"2\" x:Name=\"PART_ToolBarOverflowPanel\" Focusable=\"true\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" KeyboardNavigation.DirectionalNavigation=\"Cycle\" KeyboardNavigation.TabNavigation=\"Cycle\" WrapWidth=\"200\" />\r\n                                    </Border>\r\n                                </Border>\r\n                            </Popup>\r\n                        </Grid>\r\n                        <Border Margin=\"0,0,11,0\" x:Name=\"MainPanelBorder\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3,3,3,3\" Padding=\"{TemplateBinding Padding}\">\r\n                            <Grid>\r\n                                <Grid.RowDefinitions>\r\n                                    <RowDefinition Height=\"0.485*\" />\r\n                                    <RowDefinition Height=\"0.515*\" />\r\n                                </Grid.RowDefinitions>\r\n                                <Grid x:Name=\"Shadow\" Grid.RowSpan=\"2\">\r\n                                    <Grid.RowDefinitions>\r\n                                        <RowDefinition Height=\"6\" />\r\n                                        <RowDefinition Height=\"*\" />\r\n                                        <RowDefinition Height=\"6\" />\r\n                                    </Grid.RowDefinitions>\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition Width=\"6\" />\r\n                                        <ColumnDefinition Width=\"*\" />\r\n                                        <ColumnDefinition Width=\"6\" />\r\n                                    </Grid.ColumnDefinitions>\r\n                                    <Border Background=\"{StaticResource SecondaryBrush}\" CornerRadius=\"2.5,0,0,0\">\r\n                                        <Border.OpacityMask>\r\n                                            <RadialGradientBrush GradientOrigin=\"0.655,0.644\">\r\n                                                <RadialGradientBrush.RelativeTransform>\r\n                                                    <TransformGroup>\r\n                                                        <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"3.489\" ScaleY=\"3.489\" />\r\n                                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                                                        <RotateTransform Angle=\"0\" CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                                                        <TranslateTransform X=\"-0.063\" Y=\"-0.025\" />\r\n                                                    </TransformGroup>\r\n                                                </RadialGradientBrush.RelativeTransform>\r\n                                                <GradientStop />\r\n                                                <GradientStop Color=\"#A5FFFFFF\" Offset=\"1\" />\r\n                                            </RadialGradientBrush>\r\n                                        </Border.OpacityMask>\r\n                                    </Border>\r\n                                    <Border Background=\"{StaticResource SecondaryBrush}\" Grid.Column=\"1\">\r\n                                        <Border.OpacityMask>\r\n                                            <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,-1.025\">\r\n                                                <GradientStop Color=\"#A5FFFFFF\" Offset=\"0\" />\r\n                                                <GradientStop Offset=\"1\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Border.OpacityMask>\r\n                                    </Border>\r\n                                    <Border Background=\"{StaticResource SecondaryBrush}\" CornerRadius=\"0,2.5,0,0\" Grid.Column=\"2\">\r\n                                        <Border.OpacityMask>\r\n                                            <RadialGradientBrush GradientOrigin=\"0.283,0.71\">\r\n                                                <RadialGradientBrush.RelativeTransform>\r\n                                                    <TransformGroup>\r\n                                                        <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2.805\" ScaleY=\"2.805\" />\r\n                                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                                                        <RotateTransform Angle=\"0\" CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                                                        <TranslateTransform X=\"0.144\" Y=\"-0.125\" />\r\n                                                    </TransformGroup>\r\n                                                </RadialGradientBrush.RelativeTransform>\r\n                                                <GradientStop />\r\n                                                <GradientStop Color=\"#A5FFFFFF\" Offset=\"1\" />\r\n                                            </RadialGradientBrush>\r\n                                        </Border.OpacityMask>\r\n                                    </Border>\r\n                                    <Border Background=\"{StaticResource SecondaryBrush}\" Grid.Row=\"1\">\r\n                                        <Border.OpacityMask>\r\n                                            <LinearGradientBrush EndPoint=\"1,.5\" StartPoint=\"-0.972,0.5\">\r\n                                                <GradientStop Color=\"#00000000\" Offset=\"1\" />\r\n                                                <GradientStop Color=\"#A5FFFFFF\" Offset=\"0\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Border.OpacityMask>\r\n                                    </Border>\r\n                                    <Border Background=\"{StaticResource SecondaryBrush}\" OpacityMask=\"#00000000\" Grid.Column=\"1\" Grid.Row=\"1\" />\r\n                                    <Border Background=\"{StaticResource SecondaryBrush}\" Grid.Column=\"2\" Grid.Row=\"1\">\r\n                                        <Border.OpacityMask>\r\n                                            <LinearGradientBrush EndPoint=\"0,0.5\" StartPoint=\"2.01,0.5\">\r\n                                                <GradientStop Color=\"#A5FFFFFF\" Offset=\"0\" />\r\n                                                <GradientStop Color=\"#00FFFFFF\" Offset=\"1\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Border.OpacityMask>\r\n                                    </Border>\r\n                                    <Border Background=\"{StaticResource SecondaryBrush}\" CornerRadius=\"0,0,0,2.5\" Grid.Row=\"2\">\r\n                                        <Border.OpacityMask>\r\n                                            <RadialGradientBrush GradientOrigin=\"0.646,0.361\">\r\n                                                <RadialGradientBrush.RelativeTransform>\r\n                                                    <TransformGroup>\r\n                                                        <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"3.438\" ScaleY=\"3.438\" />\r\n                                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                                                        <RotateTransform Angle=\"0\" CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                                                        <TranslateTransform X=\"-0.072\" Y=\"0.072\" />\r\n                                                    </TransformGroup>\r\n                                                </RadialGradientBrush.RelativeTransform>\r\n                                                <GradientStop />\r\n                                                <GradientStop Color=\"#A5FFFFFF\" Offset=\"1\" />\r\n                                            </RadialGradientBrush>\r\n                                        </Border.OpacityMask>\r\n                                    </Border>\r\n                                    <Border Background=\"{StaticResource SecondaryBrush}\" Margin=\"0,0,0,0\" Grid.Column=\"1\" Grid.Row=\"2\">\r\n                                        <Border.OpacityMask>\r\n                                            <LinearGradientBrush EndPoint=\"0.5,2.065\" StartPoint=\"0.5,0\">\r\n                                                <GradientStop Color=\"#00000000\" Offset=\"0\" />\r\n                                                <GradientStop Color=\"#A5FFFFFF\" Offset=\"1\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Border.OpacityMask>\r\n                                    </Border>\r\n                                    <Border Background=\"{StaticResource SecondaryBrush}\" CornerRadius=\"0,0,2.5,0\" Grid.Column=\"2\" Grid.Row=\"2\">\r\n                                        <Border.OpacityMask>\r\n                                            <RadialGradientBrush GradientOrigin=\"0.287,0.495\">\r\n                                                <RadialGradientBrush.RelativeTransform>\r\n                                                    <TransformGroup>\r\n                                                        <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"4.282\" ScaleY=\"3.792\" />\r\n                                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                                                        <RotateTransform Angle=\"0\" CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                                                        <TranslateTransform X=\"0.495\" Y=\"-0.463\" />\r\n                                                    </TransformGroup>\r\n                                                </RadialGradientBrush.RelativeTransform>\r\n                                                <GradientStop />\r\n                                                <GradientStop Color=\"#A5FFFFFF\" Offset=\"1\" />\r\n                                            </RadialGradientBrush>\r\n                                        </Border.OpacityMask>\r\n                                    </Border>\r\n                                </Grid>\r\n                                <DockPanel KeyboardNavigation.TabIndex=\"1\" KeyboardNavigation.TabNavigation=\"Local\" Grid.RowSpan=\"2\">\r\n                                    <Thumb Margin=\"-3,-1,0,0\" x:Name=\"ToolBarThumb\" Style=\"{StaticResource ToolBarThumbStyle}\" Width=\"10\" Padding=\"6,5,1,6\" Background=\"{DynamicResource SecondaryBrush}\" />\r\n                                    <ContentPresenter HorizontalAlignment=\"Center\" Margin=\"4,0,4,0\" x:Name=\"ToolBarHeader\" VerticalAlignment=\"Center\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" ContentSource=\"Header\" />\r\n                                    <ToolBarPanel Margin=\"0,1,2,2\" x:Name=\"PART_ToolBarPanel\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" IsItemsHost=\"true\" />\r\n                                </DockPanel>\r\n                            </Grid>\r\n                        </Border>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsOverflowOpen\" Value=\"true\">\r\n                            <Setter Property=\"IsEnabled\" TargetName=\"ToolBarThumb\" Value=\"false\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"Header\" Value=\"{x:Null}\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"ToolBarHeader\" Value=\"Collapsed\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"ToolBarTray.IsLocked\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"ToolBarThumb\" Value=\"Collapsed\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"HasDropShadow\" SourceName=\"OverflowPopup\" Value=\"true\">\r\n                            <Setter Property=\"Margin\" TargetName=\"Shdw\" Value=\"0,0,5,5\" />\r\n                            <Setter Property=\"SnapsToDevicePixels\" TargetName=\"Shdw\" Value=\"true\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"Orientation\" Value=\"Vertical\">\r\n                            <Setter Property=\"Margin\" TargetName=\"Grid\" Value=\"1,3,1,1\" />\r\n                            <Setter Property=\"Style\" TargetName=\"OverflowButton\" Value=\"{StaticResource ToolBarVerticalOverflowButtonStyle}\" />\r\n                            <Setter Property=\"Height\" TargetName=\"ToolBarThumb\" Value=\"10\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ToolBarThumb\" Value=\"Auto\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"ToolBarThumb\" Value=\"-1,-3,0,0\" />\r\n                            <Setter Property=\"Padding\" TargetName=\"ToolBarThumb\" Value=\"5,6,6,1\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"ToolBarHeader\" Value=\"0,0,0,4\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"PART_ToolBarPanel\" Value=\"1,0,2,2\" />\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ToolBarThumb\" Value=\"Top\" />\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ToolBarHeader\" Value=\"Top\" />\r\n                            <Setter Property=\"HorizontalAlignment\" TargetName=\"OverflowGrid\" Value=\"Stretch\" />\r\n                            <Setter Property=\"VerticalAlignment\" TargetName=\"OverflowGrid\" Value=\"Bottom\" />\r\n                            <Setter Property=\"Placement\" TargetName=\"OverflowPopup\" Value=\"Right\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"MainPanelBorder\" Value=\"0,0,0,11\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--ToolTip-->\r\n    <Style TargetType=\"ToolTip\">\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource TextBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"{StaticResource PrimaryBrush}\" />\r\n        <Setter Property=\"Padding\" Value=\"5,0\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource SecondaryBrush}\" />\r\n        <Setter Property=\"Content\" Value=\"ToolTip\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ToolTip\">\r\n                    <Grid x:Name=\"RootElement\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\" />\r\n                                <VisualState x:Name=\"Disabled\" />\r\n                                <VisualState x:Name=\"ReadOnly\" />\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\" />\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"Background\" CornerRadius=\"12\" BorderBrush=\"{TemplateBinding BorderBrush}\" Background=\"{TemplateBinding Background}\" BorderThickness=\"0.5,0.5,1,1\" />\r\n                        <ContentPresenter x:Name=\"contentPresenter\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" RenderTransformOrigin=\"0.5,0.5\" Content=\"{TemplateBinding Content}\" Margin=\"10,5\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- ProgressBar -->\r\n    <Style x:Key=\"{x:Type ProgressBar}\" TargetType=\"{x:Type ProgressBar}\">\r\n        <Setter Property=\"Foreground\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1.75\" StartPoint=\"0.5,-.5\">\r\n                    <GradientStop Color=\"{StaticResource PrimaryColor}\" Offset=\".3\" />\r\n                    <GradientStop Color=\"{StaticResource SecondaryColor}\" Offset=\"1\" />\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Background\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush StartPoint=\"0.5,-.25\" EndPoint=\"0.5,1.25\">\r\n                    <GradientStop Color=\"{StaticResource SecondaryColor}\" Offset=\"0\" />\r\n                    <GradientStop Color=\"{StaticResource PrimaryColor}\" Offset=\"1\" />\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource SecondaryBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\".5,.5,1.5,1.5\" />\r\n        <Setter Property=\"Maximum\" Value=\"100\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ProgressBar}\">\r\n                    <Grid x:Name=\"Root\" SnapsToDevicePixels=\"True\">\r\n                        <Border x:Name=\"PART_Track\" Background=\"{TemplateBinding BorderBrush}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"4,4,4,4\" />\r\n                        <Grid x:Name=\"ProgressBarRootGrid\">\r\n                            <Grid x:Name=\"IndeterminateRoot\" Visibility=\"Collapsed\">\r\n                                <Rectangle Margin=\"{TemplateBinding BorderThickness}\" x:Name=\"IndeterminateSolidFill\" Opacity=\"1\" RenderTransformOrigin=\"0.5,0.5\" RadiusX=\"4\" RadiusY=\"4\" Fill=\"{TemplateBinding Foreground}\" Stroke=\"#FF448DCA\" StrokeThickness=\"0\" />\r\n                                <Rectangle Margin=\"{TemplateBinding BorderThickness}\" x:Name=\"IndeterminateGradientFill\" Opacity=\"0.7\" RadiusX=\"4\" RadiusY=\"4\" StrokeThickness=\"1\">\r\n                                    <Rectangle.Fill>\r\n                                        <LinearGradientBrush MappingMode=\"Absolute\" SpreadMethod=\"Repeat\" EndPoint=\"0,1\" StartPoint=\"20,1\">\r\n                                            <LinearGradientBrush.Transform>\r\n                                                <TransformGroup>\r\n                                                    <TranslateTransform X=\"0\" />\r\n                                                    <SkewTransform AngleX=\"-30\" />\r\n                                                </TransformGroup>\r\n                                            </LinearGradientBrush.Transform>\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                            <GradientStop Color=\"#00FFFFFF\" Offset=\".25\" />\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.85\" />\r\n                                        </LinearGradientBrush>\r\n                                    </Rectangle.Fill>\r\n                                </Rectangle>\r\n                            </Grid>\r\n                            <Grid x:Name=\"DeterminateRoot\">\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\" />\r\n                                    <ColumnDefinition />\r\n                                </Grid.ColumnDefinitions>\r\n                                <Border Background=\"{TemplateBinding Background}\" CornerRadius=\"0,4,4,0\" Grid.Column=\"1\" Margin=\"0,1,1,1\">\r\n                                    <Border.OpacityMask>\r\n                                        <LinearGradientBrush EndPoint=\"20,0\" StartPoint=\"0,0\" MappingMode=\"Absolute\">\r\n                                            <GradientStop Color=\"#00FFFFFF\" Offset=\"0\" />\r\n                                            <GradientStop Color=\"#59FFFFFF\" Offset=\"0.25\" />\r\n                                            <GradientStop Color=\"#A5000000\" Offset=\"1\" />\r\n                                        </LinearGradientBrush>\r\n                                    </Border.OpacityMask>\r\n                                </Border>\r\n                                <Border x:Name=\"PART_Indicator\" CornerRadius=\"4,4,4,4\" Background=\"{TemplateBinding Foreground}\" Margin=\"1,1,1,1\" />\r\n                            </Grid>\r\n                        </Grid>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsIndeterminate\" Value=\"True\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard>\r\n                                    <Storyboard RepeatBehavior=\"Forever\">\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"IndeterminateGradientFill\" Storyboard.TargetProperty=\"(Shape.Fill).(LinearGradientBrush.Transform).(TransformGroup.Children)[0].X\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0\" />\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:.5\" Value=\"20\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </BeginStoryboard>\r\n                            </Trigger.EnterActions>\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"IndeterminateRoot\" />\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"DeterminateRoot\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- Treeview -->\r\n    <Style x:Key=\"{x:Type TreeView}\" TargetType=\"{x:Type TreeView}\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource PrimaryBrush}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource TextBrush}\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"Cursor\" Value=\"Arrow\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1.5,1.5,.75,.75\" />\r\n        <Setter Property=\"Padding\" Value=\"1\" />\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1.5\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"{StaticResource SecondaryColor}\" />\r\n                    <GradientStop Color=\"{StaticResource PrimaryColor}\" Offset=\"1\" />\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TreeView}\">\r\n                    <Border x:Name=\"Root\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Padding=\"{TemplateBinding Padding}\" CornerRadius=\"4\">\r\n                        <Grid>\r\n                            <Grid x:Name=\"InnerShadow\" Opacity=\"0.25\" Margin=\"-1\">\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"6\" />\r\n                                    <ColumnDefinition />\r\n                                    <ColumnDefinition Width=\"6\" />\r\n                                </Grid.ColumnDefinitions>\r\n                                <Grid.RowDefinitions>\r\n                                    <RowDefinition Height=\"6\" />\r\n                                    <RowDefinition />\r\n                                    <RowDefinition Height=\"6\" />\r\n                                </Grid.RowDefinitions>\r\n                                <Border Background=\"{StaticResource SecondaryBrush}\" CornerRadius=\"2.5,0,0,0\">\r\n                                    <Border.OpacityMask>\r\n                                        <RadialGradientBrush>\r\n                                            <RadialGradientBrush.RelativeTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2\" ScaleY=\"2\" />\r\n                                                    <TranslateTransform X=\"0.5\" Y=\"0.5\" />\r\n                                                </TransformGroup>\r\n                                            </RadialGradientBrush.RelativeTransform>\r\n                                            <GradientStop />\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                        </RadialGradientBrush>\r\n                                    </Border.OpacityMask>\r\n                                </Border>\r\n                                <Border Background=\"{StaticResource SecondaryBrush}\" Grid.Column=\"1\">\r\n                                    <Border.OpacityMask>\r\n                                        <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                            <GradientStop Offset=\"1\" />\r\n                                        </LinearGradientBrush>\r\n                                    </Border.OpacityMask>\r\n                                </Border>\r\n                                <Border Background=\"{StaticResource SecondaryBrush}\" Grid.Column=\"2\" CornerRadius=\"0,2.5,0,0\">\r\n                                    <Border.OpacityMask>\r\n                                        <RadialGradientBrush>\r\n                                            <RadialGradientBrush.RelativeTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2\" ScaleY=\"2\" />\r\n                                                    <TranslateTransform X=\"-0.5\" Y=\"0.5\" />\r\n                                                </TransformGroup>\r\n                                            </RadialGradientBrush.RelativeTransform>\r\n                                            <GradientStop />\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                        </RadialGradientBrush>\r\n                                    </Border.OpacityMask>\r\n                                </Border>\r\n                                <Border Background=\"{StaticResource SecondaryBrush}\" Grid.Row=\"1\">\r\n                                    <Border.OpacityMask>\r\n                                        <LinearGradientBrush EndPoint=\"1,.5\" StartPoint=\"0,.5\">\r\n                                            <GradientStop Color=\"#00000000\" Offset=\"1\" />\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                        </LinearGradientBrush>\r\n                                    </Border.OpacityMask>\r\n                                </Border>\r\n                                <Border Background=\"{StaticResource SecondaryBrush}\" Grid.Column=\"1\" Grid.Row=\"1\" OpacityMask=\"#00000000\" />\r\n                                <Border Background=\"{StaticResource SecondaryBrush}\" Grid.Column=\"2\" Grid.Row=\"1\">\r\n                                    <Border.OpacityMask>\r\n                                        <LinearGradientBrush EndPoint=\"1,.5\" StartPoint=\"0,.5\">\r\n                                            <GradientStop Color=\"#FF000000\" Offset=\"1\" />\r\n                                            <GradientStop Color=\"#00FFFFFF\" Offset=\"0\" />\r\n                                        </LinearGradientBrush>\r\n                                    </Border.OpacityMask>\r\n                                </Border>\r\n                                <Border Background=\"{StaticResource SecondaryBrush}\" Grid.Row=\"2\" CornerRadius=\"0,0,0,2.5\">\r\n                                    <Border.OpacityMask>\r\n                                        <RadialGradientBrush>\r\n                                            <RadialGradientBrush.RelativeTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2\" ScaleY=\"2\" />\r\n                                                    <TranslateTransform X=\"0.5\" Y=\"-0.5\" />\r\n                                                </TransformGroup>\r\n                                            </RadialGradientBrush.RelativeTransform>\r\n                                            <GradientStop />\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                        </RadialGradientBrush>\r\n                                    </Border.OpacityMask>\r\n                                </Border>\r\n                                <Border Background=\"{StaticResource SecondaryBrush}\" Grid.Column=\"1\" Grid.Row=\"2\">\r\n                                    <Border.OpacityMask>\r\n                                        <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                            <GradientStop Color=\"#00000000\" Offset=\"0\" />\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                        </LinearGradientBrush>\r\n                                    </Border.OpacityMask>\r\n                                </Border>\r\n                                <Border Background=\"{StaticResource SecondaryBrush}\" Grid.Column=\"2\" Grid.Row=\"2\" CornerRadius=\"0,0,2.5,0\">\r\n                                    <Border.OpacityMask>\r\n                                        <RadialGradientBrush>\r\n                                            <RadialGradientBrush.RelativeTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2\" ScaleY=\"2\" />\r\n                                                    <TranslateTransform X=\"-0.5\" Y=\"-0.5\" />\r\n                                                </TransformGroup>\r\n                                            </RadialGradientBrush.RelativeTransform>\r\n                                            <GradientStop />\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                        </RadialGradientBrush>\r\n                                    </Border.OpacityMask>\r\n                                </Border>\r\n                            </Grid>\r\n                            <ScrollViewer x:Name=\"ScrollViewer\" Background=\"{x:Null}\" BorderBrush=\"Transparent\" BorderThickness=\"0\" IsTabStop=\"False\" HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Auto\">\r\n                                <ItemsPresenter Margin=\"5\" x:Name=\"TreeItems\" />\r\n                            </ScrollViewer>\r\n                        </Grid>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- TreeviewItem -->\r\n    <Style x:Key=\"{x:Type TreeViewItem}\" TargetType=\"{x:Type TreeViewItem}\">\r\n        <Setter Property=\"Padding\" Value=\"3\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource PrimaryBrush}\" />\r\n        <Setter Property=\"Cursor\" Value=\"Arrow\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"True\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TreeViewItem}\">\r\n                    <Grid Background=\"{x:Null}\" x:Name=\"Root\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"Header\" Storyboard.TargetProperty=\"Foreground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"#FF999999\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Root\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.75\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\" />\r\n                            <RowDefinition Height=\"*\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"15\" />\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"*\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid Grid.Column=\"1\" Opacity=\"0\" x:Name=\"grid\">\r\n                            <Border x:Name=\"Background\" CornerRadius=\"12\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\".5,0.5,1,1\">\r\n                                <Border.Background>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,1.75\" StartPoint=\"0.5,-.5\">\r\n                                        <GradientStop Color=\"{StaticResource SecondaryColor}\" Offset=\"0\" />\r\n                                        <GradientStop Color=\"{StaticResource PrimaryColor}\" Offset=\".01\" />\r\n                                        <GradientStop Color=\"{StaticResource PrimaryColor}\" Offset=\".3\" />\r\n                                        <GradientStop Color=\"{StaticResource SecondaryColor}\" Offset=\"1\" />\r\n                                    </LinearGradientBrush>\r\n                                </Border.Background>\r\n                            </Border>\r\n                            <Border x:Name=\"Halo\" CornerRadius=\"12\" Opacity=\".65\" Background=\"{StaticResource SecondaryBrush}\" OpacityMask=\"{StaticResource HaloMask}\" />\r\n                        </Grid>\r\n                        <ToggleButton IsChecked=\"{Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}\" ClickMode=\"Press\" HorizontalAlignment=\"Stretch\" x:Name=\"Expander\" VerticalAlignment=\"Stretch\" IsTabStop=\"False\">\r\n                            <ToggleButton.Template>\r\n                                <ControlTemplate TargetType=\"ToggleButton\">\r\n                                    <Grid x:Name=\"Root\" Background=\"Transparent\">\r\n                                        <VisualStateManager.VisualStateGroups>\r\n                                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                                <VisualState x:Name=\"Normal\" />\r\n                                                <VisualState x:Name=\"MouseOver\">\r\n                                                    <Storyboard>\r\n                                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Border\" Storyboard.TargetProperty=\"(Shape.StrokeThickness)\">\r\n                                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1.25\" />\r\n                                                        </DoubleAnimationUsingKeyFrames>\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                                <VisualState x:Name=\"Disabled\">\r\n                                                    <Storyboard>\r\n                                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"Root\" Storyboard.TargetProperty=\"Opacity\" To=\".7\" />\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                            </VisualStateGroup>\r\n                                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                                <VisualState x:Name=\"Unchecked\" />\r\n                                                <VisualState x:Name=\"Checked\">\r\n                                                    <Storyboard>\r\n                                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"grid\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(RotateTransform.Angle)\">\r\n                                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"45\" />\r\n                                                        </DoubleAnimationUsingKeyFrames>\r\n                                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Arrow\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                                                        </DoubleAnimationUsingKeyFrames>\r\n                                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0\" />\r\n                                                        </DoubleAnimationUsingKeyFrames>\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                            </VisualStateGroup>\r\n                                        </VisualStateManager.VisualStateGroups>\r\n                                        <Grid HorizontalAlignment=\"Right\" Margin=\"2 2 5 2\">\r\n                                            <Grid x:Name=\"grid\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" RenderTransformOrigin=\".25,.8\" Height=\"10\" Width=\"5\">\r\n                                                <Grid.RenderTransform>\r\n                                                    <TransformGroup>\r\n                                                        <RotateTransform />\r\n                                                    </TransformGroup>\r\n                                                </Grid.RenderTransform>\r\n                                                <Path x:Name=\"Arrow\" Stroke=\"{x:Null}\" StrokeLineJoin=\"Miter\" StrokeThickness=\".75\" Data=\"M 0,0 L 0,10 L 5,5 Z\" Fill=\"{StaticResource TextBrush}\" Opacity=\"0\" />\r\n                                                <Path x:Name=\"Border\" Stroke=\"{StaticResource TextBrush}\" StrokeLineJoin=\"Miter\" StrokeThickness=\".75\" Data=\"M 0,0 L 0,10 L 5,5 Z\" Fill=\"{x:Null}\" />\r\n                                            </Grid>\r\n                                        </Grid>\r\n                                    </Grid>\r\n                                </ControlTemplate>\r\n                            </ToggleButton.Template>\r\n                        </ToggleButton>\r\n                        <Button Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" x:Name=\"Header\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Background=\"{TemplateBinding Background}\" Foreground=\"{TemplateBinding Foreground}\" IsTabStop=\"False\" Grid.Column=\"1\" ClickMode=\"Hover\" Content=\"{TemplateBinding Header}\" ContentTemplate=\"{TemplateBinding HeaderTemplate}\" Padding=\"8,3,8,3\">\r\n                            <Button.Template>\r\n                                <ControlTemplate TargetType=\"Button\">\r\n                                    <Grid Background=\"{TemplateBinding Background}\">\r\n                                        <VisualStateManager.VisualStateGroups>\r\n                                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                                <VisualState x:Name=\"Normal\" />\r\n                                                <VisualState x:Name=\"Pressed\">\r\n                                                    <Storyboard>\r\n                                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"hover\" Storyboard.TargetProperty=\"Opacity\" To=\".5\" />\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                                <VisualState x:Name=\"Disabled\">\r\n                                                    <Storyboard>\r\n                                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"content\" Storyboard.TargetProperty=\"Opacity\" To=\".55\" />\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                            </VisualStateGroup>\r\n                                        </VisualStateManager.VisualStateGroups>\r\n                                        <Grid x:Name=\"hover\" Opacity=\"0\">\r\n                                            <Border x:Name=\"Background\" CornerRadius=\"12\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\".5,0.5,1,1\">\r\n                                                <Border.Background>\r\n                                                    <LinearGradientBrush EndPoint=\"0.5,1.75\" StartPoint=\"0.5,-.5\">\r\n                                                        <GradientStop Color=\"{StaticResource SecondaryColor}\" Offset=\"0\" />\r\n                                                        <GradientStop Color=\"{StaticResource PrimaryColor}\" Offset=\".01\" />\r\n                                                        <GradientStop Color=\"{StaticResource PrimaryColor}\" Offset=\".3\" />\r\n                                                        <GradientStop Color=\"{StaticResource SecondaryColor}\" Offset=\"1\" />\r\n                                                    </LinearGradientBrush>\r\n                                                </Border.Background>\r\n                                            </Border>\r\n                                            <Border x:Name=\"Halo\" CornerRadius=\"12\" Opacity=\".65\" Background=\"{StaticResource SecondaryBrush}\" OpacityMask=\"{StaticResource HaloMask}\" />\r\n                                        </Grid>\r\n                                        <ContentPresenter Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"Left\" Margin=\"{TemplateBinding Padding}\" x:Name=\"content\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" />\r\n                                    </Grid>\r\n                                </ControlTemplate>\r\n                            </Button.Template>\r\n                        </Button>\r\n                        <ItemsPresenter x:Name=\"ItemsHost\" Visibility=\"Visible\" Grid.Column=\"1\" Grid.ColumnSpan=\"2\" Grid.Row=\"1\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsExpanded\" Value=\"false\">\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ItemsHost\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"HasItems\" Value=\"false\">\r\n                            <Setter Property=\"Visibility\" Value=\"Hidden\" TargetName=\"Expander\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard>\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"00:00:00.3\" Storyboard.TargetName=\"MouseOverGrid\" Storyboard.TargetProperty=\"Opacity\" To=\"0.25\" />\r\n                                    </Storyboard>\r\n                                </BeginStoryboard>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard>\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"00:00:00.3\" Storyboard.TargetName=\"MouseOverGrid\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                                    </Storyboard>\r\n                                </BeginStoryboard>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsSelected\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard>\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"grid\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </BeginStoryboard>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard>\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"grid\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </BeginStoryboard>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsSelected\" Value=\"true\" />\r\n                                <Condition Property=\"IsSelectionActive\" Value=\"false\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard>\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"MouseOverGrid\" Storyboard.TargetProperty=\"Opacity\" To=\"0.5\" />\r\n                                    </Storyboard>\r\n                                </BeginStoryboard>\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard>\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"00:00:00.3\" Storyboard.TargetName=\"MouseOverGrid\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                                    </Storyboard>\r\n                                </BeginStoryboard>\r\n                            </MultiTrigger.ExitActions>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n</ResourceDictionary>\r\n"
  },
  {
    "path": "WpfToolkit/WPF.Themes/BureauBlack/Theme.xaml",
    "content": "﻿<!--\r\n// (c) Copyright Microsoft Corporation.\r\n// This source is subject to Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n-->\r\n\r\n<ResourceDictionary\r\n  xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n  xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n  xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n  mc:Ignorable=\"d\"\r\n  xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\">\r\n\r\n    <SolidColorBrush x:Key=\"OutsideFontColor\" Color=\"#FFFFFFFF\" />\r\n\r\n    <LinearGradientBrush x:Key=\"NormalBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n        <GradientStop Color=\"#FFA4ADBB\" Offset=\"0.521\"/>\r\n        <GradientStop Color=\"#FFD7E0EA\" Offset=\"0.194\"/>\r\n        <GradientStop Color=\"#FFBAC1CF\" Offset=\"0.811\"/>\r\n        <GradientStop Color=\"#FFBCC5D5\" Offset=\"0.507\"/>\r\n        <GradientStop Color=\"#FFE3E4E6\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"NormalBorderBrush\" EndPoint=\"0.5,0\" StartPoint=\"0.5,1\">\r\n        <GradientStop Color=\"#FF8B8B8B\"/>\r\n        <GradientStop Color=\"#FFADADAD\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"NormalHighlightBrush\" Color=\"#FFFFFFFF\"/>\r\n    <LinearGradientBrush x:Key=\"MouseOverBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FFFEF3B5\" Offset=\"0.318\" />\r\n        <GradientStop Color=\"#FFFFEB70\" Offset=\"0.488\" />\r\n        <GradientStop Color=\"#FFFFD02E\" Offset=\"0.502\" />\r\n        <GradientStop Color=\"#FFFFD932\" Offset=\"0.834\" />\r\n        <GradientStop Color=\"#FFFFF48B\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"MouseOverBorderBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFEEE8CF\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FFC4AF8C\" Offset=\"0.536\" />\r\n        <GradientStop Color=\"#FFDCD1BF\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"MouseOverHighlightBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFFFFFFB\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FFFEF3B5\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"PressedBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFC3BCAE\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FFFDCE9D\" Offset=\"0.046\" />\r\n        <GradientStop Color=\"#FFFFA35B\" Offset=\"0.452\" />\r\n        <GradientStop Color=\"#FFFF8A2C\" Offset=\"0.461\" />\r\n        <GradientStop Color=\"#FFFF9F30\" Offset=\"0.724\" />\r\n        <GradientStop Color=\"#FFFFC472\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"PressedBorderBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FF8E8165\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FFC3BCAE\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"PressedHighlightBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.665\" />\r\n        <GradientStop Color=\"#FFC3BCAE\" Offset=\"0\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"DisabledBackgroundBrush\" Color=\"#A5FFFFFF\"/>\r\n    <SolidColorBrush x:Key=\"DisabledBorderBrush\" Color=\"#66FFFFFF\"/>\r\n    <SolidColorBrush x:Key=\"FocusBrush\" Color=\"#FFE99862\"/>\r\n\r\n    <LinearGradientBrush x:Key=\"ControlBackgroundBrush\" EndPoint=\"1.204,0.5\" StartPoint=\"0.056,0.5\">\r\n        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FFD4D7DB\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"ControlBorderBrush\" Color=\"#FFB1703C\"/>\r\n\r\n    <SolidColorBrush x:Key=\"GlyphBrush\" Color=\"#FF527DB5\"/>\r\n\r\n    <!-- CheckBox Brushes -->\r\n\r\n    <SolidColorBrush x:Key=\"CheckBoxBackgroundBrush\" Color=\"#FFF4F4F4\"/>\r\n    <SolidColorBrush x:Key=\"CheckBoxBorderBrush\" Color=\"#FF868686\"/>\r\n    <SolidColorBrush x:Key=\"CheckBoxInnerBoxBackgroundBrush\" Color=\"#FFCACFD5\"/>\r\n    <LinearGradientBrush x:Key=\"CheckBoxInnerBoxBorderBrush\" EndPoint=\"-0.007,-0.012\" StartPoint=\"0.915,0.92\">\r\n        <GradientStop Color=\"#FFE4E5E9\" />\r\n        <GradientStop Color=\"#FFA2ACB9\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"CheckBoxBackgroundFillBrush\" Color=\"#FFDEEAFA\"/>\r\n    <SolidColorBrush x:Key=\"CheckBoxMouseOverBrush\" Color=\"#FFFCE7AF\"/>\r\n    <LinearGradientBrush x:Key=\"CheckBoxPressBorderBrush\" EndPoint=\"0.055,0.119\" StartPoint=\"0.886,0.808\">\r\n        <GradientStop Color=\"#FFF4D9BE\" />\r\n        <GradientStop Color=\"#FFF28A27\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"CheckBoxInnerBoxGradientBrush\" StartPoint=\"0.238,0.228\" EndPoint=\"0.752,0.749\">\r\n        <GradientStop Color=\"#00F6F6F6\" Offset=\"0.254\" />\r\n        <GradientStop Color=\"#53F8F8F8\" Offset=\"0.54\" />\r\n        <GradientStop Color=\"#BFFFFFFF\" Offset=\"0.996\" />\r\n    </LinearGradientBrush>\r\n\r\n    <!-- RadioButton Brushes -->\r\n\r\n    <SolidColorBrush x:Key=\"RadioButtonBackgroundBrush\" Color=\"#FFEDEDEE\"/>\r\n    <SolidColorBrush x:Key=\"RadioButtonBorderBrush\" Color=\"#FF597AA5\"/>\r\n    <LinearGradientBrush x:Key=\"RadioButtonInnerCircleBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFC8CDD2\" />\r\n        <GradientStop Color=\"#FFF2F2F2\" Offset=\"0.531\" />\r\n        <GradientStop Color=\"#FFF5F5F5\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"RadioButtonInnerCircleBorderBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFB3B8BD\" Offset=\"0.004\" />\r\n        <GradientStop Color=\"#FFE0E0E0\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"RadioButtonMouseOverBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFE3DBA9\" />\r\n        <GradientStop Color=\"#FFFEF5DD\" Offset=\"0.531\" />\r\n        <GradientStop Color=\"#FFFEF5DD\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"RadioButtonMouseOverBorderBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFE3CF87\" Offset=\"0.004\" />\r\n        <GradientStop Color=\"#FFFCF0D3\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"RadioButtonPressBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFC8CDD2\" />\r\n        <GradientStop Color=\"#FFF2F2F2\" Offset=\"0.531\" />\r\n        <GradientStop Color=\"#FFF5F5F5\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"RadioButtonPressBorderBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFAC773F\" Offset=\"0.004\" />\r\n        <GradientStop Color=\"#FFC8B5A3\" Offset=\"0.987\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"RadioButtonCheckIconBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFFDDC8B\" Offset=\"0.013\" />\r\n        <GradientStop Color=\"#FFFDDC8B\" Offset=\"0.188\" />\r\n        <GradientStop Color=\"#FFF9952F\" Offset=\"0.491\" />\r\n        <GradientStop Color=\"#FFF9954A\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"RadioButtonCheckIconBorderBrush\" Color=\"#FFDA8229\"/>\r\n\r\n    <!-- ScrollBar RepeatButtonBrushes -->\r\n\r\n    <LinearGradientBrush x:Key=\"ScrollBarRepeatButtonBrush\" EndPoint=\"0.5,0\" StartPoint=\"0.5,1\">\r\n        <GradientStop Color=\"#FFF1F6FE\" Offset=\"0.5\" />\r\n        <GradientStop Color=\"#FFC7D9F1\" Offset=\"0.513\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"ScrollBarRepeatButtonBorderBrush\" Color=\"#FF8C97A5\"/>\r\n    <LinearGradientBrush x:Key=\"ScrollBarRepeatButtonPressedBrush\" EndPoint=\"0.5,0\" StartPoint=\"0.5,1\">\r\n        <GradientStop Color=\"#FFF1F6FE\" Offset=\"0.5\" />\r\n        <GradientStop Color=\"#FFD1D6DD\" Offset=\"0.513\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"ScrollBarRepeatButtonPressedBorderBrush\" Color=\"#FF19598A\"/>\r\n\r\n\r\n    <!-- ScrollBar ThumbBrushes -->\r\n\r\n    <LinearGradientBrush x:Key=\"ScrollBarThumbBrush\" EndPoint=\"-0.062,0.5\" StartPoint=\"1.062,0.5\">\r\n        <GradientStop Color=\"#FFD1DBE6\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FFD1DAE4\" Offset=\"0.5\" />\r\n        <GradientStop Color=\"#FFE6E9F0\" Offset=\"0.513\" />\r\n        <GradientStop Color=\"#FFE8E9E9\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"ScrollBarThumbBorderBrush\" Color=\"#FF606F94\"/>\r\n    <LinearGradientBrush x:Key=\"ScrollBarThumbMouseOverBrush\" EndPoint=\"-0.062,0.5\" StartPoint=\"1.062,0.5\">\r\n        <GradientStop Color=\"#FFB4D1F7\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FFAACBF6\" Offset=\"0.5\" />\r\n        <GradientStop Color=\"#FFCADFFA\" Offset=\"0.513\" />\r\n        <GradientStop Color=\"#FFBED0E8\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"ScrollBarThumbMouseOverBorderBrush\" Color=\"#FF3C6EB0\"/>\r\n    <LinearGradientBrush x:Key=\"ScrollBarThumbPressedBrush\" EndPoint=\"-0.062,0.5\" StartPoint=\"1.062,0.5\">\r\n        <GradientStop Color=\"#FFB4D1F7\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FF6EA6F0\" Offset=\"0.5\" />\r\n        <GradientStop Color=\"#FFA4C7F6\" Offset=\"0.513\" />\r\n        <GradientStop Color=\"#FF9CBBE5\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"ScrollBarThumbPressedBorderBrush\" Color=\"#FF17498A\"/>\r\n\r\n    <!-- ListItem Brushes -->\r\n\r\n    <LinearGradientBrush x:Key=\"ListItemSelectedBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.046\" />\r\n        <GradientStop Color=\"#FFD7E0EA\" Offset=\"0.194\" />\r\n        <GradientStop Color=\"#FFBCC5D5\" Offset=\"0.507\" />\r\n        <GradientStop Color=\"#FFA4ADBB\" Offset=\"0.521\" />\r\n        <GradientStop Color=\"#FFBAC1CF\" Offset=\"0.811\" />\r\n        <GradientStop Color=\"#FFE3E4E6\" Offset=\"0.982\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"ListItemSelectedBorderBrush\" EndPoint=\"0.5,0\" StartPoint=\"0.5,1\">\r\n        <GradientStop Color=\"#FF8B8B8B\" />\r\n        <GradientStop Color=\"#FFADADAD\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <!-- Expander ToggleButton Brushes -->\r\n\r\n    <LinearGradientBrush x:Key=\"ExpanderToggleButtonBrush\" EndPoint=\"0.293,0.43\" StartPoint=\"0.742,0.43\">\r\n        <GradientStop Color=\"#FFDDE0E3\"/>\r\n        <GradientStop Color=\"#FFEFF0F1\" Offset=\"0.53\"/>\r\n        <GradientStop Color=\"#FFDDE0E3\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"ExpanderToggleButtonBottomBrush\" Color=\"#FFC7CBD1\"/>\r\n    <LinearGradientBrush x:Key=\"ExpanderToggleButtonHoverBrush\" EndPoint=\"0.667,0.528\" StartPoint=\"0.266,0.528\">\r\n        <GradientStop Color=\"#FFE8EAEC\"/>\r\n        <GradientStop Color=\"#FFFEFEFE\" Offset=\"0.366\"/>\r\n        <GradientStop Color=\"#FFFEFEFE\" Offset=\"0.732\"/>\r\n        <GradientStop Color=\"#FFE8EAEC\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <SolidColorBrush x:Key=\"ExpanderToggleArrow2Stroke\" Color=\"#FF567DB1\"/>\r\n    <SolidColorBrush x:Key=\"ExpanderToggleArrowStroke\" Color=\"#FF567DB1\"/>\r\n\r\n    <!-- ProgressBar Brushes -->\r\n\r\n    <LinearGradientBrush x:Key=\"ProgressBarIndicatorBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFC3BCAE\" Offset=\"0\"/>\r\n        <GradientStop Color=\"#FFFDCE9D\" Offset=\"0.041\"/>\r\n        <GradientStop Color=\"#FFFFA35B\" Offset=\"0.507\"/>\r\n        <GradientStop Color=\"#FFFF8A2C\" Offset=\"0.516\"/>\r\n        <GradientStop Color=\"#FFFF9F30\" Offset=\"0.724\"/>\r\n        <GradientStop Color=\"#FFFFC472\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <!-- TabControlBrushes -->\r\n\r\n    <SolidColorBrush x:Key=\"TabControlHeaderBrush\" Color=\"#FF535353\"/>\r\n    <SolidColorBrush x:Key=\"TabControlContentBrush\" Color=\"#FFD5D8DD\"/>\r\n    <SolidColorBrush x:Key=\"TabControlContentBorderBrush\" Color=\"#FFBEBEBE\"/>\r\n\r\n    <!-- TabItemBrushes -->\r\n\r\n    <RadialGradientBrush x:Key=\"TabItemHoverBrush\" GradientOrigin=\"0.503,1.06\">\r\n        <RadialGradientBrush.RelativeTransform>\r\n            <TransformGroup>\r\n                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2.713\" ScaleY=\"2.147\"/>\r\n                <SkewTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n                <RotateTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n                <TranslateTransform X=\"-0.012\" Y=\"-0.134\"/>\r\n            </TransformGroup>\r\n        </RadialGradientBrush.RelativeTransform>\r\n        <GradientStop Color=\"#FFEBC227\" Offset=\"0.263\"/>\r\n        <GradientStop Color=\"#00726C5E\" Offset=\"0.513\"/>\r\n        <GradientStop Color=\"#FF969695\" Offset=\"0.683\"/>\r\n    </RadialGradientBrush>\r\n    <LinearGradientBrush x:Key=\"TabItemHoverBorderBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#00FFFFFF\" Offset=\"0\"/>\r\n        <GradientStop Color=\"#FFBEBEBE\" Offset=\"0.679\"/>\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"TabItemHoverHighlightBrush\" Color=\"#FF9FBCF0\"/>\r\n    <LinearGradientBrush x:Key=\"TabItemSelectedBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFF1F1F2\" Offset=\"0.326\" />\r\n        <GradientStop Color=\"#FFD5D9DE\" Offset=\"1.0\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"TabItemSelectedBorderBrush\" Color=\"#FFF3F8FF\"/>\r\n    <LinearGradientBrush x:Key=\"TabItemBorderTopBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,-0.5\">\r\n        <GradientStop Color=\"#FFECF9FA\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FFC1F7FC\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"TabItemHighlightTopBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFF3F8FF\" Offset=\"0\" />\r\n        <GradientStop Color=\"#D8ECF8FC\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"TabItemBorderTop2Brush\" Color=\"#FF9ABBE6\"/>\r\n    <LinearGradientBrush x:Key=\"TabItemFocusBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#99F7C53B\" Offset=\"0\" />\r\n        <GradientStop Color=\"#99F2B93F\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <!-- SliderThumbBrushes -->\r\n\r\n    <SolidColorBrush x:Key=\"SliderThumbBorderBrush\" Color=\"#FF496FA2\"/>\r\n    <SolidColorBrush x:Key=\"SliderThumbBrush\" Color=\"#FFC1C1C1\"/>\r\n\r\n    <!-- SliderBrushes -->\r\n\r\n    <LinearGradientBrush x:Key=\"SliderBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FF324D70\" Offset=\"0.493\" />\r\n        <GradientStop Color=\"#FF6A8BB6\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <Color x:Key=\"BlackColor\">#FF000000</Color>\r\n    <Color x:Key=\"WhiteColor\">#FFFFFFFF</Color>\r\n\r\n    <SolidColorBrush x:Key=\"DisabledForegroundBrush\" Color=\"#888\" />\r\n\r\n    <!-- TextControlsBrushes-->\r\n    <LinearGradientBrush x:Key=\"TextControlBorderBrush\"  EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFABAEB3\"/>\r\n        <GradientStop Color=\"#FFE2E8EE\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <SolidColorBrush x:Key=\"WindowBackgroundBrush\" Color=\"#FFF\" />\r\n\r\n    <Style x:Key=\"NuclearButtonFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Border>\r\n                        <Rectangle Margin=\"2\" Stroke=\"#60000000\" StrokeThickness=\"1\" StrokeDashArray=\"1 2\" />\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n\r\n    <Style TargetType=\"{x:Type Button}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource NuclearButtonFocusVisual}\" />\r\n        <Setter Property=\"Foreground\" Value=\"#FF042271\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"Padding\" Value=\"3\" />\r\n<Setter Property=\"Template\" Value=\"{DynamicResource ButtonTemplate}\" />\r\n    </Style>\r\n    \r\n     <ControlTemplate x:Key=\"ButtonTemplate\" TargetType=\"{x:Type Button}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundOver\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundOver_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0.65\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundOver_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\" To=\"0.84\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgoundPressed_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0.65\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgoundPressed_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"DisabledOn\">\r\n                            <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                <DiscreteObjectKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"{x:Static Visibility.Visible}\" />\r\n                            </ObjectAnimationUsingKeyFrames>\r\n                            <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"DisabledOverlay\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                <DiscreteObjectKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"{x:Static Visibility.Visible}\" />\r\n                            </ObjectAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid x:Name=\"Grid\">\r\n                        <Border x:Name=\"BackgroundNorm\" BorderThickness=\"1\" CornerRadius=\"1.75\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\"/>\r\n                        <Border x:Name=\"BackgroundNorm_highlight\" Margin=\"1\" BorderBrush=\"{DynamicResource NormalHighlightBrush}\" BorderThickness=\"1,0,1,1\" CornerRadius=\"1\" Opacity=\"0.65\" />\r\n                        <Border x:Name=\"BackgroundOver\" BorderThickness=\"1\" CornerRadius=\"1.75\" Opacity=\"0\" Background=\"{DynamicResource MouseOverBrush}\" BorderBrush=\"{DynamicResource MouseOverBorderBrush}\"/>\r\n                        <Border x:Name=\"BackgroundOver_Highlight\" Margin=\"1\" BorderThickness=\"1,0,1,1\" CornerRadius=\"1\" Opacity=\"0\" BorderBrush=\"{DynamicResource MouseOverHighlightBrush}\"/>\r\n                        <Border x:Name=\"BackgroundPressed\" BorderThickness=\"1\" CornerRadius=\"1.75\" Opacity=\"0\" Background=\"{DynamicResource PressedBrush}\" BorderBrush=\"{DynamicResource PressedBorderBrush}\"/>\r\n                        <Border x:Name=\"BackgoundPressed_Highlight\" Margin=\"1\" BorderThickness=\"1,0,1,1\" CornerRadius=\"1\" Opacity=\"0\" BorderBrush=\"{DynamicResource PressedHighlightBrush}\"/>\r\n                        <Border x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"false\" Background=\"{DynamicResource DisabledBackgroundBrush}\" BorderBrush=\"{DynamicResource DisabledBorderBrush}\" BorderThickness=\"1\" Opacity=\"0\" />\r\n\r\n                        <ContentPresenter x:Name=\"contentPresenter\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" />\r\n                        <TextBlock Panel.ZIndex=\"1\" x:Name=\"DisabledOverlay\" Text=\"{TemplateBinding Content}\" Foreground=\"#FF8E96A2\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" Visibility=\"Collapsed\" />\r\n                        <Border x:Name=\"FocusVisualElement\" Margin=\"-1\" BorderBrush=\"{DynamicResource FocusBrush}\" BorderThickness=\"1\" CornerRadius=\"2.75\" IsHitTestVisible=\"false\" Opacity=\"0\" />\r\n                        <Border x:Name=\"DefaultBorder\" Margin=\"-1\" BorderBrush=\"{DynamicResource FocusBrush}\" BorderThickness=\"1\" CornerRadius=\"2.75\" IsHitTestVisible=\"false\" Opacity=\"0\" />\r\n                    </Grid>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsDefault\" Value=\"True\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"DefaultBorder\" Value=\"1\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"FocusedOn_BeginStoryboard\" Storyboard=\"{StaticResource FocusedOn}\" />\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"FocusedOff_BeginStoryboard\" Storyboard=\"{StaticResource FocusedOff}\" />\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"FocusedOff_BeginStoryboard1\" Storyboard=\"{StaticResource FocusedOff}\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"FocusedOn_BeginStoryboard1\" Storyboard=\"{StaticResource FocusedOn}\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"true\" />\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource DisabledOn}\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                            <Setter Property=\"Opacity\" TargetName=\"DisabledVisualElement\" Value=\"1\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n\r\n    <Style x:Key=\"RadioButtonFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Border>\r\n                        <Rectangle Margin=\"15,0,0,0\" Stroke=\"#60000000\" StrokeThickness=\"1\" StrokeDashArray=\"1 2\" />\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"CheckBoxFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Border>\r\n                        <Rectangle Margin=\"15,0,0,0\" Stroke=\"#60000000\" StrokeThickness=\"1\" StrokeDashArray=\"1 2\" />\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n\r\n    <Style TargetType=\"{x:Type CheckBox}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource CheckBoxFocusVisual}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource OutsideFontColor}\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"Padding\" Value=\"4,1,0,0\" />\r\n<Setter Property=\"Template\" Value=\"{DynamicResource CheckBoxTemplate}\" />\r\n    </Style>\r\n    \r\n<ControlTemplate x:Key=\"CheckBoxTemplate\" TargetType=\"{x:Type CheckBox}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BoxOver\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BoxOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <ColorAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BoxOver\" Storyboard.TargetProperty=\"(Shape.Stroke).(GradientBrush.GradientStops)[1].(GradientStop.Color)\" To=\"#FFF28A27\" />\r\n                            <ColorAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BoxOver\" Storyboard.TargetProperty=\"(Shape.Stroke).(GradientBrush.GradientStops)[0].(GradientStop.Color)\" To=\"#FFF4D9BE\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BoxOver\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundFill\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <ColorAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BoxOver\" Storyboard.TargetProperty=\"(Shape.Stroke).(GradientBrush.GradientStops)[1].(GradientStop.Color)\" To=\"#FFFDDA81\" />\r\n                            <ColorAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BoxOver\" Storyboard.TargetProperty=\"(Shape.Stroke).(GradientBrush.GradientStops)[0].(GradientStop.Color)\" To=\"#FFFCE7AF\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BoxOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundFill\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"DisabledOn\">\r\n                            <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                <DiscreteObjectKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"{x:Static Visibility.Visible}\" />\r\n                            </ObjectAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BoxPress\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                            <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                <DiscreteObjectKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"{x:Static Visibility.Visible}\" />\r\n                            </ObjectAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BoxPress\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                <DiscreteObjectKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"{x:Static Visibility.Collapsed}\" />\r\n                            </ObjectAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"IndeterminateOn\">\r\n\r\n                            <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"IndeterminateIcon\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                <DiscreteObjectKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"{x:Static Visibility.Visible}\" />\r\n                            </ObjectAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"IndeterminateOff\">\r\n\r\n                            <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"IndeterminateIcon\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                <DiscreteObjectKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"{x:Static Visibility.Collapsed}\" />\r\n                            </ObjectAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusedVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusedVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <BulletDecorator Background=\"Transparent\">\r\n                        <BulletDecorator.Bullet>\r\n                            <Grid>\r\n                                <Rectangle x:Name=\"Background\" Margin=\"1\" Width=\"13\" Height=\"13\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{DynamicResource CheckBoxBackgroundBrush}\" Stroke=\"{DynamicResource CheckBoxBorderBrush}\" StrokeThickness=\"1\" />\r\n                                <Rectangle x:Name=\"BoxFill\" Width=\"9\" Height=\"9\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{DynamicResource CheckBoxInnerBoxBackgroundBrush}\" StrokeThickness=\"1\" Stroke=\"{DynamicResource CheckBoxInnerBoxBorderBrush}\"/>\r\n                                <Rectangle x:Name=\"BackgroundFill\" Margin=\"1\" Width=\"13\" Height=\"13\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{DynamicResource CheckBoxBackgroundFillBrush}\" Stroke=\"#FF5577A3\" StrokeThickness=\"1\" Opacity=\"0\" />\r\n                                <Rectangle x:Name=\"BoxOver\" Margin=\"3\" Width=\"9\" Height=\"9\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{DynamicResource CheckBoxMouseOverBrush}\" StrokeThickness=\"1\" Opacity=\"0\">\r\n                                    <Rectangle.Stroke>\r\n                                        <LinearGradientBrush EndPoint=\"0.055,0.119\" StartPoint=\"0.886,0.808\">\r\n                                            <GradientStop Color=\"#FFFCE7AF\" />\r\n                                            <GradientStop Color=\"#FFFDDA81\" Offset=\"1\" />\r\n                                        </LinearGradientBrush>\r\n                                    </Rectangle.Stroke>\r\n                                </Rectangle>\r\n                                <Rectangle x:Name=\"BoxPress\" Margin=\"3\" Width=\"9\" Height=\"9\" RadiusX=\"0\" RadiusY=\"0\" StrokeThickness=\"1\" Opacity=\"0\" Stroke=\"{DynamicResource CheckBoxPressBorderBrush}\"/>\r\n                                <Rectangle x:Name=\"BoxGradient\" Width=\"7\" Height=\"7\" RadiusX=\"0\" RadiusY=\"0\" StrokeThickness=\"1\" Fill=\"{DynamicResource CheckBoxInnerBoxGradientBrush}\"/>\r\n                                <Rectangle x:Name=\"IndeterminateIcon\" Width=\"5\" Height=\"2\" Fill=\"{DynamicResource GlyphBrush}\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Visibility=\"Collapsed\" />\r\n                                <Path x:Name=\"CheckIcon\" Margin=\"0,3.333,3.833,0\" Width=\"7\" Height=\"9\" Fill=\"{DynamicResource GlyphBrush}\" Stretch=\"Fill\" VerticalAlignment=\"Top\" HorizontalAlignment=\"Right\" Data=\"M103.78572,598.96112 L105.09846,597.5661 L107.00806,600.16229 C107.00806,600.16229 109.91004,592.74463 109.91004,592.74463 C109.91004,592.74463 111.74678,593.79761 111.74678,593.79761 C111.74678,593.79761 107.88566,602.75848 107.88566,602.75848 L106.60118,602.75848 z\" Visibility=\"Collapsed\" />\r\n                                <Rectangle x:Name=\"FocusedVisualElement\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{DynamicResource FocusBrush}\" StrokeThickness=\"1\" Opacity=\"0\" />\r\n                                <Rectangle x:Name=\"DisabledVisualElement\" Margin=\"1\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{DynamicResource DisabledBackgroundBrush}\" Visibility=\"Collapsed\" />\r\n                            </Grid>\r\n                        </BulletDecorator.Bullet>\r\n                        <ContentPresenter Grid.Column=\"1\" x:Name=\"contentPresenter\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" />\r\n                    </BulletDecorator>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsChecked\" Value=\"True\" />\r\n                                <Condition Property=\"IsThreeState\" Value=\"True\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"CheckedOff_BeginStoryboard\" Storyboard=\"{StaticResource CheckedOff}\" />\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"CheckedOn_BeginStoryboard\" Storyboard=\"{StaticResource CheckedOn}\" />\r\n                            </MultiTrigger.ExitActions>\r\n                        </MultiTrigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsChecked\" Value=\"{x:Null}\" />\r\n                                <Condition Property=\"IsThreeState\" Value=\"True\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource IndeterminateOn}\" />\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource IndeterminateOff}\" />\r\n                            </MultiTrigger.ExitActions>\r\n                            <Setter Property=\"Opacity\" TargetName=\"CheckIcon\" Value=\"0\" />\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"CheckedOn_BeginStoryboard2\" Storyboard=\"{StaticResource CheckedOff}\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"CheckedOn_BeginStoryboard1\" Storyboard=\"{StaticResource CheckedOn}\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource DisabledOn}\" />\r\n                            </Trigger.EnterActions>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n\r\n                </ControlTemplate>\r\n\r\n    <Style TargetType=\"{x:Type RadioButton}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource RadioButtonFocusVisual}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource OutsideFontColor}\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"Padding\" Value=\"4,1,0,0\" />\r\n<Setter Property=\"Template\" Value=\"{DynamicResource RadioButtonTemplate}\" />\r\n    </Style>\r\n    \r\n    <ControlTemplate x:Key=\"RadioButtonTemplate\" TargetType=\"{x:Type RadioButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"CircleOver\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"CircleOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"CirclePress\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"CirclePress\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"DisabledOn\" />\r\n                        <Storyboard x:Key=\"CheckedOn\">\r\n                            <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                <DiscreteObjectKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"{x:Static Visibility.Visible}\" />\r\n                            </ObjectAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOff\">\r\n                            <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                <DiscreteObjectKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"{x:Static Visibility.Collapsed}\" />\r\n                            </ObjectAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusedVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusedVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <BulletDecorator Background=\"Transparent\">\r\n                        <BulletDecorator.Bullet>\r\n                            <Grid>\r\n                                <Ellipse x:Name=\"Background\" Margin=\"1\" Width=\"14\" Height=\"14\" Fill=\"{DynamicResource RadioButtonBackgroundBrush}\" Stroke=\"{DynamicResource RadioButtonBorderBrush}\" StrokeThickness=\"1\" />\r\n                                <Ellipse x:Name=\"CircleFill\" Margin=\"3.045,3.157,2.955,2.843\" StrokeThickness=\"1\" Fill=\"{DynamicResource RadioButtonInnerCircleBrush}\" Stroke=\"{DynamicResource RadioButtonInnerCircleBorderBrush}\"/>\r\n                                <Ellipse x:Name=\"CircleOver\" Margin=\"2.847,2.847,3.153,3.153\" StrokeThickness=\"1\" Opacity=\"0\" Fill=\"{DynamicResource RadioButtonMouseOverBrush}\" Stroke=\"{DynamicResource RadioButtonMouseOverBorderBrush}\">\r\n                                </Ellipse>\r\n                                <Ellipse x:Name=\"CirclePress\" Margin=\"2.73,2.73,3.27,3.27\" StrokeThickness=\"1\" Opacity=\"0\" Fill=\"{DynamicResource RadioButtonPressBrush}\" Stroke=\"{DynamicResource RadioButtonPressBorderBrush}\"/>\r\n                                <Ellipse x:Name=\"CheckIcon\" Margin=\"4.47,4.498,3.53,3.502\" StrokeThickness=\"1\" Visibility=\"Collapsed\" Stroke=\"{DynamicResource RadioButtonCheckIconBorderBrush}\" Fill=\"{DynamicResource RadioButtonCheckIconBrush}\">\r\n                                </Ellipse>\r\n                                <Ellipse x:Name=\"DisabledVisualElement\" Width=\"14\" Height=\"14\" Opacity=\"0.35\" Visibility=\"Visible\" >\r\n                                    <Ellipse.Stroke>\r\n                                        <SolidColorBrush Color=\"{DynamicResource WhiteColor}\"/>\r\n                                    </Ellipse.Stroke>\r\n                                    <Ellipse.Fill>\r\n                                        <SolidColorBrush Color=\"{DynamicResource WhiteColor}\"/>\r\n                                    </Ellipse.Fill>\r\n                                </Ellipse>\r\n                                <Ellipse x:Name=\"FocusedVisualElement\" Width=\"16\" Height=\"16\" Stroke=\"{DynamicResource FocusBrush}\" StrokeThickness=\"1\" IsHitTestVisible=\"false\" Opacity=\"0\" />\r\n                            </Grid>\r\n                        </BulletDecorator.Bullet>\r\n                        <ContentPresenter Grid.Column=\"1\" x:Name=\"contentPresenter\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" />\r\n                    </BulletDecorator>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"false\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOn}\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOff}\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource DisabledOn}\" />\r\n                            </Trigger.EnterActions>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                        </Trigger>\r\n\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n\r\n    <Style x:Key=\"NuclearRepeatButton\" d:IsControlPart=\"True\" TargetType=\"{x:Type RepeatButton}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Rectangle x:Name=\"Background\" RadiusX=\"0.5\" RadiusY=\"0.5\" StrokeThickness=\"1\" Stroke=\"{DynamicResource ScrollBarRepeatButtonBorderBrush}\" Opacity=\"0\" Fill=\"{DynamicResource ScrollBarRepeatButtonBrush}\"/>\r\n                        <Rectangle x:Name=\"BackgroundPressed\" RadiusX=\"0.5\" RadiusY=\"0.5\" StrokeThickness=\"1\" Stroke=\"{DynamicResource ScrollBarRepeatButtonPressedBorderBrush}\" Opacity=\"0\" Fill=\"{DynamicResource ScrollBarRepeatButtonPressedBrush}\"/>\r\n                        <Rectangle x:Name=\"Highlight\" Margin=\"1\" RadiusX=\"0.5\" RadiusY=\"0.5\" Stroke=\"#99FFFFFF\" StrokeThickness=\"1\" Opacity=\"0\" IsHitTestVisible=\"false\" />\r\n                        <Rectangle x:Name=\"DisabledElement\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{DynamicResource DisabledBackgroundBrush}\" Opacity=\"0\" />\r\n                        <ContentPresenter HorizontalAlignment=\"Center\" x:Name=\"ContentPresenter\" VerticalAlignment=\"Center\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" ContentTemplateSelector=\"{TemplateBinding ContentTemplateSelector}\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\" />\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" x:Name=\"HoverOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                            <Setter Property=\"Opacity\" TargetName=\"ContentPresenter\" Value=\"0.5\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n\r\n    <Style x:Key=\"NuclearThumbStyle\" d:IsControlPart=\"True\" TargetType=\"{x:Type Thumb}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundMouseOver\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundMouseOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid Margin=\"0,0,0,0\" x:Name=\"ThumbVisual\">\r\n                        <Rectangle x:Name=\"Background\" RadiusX=\"1.5\" RadiusY=\"1.5\" StrokeThickness=\"1\" Stroke=\"{DynamicResource ScrollBarThumbBorderBrush}\" Fill=\"{DynamicResource ScrollBarThumbBrush}\"/>\r\n                        <Rectangle x:Name=\"BackgroundMouseOver\" RadiusX=\"1.5\" RadiusY=\"1.5\" StrokeThickness=\"1\" Stroke=\"{DynamicResource ScrollBarThumbMouseOverBorderBrush}\" Opacity=\"0\" Fill=\"{DynamicResource ScrollBarThumbMouseOverBrush}\"/>\r\n                        <Rectangle x:Name=\"BackgroundPressed\" RadiusX=\"1.5\" RadiusY=\"1.5\" StrokeThickness=\"1\" Stroke=\"{DynamicResource ScrollBarThumbPressedBorderBrush}\" Opacity=\"0\" Fill=\"{DynamicResource ScrollBarThumbPressedBrush}\"/>\r\n                        <Path Margin=\"0,-6,0,0\" Width=\"11\" Height=\"1\" Stretch=\"Fill\" Stroke=\"#FF848485\" StrokeThickness=\"1\" Data=\"M4.8333325,7.2499995 L12.012101,7.2499995\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\">\r\n                            <Path.Fill>\r\n                                <LinearGradientBrush EndPoint=\"-0.062,0.5\" StartPoint=\"1.062,0.5\">\r\n                                    <GradientStop Color=\"#FFC8C9CC\" Offset=\"0.487\" />\r\n                                    <GradientStop Color=\"#FFF0F0F0\" Offset=\"0.518\" />\r\n                                </LinearGradientBrush>\r\n                            </Path.Fill>\r\n                        </Path>\r\n                        <Path Margin=\"0,-2,0,0\" Width=\"11\" Height=\"1\" Stretch=\"Fill\" Stroke=\"#FF848485\" StrokeThickness=\"1\" Data=\"M4.8333325,7.2499995 L12.012101,7.2499995\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\">\r\n                            <Path.Fill>\r\n                                <LinearGradientBrush EndPoint=\"-0.062,0.5\" StartPoint=\"1.062,0.5\">\r\n                                    <GradientStop Color=\"#FFC8C9CC\" Offset=\"0.487\" />\r\n                                    <GradientStop Color=\"#FFF0F0F0\" Offset=\"0.518\" />\r\n                                </LinearGradientBrush>\r\n                            </Path.Fill>\r\n                        </Path>\r\n                        <Path Margin=\"0,0,0,-2\" Width=\"11\" Height=\"1\" Stretch=\"Fill\" Stroke=\"#FF848485\" StrokeThickness=\"1\" Data=\"M4.8333325,7.2499995 L12.012101,7.2499995\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\">\r\n                            <Path.Fill>\r\n                                <LinearGradientBrush EndPoint=\"-0.062,0.5\" StartPoint=\"1.062,0.5\">\r\n                                    <GradientStop Color=\"#FFC8C9CC\" Offset=\"0.487\" />\r\n                                    <GradientStop Color=\"#FFF0F0F0\" Offset=\"0.518\" />\r\n                                </LinearGradientBrush>\r\n                            </Path.Fill>\r\n                        </Path>\r\n                        <Path Margin=\"0,0,0,-6\" Width=\"11\" Height=\"1\" Stretch=\"Fill\" Stroke=\"#FF848485\" StrokeThickness=\"1\" Data=\"M4.8333325,7.2499995 L12.012101,7.2499995\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\">\r\n                            <Path.Fill>\r\n                                <LinearGradientBrush EndPoint=\"-0.062,0.5\" StartPoint=\"1.062,0.5\">\r\n                                    <GradientStop Color=\"#FFC8C9CC\" Offset=\"0.487\" />\r\n                                    <GradientStop Color=\"#FFF0F0F0\" Offset=\"0.518\" />\r\n                                </LinearGradientBrush>\r\n                            </Path.Fill>\r\n                        </Path>\r\n                        <Rectangle x:Name=\"Highlight\" Margin=\"1\" RadiusX=\"0.5\" RadiusY=\"0.5\" StrokeThickness=\"1\" Opacity=\"0.6\" IsHitTestVisible=\"false\" Stroke=\"{DynamicResource NormalHighlightBrush}\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\" />\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"ThumbVisual\" Value=\"0\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsDragging\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"NuclearScrollRepeatButtonStyle\" d:IsControlPart=\"True\" TargetType=\"{x:Type RepeatButton}\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"false\" />\r\n        <Setter Property=\"Focusable\" Value=\"false\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n                    <Grid>\r\n                        <Rectangle Fill=\"{TemplateBinding Background}\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type ScrollBar}\">\r\n        <Setter Property=\"Stylus.IsFlicksEnabled\" Value=\"false\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ScrollBar}\">\r\n                    <Grid x:Name=\"GridRoot\" Width=\"{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition MaxHeight=\"18\" />\r\n                            <RowDefinition Height=\"0.00001*\" />\r\n                            <RowDefinition MaxHeight=\"18\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Rectangle Grid.RowSpan=\"4\" RadiusX=\"0\" RadiusY=\"0\" StrokeThickness=\"1\" Opacity=\"1\" >\r\n                            <Rectangle.Stroke>\r\n                                <SolidColorBrush Color=\"#FFF0F0F0\"/>\r\n                            </Rectangle.Stroke>\r\n                            <Rectangle.Fill>\r\n                                <SolidColorBrush Color=\"#FFEFEFEF\"/>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                        <RepeatButton x:Name=\"DecreaseRepeat\" Style=\"{DynamicResource NuclearRepeatButton}\" Command=\"ScrollBar.LineUpCommand\">\r\n                            <Grid>\r\n                                <Path Data=\"F1 M 541.537,173.589L 531.107,173.589L 536.322,167.49L 541.537,173.589 Z \" Height=\"6\" Width=\"10\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Stretch=\"Uniform\" IsHitTestVisible=\"False\">\r\n                                    <Path.Fill>\r\n                                        <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                            <GradientStop Color=\"#FF5E6D91\" />\r\n                                            <GradientStop Color=\"#FF2B3B60\" Offset=\"1\" />\r\n                                        </LinearGradientBrush>\r\n                                    </Path.Fill>\r\n                                </Path>\r\n                            </Grid>\r\n                        </RepeatButton>\r\n\r\n                        <Track Grid.Row=\"1\" x:Name=\"PART_Track\" Orientation=\"Vertical\" IsDirectionReversed=\"true\">\r\n                            <Track.Thumb>\r\n                                <Thumb Style=\"{DynamicResource NuclearThumbStyle}\" />\r\n                            </Track.Thumb>\r\n                            <Track.IncreaseRepeatButton>\r\n                                <RepeatButton x:Name=\"PageUp\" Style=\"{DynamicResource NuclearScrollRepeatButtonStyle}\" Command=\"ScrollBar.PageDownCommand\" />\r\n                            </Track.IncreaseRepeatButton>\r\n                            <Track.DecreaseRepeatButton>\r\n                                <RepeatButton x:Name=\"PageDown\" Style=\"{DynamicResource NuclearScrollRepeatButtonStyle}\" Command=\"ScrollBar.PageUpCommand\" />\r\n                            </Track.DecreaseRepeatButton>\r\n                        </Track>\r\n\r\n                        <RepeatButton Grid.Row=\"2\" x:Name=\"IncreaseRepeat\" Style=\"{DynamicResource NuclearRepeatButton}\" Command=\"ScrollBar.LineDownCommand\">\r\n                            <Grid>\r\n                                <Path Data=\"F1 M 531.107,321.943L 541.537,321.943L 536.322,328.042L 531.107,321.943 Z \" Grid.Row=\"4\" Height=\"6\" Width=\"10\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Stretch=\"Uniform\" IsHitTestVisible=\"False\">\r\n                                    <Path.Fill>\r\n                                        <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                            <GradientStop Color=\"#FF5E6D91\" Offset=\"0.004\" />\r\n                                            <GradientStop Color=\"#FF2B3B60\" Offset=\"0.996\" />\r\n                                        </LinearGradientBrush>\r\n                                    </Path.Fill>\r\n                                </Path>\r\n                            </Grid>\r\n                        </RepeatButton>\r\n                    </Grid>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"Orientation\" Value=\"Horizontal\">\r\n\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"GridRoot\">\r\n                                <Setter.Value>\r\n                                    <RotateTransform Angle=\"-90\" />\r\n                                </Setter.Value>\r\n                            </Setter>\r\n\r\n                            <Setter TargetName=\"PART_Track\" Property=\"Orientation\" Value=\"Vertical\" />\r\n\r\n                            <Setter Property=\"Command\" Value=\"ScrollBar.LineLeftCommand\" TargetName=\"DecreaseRepeat\" />\r\n                            <Setter Property=\"Command\" Value=\"ScrollBar.LineRightCommand\" TargetName=\"IncreaseRepeat\" />\r\n                            <Setter Property=\"Command\" Value=\"ScrollBar.PageLeftCommand\" TargetName=\"PageDown\" />\r\n                            <Setter Property=\"Command\" Value=\"ScrollBar.PageRightCommand\" TargetName=\"PageUp\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type ScrollViewer}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ScrollViewer}\">\r\n                    <Grid Background=\"{TemplateBinding Background}\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\" />\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"*\" />\r\n                            <RowDefinition Height=\"Auto\" />\r\n                        </Grid.RowDefinitions>\r\n                        <ScrollContentPresenter Grid.Column=\"0\" Grid.Row=\"0\" Margin=\"{TemplateBinding Padding}\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" CanContentScroll=\"{TemplateBinding CanContentScroll}\" />\r\n\r\n                        <ScrollBar Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Grid.Column=\"0\" Grid.Row=\"1\" x:Name=\"PART_HorizontalScrollBar\" Orientation=\"Horizontal\" Value=\"{Binding Path=HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" ViewportSize=\"{TemplateBinding ViewportWidth}\" Minimum=\"0\" Maximum=\"{TemplateBinding ScrollableWidth}\" AutomationProperties.AutomationId=\"HorizontalScrollBar\" />\r\n                        <ScrollBar Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Grid.Column=\"1\" Grid.Row=\"0\" x:Name=\"PART_VerticalScrollBar\" Orientation=\"Vertical\" Value=\"{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" ViewportSize=\"{TemplateBinding ViewportHeight}\" Minimum=\"0\" Maximum=\"{TemplateBinding ScrollableHeight}\" AutomationProperties.AutomationId=\"VerticalScrollBar\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n\r\n    <Style TargetType=\"{x:Type ListBox}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\" />\r\n        <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\" />\r\n        <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"True\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource ControlBorderBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Padding\" Value=\"1\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListBox}\">\r\n                    <Grid>\r\n                        <Border x:Name=\"Border\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"1\" Background=\"{DynamicResource ControlBackgroundBrush}\">\r\n                            <ScrollViewer Margin=\"1\" Focusable=\"false\" Foreground=\"{TemplateBinding Foreground}\">\r\n\r\n                                <StackPanel Margin=\"2\" IsItemsHost=\"true\" />\r\n\r\n                            </ScrollViewer>\r\n                        </Border>\r\n                        <Border x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"false\" Background=\"#A5FFFFFF\" BorderBrush=\"#66FFFFFF\" BorderThickness=\"1\" Opacity=\"0\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"DisabledVisualElement\" Value=\"1\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                            <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n\r\n    <Style d:IsControlPart=\"True\" TargetType=\"{x:Type ListBoxItem}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n        <Setter Property=\"Padding\" Value=\"3\" />\r\n        <Setter Property=\"Foreground\" Value=\"Black\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListBoxItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundGradientOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0.73\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundGradientOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundGradientSelected\" Storyboard.TargetProperty=\"Opacity\" To=\"0.84\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundGradientSelectedDisabled\" Storyboard.TargetProperty=\"Opacity\" To=\"0.55\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundGradientSelected\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundGradientSelectedDisabled\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid SnapsToDevicePixels=\"true\">\r\n                        <Rectangle x:Name=\"BackgroundGradientOver\" RadiusX=\"1\" RadiusY=\"1\" Stroke=\"{DynamicResource MouseOverBorderBrush}\" Opacity=\"0\" Fill=\"{DynamicResource MouseOverBrush}\"/>\r\n                        <Rectangle x:Name=\"BackgroundGradientSelectedDisabled\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" Fill=\"{DynamicResource ListItemSelectedBrush}\" Stroke=\"{DynamicResource ListItemSelectedBorderBrush}\"/>\r\n                        <Rectangle x:Name=\"BackgroundGradientSelected\" Stroke=\"{DynamicResource PressedBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" Fill=\"{DynamicResource PressedBrush}\">\r\n\r\n                        </Rectangle>\r\n                        <ContentPresenter x:Name=\"contentPresenter\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n\r\n                        <Trigger Property=\"IsSelected\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOff}\" x:Name=\"SelectedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\" x:Name=\"SelectedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"ExpanderHeaderFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Border>\r\n                        <Rectangle SnapsToDevicePixels=\"true\" Margin=\"0\" Stroke=\"Black\" StrokeDashArray=\"1 2\" StrokeThickness=\"1\" />\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"ExpanderDownHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Foreground\" Value=\"#FF15428B\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"11\" />\r\n        <Setter Property=\"FontWeight\" Value=\"Bold\" />\r\n        <Setter Property=\"Padding\" Value=\"6,0,4,0\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"arrow_over\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"border_over\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"arrow_over\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"border_over\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00.1000000\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"-1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00.1000000\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrow2\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"-1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00.1000000\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00.1000000\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrow2\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Focus_Border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"arrow_focus\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Focus_Border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"arrow_focus\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid Background=\"Transparent\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\" />\r\n                            <ColumnDefinition Width=\"20\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Border x:Name=\"border_fill\" Grid.ColumnSpan=\"2\" Background=\"{DynamicResource ExpanderToggleButtonBrush}\"/>\r\n                        <Border x:Name=\"border_inner\" Margin=\"0,0,0,1\" Grid.ColumnSpan=\"2\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1,1,0,0\" />\r\n                        <Border x:Name=\"border_bottom\" Grid.ColumnSpan=\"2\" BorderBrush=\"{DynamicResource ExpanderToggleButtonBottomBrush}\" BorderThickness=\"0,0,0,1\" />\r\n                        <Border x:Name=\"border_over\" Margin=\"1\" Grid.ColumnSpan=\"2\" Opacity=\"0\" Background=\"{DynamicResource ExpanderToggleButtonHoverBrush}\"/>\r\n                        <Rectangle x:Name=\"arrow_over\" Margin=\"0,1,1,1\" Grid.Column=\"1\" Width=\"20\" Opacity=\"0\" Fill=\"{DynamicResource MouseOverBrush}\"/>\r\n                        <Rectangle x:Name=\"arrow_focus\" Margin=\"0,1,1,1\" Grid.Column=\"1\" Width=\"20\" Opacity=\"0\" Fill=\"{DynamicResource MouseOverBrush}\"/>\r\n                        <Path x:Name=\"arrow2\" Margin=\"0,0,6,6\" Grid.Column=\"1\" Stroke=\"{DynamicResource ExpanderToggleArrow2Stroke}\" StrokeThickness=\"1.5\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Center\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\" RenderTransformOrigin=\"0.5,0.5\">\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform />\r\n                                    <SkewTransform />\r\n                                    <RotateTransform />\r\n                                    <TranslateTransform />\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <Path x:Name=\"arrow\" Margin=\"0,2,6,0\" Grid.Column=\"1\" Stroke=\"{DynamicResource ExpanderToggleArrowStroke}\" StrokeThickness=\"1.5\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Center\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\" RenderTransformOrigin=\"0.5,0.5\">\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform />\r\n                                    <SkewTransform />\r\n                                    <RotateTransform />\r\n                                    <TranslateTransform />\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <ContentPresenter x:Name=\"header\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" VerticalAlignment=\"Center\" IsHitTestVisible=\"false\" Margin=\"6,4,4,4\" />\r\n                        <Border x:Name=\"Focus_Border\" Margin=\"-1,-1,-1,0\" Grid.ColumnSpan=\"2\" BorderBrush=\"{DynamicResource FocusBrush}\" BorderThickness=\"1\" IsHitTestVisible=\"false\" Panel.ZIndex=\"1\" Opacity=\"0\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"FocusedOn_BeginStoryboard\" Storyboard=\"{StaticResource FocusedOn}\" />\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"FocusedOff_BeginStoryboard\" Storyboard=\"{StaticResource FocusedOff}\" />\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOff}\" x:Name=\"CheckedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOn}\" x:Name=\"CheckedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\" />\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"ExpanderRightHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Foreground\" Value=\"#FF15428B\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"11\" />\r\n        <Setter Property=\"FontWeight\" Value=\"Bold\" />\r\n        <Setter Property=\"Padding\" Value=\"6,0,4,0\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"arrow_over\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"border_over\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"arrow_over\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"border_over\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00.1000000\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"-1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00.1000000\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrow2\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"-1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00.4000000\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00.4000000\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrow2\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Focus_Border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"arrow_focus\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Focus_Border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"arrow_focus\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n\r\n                    </ControlTemplate.Resources>\r\n                    <Grid SnapsToDevicePixels=\"False\" Background=\"Transparent\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"19\" />\r\n                            <RowDefinition Height=\"*\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Border x:Name=\"border_fill\" d:LayoutOverrides=\"GridBox\" Grid.ColumnSpan=\"1\" Grid.RowSpan=\"2\" Background=\"{DynamicResource ExpanderToggleButtonBrush}\"/>\r\n                        <Border x:Name=\"border_inner\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1,1,0,0\" d:LayoutOverrides=\"GridBox\" Grid.ColumnSpan=\"1\" Grid.RowSpan=\"2\" />\r\n                        <Border x:Name=\"border_bottom\" BorderBrush=\"{DynamicResource ExpanderToggleButtonBrush}\" BorderThickness=\"0,0,0,1\" d:LayoutOverrides=\"GridBox\" Grid.ColumnSpan=\"1\" Grid.RowSpan=\"2\" />\r\n                        <Border x:Name=\"border_over\" Opacity=\"0\" d:LayoutOverrides=\"GridBox\" Grid.ColumnSpan=\"1\" Grid.RowSpan=\"2\" Background=\"{DynamicResource ExpanderToggleButtonHoverBrush}\"/>\r\n                        <Grid>\r\n                            <Grid.LayoutTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                    <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                    <RotateTransform Angle=\"0\" />\r\n                                    <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                </TransformGroup>\r\n                            </Grid.LayoutTransform>\r\n                            <Rectangle x:Name=\"arrow_focus\" Margin=\"1\" Grid.Column=\"1\" Opacity=\"0\" Fill=\"{DynamicResource MouseOverBrush}\"/>\r\n                            <Rectangle x:Name=\"arrow_over\" Margin=\"1\" Grid.Column=\"1\" Opacity=\"0\" Fill=\"{DynamicResource MouseOverBrush}\"/>\r\n                            <Path x:Name=\"arrow2\" Margin=\"3,0,0,0\" Grid.Column=\"1\" Stroke=\"{DynamicResource ExpanderToggleArrow2Stroke}\" StrokeThickness=\"1.5\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Center\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                <Path.RenderTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform />\r\n                                        <SkewTransform />\r\n                                        <RotateTransform Angle=\"-90\" />\r\n                                        <TranslateTransform />\r\n                                    </TransformGroup>\r\n                                </Path.RenderTransform>\r\n                            </Path>\r\n                            <Path x:Name=\"arrow\" Margin=\"7,0,0,0\" Grid.Column=\"1\" Stroke=\"{DynamicResource ExpanderToggleArrowStroke}\" StrokeThickness=\"1.5\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Center\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                <Path.RenderTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform />\r\n                                        <SkewTransform />\r\n                                        <RotateTransform Angle=\"-90\" />\r\n                                        <TranslateTransform />\r\n                                    </TransformGroup>\r\n                                </Path.RenderTransform>\r\n                            </Path>\r\n                        </Grid>\r\n                        <ContentPresenter SnapsToDevicePixels=\"True\" HorizontalAlignment=\"Center\" Margin=\"4,4,4,6\" VerticalAlignment=\"Top\" Grid.Row=\"1\" RecognizesAccessKey=\"True\">\r\n                            <ContentPresenter.LayoutTransform>\r\n                                <TransformGroup>\r\n                                    <TransformGroup.Children>\r\n                                        <TransformCollection>\r\n                                            <RotateTransform Angle=\"-90\" />\r\n                                        </TransformCollection>\r\n                                    </TransformGroup.Children>\r\n                                </TransformGroup>\r\n                            </ContentPresenter.LayoutTransform>\r\n                        </ContentPresenter>\r\n                        <Border x:Name=\"Focus_Border\" Margin=\"-1,-1,0,-1\" Grid.ColumnSpan=\"2\" BorderBrush=\"{DynamicResource FocusBrush}\" BorderThickness=\"1\" IsHitTestVisible=\"false\" Opacity=\"0\" Panel.ZIndex=\"1\" Grid.RowSpan=\"2\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"FocusedOn_BeginStoryboard\" Storyboard=\"{StaticResource FocusedOn}\" />\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"FocusedOff_BeginStoryboard\" Storyboard=\"{StaticResource FocusedOff}\" />\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOff}\" x:Name=\"CheckedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOn}\" x:Name=\"CheckedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\" />\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"ExpanderUpHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Foreground\" Value=\"#FF15428B\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"11\" />\r\n        <Setter Property=\"FontWeight\" Value=\"Bold\" />\r\n        <Setter Property=\"Padding\" Value=\"6,0,4,0\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"arrow_over\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"border_over\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"arrow_over\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"border_over\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00.1000000\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"-1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00.1000000\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrow2\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"-1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00.4000000\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00.4000000\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrow2\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Focus_Border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"arrow_focus\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Focus_Border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"arrow_focus\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n\r\n                    </ControlTemplate.Resources>\r\n                    <Grid Background=\"Transparent\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\" />\r\n                            <ColumnDefinition Width=\"20\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Border x:Name=\"border_fill\" Grid.ColumnSpan=\"2\" Background=\"{DynamicResource ExpanderToggleButtonBrush}\"/>\r\n                        <Border x:Name=\"border_inner\" Margin=\"0,1,0,0\" Grid.ColumnSpan=\"2\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1,0,0,1\" />\r\n                        <Border x:Name=\"border_bottom\" Grid.ColumnSpan=\"2\" BorderBrush=\"{DynamicResource ExpanderToggleButtonBottomBrush}\" BorderThickness=\"0,1,0,0\" />\r\n                        <Border x:Name=\"border_over\" Margin=\"1\" Grid.ColumnSpan=\"2\" Opacity=\"0\" Background=\"{DynamicResource ExpanderToggleButtonHoverBrush}\"/>\r\n                        <Rectangle x:Name=\"arrow_over\" Margin=\"0,1,1,1\" Grid.Column=\"1\" Width=\"20\" Opacity=\"0\" Fill=\"{DynamicResource MouseOverBrush}\"/>\r\n                        <Rectangle x:Name=\"arrow_focus\" Margin=\"0,1,1,1\" Grid.Column=\"1\" Width=\"20\" Opacity=\"0\" Fill=\"{DynamicResource MouseOverBrush}\"/>\r\n                        <Path x:Name=\"arrow2\" Margin=\"0,4,6,0\" Grid.Column=\"1\" Stroke=\"{DynamicResource ExpanderToggleArrow2Stroke}\" StrokeThickness=\"1.5\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Center\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\" RenderTransformOrigin=\"0.5,0.5\">\r\n                            <Path.LayoutTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                    <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                    <RotateTransform Angle=\"180\" />\r\n                                    <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                </TransformGroup>\r\n                            </Path.LayoutTransform>\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform ScaleY=\"-1\" />\r\n                                    <SkewTransform />\r\n                                    <RotateTransform />\r\n                                    <TranslateTransform />\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <Path x:Name=\"arrow\" Margin=\"0,0,6,4\" Grid.Column=\"1\" Stroke=\"{DynamicResource ExpanderToggleArrowStroke}\" StrokeThickness=\"1.5\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Center\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\" RenderTransformOrigin=\"0.5,0.5\">\r\n                            <Path.LayoutTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                    <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                    <RotateTransform Angle=\"180\" />\r\n                                    <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                </TransformGroup>\r\n                            </Path.LayoutTransform>\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform ScaleY=\"-1\" />\r\n                                    <SkewTransform />\r\n                                    <RotateTransform />\r\n                                    <TranslateTransform />\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <ContentPresenter SnapsToDevicePixels=\"True\" HorizontalAlignment=\"Center\" Margin=\"6,4,4,4\" VerticalAlignment=\"Top\" Grid.Row=\"1\" RecognizesAccessKey=\"True\" />\r\n                        <Border x:Name=\"Focus_Border\" Margin=\"-1,0,-1,-1\" Grid.ColumnSpan=\"2\" BorderBrush=\"{DynamicResource FocusBrush}\" BorderThickness=\"1\" IsHitTestVisible=\"false\" Visibility=\"Visible\" Canvas.ZIndex=\"1\" Opacity=\"0\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"FocusedOn_BeginStoryboard\" Storyboard=\"{StaticResource FocusedOn}\" />\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"FocusedOff_BeginStoryboard\" Storyboard=\"{StaticResource FocusedOff}\" />\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOff}\" x:Name=\"CheckedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOn}\" x:Name=\"CheckedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\" />\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"ExpanderLeftHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Foreground\" Value=\"#FF15428B\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"11\" />\r\n        <Setter Property=\"FontWeight\" Value=\"Bold\" />\r\n        <Setter Property=\"Padding\" Value=\"6,0,4,0\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"arrow_over\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"border_over\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"arrow_over\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"border_over\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00.1000000\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"-1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00.1000000\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrow2\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"-1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00.4000000\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00.4000000\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrow2\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Focus_Border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"arrow_focus\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Focus_Border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"arrow_focus\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n\r\n                    </ControlTemplate.Resources>\r\n                    <Grid SnapsToDevicePixels=\"False\" Background=\"Transparent\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"19\" />\r\n                            <RowDefinition Height=\"*\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Border x:Name=\"border_fill\" Grid.RowSpan=\"2\" Background=\"{DynamicResource ExpanderToggleButtonBrush}\"/>\r\n                        <Border x:Name=\"border_inner\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"0,1,1,0\" Grid.RowSpan=\"2\" />\r\n                        <Border x:Name=\"border_bottom\" BorderBrush=\"{DynamicResource ExpanderToggleButtonBottomBrush}\" BorderThickness=\"0,0,0,1\" Grid.RowSpan=\"2\" />\r\n                        <Border x:Name=\"border_over\" Opacity=\"0\" Grid.RowSpan=\"2\" Background=\"{DynamicResource ExpanderToggleButtonHoverBrush}\"/>\r\n                        <Grid>\r\n                            <Grid.LayoutTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                    <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                    <RotateTransform Angle=\"0\" />\r\n                                    <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                </TransformGroup>\r\n                            </Grid.LayoutTransform>\r\n                            <Rectangle x:Name=\"arrow_over\" Margin=\"1\" Opacity=\"0\" Fill=\"{DynamicResource MouseOverBrush}\"/>\r\n                            <Rectangle x:Name=\"arrow_focus\" Margin=\"1\" Opacity=\"0\" Fill=\"{DynamicResource MouseOverBrush}\"/>\r\n                            <Path x:Name=\"arrow2\" Margin=\"3,0,0,0\" Stroke=\"{DynamicResource ExpanderToggleArrow2Stroke}\" StrokeThickness=\"1.5\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Center\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                <Path.RenderTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform />\r\n                                        <SkewTransform />\r\n                                        <RotateTransform Angle=\"90\" />\r\n                                        <TranslateTransform />\r\n                                    </TransformGroup>\r\n                                </Path.RenderTransform>\r\n                            </Path>\r\n                            <Path x:Name=\"arrow\" Margin=\"7,0,0,0\" Stroke=\"{DynamicResource ExpanderToggleArrowStroke}\" StrokeThickness=\"1.5\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Center\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                <Path.RenderTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform />\r\n                                        <SkewTransform />\r\n                                        <RotateTransform Angle=\"90\" />\r\n                                        <TranslateTransform />\r\n                                    </TransformGroup>\r\n                                </Path.RenderTransform>\r\n                            </Path>\r\n                        </Grid>\r\n                        <ContentPresenter SnapsToDevicePixels=\"True\" HorizontalAlignment=\"Center\" Margin=\"6,4,4,4\" VerticalAlignment=\"Top\" Grid.Row=\"1\" RecognizesAccessKey=\"True\">\r\n                            <ContentPresenter.LayoutTransform>\r\n                                <TransformGroup>\r\n                                    <TransformGroup.Children>\r\n                                        <TransformCollection>\r\n                                            <RotateTransform Angle=\"90\" />\r\n                                        </TransformCollection>\r\n                                    </TransformGroup.Children>\r\n                                </TransformGroup>\r\n                            </ContentPresenter.LayoutTransform>\r\n                        </ContentPresenter>\r\n                        <Border x:Name=\"Focus_Border\" Margin=\"0,-1,-1,-1\" Grid.RowSpan=\"2\" BorderBrush=\"{DynamicResource FocusBrush}\" BorderThickness=\"1\" IsHitTestVisible=\"false\" Opacity=\"0\" Panel.ZIndex=\"1\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"FocusedOn_BeginStoryboard\" Storyboard=\"{StaticResource FocusedOn}\" />\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"FocusedOff_BeginStoryboard\" Storyboard=\"{StaticResource FocusedOff}\" />\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOff}\" x:Name=\"CheckedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOn}\" x:Name=\"CheckedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\" />\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style TargetType=\"{x:Type Expander}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}\" />\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Foreground\" Value=\"#FF15428B\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"11\" />\r\n        <Setter Property=\"FontWeight\" Value=\"Bold\" />\r\n        <Setter Property=\"Padding\" Value=\"6,0,4,0\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Expander}\">\r\n                    <Grid>\r\n                        <Border x:Name=\"Background\" BorderThickness=\"1\" Padding=\"0\">\r\n\r\n                            <DockPanel>\r\n                                <ToggleButton FontFamily=\"{TemplateBinding FontFamily}\" FontSize=\"{TemplateBinding FontSize}\" FontStretch=\"{TemplateBinding FontStretch}\" FontStyle=\"{TemplateBinding FontStyle}\" FontWeight=\"{TemplateBinding FontWeight}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\" FocusVisualStyle=\"{StaticResource ExpanderHeaderFocusVisual}\" Margin=\"1,1,1,0\" MinHeight=\"0\" MinWidth=\"0\" x:Name=\"HeaderSite\" Style=\"{StaticResource ExpanderDownHeaderStyle}\" Content=\"{TemplateBinding Header}\" ContentTemplate=\"{TemplateBinding HeaderTemplate}\" ContentTemplateSelector=\"{TemplateBinding HeaderTemplateSelector}\" IsChecked=\"{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" DockPanel.Dock=\"Top\" />\r\n                                <Border Visibility=\"Collapsed\" x:Name=\"border\" Margin=\"1,1,1,1\" BorderBrush=\"#FF848484\" BorderThickness=\"1,1,1,1\" CornerRadius=\"1,1,1,1\" Background=\"{DynamicResource ControlBackgroundBrush}\">\r\n                                    <ContentPresenter Focusable=\"false\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"1,1,1,1\" x:Name=\"ExpandSite\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" DockPanel.Dock=\"Bottom\" />\r\n                                </Border>\r\n                            </DockPanel>\r\n                        </Border>\r\n                        <Border x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"false\" Background=\"{DynamicResource DisabledBackgroundBrush}\" BorderBrush=\"{DynamicResource DisabledBorderBrush}\" BorderThickness=\"1\" Opacity=\"0\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsExpanded\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"border\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Down\" />\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Right\">\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Right\" />\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Left\" />\r\n                            <Setter Property=\"Style\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderRightHeaderStyle}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Up\">\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Top\" />\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Bottom\" />\r\n                            <Setter Property=\"Style\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderUpHeaderStyle}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Left\">\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Left\" />\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Right\" />\r\n                            <Setter Property=\"Style\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderLeftHeaderStyle}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                            <Setter Property=\"Opacity\" TargetName=\"DisabledVisualElement\" Value=\"1\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n\r\n    <ControlTemplate x:Key=\"ComboBoxToggleButton\" TargetType=\"{x:Type ToggleButton}\">\r\n        <ControlTemplate.Resources>\r\n            <Storyboard x:Key=\"HoverOn\">\r\n                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"rectangleOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0.8\" />\r\n                <ColorAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Fill).(SolidColorBrush.Color)\" To=\"#FFFFFFFF\" />\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"HoverOff\">\r\n                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"rectangleOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                <ColorAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Fill).(SolidColorBrush.Color)\" To=\"#FFE8E8E8\" />\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"PressedOn\">\r\n                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"rectanglePress\" Storyboard.TargetProperty=\"Opacity\" To=\"0.8\" />\r\n                <ColorAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Fill).(SolidColorBrush.Color)\" To=\"#FFFFFFFF\" />\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"PressedOff\">\r\n                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"rectanglePress\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                <ColorAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Fill).(SolidColorBrush.Color)\" To=\"#FFE8E8E8\" />\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"CheckedOn\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundChecked\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"CheckedOff\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundChecked\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n        </ControlTemplate.Resources>\r\n        <Grid x:Name=\"grid\">\r\n            <Rectangle x:Name=\"Background\" Fill=\"#FFE8E8E8\" Stroke=\"#FF848484\" IsHitTestVisible=\"false\" />\r\n            <Rectangle x:Name=\"BackgroundChecked\" Margin=\"1\" IsHitTestVisible=\"false\" Opacity=\"0\" >\r\n                <Rectangle.Fill>\r\n                    <SolidColorBrush Color=\"{DynamicResource WhiteColor}\"/>\r\n                </Rectangle.Fill>\r\n            </Rectangle>\r\n            <Rectangle x:Name=\"rectangleOver\" Width=\"15\" Stroke=\"#FFE8E8E8\" HorizontalAlignment=\"Right\" Opacity=\"0\" Fill=\"{DynamicResource MouseOverBrush}\"/>\r\n            <Rectangle x:Name=\"rectanglePress\" Width=\"15\" Stroke=\"#FC9E9D9B\" HorizontalAlignment=\"Right\" Opacity=\"0\" Fill=\"{DynamicResource PressedBrush}\"/>\r\n            <Rectangle x:Name=\"DisabledVisualElement\" Margin=\"1\" Fill=\"{DynamicResource DisabledBackgroundBrush}\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" />\r\n            <Path x:Name=\"BtnArrow\" Margin=\"0,0,4,0\" Width=\"6\" Fill=\"{DynamicResource GlyphBrush}\" Stretch=\"Uniform\" HorizontalAlignment=\"Right\" Data=\"F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z \" />\r\n        </Grid>\r\n        <ControlTemplate.Triggers>\r\n            <Trigger Property=\"IsPressed\" Value=\"True\">\r\n                <Trigger.ExitActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\" />\r\n                </Trigger.ExitActions>\r\n                <Trigger.EnterActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\" />\r\n                </Trigger.EnterActions>\r\n            </Trigger>\r\n            <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                <Trigger.ExitActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\" />\r\n                </Trigger.ExitActions>\r\n                <Trigger.EnterActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                </Trigger.EnterActions>\r\n\r\n            </Trigger>\r\n            <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                <Trigger.ExitActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource CheckedOff}\" x:Name=\"CheckedOff_BeginStoryboard\" />\r\n                </Trigger.ExitActions>\r\n                <Trigger.EnterActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource CheckedOn}\" x:Name=\"CheckedOn_BeginStoryboard\" />\r\n                </Trigger.EnterActions>\r\n            </Trigger>\r\n            <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                <Setter Property=\"Visibility\" TargetName=\"DisabledVisualElement\" Value=\"Visible\" />\r\n            </Trigger>\r\n        </ControlTemplate.Triggers>\r\n    </ControlTemplate>\r\n\r\n    <ControlTemplate x:Key=\"ComboBoxTextBox\" TargetType=\"{x:Type TextBox}\">\r\n        <Border x:Name=\"PART_ContentHost\" Focusable=\"False\" Background=\"{TemplateBinding Background}\" />\r\n    </ControlTemplate>\r\n\r\n    <Style TargetType=\"{x:Type ComboBox}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"Padding\" Value=\"6,2,25,2\" />\r\n<Setter Property=\"Template\" Value=\"{DynamicResource ComboBoxTemplate}\" />\r\n    </Style>\r\n    \r\n    <ControlTemplate x:Key=\"ComboBoxTemplate\" TargetType=\"{x:Type ComboBox}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <ToggleButton Focusable=\"false\" IsChecked=\"{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" ClickMode=\"Press\" Style=\"{x:Null}\" />\r\n                        <ToggleButton Grid.Column=\"2\" Template=\"{DynamicResource ComboBoxToggleButton}\" x:Name=\"ToggleButton\" Focusable=\"false\" IsChecked=\"{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" ClickMode=\"Press\" />\r\n                        <ContentPresenter HorizontalAlignment=\"Left\" Margin=\"3,3,23,3\" x:Name=\"ContentSite\" VerticalAlignment=\"Center\" Content=\"{TemplateBinding SelectionBoxItem}\" ContentTemplate=\"{TemplateBinding SelectionBoxItemTemplate}\" ContentTemplateSelector=\"{TemplateBinding ItemTemplateSelector}\" IsHitTestVisible=\"False\" />\r\n\r\n                        <TextBox Visibility=\"Hidden\" Template=\"{DynamicResource ComboBoxTextBox}\" HorizontalAlignment=\"Left\" Margin=\"3,3,23,3\" x:Name=\"PART_EditableTextBox\" Style=\"{x:Null}\" VerticalAlignment=\"Center\" Focusable=\"True\" Background=\"Transparent\" IsReadOnly=\"{TemplateBinding IsReadOnly}\" />\r\n                        <Rectangle x:Name=\"DisabledVisualElement\" Fill=\"{DynamicResource DisabledBackgroundBrush}\" Stroke=\"{DynamicResource DisabledBorderBrush}\" RadiusX=\"0\" RadiusY=\"0\" IsHitTestVisible=\"false\" Opacity=\"0\" />\r\n                        <Rectangle x:Name=\"FocusVisualElement\" Margin=\"-1\" Stroke=\"{DynamicResource FocusBrush}\" StrokeThickness=\"1\" IsHitTestVisible=\"false\" Opacity=\"0\" />\r\n                        <Popup IsOpen=\"{TemplateBinding IsDropDownOpen}\" Placement=\"Bottom\" x:Name=\"Popup\" Focusable=\"False\" AllowsTransparency=\"True\" PopupAnimation=\"Slide\" Margin=\"0,1,0,0\">\r\n                            <Grid MaxHeight=\"{TemplateBinding MaxDropDownHeight}\" MinWidth=\"{TemplateBinding ActualWidth}\" x:Name=\"DropDown\" SnapsToDevicePixels=\"True\">\r\n                                <Border x:Name=\"DropDownBorder\" Margin=\"0,-1,0,0\" BorderBrush=\"{DynamicResource ControlBorderBrush}\" BorderThickness=\"1\" CornerRadius=\"0,0,3,3\" Background=\"{DynamicResource ControlBackgroundBrush}\">\r\n                                    <ScrollViewer Margin=\"4,6,4,6\" SnapsToDevicePixels=\"True\" HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Auto\" CanContentScroll=\"True\">\r\n\r\n                                        <StackPanel IsItemsHost=\"True\" KeyboardNavigation.DirectionalNavigation=\"Contained\" />\r\n\r\n                                    </ScrollViewer>\r\n                                </Border>\r\n                            </Grid>\r\n                        </Popup>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"HasItems\" Value=\"false\">\r\n                            <Setter Property=\"MinHeight\" Value=\"95\" TargetName=\"DropDownBorder\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                            <Setter Property=\"Opacity\" TargetName=\"DisabledVisualElement\" Value=\"1\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                            <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"AllowsTransparency\" SourceName=\"Popup\" Value=\"true\">\r\n                            <Setter Property=\"CornerRadius\" Value=\"4\" TargetName=\"DropDownBorder\" />\r\n                            <Setter Property=\"Margin\" Value=\"0,2,0,0\" TargetName=\"DropDownBorder\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEditable\" Value=\"true\">\r\n                            <Setter Property=\"IsTabStop\" Value=\"false\" />\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"PART_EditableTextBox\" />\r\n                            <Setter Property=\"Visibility\" Value=\"Hidden\" TargetName=\"ContentSite\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n\r\n    <Style d:IsControlPart=\"True\" TargetType=\"{x:Type ComboBoxItem}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"Padding\" Value=\"3\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ComboBoxItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HighlightOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundGradientOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0.73\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HighlightOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundGradientOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundGradientSelected\" Storyboard.TargetProperty=\"Opacity\" To=\"0.84\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundGradientSelected\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid SnapsToDevicePixels=\"true\">\r\n                        <Rectangle x:Name=\"BackgroundGradientOver\" RadiusX=\"1\" RadiusY=\"1\" Stroke=\"{DynamicResource MouseOverBorderBrush}\" Opacity=\"0\" Fill=\"{DynamicResource MouseOverBrush}\"/>\r\n                        <Rectangle x:Name=\"BackgroundGradientSelected\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" Fill=\"{DynamicResource PressedBrush}\" Stroke=\"{DynamicResource PressedBorderBrush}\"/>\r\n                        <ContentPresenter x:Name=\"contentPresenter\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"Selector.IsSelected\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOff}\" x:Name=\"SelectedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\" x:Name=\"SelectedOn_BeginStoryboard1\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HighlightOff}\" x:Name=\"HighlightOff_BeginStoryboard1\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HighlightOn}\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n\r\n    <Style TargetType=\"{x:Type ProgressBar}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ProgressBar}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"IndeterminateOn\" RepeatBehavior=\"Forever\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"IndeterminateGradientFill\" Storyboard.TargetProperty=\"(Shape.Fill).(Brush.Transform).(TransformGroup.Children)[0].X\" RepeatBehavior=\"Forever\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0\" />\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:.5\" Value=\"20\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"IndeterminateRoot\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                <DiscreteObjectKeyFrame KeyTime=\"00:00:00\" Value=\"{x:Static Visibility.Visible}\" />\r\n                            </ObjectAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Border x:Name=\"PART_Track\" BorderThickness=\"1\" CornerRadius=\"3\" Opacity=\"0.825\">\r\n                            <Border.Background>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"#FFFFFFFF\" />\r\n                                    <GradientStop Color=\"#FFD8D8D8\" Offset=\"0.327\" />\r\n                                    <GradientStop Color=\"#FFDADADA\" Offset=\"0.488\" />\r\n                                    <GradientStop Color=\"#FFBEBEBE\" Offset=\"0.539\" />\r\n                                    <GradientStop Color=\"#FFD6D6D6\" Offset=\"0.77\" />\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Border.Background>\r\n                            <Border.BorderBrush>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"#FFBBBBBB\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#FF7E7E7E\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Border.BorderBrush>\r\n                        </Border>\r\n\r\n                        <Rectangle x:Name=\"PART_Indicator\" Margin=\"1\" RadiusX=\"1.5\" RadiusY=\"1.5\" HorizontalAlignment=\"Left\" Opacity=\"0.83\" Fill=\"{DynamicResource ProgressBarIndicatorBrush}\"/>\r\n                        <Grid x:Name=\"IndeterminateRoot\" Visibility=\"Collapsed\">\r\n                            <Rectangle x:Name=\"IndeterminateSolidFill\" Margin=\"1\" Fill=\"#FFFF8900\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                            <Rectangle x:Name=\"ProgressBarRootGradient\" Margin=\"1\" Canvas.ZIndex=\"1\" RadiusX=\"1.5\" RadiusY=\"1.5\">\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                        <GradientStop Color=\"#69535353\" Offset=\"0\"/>\r\n                                        <GradientStop Color=\"#FFFDCE9D\" Offset=\"0.046\"/>\r\n                                        <GradientStop Color=\"#96FFE4B6\" Offset=\"0.18\"/>\r\n                                        <GradientStop Color=\"#4FFFFFFF\" Offset=\"0.507\"/>\r\n                                        <GradientStop Color=\"#00D6D6D6\" Offset=\"0.516\"/>\r\n                                        <GradientStop Color=\"#FFFFC472\" Offset=\"1\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                            <Rectangle x:Name=\"IndeterminateGradientFill\" Margin=\"1\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0.7\">\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush EndPoint=\"0,1\" StartPoint=\"20,1\" MappingMode=\"Absolute\" SpreadMethod=\"Repeat\">\r\n                                        <LinearGradientBrush.Transform>\r\n                                            <TransformGroup>\r\n                                                <TranslateTransform X=\"0\"/>\r\n                                                <SkewTransform AngleX=\"-10\"/>\r\n                                            </TransformGroup>\r\n                                        </LinearGradientBrush.Transform>\r\n                                        <GradientStop Color=\"#FFFFE3BB\" Offset=\"0.088\"/>\r\n                                        <GradientStop Color=\"#00FF9500\" Offset=\"0.475\"/>\r\n                                        <GradientStop Color=\"#FFFFE3BB\" Offset=\"0.899\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                        </Grid>\r\n                        <Border x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"false\" Background=\"#A5FFFFFF\" BorderBrush=\"#66FFFFFF\" BorderThickness=\"1\" Opacity=\"0\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"DisabledVisualElement\" Value=\"1\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsIndeterminate\" Value=\"True\">\r\n                        \t<Trigger.ExitActions>\r\n                        \t\t<StopStoryboard BeginStoryboardName=\"IndeterminateOn_BeginStoryboard\"/>\r\n                        \t</Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"IndeterminateOn_BeginStoryboard\" Storyboard=\"{StaticResource IndeterminateOn}\" />\r\n                            </Trigger.EnterActions>\r\n                            <Setter Property=\"Visibility\" TargetName=\"PART_Track\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"PART_Indicator\" Value=\"Collapsed\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type TextBox}\">\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\" />\r\n        <Setter Property=\"AllowDrop\" Value=\"true\" />\r\n        <Setter Property=\"Background\" >\r\n            <Setter.Value>\r\n                <SolidColorBrush Color=\"{DynamicResource WhiteColor}\"/>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"Padding\" Value=\"4\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource TextControlBorderBrush}\" />\r\n<Setter Property=\"Template\" Value=\"{DynamicResource TextBoxTemplate}\" />\r\n    </Style>\r\n    \r\n    <ControlTemplate x:Key=\"TextBoxTemplate\" TargetType=\"{x:Type TextBox}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"Over\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"Over_Border\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"Over\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"Over_Border\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"DisabledOn\">\r\n                            <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                <DiscreteObjectKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"{x:Static Visibility.Visible}\" />\r\n                            </ObjectAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n\t\t\t\t\t\t<Storyboard x:Key=\"DisabledOff\">\r\n                            <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                <DiscreteObjectKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"{x:Static Visibility.Collapsed}\" />\r\n                            </ObjectAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Border x:Name=\"BorderBase\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2.75\" />\r\n                        <Border x:Name=\"Over\" BorderBrush=\"{DynamicResource FocusBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2.75\" Opacity=\"0\" />\r\n                        <Border x:Name=\"Over_Border\" Margin=\"-1\" BorderBrush=\"{DynamicResource MouseOverHighlightBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3.75\" IsHitTestVisible=\"False\" Opacity=\"0\" />\r\n                        <ScrollViewer Margin=\"0\" x:Name=\"PART_ContentHost\" Foreground=\"{DynamicResource OutsideFontColor}\" />\r\n                        <Border x:Name=\"DisabledVisualElement\" Background=\"#A5FFFFFF\" BorderBrush=\"#59C0C0C0\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2.75\" IsHitTestVisible=\"False\" Visibility=\"Collapsed\" />\r\n                        <Border x:Name=\"ReadOnlyVisualElement\" Background=\"#66FFFFFF\" CornerRadius=\"2.75\" Visibility=\"Collapsed\" />\r\n                        <Border x:Name=\"FocusVisualElement\" BorderBrush=\"#FFB1703C\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2.75\" IsHitTestVisible=\"False\" Opacity=\"0\" />\r\n\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" />\r\n                                <Condition Property=\"IsFocused\" Value=\"False\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"HoverOff_BeginStoryboard\" Storyboard=\"{StaticResource HoverOff}\" />\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                            </MultiTrigger.EnterActions>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource DisabledOn}\" x:Name=\"DisabledOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                        </Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsEnabled\" Value=\"True\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource DisabledOff}\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                            <Setter Property=\"Foreground\" Value=\"#FF000000\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n\r\n    <Style TargetType=\"{x:Type PasswordBox}\">\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\" />\r\n        <Setter Property=\"AllowDrop\" Value=\"true\" />\r\n        <Setter Property=\"Background\" >\r\n            <Setter.Value>\r\n                <SolidColorBrush Color=\"{DynamicResource WhiteColor}\"/>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"Padding\" Value=\"4\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource TextControlBorderBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type PasswordBox}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"Over\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"Over_Border\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"Over\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"Over_Border\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"DisabledOn\">\r\n                            <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                <DiscreteObjectKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"{x:Static Visibility.Visible}\" />\r\n                            </ObjectAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Border x:Name=\"BorderBase\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2.75\" />\r\n                        <Border x:Name=\"Over\" BorderBrush=\"{DynamicResource FocusBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2.75\" Opacity=\"0\" />\r\n                        <Border x:Name=\"Over_Border\" Margin=\"-1\" BorderBrush=\"{DynamicResource MouseOverHighlightBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3.75\" IsHitTestVisible=\"False\" Opacity=\"0\" />\r\n                        <ScrollViewer Margin=\"0\" x:Name=\"PART_ContentHost\" Foreground=\"{DynamicResource OutsideFontColor}\" />\r\n                        <Border x:Name=\"DisabledVisualElement\" Background=\"#A5FFFFFF\" BorderBrush=\"#59C0C0C0\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2.75\" IsHitTestVisible=\"False\" Visibility=\"Collapsed\" />\r\n                        <Border x:Name=\"ReadOnlyVisualElement\" Background=\"#66FFFFFF\" CornerRadius=\"2.75\" Visibility=\"Collapsed\" />\r\n                        <Border x:Name=\"FocusVisualElement\" BorderBrush=\"#FFB1703C\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2.75\" IsHitTestVisible=\"False\" Opacity=\"0\" />\r\n\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" />\r\n                                <Condition Property=\"IsFocused\" Value=\"False\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"HoverOff_BeginStoryboard\" Storyboard=\"{StaticResource HoverOff}\" />\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                            </MultiTrigger.EnterActions>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource DisabledOn}\" x:Name=\"DisabledOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type RichTextBox}\">\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\" />\r\n        <Setter Property=\"AllowDrop\" Value=\"true\" />\r\n        <Setter Property=\"Background\" >\r\n            <Setter.Value>\r\n                <SolidColorBrush Color=\"{DynamicResource WhiteColor}\"/>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"Padding\" Value=\"4\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource TextControlBorderBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type RichTextBox}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"Over\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"Over_Border\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"Over\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"Over_Border\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"DisabledOn\">\r\n                            <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                <DiscreteObjectKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"{x:Static Visibility.Visible}\" />\r\n                            </ObjectAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Border x:Name=\"BorderBase\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2.75\" />\r\n                        <Border x:Name=\"Over\" BorderBrush=\"{DynamicResource FocusBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2.75\" Opacity=\"0\" />\r\n                        <Border x:Name=\"Over_Border\" Margin=\"-1\" BorderBrush=\"{DynamicResource MouseOverHighlightBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3.75\" IsHitTestVisible=\"False\" Opacity=\"0\" />\r\n                        <ScrollViewer Margin=\"0\" x:Name=\"PART_ContentHost\" Foreground=\"{DynamicResource OutsideFontColor}\" />\r\n                        <Border x:Name=\"DisabledVisualElement\" Background=\"#A5FFFFFF\" BorderBrush=\"#59C0C0C0\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2.75\" IsHitTestVisible=\"False\" Visibility=\"Collapsed\" />\r\n                        <Border x:Name=\"ReadOnlyVisualElement\" Background=\"#66FFFFFF\" CornerRadius=\"2.75\" Visibility=\"Collapsed\" />\r\n                        <Border x:Name=\"FocusVisualElement\" BorderBrush=\"#FFB1703C\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2.75\" IsHitTestVisible=\"False\" Opacity=\"0\" />\r\n\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" />\r\n                                <Condition Property=\"IsFocused\" Value=\"False\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"HoverOff_BeginStoryboard\" Storyboard=\"{StaticResource HoverOff}\" />\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                            </MultiTrigger.EnterActions>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource DisabledOn}\" x:Name=\"DisabledOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type Label}\">\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Label}\">\r\n                    <Grid>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" RecognizesAccessKey=\"True\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\" />\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type Menu}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"True\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Menu}\">\r\n                    <Grid>\r\n                        <Border Margin=\"1\" x:Name=\"Border\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" />\r\n                        <StackPanel IsItemsHost=\"True\" ClipToBounds=\"True\" Orientation=\"Horizontal\" Background=\"{DynamicResource TabControlHeaderBrush}\" />\r\n                        <Border x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"false\" Background=\"#A5FFFFFF\" BorderBrush=\"#66FFFFFF\" BorderThickness=\"1\" Opacity=\"0\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"DisabledVisualElement\" Value=\"1\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <DropShadowBitmapEffect x:Key=\"PopupDropShadow\" ShadowDepth=\"1.5\" Softness=\"0.15\" />\r\n\r\n    <Style TargetType=\"{x:Type MenuItem}\">\r\n        <Style.Triggers>\r\n            <Trigger Property=\"IsHighlighted\" Value=\"True\">\r\n                <Setter Property=\"Foreground\">\r\n                    <Setter.Value>\r\n                        <SolidColorBrush Color=\"{DynamicResource BlackColor}\"/>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Trigger>\r\n        </Style.Triggers>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\" />\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"Foreground\" Value=\"#FFFFFFFF\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type MenuItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HighlightOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundGradientOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HighlightOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundGradientOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Border x:Name=\"Border\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\">\r\n                        <Grid>\r\n\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition MinWidth=\"17\" Width=\"Auto\" SharedSizeGroup=\"MenuItemIconColumnGroup\" />\r\n                                <ColumnDefinition Width=\"*\" />\r\n                                <ColumnDefinition Width=\"Auto\" SharedSizeGroup=\"MenuItemIGTColumnGroup\" />\r\n                                <ColumnDefinition Width=\"14\" />\r\n                            </Grid.ColumnDefinitions>\r\n\r\n                            <ContentPresenter Margin=\"4,0,6,0\" x:Name=\"Icon\" VerticalAlignment=\"Center\" ContentSource=\"Icon\" />\r\n\r\n                            <Grid Visibility=\"Hidden\" Margin=\"4,0,6,0\" x:Name=\"GlyphPanel\" VerticalAlignment=\"Center\">\r\n                                <Path x:Name=\"GlyphPanelpath\" VerticalAlignment=\"Center\" Fill=\"{TemplateBinding Foreground}\" Data=\"M0,2 L0,4.8 L2.5,7.4 L7.1,2.8 L7.1,0 L2.5,4.6 z\" FlowDirection=\"LeftToRight\" />\r\n                            </Grid>\r\n                            <Rectangle Grid.Column=\"0\" Grid.ColumnSpan=\"4\" x:Name=\"BackgroundGradientOver\" Stroke=\"#FFDBCE99\" Opacity=\"0\" Fill=\"{DynamicResource MouseOverBrush}\"/>\r\n\r\n                            <ContentPresenter Grid.Column=\"1\" Margin=\"{TemplateBinding Padding}\" x:Name=\"HeaderHost\" RecognizesAccessKey=\"True\" ContentSource=\"Header\" />\r\n\r\n                            <Grid Grid.Column=\"3\" Margin=\"4,0,6,0\" x:Name=\"ArrowPanel\" VerticalAlignment=\"Center\">\r\n                                <Path x:Name=\"ArrowPanelPath\" VerticalAlignment=\"Center\" Fill=\"{TemplateBinding Foreground}\" Data=\"M0,0 L0,8 L4,4 z\" />\r\n                            </Grid>\r\n\r\n                            <Popup IsOpen=\"{Binding Path=IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Right\" x:Name=\"SubMenuPopup\" Focusable=\"false\" AllowsTransparency=\"true\" PopupAnimation=\"{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}\" VerticalOffset=\"-3\">\r\n                                <Grid x:Name=\"SubMenu\">\r\n                                    <Border x:Name=\"SubMenuBorder\" Background=\"{DynamicResource TabControlHeaderBrush}\" BorderBrush=\"{DynamicResource ControlBorderBrush}\" BorderThickness=\"1\" />\r\n\r\n\r\n                                    <StackPanel IsItemsHost=\"True\" KeyboardNavigation.DirectionalNavigation=\"Cycle\" />\r\n                                </Grid>\r\n                            </Popup>\r\n\r\n                        </Grid>\r\n                    </Border>\r\n\r\n                    <ControlTemplate.Triggers>\r\n\r\n                        <Trigger Property=\"Role\" Value=\"TopLevelHeader\">\r\n                            <Setter Property=\"Margin\" Value=\"0,1,0,1\" />\r\n                            <Setter Property=\"Padding\" Value=\"6,3,6,3\" />\r\n                            <Setter Property=\"Grid.IsSharedSizeScope\" Value=\"true\" />\r\n                            <Setter Property=\"Placement\" Value=\"Bottom\" TargetName=\"SubMenuPopup\" />\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ArrowPanel\" />\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"Role\" Value=\"TopLevelItem\">\r\n                            <Setter Property=\"Margin\" Value=\"0,1,0,1\" />\r\n                            <Setter Property=\"Padding\" Value=\"6,3,6,3\" />\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ArrowPanel\" />\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"Role\" Value=\"SubmenuHeader\">\r\n                            <Setter Property=\"DockPanel.Dock\" Value=\"Top\" />\r\n                            <Setter Property=\"Padding\" Value=\"0,2,0,2\" />\r\n                            <Setter Property=\"Grid.IsSharedSizeScope\" Value=\"true\" />\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"Role\" Value=\"SubmenuItem\">\r\n                            <Setter Property=\"DockPanel.Dock\" Value=\"Top\" />\r\n                            <Setter Property=\"Padding\" Value=\"0,2,0,2\" />\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ArrowPanel\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsSuspendingPopupAnimation\" Value=\"true\">\r\n                            <Setter Property=\"PopupAnimation\" Value=\"None\" TargetName=\"SubMenuPopup\" />\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"Icon\" Value=\"{x:Null}\">\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"Icon\" />\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"GlyphPanel\" />\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"Icon\" />\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"AllowsTransparency\" SourceName=\"SubMenuPopup\" Value=\"true\">\r\n                            <Setter Property=\"Margin\" Value=\"0,0,3,3\" TargetName=\"SubMenu\" />\r\n                            <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" TargetName=\"SubMenu\" />\r\n                            <Setter Property=\"BitmapEffect\" Value=\"{DynamicResource PopupDropShadow}\" TargetName=\"SubMenuBorder\" />\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"IsHighlighted\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HighlightOff}\" x:Name=\"HighlightOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HighlightOn}\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type Separator}\">\r\n        <Setter Property=\"Height\" Value=\"1\" />\r\n        <Setter Property=\"Margin\" Value=\"0,2,0,2\" />\r\n        <Setter Property=\"Focusable\" Value=\"false\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Separator}\">\r\n                    <Border BorderBrush=\"#FFB1703C\" BorderThickness=\"1\" />\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type TabControl}\">\r\n        <Setter Property=\"Background\" Value=\"#FFFFFFFF\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"Padding\" Value=\"5\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TabControl}\">\r\n                    <Grid ClipToBounds=\"true\" SnapsToDevicePixels=\"true\" KeyboardNavigation.TabNavigation=\"Local\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition x:Name=\"ColumnDefinition0\" />\r\n                            <ColumnDefinition x:Name=\"ColumnDefinition1\" Width=\"0\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\" x:Name=\"RowDefinition0\" />\r\n                            <RowDefinition Height=\"*\" x:Name=\"RowDefinition1\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Border Background=\"{DynamicResource TabControlHeaderBrush}\" CornerRadius=\"2,2,0,0\" x:Name=\"border\" Margin=\"0,0,0,-2\" Panel.ZIndex=\"100\">\r\n                            <TabPanel x:Name=\"HeaderPanel\" IsItemsHost=\"true\" Panel.ZIndex=\"1\" KeyboardNavigation.TabIndex=\"1\" RenderTransformOrigin=\"0.5,0.5\" Width=\"Auto\" Height=\"Auto\" Margin=\"4,0,0,0\">\r\n                                <TabPanel.LayoutTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform Angle=\"0\" />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </TabPanel.LayoutTransform>\r\n                                <TabPanel.RenderTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </TabPanel.RenderTransform>\r\n                            </TabPanel>\r\n                        </Border>\r\n                        <Border Grid.Row=\"1\" x:Name=\"ContentPanel\" Background=\"{DynamicResource TabControlContentBrush}\" BorderBrush=\"{DynamicResource TabControlContentBorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3,3,1,1\">\r\n                            <ContentPresenter Margin=\"4\" x:Name=\"PART_SelectedContentHost\" ContentSource=\"SelectedContent\" />\r\n                        </Border>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Bottom\">\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition1\" Value=\"Auto\" />\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"border\" Value=\"1\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"ContentPanel\" Value=\"2,2,0,0\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"border\" Value=\"0,0,2,2\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"HeaderPanel\" Value=\"4,-2.5,0,0\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"border\" Value=\"0,0,0,0\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Left\">\r\n\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"HeaderPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"ContentPanel\" Value=\"1\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition0\" Value=\"Auto\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition1\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition1\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"border\" Value=\"0\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"border\" Value=\"0,0,0,0\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"ContentPanel\" Value=\"0,0,0,0\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"border\" Value=\"0,2,2,0\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"ContentPanel\" Value=\"0,2,2,0\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"HeaderPanel\" Value=\"4,0,-2.5,0\" />\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Right\">\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"HeaderPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition1\" Value=\"Auto\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition1\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"border\" Value=\"1\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"ContentPanel\" Value=\"2,0,0,2\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"border\" Value=\"0,2,2,0\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"HeaderPanel\" Value=\"-3,0,0,0\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n\r\n\r\n    <Style d:IsControlPart=\"True\" TargetType=\"{x:Type TabItem}\">\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"Padding\" Value=\"10,6,10,6\" />\r\n        <Setter Property=\"MinWidth\" Value=\"5\" />\r\n        <Setter Property=\"MinHeight\" Value=\"5\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TabItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"SelectedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"UnSelectedState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"UnSelectedState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"TopUnselectedOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"TopUnselectedBorderOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"TopUnselectedOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"TopUnselectedBorderOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualTop\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualTop\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid x:Name=\"grid\" Margin=\"2,1,2,0\">\r\n                        <Grid.LayoutTransform>\r\n                            <TransformGroup>\r\n                                <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                <RotateTransform Angle=\"0\" />\r\n                                <TranslateTransform X=\"0\" Y=\"0\" />\r\n                            </TransformGroup>\r\n                        </Grid.LayoutTransform>\r\n                        <Grid>\r\n\r\n                            <Grid Margin=\"1,0,1,0\" x:Name=\"UnSelectedState\">\r\n                                <Border x:Name=\"TopUnselectedOver\" BorderBrush=\"{DynamicResource TabItemHoverBorderBrush}\" BorderThickness=\"1,1,1,0\" CornerRadius=\"2.21,2.21,.5,.5\" Opacity=\"0\" Background=\"{DynamicResource TabItemHoverBrush}\"/>\r\n                                <Border x:Name=\"TopUnselectedBorderOver\" Margin=\"-1,-1,-1,0.5\" BorderBrush=\"{DynamicResource TabItemHoverHighlightBrush}\" BorderThickness=\"1,1,1,0\" CornerRadius=\"3.5,3.5,0,0\" Opacity=\"0\" />\r\n                            </Grid>\r\n                            <Grid Margin=\"1,0,1,-1\" x:Name=\"SelectedState\" Opacity=\"0\">\r\n                                <Border x:Name=\"BackgroundTop\" BorderBrush=\"{DynamicResource TabItemSelectedBorderBrush}\" BorderThickness=\"2,0,2,0\" CornerRadius=\"3,3,0,0\" Background=\"{DynamicResource TabItemSelectedBrush}\"/>\r\n                                <Border x:Name=\"BorderTop\" BorderThickness=\"2,0,2,0\" CornerRadius=\"3,3,0,0\" BorderBrush=\"{DynamicResource TabItemBorderTopBrush}\"/>\r\n                                <Border x:Name=\"HighlightTop\" Margin=\"2,0,2,0\" BorderThickness=\"1,3,1,0\" CornerRadius=\"1.25,1.25,0,0\" BorderBrush=\"{DynamicResource TabItemHighlightTopBrush}\"/>\r\n                                <Border x:Name=\"BorderTop2\" Margin=\"-1,0,-1,0\" BorderBrush=\"{DynamicResource TabItemBorderTop2Brush}\" BorderThickness=\"1,1,1,0\" CornerRadius=\"3,3,0,0\" IsHitTestVisible=\"false\" />\r\n                                <Border x:Name=\"FocusVisualTop\" Margin=\"-1,0,-1,0\" BorderThickness=\"3,2,3,0\" CornerRadius=\"3,3,0,0\" Opacity=\"0\" BorderBrush=\"{DynamicResource TabItemFocusBrush}\">\r\n                                </Border>\r\n                            </Grid>\r\n                            <Border x:Name=\"DisabledVisualTopSelected\" Margin=\"1,0,1,0\" Background=\"{DynamicResource DisabledBackgroundBrush}\" CornerRadius=\"3,3,0,0\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" />\r\n                            <ContentPresenter HorizontalAlignment=\"Center\" Margin=\"{TemplateBinding Padding}\" x:Name=\"ContentSite\" VerticalAlignment=\"Center\" RecognizesAccessKey=\"True\" ContentSource=\"Header\" />\r\n\r\n                        </Grid>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Left\">\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"grid\">\r\n                                <Setter.Value>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform Angle=\"-90\" />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Right\">\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"grid\">\r\n                                <Setter.Value>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform Angle=\"90\" />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Bottom\">\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"ContentSite\">\r\n                                <Setter.Value>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform Angle=\"180\" />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"grid\">\r\n                                <Setter.Value>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform Angle=\"180\" />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\" />\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" x:Name=\"HoverOn_BeginStoryboard\" />\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" />\r\n                                <Condition Property=\"Selector.IsSelected\" Value=\"False\" />\r\n                            </MultiTrigger.Conditions>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsSelected\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOff}\" x:Name=\"SelectedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\" />\r\n                            </Trigger.EnterActions>\r\n                            <Setter Property=\"Panel.ZIndex\" Value=\"100\" />\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" SourceName=\"grid\" />\r\n                                <Condition Property=\"Selector.IsSelected\" Value=\"True\" />\r\n                            </MultiTrigger.Conditions>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\">\r\n            <Setter.Value>\r\n                <SolidColorBrush Color=\"{DynamicResource WhiteColor}\" />\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Style.Triggers>\r\n            <Trigger Property=\"Selector.IsSelected\" Value=\"True\">\r\n                <Setter Property=\"Foreground\" Value=\"{DynamicResource OutsideFontColor}\" />\r\n            </Trigger>\r\n        </Style.Triggers>\r\n    </Style>\r\n\r\n\r\n    <Style x:Key=\"NuclearSliderThumb\" d:IsControlPart=\"True\" TargetType=\"{x:Type Thumb}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"Height\" Value=\"21\" />\r\n        <Setter Property=\"Width\" Value=\"15\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"Over\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"Over\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"Press\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"Press\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Path x:Name=\"Base\" Margin=\"1,1.312,1,0.375\" Fill=\"{DynamicResource SliderThumbBrush}\" Stretch=\"Fill\" Stroke=\"{DynamicResource SliderThumbBorderBrush}\" StrokeThickness=\"1\" StrokeLineJoin=\"Round\" Data=\"M-9.958333,0.78716499 L-3.204694,0.78717428 L-3.2052999,1.4266928 L-6.6465902,1.7712332 L-9.9818907,1.433604 z\" />\r\n                        <Path x:Name=\"Over\" Margin=\"2,2.312,2,1.375\" Fill=\"{DynamicResource MouseOverBrush}\" Stretch=\"Fill\" Data=\"M-9.958333,0.78716499 L-3.204694,0.78717428 L-3.2052999,1.4276805 L-6.6465902,1.7722208 L-9.9818907,1.4345917 z\" Opacity=\"0\" />\r\n                        <Path x:Name=\"Press\" Margin=\"2,2.312,2,1.375\" Fill=\"{DynamicResource PressedBrush}\" Stretch=\"Fill\" Data=\"M-9.958333,0.78716499 L-3.204694,0.78717428 L-3.2052999,1.4276805 L-6.6465902,1.7722208 L-9.9818907,1.4345917 z\" Opacity=\"0\" />\r\n                        <Path x:Name=\"whiteGradient\" Margin=\"2,2.312,2,1.375\" Stretch=\"Fill\" Data=\"M-9.958333,0.78716499 L-3.204694,0.78717428 L-3.2052999,1.4276805 L-6.6465902,1.7722208 L-9.9818907,1.4345917 z\">\r\n                            <Path.Fill>\r\n                                <LinearGradientBrush EndPoint=\"0.5,0\" StartPoint=\"0.563,0.979\">\r\n                                    <GradientStop Color=\"#5FFFFFFF\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#5FFFFFFF\" Offset=\"0.259\" />\r\n                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"0.393\" />\r\n                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"0.643\" />\r\n                                    <GradientStop Color=\"#75FFFFFF\" Offset=\"0.75\" />\r\n                                    <GradientStop Color=\"#99FFFFFF\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Path.Fill>\r\n                        </Path>\r\n                        <Path x:Name=\"Line\" Margin=\"-1,-2,0,0\" Height=\"10\" Width=\"1\" Stretch=\"Fill\" Stroke=\"#FF6B81A0\" StrokeThickness=\"1\" Data=\"M5.4375,2.6875 L5.4375,12.1875\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" />\r\n                        <Path x:Name=\"Line2\" Margin=\"0,-2,-1,0\" Height=\"10\" Width=\"1\" Stretch=\"Fill\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\" Data=\"M5.4375,2.6875 L5.4375,12.1875\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" />\r\n                        <Path x:Name=\"DisabledVisualElement\" Margin=\"1,1.312,1,0.375\" Fill=\"#FFFFFFFF\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\" StrokeLineJoin=\"Round\" Stretch=\"Fill\" Opacity=\"0\" Data=\"M-9.958333,0.78716499 L-3.204694,0.78717428 L-3.2052999,1.4266928 L-6.6465902,1.7712332 L-9.9818907,1.433604 z\" IsHitTestVisible=\"false\" />\r\n                        <Path x:Name=\"FocusVisualElement\" Stretch=\"Fill\" Stroke=\"{DynamicResource FocusBrush}\" StrokeThickness=\"1\" StrokeLineJoin=\"Round\" Data=\"M-9.958333,0.78716499 L-3.204694,0.78717428 L-3.2052999,1.4276805 L-6.6465902,1.7722208 L-9.9818907,1.4345917 z\" IsHitTestVisible=\"false\" Opacity=\"0\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard1\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard1\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsDragging\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"HoverOff_BeginStoryboard\" Storyboard=\"{StaticResource HoverOff}\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"DisabledVisualElement\" Value=\"0.5\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type Slider}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Slider}\">\r\n                    <Grid x:Name=\"GridRoot\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\" />\r\n                            <RowDefinition Height=\"Auto\" MinHeight=\"{TemplateBinding MinHeight}\" />\r\n                            <RowDefinition Height=\"Auto\" />\r\n                        </Grid.RowDefinitions>\r\n\r\n                        <TickBar Visibility=\"Collapsed\" x:Name=\"TopTick\" Height=\"4\" SnapsToDevicePixels=\"True\" Placement=\"Top\" Fill=\"#FF405A78\" />\r\n                        <Rectangle Margin=\"7.5,0,7.5,0\" Grid.Column=\"0\" Height=\"6\" RadiusX=\"3\" RadiusY=\"3\" Grid.Row=\"1\" Fill=\"{DynamicResource SliderBackgroundBrush}\"/>\r\n\r\n                        <Track Grid.Row=\"1\" x:Name=\"PART_Track\">\r\n                            <Track.Thumb>\r\n                                <Thumb Style=\"{DynamicResource NuclearSliderThumb}\" />\r\n                            </Track.Thumb>\r\n                            <Track.IncreaseRepeatButton>\r\n                                <RepeatButton Style=\"{DynamicResource NuclearScrollRepeatButtonStyle}\" Command=\"Slider.IncreaseLarge\" />\r\n                            </Track.IncreaseRepeatButton>\r\n                            <Track.DecreaseRepeatButton>\r\n                                <RepeatButton Style=\"{DynamicResource NuclearScrollRepeatButtonStyle}\" Command=\"Slider.DecreaseLarge\" />\r\n                            </Track.DecreaseRepeatButton>\r\n                        </Track>\r\n\r\n                        <TickBar Visibility=\"Collapsed\" Grid.Row=\"2\" x:Name=\"BottomTick\" Height=\"4\" SnapsToDevicePixels=\"True\" Placement=\"Bottom\" Fill=\"{TemplateBinding Foreground}\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"TickPlacement\" Value=\"TopLeft\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"TopTick\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"TickPlacement\" Value=\"BottomRight\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"BottomTick\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"TickPlacement\" Value=\"Both\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"TopTick\" />\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"BottomTick\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"GridRoot\" Value=\"0.65\" />\r\n\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"Orientation\" Value=\"Vertical\">\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"GridRoot\">\r\n                                <Setter.Value>\r\n                                    <RotateTransform Angle=\"-90\" />\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                            <Setter TargetName=\"PART_Track\" Property=\"Orientation\" Value=\"Horizontal\" />\r\n                        </Trigger>\r\n\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type TreeView}\">\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource ControlBackgroundBrush}\" />\r\n        <Setter Property=\"Foreground\" Value=\"Black\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource ControlBorderBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Padding\" Value=\"4\" />\r\n        <Setter Property=\"Cursor\" Value=\"Arrow\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TreeView}\">\r\n                    <Grid>\r\n                        <Border x:Name=\"Border\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\" Background=\"{DynamicResource ControlBackgroundBrush}\">\r\n                            <ScrollViewer Focusable=\"False\" Background=\"{TemplateBinding Background}\" Padding=\"4\" HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Auto\" CanContentScroll=\"False\">\r\n                                <ItemsPresenter />\r\n                            </ScrollViewer>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"NuclearTreeViewItemToggleButton\" d:IsControlPart=\"True\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Focusable\" Value=\"False\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <ColorAnimation Duration=\"0\" Storyboard.TargetName=\"UncheckedVisual\" Storyboard.TargetProperty=\"(Shape.Fill).(SolidColorBrush.Color)\" To=\"#FFFFCB66\" />\r\n                            <ColorAnimation Duration=\"0\" Storyboard.TargetName=\"UncheckedVisual\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\" To=\"#FFFFCB66\" />\r\n                            <ColorAnimation Duration=\"0\" Storyboard.TargetName=\"CheckedVisual\" Storyboard.TargetProperty=\"(Shape.Fill).(SolidColorBrush.Color)\" To=\"#FFFFCB66\" />\r\n                            <ColorAnimation Duration=\"0\" Storyboard.TargetName=\"CheckedVisual\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\" To=\"#FFFFCB66\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <ColorAnimation Duration=\"0\" Storyboard.TargetName=\"UncheckedVisual\" Storyboard.TargetProperty=\"(Shape.Fill).(SolidColorBrush.Color)\" To=\"#FF9EC6FB\" />\r\n                            <ColorAnimation Duration=\"0\" Storyboard.TargetName=\"UncheckedVisual\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\" To=\"#FF9EC6FB\" />\r\n                            <ColorAnimation Duration=\"0\" Storyboard.TargetName=\"CheckedVisual\" Storyboard.TargetProperty=\"(Shape.Fill).(SolidColorBrush.Color)\" To=\"#FFE56E17\" />\r\n                            <ColorAnimation Duration=\"0\" Storyboard.TargetName=\"CheckedVisual\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\" To=\"#FFE56E17\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOn\">\r\n                            <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"UncheckedVisual\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"CheckedVisual\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOff\">\r\n                            <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"UncheckedVisual\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                            <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"CheckedVisual\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid HorizontalAlignment=\"Right\" Margin=\"2,2,5,2\">\r\n                        <Path x:Name=\"UncheckedVisual\" Height=\"9\" Width=\"6\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Center\" Fill=\"#FF9EC6FB\" Stroke=\"#FF9EC6FB\" StrokeLineJoin=\"Miter\" Data=\"M 0,0 L 0,9 L 5,4.5 Z\" />\r\n                        <Path x:Name=\"CheckedVisual\" Height=\"6\" Width=\"6\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Center\" Fill=\"#FFE56E17\" Stroke=\"#FFE56E17\" StrokeLineJoin=\"Miter\" Opacity=\"0\" Data=\"M 6,0 L 6,6 L 0,6 Z\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOff}\" x:Name=\"CheckedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOn}\" x:Name=\"CheckedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style d:IsControlPart=\"True\" TargetType=\"{x:Type TreeViewItem}\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"Padding\" Value=\"5,3,15,3\" />\r\n        <Setter Property=\"Cursor\" Value=\"Arrow\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TreeViewItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"SelectedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"select_gradient\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"select_gradient\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"hover_gradient\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.85\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.65\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"hover_gradient\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"InactiveOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"inactive\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.5\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"InactiveOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"inactive\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid x:Name=\"grid\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition MinWidth=\"19\" Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"*\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\" />\r\n                            <RowDefinition />\r\n                        </Grid.RowDefinitions>\r\n                        <ToggleButton x:Name=\"Expander\" Style=\"{DynamicResource NuclearTreeViewItemToggleButton}\" IsChecked=\"{Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}\" ClickMode=\"Press\" />\r\n\r\n                        <Rectangle x:Name=\"select_gradient\" Grid.Column=\"1\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" IsHitTestVisible=\"False\" Fill=\"{DynamicResource PressedBrush}\" Stroke=\"{DynamicResource PressedBorderBrush}\"/>\r\n                        <Rectangle x:Name=\"inactive\" Grid.Column=\"1\" Fill=\"#FF999999\" Stroke=\"#FF333333\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\" IsHitTestVisible=\"False\" />\r\n\r\n                        <Rectangle x:Name=\"hover_gradient\" Stroke=\"{DynamicResource FocusBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" IsHitTestVisible=\"False\" Grid.Column=\"1\" Fill=\"{DynamicResource MouseOverBrush}\"/>\r\n                        <Rectangle x:Name=\"highlight\" Margin=\"1\" StrokeThickness=\"1\" RadiusX=\"0.5\" RadiusY=\"0.5\" Opacity=\"0\" IsHitTestVisible=\"False\" Grid.Column=\"1\" Stroke=\"{DynamicResource MouseOverHighlightBrush}\"/>\r\n\r\n                        <Border Grid.Column=\"1\" x:Name=\"Selection_Border\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\">\r\n                            <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" x:Name=\"PART_Header\" ContentSource=\"Header\" />\r\n                        </Border>\r\n                        <ItemsPresenter Grid.Column=\"1\" Grid.ColumnSpan=\"2\" Grid.Row=\"1\" x:Name=\"ItemsHost\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\" SourceName=\"Selection_Border\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" x:Name=\"HoverOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsExpanded\" Value=\"false\">\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ItemsHost\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"HasItems\" Value=\"false\">\r\n                            <Setter Property=\"Visibility\" Value=\"Hidden\" TargetName=\"Expander\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsSelected\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"SelectedOff_BeginStoryboard\" Storyboard=\"{StaticResource SelectedOff}\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource InactiveOff}\" x:Name=\"InactiveOff_BeginStoryboard\" />\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource InactiveOn}\" x:Name=\"InactiveOn_BeginStoryboard\" />\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsSelected\" Value=\"true\" />\r\n                                <Condition Property=\"IsSelectionActive\" Value=\"false\" />\r\n                            </MultiTrigger.Conditions>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Static ToolBar.ButtonStyleKey}\" TargetType=\"{x:Type Button}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource NuclearButtonFocusVisual}\" />\r\n        <Setter Property=\"Foreground\" Value=\"#FF042271\" />\r\n\t\t\t\t\t\t<Setter Property=\"FontSize\" Value=\"10\"/>\r\n\t\t\t\t<Setter Property=\"MinHeight\" Value=\"18\"/>\r\n\t\t\t\t<Setter Property=\"MinWidth\" Value=\"50\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"Padding\" Value=\"3\" />\r\n        <Setter Property=\"Template\" Value=\"{DynamicResource ButtonTemplate}\" />\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Static ToolBar.CheckBoxStyleKey}\" TargetType=\"{x:Type CheckBox}\">\r\n\t\t\t<Setter Property=\"FontSize\" Value=\"10\"/>\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource CheckBoxFocusVisual}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource OutsideFontColor}\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"Padding\" Value=\"4,1,0,0\" />\r\n        <Setter Property=\"Template\" Value=\"{DynamicResource CheckBoxTemplate}\" />\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Static ToolBar.RadioButtonStyleKey}\" TargetType=\"{x:Type RadioButton}\">\r\n\t\t\t<Setter Property=\"FontSize\" Value=\"10\"/>\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource RadioButtonFocusVisual}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource OutsideFontColor}\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"Padding\" Value=\"4,1,0,0\" />\r\n        <Setter Property=\"Template\" Value=\"{DynamicResource RadioButtonTemplate}\" />\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Static ToolBar.ComboBoxStyleKey}\" TargetType=\"{x:Type ComboBox}\">\r\n\t\t\t<Setter Property=\"FontSize\" Value=\"10\"/>\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"Padding\" Value=\"6,2,25,2\" />\r\n        \r\n<Setter Property=\"Template\" Value=\"{DynamicResource ComboBoxTemplate}\" />\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Static ToolBar.TextBoxStyleKey}\" TargetType=\"{x:Type TextBox}\">\r\n\t\t\t<Setter Property=\"FontSize\" Value=\"10\"/>\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\" />\r\n        <Setter Property=\"AllowDrop\" Value=\"true\" />\r\n        <Setter Property=\"Background\" >\r\n            <Setter.Value>\r\n                <SolidColorBrush Color=\"{DynamicResource WhiteColor}\"/>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"Padding\" Value=\"4\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"#FFABAEB3\" />\r\n                    <GradientStop Color=\"#FFE2E8EE\" Offset=\"1\" />\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Template\" Value=\"{DynamicResource TextBoxTemplate}\" />\r\n    </Style>\r\n\r\n    <LinearGradientBrush x:Key=\"ToolBarHorizontalBackground\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#FFFFFF\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FFFBFF\" Offset=\"0.5\" />\r\n        <GradientStop Color=\"#F7F7F7\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"ToolBarToggleButtonHorizontalBackground\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#ECECEC\" Offset=\"0\" />\r\n        <GradientStop Color=\"#DDDDDD\" Offset=\"0.5\" />\r\n        <GradientStop Color=\"#A0A0A0\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"ToolBarButtonHover\" Color=\"#FF125E7C\" />\r\n    <SolidColorBrush x:Key=\"ToolBarGripper\" Color=\"#C6C3C6\" />\r\n    <Style x:Key=\"ToolBarHorizontalOverflowButtonStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource ToolBarToggleButtonHorizontalBackground}\" />\r\n        <Setter Property=\"MinHeight\" Value=\"0\" />\r\n        <Setter Property=\"MinWidth\" Value=\"0\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundOver_Highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.65\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundOver_Highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Border SnapsToDevicePixels=\"true\" x:Name=\"Bd\" CornerRadius=\"0,0,0,0\" Background=\"{DynamicResource NormalBrush}\"/>\r\n                        <Border x:Name=\"BackgroundOver\" BorderThickness=\"1\" CornerRadius=\"1.75\" Opacity=\"0\" Background=\"{DynamicResource MouseOverBrush}\" BorderBrush=\"{DynamicResource MouseOverBorderBrush}\"/>\r\n                        <Border x:Name=\"BackgroundOver_Highlight\" BorderThickness=\"1,0,1,1\" CornerRadius=\"1\" Opacity=\"0\" Margin=\"0,0,0,0\" BorderBrush=\"{DynamicResource MouseOverHighlightBrush}\"/>\r\n                        <Canvas SnapsToDevicePixels=\"true\" HorizontalAlignment=\"Right\" Margin=\"7,2,2,2\" VerticalAlignment=\"Bottom\" Width=\"6\" Height=\"7\">\r\n                            <Path Stroke=\"White\" Data=\"M 1 1.5 L 6 1.5\" />\r\n                            <Path Stroke=\"{TemplateBinding Foreground}\" Data=\"M 0 0.5 L 5 0.5\" />\r\n                            <Path Fill=\"White\" Data=\"M 0.5 4 L 6.5 4 L 3.5 7 Z\" />\r\n                            <Path Fill=\"{TemplateBinding Foreground}\" Data=\"M -0.5 3 L 5.5 3 L 2.5 6 Z\" />\r\n                        </Canvas>\r\n                        <Border x:Name=\"FocusVisualElement\" Margin=\"-1\" BorderBrush=\"#FFE99862\" BorderThickness=\"1\" CornerRadius=\"2.75\" IsHitTestVisible=\"false\" Opacity=\"0\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{StaticResource ToolBarGripper}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <SolidColorBrush x:Key=\"ToolBarSubMenuBackground\" Color=\"#FFFDFDFD\" />\r\n    <SolidColorBrush x:Key=\"ToolBarMenuBorder\" Color=\"#FFFFFFFF\" />\r\n    <Style x:Key=\"ToolBarThumbStyle\" TargetType=\"{x:Type Thumb}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <Border SnapsToDevicePixels=\"True\" Background=\"Transparent\" Padding=\"{TemplateBinding Padding}\" CornerRadius=\"0,0,0,0\">\r\n                        <Rectangle>\r\n                            <Rectangle.Fill>\r\n                                <DrawingBrush TileMode=\"Tile\" Viewbox=\"0,0,4,4\" ViewboxUnits=\"Absolute\" Viewport=\"0,0,4,4\" ViewportUnits=\"Absolute\">\r\n                                    <DrawingBrush.Drawing>\r\n                                        <DrawingGroup>\r\n                                            <GeometryDrawing Brush=\"White\" Geometry=\"M 1 1 L 1 3 L 3 3 L 3 1 z\" />\r\n                                            <GeometryDrawing Brush=\"{StaticResource ToolBarGripper}\" Geometry=\"M 0 0 L 0 2 L 2 2 L 2 0 z\" />\r\n                                        </DrawingGroup>\r\n                                    </DrawingBrush.Drawing>\r\n                                </DrawingBrush>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Setter Property=\"Cursor\" Value=\"SizeAll\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <LinearGradientBrush x:Key=\"ToolBarToggleButtonVerticalBackground\" EndPoint=\"1,0\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#ECECEC\" Offset=\"0\" />\r\n        <GradientStop Color=\"#DDDDDD\" Offset=\"0.5\" />\r\n        <GradientStop Color=\"#A0A0A0\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <Style x:Key=\"ToolBarVerticalOverflowButtonStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource ToolBarToggleButtonVerticalBackground}\" />\r\n        <Setter Property=\"MinHeight\" Value=\"0\" />\r\n        <Setter Property=\"MinWidth\" Value=\"0\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <Border SnapsToDevicePixels=\"true\" x:Name=\"Bd\" Background=\"{TemplateBinding Background}\" CornerRadius=\"0,0,3,3\">\r\n                        <Canvas SnapsToDevicePixels=\"true\" HorizontalAlignment=\"Right\" Margin=\"2,7,2,2\" VerticalAlignment=\"Bottom\" Width=\"7\" Height=\"6\">\r\n                            <Path Stroke=\"White\" Data=\"M 1.5 1 L 1.5 6\" />\r\n                            <Path Stroke=\"{TemplateBinding Foreground}\" Data=\"M 0.5 0 L 0.5 5\" />\r\n                            <Path Fill=\"White\" Data=\"M 3.5 0.5 L 7 3.5 L 4 6.5 Z\" />\r\n                            <Path Fill=\"{TemplateBinding Foreground}\" Data=\"M 3 -0.5 L 6 2.5 L 3 5.5 Z\" />\r\n                        </Canvas>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Setter Property=\"Background\" TargetName=\"Bd\" Value=\"{StaticResource ToolBarButtonHover}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                            <Setter Property=\"Background\" TargetName=\"Bd\" Value=\"{StaticResource ToolBarButtonHover}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{StaticResource ToolBarGripper}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <LinearGradientBrush x:Key=\"ToolBarVerticalBackground\" EndPoint=\"1,0\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#FFFFFF\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FFFBFF\" Offset=\"0.5\" />\r\n        <GradientStop Color=\"#F7F7F7\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <Style TargetType=\"{x:Type ToolBar}\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource ToolBarHorizontalBackground}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"#FFB1703C\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToolBar}\">\r\n                    <Grid SnapsToDevicePixels=\"true\" Margin=\"3,1,1,1\" x:Name=\"Grid\">\r\n                        <Grid HorizontalAlignment=\"Right\" x:Name=\"OverflowGrid\">\r\n                            <ToggleButton IsEnabled=\"{TemplateBinding HasOverflowItems}\" FocusVisualStyle=\"{x:Null}\" x:Name=\"OverflowButton\" Style=\"{StaticResource ToolBarHorizontalOverflowButtonStyle}\" ClickMode=\"Press\" IsChecked=\"{Binding Path=IsOverflowOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\">\r\n                                <ToggleButton.Background>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                        <GradientStop Color=\"#FF8AAEDA\" Offset=\"0.521\" />\r\n                                        <GradientStop Color=\"#FFC6D6EC\" Offset=\"0.194\" />\r\n                                        <GradientStop Color=\"#FFB4C9E5\" Offset=\"0.811\" />\r\n                                        <GradientStop Color=\"#FFB7C8E0\" Offset=\"0.507\" />\r\n                                        <GradientStop Color=\"#FFD1DEF0\" Offset=\"1\" />\r\n                                    </LinearGradientBrush>\r\n                                </ToggleButton.Background>\r\n                            </ToggleButton>\r\n                            <Popup Focusable=\"false\" AllowsTransparency=\"true\" IsOpen=\"{Binding Path=IsOverflowOpen, RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Bottom\" PopupAnimation=\"{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}\" StaysOpen=\"False\" x:Name=\"OverflowPopup\">\r\n                                <Border x:Name=\"Shdw\">\r\n                                    <Border BorderThickness=\"1,1,1,1\" BorderBrush=\"{TemplateBinding BorderBrush}\">\r\n                                        <Border.Background>\r\n                                            <LinearGradientBrush EndPoint=\"1.204,0.5\" StartPoint=\"0.056,0.5\">\r\n                                                <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                                <GradientStop Color=\"#FFD4D7DB\" Offset=\"1\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Border.Background>\r\n                                        <ToolBarOverflowPanel Focusable=\"true\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" FocusVisualStyle=\"{x:Null}\" Margin=\"2\" x:Name=\"PART_ToolBarOverflowPanel\" WrapWidth=\"200\" KeyboardNavigation.DirectionalNavigation=\"Cycle\" KeyboardNavigation.TabNavigation=\"Cycle\" />\r\n                                    </Border>\r\n                                </Border>\r\n                            </Popup>\r\n                        </Grid>\r\n                        <Border Margin=\"0,0,11,0\" x:Name=\"MainPanelBorder\" BorderThickness=\"1\" CornerRadius=\"0,0,0,0\" Padding=\"{TemplateBinding Padding}\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\">\r\n                            <Grid>\r\n\r\n                                <DockPanel KeyboardNavigation.TabIndex=\"1\" KeyboardNavigation.TabNavigation=\"Local\">\r\n                                    <Thumb Padding=\"6,5,1,6\" Margin=\"-3,-1,0,0\" x:Name=\"ToolBarThumb\" Style=\"{StaticResource ToolBarThumbStyle}\" Width=\"10\" />\r\n                                    <ContentPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" HorizontalAlignment=\"Center\" Margin=\"4,0,4,0\" x:Name=\"ToolBarHeader\" VerticalAlignment=\"Center\" ContentSource=\"Header\" />\r\n                                    <ToolBarPanel SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Margin=\"0,1,2,2\" x:Name=\"PART_ToolBarPanel\" IsItemsHost=\"true\" Background=\"{DynamicResource NormalBrush}\"/>\r\n                                </DockPanel>\r\n                            </Grid>\r\n                        </Border>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsOverflowOpen\" Value=\"true\">\r\n                            <Setter Property=\"IsEnabled\" TargetName=\"ToolBarThumb\" Value=\"false\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"Header\" Value=\"{x:Null}\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"ToolBarHeader\" Value=\"Collapsed\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"ToolBarTray.IsLocked\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"ToolBarThumb\" Value=\"Collapsed\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"HasDropShadow\" SourceName=\"OverflowPopup\" Value=\"true\">\r\n                            <Setter Property=\"Margin\" TargetName=\"Shdw\" Value=\"0,0,5,5\" />\r\n                            <Setter Property=\"SnapsToDevicePixels\" TargetName=\"Shdw\" Value=\"true\" />\r\n                            <Setter Property=\"Background\" TargetName=\"Shdw\" Value=\"#71000000\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"Orientation\" Value=\"Vertical\">\r\n                            <Setter Property=\"Margin\" TargetName=\"Grid\" Value=\"1,3,1,1\" />\r\n                            <Setter Property=\"Style\" TargetName=\"OverflowButton\" Value=\"{StaticResource ToolBarVerticalOverflowButtonStyle}\" />\r\n                            <Setter Property=\"Height\" TargetName=\"ToolBarThumb\" Value=\"10\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ToolBarThumb\" Value=\"Auto\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"ToolBarThumb\" Value=\"-1,-3,0,0\" />\r\n                            <Setter Property=\"Padding\" TargetName=\"ToolBarThumb\" Value=\"5,6,6,1\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"ToolBarHeader\" Value=\"0,0,0,4\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"PART_ToolBarPanel\" Value=\"1,0,2,2\" />\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ToolBarThumb\" Value=\"Top\" />\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ToolBarHeader\" Value=\"Top\" />\r\n                            <Setter Property=\"HorizontalAlignment\" TargetName=\"OverflowGrid\" Value=\"Stretch\" />\r\n                            <Setter Property=\"VerticalAlignment\" TargetName=\"OverflowGrid\" Value=\"Bottom\" />\r\n                            <Setter Property=\"Placement\" TargetName=\"OverflowPopup\" Value=\"Right\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"MainPanelBorder\" Value=\"0,0,0,11\" />\r\n                            <Setter Property=\"Background\" Value=\"{StaticResource ToolBarVerticalBackground}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\" />\r\n    </Style>\r\n\r\n    <BorderGapMaskConverter x:Key=\"BorderGapMaskConverter\" />\r\n    <Style TargetType=\"{x:Type GroupBox}\">\r\n        <Setter Property=\"BorderBrush\" Value=\"#D5DFE5\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource NuclearButtonFocusVisual}\" />\r\n        <Setter Property=\"Foreground\" Value=\"#FF042271\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type GroupBox}\">\r\n                    <Grid SnapsToDevicePixels=\"true\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"6\" />\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"*\" />\r\n                            <ColumnDefinition Width=\"6\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\" />\r\n                            <RowDefinition Height=\"Auto\" />\r\n                            <RowDefinition Height=\"*\" />\r\n                            <RowDefinition Height=\"6\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Border Grid.ColumnSpan=\"4\" Grid.RowSpan=\"4\" CornerRadius=\"4,4,4,4\" BorderThickness=\"1,1,1,1\">\r\n                            <Border.Background>\r\n                                <LinearGradientBrush EndPoint=\"1.204,0.5\" StartPoint=\"0.056,0.5\">\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#FFD4D7DB\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <Border Grid.ColumnSpan=\"4\" Grid.Row=\"1\" Grid.RowSpan=\"3\" BorderThickness=\"1,1,1,1\" CornerRadius=\"4\" BorderBrush=\"{DynamicResource ControlBorderBrush}\">\r\n                            <Border.OpacityMask>\r\n                                <MultiBinding Converter=\"{StaticResource BorderGapMaskConverter}\" ConverterParameter=\"7\">\r\n                                    <Binding Path=\"ActualWidth\" ElementName=\"Header\" />\r\n                                    <Binding Path=\"ActualWidth\" RelativeSource=\"{RelativeSource Self}\" />\r\n                                    <Binding Path=\"ActualHeight\" RelativeSource=\"{RelativeSource Self}\" />\r\n                                </MultiBinding>\r\n                            </Border.OpacityMask>\r\n                            <Border BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\">\r\n                                <Border.BorderBrush>\r\n                                    <SolidColorBrush Color=\"{DynamicResource MainColor}\" />\r\n                                </Border.BorderBrush>\r\n                                <Border BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\">\r\n                                    <Border.BorderBrush>\r\n                                        <SolidColorBrush Color=\"{DynamicResource MainColor}\" />\r\n                                    </Border.BorderBrush>\r\n                                </Border>\r\n                            </Border>\r\n                        </Border>\r\n                        <Border Grid.Column=\"0\" Grid.ColumnSpan=\"4\" Grid.Row=\"1\" Grid.RowSpan=\"3\" Background=\"{TemplateBinding Background}\" BorderBrush=\"Transparent\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"4\" />\r\n                        <Border Grid.ColumnSpan=\"4\" Grid.RowSpan=\"2\" BorderThickness=\"1,1,1,0\" CornerRadius=\"2,2,0,0\" x:Name=\"Main\">\r\n                            <Border x:Name=\"BackgroundNorm\" BorderThickness=\"1\" CornerRadius=\"1.75\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\"/>\r\n                        </Border>\r\n\r\n                        <Border x:Name=\"Header\" Grid.Column=\"1\" Grid.Row=\"0\" Grid.RowSpan=\"2\" Padding=\"3,1,3,0\">\r\n                            <ContentPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" ContentSource=\"Header\" RecognizesAccessKey=\"True\" Margin=\"0,4,0,4\" />\r\n                        </Border>\r\n\r\n                        <ContentPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Margin=\"{TemplateBinding Padding}\" Grid.Column=\"1\" Grid.ColumnSpan=\"2\" Grid.Row=\"2\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"{x:Static GridView.GridViewScrollViewerStyleKey}\" TargetType=\"{x:Type ScrollViewer}\">\r\n        <Setter Property=\"Focusable\" Value=\"false\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ScrollViewer}\">\r\n                    <Grid SnapsToDevicePixels=\"true\" Background=\"{TemplateBinding Background}\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\" />\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"*\" />\r\n                            <RowDefinition Height=\"Auto\" />\r\n                        </Grid.RowDefinitions>\r\n                        <DockPanel Margin=\"{TemplateBinding Padding}\">\r\n                            <ScrollViewer Focusable=\"false\" DockPanel.Dock=\"Top\" HorizontalScrollBarVisibility=\"Hidden\" VerticalScrollBarVisibility=\"Hidden\">\r\n                                <GridViewHeaderRowPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Margin=\"2,0,2,0\" AllowsColumnReorder=\"{Binding Path=TemplatedParent.View.AllowsColumnReorder, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderContainerStyle=\"{Binding Path=TemplatedParent.View.ColumnHeaderContainerStyle, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderContextMenu=\"{Binding Path=TemplatedParent.View.ColumnHeaderContextMenu, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderTemplate=\"{Binding Path=TemplatedParent.View.ColumnHeaderTemplate, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderTemplateSelector=\"{Binding Path=TemplatedParent.View.ColumnHeaderTemplateSelector, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderToolTip=\"{Binding Path=TemplatedParent.View.ColumnHeaderToolTip, RelativeSource={RelativeSource TemplatedParent}}\" Columns=\"{Binding Path=TemplatedParent.View.Columns, RelativeSource={RelativeSource TemplatedParent}}\" />\r\n\r\n                            </ScrollViewer>\r\n                            <ScrollContentPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" x:Name=\"PART_ScrollContentPresenter\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" CanContentScroll=\"{TemplateBinding CanContentScroll}\" KeyboardNavigation.DirectionalNavigation=\"Local\" />\r\n                        </DockPanel>\r\n                        <ScrollBar Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Cursor=\"Arrow\" x:Name=\"PART_HorizontalScrollBar\" Grid.Row=\"1\" Orientation=\"Horizontal\" ViewportSize=\"{TemplateBinding ViewportWidth}\" Maximum=\"{TemplateBinding ScrollableWidth}\" Minimum=\"0.0\" Value=\"{Binding Path=HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" />\r\n                        <ScrollBar Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Cursor=\"Arrow\" x:Name=\"PART_VerticalScrollBar\" Grid.Column=\"1\" Orientation=\"Vertical\" ViewportSize=\"{TemplateBinding ViewportHeight}\" Maximum=\"{TemplateBinding ScrollableHeight}\" Minimum=\"0.0\" Value=\"{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" />\r\n                        <DockPanel Grid.Column=\"1\" Grid.Row=\"1\" Background=\"{Binding Path=Background, ElementName=PART_VerticalScrollBar}\" LastChildFill=\"false\">\r\n                            <Rectangle Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Width=\"1\" Fill=\"White\" DockPanel.Dock=\"Left\" />\r\n                            <Rectangle Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Height=\"1\" Fill=\"White\" DockPanel.Dock=\"Top\" />\r\n                        </DockPanel>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style TargetType=\"{x:Type ListView}\">\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\" />\r\n        <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\" />\r\n        <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"true\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"#FFB1703C\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Padding\" Value=\"1\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListView}\">\r\n                    <Border x:Name=\"Border\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"1\">\r\n                        <Border.Background>\r\n                            <LinearGradientBrush EndPoint=\"1.204,0.5\" StartPoint=\"0.056,0.5\">\r\n                                <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                <GradientStop Color=\"#FFD4D7DB\" Offset=\"1\" />\r\n                            </LinearGradientBrush>\r\n                        </Border.Background>\r\n\r\n                        <ScrollViewer Padding=\"{TemplateBinding Padding}\" Style=\"{DynamicResource {x:Static GridView.GridViewScrollViewerStyleKey}}\">\r\n                            <ItemsPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" />\r\n                        </ScrollViewer>\r\n                    </Border>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                            <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\" />\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"ListViewItemFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Rectangle Stroke=\"#8E6EA6F5\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" />\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type ListViewItem}\">\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{StaticResource ListViewItemFocusVisual}\" />\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Margin\" Value=\"0,0,0,1\" />\r\n        <Setter Property=\"Padding\" Value=\"5,2,5,2\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListViewItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundGradientOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0.73\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundGradientOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundGradientSelected\" Storyboard.TargetProperty=\"Opacity\" To=\"0.84\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundGradientSelectedDisabled\" Storyboard.TargetProperty=\"Opacity\" To=\"0.55\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundGradientSelected\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundGradientSelectedDisabled\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Border SnapsToDevicePixels=\"true\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\" x:Name=\"border\">\r\n\r\n                        <Grid Margin=\"2,0,2,0\">\r\n                            <Rectangle x:Name=\"BackgroundGradientOver\" RadiusX=\"1\" RadiusY=\"1\" Stroke=\"{DynamicResource MouseOverBorderBrush}\" Opacity=\"0\" Fill=\"{DynamicResource MouseOverBrush}\"/>\r\n                            <Rectangle x:Name=\"BackgroundGradientSelectedDisabled\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" Fill=\"{DynamicResource ListItemSelectedBrush}\" Stroke=\"{DynamicResource ListItemSelectedBorderBrush}\"/>\r\n                            <Rectangle x:Name=\"BackgroundGradientSelected\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" Fill=\"{DynamicResource PressedBrush}\" Stroke=\"{DynamicResource PressedBorderBrush}\"/>\r\n                            <GridViewRowPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Margin=\"0,2,0,2\" VerticalAlignment=\"Stretch\" />\r\n                        </Grid>\r\n\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsSelected\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOff}\" x:Name=\"SelectedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\" x:Name=\"SelectedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsSelected\" Value=\"true\" />\r\n                                <Condition Property=\"Selector.IsSelectionActive\" Value=\"false\" />\r\n                            </MultiTrigger.Conditions>\r\n\r\n                        </MultiTrigger>\r\n\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource OutsideFontColor}\" />\r\n    </Style>\r\n\r\n    <Style x:Key=\"GridViewColumnHeaderGripper\" TargetType=\"{x:Type Thumb}\">\r\n        <Setter Property=\"Canvas.Right\" Value=\"-8.5\" />\r\n        <Setter Property=\"Width\" Value=\"18\" />\r\n        <Setter Property=\"Height\" Value=\"{Binding Path=ActualHeight, RelativeSource={RelativeSource TemplatedParent}}\" />\r\n        <Setter Property=\"Padding\" Value=\"0,3,0,4\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <Border Padding=\"{TemplateBinding Padding}\" Background=\"#00FFFFFF\">\r\n                        <Rectangle HorizontalAlignment=\"Center\" Width=\"0.5\">\r\n                            <Rectangle.Fill>\r\n                                <SolidColorBrush Color=\"{DynamicResource WhiteColor}\" />\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"{x:Type GridViewColumnHeader}\" TargetType=\"{x:Type GridViewColumnHeader}\">\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"Padding\" Value=\"2,0,2,0\" />\r\n        <Setter Property=\"Foreground\" Value=\"#FF042271\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"Padding\" Value=\"3\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type GridViewColumnHeader}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundOver\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundOver_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0.65\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundOver_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\" To=\"0.84\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgoundPressed_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0.65\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgoundPressed_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid Margin=\"0,1,0,1\">\r\n                        <Grid>\r\n\r\n                            <Border x:Name=\"BackgroundNorm\" BorderThickness=\"1\" CornerRadius=\"1.75\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\"/>\r\n                            <Border x:Name=\"BackgroundNorm_highlight\" Margin=\"1\" BorderBrush=\"{DynamicResource NormalHighlightBrush}\" BorderThickness=\"1,0,1,1\" CornerRadius=\"1\" Opacity=\"0.65\" />\r\n                            <Border x:Name=\"BackgroundOver\" BorderThickness=\"1\" CornerRadius=\"1.75\" Opacity=\"0\" Background=\"{DynamicResource MouseOverBrush}\" BorderBrush=\"{DynamicResource MouseOverBorderBrush}\"/>\r\n                            <Border x:Name=\"BackgroundOver_Highlight\" Margin=\"1\" BorderThickness=\"1,0,1,1\" CornerRadius=\"1\" Opacity=\"0\" BorderBrush=\"{DynamicResource MouseOverHighlightBrush}\"/>\r\n                            <Border x:Name=\"BackgroundPressed\" BorderThickness=\"1\" CornerRadius=\"1.75\" Opacity=\"0\" Background=\"{DynamicResource PressedBrush}\" BorderBrush=\"{DynamicResource PressedBorderBrush}\"/>\r\n                            <Border x:Name=\"BackgoundPressed_Highlight\" Margin=\"1\" BorderThickness=\"1,0,1,1\" CornerRadius=\"1\" Opacity=\"0\" BorderBrush=\"{DynamicResource PressedHighlightBrush}\"/>\r\n                            <ContentPresenter VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" RecognizesAccessKey=\"True\" Margin=\"2,2,2,2\" />\r\n                        </Grid>\r\n                        <Canvas>\r\n                            <Thumb x:Name=\"PART_HeaderGripper\" Style=\"{StaticResource GridViewColumnHeaderGripper}\" HorizontalAlignment=\"Stretch\" />\r\n                        </Canvas>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"Height\" Value=\"Auto\">\r\n                            <Setter Property=\"MinHeight\" Value=\"20\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"Role\" Value=\"Padding\">\r\n                            <Setter TargetName=\"PART_HeaderGripper\" Property=\"Visibility\" Value=\"Collapsed\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"Role\" Value=\"Floating\">\r\n                            <Setter TargetName=\"PART_HeaderGripper\" Property=\"Visibility\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Background\" Value=\"Yellow\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{StaticResource NuclearButtonFocusVisual}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource OutsideFontColor}\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"Padding\" Value=\"1\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundOver\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundOver_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0.65\" />\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundOver_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundChecked\" Storyboard.TargetProperty=\"Opacity\" To=\"0.84\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgoundChecked_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0.65\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundChecked\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgoundChecked_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\" To=\"0.84\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BackgoundPressed_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0.65\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BackgoundPressed_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n\r\n                    </ControlTemplate.Resources>\r\n                    <Grid x:Name=\"grid1\">\r\n                        <Border x:Name=\"BackgroundNorm\" BorderThickness=\"1\" CornerRadius=\"1.75\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\"/>\r\n                        <Border x:Name=\"BackgroundNorm_highlight\" Margin=\"1\" BorderBrush=\"{DynamicResource NormalHighlightBrush}\" BorderThickness=\"1,0,1,1\" CornerRadius=\"1\" Opacity=\"0.65\" />\r\n                        <Border x:Name=\"BackgroundChecked\" BorderThickness=\"1\" CornerRadius=\"1.75\" Opacity=\"0\" Background=\"{DynamicResource PressedBrush}\" BorderBrush=\"{DynamicResource PressedBorderBrush}\"/>\r\n                        <Border x:Name=\"BackgoundChecked_Highlight\" Margin=\"1\" BorderThickness=\"1,0,1,1\" CornerRadius=\"1\" Opacity=\"0\" BorderBrush=\"{DynamicResource PressedHighlightBrush}\"/>\r\n                        <Border x:Name=\"BackgroundOver\" BorderThickness=\"1\" CornerRadius=\"1.75\" Opacity=\"0\" Background=\"{DynamicResource MouseOverBrush}\" BorderBrush=\"{DynamicResource MouseOverBorderBrush}\"/>\r\n                        <Border x:Name=\"BackgroundOver_Highlight\" Margin=\"1\" BorderThickness=\"1,0,1,1\" CornerRadius=\"1\" Opacity=\"0\" BorderBrush=\"{DynamicResource MouseOverHighlightBrush}\"/>\r\n                        <Border x:Name=\"BackgroundPressed\" BorderThickness=\"1\" CornerRadius=\"1.75\" Opacity=\"0\" Background=\"{DynamicResource PressedBrush}\" BorderBrush=\"{DynamicResource PressedBorderBrush}\"/>\r\n                        <Border x:Name=\"BackgoundPressed_Highlight\" Margin=\"1\" BorderThickness=\"1,0,1,1\" CornerRadius=\"1\" Opacity=\"0\" BorderBrush=\"{DynamicResource PressedHighlightBrush}\"/>\r\n                        <Border x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"false\" Background=\"{DynamicResource DisabledBackgroundBrush}\" BorderBrush=\"{DynamicResource DisabledBorderBrush}\" BorderThickness=\"1\" Opacity=\"0\" />\r\n                        <ContentPresenter x:Name=\"contentPresenter\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" />\r\n                        <TextBlock Panel.ZIndex=\"1\" x:Name=\"DisabledOverlay\" Text=\"{TemplateBinding Content}\" Foreground=\"#FF8E96A2\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" Visibility=\"Collapsed\" />\r\n                        <Border x:Name=\"FocusVisualElement\" Margin=\"-1\" Grid.RowSpan=\"2\" BorderBrush=\"{DynamicResource FocusBrush}\" BorderThickness=\"1\" CornerRadius=\"2.75\" IsHitTestVisible=\"false\" Opacity=\"0\" />\r\n                    </Grid>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOff}\" x:Name=\"CheckedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOn}\" x:Name=\"CheckedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"#ADADAD\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"DisabledVisualElement\" Value=\"Visible\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"DisabledOverlay\" Value=\"Visible\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"contentPresenter\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Opacity\" TargetName=\"DisabledVisualElement\" Value=\"1\" />\r\n\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"ToolTip\">\r\n        <Setter Property=\"Background\" Value=\"#33000000\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Padding\" Value=\"3,0,3,0\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ToolTip\">\r\n                    <Border x:Name=\"Root\" Background=\"{TemplateBinding Background}\" BorderBrush=\"#19000000\" CornerRadius=\"3\">\r\n                        <Border Margin=\"-3,-3,3,3\" BorderBrush=\"#FF767676\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" Padding=\"4\">\r\n                            <Border.Resources>\r\n                                <Storyboard x:Key=\"Visible State\" />\r\n                                <Storyboard x:Key=\"Normal State\" />\r\n                            </Border.Resources>\r\n                            <Border.Background>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.004\" />\r\n                                    <GradientStop Color=\"#FFCDDCF0\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Border.Background>\r\n                            <ContentPresenter Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Cursor=\"{TemplateBinding Cursor}\" Margin=\"{TemplateBinding Padding}\" />\r\n                        </Border>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n</ResourceDictionary>\r\n"
  },
  {
    "path": "WpfToolkit/WPF.Themes/BureauBlue/Theme.xaml",
    "content": "﻿<!--\r\n// (c) Copyright Microsoft Corporation.\r\n// This source is subject to Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n-->\r\n\r\n<ResourceDictionary\r\n  xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n  xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n  xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n  mc:Ignorable=\"d\"\r\n  xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\">\r\n\r\n    <SolidColorBrush x:Key=\"OutsideFontColor\" Color=\"#FF000000\" />\r\n\r\n    <LinearGradientBrush x:Key=\"NormalBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FF8AAEDA\" Offset=\"0.521\" />\r\n        <GradientStop Color=\"#FFC6D6EC\" Offset=\"0.194\" />\r\n        <GradientStop Color=\"#FFB4C9E5\" Offset=\"0.811\" />\r\n        <GradientStop Color=\"#FFB7C8E0\" Offset=\"0.507\" />\r\n        <GradientStop Color=\"#FFD1DEF0\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"NormalBorderBrush\" EndPoint=\"0.5,0\" StartPoint=\"0.5,1\">\r\n        <GradientStop Color=\"#FF84B2D4\" />\r\n        <GradientStop Color=\"#FFADC7DE\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"NormalHighlightBrush\" Color=\"#FFFFFFFF\"/>\r\n    <LinearGradientBrush x:Key=\"MouseOverBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FFFEF3B5\" Offset=\"0.318\" />\r\n        <GradientStop Color=\"#FFFFEB70\" Offset=\"0.488\" />\r\n        <GradientStop Color=\"#FFFFD02E\" Offset=\"0.502\" />\r\n        <GradientStop Color=\"#FFFFD932\" Offset=\"0.834\" />\r\n        <GradientStop Color=\"#FFFFF48B\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"MouseOverBorderBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFEEE8CF\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FFC4AF8C\" Offset=\"0.536\" />\r\n        <GradientStop Color=\"#FFDCD1BF\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"MouseOverHighlightBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFFFFFFB\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FFFEF3B5\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"PressedBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFC3BCAE\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FFFDCE9D\" Offset=\"0.046\" />\r\n        <GradientStop Color=\"#FFFFA35B\" Offset=\"0.452\" />\r\n        <GradientStop Color=\"#FFFF8A2C\" Offset=\"0.461\" />\r\n        <GradientStop Color=\"#FFFF9F30\" Offset=\"0.724\" />\r\n        <GradientStop Color=\"#FFFFC472\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"PressedBorderBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FF8E8165\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FFC3BCAE\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"PressedHighlightBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.665\" />\r\n        <GradientStop Color=\"#FFC3BCAE\" Offset=\"0\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"DisabledBackgroundBrush\" Color=\"#A5FFFFFF\"/>\r\n    <SolidColorBrush x:Key=\"DisabledBorderBrush\" Color=\"#66FFFFFF\"/>\r\n    <SolidColorBrush x:Key=\"FocusBrush\" Color=\"#FFE99862\"/>\r\n\r\n    <LinearGradientBrush x:Key=\"ControlBackgroundBrush\" EndPoint=\"1.204,0.5\" StartPoint=\"0.056,0.5\">\r\n        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FFD4D7DB\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"ControlBorderBrush\" Color=\"#FFB1703C\"/>\r\n\r\n    <SolidColorBrush x:Key=\"GlyphBrush\" Color=\"#FF527DB5\"/>\r\n\r\n    <!-- CheckBox Brushes -->\r\n\r\n    <SolidColorBrush x:Key=\"CheckBoxBackgroundBrush\" Color=\"#FFF4F4F4\"/>\r\n    <SolidColorBrush x:Key=\"CheckBoxBorderBrush\" Color=\"#FF868686\"/>\r\n    <SolidColorBrush x:Key=\"CheckBoxInnerBoxBackgroundBrush\" Color=\"#FFCACFD5\"/>\r\n    <LinearGradientBrush x:Key=\"CheckBoxInnerBoxBorderBrush\" EndPoint=\"-0.007,-0.012\" StartPoint=\"0.915,0.92\">\r\n        <GradientStop Color=\"#FFE4E5E9\" />\r\n        <GradientStop Color=\"#FFA2ACB9\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"CheckBoxBackgroundFillBrush\" Color=\"#FFDEEAFA\"/>\r\n    <SolidColorBrush x:Key=\"CheckBoxMouseOverBrush\" Color=\"#FFFCE7AF\"/>\r\n    <LinearGradientBrush x:Key=\"CheckBoxPressBorderBrush\" EndPoint=\"0.055,0.119\" StartPoint=\"0.886,0.808\">\r\n        <GradientStop Color=\"#FFF4D9BE\" />\r\n        <GradientStop Color=\"#FFF28A27\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"CheckBoxInnerBoxGradientBrush\" StartPoint=\"0.238,0.228\" EndPoint=\"0.752,0.749\">\r\n        <GradientStop Color=\"#00F6F6F6\" Offset=\"0.254\" />\r\n        <GradientStop Color=\"#53F8F8F8\" Offset=\"0.54\" />\r\n        <GradientStop Color=\"#BFFFFFFF\" Offset=\"0.996\" />\r\n    </LinearGradientBrush>\r\n\r\n    <!-- RadioButton Brushes -->\r\n\r\n    <SolidColorBrush x:Key=\"RadioButtonBackgroundBrush\" Color=\"#FFEDEDEE\"/>\r\n    <SolidColorBrush x:Key=\"RadioButtonBorderBrush\" Color=\"#FF597AA5\"/>\r\n    <LinearGradientBrush x:Key=\"RadioButtonInnerCircleBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFC8CDD2\" />\r\n        <GradientStop Color=\"#FFF2F2F2\" Offset=\"0.531\" />\r\n        <GradientStop Color=\"#FFF5F5F5\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"RadioButtonInnerCircleBorderBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFB3B8BD\" Offset=\"0.004\" />\r\n        <GradientStop Color=\"#FFE0E0E0\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"RadioButtonMouseOverBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFE3DBA9\" />\r\n        <GradientStop Color=\"#FFFEF5DD\" Offset=\"0.531\" />\r\n        <GradientStop Color=\"#FFFEF5DD\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"RadioButtonMouseOverBorderBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFE3CF87\" Offset=\"0.004\" />\r\n        <GradientStop Color=\"#FFFCF0D3\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"RadioButtonPressBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFC8CDD2\" />\r\n        <GradientStop Color=\"#FFF2F2F2\" Offset=\"0.531\" />\r\n        <GradientStop Color=\"#FFF5F5F5\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"RadioButtonPressBorderBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFAC773F\" Offset=\"0.004\" />\r\n        <GradientStop Color=\"#FFC8B5A3\" Offset=\"0.987\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"RadioButtonCheckIconBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFFDDC8B\" Offset=\"0.013\" />\r\n        <GradientStop Color=\"#FFFDDC8B\" Offset=\"0.188\" />\r\n        <GradientStop Color=\"#FFF9952F\" Offset=\"0.491\" />\r\n        <GradientStop Color=\"#FFF9954A\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"RadioButtonCheckIconBorderBrush\" Color=\"#FFDA8229\"/>\r\n\r\n    <!-- ScrollBar RepeatButtonBrushes -->\r\n\r\n    <LinearGradientBrush x:Key=\"ScrollBarRepeatButtonBrush\" EndPoint=\"0.5,0\" StartPoint=\"0.5,1\">\r\n        <GradientStop Color=\"#FFF1F6FE\" Offset=\"0.5\" />\r\n        <GradientStop Color=\"#FFC7D9F1\" Offset=\"0.513\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"ScrollBarRepeatButtonBorderBrush\" Color=\"#FF8C97A5\"/>\r\n    <LinearGradientBrush x:Key=\"ScrollBarRepeatButtonPressedBrush\" EndPoint=\"0.5,0\" StartPoint=\"0.5,1\">\r\n        <GradientStop Color=\"#FFF1F6FE\" Offset=\"0.5\" />\r\n        <GradientStop Color=\"#FFD1D6DD\" Offset=\"0.513\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"ScrollBarRepeatButtonPressedBorderBrush\" Color=\"#FF19598A\"/>\r\n\r\n    <!-- ScrollBar ThumbBrushes -->\r\n\r\n    <LinearGradientBrush x:Key=\"ScrollBarThumbBrush\" EndPoint=\"-0.062,0.5\" StartPoint=\"1.062,0.5\">\r\n        <GradientStop Color=\"#FFD1DBE6\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FFD1DAE4\" Offset=\"0.5\" />\r\n        <GradientStop Color=\"#FFE6E9F0\" Offset=\"0.513\" />\r\n        <GradientStop Color=\"#FFE8E9E9\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"ScrollBarThumbBorderBrush\" Color=\"#FF606F94\"/>\r\n    <LinearGradientBrush x:Key=\"ScrollBarThumbMouseOverBrush\" EndPoint=\"-0.062,0.5\" StartPoint=\"1.062,0.5\">\r\n        <GradientStop Color=\"#FFB4D1F7\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FFAACBF6\" Offset=\"0.5\" />\r\n        <GradientStop Color=\"#FFCADFFA\" Offset=\"0.513\" />\r\n        <GradientStop Color=\"#FFBED0E8\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"ScrollBarThumbMouseOverBorderBrush\" Color=\"#FF3C6EB0\"/>\r\n    <LinearGradientBrush x:Key=\"ScrollBarThumbPressedBrush\" EndPoint=\"-0.062,0.5\" StartPoint=\"1.062,0.5\">\r\n        <GradientStop Color=\"#FFB4D1F7\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FF6EA6F0\" Offset=\"0.5\" />\r\n        <GradientStop Color=\"#FFA4C7F6\" Offset=\"0.513\" />\r\n        <GradientStop Color=\"#FF9CBBE5\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"ScrollBarThumbPressedBorderBrush\" Color=\"#FF17498A\"/>\r\n\r\n    <!-- ListItem Brushes -->\r\n\r\n    <LinearGradientBrush x:Key=\"ListItemSelectedBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.046\" />\r\n        <GradientStop Color=\"#FFD7E0EA\" Offset=\"0.194\" />\r\n        <GradientStop Color=\"#FFBCC5D5\" Offset=\"0.507\" />\r\n        <GradientStop Color=\"#FFA4ADBB\" Offset=\"0.521\" />\r\n        <GradientStop Color=\"#FFBAC1CF\" Offset=\"0.811\" />\r\n        <GradientStop Color=\"#FFE3E4E6\" Offset=\"0.982\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"ListItemSelectedBorderBrush\" EndPoint=\"0.5,0\" StartPoint=\"0.5,1\">\r\n        <GradientStop Color=\"#FF8B8B8B\" />\r\n        <GradientStop Color=\"#FFADADAD\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <!-- Expander ToggleButton Brushes -->\r\n    <LinearGradientBrush x:Key=\"ExpanderToggleButtonBrush\" EndPoint=\"0.293,0.43\" StartPoint=\"0.742,0.43\">\r\n        <GradientStop Color=\"#FFD6E8FF\" />\r\n        <GradientStop Color=\"#FFE2EEFF\" Offset=\"0.539\" />\r\n        <GradientStop Color=\"#FFD6E8FF\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"ExpanderToggleButtonBottomBrush\" Color=\"#FFADD1FF\"/>\r\n    <LinearGradientBrush x:Key=\"ExpanderToggleButtonHoverBrush\" EndPoint=\"0.667,0.528\" StartPoint=\"0.266,0.528\">\r\n        <GradientStop Color=\"#FFE3EFFF\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.548\" />\r\n        <GradientStop Color=\"#FFE3EFFF\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <SolidColorBrush x:Key=\"ExpanderToggleArrow2Stroke\" Color=\"#FF567DB1\"/>\r\n    <SolidColorBrush x:Key=\"ExpanderToggleArrowStroke\" Color=\"#FF567DB1\"/>\r\n\r\n    <!-- ProgressBar Brushes -->\r\n\r\n    <LinearGradientBrush x:Key=\"ProgressBarIndicatorBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFC6D6EC\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FFBDD6FF\" Offset=\"0.502\" />\r\n        <GradientStop Color=\"#FF71A7FD\" Offset=\"0.522\" />\r\n        <GradientStop Color=\"#FF94BDFD\" Offset=\"0.763\" />\r\n        <GradientStop Color=\"#FFA9CAFF\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <!-- TabControlBrushes -->\r\n\r\n    <SolidColorBrush x:Key=\"TabControlHeaderBrush\" Color=\"#FFBFDBFF\"/>\r\n    <SolidColorBrush x:Key=\"TabControlContentBrush\" Color=\"#FFE0EAF6\"/>\r\n    <SolidColorBrush x:Key=\"TabControlContentBorderBrush\" Color=\"#FF9ABBE6\"/>\r\n\r\n    <!-- TabItemBrushes -->\r\n\r\n    <RadialGradientBrush x:Key=\"TabItemHoverBrush\" GradientOrigin=\"0.503,1.06\">\r\n        <RadialGradientBrush.RelativeTransform>\r\n            <TransformGroup>\r\n                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2.06\" ScaleY=\"2.418\" />\r\n                <SkewTransform CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                <RotateTransform CenterX=\"0.5\" CenterY=\"0.5\" Angle=\"-180\" />\r\n                <TranslateTransform X=\"0\" Y=\"0.315\" />\r\n            </TransformGroup>\r\n        </RadialGradientBrush.RelativeTransform>\r\n        <GradientStop Color=\"#00FFFFFF\" Offset=\"0.362\" />\r\n        <GradientStop Color=\"#AEE8E6E6\" Offset=\"0.496\" />\r\n        <GradientStop Color=\"#F2E7D39C\" Offset=\"0.629\" />\r\n    </RadialGradientBrush>\r\n    <SolidColorBrush x:Key=\"TabItemHoverBorderBrush\" Color=\"#FFDDEFFF\"/>\r\n    <SolidColorBrush x:Key=\"TabItemHoverHighlightBrush\" Color=\"#FF9FBCF0\"/>\r\n    <LinearGradientBrush x:Key=\"TabItemSelectedBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFEFF6FE\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FFE0EAF6\" Offset=\"0.384\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"TabItemSelectedBorderBrush\" Color=\"#FFF3F8FF\"/>\r\n    <LinearGradientBrush x:Key=\"TabItemBorderTopBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,-0.5\">\r\n        <GradientStop Color=\"#FFECF9FA\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FFB4E0F4\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"TabItemHighlightTopBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFF3F8FF\" Offset=\"0\" />\r\n        <GradientStop Color=\"#D8ECF8FC\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"TabItemBorderTop2Brush\" Color=\"#FF9ABBE6\"/>\r\n    <LinearGradientBrush x:Key=\"TabItemFocusBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#99F7C53B\" Offset=\"0\" />\r\n        <GradientStop Color=\"#99F2B93F\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <!-- SliderThumbBrushes -->\r\n    <SolidColorBrush x:Key=\"SliderThumbBorderBrush\" Color=\"#FF496FA2\"/>\r\n    <SolidColorBrush x:Key=\"SliderThumbBrush\" Color=\"#FFC1C1C1\"/>\r\n\r\n    <!-- SliderBrushes -->\r\n    <LinearGradientBrush x:Key=\"SliderBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FF324D70\" Offset=\"0.493\" />\r\n        <GradientStop Color=\"#FF6A8BB6\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <Color x:Key=\"BlackColor\">#FF000000</Color>\r\n    <Color x:Key=\"WhiteColor\">#FFFFFFFF</Color>\r\n\r\n    <SolidColorBrush x:Key=\"DisabledForegroundBrush\" Color=\"#888\" />\r\n\r\n    <!-- TextControlsBrushes-->\r\n    <LinearGradientBrush x:Key=\"TextControlBorderBrush\"  EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFABAEB3\"/>\r\n        <GradientStop Color=\"#FFE2E8EE\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <SolidColorBrush x:Key=\"WindowBackgroundBrush\" Color=\"#FFF\" />\r\n\r\n    <Style x:Key=\"NuclearButtonFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Border>\r\n                        <Rectangle Margin=\"2\" Stroke=\"#60000000\" StrokeThickness=\"1\" StrokeDashArray=\"1 2\" />\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n\r\n    <Style TargetType=\"{x:Type Button}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource NuclearButtonFocusVisual}\" />\r\n        <Setter Property=\"Foreground\" Value=\"#FF042271\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"Padding\" Value=\"3\" />\r\n\r\n<Setter Property=\"Template\" Value=\"{DynamicResource ButtonTemplate}\" />\r\n    </Style>\r\n    \r\n    <ControlTemplate x:Key=\"ButtonTemplate\" TargetType=\"{x:Type Button}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundOver\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundOver_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0.65\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundOver_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\" To=\"0.84\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgoundPressed_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0.65\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgoundPressed_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"DisabledOn\">\r\n                            <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                <DiscreteObjectKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"{x:Static Visibility.Visible}\" />\r\n                            </ObjectAnimationUsingKeyFrames>\r\n                            <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"DisabledOverlay\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                <DiscreteObjectKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"{x:Static Visibility.Visible}\" />\r\n                            </ObjectAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid x:Name=\"Grid\">\r\n                        <Border x:Name=\"BackgroundNorm\" BorderThickness=\"1\" CornerRadius=\"1.75\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\"/>\r\n                        <Border x:Name=\"BackgroundNorm_highlight\" Margin=\"1\" BorderBrush=\"{DynamicResource NormalHighlightBrush}\" BorderThickness=\"1,0,1,1\" CornerRadius=\"1\" Opacity=\"0.65\" />\r\n                        <Border x:Name=\"BackgroundOver\" BorderThickness=\"1\" CornerRadius=\"1.75\" Opacity=\"0\" Background=\"{DynamicResource MouseOverBrush}\" BorderBrush=\"{DynamicResource MouseOverBorderBrush}\"/>\r\n                        <Border x:Name=\"BackgroundOver_Highlight\" Margin=\"1\" BorderThickness=\"1,0,1,1\" CornerRadius=\"1\" Opacity=\"0\" BorderBrush=\"{DynamicResource MouseOverHighlightBrush}\"/>\r\n                        <Border x:Name=\"BackgroundPressed\" BorderThickness=\"1\" CornerRadius=\"1.75\" Opacity=\"0\" Background=\"{DynamicResource PressedBrush}\" BorderBrush=\"{DynamicResource PressedBorderBrush}\"/>\r\n                        <Border x:Name=\"BackgoundPressed_Highlight\" Margin=\"1\" BorderThickness=\"1,0,1,1\" CornerRadius=\"1\" Opacity=\"0\" BorderBrush=\"{DynamicResource PressedHighlightBrush}\"/>\r\n                        <Border x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"false\" Background=\"{DynamicResource DisabledBackgroundBrush}\" BorderBrush=\"{DynamicResource DisabledBorderBrush}\" BorderThickness=\"1\" Opacity=\"0\" />\r\n\r\n                        <ContentPresenter x:Name=\"contentPresenter\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" />\r\n                        <TextBlock Panel.ZIndex=\"1\" x:Name=\"DisabledOverlay\" Text=\"{TemplateBinding Content}\" Foreground=\"#FF8E96A2\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" Visibility=\"Collapsed\" />\r\n                        <Border x:Name=\"FocusVisualElement\" Margin=\"-1\" BorderBrush=\"{DynamicResource FocusBrush}\" BorderThickness=\"1\" CornerRadius=\"2.75\" IsHitTestVisible=\"false\" Opacity=\"0\" />\r\n                        <Border x:Name=\"DefaultBorder\" Margin=\"-1\" BorderBrush=\"{DynamicResource FocusBrush}\" BorderThickness=\"1\" CornerRadius=\"2.75\" IsHitTestVisible=\"false\" Opacity=\"0\" />\r\n                    </Grid>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsDefault\" Value=\"True\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"DefaultBorder\" Value=\"1\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"FocusedOn_BeginStoryboard\" Storyboard=\"{StaticResource FocusedOn}\" />\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"FocusedOff_BeginStoryboard\" Storyboard=\"{StaticResource FocusedOff}\" />\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"FocusedOff_BeginStoryboard1\" Storyboard=\"{StaticResource FocusedOff}\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"FocusedOn_BeginStoryboard1\" Storyboard=\"{StaticResource FocusedOn}\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"true\" />\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource DisabledOn}\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                            <Setter Property=\"Opacity\" TargetName=\"DisabledVisualElement\" Value=\"1\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n\r\n    <Style x:Key=\"RadioButtonFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Border>\r\n                        <Rectangle Margin=\"15,0,0,0\" Stroke=\"#60000000\" StrokeThickness=\"1\" StrokeDashArray=\"1 2\" />\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"CheckBoxFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Border>\r\n                        <Rectangle Margin=\"15,0,0,0\" Stroke=\"#60000000\" StrokeThickness=\"1\" StrokeDashArray=\"1 2\" />\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n\r\n    <Style TargetType=\"{x:Type CheckBox}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource CheckBoxFocusVisual}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource OutsideFontColor}\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"Padding\" Value=\"4,1,0,0\" />\r\n<Setter Property=\"Template\" Value=\"{DynamicResource CheckBoxTemplate}\" />\r\n    </Style>\r\n        \r\n<ControlTemplate x:Key=\"CheckBoxTemplate\" TargetType=\"{x:Type CheckBox}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BoxOver\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BoxOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <ColorAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BoxOver\" Storyboard.TargetProperty=\"(Shape.Stroke).(GradientBrush.GradientStops)[1].(GradientStop.Color)\" To=\"#FFF28A27\" />\r\n                            <ColorAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BoxOver\" Storyboard.TargetProperty=\"(Shape.Stroke).(GradientBrush.GradientStops)[0].(GradientStop.Color)\" To=\"#FFF4D9BE\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BoxOver\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundFill\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <ColorAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BoxOver\" Storyboard.TargetProperty=\"(Shape.Stroke).(GradientBrush.GradientStops)[1].(GradientStop.Color)\" To=\"#FFFDDA81\" />\r\n                            <ColorAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BoxOver\" Storyboard.TargetProperty=\"(Shape.Stroke).(GradientBrush.GradientStops)[0].(GradientStop.Color)\" To=\"#FFFCE7AF\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BoxOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundFill\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"DisabledOn\">\r\n                            <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                <DiscreteObjectKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"{x:Static Visibility.Visible}\" />\r\n                            </ObjectAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BoxPress\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                            <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                <DiscreteObjectKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"{x:Static Visibility.Visible}\" />\r\n                            </ObjectAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BoxPress\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                <DiscreteObjectKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"{x:Static Visibility.Collapsed}\" />\r\n                            </ObjectAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"IndeterminateOn\">\r\n\r\n                            <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"IndeterminateIcon\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                <DiscreteObjectKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"{x:Static Visibility.Visible}\" />\r\n                            </ObjectAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"IndeterminateOff\">\r\n\r\n                            <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"IndeterminateIcon\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                <DiscreteObjectKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"{x:Static Visibility.Collapsed}\" />\r\n                            </ObjectAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusedVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusedVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <BulletDecorator Background=\"Transparent\">\r\n                        <BulletDecorator.Bullet>\r\n                            <Grid>\r\n                                <Rectangle x:Name=\"Background\" Margin=\"1\" Width=\"13\" Height=\"13\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{DynamicResource CheckBoxBackgroundBrush}\" Stroke=\"{DynamicResource CheckBoxBorderBrush}\" StrokeThickness=\"1\" />\r\n                                <Rectangle x:Name=\"BoxFill\" Width=\"9\" Height=\"9\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{DynamicResource CheckBoxInnerBoxBackgroundBrush}\" StrokeThickness=\"1\" Stroke=\"{DynamicResource CheckBoxInnerBoxBorderBrush}\"/>\r\n                                <Rectangle x:Name=\"BackgroundFill\" Margin=\"1\" Width=\"13\" Height=\"13\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{DynamicResource CheckBoxBackgroundFillBrush}\" Stroke=\"#FF5577A3\" StrokeThickness=\"1\" Opacity=\"0\" />\r\n                                <Rectangle x:Name=\"BoxOver\" Margin=\"3\" Width=\"9\" Height=\"9\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{DynamicResource CheckBoxMouseOverBrush}\" StrokeThickness=\"1\" Opacity=\"0\">\r\n                                    <Rectangle.Stroke>\r\n                                        <LinearGradientBrush EndPoint=\"0.055,0.119\" StartPoint=\"0.886,0.808\">\r\n                                            <GradientStop Color=\"#FFFCE7AF\" />\r\n                                            <GradientStop Color=\"#FFFDDA81\" Offset=\"1\" />\r\n                                        </LinearGradientBrush>\r\n                                    </Rectangle.Stroke>\r\n                                </Rectangle>\r\n                                <Rectangle x:Name=\"BoxPress\" Margin=\"3\" Width=\"9\" Height=\"9\" RadiusX=\"0\" RadiusY=\"0\" StrokeThickness=\"1\" Opacity=\"0\" Stroke=\"{DynamicResource CheckBoxPressBorderBrush}\"/>\r\n                                <Rectangle x:Name=\"BoxGradient\" Width=\"7\" Height=\"7\" RadiusX=\"0\" RadiusY=\"0\" StrokeThickness=\"1\" Fill=\"{DynamicResource CheckBoxInnerBoxGradientBrush}\"/>\r\n                                <Rectangle x:Name=\"IndeterminateIcon\" Width=\"5\" Height=\"2\" Fill=\"{DynamicResource GlyphBrush}\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Visibility=\"Collapsed\" />\r\n                                <Path x:Name=\"CheckIcon\" Margin=\"0,3.333,3.833,0\" Width=\"7\" Height=\"9\" Fill=\"{DynamicResource GlyphBrush}\" Stretch=\"Fill\" VerticalAlignment=\"Top\" HorizontalAlignment=\"Right\" Data=\"M103.78572,598.96112 L105.09846,597.5661 L107.00806,600.16229 C107.00806,600.16229 109.91004,592.74463 109.91004,592.74463 C109.91004,592.74463 111.74678,593.79761 111.74678,593.79761 C111.74678,593.79761 107.88566,602.75848 107.88566,602.75848 L106.60118,602.75848 z\" Visibility=\"Collapsed\" />\r\n                                <Rectangle x:Name=\"FocusedVisualElement\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{DynamicResource FocusBrush}\" StrokeThickness=\"1\" Opacity=\"0\" />\r\n                                <Rectangle x:Name=\"DisabledVisualElement\" Margin=\"1\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{DynamicResource DisabledBackgroundBrush}\" Visibility=\"Collapsed\" />\r\n                            </Grid>\r\n                        </BulletDecorator.Bullet>\r\n                        <ContentPresenter Grid.Column=\"1\" x:Name=\"contentPresenter\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" />\r\n                    </BulletDecorator>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsChecked\" Value=\"True\" />\r\n                                <Condition Property=\"IsThreeState\" Value=\"True\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"CheckedOff_BeginStoryboard\" Storyboard=\"{StaticResource CheckedOff}\" />\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"CheckedOn_BeginStoryboard\" Storyboard=\"{StaticResource CheckedOn}\" />\r\n                            </MultiTrigger.ExitActions>\r\n                        </MultiTrigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsChecked\" Value=\"{x:Null}\" />\r\n                                <Condition Property=\"IsThreeState\" Value=\"True\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource IndeterminateOn}\" />\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource IndeterminateOff}\" />\r\n                            </MultiTrigger.ExitActions>\r\n                            <Setter Property=\"Opacity\" TargetName=\"CheckIcon\" Value=\"0\" />\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"CheckedOn_BeginStoryboard2\" Storyboard=\"{StaticResource CheckedOff}\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"CheckedOn_BeginStoryboard1\" Storyboard=\"{StaticResource CheckedOn}\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource DisabledOn}\" />\r\n                            </Trigger.EnterActions>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n\r\n                </ControlTemplate>\r\n\r\n    <Style TargetType=\"{x:Type RadioButton}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource RadioButtonFocusVisual}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource OutsideFontColor}\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"Padding\" Value=\"4,1,0,0\" />\r\n\r\n<Setter Property=\"Template\" Value=\"{DynamicResource RadioButtonTemplate}\" />\r\n    </Style>\r\n        \r\n<ControlTemplate x:Key=\"RadioButtonTemplate\" TargetType=\"{x:Type RadioButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"CircleOver\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"CircleOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"CirclePress\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"CirclePress\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"DisabledOn\" />\r\n                        <Storyboard x:Key=\"CheckedOn\">\r\n                            <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                <DiscreteObjectKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"{x:Static Visibility.Visible}\" />\r\n                            </ObjectAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOff\">\r\n                            <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                <DiscreteObjectKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"{x:Static Visibility.Collapsed}\" />\r\n                            </ObjectAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusedVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusedVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <BulletDecorator Background=\"Transparent\">\r\n                        <BulletDecorator.Bullet>\r\n                            <Grid>\r\n                                <Ellipse x:Name=\"Background\" Margin=\"1\" Width=\"14\" Height=\"14\" Fill=\"{DynamicResource RadioButtonBackgroundBrush}\" Stroke=\"{DynamicResource RadioButtonBorderBrush}\" StrokeThickness=\"1\" />\r\n                                <Ellipse x:Name=\"CircleFill\" Margin=\"3.045,3.157,2.955,2.843\" StrokeThickness=\"1\" Fill=\"{DynamicResource RadioButtonInnerCircleBrush}\" Stroke=\"{DynamicResource RadioButtonInnerCircleBorderBrush}\"/>\r\n                                <Ellipse x:Name=\"CircleOver\" Margin=\"2.847,2.847,3.153,3.153\" StrokeThickness=\"1\" Opacity=\"0\" Fill=\"{DynamicResource RadioButtonMouseOverBrush}\" Stroke=\"{DynamicResource RadioButtonMouseOverBorderBrush}\">\r\n                                </Ellipse>\r\n                                <Ellipse x:Name=\"CirclePress\" Margin=\"2.73,2.73,3.27,3.27\" StrokeThickness=\"1\" Opacity=\"0\" Fill=\"{DynamicResource RadioButtonPressBrush}\" Stroke=\"{DynamicResource RadioButtonPressBorderBrush}\"/>\r\n                                <Ellipse x:Name=\"CheckIcon\" Margin=\"4.47,4.498,3.53,3.502\" StrokeThickness=\"1\" Visibility=\"Collapsed\" Stroke=\"{DynamicResource RadioButtonCheckIconBorderBrush}\" Fill=\"{DynamicResource RadioButtonCheckIconBrush}\">\r\n                                </Ellipse>\r\n                                <Ellipse x:Name=\"DisabledVisualElement\" Width=\"14\" Height=\"14\" Opacity=\"0.35\" Visibility=\"Visible\" >\r\n                                    <Ellipse.Stroke>\r\n                                        <SolidColorBrush Color=\"{DynamicResource WhiteColor}\"/>\r\n                                    </Ellipse.Stroke>\r\n                                    <Ellipse.Fill>\r\n                                        <SolidColorBrush Color=\"{DynamicResource WhiteColor}\"/>\r\n                                    </Ellipse.Fill>\r\n                                </Ellipse>\r\n                                <Ellipse x:Name=\"FocusedVisualElement\" Width=\"16\" Height=\"16\" Stroke=\"{DynamicResource FocusBrush}\" StrokeThickness=\"1\" IsHitTestVisible=\"false\" Opacity=\"0\" />\r\n                            </Grid>\r\n                        </BulletDecorator.Bullet>\r\n                        <ContentPresenter Grid.Column=\"1\" x:Name=\"contentPresenter\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" />\r\n                    </BulletDecorator>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"false\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOn}\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOff}\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource DisabledOn}\" />\r\n                            </Trigger.EnterActions>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                        </Trigger>\r\n\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n\r\n    <Style x:Key=\"NuclearRepeatButton\" d:IsControlPart=\"True\" TargetType=\"{x:Type RepeatButton}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Rectangle x:Name=\"Background\" RadiusX=\"0.5\" RadiusY=\"0.5\" StrokeThickness=\"1\" Stroke=\"{DynamicResource ScrollBarRepeatButtonBorderBrush}\" Opacity=\"0\" Fill=\"{DynamicResource ScrollBarRepeatButtonBrush}\"/>\r\n                        <Rectangle x:Name=\"BackgroundPressed\" RadiusX=\"0.5\" RadiusY=\"0.5\" StrokeThickness=\"1\" Stroke=\"{DynamicResource ScrollBarRepeatButtonPressedBorderBrush}\" Opacity=\"0\" Fill=\"{DynamicResource ScrollBarRepeatButtonPressedBrush}\"/>\r\n                        <Rectangle x:Name=\"Highlight\" Margin=\"1\" RadiusX=\"0.5\" RadiusY=\"0.5\" Stroke=\"#99FFFFFF\" StrokeThickness=\"1\" Opacity=\"0\" IsHitTestVisible=\"false\" />\r\n                        <Rectangle x:Name=\"DisabledElement\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{DynamicResource DisabledBackgroundBrush}\" Opacity=\"0\" />\r\n                        <ContentPresenter HorizontalAlignment=\"Center\" x:Name=\"ContentPresenter\" VerticalAlignment=\"Center\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" ContentTemplateSelector=\"{TemplateBinding ContentTemplateSelector}\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\" />\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" x:Name=\"HoverOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                            <Setter Property=\"Opacity\" TargetName=\"ContentPresenter\" Value=\"0.5\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n\r\n    <Style x:Key=\"NuclearThumbStyle\" d:IsControlPart=\"True\" TargetType=\"{x:Type Thumb}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundMouseOver\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundMouseOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid Margin=\"0,0,0,0\" x:Name=\"ThumbVisual\">\r\n                        <Rectangle x:Name=\"Background\" RadiusX=\"1.5\" RadiusY=\"1.5\" StrokeThickness=\"1\" Stroke=\"{DynamicResource ScrollBarThumbBorderBrush}\" Fill=\"{DynamicResource ScrollBarThumbBrush}\"/>\r\n                        <Rectangle x:Name=\"BackgroundMouseOver\" RadiusX=\"1.5\" RadiusY=\"1.5\" StrokeThickness=\"1\" Stroke=\"{DynamicResource ScrollBarThumbMouseOverBorderBrush}\" Opacity=\"0\" Fill=\"{DynamicResource ScrollBarThumbMouseOverBrush}\"/>\r\n                        <Rectangle x:Name=\"BackgroundPressed\" RadiusX=\"1.5\" RadiusY=\"1.5\" StrokeThickness=\"1\" Stroke=\"{DynamicResource ScrollBarThumbPressedBorderBrush}\" Opacity=\"0\" Fill=\"{DynamicResource ScrollBarThumbPressedBrush}\"/>\r\n                        <Path Margin=\"0,-6,0,0\" Width=\"11\" Height=\"1\" Stretch=\"Fill\" Stroke=\"#FF848485\" StrokeThickness=\"1\" Data=\"M4.8333325,7.2499995 L12.012101,7.2499995\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\">\r\n                            <Path.Fill>\r\n                                <LinearGradientBrush EndPoint=\"-0.062,0.5\" StartPoint=\"1.062,0.5\">\r\n                                    <GradientStop Color=\"#FFC8C9CC\" Offset=\"0.487\" />\r\n                                    <GradientStop Color=\"#FFF0F0F0\" Offset=\"0.518\" />\r\n                                </LinearGradientBrush>\r\n                            </Path.Fill>\r\n                        </Path>\r\n                        <Path Margin=\"0,-2,0,0\" Width=\"11\" Height=\"1\" Stretch=\"Fill\" Stroke=\"#FF848485\" StrokeThickness=\"1\" Data=\"M4.8333325,7.2499995 L12.012101,7.2499995\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\">\r\n                            <Path.Fill>\r\n                                <LinearGradientBrush EndPoint=\"-0.062,0.5\" StartPoint=\"1.062,0.5\">\r\n                                    <GradientStop Color=\"#FFC8C9CC\" Offset=\"0.487\" />\r\n                                    <GradientStop Color=\"#FFF0F0F0\" Offset=\"0.518\" />\r\n                                </LinearGradientBrush>\r\n                            </Path.Fill>\r\n                        </Path>\r\n                        <Path Margin=\"0,0,0,-2\" Width=\"11\" Height=\"1\" Stretch=\"Fill\" Stroke=\"#FF848485\" StrokeThickness=\"1\" Data=\"M4.8333325,7.2499995 L12.012101,7.2499995\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\">\r\n                            <Path.Fill>\r\n                                <LinearGradientBrush EndPoint=\"-0.062,0.5\" StartPoint=\"1.062,0.5\">\r\n                                    <GradientStop Color=\"#FFC8C9CC\" Offset=\"0.487\" />\r\n                                    <GradientStop Color=\"#FFF0F0F0\" Offset=\"0.518\" />\r\n                                </LinearGradientBrush>\r\n                            </Path.Fill>\r\n                        </Path>\r\n                        <Path Margin=\"0,0,0,-6\" Width=\"11\" Height=\"1\" Stretch=\"Fill\" Stroke=\"#FF848485\" StrokeThickness=\"1\" Data=\"M4.8333325,7.2499995 L12.012101,7.2499995\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\">\r\n                            <Path.Fill>\r\n                                <LinearGradientBrush EndPoint=\"-0.062,0.5\" StartPoint=\"1.062,0.5\">\r\n                                    <GradientStop Color=\"#FFC8C9CC\" Offset=\"0.487\" />\r\n                                    <GradientStop Color=\"#FFF0F0F0\" Offset=\"0.518\" />\r\n                                </LinearGradientBrush>\r\n                            </Path.Fill>\r\n                        </Path>\r\n                        <Rectangle x:Name=\"Highlight\" Margin=\"1\" RadiusX=\"0.5\" RadiusY=\"0.5\" StrokeThickness=\"1\" Opacity=\"0.6\" IsHitTestVisible=\"false\" Stroke=\"{DynamicResource NormalHighlightBrush}\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\" />\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"ThumbVisual\" Value=\"0\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsDragging\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"NuclearScrollRepeatButtonStyle\" d:IsControlPart=\"True\" TargetType=\"{x:Type RepeatButton}\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"false\" />\r\n        <Setter Property=\"Focusable\" Value=\"false\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n                    <Grid>\r\n                        <Rectangle Fill=\"{TemplateBinding Background}\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type ScrollBar}\">\r\n        <Setter Property=\"Stylus.IsFlicksEnabled\" Value=\"false\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ScrollBar}\">\r\n                    <Grid x:Name=\"GridRoot\" Width=\"{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition MaxHeight=\"18\" />\r\n                            <RowDefinition Height=\"0.00001*\" />\r\n                            <RowDefinition MaxHeight=\"18\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Rectangle Grid.RowSpan=\"4\" RadiusX=\"0\" RadiusY=\"0\" StrokeThickness=\"1\" Opacity=\"1\" >\r\n                            <Rectangle.Stroke>\r\n                                <SolidColorBrush Color=\"#FFF0F0F0\"/>\r\n                            </Rectangle.Stroke>\r\n                            <Rectangle.Fill>\r\n                                <SolidColorBrush Color=\"#FFEFEFEF\"/>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                        <RepeatButton x:Name=\"DecreaseRepeat\" Style=\"{DynamicResource NuclearRepeatButton}\" Command=\"ScrollBar.LineUpCommand\">\r\n                            <Grid>\r\n                                <Path Data=\"F1 M 541.537,173.589L 531.107,173.589L 536.322,167.49L 541.537,173.589 Z \" Height=\"6\" Width=\"10\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Stretch=\"Uniform\" IsHitTestVisible=\"False\">\r\n                                    <Path.Fill>\r\n                                        <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                            <GradientStop Color=\"#FF5E6D91\" />\r\n                                            <GradientStop Color=\"#FF2B3B60\" Offset=\"1\" />\r\n                                        </LinearGradientBrush>\r\n                                    </Path.Fill>\r\n                                </Path>\r\n                            </Grid>\r\n                        </RepeatButton>\r\n\r\n                        <Track Grid.Row=\"1\" x:Name=\"PART_Track\" Orientation=\"Vertical\" IsDirectionReversed=\"true\">\r\n                            <Track.Thumb>\r\n                                <Thumb Style=\"{DynamicResource NuclearThumbStyle}\" />\r\n                            </Track.Thumb>\r\n                            <Track.IncreaseRepeatButton>\r\n                                <RepeatButton x:Name=\"PageUp\" Style=\"{DynamicResource NuclearScrollRepeatButtonStyle}\" Command=\"ScrollBar.PageDownCommand\" />\r\n                            </Track.IncreaseRepeatButton>\r\n                            <Track.DecreaseRepeatButton>\r\n                                <RepeatButton x:Name=\"PageDown\" Style=\"{DynamicResource NuclearScrollRepeatButtonStyle}\" Command=\"ScrollBar.PageUpCommand\" />\r\n                            </Track.DecreaseRepeatButton>\r\n                        </Track>\r\n\r\n                        <RepeatButton Grid.Row=\"2\" x:Name=\"IncreaseRepeat\" Style=\"{DynamicResource NuclearRepeatButton}\" Command=\"ScrollBar.LineDownCommand\">\r\n                            <Grid>\r\n                                <Path Data=\"F1 M 531.107,321.943L 541.537,321.943L 536.322,328.042L 531.107,321.943 Z \" Grid.Row=\"4\" Height=\"6\" Width=\"10\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Stretch=\"Uniform\" IsHitTestVisible=\"False\">\r\n                                    <Path.Fill>\r\n                                        <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                            <GradientStop Color=\"#FF5E6D91\" Offset=\"0.004\" />\r\n                                            <GradientStop Color=\"#FF2B3B60\" Offset=\"0.996\" />\r\n                                        </LinearGradientBrush>\r\n                                    </Path.Fill>\r\n                                </Path>\r\n                            </Grid>\r\n                        </RepeatButton>\r\n                    </Grid>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"Orientation\" Value=\"Horizontal\">\r\n\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"GridRoot\">\r\n                                <Setter.Value>\r\n                                    <RotateTransform Angle=\"-90\" />\r\n                                </Setter.Value>\r\n                            </Setter>\r\n\r\n                            <Setter TargetName=\"PART_Track\" Property=\"Orientation\" Value=\"Vertical\" />\r\n\r\n                            <Setter Property=\"Command\" Value=\"ScrollBar.LineLeftCommand\" TargetName=\"DecreaseRepeat\" />\r\n                            <Setter Property=\"Command\" Value=\"ScrollBar.LineRightCommand\" TargetName=\"IncreaseRepeat\" />\r\n                            <Setter Property=\"Command\" Value=\"ScrollBar.PageLeftCommand\" TargetName=\"PageDown\" />\r\n                            <Setter Property=\"Command\" Value=\"ScrollBar.PageRightCommand\" TargetName=\"PageUp\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type ScrollViewer}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ScrollViewer}\">\r\n                    <Grid Background=\"{TemplateBinding Background}\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\" />\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"*\" />\r\n                            <RowDefinition Height=\"Auto\" />\r\n                        </Grid.RowDefinitions>\r\n                        <ScrollContentPresenter Grid.Column=\"0\" Grid.Row=\"0\" Margin=\"{TemplateBinding Padding}\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" CanContentScroll=\"{TemplateBinding CanContentScroll}\" />\r\n\r\n                        <ScrollBar Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Grid.Column=\"0\" Grid.Row=\"1\" x:Name=\"PART_HorizontalScrollBar\" Orientation=\"Horizontal\" Value=\"{Binding Path=HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" ViewportSize=\"{TemplateBinding ViewportWidth}\" Minimum=\"0\" Maximum=\"{TemplateBinding ScrollableWidth}\" AutomationProperties.AutomationId=\"HorizontalScrollBar\" />\r\n                        <ScrollBar Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Grid.Column=\"1\" Grid.Row=\"0\" x:Name=\"PART_VerticalScrollBar\" Orientation=\"Vertical\" Value=\"{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" ViewportSize=\"{TemplateBinding ViewportHeight}\" Minimum=\"0\" Maximum=\"{TemplateBinding ScrollableHeight}\" AutomationProperties.AutomationId=\"VerticalScrollBar\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n\r\n    <Style TargetType=\"{x:Type ListBox}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\" />\r\n        <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\" />\r\n        <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"True\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource ControlBorderBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Padding\" Value=\"1\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListBox}\">\r\n                    <Grid>\r\n                        <Border x:Name=\"Border\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"1\" Background=\"{DynamicResource ControlBackgroundBrush}\">\r\n                            <ScrollViewer Margin=\"1\" Focusable=\"false\" Foreground=\"{TemplateBinding Foreground}\">\r\n\r\n                                <StackPanel Margin=\"2\" IsItemsHost=\"true\" />\r\n\r\n                            </ScrollViewer>\r\n                        </Border>\r\n                        <Border x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"false\" Background=\"#A5FFFFFF\" BorderBrush=\"#66FFFFFF\" BorderThickness=\"1\" Opacity=\"0\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"DisabledVisualElement\" Value=\"1\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                            <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n\r\n    <Style d:IsControlPart=\"True\" TargetType=\"{x:Type ListBoxItem}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n        <Setter Property=\"Padding\" Value=\"3\" />\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource OutsideFontColor}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListBoxItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundGradientOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0.73\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundGradientOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundGradientSelected\" Storyboard.TargetProperty=\"Opacity\" To=\"0.84\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundGradientSelectedDisabled\" Storyboard.TargetProperty=\"Opacity\" To=\"0.55\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundGradientSelected\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundGradientSelectedDisabled\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid SnapsToDevicePixels=\"true\">\r\n                        <Rectangle x:Name=\"BackgroundGradientOver\" RadiusX=\"1\" RadiusY=\"1\" Stroke=\"{DynamicResource MouseOverBorderBrush}\" Opacity=\"0\" Fill=\"{DynamicResource MouseOverBrush}\"/>\r\n                        <Rectangle x:Name=\"BackgroundGradientSelectedDisabled\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" Fill=\"{DynamicResource ListItemSelectedBrush}\" Stroke=\"{DynamicResource ListItemSelectedBorderBrush}\"/>\r\n                        <Rectangle x:Name=\"BackgroundGradientSelected\" Stroke=\"{DynamicResource PressedBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" Fill=\"{DynamicResource PressedBrush}\">\r\n\r\n                        </Rectangle>\r\n                        <ContentPresenter x:Name=\"contentPresenter\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n\r\n                        <Trigger Property=\"IsSelected\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOff}\" x:Name=\"SelectedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\" x:Name=\"SelectedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"ExpanderHeaderFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Border>\r\n                        <Rectangle SnapsToDevicePixels=\"true\" Margin=\"0\" Stroke=\"Black\" StrokeDashArray=\"1 2\" StrokeThickness=\"1\" />\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n\r\n    <Style x:Key=\"ExpanderDownHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Foreground\" Value=\"#FF15428B\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"11\" />\r\n        <Setter Property=\"FontWeight\" Value=\"Bold\" />\r\n        <Setter Property=\"Padding\" Value=\"6,0,4,0\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"arrow_over\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"border_over\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"arrow_over\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"border_over\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00.1000000\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"-1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00.1000000\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrow2\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"-1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00.1000000\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00.1000000\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrow2\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Focus_Border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"arrow_focus\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Focus_Border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"arrow_focus\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid Background=\"Transparent\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\" />\r\n                            <ColumnDefinition Width=\"20\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Border x:Name=\"border_fill\" Grid.ColumnSpan=\"2\" Background=\"{DynamicResource ExpanderToggleButtonBrush}\"/>\r\n                        <Border x:Name=\"border_inner\" Margin=\"0,0,0,1\" Grid.ColumnSpan=\"2\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1,1,0,0\" />\r\n                        <Border x:Name=\"border_bottom\" Grid.ColumnSpan=\"2\" BorderBrush=\"{DynamicResource ExpanderToggleButtonBottomBrush}\" BorderThickness=\"0,0,0,1\" />\r\n                        <Border x:Name=\"border_over\" Margin=\"1\" Grid.ColumnSpan=\"2\" Opacity=\"0\" Background=\"{DynamicResource ExpanderToggleButtonHoverBrush}\"/>\r\n                        <Rectangle x:Name=\"arrow_over\" Margin=\"0,1,1,1\" Grid.Column=\"1\" Width=\"20\" Opacity=\"0\" Fill=\"{DynamicResource MouseOverBrush}\"/>\r\n                        <Rectangle x:Name=\"arrow_focus\" Margin=\"0,1,1,1\" Grid.Column=\"1\" Width=\"20\" Opacity=\"0\" Fill=\"{DynamicResource MouseOverBrush}\"/>\r\n                        <Path x:Name=\"arrow2\" Margin=\"0,0,6,6\" Grid.Column=\"1\" Stroke=\"{DynamicResource ExpanderToggleArrow2Stroke}\" StrokeThickness=\"1.5\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Center\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\" RenderTransformOrigin=\"0.5,0.5\">\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform />\r\n                                    <SkewTransform />\r\n                                    <RotateTransform />\r\n                                    <TranslateTransform />\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <Path x:Name=\"arrow\" Margin=\"0,2,6,0\" Grid.Column=\"1\" Stroke=\"{DynamicResource ExpanderToggleArrowStroke}\" StrokeThickness=\"1.5\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Center\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\" RenderTransformOrigin=\"0.5,0.5\">\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform />\r\n                                    <SkewTransform />\r\n                                    <RotateTransform />\r\n                                    <TranslateTransform />\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <ContentPresenter x:Name=\"header\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" VerticalAlignment=\"Center\" IsHitTestVisible=\"false\" Margin=\"6,4,4,4\" />\r\n                        <Border x:Name=\"Focus_Border\" Margin=\"-1,-1,-1,0\" Grid.ColumnSpan=\"2\" BorderBrush=\"{DynamicResource FocusBrush}\" BorderThickness=\"1\" IsHitTestVisible=\"false\" Panel.ZIndex=\"1\" Opacity=\"0\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"FocusedOn_BeginStoryboard\" Storyboard=\"{StaticResource FocusedOn}\" />\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"FocusedOff_BeginStoryboard\" Storyboard=\"{StaticResource FocusedOff}\" />\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOff}\" x:Name=\"CheckedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOn}\" x:Name=\"CheckedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\" />\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"ExpanderRightHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Foreground\" Value=\"#FF15428B\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"11\" />\r\n        <Setter Property=\"FontWeight\" Value=\"Bold\" />\r\n        <Setter Property=\"Padding\" Value=\"6,0,4,0\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"arrow_over\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"border_over\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"arrow_over\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"border_over\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00.1000000\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"-1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00.1000000\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrow2\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"-1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00.4000000\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00.4000000\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrow2\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Focus_Border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"arrow_focus\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Focus_Border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"arrow_focus\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n\r\n                    </ControlTemplate.Resources>\r\n                    <Grid SnapsToDevicePixels=\"False\" Background=\"Transparent\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"19\" />\r\n                            <RowDefinition Height=\"*\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Border x:Name=\"border_fill\" d:LayoutOverrides=\"GridBox\" Grid.ColumnSpan=\"1\" Grid.RowSpan=\"2\" Background=\"{DynamicResource ExpanderToggleButtonBrush}\"/>\r\n                        <Border x:Name=\"border_inner\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1,1,0,0\" d:LayoutOverrides=\"GridBox\" Grid.ColumnSpan=\"1\" Grid.RowSpan=\"2\" />\r\n                        <Border x:Name=\"border_bottom\" BorderBrush=\"{DynamicResource ExpanderToggleButtonBrush}\" BorderThickness=\"0,0,0,1\" d:LayoutOverrides=\"GridBox\" Grid.ColumnSpan=\"1\" Grid.RowSpan=\"2\" />\r\n                        <Border x:Name=\"border_over\" Opacity=\"0\" d:LayoutOverrides=\"GridBox\" Grid.ColumnSpan=\"1\" Grid.RowSpan=\"2\" Background=\"{DynamicResource ExpanderToggleButtonHoverBrush}\"/>\r\n                        <Grid>\r\n                            <Grid.LayoutTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                    <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                    <RotateTransform Angle=\"0\" />\r\n                                    <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                </TransformGroup>\r\n                            </Grid.LayoutTransform>\r\n                            <Rectangle x:Name=\"arrow_focus\" Margin=\"1\" Grid.Column=\"1\" Opacity=\"0\" Fill=\"{DynamicResource MouseOverBrush}\"/>\r\n                            <Rectangle x:Name=\"arrow_over\" Margin=\"1\" Grid.Column=\"1\" Opacity=\"0\" Fill=\"{DynamicResource MouseOverBrush}\"/>\r\n                            <Path x:Name=\"arrow2\" Margin=\"3,0,0,0\" Grid.Column=\"1\" Stroke=\"{DynamicResource ExpanderToggleArrow2Stroke}\" StrokeThickness=\"1.5\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Center\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                <Path.RenderTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform />\r\n                                        <SkewTransform />\r\n                                        <RotateTransform Angle=\"-90\" />\r\n                                        <TranslateTransform />\r\n                                    </TransformGroup>\r\n                                </Path.RenderTransform>\r\n                            </Path>\r\n                            <Path x:Name=\"arrow\" Margin=\"7,0,0,0\" Grid.Column=\"1\" Stroke=\"{DynamicResource ExpanderToggleArrowStroke}\" StrokeThickness=\"1.5\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Center\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                <Path.RenderTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform />\r\n                                        <SkewTransform />\r\n                                        <RotateTransform Angle=\"-90\" />\r\n                                        <TranslateTransform />\r\n                                    </TransformGroup>\r\n                                </Path.RenderTransform>\r\n                            </Path>\r\n                        </Grid>\r\n                        <ContentPresenter SnapsToDevicePixels=\"True\" HorizontalAlignment=\"Center\" Margin=\"4,4,4,6\" VerticalAlignment=\"Top\" Grid.Row=\"1\" RecognizesAccessKey=\"True\">\r\n                            <ContentPresenter.LayoutTransform>\r\n                                <TransformGroup>\r\n                                    <TransformGroup.Children>\r\n                                        <TransformCollection>\r\n                                            <RotateTransform Angle=\"-90\" />\r\n                                        </TransformCollection>\r\n                                    </TransformGroup.Children>\r\n                                </TransformGroup>\r\n                            </ContentPresenter.LayoutTransform>\r\n                        </ContentPresenter>\r\n                        <Border x:Name=\"Focus_Border\" Margin=\"-1,-1,0,-1\" Grid.ColumnSpan=\"2\" BorderBrush=\"{DynamicResource FocusBrush}\" BorderThickness=\"1\" IsHitTestVisible=\"false\" Opacity=\"0\" Panel.ZIndex=\"1\" Grid.RowSpan=\"2\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"FocusedOn_BeginStoryboard\" Storyboard=\"{StaticResource FocusedOn}\" />\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"FocusedOff_BeginStoryboard\" Storyboard=\"{StaticResource FocusedOff}\" />\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOff}\" x:Name=\"CheckedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOn}\" x:Name=\"CheckedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\" />\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"ExpanderUpHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Foreground\" Value=\"#FF15428B\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"11\" />\r\n        <Setter Property=\"FontWeight\" Value=\"Bold\" />\r\n        <Setter Property=\"Padding\" Value=\"6,0,4,0\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"arrow_over\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"border_over\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"arrow_over\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"border_over\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00.1000000\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"-1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00.1000000\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrow2\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"-1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00.4000000\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00.4000000\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrow2\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Focus_Border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"arrow_focus\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Focus_Border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"arrow_focus\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n\r\n                    </ControlTemplate.Resources>\r\n                    <Grid Background=\"Transparent\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\" />\r\n                            <ColumnDefinition Width=\"20\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Border x:Name=\"border_fill\" Grid.ColumnSpan=\"2\" Background=\"{DynamicResource ExpanderToggleButtonBrush}\"/>\r\n                        <Border x:Name=\"border_inner\" Margin=\"0,1,0,0\" Grid.ColumnSpan=\"2\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1,0,0,1\" />\r\n                        <Border x:Name=\"border_bottom\" Grid.ColumnSpan=\"2\" BorderBrush=\"{DynamicResource ExpanderToggleButtonBottomBrush}\" BorderThickness=\"0,1,0,0\" />\r\n                        <Border x:Name=\"border_over\" Margin=\"1\" Grid.ColumnSpan=\"2\" Opacity=\"0\" Background=\"{DynamicResource ExpanderToggleButtonHoverBrush}\"/>\r\n                        <Rectangle x:Name=\"arrow_over\" Margin=\"0,1,1,1\" Grid.Column=\"1\" Width=\"20\" Opacity=\"0\" Fill=\"{DynamicResource MouseOverBrush}\"/>\r\n                        <Rectangle x:Name=\"arrow_focus\" Margin=\"0,1,1,1\" Grid.Column=\"1\" Width=\"20\" Opacity=\"0\" Fill=\"{DynamicResource MouseOverBrush}\"/>\r\n                        <Path x:Name=\"arrow2\" Margin=\"0,4,6,0\" Grid.Column=\"1\" Stroke=\"{DynamicResource ExpanderToggleArrow2Stroke}\" StrokeThickness=\"1.5\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Center\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\" RenderTransformOrigin=\"0.5,0.5\">\r\n                            <Path.LayoutTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                    <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                    <RotateTransform Angle=\"180\" />\r\n                                    <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                </TransformGroup>\r\n                            </Path.LayoutTransform>\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform ScaleY=\"-1\" />\r\n                                    <SkewTransform />\r\n                                    <RotateTransform />\r\n                                    <TranslateTransform />\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <Path x:Name=\"arrow\" Margin=\"0,0,6,4\" Grid.Column=\"1\" Stroke=\"{DynamicResource ExpanderToggleArrowStroke}\" StrokeThickness=\"1.5\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Center\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\" RenderTransformOrigin=\"0.5,0.5\">\r\n                            <Path.LayoutTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                    <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                    <RotateTransform Angle=\"180\" />\r\n                                    <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                </TransformGroup>\r\n                            </Path.LayoutTransform>\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform ScaleY=\"-1\" />\r\n                                    <SkewTransform />\r\n                                    <RotateTransform />\r\n                                    <TranslateTransform />\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <ContentPresenter SnapsToDevicePixels=\"True\" HorizontalAlignment=\"Center\" Margin=\"6,4,4,4\" VerticalAlignment=\"Top\" Grid.Row=\"1\" RecognizesAccessKey=\"True\" />\r\n                        <Border x:Name=\"Focus_Border\" Margin=\"-1,0,-1,-1\" Grid.ColumnSpan=\"2\" BorderBrush=\"{DynamicResource FocusBrush}\" BorderThickness=\"1\" IsHitTestVisible=\"false\" Visibility=\"Visible\" Canvas.ZIndex=\"1\" Opacity=\"0\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"FocusedOn_BeginStoryboard\" Storyboard=\"{StaticResource FocusedOn}\" />\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"FocusedOff_BeginStoryboard\" Storyboard=\"{StaticResource FocusedOff}\" />\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOff}\" x:Name=\"CheckedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOn}\" x:Name=\"CheckedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\" />\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"ExpanderLeftHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Foreground\" Value=\"#FF15428B\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"11\" />\r\n        <Setter Property=\"FontWeight\" Value=\"Bold\" />\r\n        <Setter Property=\"Padding\" Value=\"6,0,4,0\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"arrow_over\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"border_over\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"arrow_over\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"border_over\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00.1000000\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"-1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00.1000000\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrow2\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"-1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00.4000000\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00.4000000\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrow2\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Focus_Border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"arrow_focus\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Focus_Border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"arrow_focus\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n\r\n                    </ControlTemplate.Resources>\r\n                    <Grid SnapsToDevicePixels=\"False\" Background=\"Transparent\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"19\" />\r\n                            <RowDefinition Height=\"*\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Border x:Name=\"border_fill\" Grid.RowSpan=\"2\" Background=\"{DynamicResource ExpanderToggleButtonBrush}\"/>\r\n                        <Border x:Name=\"border_inner\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"0,1,1,0\" Grid.RowSpan=\"2\" />\r\n                        <Border x:Name=\"border_bottom\" BorderBrush=\"{DynamicResource ExpanderToggleButtonBottomBrush}\" BorderThickness=\"0,0,0,1\" Grid.RowSpan=\"2\" />\r\n                        <Border x:Name=\"border_over\" Opacity=\"0\" Grid.RowSpan=\"2\" Background=\"{DynamicResource ExpanderToggleButtonHoverBrush}\"/>\r\n                        <Grid>\r\n                            <Grid.LayoutTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                    <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                    <RotateTransform Angle=\"0\" />\r\n                                    <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                </TransformGroup>\r\n                            </Grid.LayoutTransform>\r\n                            <Rectangle x:Name=\"arrow_over\" Margin=\"1\" Opacity=\"0\" Fill=\"{DynamicResource MouseOverBrush}\"/>\r\n                            <Rectangle x:Name=\"arrow_focus\" Margin=\"1\" Opacity=\"0\" Fill=\"{DynamicResource MouseOverBrush}\"/>\r\n                            <Path x:Name=\"arrow2\" Margin=\"3,0,0,0\" Stroke=\"{DynamicResource ExpanderToggleArrow2Stroke}\" StrokeThickness=\"1.5\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Center\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                <Path.RenderTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform />\r\n                                        <SkewTransform />\r\n                                        <RotateTransform Angle=\"90\" />\r\n                                        <TranslateTransform />\r\n                                    </TransformGroup>\r\n                                </Path.RenderTransform>\r\n                            </Path>\r\n                            <Path x:Name=\"arrow\" Margin=\"7,0,0,0\" Stroke=\"{DynamicResource ExpanderToggleArrowStroke}\" StrokeThickness=\"1.5\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Center\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                <Path.RenderTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform />\r\n                                        <SkewTransform />\r\n                                        <RotateTransform Angle=\"90\" />\r\n                                        <TranslateTransform />\r\n                                    </TransformGroup>\r\n                                </Path.RenderTransform>\r\n                            </Path>\r\n                        </Grid>\r\n                        <ContentPresenter SnapsToDevicePixels=\"True\" HorizontalAlignment=\"Center\" Margin=\"6,4,4,4\" VerticalAlignment=\"Top\" Grid.Row=\"1\" RecognizesAccessKey=\"True\">\r\n                            <ContentPresenter.LayoutTransform>\r\n                                <TransformGroup>\r\n                                    <TransformGroup.Children>\r\n                                        <TransformCollection>\r\n                                            <RotateTransform Angle=\"90\" />\r\n                                        </TransformCollection>\r\n                                    </TransformGroup.Children>\r\n                                </TransformGroup>\r\n                            </ContentPresenter.LayoutTransform>\r\n                        </ContentPresenter>\r\n                        <Border x:Name=\"Focus_Border\" Margin=\"0,-1,-1,-1\" Grid.RowSpan=\"2\" BorderBrush=\"{DynamicResource FocusBrush}\" BorderThickness=\"1\" IsHitTestVisible=\"false\" Opacity=\"0\" Panel.ZIndex=\"1\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"FocusedOn_BeginStoryboard\" Storyboard=\"{StaticResource FocusedOn}\" />\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"FocusedOff_BeginStoryboard\" Storyboard=\"{StaticResource FocusedOff}\" />\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOff}\" x:Name=\"CheckedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOn}\" x:Name=\"CheckedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\" />\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style TargetType=\"{x:Type Expander}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}\" />\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Foreground\" Value=\"#FF15428B\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"11\" />\r\n        <Setter Property=\"FontWeight\" Value=\"Bold\" />\r\n        <Setter Property=\"Padding\" Value=\"6,0,4,0\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Expander}\">\r\n                    <Grid>\r\n                        <Border x:Name=\"Background\" BorderThickness=\"1\" Padding=\"0\">\r\n\r\n                            <DockPanel>\r\n                                <ToggleButton FontFamily=\"{TemplateBinding FontFamily}\" FontSize=\"{TemplateBinding FontSize}\" FontStretch=\"{TemplateBinding FontStretch}\" FontStyle=\"{TemplateBinding FontStyle}\" FontWeight=\"{TemplateBinding FontWeight}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\" FocusVisualStyle=\"{StaticResource ExpanderHeaderFocusVisual}\" Margin=\"1,1,1,0\" MinHeight=\"0\" MinWidth=\"0\" x:Name=\"HeaderSite\" Style=\"{StaticResource ExpanderDownHeaderStyle}\" Content=\"{TemplateBinding Header}\" ContentTemplate=\"{TemplateBinding HeaderTemplate}\" ContentTemplateSelector=\"{TemplateBinding HeaderTemplateSelector}\" IsChecked=\"{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" DockPanel.Dock=\"Top\" />\r\n                                <Border Visibility=\"Collapsed\" x:Name=\"border\" Margin=\"1,1,1,1\" BorderBrush=\"{DynamicResource GlyphBrush}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"1,1,1,1\" Background=\"{DynamicResource ControlBackgroundBrush}\">\r\n                                    <ContentPresenter Focusable=\"false\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"1,1,1,1\" x:Name=\"ExpandSite\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" DockPanel.Dock=\"Bottom\" />\r\n                                </Border>\r\n                            </DockPanel>\r\n                        </Border>\r\n                        <Border x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"false\" Background=\"{DynamicResource DisabledBackgroundBrush}\" BorderBrush=\"{DynamicResource DisabledBorderBrush}\" BorderThickness=\"1\" Opacity=\"0\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsExpanded\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"border\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Down\" />\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Right\">\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Right\" />\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Left\" />\r\n                            <Setter Property=\"Style\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderRightHeaderStyle}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Up\">\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Top\" />\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Bottom\" />\r\n                            <Setter Property=\"Style\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderUpHeaderStyle}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Left\">\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Left\" />\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Right\" />\r\n                            <Setter Property=\"Style\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderLeftHeaderStyle}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                            <Setter Property=\"Opacity\" TargetName=\"DisabledVisualElement\" Value=\"1\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n\r\n    <ControlTemplate x:Key=\"ComboBoxToggleButton\" TargetType=\"{x:Type ToggleButton}\">\r\n        <ControlTemplate.Resources>\r\n            <Storyboard x:Key=\"HoverOn\">\r\n                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"rectangleOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0.8\" />\r\n                <ColorAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Fill).(SolidColorBrush.Color)\" To=\"#FFFFFFFF\" />\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"HoverOff\">\r\n                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"rectangleOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                <ColorAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Fill).(SolidColorBrush.Color)\" To=\"#FFEAF2FB\" />\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"PressedOn\">\r\n                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"rectanglePress\" Storyboard.TargetProperty=\"Opacity\" To=\"0.8\" />\r\n                <ColorAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Fill).(SolidColorBrush.Color)\" To=\"#FFFFFFFF\" />\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"PressedOff\">\r\n                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"rectanglePress\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                <ColorAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Fill).(SolidColorBrush.Color)\" To=\"#FFEAF2FB\" />\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"CheckedOn\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundChecked\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"CheckedOff\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundChecked\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n        </ControlTemplate.Resources>\r\n        <Grid x:Name=\"grid\">\r\n            <Rectangle x:Name=\"Background\" Fill=\"#FFEAF2FB\" Stroke=\"#FF9EBBDE\" IsHitTestVisible=\"false\" />\r\n            <Rectangle x:Name=\"BackgroundChecked\" Margin=\"1\" IsHitTestVisible=\"false\" Opacity=\"0\" >\r\n                <Rectangle.Fill>\r\n                    <SolidColorBrush Color=\"{DynamicResource WhiteColor}\"/>\r\n                </Rectangle.Fill>\r\n            </Rectangle>\r\n            <Rectangle x:Name=\"rectangleOver\" Width=\"15\" Stroke=\"#FFE8E8E8\" HorizontalAlignment=\"Right\" Opacity=\"0\" Fill=\"{DynamicResource MouseOverBrush}\"/>\r\n            <Rectangle x:Name=\"rectanglePress\" Width=\"15\" Stroke=\"#FC9E9D9B\" HorizontalAlignment=\"Right\" Opacity=\"0\" Fill=\"{DynamicResource PressedBrush}\"/>\r\n            <Rectangle x:Name=\"DisabledVisualElement\" Margin=\"1\" Fill=\"{DynamicResource DisabledBackgroundBrush}\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" />\r\n            <Path x:Name=\"BtnArrow\" Margin=\"0,0,4,0\" Width=\"6\" Fill=\"{DynamicResource GlyphBrush}\" Stretch=\"Uniform\" HorizontalAlignment=\"Right\" Data=\"F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z \" />\r\n        </Grid>\r\n        <ControlTemplate.Triggers>\r\n            <Trigger Property=\"IsPressed\" Value=\"True\">\r\n                <Trigger.ExitActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\" />\r\n                </Trigger.ExitActions>\r\n                <Trigger.EnterActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\" />\r\n                </Trigger.EnterActions>\r\n            </Trigger>\r\n            <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                <Trigger.ExitActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\" />\r\n                </Trigger.ExitActions>\r\n                <Trigger.EnterActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                </Trigger.EnterActions>\r\n\r\n            </Trigger>\r\n            <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                <Trigger.ExitActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource CheckedOff}\" x:Name=\"CheckedOff_BeginStoryboard\" />\r\n                </Trigger.ExitActions>\r\n                <Trigger.EnterActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource CheckedOn}\" x:Name=\"CheckedOn_BeginStoryboard\" />\r\n                </Trigger.EnterActions>\r\n            </Trigger>\r\n            <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                <Setter Property=\"Visibility\" TargetName=\"DisabledVisualElement\" Value=\"Visible\" />\r\n            </Trigger>\r\n        </ControlTemplate.Triggers>\r\n    </ControlTemplate>\r\n\r\n    <ControlTemplate x:Key=\"ComboBoxTextBox\" TargetType=\"{x:Type TextBox}\">\r\n        <Border x:Name=\"PART_ContentHost\" Focusable=\"False\" Background=\"{TemplateBinding Background}\" />\r\n    </ControlTemplate>\r\n\r\n    <Style TargetType=\"{x:Type ComboBox}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"Padding\" Value=\"6,2,25,2\" />\r\n\r\n<Setter Property=\"Template\" Value=\"{DynamicResource ComboBoxTemplate}\" />\r\n    </Style>\r\n        \r\n        <ControlTemplate x:Key=\"ComboBoxTemplate\" TargetType=\"{x:Type ComboBox}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <ToggleButton Focusable=\"false\" IsChecked=\"{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" ClickMode=\"Press\" Style=\"{x:Null}\" />\r\n                        <ToggleButton Grid.Column=\"2\" Template=\"{DynamicResource ComboBoxToggleButton}\" x:Name=\"ToggleButton\" Focusable=\"false\" IsChecked=\"{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" ClickMode=\"Press\" />\r\n                        <ContentPresenter HorizontalAlignment=\"Left\" Margin=\"3,3,23,3\" x:Name=\"ContentSite\" VerticalAlignment=\"Center\" Content=\"{TemplateBinding SelectionBoxItem}\" ContentTemplate=\"{TemplateBinding SelectionBoxItemTemplate}\" ContentTemplateSelector=\"{TemplateBinding ItemTemplateSelector}\" IsHitTestVisible=\"False\" />\r\n\r\n                        <TextBox Visibility=\"Hidden\" Template=\"{DynamicResource ComboBoxTextBox}\" HorizontalAlignment=\"Left\" Margin=\"3,3,23,3\" x:Name=\"PART_EditableTextBox\" Style=\"{x:Null}\" VerticalAlignment=\"Center\" Focusable=\"True\" Background=\"Transparent\" IsReadOnly=\"{TemplateBinding IsReadOnly}\" />\r\n                        <Rectangle x:Name=\"DisabledVisualElement\" Fill=\"{DynamicResource DisabledBackgroundBrush}\" Stroke=\"{DynamicResource DisabledBorderBrush}\" RadiusX=\"0\" RadiusY=\"0\" IsHitTestVisible=\"false\" Opacity=\"0\" />\r\n                        <Rectangle x:Name=\"FocusVisualElement\" Margin=\"-1\" Stroke=\"{DynamicResource FocusBrush}\" StrokeThickness=\"1\" IsHitTestVisible=\"false\" Opacity=\"0\" />\r\n                        <Popup IsOpen=\"{TemplateBinding IsDropDownOpen}\" Placement=\"Bottom\" x:Name=\"Popup\" Focusable=\"False\" AllowsTransparency=\"True\" PopupAnimation=\"Slide\" Margin=\"0,1,0,0\">\r\n                            <Grid MaxHeight=\"{TemplateBinding MaxDropDownHeight}\" MinWidth=\"{TemplateBinding ActualWidth}\" x:Name=\"DropDown\" SnapsToDevicePixels=\"True\">\r\n                                <Border x:Name=\"DropDownBorder\" Margin=\"0,-1,0,0\" BorderBrush=\"{DynamicResource ControlBorderBrush}\" BorderThickness=\"1\" CornerRadius=\"0,0,3,3\" Background=\"{DynamicResource ControlBackgroundBrush}\">\r\n                                    <ScrollViewer Margin=\"4,6,4,6\" SnapsToDevicePixels=\"True\" HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Auto\" CanContentScroll=\"True\">\r\n\r\n                                        <StackPanel IsItemsHost=\"True\" KeyboardNavigation.DirectionalNavigation=\"Contained\" />\r\n\r\n                                    </ScrollViewer>\r\n                                </Border>\r\n                            </Grid>\r\n                        </Popup>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"HasItems\" Value=\"false\">\r\n                            <Setter Property=\"MinHeight\" Value=\"95\" TargetName=\"DropDownBorder\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                            <Setter Property=\"Opacity\" TargetName=\"DisabledVisualElement\" Value=\"1\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                            <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"AllowsTransparency\" SourceName=\"Popup\" Value=\"true\">\r\n                            <Setter Property=\"CornerRadius\" Value=\"4\" TargetName=\"DropDownBorder\" />\r\n                            <Setter Property=\"Margin\" Value=\"0,2,0,0\" TargetName=\"DropDownBorder\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEditable\" Value=\"true\">\r\n                            <Setter Property=\"IsTabStop\" Value=\"false\" />\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"PART_EditableTextBox\" />\r\n                            <Setter Property=\"Visibility\" Value=\"Hidden\" TargetName=\"ContentSite\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n\r\n    <Style d:IsControlPart=\"True\" TargetType=\"{x:Type ComboBoxItem}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"Padding\" Value=\"3\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ComboBoxItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HighlightOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundGradientOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0.73\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HighlightOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundGradientOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundGradientSelected\" Storyboard.TargetProperty=\"Opacity\" To=\"0.84\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundGradientSelected\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid SnapsToDevicePixels=\"true\">\r\n                        <Rectangle x:Name=\"BackgroundGradientOver\" RadiusX=\"1\" RadiusY=\"1\" Stroke=\"{DynamicResource MouseOverBorderBrush}\" Opacity=\"0\" Fill=\"{DynamicResource MouseOverBrush}\"/>\r\n                        <Rectangle x:Name=\"BackgroundGradientSelected\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" Fill=\"{DynamicResource PressedBrush}\" Stroke=\"{DynamicResource PressedBorderBrush}\"/>\r\n                        <ContentPresenter x:Name=\"contentPresenter\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"Selector.IsSelected\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOff}\" x:Name=\"SelectedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\" x:Name=\"SelectedOn_BeginStoryboard1\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HighlightOff}\" x:Name=\"HighlightOff_BeginStoryboard1\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HighlightOn}\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n\r\n    <Style TargetType=\"{x:Type ProgressBar}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ProgressBar}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"IndeterminateOn\" RepeatBehavior=\"Forever\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"IndeterminateGradientFill\" Storyboard.TargetProperty=\"(Shape.Fill).(Brush.Transform).(TransformGroup.Children)[0].X\" RepeatBehavior=\"Forever\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0\" />\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:.5\" Value=\"20\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"IndeterminateRoot\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                <DiscreteObjectKeyFrame KeyTime=\"00:00:00\" Value=\"{x:Static Visibility.Visible}\" />\r\n                            </ObjectAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Border x:Name=\"PART_Track\" BorderThickness=\"1\" CornerRadius=\"3\" Opacity=\"0.825\">\r\n                            <Border.Background>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"#FFFFFFFF\" />\r\n                                    <GradientStop Color=\"#FFD8D8D8\" Offset=\"0.327\" />\r\n                                    <GradientStop Color=\"#FFDADADA\" Offset=\"0.488\" />\r\n                                    <GradientStop Color=\"#FFBEBEBE\" Offset=\"0.539\" />\r\n                                    <GradientStop Color=\"#FFD6D6D6\" Offset=\"0.77\" />\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Border.Background>\r\n                            <Border.BorderBrush>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"#FFBBBBBB\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#FF7E7E7E\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Border.BorderBrush>\r\n                        </Border>\r\n\r\n                        <Rectangle x:Name=\"PART_Indicator\" Margin=\"1\" RadiusX=\"1.5\" RadiusY=\"1.5\" HorizontalAlignment=\"Left\" Opacity=\"0.83\" Fill=\"{DynamicResource ProgressBarIndicatorBrush}\"/>\r\n                        <Grid x:Name=\"IndeterminateRoot\" Visibility=\"Collapsed\">\r\n                            <Rectangle x:Name=\"IndeterminateSolidFill\" Margin=\"1\" Fill=\"#FF6EA4FD\" RadiusX=\"2\" RadiusY=\"2\" Width=\"Auto\" />\r\n                            <Rectangle x:Name=\"ProgressBarRootGradient\" Margin=\"1\" Panel.ZIndex=\"1\" RadiusX=\"1.5\" RadiusY=\"1.5\">\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                        <GradientStop Color=\"#F6BCD5FF\" Offset=\"0.046\" />\r\n                                        <GradientStop Color=\"#96D4E4FF\" Offset=\"0.18\" />\r\n                                        <GradientStop Color=\"#4FFFFFFF\" Offset=\"0.512\" />\r\n                                        <GradientStop Color=\"#00D6D6D6\" Offset=\"0.521\" />\r\n                                        <GradientStop Color=\"#BABCD5FF\" Offset=\"1\" />\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                            <Rectangle x:Name=\"IndeterminateGradientFill\" Margin=\"1\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0.7\">\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush EndPoint=\"0,1\" StartPoint=\"20,1\" MappingMode=\"Absolute\" SpreadMethod=\"Repeat\">\r\n                                        <LinearGradientBrush.Transform>\r\n                                            <TransformGroup>\r\n                                                <TranslateTransform X=\"0\" />\r\n                                                <SkewTransform AngleX=\"-10\" />\r\n                                            </TransformGroup>\r\n                                        </LinearGradientBrush.Transform>\r\n                                        <GradientStop Color=\"#FFBCD5FF\" Offset=\"0.088\" />\r\n                                        <GradientStop Color=\"#006EA4FD\" Offset=\"0.475\" />\r\n                                        <GradientStop Color=\"#FFBCD5FF\" Offset=\"0.899\" />\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                        </Grid>\r\n                        <Border x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"false\" Background=\"#A5FFFFFF\" BorderBrush=\"#66FFFFFF\" BorderThickness=\"1\" Opacity=\"0\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"DisabledVisualElement\" Value=\"1\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsIndeterminate\" Value=\"True\">\r\n                        \t<Trigger.ExitActions>\r\n                        \t\t<StopStoryboard BeginStoryboardName=\"IndeterminateOn_BeginStoryboard\"/>\r\n                        \t</Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"IndeterminateOn_BeginStoryboard\" Storyboard=\"{StaticResource IndeterminateOn}\" />\r\n                            </Trigger.EnterActions>\r\n                            <Setter Property=\"Visibility\" TargetName=\"PART_Track\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"PART_Indicator\" Value=\"Collapsed\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type TextBox}\">\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\" />\r\n        <Setter Property=\"AllowDrop\" Value=\"true\" />\r\n        <Setter Property=\"Background\" >\r\n            <Setter.Value>\r\n                <SolidColorBrush Color=\"{DynamicResource WhiteColor}\"/>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"Padding\" Value=\"4\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource TextControlBorderBrush}\" />\r\n<Setter Property=\"Template\" Value=\"{DynamicResource TextBoxTemplate}\" />\r\n    </Style>\r\n        \r\n        <ControlTemplate x:Key=\"TextBoxTemplate\" TargetType=\"{x:Type TextBox}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"Over\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"Over_Border\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"Over\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"Over_Border\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"DisabledOn\">\r\n                            <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                <DiscreteObjectKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"{x:Static Visibility.Visible}\" />\r\n                            </ObjectAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n\t\t\t\t\t\t<Storyboard x:Key=\"DisabledOff\">\r\n                            <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                <DiscreteObjectKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"{x:Static Visibility.Collapsed}\" />\r\n                            </ObjectAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Border x:Name=\"BorderBase\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2.75\" />\r\n                        <Border x:Name=\"Over\" BorderBrush=\"{DynamicResource FocusBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2.75\" Opacity=\"0\" />\r\n                        <Border x:Name=\"Over_Border\" Margin=\"-1\" BorderBrush=\"{DynamicResource MouseOverHighlightBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3.75\" IsHitTestVisible=\"False\" Opacity=\"0\" />\r\n                        <ScrollViewer Margin=\"0\" x:Name=\"PART_ContentHost\" Foreground=\"{DynamicResource OutsideFontColor}\" />\r\n                        <Border x:Name=\"DisabledVisualElement\" Background=\"#A5FFFFFF\" BorderBrush=\"#59C0C0C0\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2.75\" IsHitTestVisible=\"False\" Visibility=\"Collapsed\" />\r\n                        <Border x:Name=\"ReadOnlyVisualElement\" Background=\"#66FFFFFF\" CornerRadius=\"2.75\" Visibility=\"Collapsed\" />\r\n                        <Border x:Name=\"FocusVisualElement\" BorderBrush=\"#FFB1703C\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2.75\" IsHitTestVisible=\"False\" Opacity=\"0\" />\r\n\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" />\r\n                                <Condition Property=\"IsFocused\" Value=\"False\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"HoverOff_BeginStoryboard\" Storyboard=\"{StaticResource HoverOff}\" />\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                            </MultiTrigger.EnterActions>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource DisabledOn}\" x:Name=\"DisabledOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                        </Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsEnabled\" Value=\"True\">\r\n\t\t\t\t\t\t<Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource DisabledOff}\"  />\r\n                            </Trigger.EnterActions>\r\n\t\t\t\t\t\t\t<Setter Property=\"Foreground\" Value=\"#FF000000\" />\r\n\t\t\t\t\t\t</Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n\r\n    <Style TargetType=\"{x:Type PasswordBox}\">\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\" />\r\n        <Setter Property=\"AllowDrop\" Value=\"true\" />\r\n        <Setter Property=\"Background\" >\r\n            <Setter.Value>\r\n                <SolidColorBrush Color=\"{DynamicResource WhiteColor}\"/>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"Padding\" Value=\"4\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource TextControlBorderBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type PasswordBox}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"Over\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"Over_Border\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"Over\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"Over_Border\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"DisabledOn\">\r\n                            <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                <DiscreteObjectKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"{x:Static Visibility.Visible}\" />\r\n                            </ObjectAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Border x:Name=\"BorderBase\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2.75\" />\r\n                        <Border x:Name=\"Over\" BorderBrush=\"{DynamicResource FocusBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2.75\" Opacity=\"0\" />\r\n                        <Border x:Name=\"Over_Border\" Margin=\"-1\" BorderBrush=\"{DynamicResource MouseOverHighlightBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3.75\" IsHitTestVisible=\"False\" Opacity=\"0\" />\r\n                        <ScrollViewer Margin=\"0\" x:Name=\"PART_ContentHost\" Foreground=\"{DynamicResource OutsideFontColor}\" />\r\n                        <Border x:Name=\"DisabledVisualElement\" Background=\"#A5FFFFFF\" BorderBrush=\"#59C0C0C0\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2.75\" IsHitTestVisible=\"False\" Visibility=\"Collapsed\" />\r\n                        <Border x:Name=\"ReadOnlyVisualElement\" Background=\"#66FFFFFF\" CornerRadius=\"2.75\" Visibility=\"Collapsed\" />\r\n                        <Border x:Name=\"FocusVisualElement\" BorderBrush=\"#FFB1703C\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2.75\" IsHitTestVisible=\"False\" Opacity=\"0\" />\r\n\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" />\r\n                                <Condition Property=\"IsFocused\" Value=\"False\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"HoverOff_BeginStoryboard\" Storyboard=\"{StaticResource HoverOff}\" />\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                            </MultiTrigger.EnterActions>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource DisabledOn}\" x:Name=\"DisabledOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type RichTextBox}\">\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\" />\r\n        <Setter Property=\"AllowDrop\" Value=\"true\" />\r\n        <Setter Property=\"Background\" >\r\n            <Setter.Value>\r\n                <SolidColorBrush Color=\"{DynamicResource WhiteColor}\"/>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"Padding\" Value=\"4\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource TextControlBorderBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type RichTextBox}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"Over\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"Over_Border\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"Over\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"Over_Border\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"DisabledOn\">\r\n                            <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                <DiscreteObjectKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"{x:Static Visibility.Visible}\" />\r\n                            </ObjectAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Border x:Name=\"BorderBase\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2.75\" />\r\n                        <Border x:Name=\"Over\" BorderBrush=\"{DynamicResource FocusBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2.75\" Opacity=\"0\" />\r\n                        <Border x:Name=\"Over_Border\" Margin=\"-1\" BorderBrush=\"{DynamicResource MouseOverHighlightBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3.75\" IsHitTestVisible=\"False\" Opacity=\"0\" />\r\n                        <ScrollViewer Margin=\"0\" x:Name=\"PART_ContentHost\" Foreground=\"{DynamicResource OutsideFontColor}\" />\r\n                        <Border x:Name=\"DisabledVisualElement\" Background=\"#A5FFFFFF\" BorderBrush=\"#59C0C0C0\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2.75\" IsHitTestVisible=\"False\" Visibility=\"Collapsed\" />\r\n                        <Border x:Name=\"ReadOnlyVisualElement\" Background=\"#66FFFFFF\" CornerRadius=\"2.75\" Visibility=\"Collapsed\" />\r\n                        <Border x:Name=\"FocusVisualElement\" BorderBrush=\"#FFB1703C\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2.75\" IsHitTestVisible=\"False\" Opacity=\"0\" />\r\n\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" />\r\n                                <Condition Property=\"IsFocused\" Value=\"False\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"HoverOff_BeginStoryboard\" Storyboard=\"{StaticResource HoverOff}\" />\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                            </MultiTrigger.EnterActions>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource DisabledOn}\" x:Name=\"DisabledOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type Label}\">\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Label}\">\r\n                    <Grid>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" RecognizesAccessKey=\"True\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\" />\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type Menu}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"True\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Menu}\">\r\n                    <Grid>\r\n                        <Border Margin=\"1\" x:Name=\"Border\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" />\r\n                        <StackPanel IsItemsHost=\"True\" ClipToBounds=\"True\" Orientation=\"Horizontal\" Background=\"{DynamicResource TabControlHeaderBrush}\" />\r\n                        <Border x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"false\" Background=\"#A5FFFFFF\" BorderBrush=\"#66FFFFFF\" BorderThickness=\"1\" Opacity=\"0\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"DisabledVisualElement\" Value=\"1\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <DropShadowBitmapEffect x:Key=\"PopupDropShadow\" ShadowDepth=\"1.5\" Softness=\"0.15\" />\r\n\r\n    <Style TargetType=\"{x:Type MenuItem}\">\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\" />\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.MenuTextBrushKey}}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type MenuItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HighlightOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundGradientOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HighlightOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundGradientOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Border x:Name=\"Border\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\">\r\n                        <Grid>\r\n\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition MinWidth=\"17\" Width=\"Auto\" SharedSizeGroup=\"MenuItemIconColumnGroup\" />\r\n                                <ColumnDefinition Width=\"*\" />\r\n                                <ColumnDefinition Width=\"Auto\" SharedSizeGroup=\"MenuItemIGTColumnGroup\" />\r\n                                <ColumnDefinition Width=\"14\" />\r\n                            </Grid.ColumnDefinitions>\r\n\r\n                            <ContentPresenter Margin=\"4,0,6,0\" x:Name=\"Icon\" VerticalAlignment=\"Center\" ContentSource=\"Icon\" />\r\n\r\n                            <Grid Visibility=\"Hidden\" Margin=\"4,0,6,0\" x:Name=\"GlyphPanel\" VerticalAlignment=\"Center\">\r\n                                <Path x:Name=\"GlyphPanelpath\" VerticalAlignment=\"Center\" Fill=\"{TemplateBinding Foreground}\" Data=\"M0,2 L0,4.8 L2.5,7.4 L7.1,2.8 L7.1,0 L2.5,4.6 z\" FlowDirection=\"LeftToRight\" />\r\n                            </Grid>\r\n                            <Rectangle Grid.Column=\"0\" Grid.ColumnSpan=\"4\" x:Name=\"BackgroundGradientOver\" Stroke=\"#FFDBCE99\" Opacity=\"0\" Fill=\"{DynamicResource MouseOverBrush}\"/>\r\n\r\n                            <ContentPresenter Grid.Column=\"1\" Margin=\"{TemplateBinding Padding}\" x:Name=\"HeaderHost\" RecognizesAccessKey=\"True\" ContentSource=\"Header\" />\r\n\r\n                            <Grid Grid.Column=\"3\" Margin=\"4,0,6,0\" x:Name=\"ArrowPanel\" VerticalAlignment=\"Center\">\r\n                                <Path x:Name=\"ArrowPanelPath\" VerticalAlignment=\"Center\" Fill=\"{TemplateBinding Foreground}\" Data=\"M0,0 L0,8 L4,4 z\" />\r\n                            </Grid>\r\n\r\n                            <Popup IsOpen=\"{Binding Path=IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Right\" x:Name=\"SubMenuPopup\" Focusable=\"false\" AllowsTransparency=\"true\" PopupAnimation=\"{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}\" VerticalOffset=\"-3\">\r\n                                <Grid x:Name=\"SubMenu\">\r\n                                    <Border x:Name=\"SubMenuBorder\" BorderBrush=\"{DynamicResource ControlBorderBrush}\" BorderThickness=\"1\" >\r\n                                        <Border.Background>\r\n                                            <SolidColorBrush Color=\"{DynamicResource WhiteColor}\"/>\r\n                                        </Border.Background>\r\n                                    </Border>\r\n\r\n                                    <StackPanel IsItemsHost=\"True\" KeyboardNavigation.DirectionalNavigation=\"Cycle\" />\r\n                                </Grid>\r\n                            </Popup>\r\n\r\n                        </Grid>\r\n                    </Border>\r\n\r\n                    <ControlTemplate.Triggers>\r\n\r\n                        <Trigger Property=\"Role\" Value=\"TopLevelHeader\">\r\n                            <Setter Property=\"Margin\" Value=\"0,1,0,1\" />\r\n                            <Setter Property=\"Padding\" Value=\"6,3,6,3\" />\r\n                            <Setter Property=\"Grid.IsSharedSizeScope\" Value=\"true\" />\r\n                            <Setter Property=\"Placement\" Value=\"Bottom\" TargetName=\"SubMenuPopup\" />\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ArrowPanel\" />\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"Role\" Value=\"TopLevelItem\">\r\n                            <Setter Property=\"Margin\" Value=\"0,1,0,1\" />\r\n                            <Setter Property=\"Padding\" Value=\"6,3,6,3\" />\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ArrowPanel\" />\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"Role\" Value=\"SubmenuHeader\">\r\n                            <Setter Property=\"DockPanel.Dock\" Value=\"Top\" />\r\n                            <Setter Property=\"Padding\" Value=\"0,2,0,2\" />\r\n                            <Setter Property=\"Grid.IsSharedSizeScope\" Value=\"true\" />\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"Role\" Value=\"SubmenuItem\">\r\n                            <Setter Property=\"DockPanel.Dock\" Value=\"Top\" />\r\n                            <Setter Property=\"Padding\" Value=\"0,2,0,2\" />\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ArrowPanel\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsSuspendingPopupAnimation\" Value=\"true\">\r\n                            <Setter Property=\"PopupAnimation\" Value=\"None\" TargetName=\"SubMenuPopup\" />\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"Icon\" Value=\"{x:Null}\">\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"Icon\" />\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"GlyphPanel\" />\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"Icon\" />\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"AllowsTransparency\" SourceName=\"SubMenuPopup\" Value=\"true\">\r\n                            <Setter Property=\"Margin\" Value=\"0,0,3,3\" TargetName=\"SubMenu\" />\r\n                            <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" TargetName=\"SubMenu\" />\r\n                            <Setter Property=\"BitmapEffect\" Value=\"{DynamicResource PopupDropShadow}\" TargetName=\"SubMenuBorder\" />\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"IsHighlighted\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HighlightOff}\" x:Name=\"HighlightOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HighlightOn}\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type Separator}\">\r\n        <Setter Property=\"Height\" Value=\"1\" />\r\n        <Setter Property=\"Margin\" Value=\"0,2,0,2\" />\r\n        <Setter Property=\"Focusable\" Value=\"false\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Separator}\">\r\n                    <Border BorderBrush=\"#FFB1703C\" BorderThickness=\"1\" />\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n\r\n    <Style TargetType=\"{x:Type TabControl}\">\r\n        <Setter Property=\"Background\" Value=\"#FFFFFFFF\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"Padding\" Value=\"5\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TabControl}\">\r\n                    <Grid ClipToBounds=\"true\" SnapsToDevicePixels=\"true\" KeyboardNavigation.TabNavigation=\"Local\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition x:Name=\"ColumnDefinition0\" />\r\n                            <ColumnDefinition x:Name=\"ColumnDefinition1\" Width=\"0\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\" x:Name=\"RowDefinition0\" />\r\n                            <RowDefinition Height=\"*\" x:Name=\"RowDefinition1\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Border Background=\"{DynamicResource TabControlHeaderBrush}\" CornerRadius=\"2,2,0,0\" x:Name=\"border\" Margin=\"0,0,0,-2\" Panel.ZIndex=\"100\">\r\n                            <TabPanel x:Name=\"HeaderPanel\" IsItemsHost=\"true\" Panel.ZIndex=\"1\" KeyboardNavigation.TabIndex=\"1\" RenderTransformOrigin=\"0.5,0.5\" Width=\"Auto\" Height=\"Auto\" Margin=\"4,0,0,0\">\r\n                                <TabPanel.LayoutTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform Angle=\"0\" />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </TabPanel.LayoutTransform>\r\n                                <TabPanel.RenderTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </TabPanel.RenderTransform>\r\n                            </TabPanel>\r\n                        </Border>\r\n                        <Border Grid.Row=\"1\" x:Name=\"ContentPanel\" Background=\"{DynamicResource TabControlContentBrush}\" BorderBrush=\"{DynamicResource TabControlContentBorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3,3,1,1\">\r\n                            <ContentPresenter Margin=\"4\" x:Name=\"PART_SelectedContentHost\" ContentSource=\"SelectedContent\" />\r\n                        </Border>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Bottom\">\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition1\" Value=\"Auto\" />\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"border\" Value=\"1\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"ContentPanel\" Value=\"2,2,0,0\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"border\" Value=\"0,0,2,2\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"HeaderPanel\" Value=\"4,-2.5,0,0\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"border\" Value=\"0,0,0,0\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Left\">\r\n\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"HeaderPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"ContentPanel\" Value=\"1\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition0\" Value=\"Auto\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition1\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition1\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"border\" Value=\"0\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"border\" Value=\"0,0,0,0\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"ContentPanel\" Value=\"0,0,0,0\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"border\" Value=\"0,2,2,0\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"ContentPanel\" Value=\"0,2,2,0\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"HeaderPanel\" Value=\"4,0,-2.5,0\" />\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Right\">\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"HeaderPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition1\" Value=\"Auto\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition1\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"border\" Value=\"1\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"ContentPanel\" Value=\"2,0,0,2\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"border\" Value=\"0,2,2,0\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"HeaderPanel\" Value=\"-3,0,0,0\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n\r\n    <Style d:IsControlPart=\"True\" TargetType=\"{x:Type TabItem}\">\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"Padding\" Value=\"10,6,10,6\" />\r\n        <Setter Property=\"MinWidth\" Value=\"5\" />\r\n        <Setter Property=\"MinHeight\" Value=\"5\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TabItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"SelectedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"UnSelectedState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"UnSelectedState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"TopUnselectedOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"TopUnselectedBorderOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"TopUnselectedOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"TopUnselectedBorderOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualTop\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualTop\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid x:Name=\"grid\" Margin=\"2,1,2,0\">\r\n                        <Grid.LayoutTransform>\r\n                            <TransformGroup>\r\n                                <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                <RotateTransform Angle=\"0\" />\r\n                                <TranslateTransform X=\"0\" Y=\"0\" />\r\n                            </TransformGroup>\r\n                        </Grid.LayoutTransform>\r\n                        <Grid>\r\n\r\n                            <Grid Margin=\"1,0,1,0\" x:Name=\"UnSelectedState\">\r\n                                <Border x:Name=\"TopUnselectedOver\" BorderBrush=\"{DynamicResource TabItemHoverBorderBrush}\" BorderThickness=\"1,1,1,0\" CornerRadius=\"2.21,2.21,.5,.5\" Opacity=\"0\" Background=\"{DynamicResource TabItemHoverBrush}\"/>\r\n                                <Border x:Name=\"TopUnselectedBorderOver\" Margin=\"-1,-1,-1,0.5\" BorderBrush=\"{DynamicResource TabItemHoverHighlightBrush}\" BorderThickness=\"1,1,1,0\" CornerRadius=\"3.5,3.5,0,0\" Opacity=\"0\" />\r\n                            </Grid>\r\n                            <Grid Margin=\"1,0,1,-1\" x:Name=\"SelectedState\" Opacity=\"0\">\r\n                                <Border x:Name=\"BackgroundTop\" BorderBrush=\"{DynamicResource TabItemSelectedBorderBrush}\" BorderThickness=\"2,0,2,0\" CornerRadius=\"3,3,0,0\" Background=\"{DynamicResource TabItemSelectedBrush}\"/>\r\n                                <Border x:Name=\"BorderTop\" BorderThickness=\"2,0,2,0\" CornerRadius=\"3,3,0,0\" BorderBrush=\"{DynamicResource TabItemBorderTopBrush}\"/>\r\n                                <Border x:Name=\"HighlightTop\" Margin=\"2,0,2,0\" BorderThickness=\"1,3,1,0\" CornerRadius=\"1.25,1.25,0,0\" BorderBrush=\"{DynamicResource TabItemHighlightTopBrush}\"/>\r\n                                <Border x:Name=\"BorderTop2\" Margin=\"-1,0,-1,0\" BorderBrush=\"{DynamicResource TabItemBorderTop2Brush}\" BorderThickness=\"1,1,1,0\" CornerRadius=\"3,3,0,0\" IsHitTestVisible=\"false\" />\r\n                                <Border x:Name=\"FocusVisualTop\" Margin=\"-1,0,-1,0\" BorderThickness=\"3,2,3,0\" CornerRadius=\"3,3,0,0\" Opacity=\"0\" BorderBrush=\"{DynamicResource TabItemFocusBrush}\">\r\n                                </Border>\r\n                            </Grid>\r\n                            <Border x:Name=\"DisabledVisualTopSelected\" Margin=\"1,0,1,0\" Background=\"{DynamicResource DisabledBackgroundBrush}\" CornerRadius=\"3,3,0,0\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" />\r\n                            <ContentPresenter HorizontalAlignment=\"Center\" Margin=\"{TemplateBinding Padding}\" x:Name=\"ContentSite\" VerticalAlignment=\"Center\" RecognizesAccessKey=\"True\" ContentSource=\"Header\" />\r\n\r\n                        </Grid>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Left\">\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"grid\">\r\n                                <Setter.Value>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform Angle=\"-90\" />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Right\">\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"grid\">\r\n                                <Setter.Value>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform Angle=\"90\" />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Bottom\">\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"ContentSite\">\r\n                                <Setter.Value>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform Angle=\"180\" />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"grid\">\r\n                                <Setter.Value>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform Angle=\"180\" />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\" />\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" x:Name=\"HoverOn_BeginStoryboard\" />\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" />\r\n                                <Condition Property=\"Selector.IsSelected\" Value=\"False\" />\r\n                            </MultiTrigger.Conditions>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsSelected\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOff}\" x:Name=\"SelectedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\" />\r\n                            </Trigger.EnterActions>\r\n                            <Setter Property=\"Panel.ZIndex\" Value=\"100\" />\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" SourceName=\"grid\" />\r\n                                <Condition Property=\"Selector.IsSelected\" Value=\"True\" />\r\n                            </MultiTrigger.Conditions>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\">\r\n            <Setter.Value>\r\n                <SolidColorBrush Color=\"{DynamicResource WhiteColor}\" />\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Style.Triggers>\r\n            <Trigger Property=\"Selector.IsSelected\" Value=\"True\">\r\n                <Setter Property=\"Foreground\" Value=\"{DynamicResource OutsideFontColor}\" />\r\n            </Trigger>\r\n        </Style.Triggers>\r\n    </Style>\r\n\r\n\r\n    <Style x:Key=\"NuclearSliderThumb\" d:IsControlPart=\"True\" TargetType=\"{x:Type Thumb}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"Height\" Value=\"21\" />\r\n        <Setter Property=\"Width\" Value=\"15\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"Over\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"Over\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"Press\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"Press\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Path x:Name=\"Base\" Margin=\"1,1.312,1,0.375\" Fill=\"{DynamicResource SliderThumbBrush}\" Stretch=\"Fill\" Stroke=\"{DynamicResource SliderThumbBorderBrush}\" StrokeThickness=\"1\" StrokeLineJoin=\"Round\" Data=\"M-9.958333,0.78716499 L-3.204694,0.78717428 L-3.2052999,1.4266928 L-6.6465902,1.7712332 L-9.9818907,1.433604 z\" />\r\n                        <Path x:Name=\"Over\" Margin=\"2,2.312,2,1.375\" Fill=\"{DynamicResource MouseOverBrush}\" Stretch=\"Fill\" Data=\"M-9.958333,0.78716499 L-3.204694,0.78717428 L-3.2052999,1.4276805 L-6.6465902,1.7722208 L-9.9818907,1.4345917 z\" Opacity=\"0\" />\r\n                        <Path x:Name=\"Press\" Margin=\"2,2.312,2,1.375\" Fill=\"{DynamicResource PressedBrush}\" Stretch=\"Fill\" Data=\"M-9.958333,0.78716499 L-3.204694,0.78717428 L-3.2052999,1.4276805 L-6.6465902,1.7722208 L-9.9818907,1.4345917 z\" Opacity=\"0\" />\r\n                        <Path x:Name=\"whiteGradient\" Margin=\"2,2.312,2,1.375\" Stretch=\"Fill\" Data=\"M-9.958333,0.78716499 L-3.204694,0.78717428 L-3.2052999,1.4276805 L-6.6465902,1.7722208 L-9.9818907,1.4345917 z\">\r\n                            <Path.Fill>\r\n                                <LinearGradientBrush EndPoint=\"0.5,0\" StartPoint=\"0.563,0.979\">\r\n                                    <GradientStop Color=\"#5FFFFFFF\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#5FFFFFFF\" Offset=\"0.259\" />\r\n                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"0.393\" />\r\n                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"0.643\" />\r\n                                    <GradientStop Color=\"#75FFFFFF\" Offset=\"0.75\" />\r\n                                    <GradientStop Color=\"#99FFFFFF\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Path.Fill>\r\n                        </Path>\r\n                        <Path x:Name=\"Line\" Margin=\"-1,-2,0,0\" Height=\"10\" Width=\"1\" Stretch=\"Fill\" Stroke=\"#FF6B81A0\" StrokeThickness=\"1\" Data=\"M5.4375,2.6875 L5.4375,12.1875\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" />\r\n                        <Path x:Name=\"Line2\" Margin=\"0,-2,-1,0\" Height=\"10\" Width=\"1\" Stretch=\"Fill\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\" Data=\"M5.4375,2.6875 L5.4375,12.1875\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" />\r\n                        <Path x:Name=\"DisabledVisualElement\" Margin=\"1,1.312,1,0.375\" Fill=\"#FFFFFFFF\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\" StrokeLineJoin=\"Round\" Stretch=\"Fill\" Opacity=\"0\" Data=\"M-9.958333,0.78716499 L-3.204694,0.78717428 L-3.2052999,1.4266928 L-6.6465902,1.7712332 L-9.9818907,1.433604 z\" IsHitTestVisible=\"false\" />\r\n                        <Path x:Name=\"FocusVisualElement\" Stretch=\"Fill\" Stroke=\"{DynamicResource FocusBrush}\" StrokeThickness=\"1\" StrokeLineJoin=\"Round\" Data=\"M-9.958333,0.78716499 L-3.204694,0.78717428 L-3.2052999,1.4276805 L-6.6465902,1.7722208 L-9.9818907,1.4345917 z\" IsHitTestVisible=\"false\" Opacity=\"0\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard1\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard1\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsDragging\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"HoverOff_BeginStoryboard\" Storyboard=\"{StaticResource HoverOff}\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"DisabledVisualElement\" Value=\"0.5\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n\r\n    <Style TargetType=\"{x:Type Slider}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Slider}\">\r\n                    <Grid x:Name=\"GridRoot\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\" />\r\n                            <RowDefinition Height=\"Auto\" MinHeight=\"{TemplateBinding MinHeight}\" />\r\n                            <RowDefinition Height=\"Auto\" />\r\n                        </Grid.RowDefinitions>\r\n\r\n                        <TickBar Visibility=\"Collapsed\" x:Name=\"TopTick\" Height=\"4\" SnapsToDevicePixels=\"True\" Placement=\"Top\" Fill=\"#FF405A78\" />\r\n                        <Rectangle Margin=\"7.5,0,7.5,0\" Grid.Column=\"0\" Height=\"6\" RadiusX=\"3\" RadiusY=\"3\" Grid.Row=\"1\" Fill=\"{DynamicResource SliderBackgroundBrush}\"/>\r\n\r\n                        <Track Grid.Row=\"1\" x:Name=\"PART_Track\">\r\n                            <Track.Thumb>\r\n                                <Thumb Style=\"{DynamicResource NuclearSliderThumb}\" />\r\n                            </Track.Thumb>\r\n                            <Track.IncreaseRepeatButton>\r\n                                <RepeatButton Style=\"{DynamicResource NuclearScrollRepeatButtonStyle}\" Command=\"Slider.IncreaseLarge\" />\r\n                            </Track.IncreaseRepeatButton>\r\n                            <Track.DecreaseRepeatButton>\r\n                                <RepeatButton Style=\"{DynamicResource NuclearScrollRepeatButtonStyle}\" Command=\"Slider.DecreaseLarge\" />\r\n                            </Track.DecreaseRepeatButton>\r\n                        </Track>\r\n\r\n                        <TickBar Visibility=\"Collapsed\" Grid.Row=\"2\" x:Name=\"BottomTick\" Height=\"4\" SnapsToDevicePixels=\"True\" Placement=\"Bottom\" Fill=\"{TemplateBinding Foreground}\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"TickPlacement\" Value=\"TopLeft\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"TopTick\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"TickPlacement\" Value=\"BottomRight\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"BottomTick\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"TickPlacement\" Value=\"Both\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"TopTick\" />\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"BottomTick\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"GridRoot\" Value=\"0.65\" />\r\n\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"Orientation\" Value=\"Vertical\">\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"GridRoot\">\r\n                                <Setter.Value>\r\n                                    <RotateTransform Angle=\"-90\" />\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                            <Setter TargetName=\"PART_Track\" Property=\"Orientation\" Value=\"Horizontal\" />\r\n                        </Trigger>\r\n\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type TreeView}\">\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource ControlBackgroundBrush}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource OutsideFontColor}\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource ControlBorderBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Padding\" Value=\"4\" />\r\n        <Setter Property=\"Cursor\" Value=\"Arrow\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TreeView}\">\r\n                    <Grid>\r\n                        <Border x:Name=\"Border\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\" Background=\"{DynamicResource ControlBackgroundBrush}\">\r\n                            <ScrollViewer Focusable=\"False\" Background=\"{TemplateBinding Background}\" Padding=\"4\" HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Auto\" CanContentScroll=\"False\">\r\n                                <ItemsPresenter />\r\n                            </ScrollViewer>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"NuclearTreeViewItemToggleButton\" d:IsControlPart=\"True\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Focusable\" Value=\"False\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <ColorAnimation Duration=\"0\" Storyboard.TargetName=\"UncheckedVisual\" Storyboard.TargetProperty=\"(Shape.Fill).(SolidColorBrush.Color)\" To=\"#FFFFCB66\" />\r\n                            <ColorAnimation Duration=\"0\" Storyboard.TargetName=\"UncheckedVisual\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\" To=\"#FFFFCB66\" />\r\n                            <ColorAnimation Duration=\"0\" Storyboard.TargetName=\"CheckedVisual\" Storyboard.TargetProperty=\"(Shape.Fill).(SolidColorBrush.Color)\" To=\"#FFFFCB66\" />\r\n                            <ColorAnimation Duration=\"0\" Storyboard.TargetName=\"CheckedVisual\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\" To=\"#FFFFCB66\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <ColorAnimation Duration=\"0\" Storyboard.TargetName=\"UncheckedVisual\" Storyboard.TargetProperty=\"(Shape.Fill).(SolidColorBrush.Color)\" To=\"#FF9EC6FB\" />\r\n                            <ColorAnimation Duration=\"0\" Storyboard.TargetName=\"UncheckedVisual\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\" To=\"#FF9EC6FB\" />\r\n                            <ColorAnimation Duration=\"0\" Storyboard.TargetName=\"CheckedVisual\" Storyboard.TargetProperty=\"(Shape.Fill).(SolidColorBrush.Color)\" To=\"#FFE56E17\" />\r\n                            <ColorAnimation Duration=\"0\" Storyboard.TargetName=\"CheckedVisual\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\" To=\"#FFE56E17\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOn\">\r\n                            <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"UncheckedVisual\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"CheckedVisual\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOff\">\r\n                            <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"UncheckedVisual\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                            <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"CheckedVisual\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid HorizontalAlignment=\"Right\" Margin=\"2,2,5,2\">\r\n                        <Path x:Name=\"UncheckedVisual\" Height=\"9\" Width=\"6\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Center\" Fill=\"#FF9EC6FB\" Stroke=\"#FF9EC6FB\" StrokeLineJoin=\"Miter\" Data=\"M 0,0 L 0,9 L 5,4.5 Z\" />\r\n                        <Path x:Name=\"CheckedVisual\" Height=\"6\" Width=\"6\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Center\" Fill=\"#FFE56E17\" Stroke=\"#FFE56E17\" StrokeLineJoin=\"Miter\" Opacity=\"0\" Data=\"M 6,0 L 6,6 L 0,6 Z\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOff}\" x:Name=\"CheckedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOn}\" x:Name=\"CheckedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style d:IsControlPart=\"True\" TargetType=\"{x:Type TreeViewItem}\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"Padding\" Value=\"5,3,15,3\" />\r\n        <Setter Property=\"Cursor\" Value=\"Arrow\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TreeViewItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"SelectedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"select_gradient\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"select_gradient\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"hover_gradient\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.85\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.65\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"hover_gradient\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"InactiveOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"inactive\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.5\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"InactiveOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"inactive\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid x:Name=\"grid\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition MinWidth=\"19\" Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"*\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\" />\r\n                            <RowDefinition />\r\n                        </Grid.RowDefinitions>\r\n                        <ToggleButton x:Name=\"Expander\" Style=\"{DynamicResource NuclearTreeViewItemToggleButton}\" IsChecked=\"{Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}\" ClickMode=\"Press\" />\r\n\r\n                        <Rectangle x:Name=\"select_gradient\" Grid.Column=\"1\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" IsHitTestVisible=\"False\" Fill=\"{DynamicResource PressedBrush}\" Stroke=\"{DynamicResource PressedBorderBrush}\"/>\r\n                        <Rectangle x:Name=\"inactive\" Grid.Column=\"1\" Fill=\"#FF999999\" Stroke=\"#FF333333\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\" IsHitTestVisible=\"False\" />\r\n\r\n                        <Rectangle x:Name=\"hover_gradient\" Stroke=\"{DynamicResource FocusBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" IsHitTestVisible=\"False\" Grid.Column=\"1\" Fill=\"{DynamicResource MouseOverBrush}\"/>\r\n                        <Rectangle x:Name=\"highlight\" Margin=\"1\" StrokeThickness=\"1\" RadiusX=\"0.5\" RadiusY=\"0.5\" Opacity=\"0\" IsHitTestVisible=\"False\" Grid.Column=\"1\" Stroke=\"{DynamicResource MouseOverHighlightBrush}\"/>\r\n\r\n                        <Border Grid.Column=\"1\" x:Name=\"Selection_Border\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\">\r\n                            <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" x:Name=\"PART_Header\" ContentSource=\"Header\" />\r\n                        </Border>\r\n                        <ItemsPresenter Grid.Column=\"1\" Grid.ColumnSpan=\"2\" Grid.Row=\"1\" x:Name=\"ItemsHost\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\" SourceName=\"Selection_Border\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" x:Name=\"HoverOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsExpanded\" Value=\"false\">\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ItemsHost\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"HasItems\" Value=\"false\">\r\n                            <Setter Property=\"Visibility\" Value=\"Hidden\" TargetName=\"Expander\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsSelected\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"SelectedOff_BeginStoryboard\" Storyboard=\"{StaticResource SelectedOff}\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource InactiveOff}\" x:Name=\"InactiveOff_BeginStoryboard\" />\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource InactiveOn}\" x:Name=\"InactiveOn_BeginStoryboard\" />\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsSelected\" Value=\"true\" />\r\n                                <Condition Property=\"IsSelectionActive\" Value=\"false\" />\r\n                            </MultiTrigger.Conditions>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Static ToolBar.ButtonStyleKey}\" TargetType=\"{x:Type Button}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource NuclearButtonFocusVisual}\" />\r\n        <Setter Property=\"Foreground\" Value=\"#FF042271\" />\r\n\t\t\t\t\t\t<Setter Property=\"FontSize\" Value=\"10\"/>\r\n\t\t\t\t<Setter Property=\"MinHeight\" Value=\"18\"/>\r\n\t\t\t\t<Setter Property=\"MinWidth\" Value=\"50\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"Padding\" Value=\"3\" />\r\n        <Setter Property=\"Template\" Value=\"{DynamicResource ButtonTemplate}\" />\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Static ToolBar.CheckBoxStyleKey}\" TargetType=\"{x:Type CheckBox}\">\r\n\t\t\t<Setter Property=\"FontSize\" Value=\"10\"/>\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource CheckBoxFocusVisual}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource OutsideFontColor}\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"Padding\" Value=\"4,1,0,0\" />\r\n        <Setter Property=\"Template\" Value=\"{DynamicResource CheckBoxTemplate}\" />\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Static ToolBar.RadioButtonStyleKey}\" TargetType=\"{x:Type RadioButton}\">\r\n\t\t\t<Setter Property=\"FontSize\" Value=\"10\"/>\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource RadioButtonFocusVisual}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource OutsideFontColor}\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"Padding\" Value=\"4,1,0,0\" />\r\n        <Setter Property=\"Template\" Value=\"{DynamicResource RadioButtonTemplate}\" />\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Static ToolBar.ComboBoxStyleKey}\" TargetType=\"{x:Type ComboBox}\">\r\n\t\t\t<Setter Property=\"FontSize\" Value=\"10\"/>\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"Padding\" Value=\"6,2,25,2\" />\r\n        \r\n<Setter Property=\"Template\" Value=\"{DynamicResource ComboBoxTemplate}\" />\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Static ToolBar.TextBoxStyleKey}\" TargetType=\"{x:Type TextBox}\">\r\n\t\t\t<Setter Property=\"FontSize\" Value=\"10\"/>\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\" />\r\n        <Setter Property=\"AllowDrop\" Value=\"true\" />\r\n        <Setter Property=\"Background\" >\r\n            <Setter.Value>\r\n                <SolidColorBrush Color=\"{DynamicResource WhiteColor}\"/>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"Padding\" Value=\"4\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"#FFABAEB3\" />\r\n                    <GradientStop Color=\"#FFE2E8EE\" Offset=\"1\" />\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Template\" Value=\"{DynamicResource TextBoxTemplate}\" />\r\n    </Style>\r\n\r\n    <LinearGradientBrush x:Key=\"ToolBarHorizontalBackground\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#FFFFFF\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FFFBFF\" Offset=\"0.5\" />\r\n        <GradientStop Color=\"#F7F7F7\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"ToolBarToggleButtonHorizontalBackground\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#ECECEC\" Offset=\"0\" />\r\n        <GradientStop Color=\"#DDDDDD\" Offset=\"0.5\" />\r\n        <GradientStop Color=\"#A0A0A0\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"ToolBarButtonHover\" Color=\"#FF125E7C\" />\r\n    <SolidColorBrush x:Key=\"ToolBarGripper\" Color=\"#C6C3C6\" />\r\n    <Style x:Key=\"ToolBarHorizontalOverflowButtonStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource ToolBarToggleButtonHorizontalBackground}\" />\r\n        <Setter Property=\"MinHeight\" Value=\"0\" />\r\n        <Setter Property=\"MinWidth\" Value=\"0\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundOver_Highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.65\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundOver_Highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Border SnapsToDevicePixels=\"true\" x:Name=\"Bd\" CornerRadius=\"0,0,0,0\" Background=\"{DynamicResource NormalBrush}\"/>\r\n                        <Border x:Name=\"BackgroundOver\" BorderThickness=\"1\" CornerRadius=\"1.75\" Opacity=\"0\" Background=\"{DynamicResource MouseOverBrush}\" BorderBrush=\"{DynamicResource MouseOverBorderBrush}\"/>\r\n                        <Border x:Name=\"BackgroundOver_Highlight\" BorderThickness=\"1,0,1,1\" CornerRadius=\"1\" Opacity=\"0\" Margin=\"0,0,0,0\" BorderBrush=\"{DynamicResource MouseOverHighlightBrush}\"/>\r\n                        <Canvas SnapsToDevicePixels=\"true\" HorizontalAlignment=\"Right\" Margin=\"7,2,2,2\" VerticalAlignment=\"Bottom\" Width=\"6\" Height=\"7\">\r\n                            <Path Stroke=\"White\" Data=\"M 1 1.5 L 6 1.5\" />\r\n                            <Path Stroke=\"{TemplateBinding Foreground}\" Data=\"M 0 0.5 L 5 0.5\" />\r\n                            <Path Fill=\"White\" Data=\"M 0.5 4 L 6.5 4 L 3.5 7 Z\" />\r\n                            <Path Fill=\"{TemplateBinding Foreground}\" Data=\"M -0.5 3 L 5.5 3 L 2.5 6 Z\" />\r\n                        </Canvas>\r\n                        <Border x:Name=\"FocusVisualElement\" Margin=\"-1\" BorderBrush=\"#FFE99862\" BorderThickness=\"1\" CornerRadius=\"2.75\" IsHitTestVisible=\"false\" Opacity=\"0\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{StaticResource ToolBarGripper}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <SolidColorBrush x:Key=\"ToolBarSubMenuBackground\" Color=\"#FFFDFDFD\" />\r\n    <SolidColorBrush x:Key=\"ToolBarMenuBorder\" Color=\"#FFFFFFFF\" />\r\n    <Style x:Key=\"ToolBarThumbStyle\" TargetType=\"{x:Type Thumb}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <Border SnapsToDevicePixels=\"True\" Background=\"Transparent\" Padding=\"{TemplateBinding Padding}\" CornerRadius=\"0,0,0,0\">\r\n                        <Rectangle>\r\n                            <Rectangle.Fill>\r\n                                <DrawingBrush TileMode=\"Tile\" Viewbox=\"0,0,4,4\" ViewboxUnits=\"Absolute\" Viewport=\"0,0,4,4\" ViewportUnits=\"Absolute\">\r\n                                    <DrawingBrush.Drawing>\r\n                                        <DrawingGroup>\r\n                                            <GeometryDrawing Brush=\"White\" Geometry=\"M 1 1 L 1 3 L 3 3 L 3 1 z\" />\r\n                                            <GeometryDrawing Brush=\"{StaticResource ToolBarGripper}\" Geometry=\"M 0 0 L 0 2 L 2 2 L 2 0 z\" />\r\n                                        </DrawingGroup>\r\n                                    </DrawingBrush.Drawing>\r\n                                </DrawingBrush>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Setter Property=\"Cursor\" Value=\"SizeAll\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <LinearGradientBrush x:Key=\"ToolBarToggleButtonVerticalBackground\" EndPoint=\"1,0\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#ECECEC\" Offset=\"0\" />\r\n        <GradientStop Color=\"#DDDDDD\" Offset=\"0.5\" />\r\n        <GradientStop Color=\"#A0A0A0\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <Style x:Key=\"ToolBarVerticalOverflowButtonStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource ToolBarToggleButtonVerticalBackground}\" />\r\n        <Setter Property=\"MinHeight\" Value=\"0\" />\r\n        <Setter Property=\"MinWidth\" Value=\"0\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <Border SnapsToDevicePixels=\"true\" x:Name=\"Bd\" Background=\"{TemplateBinding Background}\" CornerRadius=\"0,0,3,3\">\r\n                        <Canvas SnapsToDevicePixels=\"true\" HorizontalAlignment=\"Right\" Margin=\"2,7,2,2\" VerticalAlignment=\"Bottom\" Width=\"7\" Height=\"6\">\r\n                            <Path Stroke=\"White\" Data=\"M 1.5 1 L 1.5 6\" />\r\n                            <Path Stroke=\"{TemplateBinding Foreground}\" Data=\"M 0.5 0 L 0.5 5\" />\r\n                            <Path Fill=\"White\" Data=\"M 3.5 0.5 L 7 3.5 L 4 6.5 Z\" />\r\n                            <Path Fill=\"{TemplateBinding Foreground}\" Data=\"M 3 -0.5 L 6 2.5 L 3 5.5 Z\" />\r\n                        </Canvas>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Setter Property=\"Background\" TargetName=\"Bd\" Value=\"{StaticResource ToolBarButtonHover}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                            <Setter Property=\"Background\" TargetName=\"Bd\" Value=\"{StaticResource ToolBarButtonHover}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{StaticResource ToolBarGripper}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <LinearGradientBrush x:Key=\"ToolBarVerticalBackground\" EndPoint=\"1,0\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#FFFFFF\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FFFBFF\" Offset=\"0.5\" />\r\n        <GradientStop Color=\"#F7F7F7\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <Style TargetType=\"{x:Type ToolBar}\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource ToolBarHorizontalBackground}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"#FFB1703C\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToolBar}\">\r\n                    <Grid SnapsToDevicePixels=\"true\" Margin=\"3,1,1,1\" x:Name=\"Grid\">\r\n                        <Grid HorizontalAlignment=\"Right\" x:Name=\"OverflowGrid\">\r\n                            <ToggleButton IsEnabled=\"{TemplateBinding HasOverflowItems}\" FocusVisualStyle=\"{x:Null}\" x:Name=\"OverflowButton\" Style=\"{StaticResource ToolBarHorizontalOverflowButtonStyle}\" ClickMode=\"Press\" IsChecked=\"{Binding Path=IsOverflowOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\">\r\n                                <ToggleButton.Background>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                        <GradientStop Color=\"#FF8AAEDA\" Offset=\"0.521\" />\r\n                                        <GradientStop Color=\"#FFC6D6EC\" Offset=\"0.194\" />\r\n                                        <GradientStop Color=\"#FFB4C9E5\" Offset=\"0.811\" />\r\n                                        <GradientStop Color=\"#FFB7C8E0\" Offset=\"0.507\" />\r\n                                        <GradientStop Color=\"#FFD1DEF0\" Offset=\"1\" />\r\n                                    </LinearGradientBrush>\r\n                                </ToggleButton.Background>\r\n                            </ToggleButton>\r\n                            <Popup Focusable=\"false\" AllowsTransparency=\"true\" IsOpen=\"{Binding Path=IsOverflowOpen, RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Bottom\" PopupAnimation=\"{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}\" StaysOpen=\"False\" x:Name=\"OverflowPopup\">\r\n                                <Border x:Name=\"Shdw\">\r\n                                    <Border BorderThickness=\"1,1,1,1\" BorderBrush=\"{TemplateBinding BorderBrush}\">\r\n                                        <Border.Background>\r\n                                            <LinearGradientBrush EndPoint=\"1.204,0.5\" StartPoint=\"0.056,0.5\">\r\n                                                <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                                <GradientStop Color=\"#FFD4D7DB\" Offset=\"1\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Border.Background>\r\n                                        <ToolBarOverflowPanel Focusable=\"true\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" FocusVisualStyle=\"{x:Null}\" Margin=\"2\" x:Name=\"PART_ToolBarOverflowPanel\" WrapWidth=\"200\" KeyboardNavigation.DirectionalNavigation=\"Cycle\" KeyboardNavigation.TabNavigation=\"Cycle\" />\r\n                                    </Border>\r\n                                </Border>\r\n                            </Popup>\r\n                        </Grid>\r\n                        <Border Margin=\"0,0,11,0\" x:Name=\"MainPanelBorder\" BorderThickness=\"1\" CornerRadius=\"0,0,0,0\" Padding=\"{TemplateBinding Padding}\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\">\r\n                            <Grid>\r\n\r\n                                <DockPanel KeyboardNavigation.TabIndex=\"1\" KeyboardNavigation.TabNavigation=\"Local\">\r\n                                    <Thumb Padding=\"6,5,1,6\" Margin=\"-3,-1,0,0\" x:Name=\"ToolBarThumb\" Style=\"{StaticResource ToolBarThumbStyle}\" Width=\"10\" />\r\n                                    <ContentPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" HorizontalAlignment=\"Center\" Margin=\"4,0,4,0\" x:Name=\"ToolBarHeader\" VerticalAlignment=\"Center\" ContentSource=\"Header\" />\r\n                                    <ToolBarPanel SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Margin=\"0,1,2,2\" x:Name=\"PART_ToolBarPanel\" IsItemsHost=\"true\" Background=\"{DynamicResource NormalBrush}\"/>\r\n                                </DockPanel>\r\n                            </Grid>\r\n                        </Border>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsOverflowOpen\" Value=\"true\">\r\n                            <Setter Property=\"IsEnabled\" TargetName=\"ToolBarThumb\" Value=\"false\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"Header\" Value=\"{x:Null}\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"ToolBarHeader\" Value=\"Collapsed\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"ToolBarTray.IsLocked\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"ToolBarThumb\" Value=\"Collapsed\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"HasDropShadow\" SourceName=\"OverflowPopup\" Value=\"true\">\r\n                            <Setter Property=\"Margin\" TargetName=\"Shdw\" Value=\"0,0,5,5\" />\r\n                            <Setter Property=\"SnapsToDevicePixels\" TargetName=\"Shdw\" Value=\"true\" />\r\n                            <Setter Property=\"Background\" TargetName=\"Shdw\" Value=\"#71000000\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"Orientation\" Value=\"Vertical\">\r\n                            <Setter Property=\"Margin\" TargetName=\"Grid\" Value=\"1,3,1,1\" />\r\n                            <Setter Property=\"Style\" TargetName=\"OverflowButton\" Value=\"{StaticResource ToolBarVerticalOverflowButtonStyle}\" />\r\n                            <Setter Property=\"Height\" TargetName=\"ToolBarThumb\" Value=\"10\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ToolBarThumb\" Value=\"Auto\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"ToolBarThumb\" Value=\"-1,-3,0,0\" />\r\n                            <Setter Property=\"Padding\" TargetName=\"ToolBarThumb\" Value=\"5,6,6,1\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"ToolBarHeader\" Value=\"0,0,0,4\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"PART_ToolBarPanel\" Value=\"1,0,2,2\" />\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ToolBarThumb\" Value=\"Top\" />\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ToolBarHeader\" Value=\"Top\" />\r\n                            <Setter Property=\"HorizontalAlignment\" TargetName=\"OverflowGrid\" Value=\"Stretch\" />\r\n                            <Setter Property=\"VerticalAlignment\" TargetName=\"OverflowGrid\" Value=\"Bottom\" />\r\n                            <Setter Property=\"Placement\" TargetName=\"OverflowPopup\" Value=\"Right\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"MainPanelBorder\" Value=\"0,0,0,11\" />\r\n                            <Setter Property=\"Background\" Value=\"{StaticResource ToolBarVerticalBackground}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\" />\r\n    </Style>\r\n\r\n    <BorderGapMaskConverter x:Key=\"BorderGapMaskConverter\" />\r\n    <Style TargetType=\"{x:Type GroupBox}\">\r\n        <Setter Property=\"BorderBrush\" Value=\"#D5DFE5\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource NuclearButtonFocusVisual}\" />\r\n        <Setter Property=\"Foreground\" Value=\"#FF042271\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type GroupBox}\">\r\n                    <Grid SnapsToDevicePixels=\"true\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"6\" />\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"*\" />\r\n                            <ColumnDefinition Width=\"6\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\" />\r\n                            <RowDefinition Height=\"Auto\" />\r\n                            <RowDefinition Height=\"*\" />\r\n                            <RowDefinition Height=\"6\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Border Grid.ColumnSpan=\"4\" Grid.RowSpan=\"4\" CornerRadius=\"4,4,4,4\" BorderThickness=\"1,1,1,1\">\r\n                            <Border.Background>\r\n                                <LinearGradientBrush EndPoint=\"1.204,0.5\" StartPoint=\"0.056,0.5\">\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#FFD4D7DB\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <Border Grid.ColumnSpan=\"4\" Grid.Row=\"1\" Grid.RowSpan=\"3\" BorderThickness=\"1,1,1,1\" CornerRadius=\"4\" BorderBrush=\"{DynamicResource ControlBorderBrush}\">\r\n                            <Border.OpacityMask>\r\n                                <MultiBinding Converter=\"{StaticResource BorderGapMaskConverter}\" ConverterParameter=\"7\">\r\n                                    <Binding Path=\"ActualWidth\" ElementName=\"Header\" />\r\n                                    <Binding Path=\"ActualWidth\" RelativeSource=\"{RelativeSource Self}\" />\r\n                                    <Binding Path=\"ActualHeight\" RelativeSource=\"{RelativeSource Self}\" />\r\n                                </MultiBinding>\r\n                            </Border.OpacityMask>\r\n                            <Border BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\">\r\n                                <Border.BorderBrush>\r\n                                    <SolidColorBrush Color=\"{DynamicResource MainColor}\" />\r\n                                </Border.BorderBrush>\r\n                                <Border BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\">\r\n                                    <Border.BorderBrush>\r\n                                        <SolidColorBrush Color=\"{DynamicResource MainColor}\" />\r\n                                    </Border.BorderBrush>\r\n                                </Border>\r\n                            </Border>\r\n                        </Border>\r\n                        <Border Grid.Column=\"0\" Grid.ColumnSpan=\"4\" Grid.Row=\"1\" Grid.RowSpan=\"3\" Background=\"{TemplateBinding Background}\" BorderBrush=\"Transparent\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"4\" />\r\n                        <Border Grid.ColumnSpan=\"4\" Grid.RowSpan=\"2\" BorderThickness=\"1,1,1,0\" CornerRadius=\"2,2,0,0\" x:Name=\"Main\">\r\n                            <Border x:Name=\"BackgroundNorm\" BorderThickness=\"1\" CornerRadius=\"1.75\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\"/>\r\n                        </Border>\r\n\r\n                        <Border x:Name=\"Header\" Grid.Column=\"1\" Grid.Row=\"0\" Grid.RowSpan=\"2\" Padding=\"3,1,3,0\">\r\n                            <ContentPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" ContentSource=\"Header\" RecognizesAccessKey=\"True\" Margin=\"0,4,0,4\" />\r\n                        </Border>\r\n\r\n                        <ContentPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Margin=\"{TemplateBinding Padding}\" Grid.Column=\"1\" Grid.ColumnSpan=\"2\" Grid.Row=\"2\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"{x:Static GridView.GridViewScrollViewerStyleKey}\" TargetType=\"{x:Type ScrollViewer}\">\r\n        <Setter Property=\"Focusable\" Value=\"false\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ScrollViewer}\">\r\n                    <Grid SnapsToDevicePixels=\"true\" Background=\"{TemplateBinding Background}\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\" />\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"*\" />\r\n                            <RowDefinition Height=\"Auto\" />\r\n                        </Grid.RowDefinitions>\r\n                        <DockPanel Margin=\"{TemplateBinding Padding}\">\r\n                            <ScrollViewer Focusable=\"false\" DockPanel.Dock=\"Top\" HorizontalScrollBarVisibility=\"Hidden\" VerticalScrollBarVisibility=\"Hidden\">\r\n                                <GridViewHeaderRowPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Margin=\"2,0,2,0\" AllowsColumnReorder=\"{Binding Path=TemplatedParent.View.AllowsColumnReorder, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderContainerStyle=\"{Binding Path=TemplatedParent.View.ColumnHeaderContainerStyle, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderContextMenu=\"{Binding Path=TemplatedParent.View.ColumnHeaderContextMenu, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderTemplate=\"{Binding Path=TemplatedParent.View.ColumnHeaderTemplate, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderTemplateSelector=\"{Binding Path=TemplatedParent.View.ColumnHeaderTemplateSelector, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderToolTip=\"{Binding Path=TemplatedParent.View.ColumnHeaderToolTip, RelativeSource={RelativeSource TemplatedParent}}\" Columns=\"{Binding Path=TemplatedParent.View.Columns, RelativeSource={RelativeSource TemplatedParent}}\" />\r\n\r\n                            </ScrollViewer>\r\n                            <ScrollContentPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" x:Name=\"PART_ScrollContentPresenter\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" CanContentScroll=\"{TemplateBinding CanContentScroll}\" KeyboardNavigation.DirectionalNavigation=\"Local\" />\r\n                        </DockPanel>\r\n                        <ScrollBar Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Cursor=\"Arrow\" x:Name=\"PART_HorizontalScrollBar\" Grid.Row=\"1\" Orientation=\"Horizontal\" ViewportSize=\"{TemplateBinding ViewportWidth}\" Maximum=\"{TemplateBinding ScrollableWidth}\" Minimum=\"0.0\" Value=\"{Binding Path=HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" />\r\n                        <ScrollBar Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Cursor=\"Arrow\" x:Name=\"PART_VerticalScrollBar\" Grid.Column=\"1\" Orientation=\"Vertical\" ViewportSize=\"{TemplateBinding ViewportHeight}\" Maximum=\"{TemplateBinding ScrollableHeight}\" Minimum=\"0.0\" Value=\"{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" />\r\n                        <DockPanel Grid.Column=\"1\" Grid.Row=\"1\" Background=\"{Binding Path=Background, ElementName=PART_VerticalScrollBar}\" LastChildFill=\"false\">\r\n                            <Rectangle Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Width=\"1\" Fill=\"White\" DockPanel.Dock=\"Left\" />\r\n                            <Rectangle Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Height=\"1\" Fill=\"White\" DockPanel.Dock=\"Top\" />\r\n                        </DockPanel>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style TargetType=\"{x:Type ListView}\">\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\" />\r\n        <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\" />\r\n        <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"true\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"#FFB1703C\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Padding\" Value=\"1\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListView}\">\r\n                    <Border x:Name=\"Border\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"1\">\r\n                        <Border.Background>\r\n                            <LinearGradientBrush EndPoint=\"1.204,0.5\" StartPoint=\"0.056,0.5\">\r\n                                <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                <GradientStop Color=\"#FFD4D7DB\" Offset=\"1\" />\r\n                            </LinearGradientBrush>\r\n                        </Border.Background>\r\n\r\n                        <ScrollViewer Padding=\"{TemplateBinding Padding}\" Style=\"{DynamicResource {x:Static GridView.GridViewScrollViewerStyleKey}}\">\r\n                            <ItemsPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" />\r\n                        </ScrollViewer>\r\n                    </Border>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                            <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\" />\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"ListViewItemFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Rectangle Stroke=\"#8E6EA6F5\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" />\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type ListViewItem}\">\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{StaticResource ListViewItemFocusVisual}\" />\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Margin\" Value=\"0,0,0,1\" />\r\n        <Setter Property=\"Padding\" Value=\"5,2,5,2\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListViewItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundGradientOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0.73\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundGradientOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundGradientSelected\" Storyboard.TargetProperty=\"Opacity\" To=\"0.84\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundGradientSelectedDisabled\" Storyboard.TargetProperty=\"Opacity\" To=\"0.55\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundGradientSelected\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundGradientSelectedDisabled\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Border SnapsToDevicePixels=\"true\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\" x:Name=\"border\">\r\n\r\n                        <Grid Margin=\"2,0,2,0\">\r\n                            <Rectangle x:Name=\"BackgroundGradientOver\" RadiusX=\"1\" RadiusY=\"1\" Stroke=\"{DynamicResource MouseOverBorderBrush}\" Opacity=\"0\" Fill=\"{DynamicResource MouseOverBrush}\"/>\r\n                            <Rectangle x:Name=\"BackgroundGradientSelectedDisabled\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" Fill=\"{DynamicResource ListItemSelectedBrush}\" Stroke=\"{DynamicResource ListItemSelectedBorderBrush}\"/>\r\n                            <Rectangle x:Name=\"BackgroundGradientSelected\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" Fill=\"{DynamicResource PressedBrush}\" Stroke=\"{DynamicResource PressedBorderBrush}\"/>\r\n                            <GridViewRowPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Margin=\"0,2,0,2\" VerticalAlignment=\"Stretch\" />\r\n                        </Grid>\r\n\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsSelected\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOff}\" x:Name=\"SelectedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\" x:Name=\"SelectedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsSelected\" Value=\"true\" />\r\n                                <Condition Property=\"Selector.IsSelectionActive\" Value=\"false\" />\r\n                            </MultiTrigger.Conditions>\r\n\r\n                        </MultiTrigger>\r\n\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource OutsideFontColor}\" />\r\n    </Style>\r\n\r\n    <Style x:Key=\"GridViewColumnHeaderGripper\" TargetType=\"{x:Type Thumb}\">\r\n        <Setter Property=\"Canvas.Right\" Value=\"-8.5\" />\r\n        <Setter Property=\"Width\" Value=\"18\" />\r\n        <Setter Property=\"Height\" Value=\"{Binding Path=ActualHeight, RelativeSource={RelativeSource TemplatedParent}}\" />\r\n        <Setter Property=\"Padding\" Value=\"0,3,0,4\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <Border Padding=\"{TemplateBinding Padding}\" Background=\"#00FFFFFF\">\r\n                        <Rectangle HorizontalAlignment=\"Center\" Width=\"0.5\">\r\n                            <Rectangle.Fill>\r\n                                <SolidColorBrush Color=\"{DynamicResource WhiteColor}\" />\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"{x:Type GridViewColumnHeader}\" TargetType=\"{x:Type GridViewColumnHeader}\">\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"Padding\" Value=\"2,0,2,0\" />\r\n        <Setter Property=\"Foreground\" Value=\"#FF042271\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"Padding\" Value=\"3\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type GridViewColumnHeader}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundOver\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundOver_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0.65\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundOver_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\" To=\"0.84\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgoundPressed_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0.65\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgoundPressed_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid Margin=\"0,1,0,1\">\r\n                        <Grid>\r\n\r\n                            <Border x:Name=\"BackgroundNorm\" BorderThickness=\"1\" CornerRadius=\"1.75\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\"/>\r\n                            <Border x:Name=\"BackgroundNorm_highlight\" Margin=\"1\" BorderBrush=\"{DynamicResource NormalHighlightBrush}\" BorderThickness=\"1,0,1,1\" CornerRadius=\"1\" Opacity=\"0.65\" />\r\n                            <Border x:Name=\"BackgroundOver\" BorderThickness=\"1\" CornerRadius=\"1.75\" Opacity=\"0\" Background=\"{DynamicResource MouseOverBrush}\" BorderBrush=\"{DynamicResource MouseOverBorderBrush}\"/>\r\n                            <Border x:Name=\"BackgroundOver_Highlight\" Margin=\"1\" BorderThickness=\"1,0,1,1\" CornerRadius=\"1\" Opacity=\"0\" BorderBrush=\"{DynamicResource MouseOverHighlightBrush}\"/>\r\n                            <Border x:Name=\"BackgroundPressed\" BorderThickness=\"1\" CornerRadius=\"1.75\" Opacity=\"0\" Background=\"{DynamicResource PressedBrush}\" BorderBrush=\"{DynamicResource PressedBorderBrush}\"/>\r\n                            <Border x:Name=\"BackgoundPressed_Highlight\" Margin=\"1\" BorderThickness=\"1,0,1,1\" CornerRadius=\"1\" Opacity=\"0\" BorderBrush=\"{DynamicResource PressedHighlightBrush}\"/>\r\n                            <ContentPresenter VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" RecognizesAccessKey=\"True\" Margin=\"2,2,2,2\" />\r\n                        </Grid>\r\n                        <Canvas>\r\n                            <Thumb x:Name=\"PART_HeaderGripper\" Style=\"{StaticResource GridViewColumnHeaderGripper}\" HorizontalAlignment=\"Stretch\" />\r\n                        </Canvas>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"Height\" Value=\"Auto\">\r\n                            <Setter Property=\"MinHeight\" Value=\"20\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"Role\" Value=\"Padding\">\r\n                            <Setter TargetName=\"PART_HeaderGripper\" Property=\"Visibility\" Value=\"Collapsed\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"Role\" Value=\"Floating\">\r\n                            <Setter TargetName=\"PART_HeaderGripper\" Property=\"Visibility\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Background\" Value=\"Yellow\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{StaticResource NuclearButtonFocusVisual}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource OutsideFontColor}\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"Padding\" Value=\"1\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundOver\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundOver_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0.65\" />\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundOver_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundChecked\" Storyboard.TargetProperty=\"Opacity\" To=\"0.84\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgoundChecked_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0.65\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundChecked\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgoundChecked_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimation Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\" To=\"0.84\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BackgoundPressed_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0.65\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimation Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BackgoundPressed_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n\r\n                    </ControlTemplate.Resources>\r\n                    <Grid x:Name=\"grid1\">\r\n                        <Border x:Name=\"BackgroundNorm\" BorderThickness=\"1\" CornerRadius=\"1.75\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\"/>\r\n                        <Border x:Name=\"BackgroundNorm_highlight\" Margin=\"1\" BorderBrush=\"{DynamicResource NormalHighlightBrush}\" BorderThickness=\"1,0,1,1\" CornerRadius=\"1\" Opacity=\"0.65\" />\r\n                        <Border x:Name=\"BackgroundChecked\" BorderThickness=\"1\" CornerRadius=\"1.75\" Opacity=\"0\" Background=\"{DynamicResource PressedBrush}\" BorderBrush=\"{DynamicResource PressedBorderBrush}\"/>\r\n                        <Border x:Name=\"BackgoundChecked_Highlight\" Margin=\"1\" BorderThickness=\"1,0,1,1\" CornerRadius=\"1\" Opacity=\"0\" BorderBrush=\"{DynamicResource PressedHighlightBrush}\"/>\r\n                        <Border x:Name=\"BackgroundOver\" BorderThickness=\"1\" CornerRadius=\"1.75\" Opacity=\"0\" Background=\"{DynamicResource MouseOverBrush}\" BorderBrush=\"{DynamicResource MouseOverBorderBrush}\"/>\r\n                        <Border x:Name=\"BackgroundOver_Highlight\" Margin=\"1\" BorderThickness=\"1,0,1,1\" CornerRadius=\"1\" Opacity=\"0\" BorderBrush=\"{DynamicResource MouseOverHighlightBrush}\"/>\r\n                        <Border x:Name=\"BackgroundPressed\" BorderThickness=\"1\" CornerRadius=\"1.75\" Opacity=\"0\" Background=\"{DynamicResource PressedBrush}\" BorderBrush=\"{DynamicResource PressedBorderBrush}\"/>\r\n                        <Border x:Name=\"BackgoundPressed_Highlight\" Margin=\"1\" BorderThickness=\"1,0,1,1\" CornerRadius=\"1\" Opacity=\"0\" BorderBrush=\"{DynamicResource PressedHighlightBrush}\"/>\r\n                        <Border x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"false\" Background=\"{DynamicResource DisabledBackgroundBrush}\" BorderBrush=\"{DynamicResource DisabledBorderBrush}\" BorderThickness=\"1\" Opacity=\"0\" />\r\n                        <ContentPresenter x:Name=\"contentPresenter\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" />\r\n                        <TextBlock Panel.ZIndex=\"1\" x:Name=\"DisabledOverlay\" Text=\"{TemplateBinding Content}\" Foreground=\"#FF8E96A2\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" Visibility=\"Collapsed\" />\r\n                        <Border x:Name=\"FocusVisualElement\" Margin=\"-1\" Grid.RowSpan=\"2\" BorderBrush=\"{DynamicResource FocusBrush}\" BorderThickness=\"1\" CornerRadius=\"2.75\" IsHitTestVisible=\"false\" Opacity=\"0\" />\r\n                    </Grid>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOff}\" x:Name=\"CheckedOff_BeginStoryboard\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOn}\" x:Name=\"CheckedOn_BeginStoryboard\" />\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"#ADADAD\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"DisabledVisualElement\" Value=\"Visible\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"DisabledOverlay\" Value=\"Visible\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"contentPresenter\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Opacity\" TargetName=\"DisabledVisualElement\" Value=\"1\" />\r\n\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"ToolTip\">\r\n        <Setter Property=\"Background\" Value=\"#33000000\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Padding\" Value=\"3,0,3,0\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ToolTip\">\r\n                    <Border x:Name=\"Root\" Background=\"{TemplateBinding Background}\" BorderBrush=\"#19000000\" CornerRadius=\"3\">\r\n                        <Border Margin=\"-3,-3,3,3\" BorderBrush=\"#FF767676\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" Padding=\"4\">\r\n                            <Border.Resources>\r\n                                <Storyboard x:Key=\"Visible State\" />\r\n                                <Storyboard x:Key=\"Normal State\" />\r\n                            </Border.Resources>\r\n                            <Border.Background>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.004\" />\r\n                                    <GradientStop Color=\"#FFCDDCF0\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Border.Background>\r\n                            <ContentPresenter Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Cursor=\"{TemplateBinding Cursor}\" Margin=\"{TemplateBinding Padding}\" />\r\n                        </Border>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n</ResourceDictionary>\r\n"
  },
  {
    "path": "WpfToolkit/WPF.Themes/DavesGlossyControls/Theme.xaml",
    "content": "<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n\txmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\" \r\n\txmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" \r\n\txmlns:vsm=\"clr-namespace:System.Windows;assembly=PresentationFramework\"\r\n\tmc:Ignorable=\"d\">\r\n\r\n    <SolidColorBrush x:Key=\"WindowBackgroundBrush\" Color=\"#FF000000\" />\r\n\t<LinearGradientBrush x:Key=\"GlossyBlack_GlossGradient\" EndPoint=\"0.0149999996647239,0.0160000007599592\" StartPoint=\"0.486000001430511,0.723999977111816\">\r\n\t\t<GradientStop Color=\"#0CFFFFFF\"/>\r\n\t\t<GradientStop Color=\"#4CFFFFFF\" Offset=\"1\"/>\r\n\t</LinearGradientBrush>\r\n\t<LinearGradientBrush x:Key=\"GlossyBlack_BackgroundGradient\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n\t\t<GradientStop Color=\"#FF3B3B3B\"/>\r\n\t\t<GradientStop Color=\"#FF000000\" Offset=\"1\"/>\r\n\t</LinearGradientBrush>\r\n\t<LinearGradientBrush x:Key=\"GlossyBlack_StrokeGradient\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n\t\t<GradientStop Color=\"#7FFFFFFF\"/>\r\n\t\t<GradientStop Color=\"#33FFFFFF\" Offset=\"1\"/>\r\n\t</LinearGradientBrush>\r\n\t<RadialGradientBrush x:Key=\"GlossyBlack_HighlightGradient\">\r\n\t\t<RadialGradientBrush.RelativeTransform>\r\n\t\t\t<TransformGroup>\r\n\t\t\t\t<ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2.177\" ScaleY=\"1.451\"/>\r\n\t\t\t\t<SkewTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n\t\t\t\t<RotateTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n\t\t\t\t<TranslateTransform Y=\"0.562\"/>\r\n\t\t\t</TransformGroup>\r\n\t\t</RadialGradientBrush.RelativeTransform>\r\n\t\t<GradientStop Color=\"#4CFFFFFF\"/>\r\n\t\t<GradientStop Color=\"#00000000\" Offset=\"1\"/>\r\n\t</RadialGradientBrush>\r\n\t<RadialGradientBrush x:Key=\"GlossyBlack_MouseOverBackgroundGradient\">\r\n\t\t<RadialGradientBrush.RelativeTransform>\r\n\t\t\t<TransformGroup>\r\n\t\t\t\t<ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2.177\" ScaleY=\"1.451\"/>\r\n\t\t\t\t<SkewTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n\t\t\t\t<RotateTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n\t\t\t\t<TranslateTransform Y=\"0.562\"/>\r\n\t\t\t</TransformGroup>\r\n\t\t</RadialGradientBrush.RelativeTransform>\r\n\t\t<GradientStop Color=\"#CCFFFFFF\"/>\r\n\t\t<GradientStop Color=\"#00000000\" Offset=\"1\"/>\r\n\t</RadialGradientBrush>\r\n\t<LinearGradientBrush x:Key=\"GlossyBlack_PressedBackgroundGradient\" EndPoint=\"0.5,0\" StartPoint=\"0.5,1\">\r\n\t\t<GradientStop Color=\"#FF3B3B3B\"/>\r\n\t\t<GradientStop Color=\"#FF000000\" Offset=\"1\"/>\r\n\t</LinearGradientBrush>\r\n\t<RadialGradientBrush x:Key=\"GlossyBlack_PressedHighlightGradient\">\r\n\t\t<RadialGradientBrush.RelativeTransform>\r\n\t\t\t<TransformGroup>\r\n\t\t\t\t<ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2.177\" ScaleY=\"1.451\"/>\r\n\t\t\t\t<SkewTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n\t\t\t\t<RotateTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n\t\t\t\t<TranslateTransform Y=\"0.562\"/>\r\n\t\t\t</TransformGroup>\r\n\t\t</RadialGradientBrush.RelativeTransform>\r\n\t\t<GradientStop Color=\"#19FFFFFF\"/>\r\n\t\t<GradientStop Color=\"#00000000\" Offset=\"1\"/>\r\n\t</RadialGradientBrush>\r\n\t<LinearGradientBrush x:Key=\"GlossyBlack_DisabledBackgroundGradient\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n\t\t<GradientStop Color=\"#FF3B3B3B\"/>\r\n\t\t<GradientStop Color=\"#FF000000\" Offset=\"1\"/>\r\n\t</LinearGradientBrush>\r\n\t<LinearGradientBrush x:Key=\"GlossyBlack_TextBoxBackgroundGradient\" EndPoint=\"0.498,0.328\" StartPoint=\"0.498,-0.672\">\r\n\t\t<GradientStop Color=\"#FF3B3B3B\"/>\r\n\t\t<GradientStop Color=\"#FF000000\" Offset=\"1\"/>\r\n\t</LinearGradientBrush>\r\n\t<LinearGradientBrush x:Key=\"GlossyBlack_TextBoxStroke\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n\t\t<GradientStop Color=\"#4CFFFFFF\"/>\r\n\t\t<GradientStop Color=\"#33FFFFFF\" Offset=\"1\"/>\r\n\t</LinearGradientBrush>\r\n\t<RadialGradientBrush x:Key=\"GlossyBlack_TextBoxHighlightGradient\">\r\n\t\t<RadialGradientBrush.RelativeTransform>\r\n\t\t\t<TransformGroup>\r\n\t\t\t\t<ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2.177\" ScaleY=\"1.297\"/>\r\n\t\t\t\t<SkewTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n\t\t\t\t<RotateTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n\t\t\t\t<TranslateTransform Y=\"0.639\"/>\r\n\t\t\t</TransformGroup>\r\n\t\t</RadialGradientBrush.RelativeTransform>\r\n\t\t<GradientStop Color=\"#4CFFFFFF\"/>\r\n\t\t<GradientStop Color=\"#00000000\" Offset=\"1\"/>\r\n\t</RadialGradientBrush>\r\n\t<RadialGradientBrush x:Key=\"GlossyBlack_TextBoxMouseOverHighlight\">\r\n\t\t<RadialGradientBrush.RelativeTransform>\r\n\t\t\t<TransformGroup>\r\n\t\t\t\t<ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2.177\" ScaleY=\"1.297\"/>\r\n\t\t\t\t<SkewTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n\t\t\t\t<RotateTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n\t\t\t\t<TranslateTransform Y=\"0.639\"/>\r\n\t\t\t</TransformGroup>\r\n\t\t</RadialGradientBrush.RelativeTransform>\r\n\t\t<GradientStop Color=\"#7FFFFFFF\"/>\r\n\t\t<GradientStop Color=\"#00000000\" Offset=\"1\"/>\r\n\t</RadialGradientBrush>\r\n\t<SolidColorBrush x:Key=\"GlossyBlack_TextBoxDisabledBackground\" Color=\"#FF000000\"/>\r\n\t<SolidColorBrush x:Key=\"GlossyBlack_GreyStateBackground\" Color=\"#FF808080\"/>\r\n\t<SolidColorBrush x:Key=\"GlossyBlack_Selected\" Color=\"#FFFFFFFF\"/>\r\n\t<RadialGradientBrush x:Key=\"GlossyBlack_DeterminateProgressBarHighlightGradient\">\r\n\t\t<RadialGradientBrush.RelativeTransform>\r\n\t\t\t<TransformGroup>\r\n\t\t\t\t<ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2.177\" ScaleY=\"1.591\"/>\r\n\t\t\t\t<SkewTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n\t\t\t\t<RotateTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n\t\t\t\t<TranslateTransform Y=\"0.492\"/>\r\n\t\t\t</TransformGroup>\r\n\t\t</RadialGradientBrush.RelativeTransform>\r\n\t\t<GradientStop Color=\"#4CFFFFFF\"/>\r\n\t\t<GradientStop Color=\"#00000000\" Offset=\"1\"/>\r\n\t</RadialGradientBrush>\r\n\t<LinearGradientBrush x:Key=\"GlossyBlack_PopupBackgroundGradient\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n\t\t<GradientStop Color=\"#FF212121\" Offset=\"1\"/>\r\n\t\t<GradientStop Color=\"#FF000000\" Offset=\"0.629\"/>\r\n\t</LinearGradientBrush>\r\n\t<RadialGradientBrush x:Key=\"GlossyBlack_RectangleGlossGradient\">\r\n\t\t<RadialGradientBrush.RelativeTransform>\r\n\t\t\t<TransformGroup>\r\n\t\t\t\t<ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2.6630001068115234\" ScaleY=\"2.3280000686645508\"/>\r\n\t\t\t\t<SkewTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n\t\t\t\t<RotateTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n\t\t\t\t<TranslateTransform X=\"0.51399999856948853\" Y=\"0.61900001764297485\"/>\r\n\t\t\t</TransformGroup>\r\n\t\t</RadialGradientBrush.RelativeTransform>\r\n\t\t<GradientStop Color=\"#19FFFFFF\" Offset=\"1\"/>\r\n\t\t<GradientStop Color=\"#19FFFFFF\" Offset=\"0.85699999332427979\"/>\r\n\t\t<GradientStop Color=\"#00FFFFFF\" Offset=\"0.84799998998641968\"/>\r\n\t</RadialGradientBrush>\r\n\t<SolidColorBrush x:Key=\"GlossyBlack_ListItemBackground\" Color=\"#FF000000\"/>\t\t\r\n\t<LinearGradientBrush x:Key=\"GlossyBlack_ScrollBarBackgroundGradient\" EndPoint=\"-2.6,0.5\" StartPoint=\"3.6,0.5\">\r\n\t\t<GradientStop Color=\"#FF3B3B3B\"/>\r\n\t\t<GradientStop Color=\"#FF000000\" Offset=\"0.554\"/>\r\n\t</LinearGradientBrush>\t\t\r\n\r\n<!-- Control Templates -->\r\n\r\n    <!-- Button -->\r\n    <Style x:Key=\"{x:Type Button}\" TargetType=\"{x:Type Button}\">\r\n        <Setter Property=\"IsEnabled\" Value=\"true\"/>\r\n        <Setter Property=\"IsTabStop\" Value=\"true\"/>\r\n        <Setter Property=\"Background\" Value=\"#FF003255\"/>\r\n        <Setter Property=\"Foreground\" Value=\"#FFFFFFFF\"/>\r\n        <Setter Property=\"MinWidth\" Value=\"5\"/>\r\n        <Setter Property=\"MinHeight\" Value=\"5\"/>\r\n        <Setter Property=\"Margin\" Value=\"0\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Center\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\"/>\r\n        <Setter Property=\"Cursor\" Value=\"Arrow\"/>\r\n        <Setter Property=\"FontSize\" Value=\"11\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Button}\">\r\n                    <Grid>\r\n                        <Grid.Resources>\r\n                            <Color x:Key=\"LinearBevelLightStartColor\">#FCFFFFFF</Color>\r\n                            <Color x:Key=\"LinearBevelLightEndColor\">#F4FFFFFF</Color>\r\n                            <Color x:Key=\"LinearBevelDarkStartColor\">#E0FFFFFF</Color>\r\n                            <Color x:Key=\"LinearBevelDarkEndColor\">#B2FFFFFF</Color>\r\n                            <Color x:Key=\"MouseOverLinearBevelDarkEndColor\">#7FFFFFFF</Color>\r\n                            <Color x:Key=\"HoverLinearBevelLightStartColor\">#FCFFFFFF</Color>\r\n                            <Color x:Key=\"HoverLinearBevelLightEndColor\">#EAFFFFFF</Color>\r\n                            <Color x:Key=\"HoverLinearBevelDarkStartColor\">#D8FFFFFF</Color>\r\n                            <Color x:Key=\"HoverLinearBevelDarkEndColor\">#4CFFFFFF</Color>\r\n                            <Color x:Key=\"CurvedBevelFillStartColor\">#B3FFFFFF</Color>\r\n                            <Color x:Key=\"CurvedBevelFillEndColor\">#3CFFFFFF</Color>\r\n                            <SolidColorBrush x:Key=\"BorderBrush\" Color=\"#FF000000\"/>\r\n                            <SolidColorBrush x:Key=\"AccentBrush\" Color=\"#FFFFFFFF\"/>\r\n                            <SolidColorBrush x:Key=\"DisabledBrush\" Color=\"#A5FFFFFF\"/>\r\n                            <LinearGradientBrush x:Key=\"FocusedStrokeBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                <GradientStop Color=\"#B2FFFFFF\" Offset=\"0\"/>\r\n                                <GradientStop Color=\"#51FFFFFF\" Offset=\"1\"/>\r\n                                <GradientStop Color=\"#66FFFFFF\" Offset=\"0.325\"/>\r\n                                <GradientStop Color=\"#1EFFFFFF\" Offset=\"0.325\"/>\r\n                            </LinearGradientBrush>\r\n                        </Grid.Resources>\r\n                        \r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                \r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.2000000\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                \r\n                                <VisualState x:Name=\"Normal\">\r\n                                    <Storyboard/>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"MouseOverState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"PressedState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"gloss\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t    <VisualTransition GeneratedDuration=\"00:00:00.1000000\"/>\r\n\t\t\t\t\t\t\t\t    </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"MouseOverState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\">\r\n                                    <Storyboard/>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"NormalState\">\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_BackgroundGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_HighlightGradient}\"/>\r\n                        </Grid>\r\n                        <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"MouseOverState\" Opacity=\"0\">\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_BackgroundGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_MouseOverBackgroundGradient}\"/>\r\n                        </Grid>\r\n                        <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"PressedState\" Opacity=\"0\">\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_PressedBackgroundGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_PressedHighlightGradient}\"/>\r\n                        </Grid>\r\n                        <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"DisabledState\" Opacity=\"0\">\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_DisabledBackgroundGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Opacity=\"0\">\r\n                                <Rectangle.Fill>\r\n                                    <RadialGradientBrush>\r\n                                        <RadialGradientBrush.RelativeTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2.177\" ScaleY=\"1.451\"/>\r\n                                                <SkewTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n                                                <RotateTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n                                                <TranslateTransform Y=\"0.562\"/>\r\n                                            </TransformGroup>\r\n                                        </RadialGradientBrush.RelativeTransform>\r\n                                        <GradientStop Color=\"#4CFFFFFF\"/>\r\n                                        <GradientStop Color=\"#00000000\" Offset=\"1\"/>\r\n                                    </RadialGradientBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                        </Grid>\r\n                        <ContentPresenter Margin=\"4,5,4,4\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" x:Name=\"contentPresenter\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"/>\r\n                        <Path Height=\"Auto\" HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,6\" VerticalAlignment=\"Stretch\" Stretch=\"Fill\" Data=\"M100,12.903966 C59.117226,15.115555 23.108757,29.203354 -1.2437163E-14,60 L-3.2684966E-13,0 C12,-2.8610229E-06 100,0 100,0\" x:Name=\"gloss\" Fill=\"{StaticResource GlossyBlack_GlossGradient}\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- Button -->\r\n    <Style x:Key=\"{x:Type ToggleButton}\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"IsEnabled\" Value=\"true\"/>\r\n        <Setter Property=\"IsTabStop\" Value=\"true\"/>\r\n        <Setter Property=\"Background\" Value=\"#FF003255\"/>\r\n        <Setter Property=\"Foreground\" Value=\"#FFFFFFFF\"/>\r\n        <Setter Property=\"MinWidth\" Value=\"5\"/>\r\n        <Setter Property=\"MinHeight\" Value=\"5\"/>\r\n        <Setter Property=\"Margin\" Value=\"0\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Center\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\"/>\r\n        <Setter Property=\"Cursor\" Value=\"Arrow\"/>\r\n        <Setter Property=\"FontSize\" Value=\"11\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <Grid>\r\n                        <Grid.Resources>\r\n                            <Color x:Key=\"LinearBevelLightStartColor\">#FCFFFFFF</Color>\r\n                            <Color x:Key=\"LinearBevelLightEndColor\">#F4FFFFFF</Color>\r\n                            <Color x:Key=\"LinearBevelDarkStartColor\">#E0FFFFFF</Color>\r\n                            <Color x:Key=\"LinearBevelDarkEndColor\">#B2FFFFFF</Color>\r\n                            <Color x:Key=\"MouseOverLinearBevelDarkEndColor\">#7FFFFFFF</Color>\r\n                            <Color x:Key=\"HoverLinearBevelLightStartColor\">#FCFFFFFF</Color>\r\n                            <Color x:Key=\"HoverLinearBevelLightEndColor\">#EAFFFFFF</Color>\r\n                            <Color x:Key=\"HoverLinearBevelDarkStartColor\">#D8FFFFFF</Color>\r\n                            <Color x:Key=\"HoverLinearBevelDarkEndColor\">#4CFFFFFF</Color>\r\n                            <Color x:Key=\"CurvedBevelFillStartColor\">#B3FFFFFF</Color>\r\n                            <Color x:Key=\"CurvedBevelFillEndColor\">#3CFFFFFF</Color>\r\n                            <SolidColorBrush x:Key=\"BorderBrush\" Color=\"#FF000000\"/>\r\n                            <SolidColorBrush x:Key=\"AccentBrush\" Color=\"#FFFFFFFF\"/>\r\n                            <SolidColorBrush x:Key=\"DisabledBrush\" Color=\"#A5FFFFFF\"/>\r\n                            <LinearGradientBrush x:Key=\"FocusedStrokeBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                <GradientStop Color=\"#B2FFFFFF\" Offset=\"0\"/>\r\n                                <GradientStop Color=\"#51FFFFFF\" Offset=\"1\"/>\r\n                                <GradientStop Color=\"#66FFFFFF\" Offset=\"0.325\"/>\r\n                                <GradientStop Color=\"#1EFFFFFF\" Offset=\"0.325\"/>\r\n                            </LinearGradientBrush>\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.2000000\"/>\r\n                                </VisualStateGroup.Transitions>\r\n\r\n                                <VisualState x:Name=\"Normal\">\r\n                                    <Storyboard/>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"MouseOverState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"PressedState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"gloss\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1000000\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"MouseOverState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\">\r\n                                    <Storyboard/>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"NormalState\">\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_BackgroundGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_HighlightGradient}\"/>\r\n                        </Grid>\r\n                        <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"MouseOverState\" Opacity=\"0\">\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_BackgroundGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_MouseOverBackgroundGradient}\"/>\r\n                        </Grid>\r\n                        <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"PressedState\" Opacity=\"0\">\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_PressedBackgroundGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_PressedHighlightGradient}\"/>\r\n                        </Grid>\r\n                        <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"DisabledState\" Opacity=\"0\">\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_DisabledBackgroundGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Opacity=\"0\">\r\n                                <Rectangle.Fill>\r\n                                    <RadialGradientBrush>\r\n                                        <RadialGradientBrush.RelativeTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2.177\" ScaleY=\"1.451\"/>\r\n                                                <SkewTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n                                                <RotateTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n                                                <TranslateTransform Y=\"0.562\"/>\r\n                                            </TransformGroup>\r\n                                        </RadialGradientBrush.RelativeTransform>\r\n                                        <GradientStop Color=\"#4CFFFFFF\"/>\r\n                                        <GradientStop Color=\"#00000000\" Offset=\"1\"/>\r\n                                    </RadialGradientBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                        </Grid>\r\n                        <ContentPresenter Margin=\"4,5,4,4\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" x:Name=\"contentPresenter\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"/>\r\n                        <Path Height=\"Auto\" HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,6\" VerticalAlignment=\"Stretch\" Stretch=\"Fill\" Data=\"M100,12.903966 C59.117226,15.115555 23.108757,29.203354 -1.2437163E-14,60 L-3.2684966E-13,0 C12,-2.8610229E-06 100,0 100,0\" x:Name=\"gloss\" Fill=\"{StaticResource GlossyBlack_GlossGradient}\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- TextBox -->\r\n\t<Style x:Key=\"{x:Type TextBox}\" TargetType=\"{x:Type TextBox}\">\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n\t\t<Setter Property=\"Background\" Value=\"#FFFFFFFF\"/>\r\n\t\t<Setter Property=\"Foreground\" Value=\"#FFFFFFFF\"/>\r\n\t\t<Setter Property=\"Padding\" Value=\"2\"/>\r\n\t\t<Setter Property=\"BorderBrush\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n\t\t\t\t\t<GradientStop Color=\"#FFA3AEB9\" Offset=\"0\"/>\r\n\t\t\t\t\t<GradientStop Color=\"#FF8399A9\" Offset=\"0.375\"/>\r\n\t\t\t\t\t<GradientStop Color=\"#FF718597\" Offset=\"0.375\"/>\r\n\t\t\t\t\t<GradientStop Color=\"#FF617584\" Offset=\"1\"/>\r\n\t\t\t\t</LinearGradientBrush>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type TextBox}\">\r\n\t\t\t\t\t<Grid x:Name=\"RootElement\">\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"ReadOnly\"/>\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Disabled\"/>\r\n\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\"/>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"MouseOverState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ColorAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"ContentElement\" Storyboard.TargetProperty=\"(Control.Foreground).(SolidColorBrush.Color)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#FF808080\"/>\r\n\t\t\t\t\t\t\t\t\t\t</ColorAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"ReadOnly\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard/>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"FocusStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Focused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"MouseOverState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unfocused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard/>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\r\n\t\t\t\t\t\t<Grid Margin=\"0,0,0,0\" x:Name=\"NormalState\">\r\n\t\t\t\t\t\t\t<Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_TextBoxBackgroundGradient}\">\r\n\t\t\t\t\t\t\t</Rectangle>\r\n\t\t\t\t\t\t\t<Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_TextBoxStroke}\">\r\n\t\t\t\t\t\t\t</Rectangle>\r\n\t\t\t\t\t\t\t<Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Height=\"Auto\" Fill=\"{StaticResource GlossyBlack_TextBoxHighlightGradient}\"/>\r\n\r\n\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t<Grid Margin=\"0,0,0,0\" x:Name=\"MouseOverState\" Opacity=\"0\">\r\n\t\t\t\t\t\t\t<Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_TextBoxBackgroundGradient}\"/>\r\n\t\t\t\t\t\t\t<Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_TextBoxStroke}\"/>\r\n\t\t\t\t\t\t\t<Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Height=\"Auto\" Fill=\"{StaticResource GlossyBlack_TextBoxMouseOverHighlight}\"/>\r\n\r\n\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t<Grid Margin=\"0,0,0,0\" x:Name=\"DisabledState\" Opacity=\"0\">\r\n\t\t\t\t\t\t\t<Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_TextBoxDisabledBackground}\"/>\r\n\t\t\t\t\t\t\t<Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_TextBoxStroke}\"/>\r\n\r\n\t\t\t\t\t\t</Grid>\r\n\r\n\t\t\t\t\t\t<ScrollViewer BorderThickness=\"0\" IsTabStop=\"False\" Padding=\"{TemplateBinding Padding}\" Margin=\"4,4,4,4\" x:Name=\"PART_ContentHost\" BorderBrush=\"{x:Null}\" Foreground=\"#FFFFFFFF\"/>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>   \r\n    <!-- CheckBox -->\r\n\t<Style x:Key=\"{x:Type CheckBox}\" TargetType=\"{x:Type CheckBox}\">\r\n\t\t<Setter Property=\"Background\" Value=\"#FF448DCA\"/>\r\n\t\t<!--<Setter Property=\"Foreground\" Value=\"#FF333333\"/>-->\r\n        <Setter Property=\"Foreground\" Value=\"#FFFFFFFF\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n\t\t<Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n\t\t<Setter Property=\"Padding\" Value=\"4,1,0,0\"/>\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n\t\t<Setter Property=\"BorderBrush\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n\t\t\t\t\t<GradientStop Color=\"#FFA3AEB9\" Offset=\"0\"/>\r\n\t\t\t\t\t<GradientStop Color=\"#FF8399A9\" Offset=\"0.375\"/>\r\n\t\t\t\t\t<GradientStop Color=\"#FF718597\" Offset=\"0.375\"/>\r\n\t\t\t\t\t<GradientStop Color=\"#FF617584\" Offset=\"1\"/>\r\n\t\t\t\t</LinearGradientBrush>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type CheckBox}\">\r\n\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t<Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t<ColumnDefinition Width=\"16\"/>\r\n\t\t\t\t\t\t\t<ColumnDefinition Width=\"*\"/>\r\n\t\t\t\t\t\t</Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\"/>\r\n\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\"/>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"MouseOverState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Pressed\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"PressedState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"gloss\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\"/>\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CheckStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Checked\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unchecked\"/>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Indeterminate\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"IndeterminateState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"FocusStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Focused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"MouseOverState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unfocused\"/>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Grid HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" Width=\"16\" Height=\"16\">\r\n\t\t\t\t\t\t\t<Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"NormalState\">\r\n\t\t\t\t\t\t\t\t<Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_BackgroundGradient}\"/>\r\n\t\t\t\t\t\t\t\t<Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n\t\t\t\t\t\t\t\t<Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_HighlightGradient}\"/>\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t\t<Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"MouseOverState\" Opacity=\"0\">\r\n\t\t\t\t\t\t\t\t<Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_BackgroundGradient}\"/>\r\n\t\t\t\t\t\t\t\t<Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n\t\t\t\t\t\t\t\t<Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_MouseOverBackgroundGradient}\"/>\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t\t<Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"PressedState\" Opacity=\"0\">\r\n\t\t\t\t\t\t\t\t<Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_PressedBackgroundGradient}\"/>\r\n\t\t\t\t\t\t\t\t<Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{x:Null}\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n\t\t\t\t\t\t\t\t<Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_PressedHighlightGradient}\"/>\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t\t<Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"DisabledState\" Opacity=\"0\">\r\n\t\t\t\t\t\t\t\t<Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_DisabledBackgroundGradient}\"/>\r\n\t\t\t\t\t\t\t\t<Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n\t\t\t\t\t\t\t\t<Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Opacity=\"0\">\r\n\t\t\t\t\t\t\t\t\t<Rectangle.Fill>\r\n\t\t\t\t\t\t\t\t\t\t<RadialGradientBrush>\r\n\t\t\t\t\t\t\t\t\t\t\t<RadialGradientBrush.RelativeTransform>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2.177\" ScaleY=\"1.451\"/>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SkewTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<RotateTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TranslateTransform Y=\"0.562\"/>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t\t</RadialGradientBrush.RelativeTransform>\r\n\t\t\t\t\t\t\t\t\t\t\t<GradientStop Color=\"#4CFFFFFF\"/>\r\n\t\t\t\t\t\t\t\t\t\t\t<GradientStop Color=\"#00000000\" Offset=\"1\"/>\r\n\t\t\t\t\t\t\t\t\t\t</RadialGradientBrush>\r\n\t\t\t\t\t\t\t\t\t</Rectangle.Fill>\r\n\t\t\t\t\t\t\t\t</Rectangle>\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t\t<Path Height=\"10\" Margin=\"1,1,1,1\" x:Name=\"CheckIcon\" Width=\"10.5\" Opacity=\"0\" Fill=\"{StaticResource GlossyBlack_Selected}\" Stretch=\"Fill\" Data=\"M102.03442,598.79645 L105.22962,597.78918 L106.78825,600.42358 C106.78825,600.42358 108.51028,595.74304 110.21724,593.60419 C112.00967,591.35822 114.89314,591.42316 114.89314,591.42316 C114.89314,591.42316 112.67844,593.42645 111.93174,594.44464 C110.7449,596.06293 107.15683,604.13837 107.15683,604.13837 z\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\"/>\r\n\t\t\t\t\t\t\t<Rectangle Height=\"Auto\" HorizontalAlignment=\"Stretch\" Margin=\"3,3,3,3\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Fill=\"{StaticResource GlossyBlack_GreyStateBackground}\" Stroke=\"{x:Null}\" RadiusX=\"0\" RadiusY=\"0\" x:Name=\"IndeterminateState\" Opacity=\"0\"/>\r\n\t\t\t\t\t\t\t<Path Height=\"Auto\" HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,2\" VerticalAlignment=\"Stretch\" Stretch=\"Fill\" Data=\"M100,12.903966 C59.117226,15.115555 23.108757,29.203354 -1.2437163E-14,60 L-3.2684966E-13,0 C12,-2.8610229E-06 100,0 100,0\" x:Name=\"gloss\" Fill=\"{StaticResource GlossyBlack_GlossGradient}\"/>\r\n\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t<ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"contentPresenter\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Grid.Column=\"1\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n    <!-- RadioButton -->\r\n\t<Style x:Key=\"{x:Type RadioButton}\" TargetType=\"{x:Type RadioButton}\">\r\n\t\t<Setter Property=\"Background\" Value=\"#FF448DCA\"/>\r\n\t\t<Setter Property=\"Foreground\" Value=\"#FFFFFFFF\"/>\r\n\t\t<Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n\t\t<Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n\t\t<Setter Property=\"Padding\" Value=\"4,1,0,0\"/>\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n\t\t<Setter Property=\"BorderBrush\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n\t\t\t\t\t<GradientStop Color=\"#FFA3AEB9\" Offset=\"0\"/>\r\n\t\t\t\t\t<GradientStop Color=\"#FF8399A9\" Offset=\"0.375\"/>\r\n\t\t\t\t\t<GradientStop Color=\"#FF718597\" Offset=\"0.375\"/>\r\n\t\t\t\t\t<GradientStop Color=\"#FF617584\" Offset=\"1\"/>\r\n\t\t\t\t</LinearGradientBrush>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type RadioButton}\">\r\n\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t<Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t<ColumnDefinition Width=\"16\"/>\r\n\t\t\t\t\t\t\t<ColumnDefinition Width=\"*\"/>\r\n\t\t\t\t\t\t</Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\"/>\r\n\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\"/>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"MouseOverState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Pressed\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"PressedState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"gloss\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\"/>\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CheckStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Checked\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unchecked\"/>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"FocusStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Focused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"MouseOverState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unfocused\"/>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Grid HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" Width=\"16\" Height=\"16\">\r\n\t\t\t\t\t\t\t<Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"NormalState\">\r\n\t\t\t\t\t\t\t\t<Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"8\" RadiusY=\"8\" Fill=\"{StaticResource GlossyBlack_BackgroundGradient}\"/>\r\n\t\t\t\t\t\t\t\t<Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"8\" RadiusY=\"8\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n\t\t\t\t\t\t\t\t<Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"8\" RadiusY=\"8\" Fill=\"{StaticResource GlossyBlack_HighlightGradient}\"/>\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t\t<Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"MouseOverState\" Opacity=\"0\">\r\n\t\t\t\t\t\t\t\t<Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"8\" RadiusY=\"8\" Fill=\"{StaticResource GlossyBlack_BackgroundGradient}\"/>\r\n\t\t\t\t\t\t\t\t<Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"8\" RadiusY=\"8\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n\t\t\t\t\t\t\t\t<Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"8\" RadiusY=\"8\" Fill=\"{StaticResource GlossyBlack_MouseOverBackgroundGradient}\"/>\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t\t<Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"PressedState\" Opacity=\"0\">\r\n\t\t\t\t\t\t\t\t<Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"8\" RadiusY=\"8\" Fill=\"{StaticResource GlossyBlack_PressedBackgroundGradient}\"/>\r\n\t\t\t\t\t\t\t\t<Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"8\" RadiusY=\"8\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n\t\t\t\t\t\t\t\t<Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"8\" RadiusY=\"8\" Fill=\"{StaticResource GlossyBlack_PressedHighlightGradient}\"/>\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t\t<Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"DisabledState\" Opacity=\"0\">\r\n\t\t\t\t\t\t\t\t<Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"8\" RadiusY=\"8\" Fill=\"{StaticResource GlossyBlack_DisabledBackgroundGradient}\"/>\r\n\t\t\t\t\t\t\t\t<Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"8\" RadiusY=\"8\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t\t<Rectangle Margin=\"4,4,4,4\" x:Name=\"rectangle\" Opacity=\"0\" Stroke=\"{x:Null}\" RadiusX=\"8\" RadiusY=\"8\" Fill=\"{StaticResource GlossyBlack_Selected}\"/>\r\n\t\t\t\t\t\t\t<Path Height=\"Auto\" HorizontalAlignment=\"Stretch\" Margin=\"0,0,1.394,3.249\" x:Name=\"gloss\" VerticalAlignment=\"Stretch\" Stretch=\"Fill\" Data=\"M8,0 C10.209139,2.1316284E-14 12.20914,0.89543062 13.656854,2.3431456 L14.606471,3.7516162 L11.26036,4.4973226 C8.2248383,5.6242199 5.4645424,7.6234088 3.1399786,10.655978 L1.7327293,12.751486 L0.62867957,11.113961 C0.22385763,10.156855 -1.0835777E-13,9.1045694 0,8 C-4.3343099E-13,3.581723 3.581723,4.2632557E-14 8,0 z\" Fill=\"{StaticResource GlossyBlack_GlossGradient}\"/>\r\n\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t<ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"contentPresenter\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Grid.Column=\"1\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n    <!-- ProgressBar -->\r\n    <Style x:Key=\"{x:Type ProgressBar}\" TargetType=\"{x:Type ProgressBar}\">\r\n        <Setter Property=\"Foreground\" Value=\"#FF00B7E4\"/>\r\n        <Setter Property=\"Background\" Value=\"#FFB2B7BA\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"Maximum\" Value=\"100\"/>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\".5,1\" StartPoint=\".5,0\">\r\n                    <GradientStop Color=\"#FFAEB7BF\" Offset=\"0\"/>\r\n                    <GradientStop Color=\"#FF919EA7\" Offset=\"0.35\"/>\r\n                    <GradientStop Color=\"#FF7A8A99\" Offset=\"0.35\"/>\r\n                    <GradientStop Color=\"#FF647480\" Offset=\"1\"/>\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ProgressBar}\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <Grid Margin=\"0,0,0,0\" x:Name=\"NormalState\">\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_TextBoxBackgroundGradient}\">\r\n                            </Rectangle>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\">\r\n                            </Rectangle>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Height=\"Auto\" Fill=\"{StaticResource GlossyBlack_HighlightGradient}\">\r\n                            </Rectangle>\r\n\r\n                        </Grid>\r\n\r\n                        <Border x:Name=\"PART_Track\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" Opacity=\"0\"/>\r\n                        <Grid x:Name=\"ProgressBarRootGrid\">\r\n                            <Grid x:Name=\"IndeterminateRoot\" Visibility=\"Collapsed\">\r\n                                <Rectangle Margin=\"{TemplateBinding BorderThickness}\" x:Name=\"IndeterminateSolidFill\" Opacity=\"0\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"{TemplateBinding Foreground}\" Stroke=\"#FF448DCA\" StrokeThickness=\"0\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                <Rectangle Margin=\"{TemplateBinding BorderThickness}\" x:Name=\"IndeterminateGradientFill\" Opacity=\"0.7\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\">\r\n                                    <Rectangle.Fill>\r\n                                        <LinearGradientBrush EndPoint=\"0,1\" StartPoint=\"20,1\" MappingMode=\"Absolute\" SpreadMethod=\"Repeat\">\r\n                                            <LinearGradientBrush.Transform>\r\n                                                <TransformGroup>\r\n                                                    <TranslateTransform X=\"0\"/>\r\n                                                    <SkewTransform AngleX=\"-30\"/>\r\n                                                </TransformGroup>\r\n                                            </LinearGradientBrush.Transform>\r\n                                            <GradientStop Color=\"#4CFFFFFF\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#00FFFFFF\" Offset=\".25\"/>\r\n                                            <GradientStop Color=\"#4CFFFFFF\" Offset=\"0.85\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Rectangle.Fill>\r\n                                </Rectangle>\r\n                            </Grid>\r\n                            <Grid Margin=\"1\" x:Name=\"DeterminateRoot\">\r\n                                <Grid HorizontalAlignment=\"Left\" Margin=\"1,1,1,1\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"PART_Indicator\">\r\n                                    <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_BackgroundGradient}\"/>\r\n                                    <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Opacity=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                                    <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_DeterminateProgressBarHighlightGradient}\">\r\n                                    </Rectangle>\r\n                                    <Path Height=\"Auto\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Stretch=\"Fill\" Data=\"M100,12.903966 C59.117226,15.115555 23.108757,29.203354 -1.2437163E-14,60 L-3.2684966E-13,0 C12,-2.8610229E-06 100,0 100,0\" x:Name=\"gloss\" d:LayoutOverrides=\"Width\" Opacity=\"0\" Fill=\"{StaticResource GlossyBlack_GlossGradient}\"/>\r\n                                </Grid>\r\n                            </Grid>\r\n                        </Grid>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsIndeterminate\" Value=\"True\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard>\r\n                                    <Storyboard RepeatBehavior=\"Forever\">\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00\" Storyboard.TargetName=\"IndeterminateRoot\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00\" Storyboard.TargetName=\"DeterminateRoot\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"IndeterminateGradientFill\" Storyboard.TargetProperty=\"(Shape.Fill).(LinearGradientBrush.Transform).(TransformGroup.Children)[0].X\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:.5\" Value=\"20\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </BeginStoryboard>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- ComboBox -->\r\n    <Style x:Key=\"{x:Type ComboBox}\" TargetType=\"{x:Type ComboBox}\">\r\n        <Setter Property=\"Padding\" Value=\"6,2,25,2\"/>\r\n        <Setter Property=\"Background\" Value=\"#FF1F3B53\"/>\r\n        <Setter Property=\"Foreground\" Value=\"#FFFFFFFF\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"#FFA3AEB9\" Offset=\"0\"/>\r\n                    <GradientStop Color=\"#FF8399A9\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF718597\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF617584\" Offset=\"1\"/>\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ComboBox}\">\r\n                    <Grid>\r\n                        <Grid.Resources>\r\n                            <Style TargetType=\"ToggleButton\" x:Name=\"comboToggleStyle\">\r\n                                <Setter Property=\"Foreground\" Value=\"#FF333333\"/>\r\n                                <Setter Property=\"Background\" Value=\"#FF1F3B53\"/>\r\n                                <Setter Property=\"BorderBrush\">\r\n                                    <Setter.Value>\r\n                                        <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                            <GradientStop Color=\"#FFA3AEB9\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#FF8399A9\" Offset=\"0.375\"/>\r\n                                            <GradientStop Color=\"#FF718597\" Offset=\"0.375\"/>\r\n                                            <GradientStop Color=\"#FF617584\" Offset=\"1\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Setter.Value>\r\n                                </Setter>\r\n                                <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n                                <Setter Property=\"Padding\" Value=\"3\"/>\r\n                                <Setter Property=\"Template\">\r\n                                    <Setter.Value>\r\n                                        <ControlTemplate TargetType=\"ToggleButton\">\r\n                                            <Grid>\r\n                                                <VisualStateManager.VisualStateGroups>\r\n                                                    <VisualStateGroup x:Name=\"CommonStates\">\r\n                                                        <VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t    <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t    <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\"/>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t    </VisualStateGroup.Transitions>\r\n                                                        <VisualState x:Name=\"Normal\"/>\r\n                                                        <VisualState x:Name=\"MouseOver\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"MouseOverState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Pressed\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"PressedState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Disabled\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"gloss\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                    </VisualStateGroup>\r\n                                                    <VisualStateGroup x:Name=\"CheckStates\">\r\n                                                        <VisualState x:Name=\"Checked\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"PressedState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Unchecked\"/>\r\n                                                    </VisualStateGroup>\r\n                                                    <VisualStateGroup x:Name=\"FocusStates\">\r\n                                                        <VisualState x:Name=\"Focused\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"MouseOverState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Unfocused\"/>\r\n                                                    </VisualStateGroup>\r\n                                                </VisualStateManager.VisualStateGroups>\r\n                                                <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"NormalState\">\r\n                                                    <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_BackgroundGradient}\"/>\r\n                                                    <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                                                    <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_HighlightGradient}\"/>\r\n                                                </Grid>\r\n                                                <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"MouseOverState\" Opacity=\"0\">\r\n                                                    <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_BackgroundGradient}\"/>\r\n                                                    <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                                                    <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_MouseOverBackgroundGradient}\"/>\r\n                                                </Grid>\r\n                                                <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"PressedState\" Opacity=\"0\">\r\n                                                    <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_PressedBackgroundGradient}\"/>\r\n                                                    <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                                                    <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_PressedHighlightGradient}\"/>\r\n                                                </Grid>\r\n                                                <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"DisabledState\" Opacity=\"0\">\r\n                                                    <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_DisabledBackgroundGradient}\"/>\r\n                                                    <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                                                </Grid>\r\n                                                <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"contentPresenter\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                                                <Path Height=\"Auto\" HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,6\" VerticalAlignment=\"Stretch\" Stretch=\"Fill\" Data=\"M100,12.903966 C59.117226,15.115555 23.108757,29.203354 -1.2437163E-14,60 L-3.2684966E-13,0 C12,-2.8610229E-06 100,0 100,0\" x:Name=\"gloss\" Fill=\"{StaticResource GlossyBlack_GlossGradient}\"/>\r\n                                            </Grid>\r\n                                        </ControlTemplate>\r\n                                    </Setter.Value>\r\n                                </Setter>\r\n                            </Style>\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t\t    <VisualTransition GeneratedDuration=\"00:00:00.1\"/>\r\n\t\t\t\t\t\t\t\t\t    </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard/>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                                <VisualState x:Name=\"FocusedDropDown\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00\" Storyboard.TargetName=\"PopupBorder\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"ContentPresenterBorder\">\r\n                            <Grid>\r\n                                <ToggleButton BorderThickness=\"{TemplateBinding BorderThickness}\" HorizontalContentAlignment=\"Right\" HorizontalAlignment=\"Stretch\" Margin=\"-1\" x:Name=\"DropDownToggle\" VerticalAlignment=\"Stretch\" Foreground=\"{StaticResource GlossyBlack_GreyStateBackground}\" BorderBrush=\"{StaticResource GlossyBlack_StrokeGradient}\" Background=\"{StaticResource GlossyBlack_BackgroundGradient}\" IsChecked=\"{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" ClickMode=\"Press\">\r\n                                    <Path Height=\"4\" HorizontalAlignment=\"Right\" Margin=\"0,0,6,0\" x:Name=\"BtnArrow\" Width=\"8\" Stretch=\"Uniform\" Data=\"F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z \" Fill=\"{StaticResource GlossyBlack_GreyStateBackground}\"/>\r\n                                </ToggleButton>\r\n                                <ContentPresenter HorizontalAlignment=\"Left\" Margin=\"3,3,23,3\" x:Name=\"ContentSite\" VerticalAlignment=\"Center\" Content=\"{TemplateBinding SelectionBoxItem}\" ContentTemplate=\"{TemplateBinding SelectionBoxItemTemplate}\" ContentTemplateSelector=\"{TemplateBinding ItemTemplateSelector}\" IsHitTestVisible=\"False\"/>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Rectangle x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"false\" Opacity=\"0\" Fill=\"#A5000000\" RadiusX=\"3\" RadiusY=\"3\"/>\r\n                        <Popup IsOpen=\"{TemplateBinding IsDropDownOpen}\" Placement=\"Bottom\" x:Name=\"Popup\" Focusable=\"False\" AllowsTransparency=\"True\" PopupAnimation=\"Slide\">\r\n                            <Grid MaxHeight=\"{TemplateBinding MaxDropDownHeight}\" MinWidth=\"{TemplateBinding ActualWidth}\" x:Name=\"DropDown\" SnapsToDevicePixels=\"True\">\r\n                            <Border Height=\"Auto\" HorizontalAlignment=\"Stretch\" x:Name=\"PopupBorder\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"0,0,0,0\" Background=\"{StaticResource GlossyBlack_PopupBackgroundGradient}\" BorderBrush=\"{StaticResource GlossyBlack_StrokeGradient}\">\r\n                                <ScrollViewer BorderThickness=\"0\" Padding=\"1\" Foreground=\"{StaticResource GlossyBlack_Selected}\" BorderBrush=\"{x:Null}\" SnapsToDevicePixels=\"True\" HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Auto\" CanContentScroll=\"True\">    \r\n                                    <ItemsPresenter/>\r\n                                </ScrollViewer>\r\n                            </Border>\r\n                            </Grid>\r\n                        </Popup>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- ComboBoxItem -->\r\n    <Style x:Key=\"{x:Type ComboBoxItem}\" TargetType=\"{x:Type ComboBoxItem}\">\r\n        <Setter Property=\"Padding\" Value=\"3\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"Foreground\" Value=\"#FFFFFFFF\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ComboBoxItem}\">\r\n                    <Grid Background=\"{TemplateBinding Background}\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"MouseOverState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualState x:Name=\"Unselected\"/>\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"SelectedState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"gloss\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard/>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"NormalState\" Opacity=\"1\">\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_ListItemBackground}\"/>\r\n                        </Grid>\r\n                        <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"MouseOverState\" Opacity=\"0\">\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_BackgroundGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_MouseOverBackgroundGradient}\"/>\r\n                        </Grid>\r\n                        <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"PressedState\" Opacity=\"0\">\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_PressedBackgroundGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_PressedHighlightGradient}\"/>\r\n                        </Grid>\r\n                        <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"SelectedState\" Opacity=\"0\">\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_BackgroundGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_MouseOverBackgroundGradient}\"/>\r\n                        </Grid>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"contentPresenter\" />\r\n                        <Rectangle Margin=\"0,0,0,0\" x:Name=\"gloss\" Opacity=\"0\" Stroke=\"{x:Null}\" Fill=\"{StaticResource GlossyBlack_RectangleGlossGradient}\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- Thumb - GlossyBlackVerticalThumb -->\r\n    <Style x:Key=\"GlossyBlackVerticalThumb\" TargetType=\"Thumb\">\r\n        <Setter Property=\"Background\" Value=\"#FF1F3B53\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"#FFA3AEB9\" Offset=\"0\"/>\r\n                    <GradientStop Color=\"#FF8399A9\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF718597\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF617584\" Offset=\"1\"/>\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Thumb\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"MouseOverState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"PressedState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"gloss\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"MouseOverState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"NormalState\">\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_BackgroundGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_HighlightGradient}\"/>\r\n                        </Grid>\r\n                        <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"MouseOverState\" Opacity=\"0\">\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_BackgroundGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_MouseOverBackgroundGradient}\"/>\r\n                        </Grid>\r\n                        <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"PressedState\" Opacity=\"0\">\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_PressedBackgroundGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_PressedHighlightGradient}\"/>\r\n                        </Grid>\r\n                        <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"DisabledState\" Opacity=\"0\">\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_DisabledBackgroundGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                        </Grid>\r\n                        <Rectangle Margin=\"0,0,0,0\" x:Name=\"gloss\" Opacity=\"1\" Stroke=\"{x:Null}\" Fill=\"{StaticResource GlossyBlack_RectangleGlossGradient}\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- Slider -->\r\n    <Style x:Key=\"{x:Type Slider}\" TargetType=\"{x:Type Slider}\">\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"#FFA3AEB9\" Offset=\"0\"/>\r\n                    <GradientStop Color=\"#FF8399A9\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF718597\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF617584\" Offset=\"1\"/>\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Slider}\">\r\n                    <Grid x:Name=\"GridRoot\">\r\n                        <Grid.Resources>\r\n                            <ControlTemplate x:Key=\"RepeatButtonTemplate\">\r\n                                <Grid x:Name=\"Root\" Background=\"Transparent\" Opacity=\"0\"/>\r\n                            </ControlTemplate>\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Root\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\" MinHeight=\"{TemplateBinding MinHeight}\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n\r\n                        <Grid Width=\"Auto\" Height=\"3\" Grid.Row=\"1\">\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_BackgroundGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                        </Grid>\r\n\r\n                        <Track Grid.Row=\"1\" x:Name=\"PART_Track\">\r\n                            <Track.Thumb>\r\n                                <Thumb IsTabStop=\"True\" Height=\"18\" x:Name=\"HorizontalThumb\" Style=\"{StaticResource GlossyBlackVerticalThumb}\" Width=\"11\" />\r\n                            </Track.Thumb>\r\n                            <Track.IncreaseRepeatButton>\r\n                                <RepeatButton Command=\"Slider.IncreaseLarge\" Template=\"{StaticResource RepeatButtonTemplate}\"/>\r\n                            </Track.IncreaseRepeatButton>\r\n                            <Track.DecreaseRepeatButton>\r\n                                <RepeatButton Command=\"Slider.DecreaseLarge\" Template=\"{StaticResource RepeatButtonTemplate}\"/>\r\n                            </Track.DecreaseRepeatButton>\r\n                        </Track>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- ScrollBar -->\r\n    <Style x:Key=\"{x:Type ScrollBar}\" TargetType=\"{x:Type ScrollBar}\">\r\n        <Setter Property=\"MinWidth\" Value=\"17\"/>\r\n        <Setter Property=\"MinHeight\" Value=\"17\"/>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ScrollBar}\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <Grid.Resources>\r\n                            <ControlTemplate x:Key=\"RepeatButtonTemplate\" TargetType=\"RepeatButton\">\r\n                                <Grid x:Name=\"Root\" Background=\"Transparent\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"HorizontalIncrementTemplate\" TargetType=\"RepeatButton\">\r\n                                <Grid x:Name=\"Root\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"MouseOver\"/>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"Pressed\"/>\r\n\t\t\t\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"MouseOverState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"PressedState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"gloss\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"NormalState\">\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_BackgroundGradient}\"/>\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_HighlightGradient}\"/>\r\n                                    </Grid>\r\n                                    <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"MouseOverState\" Opacity=\"0\">\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_BackgroundGradient}\"/>\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_MouseOverBackgroundGradient}\"/>\r\n                                    </Grid>\r\n                                    <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"PressedState\" Opacity=\"0\">\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_PressedBackgroundGradient}\"/>\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_PressedHighlightGradient}\"/>\r\n                                    </Grid>\r\n                                    <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"DisabledState\" Opacity=\"0\">\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_DisabledBackgroundGradient}\"/>\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                                    </Grid>\r\n                                    <Path Height=\"8\" Width=\"4\" Stretch=\"Uniform\" Data=\"F1 M 511.047,352.682L 511.047,342.252L 517.145,347.467L 511.047,352.682 Z \" Fill=\"{StaticResource GlossyBlack_GreyStateBackground}\"/>\r\n                                    <Path Height=\"Auto\" HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,6\" VerticalAlignment=\"Stretch\" Stretch=\"Fill\" Data=\"M100,12.903966 C59.117226,15.115555 23.108757,29.203354 -1.2437163E-14,60 L-3.2684966E-13,0 C12,-2.8610229E-06 100,0 100,0\" x:Name=\"gloss\" Fill=\"{StaticResource GlossyBlack_GlossGradient}\"/>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"HorizontalDecrementTemplate\" TargetType=\"RepeatButton\">\r\n                                <Grid x:Name=\"Root\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"MouseOver\"/>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"Pressed\"/>\r\n\t\t\t\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"MouseOverState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"PressedState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"gloss\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"NormalState\">\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_BackgroundGradient}\"/>\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_HighlightGradient}\"/>\r\n                                    </Grid>\r\n                                    <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"MouseOverState\" Opacity=\"0\">\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_BackgroundGradient}\"/>\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_MouseOverBackgroundGradient}\"/>\r\n                                    </Grid>\r\n                                    <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"PressedState\" Opacity=\"0\">\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_PressedBackgroundGradient}\"/>\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_PressedHighlightGradient}\"/>\r\n                                    </Grid>\r\n                                    <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"DisabledState\" Opacity=\"0\">\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_DisabledBackgroundGradient}\"/>\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                                    </Grid>\r\n                                    <Path Height=\"8\" Width=\"4\" Stretch=\"Uniform\" Data=\"F1 M 110.692,342.252L 110.692,352.682L 104.594,347.467L 110.692,342.252 Z \" Fill=\"{StaticResource GlossyBlack_GreyStateBackground}\"/>\r\n                                    <Path Height=\"Auto\" HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,6\" VerticalAlignment=\"Stretch\" Stretch=\"Fill\" Data=\"M100,12.903966 C59.117226,15.115555 23.108757,29.203354 -1.2437163E-14,60 L-3.2684966E-13,0 C12,-2.8610229E-06 100,0 100,0\" x:Name=\"gloss\" Fill=\"{StaticResource GlossyBlack_GlossGradient}\"/>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"VerticalIncrementTemplate\" TargetType=\"RepeatButton\">\r\n                                <Grid x:Name=\"Root\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"MouseOver\"/>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"Pressed\"/>\r\n\t\t\t\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"MouseOverState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"PressedState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"gloss\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"NormalState\">\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_BackgroundGradient}\"/>\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_HighlightGradient}\"/>\r\n                                    </Grid>\r\n                                    <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"MouseOverState\" Opacity=\"0\">\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_BackgroundGradient}\"/>\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_TextBoxMouseOverHighlight}\"/>\r\n                                    </Grid>\r\n                                    <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"PressedState\" Opacity=\"0\">\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_PressedBackgroundGradient}\"/>\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_TextBoxStroke}\"/>\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_PressedHighlightGradient}\"/>\r\n                                    </Grid>\r\n                                    <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"DisabledState\" Opacity=\"0\">\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_DisabledBackgroundGradient}\"/>\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                                    </Grid>\r\n                                    <Path Height=\"Auto\" HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,6\" VerticalAlignment=\"Stretch\" Stretch=\"Fill\" Data=\"M100,12.903966 C59.117226,15.115555 23.108757,29.203354 -1.2437163E-14,60 L-3.2684966E-13,0 C12,-2.8610229E-06 100,0 100,0\" x:Name=\"gloss\" Fill=\"{StaticResource GlossyBlack_GlossGradient}\"/>\r\n                                    <Path Height=\"4\" Width=\"8\" Stretch=\"Uniform\" Data=\"F1 M 541.537,173.589L 531.107,173.589L 536.322,167.49L 541.537,173.589 Z \" x:Name=\"path\" Margin=\"0,0,0,0\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"{StaticResource GlossyBlack_GreyStateBackground}\">\r\n                                        <Path.RenderTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform ScaleY=\"-1\"/>\r\n                                                <SkewTransform/>\r\n                                                <RotateTransform/>\r\n                                                <TranslateTransform/>\r\n                                            </TransformGroup>\r\n                                        </Path.RenderTransform>\r\n                                    </Path>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"VerticalDecrementTemplate\" TargetType=\"RepeatButton\">\r\n                                <Grid x:Name=\"Root\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"MouseOver\"/>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"Pressed\"/>\r\n\t\t\t\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"MouseOverState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"PressedState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"gloss\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"NormalState\">\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_BackgroundGradient}\"/>\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_HighlightGradient}\"/>\r\n                                    </Grid>\r\n                                    <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"MouseOverState\" Opacity=\"0\">\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_BackgroundGradient}\"/>\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_MouseOverBackgroundGradient}\"/>\r\n                                    </Grid>\r\n                                    <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"PressedState\" Opacity=\"0\">\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_PressedBackgroundGradient}\"/>\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_PressedHighlightGradient}\"/>\r\n                                    </Grid>\r\n                                    <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"DisabledState\" Opacity=\"0\">\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_DisabledBackgroundGradient}\"/>\r\n                                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                                    </Grid>\r\n                                    <Path Height=\"4\" Width=\"8\" Stretch=\"Uniform\" Data=\"F1 M 541.537,173.589L 531.107,173.589L 536.322,167.49L 541.537,173.589 Z \" x:Name=\"path\" Fill=\"{StaticResource GlossyBlack_GreyStateBackground}\">\r\n                                    </Path>\r\n                                    <Path Height=\"Auto\" HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,6\" VerticalAlignment=\"Stretch\" Stretch=\"Fill\" Data=\"M100,12.903966 C59.117226,15.115555 23.108757,29.203354 -1.2437163E-14,60 L-3.2684966E-13,0 C12,-2.8610229E-06 100,0 100,0\" x:Name=\"gloss\" Fill=\"{StaticResource GlossyBlack_GlossGradient}\"/>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"VerticalThumbTemplate\" TargetType=\"Thumb\">\r\n                                <Grid>\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"MouseOver\"/>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"Pressed\"/>\r\n\t\t\t\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"MouseOverState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"PressedState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ThumbVisual\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"0\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"gloss\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Grid Margin=\"1,0,1,0\" x:Name=\"ThumbVisual\">\r\n                                        <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"NormalState\">\r\n                                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_BackgroundGradient}\"/>\r\n                                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_HighlightGradient}\"/>\r\n                                        </Grid>\r\n                                        <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"MouseOverState\" Opacity=\"0\">\r\n                                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_BackgroundGradient}\"/>\r\n                                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_MouseOverBackgroundGradient}\"/>\r\n                                        </Grid>\r\n                                        <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"PressedState\" Opacity=\"0\">\r\n                                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_PressedBackgroundGradient}\"/>\r\n                                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{x:Null}\" Fill=\"{StaticResource GlossyBlack_PressedHighlightGradient}\"/>\r\n                                        </Grid>\r\n                                        <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"DisabledState\" Opacity=\"0\">\r\n                                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_BackgroundGradient}\"/>\r\n                                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                                        </Grid>\r\n                                        <Path Height=\"Auto\" HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,6\" VerticalAlignment=\"Stretch\" Stretch=\"Fill\" Data=\"M100,12.903966 C59.117226,15.115555 23.108757,29.203354 -1.2437163E-14,60 L-3.2684966E-13,0 C12,-2.8610229E-06 100,0 100,0\" x:Name=\"gloss\" Fill=\"{StaticResource GlossyBlack_GlossGradient}\"/>\r\n\r\n                                    </Grid>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"HorizontalThumbTemplate\" TargetType=\"Thumb\">\r\n                                <Grid>\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"MouseOver\"/>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"Pressed\"/>\r\n\t\t\t\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"MouseOverState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"PressedState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ThumbVisual\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"0\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"gloss\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Grid Margin=\"0,1,0,1\" x:Name=\"ThumbVisual\">\r\n                                        <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"NormalState\">\r\n                                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_BackgroundGradient}\"/>\r\n                                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_HighlightGradient}\"/>\r\n                                        </Grid>\r\n                                        <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"MouseOverState\" Opacity=\"0\">\r\n                                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_BackgroundGradient}\"/>\r\n                                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_MouseOverBackgroundGradient}\"/>\r\n                                        </Grid>\r\n                                        <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"PressedState\" Opacity=\"0\">\r\n                                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_PressedBackgroundGradient}\"/>\r\n                                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_PressedHighlightGradient}\"/>\r\n                                        </Grid>\r\n                                        <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"DisabledState\" Opacity=\"0\">\r\n                                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_DisabledBackgroundGradient}\"/>\r\n                                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                                        </Grid>\r\n                                        <Path Height=\"Auto\" HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,6\" VerticalAlignment=\"Stretch\" Stretch=\"Fill\" Data=\"M100,12.903966 C59.117226,15.115555 23.108757,29.203354 -1.2437163E-14,60 L-3.2684966E-13,0 C12,-2.8610229E-06 100,0 100,0\" x:Name=\"gloss\" Fill=\"{StaticResource GlossyBlack_GlossGradient}\"/>\r\n                                    </Grid>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Root\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid x:Name=\"HorizontalRoot\" Visibility=\"Collapsed\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Height=\"Auto\" Width=\"Auto\" Grid.Column=\"0\" d:LayoutOverrides=\"GridBox\" Grid.ColumnSpan=\"5\" Opacity=\"1\" Fill=\"{StaticResource GlossyBlack_ScrollBarBackgroundGradient}\" Grid.Row=\"1\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Height=\"Auto\" Width=\"Auto\" Grid.Column=\"0\" d:LayoutOverrides=\"GridBox\" Grid.ColumnSpan=\"5\" Opacity=\"1\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Height=\"Auto\" Width=\"Auto\" Grid.Column=\"0\" d:LayoutOverrides=\"GridBox\" Grid.ColumnSpan=\"5\" Opacity=\"1\" Fill=\"{StaticResource GlossyBlack_HighlightGradient}\"/>                                                     \r\n\r\n                            <RepeatButton Margin=\"1\" x:Name=\"HorizontalSmallDecrease\" Width=\"16\" IsTabStop=\"False\" Template=\"{StaticResource HorizontalDecrementTemplate}\" Grid.Column=\"0\" Interval=\"50\" Command=\"ScrollBar.LineUpCommand\"/>\r\n\r\n                            <Track x:Name=\"PART_Track1\" Orientation=\"Horizontal\" IsDirectionReversed=\"false\" Grid.Column=\"1\" Grid.ColumnSpan=\"3\">\r\n                                <Track.Thumb>\r\n                                    <Thumb MinWidth=\"18\" x:Name=\"HorizontalThumb\" Width=\"18\" Background=\"{TemplateBinding Background}\" Template=\"{StaticResource HorizontalThumbTemplate}\" />\r\n                                </Track.Thumb>\r\n                                <Track.IncreaseRepeatButton>\r\n                                    <RepeatButton x:Name=\"HorizontalLargeIncrease\" IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Interval=\"50\" Command=\"ScrollBar.PageDownCommand\"/>\r\n                                </Track.IncreaseRepeatButton>\r\n                                <Track.DecreaseRepeatButton>\r\n                                    <RepeatButton x:Name=\"HorizontalLargeDecrease\" IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Interval=\"50\" Command=\"ScrollBar.PageUpCommand\"/>\r\n                                </Track.DecreaseRepeatButton>\r\n                            </Track>\r\n                            \r\n                            \r\n                            <RepeatButton Margin=\"1\" x:Name=\"HorizontalSmallIncrease\" Width=\"16\" IsTabStop=\"False\" Template=\"{StaticResource HorizontalIncrementTemplate}\" Grid.Column=\"4\" Interval=\"50\" Command=\"ScrollBar.LineDownCommand\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"VerticalRoot\" Visibility=\"Visible\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"*\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Height=\"Auto\" Width=\"Auto\" Grid.Column=\"1\" Grid.Row=\"0\" Grid.RowSpan=\"5\" Opacity=\"1\" Fill=\"{StaticResource GlossyBlack_ScrollBarBackgroundGradient}\" />\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Height=\"Auto\" Width=\"Auto\" Grid.Column=\"1\" Grid.Row=\"0\" Grid.RowSpan=\"5\" Opacity=\"1\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\" />\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Height=\"Auto\" Width=\"Auto\" Grid.Column=\"1\" Grid.Row=\"0\" Grid.RowSpan=\"5\" Opacity=\"1\" Fill=\"{StaticResource GlossyBlack_HighlightGradient}\" />\r\n\r\n                            <RepeatButton Height=\"16\" Margin=\"1\" x:Name=\"DecreaseRepeat\" IsTabStop=\"False\" Template=\"{StaticResource VerticalDecrementTemplate}\" Grid.Row=\"0\" Interval=\"50\" Command=\"ScrollBar.LineUpCommand\"/>\r\n\r\n                            <Track x:Name=\"PART_Track\" Orientation=\"Vertical\" IsDirectionReversed=\"true\" Grid.Row=\"1\" Grid.RowSpan=\"3\">\r\n                                <Track.Thumb>\r\n                                    <Thumb MinHeight=\"18\" x:Name=\"VerticalThumb\" Template=\"{StaticResource VerticalThumbTemplate}\" />\r\n                                </Track.Thumb>\r\n                                <Track.IncreaseRepeatButton>\r\n                                    <RepeatButton x:Name=\"PageUp\" IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Interval=\"50\"/>\r\n                                </Track.IncreaseRepeatButton>\r\n                                <Track.DecreaseRepeatButton>\r\n                                    <RepeatButton x:Name=\"PageDown\" IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Interval=\"50\"/>\r\n                                </Track.DecreaseRepeatButton>\r\n                            </Track>\r\n                            \r\n                            \r\n                            \r\n                            \r\n                            <RepeatButton Height=\"16\" Margin=\"1\" x:Name=\"IncreaseRepeat\" IsTabStop=\"False\" Template=\"{StaticResource VerticalIncrementTemplate}\" Grid.Row=\"4\" Interval=\"50\" Command=\"ScrollBar.LineDownCommand\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- ScrollViewer -->\r\n    <Style x:Key=\"{x:Type ScrollViewer}\" TargetType=\"{x:Type ScrollViewer}\">\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Padding\" Value=\"4\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"#FFA3AEB9\" Offset=\"0\"/>\r\n                    <GradientStop Color=\"#FF8399A9\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF718597\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF617584\" Offset=\"1\"/>\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ScrollViewer}\">\r\n                    <Border BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\">\r\n                        <Grid Background=\"{TemplateBinding Background}\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"*\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <ScrollContentPresenter Cursor=\"{TemplateBinding Cursor}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"ScrollContentPresenter\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                            <Rectangle Grid.Column=\"1\" Grid.Row=\"1\" Fill=\"{StaticResource GlossyBlack_TextBoxDisabledBackground}\" Opacity=\"1\"/>\r\n                            <ScrollBar Margin=\"-1,0,0,1\" x:Name=\"PART_VerticalScrollBar\" Width=\"18\" Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" IsTabStop=\"False\" Grid.Column=\"1\" Grid.Row=\"0\" Orientation=\"Vertical\" ViewportSize=\"{TemplateBinding ViewportHeight}\" Maximum=\"{TemplateBinding ScrollableHeight}\" Minimum=\"0\" Value=\"{TemplateBinding VerticalOffset}\" />\r\n                            <ScrollBar Height=\"18\" Margin=\"1,0,1,0\" x:Name=\"PART_HorizontalScrollBar\" Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" IsTabStop=\"False\" Grid.Column=\"0\" Grid.Row=\"1\" Orientation=\"Horizontal\" ViewportSize=\"{TemplateBinding ViewportWidth}\" Maximum=\"{TemplateBinding ScrollableWidth}\" Minimum=\"0\" Value=\"{TemplateBinding HorizontalOffset}\" />\r\n                        </Grid>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- ListBoxItem -->\r\n    <Style x:Key=\"{x:Type ListBoxItem}\" TargetType=\"{x:Type ListBoxItem}\">\r\n        <Setter Property=\"Padding\" Value=\"3\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"Foreground\" Value=\"#FFFFFFFF\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListBoxItem}\">\r\n                    <Grid Background=\"{TemplateBinding Background}\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"MouseOverState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualState x:Name=\"Unselected\"/>\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"SelectedState\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"gloss\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard/>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"NormalState\" Opacity=\"1\">\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_ListItemBackground}\"/>\r\n                        </Grid>\r\n                        <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"MouseOverState\" Opacity=\"0\">\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_BackgroundGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_MouseOverBackgroundGradient}\"/>\r\n                        </Grid>\r\n                        <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"PressedState\" Opacity=\"0\">\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_PressedBackgroundGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_PressedHighlightGradient}\"/>\r\n                        </Grid>\r\n                        <Grid HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" x:Name=\"SelectedState\" Opacity=\"0\">\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_BackgroundGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Stroke=\"{StaticResource GlossyBlack_StrokeGradient}\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"0,0,0,0\" VerticalAlignment=\"Stretch\" RadiusX=\"0\" RadiusY=\"0\" Fill=\"{StaticResource GlossyBlack_MouseOverBackgroundGradient}\"/>\r\n                        </Grid>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"contentPresenter\" />\r\n                        <Rectangle Margin=\"0,0,0,0\" x:Name=\"gloss\" Opacity=\"0\" Stroke=\"{x:Null}\" Fill=\"{StaticResource GlossyBlack_RectangleGlossGradient}\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- ListBox -->    \r\n    <Style x:Key=\"{x:Type ListBox}\" TargetType=\"{x:Type ListBox}\">\r\n        <Setter Property=\"Padding\" Value=\"1\"/>\r\n        <Setter Property=\"Background\" Value=\"#FFFFFFFF\"/>\r\n        <Setter Property=\"Foreground\" Value=\"#FF333333\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"#FFA3AEB9\" Offset=\"0\"/>\r\n                    <GradientStop Color=\"#FF8399A9\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF718597\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF617584\" Offset=\"1\"/>\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\"/>\r\n        <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\"/>\r\n        <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"True\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListBox}\">\r\n                    <Border CornerRadius=\"0,0,0,0\" BorderBrush=\"{StaticResource GlossyBlack_StrokeGradient}\">\r\n                        <ScrollViewer x:Name=\"ScrollViewer\" BorderBrush=\"Transparent\" BorderThickness=\"0\" Padding=\"{TemplateBinding Padding}\" Background=\"{StaticResource GlossyBlack_StrokeGradient}\" Foreground=\"#FFFFFFFF\">\r\n                            <ItemsPresenter/>\r\n                        </ScrollViewer>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- TreeView -->\r\n    <Style x:Key=\"{x:Type TreeView}\" TargetType=\"{x:Type TreeView}\">\r\n        <Setter Property=\"Padding\" Value=\"1\"/>\r\n        <Setter Property=\"Background\" Value=\"#FFFFFFFF\"/>\r\n        <Setter Property=\"Foreground\" Value=\"#FF333333\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"#FFA3AEB9\" Offset=\"0\"/>\r\n                    <GradientStop Color=\"#FF8399A9\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF718597\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF617584\" Offset=\"1\"/>\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TreeView}\">\r\n                    <Border CornerRadius=\"0,0,0,0\" BorderThickness=\"1,1,1,1\" BorderBrush=\"{StaticResource GlossyBlack_StrokeGradient}\">\r\n                        <ScrollViewer x:Name=\"ScrollViewer\" BorderBrush=\"Transparent\" BorderThickness=\"0\" Padding=\"{TemplateBinding Padding}\" Background=\"Transparent\" Foreground=\"#FFFFFFFF\">                        \r\n                            <ItemsPresenter/>\r\n                        </ScrollViewer>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- TreeViewItem -->\r\n    <Style TargetType=\"TreeViewItem\">\r\n        <Setter Property=\"IsTabStop\" Value=\"True\" />\r\n        <Setter Property=\"Padding\" Value=\"3\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"Foreground\" Value=\"#FFFFFFFF\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Cursor\" Value=\"Arrow\" />\r\n    </Style>\r\n\r\n    <Style TargetType=\"Expander\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Expander\">\r\n                    <Grid>\r\n                        <ContentPresenter />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/DotNetProjects.WPF.Themes.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\r\n  <PropertyGroup>\r\n    <RootNamespace>WPF.Themes</RootNamespace>\r\n      <TargetFrameworks>net5.0-windows;net6.0-windows;net4</TargetFrameworks>\r\n      <UseWPF>true</UseWPF>\r\n      <Company>DotNetProjects</Company>\r\n      <Product>WPF.Themes</Product>\r\n      <Copyright>2021 DotNetProjects</Copyright>\r\n      <SignAssembly>true</SignAssembly>\r\n      <AssemblyOriginatorKeyFile>DotNetProjects.snk</AssemblyOriginatorKeyFile>\r\n      <GeneratePackageOnBuild>true</GeneratePackageOnBuild>\r\n      <PackageId>DotNetProjects.WpfToolkit.Themes</PackageId>\r\n      <Authors>DotNetProjects</Authors>\r\n      <Version>1.0.0</Version>\r\n      <AssemblyVersion>1.0.0.0</AssemblyVersion>\r\n      <FileVersion>1.0.0.0</FileVersion>\r\n      <PackageLicenseExpression>MS-PL</PackageLicenseExpression>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <ProjectReference Include=\"..\\Input\\DotNetProjects.Input.Toolkit.csproj\" />\r\n    <ProjectReference Include=\"..\\Layout\\DotNetProjects.Layout.Toolkit.csproj\" />\r\n  </ItemGroup>\r\n</Project>\r\n"
  },
  {
    "path": "WpfToolkit/WPF.Themes/ExpressionDark/Theme.xaml",
    "content": "﻿<!--\r\n// (c) Copyright Microsoft Corporation.\r\n// This source is subject to Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n-->\r\n\r\n<ResourceDictionary\r\n  xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n  xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n  xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n  mc:Ignorable=\"d\"\r\n  xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\">\r\n\r\n    <!-- Main Colors -->\r\n\r\n    <Color x:Key=\"MainColor\">#FF595959</Color>\r\n    <Color x:Key=\"HoverColor\">#FF393939</Color>\r\n    <Color x:Key=\"DefaultColor\">#FF9BB1C5</Color>\r\n    <SolidColorBrush x:Key=\"LightBrush\" Color=\"#FF333333\" />\r\n    <SolidColorBrush x:Key=\"ShadeBrush\" Color=\"#FF434343\" />\r\n\r\n    <Color x:Key=\"TopGradientSelectColor\">#FFFFFFFF</Color>\r\n    <Color x:Key=\"BottomGradientSelectColor\">#FF737373</Color>\r\n\r\n    <Color x:Key=\"BlackColor\">#FF000000</Color>\r\n    <Color x:Key=\"WhiteColor\">#FFFFFFFF</Color>\r\n\r\n    <SolidColorBrush x:Key=\"TextBrush\" Color=\"#FFFFFFFF\" />\n    <SolidColorBrush x:Key=\"NormalBrush\" Color=\"{StaticResource MainColor}\" />\n    <SolidColorBrush x:Key=\"NormalBorderBrush\" Color=\"#FF333333\" />\n    <SolidColorBrush x:Key=\"HoverBrush\" Color=\"{StaticResource HoverColor}\" />\r\n    <SolidColorBrush x:Key=\"GlyphBrush\" Color=\"#FFD1D1D1\" />\n\r\n    <LinearGradientBrush x:Key=\"PressedBrush\" EndPoint=\"0.5,0.971\" StartPoint=\"0.5,0.042\">\r\n        <GradientStop Color=\"#4C000000\" Offset=\"0\" />\r\n        <GradientStop Color=\"#26FFFFFF\" Offset=\"1\" />\r\n        <GradientStop Color=\"#4C000000\" Offset=\"0.467\" />\r\n        <GradientStop Color=\"#26FFFFFF\" Offset=\"0.479\" />\r\n    </LinearGradientBrush>\r\n\r\n    <SolidColorBrush x:Key=\"ControlBackgroundBrush\" Color=\"#FF333333\" />\r\n\r\n    <LinearGradientBrush x:Key=\"SelectedBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource TopGradientSelectColor}\" Offset=\"0\" />\r\n        <GradientStop Color=\"{StaticResource BottomGradientSelectColor}\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\n    <SolidColorBrush x:Key=\"DisabledForegroundBrush\" Color=\"#888\" />\r\n    <SolidColorBrush x:Key=\"DisabledBackgroundBrush\" Color=\"#FF787878\" />\r\n    <SolidColorBrush x:Key=\"DisabledBorderBrush\" Color=\"#AAA\" />\r\n    <SolidColorBrush x:Key=\"WindowBackgroundBrush\" Color=\"#FF595959\" />\r\n\n    <!-- EXPRESSION COMMON VALUES -->\r\n\r\n    <LinearGradientBrush x:Key=\"ShineBrush\" EndPoint=\"0.5,0.971\" StartPoint=\"0.5,0.042\">\r\n        <GradientStop Color=\"#59FFFFFF\" Offset=\"0\" />\r\n        <GradientStop Color=\"#00FFFFFF\" Offset=\"1\" />\r\n        <GradientStop Color=\"#26FFFFFF\" Offset=\"0.467\" />\r\n        <GradientStop Color=\"#00FFFFFF\" Offset=\"0.475\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"HoverShineBrush\" EndPoint=\"0.5,0.971\" StartPoint=\"0.5,0.042\">\r\n        <GradientStop Color=\"#4CFFFFFF\" Offset=\"0\" />\r\n        <GradientStop Color=\"#26FFFFFF\" Offset=\"1\" />\r\n        <GradientStop Color=\"#26FFFFFF\" Offset=\"0.467\" />\r\n        <GradientStop Color=\"#00FFFFFF\" Offset=\"0.475\" />\r\n        <GradientStop Color=\"#00FFFFFF\" Offset=\"0.856\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"PressedBorderBrush\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#444\" Offset=\"0.0\" />\r\n        <GradientStop Color=\"#888\" Offset=\"1.0\" />\r\n    </LinearGradientBrush>\r\n\r\n    <SolidColorBrush x:Key=\"DefaultedBorderBrush\" Color=\"{StaticResource DefaultColor}\" />\r\n    <SolidColorBrush x:Key=\"SolidBorderBrush\" Color=\"#888\" />\r\n\n\r\n    <Style x:Key=\"NuclearButtonFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Border>\r\n                        <Rectangle Margin=\"2\" Stroke=\"#60000000\" StrokeThickness=\"1\" StrokeDashArray=\"1 2\" />\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\n    <Style TargetType=\"{x:Type Button}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource NuclearButtonFocusVisual}\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\" />\r\n        <Setter Property=\"Template\" Value=\"{DynamicResource ButtonTemplate}\" />\r\n   </Style>\n\n    <ControlTemplate x:Key=\"ButtonTemplate\" TargetType=\"{x:Type Button}\">\r\n        <ControlTemplate.Resources>\r\n            <Storyboard x:Key=\"HoverOn\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"HoverOff\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"PressedOn\">\r\n\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"PressedOff\">\r\n\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"FocusedOn\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"FocussedOff\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n\r\n        </ControlTemplate.Resources>\n        <Grid x:Name=\"Grid\">\r\n            <Border x:Name=\"Background\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" />\r\n            <Border x:Name=\"HoverBorder\" Opacity=\"0\" Background=\"{StaticResource HoverBrush}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" />\r\n            <Border x:Name=\"HoverShineBorder\" Opacity=\"0\" Background=\"{StaticResource HoverShineBrush}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" />\r\n            <Border x:Name=\"PressedBorder\" Opacity=\"0\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" Background=\"{StaticResource PressedBrush}\" />\r\n            <Border x:Name=\"ShineBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" Background=\"{StaticResource ShineBrush}\" Opacity=\"1\" />\n            <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" RecognizesAccessKey=\"True\" />\r\n            <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" BorderBrush=\"{StaticResource HoverShineBrush}\" BorderThickness=\"1\" CornerRadius=\"3,3,3,3\" Margin=\"1,1,1,1\" Opacity=\"0\" />\r\n        </Grid>\n        <ControlTemplate.Triggers>\r\n            <Trigger Property=\"IsDefault\" Value=\"True\">\r\n                <Setter Property=\"BorderBrush\" TargetName=\"ShineBorder\" Value=\"{DynamicResource DefaultedBorderBrush}\" />\r\n            </Trigger>\r\n            <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                <Trigger.ExitActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource FocussedOff}\" x:Name=\"FocussedOff_BeginStoryboard\" />\r\n                </Trigger.ExitActions>\r\n                <Trigger.EnterActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\" />\r\n                </Trigger.EnterActions>\r\n\r\n            </Trigger>\r\n            <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                <Trigger.ExitActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\" />\r\n                </Trigger.ExitActions>\r\n                <Trigger.EnterActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                </Trigger.EnterActions>\r\n\r\n            </Trigger>\r\n            <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                <Trigger.ExitActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" />\r\n                </Trigger.ExitActions>\r\n                <Trigger.EnterActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" />\r\n                </Trigger.EnterActions>\r\n            </Trigger>\r\n            <Trigger Property=\"IsEnabled\" Value=\"true\" />\r\n            <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                <Setter Property=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Background\" />\r\n                <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DisabledBorderBrush}\" TargetName=\"ShineBorder\" />\r\n                <Setter Property=\"Opacity\" TargetName=\"Grid\" Value=\"0.5\" />\r\n            </Trigger>\r\n        </ControlTemplate.Triggers>\r\n    </ControlTemplate>\n\n    <Style x:Key=\"RadioButtonFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Border>\r\n                        <Rectangle Margin=\"15,0,0,0\" Stroke=\"#60000000\" StrokeThickness=\"1\" StrokeDashArray=\"1 2\" />\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\n    <Style x:Key=\"CheckBoxFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Border>\r\n                        <Rectangle Margin=\"15,0,0,0\" Stroke=\"#60000000\" StrokeThickness=\"1\" StrokeDashArray=\"1 2\" />\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\n    <Style TargetType=\"{x:Type CheckBox}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource CheckBoxFocusVisual}\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\" />\r\n        <Setter Property=\"Template\" Value=\"{DynamicResource CheckBoxTemplate}\" />\r\n    </Style>\r\n\r\n    <ControlTemplate x:Key=\"CheckBoxTemplate\" TargetType=\"{x:Type CheckBox}\">\r\n        <ControlTemplate.Resources>\r\n            <Storyboard x:Key=\"HoverOn\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"HoverOff\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"PressedOn\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"PressedOff\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"CheckedTrue\">\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"CheckedFalse\">\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"IndeterminateOn\">\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"IndeterminateIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"1\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"IndeterminateOff\">\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"IndeterminateIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"FocussedOn\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"ContentFocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"FocussedOff\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"ContentFocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n        </ControlTemplate.Resources>\n        <BulletDecorator Background=\"Transparent\" x:Name=\"bulletDecorator\">\r\n            <BulletDecorator.Bullet>\r\n                <Grid Width=\"16\" Height=\"16\">\r\n                    <Rectangle Height=\"14\" Margin=\"1\" x:Name=\"Background\" Width=\"14\" Fill=\"{TemplateBinding Background}\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" />\r\n                    <Rectangle Height=\"14\" Margin=\"1\" x:Name=\"BackgroundOverlay\" Width=\"14\" Opacity=\"0\" Fill=\"{x:Null}\" Stroke=\"{StaticResource HoverBrush}\" StrokeThickness=\"2\" />\r\n                    <Rectangle Height=\"16\" x:Name=\"PressedRectangle\" Width=\"16\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HoverBrush}\" StrokeThickness=\"1\" />\r\n                    <Path Height=\"10\" Margin=\"1,1,0,1.5\" x:Name=\"CheckIcon\" Width=\"10.5\" Opacity=\"0\" Fill=\"{StaticResource GlyphBrush}\" Stretch=\"Fill\" Data=\"M102.03442,598.79645 L105.22962,597.78918 L106.78825,600.42358 C106.78825,600.42358 108.51028,595.74304 110.21724,593.60419 C112.00967,591.35822 114.89314,591.42316 114.89314,591.42316 C114.89314,591.42316 112.67844,593.42645 111.93174,594.44464 C110.7449,596.06293 107.15683,604.13837 107.15683,604.13837 z\" />\r\n                    <Rectangle Height=\"8\" x:Name=\"IndeterminateIcon\" Width=\"10\" Opacity=\"0\" Fill=\"{StaticResource GlyphBrush}\" />\r\n                    <Rectangle Height=\"14\" x:Name=\"DisabledVisualElement\" Width=\"14\" Opacity=\"0\" Fill=\"{StaticResource DisabledBackgroundBrush}\" />\r\n                    <Rectangle Height=\"16\" x:Name=\"ContentFocusVisualElement\" Width=\"16\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HoverShineBrush}\" StrokeThickness=\"1\" />\r\n                    <Rectangle Height=\"12\" x:Name=\"ShineRectangle\" Width=\"14\" IsHitTestVisible=\"false\" Opacity=\"1\" Stroke=\"{x:Null}\" StrokeThickness=\"1\" Fill=\"{StaticResource ShineBrush}\" Margin=\"2,2,2,2\" />\r\n                </Grid>\r\n            </BulletDecorator.Bullet>\r\n            <ContentPresenter RecognizesAccessKey=\"True\" Margin=\"5,0,0,0\" VerticalAlignment=\"Top\" HorizontalAlignment=\"Left\" />\r\n        </BulletDecorator>\n        <ControlTemplate.Triggers>\r\n            <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                <Trigger.ExitActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource FocussedOff}\" x:Name=\"FocussedOff_BeginStoryboard\" />\r\n                </Trigger.ExitActions>\r\n                <Trigger.EnterActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource FocussedOn}\" x:Name=\"FocussedOn_BeginStoryboard\" />\r\n                </Trigger.EnterActions>\r\n            </Trigger>\r\n            <MultiTrigger>\r\n                <MultiTrigger.Conditions>\r\n                    <Condition Property=\"IsChecked\" Value=\"True\" />\r\n                    <Condition Property=\"IsThreeState\" Value=\"True\" />\r\n                </MultiTrigger.Conditions>\r\n                <MultiTrigger.EnterActions>\r\n                    <BeginStoryboard x:Name=\"ThreeStateOn_BeginStoryboard\" Storyboard=\"{StaticResource CheckedFalse}\" />\r\n                </MultiTrigger.EnterActions>\r\n                <MultiTrigger.ExitActions>\r\n                    <BeginStoryboard x:Name=\"ThreeStateOff_BeginStoryboard\" Storyboard=\"{StaticResource CheckedTrue}\" />\r\n                </MultiTrigger.ExitActions>\r\n            </MultiTrigger>\r\n            <MultiTrigger>\r\n                <MultiTrigger.Conditions>\r\n                    <Condition Property=\"IsChecked\" Value=\"{x:Null}\" />\r\n                    <Condition Property=\"IsThreeState\" Value=\"True\" />\r\n                </MultiTrigger.Conditions>\r\n                <MultiTrigger.EnterActions>\r\n                    <BeginStoryboard x:Name=\"ThreeStateOn1_BeginStoryboard\" Storyboard=\"{StaticResource IndeterminateOn}\" />\r\n                </MultiTrigger.EnterActions>\r\n                <MultiTrigger.ExitActions>\r\n                    <BeginStoryboard x:Name=\"ThreeStateOff1_BeginStoryboard\" Storyboard=\"{StaticResource IndeterminateOff}\" />\r\n                </MultiTrigger.ExitActions>\r\n                <Setter Property=\"Visibility\" TargetName=\"CheckIcon\" Value=\"Hidden\" />\r\n            </MultiTrigger>\r\n            <Trigger Property=\"IsChecked\" Value=\"True\">\r\n                <Trigger.ExitActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource CheckedFalse}\" x:Name=\"CheckedTrue_BeginStoryboard\" />\r\n                </Trigger.ExitActions>\r\n                <Trigger.EnterActions>\r\n                    <BeginStoryboard x:Name=\"CheckedTrue_BeginStoryboard1\" Storyboard=\"{StaticResource CheckedTrue}\" />\r\n                </Trigger.EnterActions>\r\n            </Trigger>\r\n            <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                <Trigger.EnterActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                </Trigger.EnterActions>\r\n                <Trigger.ExitActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" />\r\n                </Trigger.ExitActions>\r\n            </Trigger>\r\n            <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                <Setter Property=\"Fill\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Background\" />\r\n                <Setter Property=\"Stroke\" Value=\"{DynamicResource DisabledBorderBrush}\" TargetName=\"Background\" />\r\n                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                <Setter Property=\"Opacity\" TargetName=\"bulletDecorator\" Value=\"0.5\" />\r\n            </Trigger>\r\n        </ControlTemplate.Triggers>\n    </ControlTemplate>\r\n\n    <Style TargetType=\"{x:Type RadioButton}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource RadioButtonFocusVisual}\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\" />\r\n        <Setter Property=\"Template\" Value=\"{DynamicResource RadioButtonTemplate}\" />\r\n        <Style.Triggers>\r\n        </Style.Triggers>\r\n    </Style>\n\n    <ControlTemplate x:Key=\"RadioButtonTemplate\" TargetType=\"{x:Type RadioButton}\">\r\n        <ControlTemplate.Resources>\r\n            <Storyboard x:Key=\"HoverOn\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"HoverOff\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"PressedOn\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedEllipse\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"PressedOff\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedEllipse\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"CheckedOn\">\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"CheckedOff\">\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"FocussedOn\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"ContentFocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"FocussedOff\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"ContentFocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n        </ControlTemplate.Resources>\n        <BulletDecorator Background=\"Transparent\" x:Name=\"bulletDecorator\">\r\n            <BulletDecorator.Bullet>\r\n                <Grid Width=\"16\" Height=\"16\">\r\n                    <Ellipse Height=\"14\" Margin=\"1\" x:Name=\"Background\" Width=\"14\" Fill=\"{TemplateBinding Background}\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" />\r\n                    <Ellipse Height=\"14\" Margin=\"1\" x:Name=\"BackgroundOverlay\" Width=\"14\" StrokeThickness=\"2\" Stroke=\"{StaticResource HoverBrush}\" Opacity=\"0\" />\r\n                    <Ellipse Height=\"14\" Margin=\"1\" x:Name=\"PressedEllipse\" Width=\"14\" StrokeThickness=\"{TemplateBinding BorderThickness}\" Stroke=\"{StaticResource HoverBrush}\" Opacity=\"0\" />\r\n                    <Ellipse Height=\"6\" x:Name=\"CheckIcon\" Width=\"6\" Opacity=\"0\" Fill=\"{StaticResource GlyphBrush}\" />\r\n                    <Ellipse Height=\"14\" x:Name=\"DisabledVisualElement\" Width=\"14\" Opacity=\"0\" Fill=\"{StaticResource DisabledBackgroundBrush}\" />\r\n                    <Ellipse Height=\"16\" x:Name=\"ContentFocusVisualElement\" Width=\"16\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HoverShineBrush}\" StrokeThickness=\"1\" />\r\n                    <Ellipse Height=\"12\" Margin=\"2,2,2,2\" x:Name=\"ShineEllipse\" Width=\"12\" StrokeThickness=\"{TemplateBinding BorderThickness}\" Stroke=\"{x:Null}\" Fill=\"{StaticResource ShineBrush}\" />\r\n                </Grid>\r\n            </BulletDecorator.Bullet>\r\n            <ContentPresenter RecognizesAccessKey=\"True\" Margin=\"5,0,0,0\" />\r\n        </BulletDecorator>\n        <ControlTemplate.Triggers>\r\n            <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                <Trigger.ExitActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource FocussedOff}\" x:Name=\"FocussedOff_BeginStoryboard\" />\r\n                </Trigger.ExitActions>\r\n                <Trigger.EnterActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource FocussedOn}\" x:Name=\"FocussedOn_BeginStoryboard\" />\r\n                </Trigger.EnterActions>\r\n            </Trigger>\r\n            <Trigger Property=\"IsChecked\" Value=\"false\">\r\n\r\n                <Trigger.ExitActions>\r\n                    <BeginStoryboard x:Name=\"CheckedOn_BeginStoryboard\" Storyboard=\"{StaticResource CheckedOn}\" />\r\n                </Trigger.ExitActions>\r\n                <Trigger.EnterActions>\r\n                    <BeginStoryboard x:Name=\"CheckedOff_BeginStoryboard\" Storyboard=\"{StaticResource CheckedOff}\" />\r\n                </Trigger.EnterActions>\r\n\r\n            </Trigger>\r\n            <Trigger Property=\"IsChecked\" Value=\"True\" />\r\n            <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n\r\n                <Trigger.ExitActions>\r\n                    <BeginStoryboard x:Name=\"HoverOff_BeginStoryboard\" Storyboard=\"{StaticResource HoverOff}\" />\r\n                </Trigger.ExitActions>\r\n                <Trigger.EnterActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                </Trigger.EnterActions>\r\n\r\n            </Trigger>\r\n            <Trigger Property=\"IsPressed\" Value=\"true\">\r\n\r\n                <Trigger.ExitActions>\r\n                    <BeginStoryboard x:Name=\"PressedOff_BeginStoryboard\" Storyboard=\"{StaticResource PressedOff}\" />\r\n                </Trigger.ExitActions>\r\n                <Trigger.EnterActions>\r\n                    <BeginStoryboard x:Name=\"PressedOn_BeginStoryboard\" Storyboard=\"{StaticResource PressedOn}\" />\r\n                </Trigger.EnterActions>\r\n\r\n            </Trigger>\r\n            <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                <Setter Property=\"Fill\" TargetName=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" />\r\n                <Setter Property=\"Stroke\" TargetName=\"Background\" Value=\"{DynamicResource DisabledBorderBrush}\" />\r\n                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                <Setter Property=\"Opacity\" TargetName=\"bulletDecorator\" Value=\"0.5\" />\r\n            </Trigger>\n        </ControlTemplate.Triggers>\r\n    </ControlTemplate>\n\n    <Style d:IsControlPart=\"True\" TargetType=\"{x:Type RepeatButton}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"ContentPresenter\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.8\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"ContentPresenter\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0.3\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"ContentPresenter\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"ContentPresenter\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0.3\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Border x:Name=\"Border\" BorderThickness=\"{TemplateBinding BorderThickness}\" Opacity=\"1\" />\r\n                        <ContentPresenter HorizontalAlignment=\"Center\" x:Name=\"ContentPresenter\" VerticalAlignment=\"Center\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" ContentTemplateSelector=\"{TemplateBinding ContentTemplateSelector}\" Opacity=\"0.3\" Height=\"Auto\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\" />\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"ContentPresenter\" Value=\"0.1\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\n    <Style x:Key=\"NuclearThumbStyle\" d:IsControlPart=\"True\" TargetType=\"{x:Type Thumb}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.8\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0.3\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0.3\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid Margin=\"0,0,0,0\" x:Name=\"Grid\">\r\n                        <Rectangle HorizontalAlignment=\"Stretch\" x:Name=\"HoverRectangle\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" RadiusX=\"3\" RadiusY=\"4\" Stroke=\"{x:Null}\" Margin=\"4.5,-2,4.5,-2\" Opacity=\"0.3\" MinHeight=\"10\">\r\n                            <Rectangle.Fill>\r\n                                <SolidColorBrush Color=\"{DynamicResource WhiteColor}\" />\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                        <Rectangle HorizontalAlignment=\"Stretch\" x:Name=\"PressedRectangle\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" RadiusX=\"3\" RadiusY=\"4\" Stroke=\"{x:Null}\" Margin=\"4.5,-2,4.5,-2\" Opacity=\"0.3\" MinHeight=\"10\">\r\n                            <Rectangle.Fill>\r\n                                <SolidColorBrush Color=\"{DynamicResource WhiteColor}\" />\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\" />\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\" >\r\n                            <Setter Property=\"Opacity\" TargetName=\"Grid\" Value=\"0.1\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsDragging\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\n    <Style x:Key=\"NuclearScrollRepeatButtonStyle\" d:IsControlPart=\"True\" TargetType=\"{x:Type RepeatButton}\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"false\" />\r\n        <Setter Property=\"Focusable\" Value=\"false\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n                    <Grid>\r\n                        <Rectangle Fill=\"{TemplateBinding Background}\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\n    <Style TargetType=\"{x:Type ScrollBar}\">\r\n        <Setter Property=\"Stylus.IsFlicksEnabled\" Value=\"false\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ScrollBar}\">\r\n                    <Grid x:Name=\"GridRoot\" Width=\"{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}\" Background=\"{DynamicResource NormalBrush}\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition MaxHeight=\"18\" />\r\n                            <RowDefinition Height=\"0.00001*\" />\r\n                            <RowDefinition MaxHeight=\"18\" />\r\n                        </Grid.RowDefinitions>\n                        <RepeatButton x:Name=\"DecreaseRepeat\" Command=\"ScrollBar.LineUpCommand\" Background=\"{x:Null}\" BorderBrush=\"{x:Null}\" Foreground=\"{x:Null}\">\r\n                            <Grid Margin=\"0,0,0,0\">\r\n                                <Path Margin=\"4.742,3.997,4.946,5.327\" VerticalAlignment=\"Stretch\" Height=\"Auto\" Fill=\"{DynamicResource GlyphBrush}\" Stretch=\"Fill\" Stroke=\"{DynamicResource GlyphBrush}\" StrokeThickness=\"1\" Data=\"M5.2422477,11.132184 L11.5544,11.132184 8.6412958,4.4969033 z\" x:Name=\"DecreaseArrow\" />\r\n                            </Grid>\r\n                        </RepeatButton>\n                        <Track Grid.Row=\"1\" x:Name=\"PART_Track\" Orientation=\"Vertical\" IsDirectionReversed=\"true\">\r\n                            <Track.Thumb>\r\n                                <Thumb Style=\"{DynamicResource NuclearThumbStyle}\" Background=\"{x:Null}\" Foreground=\"{x:Null}\" />\r\n                            </Track.Thumb>\r\n                            <Track.IncreaseRepeatButton>\r\n                                <RepeatButton x:Name=\"PageUp\" Style=\"{DynamicResource NuclearScrollRepeatButtonStyle}\" Command=\"ScrollBar.PageDownCommand\" />\r\n                            </Track.IncreaseRepeatButton>\r\n                            <Track.DecreaseRepeatButton>\r\n                                <RepeatButton x:Name=\"PageDown\" Style=\"{DynamicResource NuclearScrollRepeatButtonStyle}\" Command=\"ScrollBar.PageUpCommand\" />\r\n                            </Track.DecreaseRepeatButton>\r\n                        </Track>\n                        <RepeatButton Grid.Row=\"2\" x:Name=\"IncreaseRepeat\" Command=\"ScrollBar.LineDownCommand\">\r\n                            <Grid>\r\n                                <Path Margin=\"4.742,3.997,4.946,5.327\" x:Name=\"IncreaseArrow\" VerticalAlignment=\"Stretch\" Height=\"Auto\" Fill=\"{DynamicResource GlyphBrush}\" Stretch=\"Fill\" Stroke=\"{DynamicResource GlyphBrush}\" StrokeThickness=\"1\" Data=\"M5.2422477,11.132184 L11.5544,11.132184 8.6412958,4.4969033 z\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                    <Path.RenderTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                            <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                            <RotateTransform Angle=\"180\" />\r\n                                            <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                        </TransformGroup>\r\n                                    </Path.RenderTransform>\r\n                                </Path>\r\n                            </Grid>\r\n                        </RepeatButton>\r\n                    </Grid>\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"Orientation\" Value=\"Horizontal\">\n                            <Setter Property=\"LayoutTransform\" TargetName=\"GridRoot\">\r\n                                <Setter.Value>\r\n                                    <RotateTransform Angle=\"-90\" />\r\n                                </Setter.Value>\r\n                            </Setter>\n                            <Setter TargetName=\"PART_Track\" Property=\"Orientation\" Value=\"Vertical\" />\n                            <Setter Property=\"Command\" Value=\"ScrollBar.LineLeftCommand\" TargetName=\"DecreaseRepeat\" />\r\n                            <Setter Property=\"Command\" Value=\"ScrollBar.LineRightCommand\" TargetName=\"IncreaseRepeat\" />\r\n                            <Setter Property=\"Command\" Value=\"ScrollBar.PageLeftCommand\" TargetName=\"PageDown\" />\r\n                            <Setter Property=\"Command\" Value=\"ScrollBar.PageRightCommand\" TargetName=\"PageUp\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\n    <Style x:Key=\"NuclearScrollViewer\" TargetType=\"{x:Type ScrollViewer}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ScrollViewer}\">\r\n                    <Grid Background=\"{TemplateBinding Background}\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\" />\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"*\" />\r\n                            <RowDefinition Height=\"Auto\" />\r\n                        </Grid.RowDefinitions>\r\n                        <ScrollContentPresenter Grid.Column=\"0\" Grid.Row=\"0\" Margin=\"{TemplateBinding Padding}\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" CanContentScroll=\"{TemplateBinding CanContentScroll}\" />\n                        <ScrollBar Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Grid.Column=\"0\" Grid.Row=\"1\" x:Name=\"PART_HorizontalScrollBar\" Orientation=\"Horizontal\" Value=\"{Binding Path=HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" ViewportSize=\"{TemplateBinding ViewportWidth}\" Minimum=\"0\" Maximum=\"{TemplateBinding ScrollableWidth}\" AutomationProperties.AutomationId=\"HorizontalScrollBar\" />\r\n                        <ScrollBar Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Grid.Column=\"1\" Grid.Row=\"0\" x:Name=\"PART_VerticalScrollBar\" Orientation=\"Vertical\" Value=\"{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" ViewportSize=\"{TemplateBinding ViewportHeight}\" Minimum=\"0\" Maximum=\"{TemplateBinding ScrollableHeight}\" AutomationProperties.AutomationId=\"VerticalScrollBar\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\n    <Style TargetType=\"{x:Type ListBox}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"Background\" Value=\"{StaticResource ControlBackgroundBrush}\" />\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"#FFA3AEB9\" Offset=\"0\" />\r\n                    <GradientStop Color=\"#FF8399A9\" Offset=\"0.375\" />\r\n                    <GradientStop Color=\"#FF718597\" Offset=\"0.375\" />\r\n                    <GradientStop Color=\"#FF617584\" Offset=\"1\" />\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\" />\r\n        <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\" />\r\n        <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"True\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListBox}\">\r\n                    <Grid>\r\n                        <Border x:Name=\"Border\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\" Background=\"{DynamicResource ControlBackgroundBrush}\" />\r\n                        <ScrollViewer Margin=\"1\" Style=\"{DynamicResource NuclearScrollViewer}\" Focusable=\"false\" Background=\"{x:Null}\">\n                            <StackPanel Margin=\"1,1,1,1\" IsItemsHost=\"true\" />\n                        </ScrollViewer>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\" />\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DisabledBorderBrush}\" TargetName=\"Border\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                            <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\n    <Style d:IsControlPart=\"True\" TargetType=\"{x:Type ListBoxItem}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListBoxItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOn\">\r\n\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOff\">\r\n\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocussedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocussedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid SnapsToDevicePixels=\"true\" Margin=\"1,1,1,1\">\r\n                        <Rectangle x:Name=\"Background\" IsHitTestVisible=\"False\" Opacity=\"0.25\" Fill=\"{StaticResource NormalBrush}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                        <Rectangle x:Name=\"HoverRectangle\" IsHitTestVisible=\"False\" Opacity=\"0\" Fill=\"{StaticResource NormalBrush}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                        <Rectangle x:Name=\"SelectedRectangle\" IsHitTestVisible=\"False\" Opacity=\"0\" Fill=\"{StaticResource SelectedBackgroundBrush}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Margin=\"5,2,0,2\" x:Name=\"contentPresenter\" />\r\n                        <Rectangle x:Name=\"FocusVisualElement\" Stroke=\"{StaticResource HoverShineBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocussedOff}\" x:Name=\"FocussedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocussedOn}\" x:Name=\"FocussedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\n                        <Trigger Property=\"IsSelected\" Value=\"true\">\r\n\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"SelectedOff_BeginStoryboard\" Storyboard=\"{StaticResource SelectedOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"SelectedOn_BeginStoryboard\" Storyboard=\"{StaticResource SelectedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" />\r\n                                <Condition Property=\"Selector.IsSelected\" Value=\"False\" />\r\n                            </MultiTrigger.Conditions>\r\n\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"HoverOff_BeginStoryboard\" Storyboard=\"{StaticResource HoverOff}\"/>\r\n                            </MultiTrigger.ExitActions>\r\n\r\n                        </MultiTrigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"Selector.IsSelected\" Value=\"True\" />\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" />\r\n                            </MultiTrigger.Conditions>\r\n\r\n                        </MultiTrigger>\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Style.Triggers>\r\n            <Trigger Property=\"Selector.IsSelected\" Value=\"True\">\r\n                <Setter Property=\"Foreground\">\r\n                    <Setter.Value>\r\n                        <SolidColorBrush Color=\"{DynamicResource BlackColor}\" />\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Trigger>\r\n        </Style.Triggers>\r\n    </Style>\r\n\r\n    <Style x:Key=\"ExpanderHeaderFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Border>\r\n                        <Rectangle SnapsToDevicePixels=\"true\" Margin=\"0\" Stroke=\"Black\" StrokeDashArray=\"1 2\" StrokeThickness=\"1\" />\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"ExpanderDownHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Border Padding=\"{TemplateBinding Padding}\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"2,2,2,2\">\r\n                        <Grid SnapsToDevicePixels=\"False\" Background=\"Transparent\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"19\" />\r\n                                <ColumnDefinition Width=\"*\" />\r\n                            </Grid.ColumnDefinitions>\r\n                            <Rectangle Margin=\"2,2,2,2\" x:Name=\"Rectangle\" Fill=\"{DynamicResource NormalBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" />\r\n                            <Rectangle Margin=\"2,2,2,2\" x:Name=\"ShineRectangle\" Fill=\"{DynamicResource ShineBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" />\r\n                            <Rectangle Margin=\"2,2,2,2\" x:Name=\"HoverRectangle\" Fill=\"{DynamicResource HoverBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" />\r\n                            <Rectangle Margin=\"2,2,2,2\" x:Name=\"HoverShineRectangle\" Fill=\"{DynamicResource HoverShineBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" />\r\n                            <Rectangle Margin=\"2,2,2,2\" x:Name=\"PressedRectangle\" Fill=\"{DynamicResource PressedBrush}\" Stroke=\"{DynamicResource PressedBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" />\r\n                            <Path HorizontalAlignment=\"Center\" x:Name=\"Up_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 0 L 4 4 L 8 0 Z\" />\r\n                            <Path Visibility=\"Collapsed\" HorizontalAlignment=\"Center\" x:Name=\"Down_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 4 L 4 0 L 8 4 Z\" />\r\n                            <ContentPresenter SnapsToDevicePixels=\"True\" HorizontalAlignment=\"Left\" Margin=\"4,2,0,2\" VerticalAlignment=\"Center\" Grid.Column=\"1\" RecognizesAccessKey=\"True\" />\r\n                        </Grid>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"Down_Arrow\" Value=\"Visible\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Up_Arrow\" Value=\"Collapsed\" />\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"ExpanderRightHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Border Padding=\"{TemplateBinding Padding}\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"2,2,2,2\">\r\n                        <Grid SnapsToDevicePixels=\"False\" Background=\"Transparent\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"19\" />\r\n                                <RowDefinition Height=\"*\" />\r\n                            </Grid.RowDefinitions>\r\n                            <Grid>\r\n                                <Grid.LayoutTransform>\r\n                                    <TransformGroup>\r\n                                        <TransformGroup.Children>\r\n                                            <TransformCollection>\r\n                                                <RotateTransform Angle=\"-90\" />\r\n                                            </TransformCollection>\r\n                                        </TransformGroup.Children>\r\n                                    </TransformGroup>\r\n                                </Grid.LayoutTransform>\r\n                                <Rectangle Margin=\"2,2,2,2\" x:Name=\"Rectangle\" Fill=\"{DynamicResource NormalBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" />\r\n                                <Rectangle Margin=\"2,2,2,2\" x:Name=\"ShineRectangle\" Fill=\"{DynamicResource ShineBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" />\r\n                                <Rectangle Margin=\"2,2,2,2\" x:Name=\"HoverRectangle\" Fill=\"{DynamicResource HoverBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" />\r\n                                <Rectangle Margin=\"2,2,2,2\" x:Name=\"HoverShineRectangle\" Fill=\"{DynamicResource HoverShineBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" />\r\n                                <Rectangle Margin=\"2,2,2,2\" x:Name=\"PressedRectangle\" Fill=\"{DynamicResource PressedBrush}\" Stroke=\"{DynamicResource PressedBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" />\r\n                                <Path HorizontalAlignment=\"Center\" x:Name=\"Up_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 0 L 4 4 L 8 0 Z\" />\r\n                                <Path Visibility=\"Collapsed\" HorizontalAlignment=\"Center\" x:Name=\"Down_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 4 L 4 0 L 8 4 Z\" />\r\n                            </Grid>\r\n                            <ContentPresenter SnapsToDevicePixels=\"True\" HorizontalAlignment=\"Center\" Margin=\"2,4,4,0\" VerticalAlignment=\"Top\" Grid.Row=\"1\" RecognizesAccessKey=\"True\">\r\n                                <ContentPresenter.LayoutTransform>\r\n                                    <TransformGroup>\r\n                                        <TransformGroup.Children>\r\n                                            <TransformCollection>\r\n                                                <RotateTransform Angle=\"-90\" />\r\n                                            </TransformCollection>\r\n                                        </TransformGroup.Children>\r\n                                    </TransformGroup>\r\n                                </ContentPresenter.LayoutTransform>\r\n                            </ContentPresenter>\r\n                        </Grid>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"Up_Arrow\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Down_Arrow\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"ExpanderUpHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Border Padding=\"{TemplateBinding Padding}\" CornerRadius=\"2,2,2,2\" BorderThickness=\"1,1,1,1\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\">\r\n                        <Grid SnapsToDevicePixels=\"False\" Background=\"Transparent\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"19\" />\r\n                                <ColumnDefinition Width=\"*\" />\r\n                            </Grid.ColumnDefinitions>\r\n                            <Grid>\r\n                                <Grid.LayoutTransform>\r\n                                    <TransformGroup>\r\n                                        <TransformGroup.Children>\r\n                                            <TransformCollection>\r\n                                                <RotateTransform Angle=\"180\" />\r\n                                            </TransformCollection>\r\n                                        </TransformGroup.Children>\r\n                                    </TransformGroup>\r\n                                </Grid.LayoutTransform>\r\n                                <Rectangle Margin=\"2,2,2,2\" x:Name=\"Rectangle\" Fill=\"{DynamicResource NormalBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" />\r\n                                <Rectangle Margin=\"2,2,2,2\" x:Name=\"ShineRectangle\" Fill=\"{DynamicResource ShineBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" />\r\n                                <Rectangle Margin=\"2,2,2,2\" x:Name=\"HoverRectangle\" Fill=\"{DynamicResource HoverBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" />\r\n                                <Rectangle Margin=\"2,2,2,2\" x:Name=\"HoverShineRectangle\" Fill=\"{DynamicResource HoverShineBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" />\r\n                                <Rectangle Margin=\"2,2,2,2\" x:Name=\"PressedRectangle\" Fill=\"{DynamicResource PressedBrush}\" Stroke=\"{DynamicResource PressedBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" />\r\n                                <Path HorizontalAlignment=\"Center\" x:Name=\"Up_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 0 L 4 4 L 8 0 Z\" />\r\n                                <Path Visibility=\"Collapsed\" HorizontalAlignment=\"Center\" x:Name=\"Down_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 4 L 4 0 L 8 4 Z\" />\r\n                            </Grid>\r\n                            <ContentPresenter SnapsToDevicePixels=\"True\" HorizontalAlignment=\"Left\" Margin=\"4,2,0,2\" VerticalAlignment=\"Center\" Grid.Column=\"1\" RecognizesAccessKey=\"True\" />\r\n                        </Grid>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"Up_Arrow\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Down_Arrow\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"ExpanderLeftHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Border Padding=\"{TemplateBinding Padding}\" CornerRadius=\"2,2,2,2\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"1,1,1,1\">\r\n                        <Grid SnapsToDevicePixels=\"False\" Background=\"Transparent\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"19\" />\r\n                                <RowDefinition Height=\"*\" />\r\n                            </Grid.RowDefinitions>\r\n                            <Grid>\r\n                                <Grid.LayoutTransform>\r\n                                    <TransformGroup>\r\n                                        <TransformGroup.Children>\r\n                                            <TransformCollection>\r\n                                                <RotateTransform Angle=\"90\" />\r\n                                            </TransformCollection>\r\n                                        </TransformGroup.Children>\r\n                                    </TransformGroup>\r\n                                </Grid.LayoutTransform>\r\n                                <Rectangle Margin=\"2,2,2,2\" x:Name=\"Rectangle\" Fill=\"{DynamicResource NormalBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" />\r\n                                <Rectangle Margin=\"2,2,2,2\" x:Name=\"ShineRectangle\" Fill=\"{DynamicResource ShineBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" />\r\n                                <Rectangle Margin=\"2,2,2,2\" x:Name=\"HoverRectangle\" Fill=\"{DynamicResource HoverBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" />\r\n                                <Rectangle Margin=\"2,2,2,2\" x:Name=\"HoverShineRectangle\" Fill=\"{DynamicResource HoverShineBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" />\r\n                                <Rectangle Margin=\"2,2,2,2\" x:Name=\"PressedRectangle\" Fill=\"{DynamicResource PressedBrush}\" Stroke=\"{DynamicResource PressedBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" />\r\n                                <Path HorizontalAlignment=\"Center\" x:Name=\"Up_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 0 L 4 4 L 8 0 Z\" />\r\n                                <Path Visibility=\"Collapsed\" HorizontalAlignment=\"Center\" x:Name=\"Down_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 4 L 4 0 L 8 4 Z\" />\r\n                            </Grid>\r\n                            <ContentPresenter SnapsToDevicePixels=\"True\" HorizontalAlignment=\"Center\" Margin=\"4,4,2,0\" VerticalAlignment=\"Top\" Grid.Row=\"1\" RecognizesAccessKey=\"True\">\r\n                                <ContentPresenter.LayoutTransform>\r\n                                    <TransformGroup>\r\n                                        <TransformGroup.Children>\r\n                                            <TransformCollection>\r\n                                                <RotateTransform Angle=\"90\" />\r\n                                            </TransformCollection>\r\n                                        </TransformGroup.Children>\r\n                                    </TransformGroup>\r\n                                </ContentPresenter.LayoutTransform>\r\n                            </ContentPresenter>\r\n                        </Grid>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"Up_Arrow\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Down_Arrow\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style TargetType=\"{x:Type Expander}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Expander}\">\r\n                    <Border SnapsToDevicePixels=\"true\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"3\">\r\n                        <DockPanel x:Name=\"dockPanel\">\r\n                            <ToggleButton FontFamily=\"{TemplateBinding FontFamily}\" FontSize=\"{TemplateBinding FontSize}\" FontStretch=\"{TemplateBinding FontStretch}\" FontStyle=\"{TemplateBinding FontStyle}\" FontWeight=\"{TemplateBinding FontWeight}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\" FocusVisualStyle=\"{StaticResource ExpanderHeaderFocusVisual}\" Margin=\"1,1,1,0\" MinHeight=\"0\" MinWidth=\"0\" x:Name=\"HeaderSite\" Style=\"{StaticResource ExpanderDownHeaderStyle}\" Content=\"{TemplateBinding Header}\" ContentTemplate=\"{TemplateBinding HeaderTemplate}\" ContentTemplateSelector=\"{TemplateBinding HeaderTemplateSelector}\" IsChecked=\"{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" DockPanel.Dock=\"Top\" />\r\n                            <Border Visibility=\"Collapsed\" Background=\"{DynamicResource ShadeBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"1,0,1,1\" CornerRadius=\"3,3,3,3\" x:Name=\"border\" Margin=\"1,1,1,1\">\r\n                                <ContentPresenter Focusable=\"false\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"1,1,1,1\" x:Name=\"ExpandSite\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" DockPanel.Dock=\"Bottom\" />\r\n                            </Border>\r\n                        </DockPanel>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsExpanded\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"border\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Down\" />\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Right\">\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Right\" />\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Left\" />\r\n                            <Setter Property=\"Style\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderRightHeaderStyle}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Up\">\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Top\" />\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Bottom\" />\r\n                            <Setter Property=\"Style\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderUpHeaderStyle}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Left\">\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Left\" />\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Right\" />\r\n                            <Setter Property=\"Style\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderLeftHeaderStyle}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\n    <ControlTemplate x:Key=\"ComboBoxToggleButton\" TargetType=\"{x:Type ToggleButton}\">\r\n        <ControlTemplate.Resources>\r\n            <Storyboard x:Key=\"HoverOn\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"HoverOff\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n        </ControlTemplate.Resources>\r\n        <Grid x:Name=\"grid\">\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition />\r\n                <ColumnDefinition Width=\"20\" />\r\n            </Grid.ColumnDefinitions>\r\n            <Rectangle Grid.ColumnSpan=\"2\" HorizontalAlignment=\"Stretch\" x:Name=\"Rectangle\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" RadiusX=\"3\" RadiusY=\"3\" Fill=\"{DynamicResource LightBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" />\r\n            <Rectangle Grid.Column=\"0\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" RadiusX=\"3\" RadiusY=\"3\" Fill=\"{DynamicResource LightBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" />\r\n            <Border Margin=\"2,2,2,2\" Grid.Column=\"1\" Background=\"{DynamicResource NormalBrush}\" CornerRadius=\"3,3,3,3\" x:Name=\"border\" />\r\n            <Border Margin=\"2,2,2,2\" Background=\"{DynamicResource HoverBrush}\" CornerRadius=\"3,3,3,3\" x:Name=\"HoverBorder\" Grid.Column=\"1\" Opacity=\"0\" />\r\n            <Border Margin=\"2,2,2,2\" Background=\"{DynamicResource HoverShineBrush}\" CornerRadius=\"3,3,3,3\" x:Name=\"HoverShineBorder\" Grid.Column=\"1\" Opacity=\"0\" />\r\n            <Path Grid.Column=\"1\" HorizontalAlignment=\"Center\" x:Name=\"Arrow\" VerticalAlignment=\"Center\" Fill=\"{x:Null}\" Data=\"M0.5,0.5 L3,6.5 5.5,0.5\" Stroke=\"{DynamicResource GlyphBrush}\" Margin=\"5,0,5,0\" Height=\"7\" StrokeThickness=\"2\" Stretch=\"Fill\" />\r\n            <Border Margin=\"2,2,2,2\" Background=\"{DynamicResource ShineBrush}\" CornerRadius=\"3,3,3,3\" x:Name=\"ShineBorder\" Grid.Column=\"1\" />\r\n        </Grid>\r\n        <ControlTemplate.Triggers>\r\n            <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                <Trigger.ExitActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                </Trigger.ExitActions>\r\n                <Trigger.EnterActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                </Trigger.EnterActions>\r\n            </Trigger>\r\n            <Trigger Property=\"IsChecked\" Value=\"true\" />\r\n            <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                <Setter Property=\"Stroke\" TargetName=\"Arrow\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                <Setter Property=\"Background\" TargetName=\"border\" Value=\"{DynamicResource DisabledBorderBrush}\"/>\r\n                <Setter Property=\"Opacity\" TargetName=\"grid\" Value=\"0.8\"/>\r\n            </Trigger>\r\n        </ControlTemplate.Triggers>\r\n    </ControlTemplate>\n    <ControlTemplate x:Key=\"ComboBoxTextBox\" TargetType=\"{x:Type TextBox}\">\n        <Border x:Name=\"PART_ContentHost\" Focusable=\"False\" Background=\"{TemplateBinding Background}\" />\r\n        <ControlTemplate.Triggers>\r\n        </ControlTemplate.Triggers>\r\n    </ControlTemplate>\n    \n    <Style TargetType=\"{x:Type ComboBox}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"Template\" Value=\"{DynamicResource ComboBoxTemplate}\" />\r\n    </Style>\n\n    <ControlTemplate x:Key=\"ComboBoxTemplate\" TargetType=\"{x:Type ComboBox}\">\r\n        <Grid x:Name=\"grid\">\n            <ToggleButton Grid.Column=\"2\" Template=\"{DynamicResource ComboBoxToggleButton}\" x:Name=\"ToggleButton\" Focusable=\"false\" IsChecked=\"{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" ClickMode=\"Press\" />\r\n            <ContentPresenter HorizontalAlignment=\"Left\" Margin=\"3,3,23,3\" x:Name=\"ContentSite\" VerticalAlignment=\"Center\" Content=\"{TemplateBinding SelectionBoxItem}\" ContentTemplate=\"{TemplateBinding SelectionBoxItemTemplate}\" ContentTemplateSelector=\"{TemplateBinding ItemTemplateSelector}\" IsHitTestVisible=\"False\" />\n            <TextBox Visibility=\"Hidden\" Template=\"{DynamicResource ComboBoxTextBox}\" HorizontalAlignment=\"Left\" Margin=\"3,3,23,3\" x:Name=\"PART_EditableTextBox\" Style=\"{x:Null}\" VerticalAlignment=\"Center\" Focusable=\"True\" Background=\"{DynamicResource LightBrush}\" IsReadOnly=\"{TemplateBinding IsReadOnly}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" Foreground=\"{DynamicResource TextBrush}\" />\n            <Popup IsOpen=\"{TemplateBinding IsDropDownOpen}\" Placement=\"Bottom\" x:Name=\"Popup\" Focusable=\"False\" AllowsTransparency=\"True\" PopupAnimation=\"Slide\">\r\n                <Grid MaxHeight=\"{TemplateBinding MaxDropDownHeight}\" MinWidth=\"{TemplateBinding ActualWidth}\" x:Name=\"DropDown\" SnapsToDevicePixels=\"True\">\r\n                    <Border x:Name=\"DropDownBorder\" Background=\"{DynamicResource ControlBackgroundBrush}\" CornerRadius=\"3,3,3,3\" />\r\n                    <ScrollViewer Margin=\"4,6,4,6\" Style=\"{DynamicResource NuclearScrollViewer}\" SnapsToDevicePixels=\"True\" HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Auto\" CanContentScroll=\"True\" Foreground=\"{DynamicResource {x:Static SystemColors.ActiveCaptionTextBrushKey}}\">\n                        <StackPanel IsItemsHost=\"True\" KeyboardNavigation.DirectionalNavigation=\"Contained\" />\n                    </ScrollViewer>\r\n                </Grid>\r\n            </Popup>\r\n        </Grid>\r\n        <ControlTemplate.Triggers>\n            <Trigger Property=\"HasItems\" Value=\"false\">\r\n                <Setter Property=\"MinHeight\" Value=\"95\" TargetName=\"DropDownBorder\" />\r\n            </Trigger>\r\n            <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                <Setter Property=\"Opacity\" TargetName=\"grid\" Value=\"0.5\" />\r\n            </Trigger>\r\n            <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\" />\r\n            </Trigger>\r\n            <Trigger Property=\"AllowsTransparency\" SourceName=\"Popup\" Value=\"true\">\r\n                <Setter Property=\"Margin\" Value=\"0,2,0,0\" TargetName=\"DropDownBorder\" />\r\n            </Trigger>\r\n            <Trigger Property=\"IsEditable\" Value=\"true\">\r\n                <Setter Property=\"IsTabStop\" Value=\"false\" />\r\n                <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"PART_EditableTextBox\" />\r\n                <Setter Property=\"Visibility\" Value=\"Hidden\" TargetName=\"ContentSite\" />\r\n            </Trigger>\r\n        </ControlTemplate.Triggers>\r\n    </ControlTemplate>\n\n    <Style d:IsControlPart=\"True\" TargetType=\"{x:Type ComboBoxItem}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ComboBoxItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOn\">\r\n\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOff\">\r\n\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n\r\n                    </ControlTemplate.Resources>\r\n                    <Grid SnapsToDevicePixels=\"true\" Margin=\"1,1,1,1\">\r\n                        <Rectangle x:Name=\"Background\" IsHitTestVisible=\"False\" Opacity=\"0.25\" Fill=\"{StaticResource NormalBrush}\" RadiusX=\"1\" RadiusY=\"1\" />\r\n                        <Rectangle x:Name=\"HoverRectangle\" IsHitTestVisible=\"False\" Opacity=\"0\" Fill=\"{StaticResource NormalBrush}\" RadiusX=\"1\" RadiusY=\"1\" />\r\n                        <Rectangle x:Name=\"SelectedRectangle\" IsHitTestVisible=\"False\" Opacity=\"0\" Fill=\"{StaticResource SelectedBackgroundBrush}\" RadiusX=\"1\" RadiusY=\"1\" />\r\n                        <ContentPresenter Margin=\"5,2,0,2\" x:Name=\"contentPresenter\" VerticalAlignment=\"Center\" />\r\n                        <Rectangle x:Name=\"FocusVisualElement\" Visibility=\"Collapsed\" Stroke=\"{StaticResource HoverShineBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\n                        <Trigger Property=\"IsHighlighted\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOff}\" x:Name=\"SelectedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\" x:Name=\"SelectedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\n    <Style TargetType=\"{x:Type ProgressBar}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ProgressBar}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"ValueChangedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PART_Track\" Storyboard.TargetProperty=\"(UIElement.BitmapEffect).(OuterGlowBitmapEffect.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\" />\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"1\" />\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:02\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"IndeterminateOn\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"IndeterminateGradientFill\" Storyboard.TargetProperty=\"(Shape.Fill).(LinearGradientBrush.Transform).(TransformGroup.Children)[0].X\" RepeatBehavior=\"Forever\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0\" />\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:2.4\" Value=\"145\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\n                        <Border x:Name=\"PART_Track\" BorderBrush=\"{DynamicResource SolidBorderBrush}\" BorderThickness=\"1\" CornerRadius=\"0,0,0,0\" Background=\"{DynamicResource LightBrush}\">\r\n                            <Border.BitmapEffect>\r\n                                <OuterGlowBitmapEffect Opacity=\"0\" GlowColor=\"{DynamicResource WhiteColor}\" GlowSize=\"3\" />\r\n                            </Border.BitmapEffect>\r\n                        </Border>\n                        <Border HorizontalAlignment=\"Left\" x:Name=\"PART_Indicator\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"1\" CornerRadius=\"0,0,0,0\">\n                            <Border.Background>\r\n                                <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                    <GradientStop Color=\"#B2FFFFFF\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#C6FFFFFF\" Offset=\"0.15\" />\r\n                                    <GradientStop Color=\"#D1FFFFFF\" Offset=\"0.275\" />\r\n                                    <GradientStop Color=\"#C6FFFFFF\" Offset=\"0.4\" />\r\n                                    <GradientStop Color=\"#BFFFFFFF\" Offset=\"0.65\" />\r\n                                    <GradientStop Color=\"#A5FFFFFF\" Offset=\"0.75\" />\r\n                                    <GradientStop Color=\"#91FFFFFF\" Offset=\"0.85\" />\r\n                                    <GradientStop Color=\"#72FFFFFF\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Border.Background>\n                        </Border>\r\n                        <Grid x:Name=\"IndeterminateRoot\" Visibility=\"Collapsed\">\r\n                            <Rectangle Margin=\"{TemplateBinding BorderThickness}\" x:Name=\"IndeterminateSolidFill\" Opacity=\"1\" RenderTransformOrigin=\"0.5,0.5\" RadiusX=\"2\" RadiusY=\"2\" Fill=\"{DynamicResource ControlBackgroundBrush}\" Stroke=\"#FF448DCA\" StrokeThickness=\"0\" />\r\n                            <Rectangle Margin=\"{TemplateBinding BorderThickness}\" x:Name=\"IndeterminateGradientFill\" RadiusX=\"2\" RadiusY=\"2\" StrokeThickness=\"1\">\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush EndPoint=\"0.508,1.394\" StartPoint=\"0.401,-0.394\" SpreadMethod=\"Repeat\">\r\n                                        <GradientStop Color=\"#00FFFFFF\" />\r\n                                        <GradientStop Color=\"#FEA1A1A1\" Offset=\"1\" />\r\n                                        <GradientStop Color=\"#00FEFEFE\" Offset=\"0.517\" />\r\n                                        <GradientStop Color=\"#FEA1A1A1\" Offset=\"0.517\" />\r\n                                        <LinearGradientBrush.Transform>\r\n                                            <TransformGroup>\r\n                                                <TranslateTransform X=\"0\" />\r\n                                            </TransformGroup>\r\n                                        </LinearGradientBrush.Transform>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                        </Grid>\r\n                        <Border Background=\"{DynamicResource DisabledBackgroundBrush}\" Opacity=\"0\" BorderThickness=\"1,1,1,1\" BorderBrush=\"{DynamicResource DisabledBorderBrush}\" x:Name=\"border\"/>\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"border\" Value=\"0.8\"/>\r\n                        </Trigger>\r\n                        <EventTrigger RoutedEvent=\"RangeBase.ValueChanged\">\r\n                            <BeginStoryboard Storyboard=\"{StaticResource ValueChangedOn}\" />\r\n                        </EventTrigger>\r\n                        <Trigger Property=\"IsIndeterminate\" Value=\"True\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource IndeterminateOn}\" />\r\n                            </Trigger.EnterActions>\r\n                            <Setter Property=\"Visibility\" TargetName=\"IndeterminateRoot\" Value=\"Visible\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\n    <Style TargetType=\"{x:Type TextBox}\">\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\" />\r\n        <Setter Property=\"AllowDrop\" Value=\"true\" />\r\n        <Setter Property=\"Template\" Value=\"{DynamicResource TextBoxTemplate}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource ControlBackgroundBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"#FF000000\"/>\r\n    </Style>\n\n    <ControlTemplate x:Key=\"TextBoxTemplate\" TargetType=\"{x:Type TextBox}\">\r\n        <ControlTemplate.Resources>\r\n            <Storyboard x:Key=\"HoverOn\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.5\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"HoverOff\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"FocusedOn\">\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"FocusedOff\">\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n        </ControlTemplate.Resources>\r\n        <Grid>\r\n            <Border x:Name=\"Border\" Opacity=\"1\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\" Background=\"{TemplateBinding Background}\">\r\n                <Grid>\r\n                    <Border BorderThickness=\"1\">\r\n                        <ScrollViewer Margin=\"0\" x:Name=\"PART_ContentHost\" Style=\"{DynamicResource NuclearScrollViewer}\" />\r\n                    </Border>\r\n                </Grid>\r\n            </Border>\r\n            <Border x:Name=\"HoverBorder\" IsHitTestVisible=\"False\" Opacity=\"0\" BorderBrush=\"{StaticResource GlyphBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\" />\r\n            <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Opacity=\"0\" BorderBrush=\"{StaticResource HoverShineBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\" />\r\n\r\n\r\n        </Grid>\r\n        <ControlTemplate.Triggers>\r\n            <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                <Trigger.ExitActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\" />\r\n                </Trigger.ExitActions>\r\n                <Trigger.EnterActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\" />\r\n                </Trigger.EnterActions>\r\n\r\n            </Trigger>\r\n            <MultiTrigger>\r\n                <MultiTrigger.ExitActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\" />\r\n                </MultiTrigger.ExitActions>\r\n                <MultiTrigger.EnterActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                </MultiTrigger.EnterActions>\r\n                <MultiTrigger.Conditions>\r\n                    <Condition Property=\"IsMouseOver\" Value=\"True\" />\r\n                    <Condition Property=\"IsFocused\" Value=\"False\" />\r\n                </MultiTrigger.Conditions>\r\n\r\n            </MultiTrigger>\n            <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                <Setter Property=\"Background\" TargetName=\"Border\" Value=\"{DynamicResource DisabledBackgroundBrush}\" />\r\n                <Setter Property=\"BorderBrush\" TargetName=\"Border\" Value=\"{DynamicResource DisabledBorderBrush}\" />\r\n                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n            </Trigger>\r\n        </ControlTemplate.Triggers>\r\n    </ControlTemplate>\n\n    <Style TargetType=\"{x:Type PasswordBox}\">\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\" />\r\n        <Setter Property=\"AllowDrop\" Value=\"true\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type PasswordBox}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.5\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Border x:Name=\"Border\" Opacity=\"1\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\" Background=\"{TemplateBinding Background}\">\r\n                            <Grid>\r\n                                <Border BorderThickness=\"1\">\r\n                                    <ScrollViewer Margin=\"0\" x:Name=\"PART_ContentHost\" Style=\"{DynamicResource NuclearScrollViewer}\" />\r\n                                </Border>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Border x:Name=\"HoverBorder\" IsHitTestVisible=\"False\" Opacity=\"0\" BorderBrush=\"{StaticResource GlyphBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\" />\r\n                        <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Opacity=\"0\" BorderBrush=\"{StaticResource HoverShineBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\" />\r\n\r\n\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" />\r\n                                <Condition Property=\"IsFocused\" Value=\"False\" />\r\n                            </MultiTrigger.Conditions>\r\n\r\n                        </MultiTrigger>\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Background\" TargetName=\"Border\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                            <Setter Property=\"BorderBrush\" TargetName=\"Border\" Value=\"{DynamicResource DisabledBorderBrush}\"/>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource ControlBackgroundBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"#FF000000\"/>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type RichTextBox}\">\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\" />\r\n        <Setter Property=\"AllowDrop\" Value=\"true\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type RichTextBox}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.5\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Border x:Name=\"Border\" Opacity=\"1\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\" Background=\"{TemplateBinding Background}\">\r\n                            <Grid>\r\n                                <Border BorderThickness=\"1\">\r\n                                    <ScrollViewer Margin=\"0\" x:Name=\"PART_ContentHost\" Style=\"{DynamicResource NuclearScrollViewer}\" />\r\n                                </Border>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Border x:Name=\"HoverBorder\" IsHitTestVisible=\"False\" Opacity=\"0\" BorderBrush=\"{StaticResource GlyphBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\" />\r\n                        <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Opacity=\"0\" BorderBrush=\"{StaticResource HoverShineBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\" />\r\n\r\n\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" />\r\n                                <Condition Property=\"IsFocused\" Value=\"False\" />\r\n                            </MultiTrigger.Conditions>\r\n\r\n                        </MultiTrigger>\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Background\" TargetName=\"Border\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                            <Setter Property=\"BorderBrush\" TargetName=\"Border\" Value=\"{DynamicResource DisabledBorderBrush}\"/>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource ControlBackgroundBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"#FF000000\"/>\r\n    </Style>\r\n    <Style TargetType=\"{x:Type Label}\">\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Label}\">\r\n                    <Grid>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" RecognizesAccessKey=\"True\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\" />\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n    </Style>\n\n    <Style TargetType=\"{x:Type Menu}\">\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource ControlBackgroundBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\" />\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"True\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Menu}\">\r\n                    <Grid>\r\n                        <Border Margin=\"1\" x:Name=\"Border\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" />\r\n                        <StackPanel Background=\"{TemplateBinding Background}\" IsItemsHost=\"True\" ClipToBounds=\"True\" Orientation=\"Horizontal\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\" />\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DisabledBorderBrush}\" TargetName=\"Border\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\n    <DropShadowBitmapEffect x:Key=\"PopupDropShadow\" ShadowDepth=\"1.5\" Softness=\"0.15\" />\n    <Style TargetType=\"{x:Type MenuItem}\">\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\" />\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type MenuItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HighlightedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HightlightedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Border x:Name=\"Border\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"0,0,0,0\" Margin=\"3,2,3,2\">\r\n                        <Grid Margin=\"0,0,0,0\">\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition MinWidth=\"17\" Width=\"Auto\" SharedSizeGroup=\"MenuItemIconColumnGroup\" />\r\n                                <ColumnDefinition Width=\"*\" />\r\n                                <ColumnDefinition Width=\"Auto\" SharedSizeGroup=\"MenuItemIGTColumnGroup\" />\r\n                                <ColumnDefinition Width=\"14\" />\r\n                            </Grid.ColumnDefinitions>\n                            <Border Grid.Column=\"0\" Grid.ColumnSpan=\"4\" Background=\"{DynamicResource HoverBrush}\" Opacity=\"0\" x:Name=\"HoverBorder\" CornerRadius=\"1,1,1,1\"/>\r\n                            <Border Grid.ColumnSpan=\"4\" Background=\"{DynamicResource HoverShineBrush}\" Opacity=\"0\" x:Name=\"HoverShineBorder\" CornerRadius=\"1,1,1,1\"/>\n                            <ContentPresenter Margin=\"4,0,6,0\" x:Name=\"Icon\" VerticalAlignment=\"Center\" ContentSource=\"Icon\" />\n                            <Grid Visibility=\"Hidden\" Margin=\"4,0,6,0\" x:Name=\"GlyphPanel\" VerticalAlignment=\"Center\">\r\n                                <Path x:Name=\"GlyphPanelpath\" VerticalAlignment=\"Center\" Fill=\"{TemplateBinding Foreground}\" Data=\"M0,2 L0,4.8 L2.5,7.4 L7.1,2.8 L7.1,0 L2.5,4.6 z\" FlowDirection=\"LeftToRight\" />\r\n                            </Grid>\n                            <ContentPresenter Grid.Column=\"1\" x:Name=\"HeaderHost\" RecognizesAccessKey=\"True\" ContentSource=\"Header\" Margin=\"2,1,2,1\" />\n                            <Grid Grid.Column=\"3\" Margin=\"4,0,6,0\" x:Name=\"ArrowPanel\" VerticalAlignment=\"Center\">\r\n                                <Path x:Name=\"ArrowPanelPath\" VerticalAlignment=\"Center\" Fill=\"{TemplateBinding Foreground}\" Data=\"M0,0 L0,8 L4,4 z\" />\r\n                            </Grid>\n                            <Popup IsOpen=\"{Binding Path=IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Right\" x:Name=\"SubMenuPopup\" Focusable=\"false\" AllowsTransparency=\"true\" PopupAnimation=\"{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}\">\r\n                                <Grid x:Name=\"SubMenu\">\r\n                                    <Border x:Name=\"SubMenuBorder\" Background=\"{DynamicResource LightBrush}\" BorderThickness=\"1\" Opacity=\"0.8\">\r\n                                        <Border.BorderBrush>\r\n                                            <SolidColorBrush Color=\"{DynamicResource WhiteColor}\" />\r\n                                        </Border.BorderBrush>\r\n                                    </Border>\n                                    <StackPanel IsItemsHost=\"True\" KeyboardNavigation.DirectionalNavigation=\"Cycle\" />\r\n                                </Grid>\r\n                            </Popup>\n                        </Grid>\r\n                    </Border>\n                    <ControlTemplate.Triggers>\n                        <Trigger Property=\"Role\" Value=\"TopLevelHeader\">\r\n                            <Setter Property=\"Margin\" Value=\"0,1,0,1\" />\r\n                            <Setter Property=\"Padding\" Value=\"6,3,6,3\" />\r\n                            <Setter Property=\"Grid.IsSharedSizeScope\" Value=\"true\" />\r\n                            <Setter Property=\"Placement\" Value=\"Bottom\" TargetName=\"SubMenuPopup\" />\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ArrowPanel\" />\r\n                        </Trigger>\n                        <Trigger Property=\"Role\" Value=\"TopLevelItem\">\r\n                            <Setter Property=\"Margin\" Value=\"0,1,0,1\" />\r\n                            <Setter Property=\"Padding\" Value=\"6,3,6,3\" />\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ArrowPanel\" />\r\n                        </Trigger>\n                        <Trigger Property=\"Role\" Value=\"SubmenuHeader\">\r\n                            <Setter Property=\"DockPanel.Dock\" Value=\"Top\" />\r\n                            <Setter Property=\"Padding\" Value=\"0,2,0,2\" />\r\n                            <Setter Property=\"Grid.IsSharedSizeScope\" Value=\"true\" />\r\n                        </Trigger>\n                        <Trigger Property=\"Role\" Value=\"SubmenuItem\">\r\n                            <Setter Property=\"DockPanel.Dock\" Value=\"Top\" />\r\n                            <Setter Property=\"Padding\" Value=\"0,2,0,2\" />\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ArrowPanel\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsSuspendingPopupAnimation\" Value=\"true\">\r\n                            <Setter Property=\"PopupAnimation\" Value=\"None\" TargetName=\"SubMenuPopup\" />\r\n                        </Trigger>\n                        <Trigger Property=\"Icon\" Value=\"{x:Null}\">\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"Icon\" />\r\n                        </Trigger>\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"GlyphPanel\" />\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"Icon\" />\r\n                        </Trigger>\n                        <Trigger Property=\"AllowsTransparency\" SourceName=\"SubMenuPopup\" Value=\"true\">\r\n                            <Setter Property=\"Margin\" Value=\"0,0,3,3\" TargetName=\"SubMenu\" />\r\n                            <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" TargetName=\"SubMenu\" />\r\n                            <Setter Property=\"BitmapEffect\" Value=\"{DynamicResource PopupDropShadow}\" TargetName=\"SubMenuBorder\" />\r\n                        </Trigger>\n                        <Trigger Property=\"IsHighlighted\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HightlightedOff}\" x:Name=\"HightlightedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HighlightedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\n    <Style TargetType=\"{x:Type Separator}\">\r\n        <Setter Property=\"Height\" Value=\"1\" />\r\n        <Setter Property=\"Margin\" Value=\"0,2,0,2\" />\r\n        <Setter Property=\"Focusable\" Value=\"false\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Separator}\">\r\n                    <Border BorderBrush=\"{DynamicResource SolidBorderBrush}\" BorderThickness=\"1\" />\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\n    <Style TargetType=\"{x:Type TabControl}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TabControl}\">\r\n                    <Grid ClipToBounds=\"true\" SnapsToDevicePixels=\"true\" KeyboardNavigation.TabNavigation=\"Local\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition x:Name=\"ColumnDefinition0\" />\r\n                            <ColumnDefinition x:Name=\"ColumnDefinition1\" Width=\"0\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\" x:Name=\"RowDefinition0\" />\r\n                            <RowDefinition Height=\"*\" x:Name=\"RowDefinition1\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Border CornerRadius=\"2,2,0,0\" Background=\"{DynamicResource LightBrush}\" x:Name=\"border\">\r\n                            <TabPanel x:Name=\"HeaderPanel\" IsItemsHost=\"true\" Panel.ZIndex=\"1\" KeyboardNavigation.TabIndex=\"1\" RenderTransformOrigin=\"0.5,0.5\" Width=\"Auto\" Height=\"Auto\">\r\n                                <TabPanel.LayoutTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform Angle=\"0\" />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </TabPanel.LayoutTransform>\r\n                                <TabPanel.RenderTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </TabPanel.RenderTransform>\r\n\r\n                            </TabPanel>\r\n                        </Border>\r\n                        <Border x:Name=\"ContentPanel\" Grid.Column=\"0\" Grid.Row=\"1\" KeyboardNavigation.DirectionalNavigation=\"Contained\" KeyboardNavigation.TabIndex=\"2\" KeyboardNavigation.TabNavigation=\"Local\" Background=\"{DynamicResource ShadeBrush}\" CornerRadius=\"0,0,2,2\">\r\n                            <ContentPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" x:Name=\"PART_SelectedContentHost\" ContentSource=\"SelectedContent\" />\r\n                        </Border>\r\n                        <Border HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" BorderThickness=\"0,0,0,1\" CornerRadius=\"10,0,0,0\" Opacity=\"0.5\" Margin=\"2,0,2,0\" x:Name=\"border1\">\r\n                            <Border.LayoutTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform ScaleX=\"1\" ScaleY=\"1\"/>\r\n                                    <SkewTransform AngleX=\"0\" AngleY=\"0\"/>\r\n                                    <RotateTransform Angle=\"0\"/>\r\n                                    <TranslateTransform X=\"0\" Y=\"0\"/>\r\n                                </TransformGroup>\r\n                            </Border.LayoutTransform>\r\n                            <Border.BorderBrush>\r\n                                <SolidColorBrush Color=\"{DynamicResource BlackColor}\"/>\r\n                            </Border.BorderBrush>\r\n                        </Border>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Bottom\">\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition1\" Value=\"Auto\" />\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"border\" Value=\"1\"/>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"ContentPanel\" Value=\"2,2,0,0\"/>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"border\" Value=\"0,0,2,2\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Left\">\r\n\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"HeaderPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"ContentPanel\" Value=\"1\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition0\" Value=\"Auto\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition1\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition1\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"border\" Value=\"0\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"border\" Value=\"0,0,0,0\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"ContentPanel\" Value=\"0,0,0,0\"/>\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"border1\">\r\n                                <Setter.Value>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\"/>\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\"/>\r\n                                        <RotateTransform Angle=\"-90\"/>\r\n                                        <TranslateTransform X=\"0\" Y=\"0\"/>\r\n                                    </TransformGroup>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                            <Setter Property=\"Margin\" TargetName=\"border1\" Value=\"0,0,0,0\"/>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"border\" Value=\"0,2,2,0\"/>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"ContentPanel\" Value=\"0,2,2,0\"/>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Right\">\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"HeaderPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition1\" Value=\"Auto\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition1\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"border\" Value=\"1\"/>\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"border1\">\r\n                                <Setter.Value>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\"/>\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\"/>\r\n                                        <RotateTransform Angle=\"90\"/>\r\n                                        <TranslateTransform X=\"0\" Y=\"0\"/>\r\n                                    </TransformGroup>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"border1\" Value=\"1\"/>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"ContentPanel\" Value=\"2,0,0,2\"/>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"border\" Value=\"0,2,2,0\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style d:IsControlPart=\"True\" TargetType=\"{x:Type TabItem}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TabItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid x:Name=\"grid\" Margin=\"2,1,2,3\">\r\n                        <Grid.LayoutTransform>\r\n                            <TransformGroup>\r\n                                <ScaleTransform ScaleX=\"1\" ScaleY=\"1\"/>\r\n                                <SkewTransform AngleX=\"0\" AngleY=\"0\"/>\r\n                                <RotateTransform Angle=\"0\"/>\r\n                                <TranslateTransform X=\"0\" Y=\"0\"/>\r\n                            </TransformGroup>\r\n                        </Grid.LayoutTransform>\r\n                        <Border x:Name=\"border\" BorderBrush=\"{x:Null}\" CornerRadius=\"2,2,2,2\" Opacity=\"0.5\">\r\n                            <Border.Background>\r\n                                <LinearGradientBrush EndPoint=\"0.5,0.976\" StartPoint=\"0.5,0.039\">\r\n                                    <GradientStop Color=\"#7F595959\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#19FFFFFF\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <Border x:Name=\"SelectedBorder\" BorderBrush=\"{x:Null}\" CornerRadius=\"2,2,2,2\" Opacity=\"0\" Background=\"{DynamicResource SelectedBackgroundBrush}\"/>\r\n                        <Border x:Name=\"HoverBorder\" BorderBrush=\"{x:Null}\" CornerRadius=\"2,2,2,2\" Opacity=\"0\">\r\n                            <Border.Background>\r\n                                <LinearGradientBrush EndPoint=\"0.5,0.976\" StartPoint=\"0.5,0.039\">\r\n                                    <GradientStop Color=\"#7F595959\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#19FFFFFF\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <Grid>\r\n                            <ContentPresenter x:Name=\"ContentSite\" RecognizesAccessKey=\"True\" ContentSource=\"Header\" d:LayoutOverrides=\"Width, Height\" HorizontalAlignment=\"Center\" Margin=\"6,1,6,1\" VerticalAlignment=\"Center\" />\r\n                        </Grid>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Left\">\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"grid\">\r\n                                <Setter.Value>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform Angle=\"-90\" />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Right\">\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"grid\">\r\n                                <Setter.Value>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform Angle=\"90\" />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Bottom\">\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"ContentSite\">\r\n                                <Setter.Value>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform Angle=\"180\" />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"grid\">\r\n                                <Setter.Value>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\"/>\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\"/>\r\n                                        <RotateTransform Angle=\"180\"/>\r\n                                        <TranslateTransform X=\"0\" Y=\"0\"/>\r\n                                    </TransformGroup>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" />\r\n                                <Condition Property=\"Selector.IsSelected\" Value=\"False\" />\r\n                            </MultiTrigger.Conditions>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsSelected\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOff}\" x:Name=\"SelectedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\" x:Name=\"SelectedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Setter Property=\"Panel.ZIndex\" Value=\"100\" />\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" SourceName=\"grid\" />\r\n                                <Condition Property=\"Selector.IsSelected\" Value=\"True\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <Setter Property=\"Background\" TargetName=\"border\" Value=\"{DynamicResource SelectedBackgroundBrush}\" />\r\n                            <Setter Property=\"Opacity\" TargetName=\"border\" Value=\"0.9\" />\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                            <Setter Property=\"Background\" TargetName=\"border\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                            <Setter Property=\"Opacity\" TargetName=\"grid\" Value=\"0.3\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Style.Triggers>\r\n            <Trigger Property=\"Selector.IsSelected\" Value=\"True\">\r\n                <Setter Property=\"Foreground\" >\r\n                    <Setter.Value>\r\n                        <SolidColorBrush Color=\"{DynamicResource BlackColor}\"/>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Trigger>\r\n        </Style.Triggers>\r\n    </Style>\n    <Style x:Key=\"NuclearSliderThumb\" d:IsControlPart=\"True\" TargetType=\"{x:Type Thumb}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"Height\" Value=\"14\" />\r\n        <Setter Property=\"Width\" Value=\"14\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Border x:Name=\"Background\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" />\r\n                        <Border x:Name=\"HoverBorder\" Opacity=\"0\" Background=\"{StaticResource HoverBrush}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" />\r\n                        <Border x:Name=\"HoverShineBorder\" Opacity=\"0\" Background=\"{StaticResource HoverShineBrush}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" />\r\n                        <Border x:Name=\"PressedBorder\" Opacity=\"0\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" Background=\"{StaticResource PressedBrush}\" />\r\n                        <Border x:Name=\"ShineBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" Background=\"{StaticResource ShineBrush}\" Opacity=\"1\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsDragging\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Background\" TargetName=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1,1,1,1\"/>\r\n    </Style>\n    <Style TargetType=\"{x:Type Slider}\">\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Slider}\">\r\n                    <Grid x:Name=\"GridRoot\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\" />\r\n                            <RowDefinition Height=\"Auto\" MinHeight=\"{TemplateBinding MinHeight}\" />\r\n                            <RowDefinition Height=\"Auto\" />\r\n                        </Grid.RowDefinitions>\n                        <TickBar Visibility=\"Collapsed\" x:Name=\"TopTick\" Height=\"4\" SnapsToDevicePixels=\"True\" Placement=\"Top\" Fill=\"{DynamicResource GlyphBrush}\" />\r\n                        <Border Grid.Row=\"1\" Margin=\"0\" x:Name=\"Border\" Height=\"4\" CornerRadius=\"2\" Background=\"{DynamicResource LightBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"1,1,1,1\" />\n                        <Track Grid.Row=\"1\" x:Name=\"PART_Track\">\r\n                            <Track.Thumb>\r\n                                <Thumb Style=\"{DynamicResource NuclearSliderThumb}\" Background=\"{DynamicResource NormalBrush}\" Foreground=\"{x:Null}\" Width=\"20\" />\r\n                            </Track.Thumb>\r\n                            <Track.IncreaseRepeatButton>\r\n                                <RepeatButton Style=\"{DynamicResource NuclearScrollRepeatButtonStyle}\" Command=\"Slider.IncreaseLarge\" />\r\n                            </Track.IncreaseRepeatButton>\r\n                            <Track.DecreaseRepeatButton>\r\n                                <RepeatButton Style=\"{DynamicResource NuclearScrollRepeatButtonStyle}\" Command=\"Slider.DecreaseLarge\" />\r\n                            </Track.DecreaseRepeatButton>\r\n                        </Track>\n                        <TickBar Visibility=\"Collapsed\" Grid.Row=\"2\" x:Name=\"BottomTick\" Height=\"4\" SnapsToDevicePixels=\"True\" Placement=\"Bottom\" Fill=\"{TemplateBinding Foreground}\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"TickPlacement\" Value=\"TopLeft\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"TopTick\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"TickPlacement\" Value=\"BottomRight\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"BottomTick\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"TickPlacement\" Value=\"Both\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"TopTick\" />\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"BottomTick\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\" />\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DisabledBorderBrush}\" TargetName=\"Border\" />\r\n                        </Trigger>\n                        <Trigger Property=\"Orientation\" Value=\"Vertical\">\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"GridRoot\">\r\n                                <Setter.Value>\r\n                                    <RotateTransform Angle=\"-90\" />\r\n                                </Setter.Value>\r\n                            </Setter>\n                            <Setter TargetName=\"PART_Track\" Property=\"Orientation\" Value=\"Horizontal\" />\r\n                        </Trigger>\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\n    <Style TargetType=\"{x:Type TreeView}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TreeView}\">\r\n                    <Grid>\r\n                        <Border x:Name=\"Border\" Background=\"{DynamicResource ControlBackgroundBrush}\" BorderBrush=\"{x:Null}\" BorderThickness=\"1\" CornerRadius=\"3,3,3,3\">\r\n                            <ScrollViewer Style=\"{DynamicResource NuclearScrollViewer}\" Focusable=\"False\" Padding=\"4\" HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Auto\" CanContentScroll=\"False\" Foreground=\"{DynamicResource {x:Static SystemColors.ActiveCaptionTextBrushKey}}\">\r\n                                <ItemsPresenter />\r\n                            </ScrollViewer>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\n    <Style x:Key=\"NuclearTreeViewItemToggleButton\" d:IsControlPart=\"True\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Focusable\" Value=\"False\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <Grid Width=\"15\" Height=\"13\">\r\n                        <Path Visibility=\"Collapsed\" HorizontalAlignment=\"Left\" Margin=\"1,1,1,1\" x:Name=\"IsExpandedPath\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 4 L 8 4 L 4 8 Z\" />\r\n                        <Path HorizontalAlignment=\"Left\" Margin=\"1,1,1,1\" x:Name=\"ExpandPath\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 4 0 L 8 4 L 4 8 Z\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsChecked\" Value=\"True\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"IsExpandedPath\" />\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ExpandPath\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\n    <Style d:IsControlPart=\"True\" TargetType=\"{x:Type TreeViewItem}\">\r\n        <Style.Triggers>\r\n            <Trigger Property=\"IsSelected\" Value=\"True\">\r\n                <Setter Property=\"Foreground\">\r\n                    <Setter.Value>\r\n                        <SolidColorBrush Color=\"{DynamicResource BlackColor}\"/>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Trigger>\r\n        </Style.Triggers>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\" />\r\n        <Setter Property=\"Padding\" Value=\"1,0,0,0\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TreeViewItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectionBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectionBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition MinWidth=\"19\" Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"*\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\" />\r\n                            <RowDefinition />\r\n                        </Grid.RowDefinitions>\r\n                        <ToggleButton x:Name=\"Expander\" Style=\"{DynamicResource NuclearTreeViewItemToggleButton}\" IsChecked=\"{Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}\" ClickMode=\"Press\" Background=\"{x:Null}\" BorderBrush=\"{x:Null}\" Foreground=\"{x:Null}\" />\r\n                        <Border Grid.Column=\"1\" x:Name=\"Selection_Border\" BorderThickness=\"1,1,1,1\" CornerRadius=\"3,3,3,3\">\r\n                            <Grid Width=\"Auto\" Height=\"Auto\">\r\n                                <Border x:Name=\"MainBorder\" Opacity=\"0.25\" Background=\"{DynamicResource ControlBackgroundBrush}\" CornerRadius=\"2,2,2,2\"/>\r\n                                <Border x:Name=\"SelectionBorder\" Opacity=\"0\" Background=\"{DynamicResource SelectedBackgroundBrush}\" CornerRadius=\"2,2,2,2\"/>\r\n                                <Border x:Name=\"HoverBorder\" Opacity=\"0\" Background=\"{DynamicResource NormalBrush}\" CornerRadius=\"2,2,2,2\"/>\r\n                                <ContentPresenter x:Name=\"PART_Header\" ContentSource=\"Header\" d:LayoutOverrides=\"Width\" Height=\"Auto\" Margin=\"2,0,2,0\" />\r\n                            </Grid>\r\n                        </Border>\r\n                        <ItemsPresenter Grid.Column=\"1\" Grid.ColumnSpan=\"2\" Grid.Row=\"1\" x:Name=\"ItemsHost\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsExpanded\" Value=\"false\">\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ItemsHost\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"HasItems\" Value=\"false\">\r\n                            <Setter Property=\"Visibility\" Value=\"Hidden\" TargetName=\"Expander\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsSelected\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOff}\" x:Name=\"SelectedOn_BeginStoryboard1\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\" x:Name=\"SelectedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsSelected\" Value=\"true\" />\r\n                                <Condition Property=\"IsSelectionActive\" Value=\"false\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}\" />\r\n                            <Setter Property=\"Background\" TargetName=\"Selection_Border\" Value=\"{DynamicResource SelectedBackgroundBrush}\" />\r\n                            <Setter Property=\"Opacity\" TargetName=\"Selection_Border\" Value=\"0.5\" />\r\n                            <Setter Property=\"BorderBrush\" TargetName=\"Selection_Border\" Value=\"{DynamicResource NormalBorderBrush}\" />\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                        </Trigger>\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" SourceName=\"Selection_Border\" Value=\"True\" />\r\n                                <Condition Property=\"IsSelected\" Value=\"False\" />\r\n                            </MultiTrigger.Conditions>\r\n                        </MultiTrigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsSelected\" Value=\"true\" />\r\n                                <Condition Property=\"IsMouseOver\" Value=\"true\" SourceName=\"Selection_Border\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <Setter Property=\"Background\" TargetName=\"Selection_Border\" Value=\"{DynamicResource SelectedBackgroundBrush}\" />\r\n                            <Setter Property=\"Opacity\" TargetName=\"Selection_Border\" Value=\"0.8\" />\r\n                            <Setter Property=\"BorderBrush\" TargetName=\"Selection_Border\" Value=\"{DynamicResource NormalBorderBrush}\" />\r\n                        </MultiTrigger>\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"ButtonFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Rectangle SnapsToDevicePixels=\"true\" Margin=\"2\" Stroke=\"Black\" StrokeDashArray=\"1 2\" StrokeThickness=\"1\" />\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <LinearGradientBrush x:Key=\"ButtonNormalBackground\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#F3F3F3\" Offset=\"0\" />\r\n        <GradientStop Color=\"#EBEBEB\" Offset=\"0.5\" />\r\n        <GradientStop Color=\"#DDDDDD\" Offset=\"0.5\" />\r\n        <GradientStop Color=\"#CDCDCD\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"ButtonNormalBorder\" Color=\"#FF707070\" />\r\n\r\n    <Style TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{StaticResource ButtonFocusVisual}\" />\r\n        <Setter Property=\"Background\" Value=\"{StaticResource ButtonNormalBackground}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource ButtonNormalBorder}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"Padding\" Value=\"1\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.5\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.5\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Pressed\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Pressed\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid x:Name=\"grid\">\r\n\r\n                        <Border x:Name=\"Border\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" CornerRadius=\"3,3,3,3\" />\r\n                        <Border x:Name=\"CheckedBorder\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\" Background=\"{DynamicResource SelectedBackgroundBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" CornerRadius=\"3,3,3,3\" Opacity=\"0\" />\n                        <Border x:Name=\"HoverBorder\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" CornerRadius=\"3,3,3,3\" Opacity=\"0\" Background=\"{DynamicResource HoverBrush}\" />\r\n                        <Border x:Name=\"HoverShineBorder\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" CornerRadius=\"3,3,3,3\" Opacity=\"0\" Background=\"{DynamicResource HoverShineBrush}\" />\r\n                        <Border x:Name=\"Pressed\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\" BorderBrush=\"{DynamicResource PressedBorderBrush}\" CornerRadius=\"3,3,3,3\" Opacity=\"0\" Background=\"{DynamicResource PressedBrush}\" />\r\n                        <Rectangle Opacity=\"1\" Stroke=\"{x:Null}\" RadiusX=\"3\" RadiusY=\"3\" Margin=\"2,2,2,2\" VerticalAlignment=\"Stretch\" Height=\"Auto\" x:Name=\"Shine\">\r\n                            <Rectangle.Fill>\r\n                                <LinearGradientBrush EndPoint=\"0.5,0.971\" StartPoint=\"0.5,0.042\">\r\n                                    <GradientStop Color=\"#26FFFFFF\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"1\" />\r\n                                    <GradientStop Color=\"#26FFFFFF\" Offset=\"0.467\" />\r\n                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"0.475\" />\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n\r\n                        <ContentPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" RecognizesAccessKey=\"True\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Margin=\"4,4,4,4\" />\r\n                    </Grid>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\"/>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOff}\" x:Name=\"CheckedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOn}\" x:Name=\"CheckedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"#ADADAD\" />\r\n                            <Setter Property=\"Background\" TargetName=\"Border\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                            <Setter Property=\"BorderBrush\" TargetName=\"Border\" Value=\"{DynamicResource DisabledBorderBrush}\"/>\r\n                            <Setter Property=\"Opacity\" TargetName=\"grid\" Value=\"0.5\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Style.Triggers>\r\n            <Trigger Property=\"IsChecked\" Value=\"True\">\r\n                <Setter Property=\"Foreground\">\r\n                    <Setter.Value>\r\n                        <SolidColorBrush Color=\"{DynamicResource BlackColor}\" />\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Trigger>\r\n        </Style.Triggers>\r\n    </Style>\r\n\r\n    <BorderGapMaskConverter x:Key=\"BorderGapMaskConverter\" />\r\n    <Style TargetType=\"{x:Type GroupBox}\">\r\n        <Setter Property=\"BorderBrush\" Value=\"#D5DFE5\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type GroupBox}\">\r\n                    <Grid SnapsToDevicePixels=\"true\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"6\" />\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"*\" />\r\n                            <ColumnDefinition Width=\"6\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\" />\r\n                            <RowDefinition Height=\"Auto\" />\r\n                            <RowDefinition Height=\"*\" />\r\n                            <RowDefinition Height=\"6\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Border Grid.ColumnSpan=\"4\" Grid.RowSpan=\"4\" Background=\"{DynamicResource LightBrush}\" CornerRadius=\"4,4,4,4\" BorderThickness=\"1,1,1,1\" />\r\n                        <Border Grid.ColumnSpan=\"4\" Grid.Row=\"1\" Grid.RowSpan=\"3\" BorderThickness=\"1,1,1,1\" CornerRadius=\"4\" BorderBrush=\"{DynamicResource NormalBorderBrush}\">\r\n                            <Border.OpacityMask>\r\n                                <MultiBinding Converter=\"{StaticResource BorderGapMaskConverter}\" ConverterParameter=\"7\">\r\n                                    <Binding Path=\"ActualWidth\" ElementName=\"Header\" />\r\n                                    <Binding Path=\"ActualWidth\" RelativeSource=\"{RelativeSource Self}\" />\r\n                                    <Binding Path=\"ActualHeight\" RelativeSource=\"{RelativeSource Self}\" />\r\n                                </MultiBinding>\r\n                            </Border.OpacityMask>\r\n                            <Border BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\">\r\n                                <Border.BorderBrush>\r\n                                    <SolidColorBrush Color=\"{DynamicResource MainColor}\" />\r\n                                </Border.BorderBrush>\r\n                                <Border BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\">\r\n                                    <Border.BorderBrush>\r\n                                        <SolidColorBrush Color=\"{DynamicResource MainColor}\" />\r\n                                    </Border.BorderBrush>\r\n                                </Border>\r\n                            </Border>\r\n                        </Border>\r\n                        <Border Grid.Column=\"0\" Grid.ColumnSpan=\"4\" Grid.Row=\"1\" Grid.RowSpan=\"3\" Background=\"{TemplateBinding Background}\" BorderBrush=\"Transparent\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"4\" />\r\n                        <Border Grid.ColumnSpan=\"4\" Grid.RowSpan=\"2\" Background=\"{DynamicResource NormalBrush}\" BorderThickness=\"1,1,1,0\" CornerRadius=\"2,2,0,0\" x:Name=\"Main\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" />\r\n                        <Rectangle Opacity=\"1\" Stroke=\"{x:Null}\" RadiusX=\"3\" RadiusY=\"3\" VerticalAlignment=\"Stretch\" Height=\"Auto\" x:Name=\"Shine\" Grid.ColumnSpan=\"4\" Grid.RowSpan=\"2\" Margin=\"1,1,1,1\">\r\n                            <Rectangle.Fill>\r\n                                <LinearGradientBrush EndPoint=\"0.5,0.971\" StartPoint=\"0.5,0.042\">\r\n                                    <GradientStop Color=\"#26FFFFFF\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"1\" />\r\n                                    <GradientStop Color=\"#26FFFFFF\" Offset=\"0.467\" />\r\n                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"0.475\" />\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n\r\n                        <Border x:Name=\"Header\" Grid.Column=\"1\" Grid.Row=\"0\" Grid.RowSpan=\"2\" Padding=\"3,1,3,0\">\r\n                            <ContentPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" ContentSource=\"Header\" RecognizesAccessKey=\"True\" Margin=\"0,4,0,4\" />\r\n                        </Border>\r\n\r\n                        <ContentPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Margin=\"{TemplateBinding Padding}\" Grid.Column=\"1\" Grid.ColumnSpan=\"2\" Grid.Row=\"2\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\">\r\n            <Setter.Value>\r\n                <SolidColorBrush Color=\"{DynamicResource WhiteColor}\" />\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <SolidColorBrush x:Key=\"ListBorder\" Color=\"#828790\" />\r\n    <Style x:Key=\"{x:Static GridView.GridViewScrollViewerStyleKey}\" TargetType=\"{x:Type ScrollViewer}\">\r\n        <Setter Property=\"Focusable\" Value=\"false\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ScrollViewer}\">\r\n                    <Grid SnapsToDevicePixels=\"true\" Background=\"{TemplateBinding Background}\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\" />\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"*\" />\r\n                            <RowDefinition Height=\"Auto\" />\r\n                        </Grid.RowDefinitions>\r\n                        <DockPanel Margin=\"{TemplateBinding Padding}\">\r\n                            <ScrollViewer Focusable=\"false\" DockPanel.Dock=\"Top\" HorizontalScrollBarVisibility=\"Hidden\" VerticalScrollBarVisibility=\"Hidden\">\r\n                                <GridViewHeaderRowPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Margin=\"2,0,2,0\" AllowsColumnReorder=\"{Binding Path=TemplatedParent.View.AllowsColumnReorder, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderContainerStyle=\"{Binding Path=TemplatedParent.View.ColumnHeaderContainerStyle, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderContextMenu=\"{Binding Path=TemplatedParent.View.ColumnHeaderContextMenu, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderTemplate=\"{Binding Path=TemplatedParent.View.ColumnHeaderTemplate, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderTemplateSelector=\"{Binding Path=TemplatedParent.View.ColumnHeaderTemplateSelector, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderToolTip=\"{Binding Path=TemplatedParent.View.ColumnHeaderToolTip, RelativeSource={RelativeSource TemplatedParent}}\" Columns=\"{Binding Path=TemplatedParent.View.Columns, RelativeSource={RelativeSource TemplatedParent}}\" />\r\n\r\n                            </ScrollViewer>\r\n                            <ScrollContentPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" x:Name=\"PART_ScrollContentPresenter\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" CanContentScroll=\"{TemplateBinding CanContentScroll}\" KeyboardNavigation.DirectionalNavigation=\"Local\" />\r\n                        </DockPanel>\r\n                        <ScrollBar Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Cursor=\"Arrow\" x:Name=\"PART_HorizontalScrollBar\" Grid.Row=\"1\" Orientation=\"Horizontal\" ViewportSize=\"{TemplateBinding ViewportWidth}\" Maximum=\"{TemplateBinding ScrollableWidth}\" Minimum=\"0.0\" Value=\"{Binding Path=HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" />\r\n                        <ScrollBar Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Cursor=\"Arrow\" x:Name=\"PART_VerticalScrollBar\" Grid.Column=\"1\" Orientation=\"Vertical\" ViewportSize=\"{TemplateBinding ViewportHeight}\" Maximum=\"{TemplateBinding ScrollableHeight}\" Minimum=\"0.0\" Value=\"{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" />\r\n                        <DockPanel Grid.Column=\"1\" Grid.Row=\"1\" Background=\"{Binding Path=Background, ElementName=PART_VerticalScrollBar}\" LastChildFill=\"false\">\r\n                            <Rectangle Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Width=\"1\" Fill=\"White\" DockPanel.Dock=\"Left\" />\r\n                            <Rectangle Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Height=\"1\" Fill=\"White\" DockPanel.Dock=\"Top\" />\r\n                        </DockPanel>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style TargetType=\"{x:Type ListView}\">\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource {x:Static SystemColors.WindowBrushKey}}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource ListBorder}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Foreground\" Value=\"#FF042271\" />\r\n        <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\" />\r\n        <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\" />\r\n        <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"true\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListView}\">\r\n                    <Border x:Name=\"Bd\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"0,0,0,0\" BorderBrush=\"{DynamicResource DefaultedBorderBrush}\" Background=\"{DynamicResource ControlBackgroundBrush}\">\r\n\r\n                        <ScrollViewer Padding=\"{TemplateBinding Padding}\" Style=\"{DynamicResource {x:Static GridView.GridViewScrollViewerStyleKey}}\">\r\n                            <ItemsPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" />\r\n                        </ScrollViewer>\r\n                    </Border>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                            <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Background\" TargetName=\"Bd\" Value=\"{DynamicResource {x:Static SystemColors.ControlBrushKey}}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"ListViewItemFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Rectangle Stroke=\"#8E6EA6F5\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" />\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type ListViewItem}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{StaticResource ListViewItemFocusVisual}\" />\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Margin\" Value=\"0,0,0,1\" />\r\n        <Setter Property=\"Padding\" Value=\"5,2,5,2\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListViewItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOn\">\r\n\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOff\">\r\n\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocussedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocussedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Border SnapsToDevicePixels=\"true\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\" x:Name=\"border\">\r\n\r\n                        <Grid Margin=\"2,0,2,0\">\r\n                            <Rectangle x:Name=\"Background\" IsHitTestVisible=\"False\" Opacity=\"0.25\" Fill=\"{StaticResource NormalBrush}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                            <Rectangle x:Name=\"HoverRectangle\" IsHitTestVisible=\"False\" Opacity=\"0\" Fill=\"{StaticResource NormalBrush}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                            <Rectangle x:Name=\"SelectedRectangle\" IsHitTestVisible=\"False\" Opacity=\"0\" Fill=\"{StaticResource SelectedBackgroundBrush}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                            <GridViewRowPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Margin=\"0,2,0,2\" VerticalAlignment=\"Stretch\" />\r\n                        </Grid>\r\n\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsSelected\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOff}\" x:Name=\"SelectedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\" x:Name=\"SelectedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" />\r\n                                <Condition Property=\"Selector.IsSelected\" Value=\"False\" />\r\n                            </MultiTrigger.Conditions>\r\n\r\n                        </MultiTrigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"Selector.IsSelected\" Value=\"True\" />\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" />\r\n                            </MultiTrigger.Conditions>\r\n\r\n                        </MultiTrigger>\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                            <Setter Property=\"Fill\" TargetName=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsSelected\" Value=\"true\" />\r\n                                <Condition Property=\"Selector.IsSelectionActive\" Value=\"false\" />\r\n                            </MultiTrigger.Conditions>\r\n\r\n\r\n                        </MultiTrigger>\r\n\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Style.Triggers>\r\n            <Trigger Property=\"Selector.IsSelected\" Value=\"True\">\r\n                <Setter Property=\"Foreground\">\r\n                    <Setter.Value>\r\n                        <SolidColorBrush Color=\"{DynamicResource BlackColor}\" />\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Trigger>\r\n        </Style.Triggers>\r\n    </Style>\r\n\r\n\r\n    <Style x:Key=\"GridViewColumnHeaderGripper\" TargetType=\"{x:Type Thumb}\">\r\n        <Setter Property=\"Canvas.Right\" Value=\"-8.5\" />\r\n        <Setter Property=\"Width\" Value=\"18\" />\r\n        <Setter Property=\"Height\" Value=\"{Binding Path=ActualHeight, RelativeSource={RelativeSource TemplatedParent}}\" />\r\n        <Setter Property=\"Padding\" Value=\"0,3,0,4\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource LightBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <Border Padding=\"{TemplateBinding Padding}\">\r\n                        <Rectangle HorizontalAlignment=\"Center\" Width=\"0.5\">\r\n                            <Rectangle.Fill>\r\n                                <SolidColorBrush Color=\"{DynamicResource WhiteColor}\" />\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"{x:Type GridViewColumnHeader}\" TargetType=\"{x:Type GridViewColumnHeader}\">\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource LightBrush}\" />\r\n        <Setter Property=\"Padding\" Value=\"2,0,2,0\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type GridViewColumnHeader}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid Margin=\"0,1,0,1\">\r\n                        <Grid>\r\n\r\n                            <Border x:Name=\"Main\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" CornerRadius=\"0,0,0,0\" />\n                            <Rectangle Opacity=\"1\" Stroke=\"{x:Null}\" RadiusX=\"0\" RadiusY=\"0\" VerticalAlignment=\"Stretch\" Height=\"Auto\" x:Name=\"Shine\" Fill=\"{DynamicResource ShineBrush}\"/>\r\n                            <Border x:Name=\"HoverBorder\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\" Background=\"{DynamicResource HoverBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" CornerRadius=\"0,0,0,0\" Opacity=\"0\" />\r\n                            <Border x:Name=\"HoverShineBorder\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\" Background=\"{DynamicResource HoverShineBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" CornerRadius=\"0,0,0,0\" Opacity=\"0\" />\r\n                            <Border x:Name=\"PressedBorder\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\" Background=\"{DynamicResource PressedBrush}\" BorderBrush=\"{DynamicResource PressedBorderBrush}\" CornerRadius=\"0,0,0,0\" Opacity=\"0\" />\r\n\r\n                            <Border BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\">\r\n                                <Border.BorderBrush>\r\n                                    <SolidColorBrush Color=\"{DynamicResource WhiteColor}\"/>\r\n                                </Border.BorderBrush>\r\n                                <ContentPresenter VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" RecognizesAccessKey=\"True\" Margin=\"2,2,2,2\" />\r\n                            </Border>\r\n                        </Grid>\r\n                        <Canvas>\r\n                            <Thumb x:Name=\"PART_HeaderGripper\" Style=\"{StaticResource GridViewColumnHeaderGripper}\" Margin=\"0,0,7,0\" Width=\"Auto\" HorizontalAlignment=\"Stretch\" />\r\n                        </Canvas>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"Height\" Value=\"Auto\">\r\n                            <Setter Property=\"MinHeight\" Value=\"20\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"Role\" Value=\"Padding\">\r\n                            <Setter TargetName=\"PART_HeaderGripper\" Property=\"Visibility\" Value=\"Collapsed\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"Role\" Value=\"Floating\">\r\n                            <Setter TargetName=\"PART_HeaderGripper\" Property=\"Visibility\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Background\" Value=\"Yellow\" />\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource MouseOverBrush}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Static ToolBar.ButtonStyleKey}\" TargetType=\"{x:Type Button}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource NuclearButtonFocusVisual}\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\" />\r\n        <Setter Property=\"Template\" Value=\"{DynamicResource ButtonTemplate}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n\t\t\t\t\t\t<Setter Property=\"FontSize\" Value=\"10\"/>\r\n\t\t\t\t<Setter Property=\"MinHeight\" Value=\"18\"/>\r\n\t\t\t\t<Setter Property=\"MinWidth\" Value=\"50\"/>\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Static ToolBar.CheckBoxStyleKey}\" TargetType=\"{x:Type CheckBox}\">\r\n\t\t\t<Setter Property=\"FontSize\" Value=\"10\"/>\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource CheckBoxFocusVisual}\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\" />\r\n        <Setter Property=\"Template\" Value=\"{DynamicResource CheckBoxTemplate}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n    </Style>\n\r\n    <Style x:Key=\"{x:Static ToolBar.RadioButtonStyleKey}\" TargetType=\"{x:Type RadioButton}\">\r\n\t\t\t<Setter Property=\"FontSize\" Value=\"10\"/>\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource RadioButtonFocusVisual}\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\" />\r\n        <Setter Property=\"Template\" Value=\"{DynamicResource RadioButtonTemplate}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Style.Triggers>\r\n            <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                <Setter Property=\"Foreground\">\r\n                    <Setter.Value>\r\n                        <SolidColorBrush Color=\"{DynamicResource TopGradientSelectColor}\" />\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Trigger>\r\n        </Style.Triggers>\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Static ToolBar.ComboBoxStyleKey}\" TargetType=\"{x:Type ComboBox}\">\r\n\t\t\t<Setter Property=\"FontSize\" Value=\"10\"/>\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"Template\" Value=\"{DynamicResource ComboBoxTemplate}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Static ToolBar.TextBoxStyleKey}\" TargetType=\"{x:Type TextBox}\">\r\n\t\t\t<Setter Property=\"FontSize\" Value=\"10\"/>\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\" />\r\n        <Setter Property=\"AllowDrop\" Value=\"true\" />\r\n        <Setter Property=\"Template\" Value=\"{DynamicResource TextBoxTemplate}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource ControlBackgroundBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"#FF000000\"/>\r\n    </Style>\n\r\n\r\n    <LinearGradientBrush x:Key=\"ToolBarHorizontalBackground\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#FFFFFF\" Offset=\"0\"/>\r\n        <GradientStop Color=\"#FFFBFF\" Offset=\"0.5\"/>\r\n        <GradientStop Color=\"#F7F7F7\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"ToolBarToggleButtonHorizontalBackground\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#ECECEC\" Offset=\"0\"/>\r\n        <GradientStop Color=\"#DDDDDD\" Offset=\"0.5\"/>\r\n        <GradientStop Color=\"#A0A0A0\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"ToolBarButtonHover\" Color=\"{StaticResource MainColor}\" />\r\n    <SolidColorBrush x:Key=\"ToolBarGripper\" Color=\"#C6C3C6\"/>\r\n    <Style x:Key=\"ToolBarHorizontalOverflowButtonStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource ToolBarToggleButtonHorizontalBackground}\"/>\r\n        <Setter Property=\"MinHeight\" Value=\"0\"/>\r\n        <Setter Property=\"MinWidth\" Value=\"0\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <Border SnapsToDevicePixels=\"true\" x:Name=\"Bd\" CornerRadius=\"0,0,0,0\" Background=\"{DynamicResource LightBrush}\">\r\n                        <Canvas SnapsToDevicePixels=\"true\" HorizontalAlignment=\"Right\" Margin=\"7,2,2,2\" VerticalAlignment=\"Bottom\" Width=\"6\" Height=\"7\">\r\n                            <Path Stroke=\"White\" Data=\"M 1 1.5 L 6 1.5\"/>\r\n                            <Path Stroke=\"{TemplateBinding Foreground}\" Data=\"M 0 0.5 L 5 0.5\"/>\r\n                            <Path Fill=\"White\" Data=\"M 0.5 4 L 6.5 4 L 3.5 7 Z\"/>\r\n                            <Path Fill=\"{TemplateBinding Foreground}\" Data=\"M -0.5 3 L 5.5 3 L 2.5 6 Z\"/>\r\n                        </Canvas>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Setter Property=\"Background\" TargetName=\"Bd\" Value=\"{DynamicResource MouseOverBrush}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                            <Setter Property=\"Background\" TargetName=\"Bd\" Value=\"{StaticResource ToolBarButtonHover}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{StaticResource ToolBarGripper}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <SolidColorBrush x:Key=\"ToolBarSubMenuBackground\" Color=\"#FFFDFDFD\"/>\r\n    <SolidColorBrush x:Key=\"ToolBarMenuBorder\" Color=\"#FFFFFFFF\"/>\r\n    <Style x:Key=\"ToolBarThumbStyle\" TargetType=\"{x:Type Thumb}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <Border SnapsToDevicePixels=\"True\" Background=\"Transparent\" Padding=\"{TemplateBinding Padding}\" CornerRadius=\"0,0,0,0\">\r\n                        <Rectangle>\r\n                            <Rectangle.Fill>\r\n                                <DrawingBrush TileMode=\"Tile\" Viewbox=\"0,0,4,4\" ViewboxUnits=\"Absolute\" Viewport=\"0,0,4,4\" ViewportUnits=\"Absolute\">\r\n                                    <DrawingBrush.Drawing>\r\n                                        <DrawingGroup>\r\n                                            <GeometryDrawing Brush=\"White\" Geometry=\"M 1 1 L 1 3 L 3 3 L 3 1 z\"/>\r\n                                            <GeometryDrawing Brush=\"{StaticResource ToolBarGripper}\" Geometry=\"M 0 0 L 0 2 L 2 2 L 2 0 z\"/>\r\n                                        </DrawingGroup>\r\n                                    </DrawingBrush.Drawing>\r\n                                </DrawingBrush>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Setter Property=\"Cursor\" Value=\"SizeAll\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <LinearGradientBrush x:Key=\"ToolBarToggleButtonVerticalBackground\" EndPoint=\"1,0\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#ECECEC\" Offset=\"0\"/>\r\n        <GradientStop Color=\"#DDDDDD\" Offset=\"0.5\"/>\r\n        <GradientStop Color=\"#A0A0A0\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <Style x:Key=\"ToolBarVerticalOverflowButtonStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource ToolBarToggleButtonVerticalBackground}\"/>\r\n        <Setter Property=\"MinHeight\" Value=\"0\"/>\r\n        <Setter Property=\"MinWidth\" Value=\"0\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <Border SnapsToDevicePixels=\"true\" x:Name=\"Bd\" Background=\"{TemplateBinding Background}\" CornerRadius=\"0,0,3,3\">\r\n                        <Canvas SnapsToDevicePixels=\"true\" HorizontalAlignment=\"Right\" Margin=\"2,7,2,2\" VerticalAlignment=\"Bottom\" Width=\"7\" Height=\"6\">\r\n                            <Path Stroke=\"White\" Data=\"M 1.5 1 L 1.5 6\"/>\r\n                            <Path Stroke=\"{TemplateBinding Foreground}\" Data=\"M 0.5 0 L 0.5 5\"/>\r\n                            <Path Fill=\"White\" Data=\"M 3.5 0.5 L 7 3.5 L 4 6.5 Z\"/>\r\n                            <Path Fill=\"{TemplateBinding Foreground}\" Data=\"M 3 -0.5 L 6 2.5 L 3 5.5 Z\"/>\r\n                        </Canvas>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Setter Property=\"Background\" TargetName=\"Bd\" Value=\"{StaticResource ToolBarButtonHover}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                            <Setter Property=\"Background\" TargetName=\"Bd\" Value=\"{StaticResource ToolBarButtonHover}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{StaticResource ToolBarGripper}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <LinearGradientBrush x:Key=\"ToolBarVerticalBackground\" EndPoint=\"1,0\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#FFFFFF\" Offset=\"0\"/>\r\n        <GradientStop Color=\"#FFFBFF\" Offset=\"0.5\"/>\r\n        <GradientStop Color=\"#F7F7F7\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <Style TargetType=\"{x:Type ToolBar}\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource ToolBarHorizontalBackground}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToolBar}\">\r\n                    <Grid SnapsToDevicePixels=\"true\" Margin=\"3,1,1,1\" x:Name=\"Grid\">\r\n                        <Grid HorizontalAlignment=\"Right\" x:Name=\"OverflowGrid\">\r\n                            <ToggleButton IsEnabled=\"{TemplateBinding HasOverflowItems}\" FocusVisualStyle=\"{x:Null}\" x:Name=\"OverflowButton\" Style=\"{StaticResource ToolBarHorizontalOverflowButtonStyle}\" ClickMode=\"Press\" IsChecked=\"{Binding Path=IsOverflowOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\"/>\r\n                            <Popup Focusable=\"false\" AllowsTransparency=\"true\" IsOpen=\"{Binding Path=IsOverflowOpen, RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Bottom\" PopupAnimation=\"{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}\" StaysOpen=\"False\" x:Name=\"OverflowPopup\">\r\n                                <Border x:Name=\"Shdw\">\r\n                                    <Border BorderThickness=\"1,1,1,1\" Background=\"{DynamicResource LightBrush}\" BorderBrush=\"{DynamicResource LightBrush}\">\r\n                                        <ToolBarOverflowPanel Focusable=\"true\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" FocusVisualStyle=\"{x:Null}\" Margin=\"2\" x:Name=\"PART_ToolBarOverflowPanel\" WrapWidth=\"200\" KeyboardNavigation.DirectionalNavigation=\"Cycle\" KeyboardNavigation.TabNavigation=\"Cycle\"/>\r\n                                    </Border>\r\n                                </Border>\r\n                            </Popup>\r\n                        </Grid>\r\n                        <Border Margin=\"0,0,11,0\" x:Name=\"MainPanelBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"0,0,0,0\" Padding=\"{TemplateBinding Padding}\" Background=\"{DynamicResource NormalBorderBrush}\">\r\n                            <Grid>\r\n\r\n                                <DockPanel KeyboardNavigation.TabIndex=\"1\" KeyboardNavigation.TabNavigation=\"Local\">\r\n                                    <Thumb Padding=\"6,5,1,6\" Margin=\"-3,-1,0,0\" x:Name=\"ToolBarThumb\" Style=\"{StaticResource ToolBarThumbStyle}\" Width=\"10\"/>\r\n                                    <ContentPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" HorizontalAlignment=\"Center\" Margin=\"4,0,4,0\" x:Name=\"ToolBarHeader\" VerticalAlignment=\"Center\" ContentSource=\"Header\"/>\r\n                                    <ToolBarPanel SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Margin=\"0,1,2,2\" x:Name=\"PART_ToolBarPanel\" IsItemsHost=\"true\" Background=\"{DynamicResource NormalBrush}\"/>\r\n                                </DockPanel>\r\n                                <Rectangle IsHitTestVisible=\"False\" Opacity=\"0.15\" VerticalAlignment=\"Top\" Height=\"13.995\" Grid.ColumnSpan=\"1\" Margin=\"0,0,2,0\">\r\n                                    <Rectangle.Fill>\r\n                                        <SolidColorBrush Color=\"{DynamicResource WhiteColor}\"/>\r\n                                    </Rectangle.Fill>\r\n                                </Rectangle>\r\n                            </Grid>\r\n                        </Border>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsOverflowOpen\" Value=\"true\">\r\n                            <Setter Property=\"IsEnabled\" TargetName=\"ToolBarThumb\" Value=\"false\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"Header\" Value=\"{x:Null}\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"ToolBarHeader\" Value=\"Collapsed\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"ToolBarTray.IsLocked\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"ToolBarThumb\" Value=\"Collapsed\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"HasDropShadow\" SourceName=\"OverflowPopup\" Value=\"true\">\r\n                            <Setter Property=\"Margin\" TargetName=\"Shdw\" Value=\"0,0,5,5\"/>\r\n                            <Setter Property=\"SnapsToDevicePixels\" TargetName=\"Shdw\" Value=\"true\"/>\r\n                            <Setter Property=\"Background\" TargetName=\"Shdw\" Value=\"#71000000\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"Orientation\" Value=\"Vertical\">\r\n                            <Setter Property=\"Margin\" TargetName=\"Grid\" Value=\"1,3,1,1\"/>\r\n                            <Setter Property=\"Style\" TargetName=\"OverflowButton\" Value=\"{StaticResource ToolBarVerticalOverflowButtonStyle}\"/>\r\n                            <Setter Property=\"Height\" TargetName=\"ToolBarThumb\" Value=\"10\"/>\r\n                            <Setter Property=\"Width\" TargetName=\"ToolBarThumb\" Value=\"Auto\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"ToolBarThumb\" Value=\"-1,-3,0,0\"/>\r\n                            <Setter Property=\"Padding\" TargetName=\"ToolBarThumb\" Value=\"5,6,6,1\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"ToolBarHeader\" Value=\"0,0,0,4\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"PART_ToolBarPanel\" Value=\"1,0,2,2\"/>\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ToolBarThumb\" Value=\"Top\"/>\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ToolBarHeader\" Value=\"Top\"/>\r\n                            <Setter Property=\"HorizontalAlignment\" TargetName=\"OverflowGrid\" Value=\"Stretch\"/>\r\n                            <Setter Property=\"VerticalAlignment\" TargetName=\"OverflowGrid\" Value=\"Bottom\"/>\r\n                            <Setter Property=\"Placement\" TargetName=\"OverflowPopup\" Value=\"Right\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"MainPanelBorder\" Value=\"0,0,0,11\"/>\r\n                            <Setter Property=\"Background\" Value=\"{StaticResource ToolBarVerticalBackground}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n    </Style>\r\n\r\n</ResourceDictionary>\r\n\r\n\r\n\r\n\r\n"
  },
  {
    "path": "WpfToolkit/WPF.Themes/ExpressionLight/Theme.xaml",
    "content": "﻿<!--\r\n// (c) Copyright Microsoft Corporation.\r\n// This source is subject to Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n-->\r\n\r\n<ResourceDictionary\r\n  xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n  xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n  xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n  mc:Ignorable=\"d\"\r\n  xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\">\r\n\r\n    <!-- Main Colors -->\r\n\r\n    <Color x:Key=\"MainColor\">#FF939393</Color>\r\n    <Color x:Key=\"HoverColor\">#FFAAAAAA</Color>\r\n    <Color x:Key=\"DefaultColor\">#FF9BB1C5</Color>\r\n    <SolidColorBrush x:Key=\"LightBrush\" Color=\"#FFAFAFAF\" />\r\n    <SolidColorBrush x:Key=\"ShadeBrush\" Color=\"#FF9F9F9F\" />\r\n\r\n    <Color x:Key=\"TopGradientSelectColor\">#FFFFFFFF</Color>\r\n    <Color x:Key=\"BottomGradientSelectColor\">#FF999999</Color>\r\n\r\n    <Color x:Key=\"BlackColor\">#FF000000</Color>\r\n    <Color x:Key=\"WhiteColor\">#FFFFFFFF</Color>\r\n\r\n    <SolidColorBrush x:Key=\"TextBrush\" Color=\"#FF000000\" />\r\n    <SolidColorBrush x:Key=\"NormalBrush\" Color=\"{StaticResource MainColor}\" />\r\n    <SolidColorBrush x:Key=\"NormalBorderBrush\" Color=\"#FF9B9999\" />\r\n    <SolidColorBrush x:Key=\"HoverBrush\" Color=\"{StaticResource HoverColor}\" />\r\n    <SolidColorBrush x:Key=\"GlyphBrush\" Color=\"#FFFFFFFF\" />\r\n\r\n    <LinearGradientBrush x:Key=\"PressedBrush\" EndPoint=\"0.5,0.971\" StartPoint=\"0.5,0.042\">\r\n        <GradientStop Color=\"#4C000000\" Offset=\"0\" />\r\n        <GradientStop Color=\"#26FFFFFF\" Offset=\"1\" />\r\n        <GradientStop Color=\"#4C000000\" Offset=\"0.467\" />\r\n        <GradientStop Color=\"#26FFFFFF\" Offset=\"0.479\" />\r\n    </LinearGradientBrush>\r\n\r\n    <SolidColorBrush x:Key=\"ControlBackgroundBrush\" Color=\"#FFD6D6D6\" />\r\n\r\n    <LinearGradientBrush x:Key=\"SelectedBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource TopGradientSelectColor}\" Offset=\"0\" />\r\n        <GradientStop Color=\"{StaticResource BottomGradientSelectColor}\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <SolidColorBrush x:Key=\"DisabledForegroundBrush\" Color=\"#888\" />\r\n    <SolidColorBrush x:Key=\"DisabledBackgroundBrush\" Color=\"#FFD4D4D4\" />\r\n    <SolidColorBrush x:Key=\"DisabledBorderBrush\" Color=\"#AAA\" />\r\n    <SolidColorBrush x:Key=\"WindowBackgroundBrush\" Color=\"#FFFFFFFF\" />\r\n\r\n\n    <!-- EXPRESSION COMMON VALUES -->\r\n\r\n    <LinearGradientBrush x:Key=\"ShineBrush\" EndPoint=\"0.5,0.971\" StartPoint=\"0.5,0.042\">\r\n        <GradientStop Color=\"#59FFFFFF\" Offset=\"0\" />\r\n        <GradientStop Color=\"#00FFFFFF\" Offset=\"1\" />\r\n        <GradientStop Color=\"#26FFFFFF\" Offset=\"0.467\" />\r\n        <GradientStop Color=\"#00FFFFFF\" Offset=\"0.475\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"HoverShineBrush\" EndPoint=\"0.5,0.971\" StartPoint=\"0.5,0.042\">\r\n        <GradientStop Color=\"#4CFFFFFF\" Offset=\"0\" />\r\n        <GradientStop Color=\"#26FFFFFF\" Offset=\"1\" />\r\n        <GradientStop Color=\"#26FFFFFF\" Offset=\"0.467\" />\r\n        <GradientStop Color=\"#00FFFFFF\" Offset=\"0.475\" />\r\n        <GradientStop Color=\"#00FFFFFF\" Offset=\"0.856\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"PressedBorderBrush\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#444\" Offset=\"0.0\" />\r\n        <GradientStop Color=\"#888\" Offset=\"1.0\" />\r\n    </LinearGradientBrush>\r\n\r\n    <SolidColorBrush x:Key=\"DefaultedBorderBrush\" Color=\"{StaticResource DefaultColor}\" />\r\n    <SolidColorBrush x:Key=\"SolidBorderBrush\" Color=\"#888\" />\r\n\r\n    <Style x:Key=\"NuclearButtonFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Border>\r\n                        <Rectangle Margin=\"2\" Stroke=\"#60000000\" StrokeThickness=\"1\" StrokeDashArray=\"1 2\" />\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\n    <Style TargetType=\"{x:Type Button}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource NuclearButtonFocusVisual}\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\" />\r\n<Setter Property=\"Template\" Value=\"{DynamicResource ButtonTemplate}\" />\r\n    </Style>\n    \n    <ControlTemplate x:Key=\"ButtonTemplate\" TargetType=\"{x:Type Button}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocussedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n\r\n                    </ControlTemplate.Resources>\n                    <Grid x:Name=\"Grid\">\r\n                        <Border x:Name=\"Background\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" />\r\n                        <Border x:Name=\"HoverBorder\" Opacity=\"0\" Background=\"{StaticResource HoverBrush}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" />\r\n                        <Border x:Name=\"HoverShineBorder\" Opacity=\"0\" Background=\"{StaticResource HoverShineBrush}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" />\r\n                        <Border x:Name=\"PressedBorder\" Opacity=\"0\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" Background=\"{StaticResource PressedBrush}\" />\r\n                        <Border x:Name=\"ShineBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" Background=\"{StaticResource ShineBrush}\" Opacity=\"1\" />\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" RecognizesAccessKey=\"True\" />\r\n                        <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" BorderBrush=\"{StaticResource HoverShineBrush}\" BorderThickness=\"1\" CornerRadius=\"3,3,3,3\" Margin=\"1,1,1,1\" Opacity=\"0\" />\r\n                    </Grid>\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsDefault\" Value=\"True\">\r\n                            <Setter Property=\"BorderBrush\" TargetName=\"ShineBorder\" Value=\"{DynamicResource DefaultedBorderBrush}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocussedOff}\" x:Name=\"FocussedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" />\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"true\" />\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Background\" />\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DisabledBorderBrush}\" TargetName=\"ShineBorder\" />\r\n                            <Setter Property=\"Opacity\" TargetName=\"Grid\" Value=\"0.5\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\n    \n    <Style x:Key=\"RadioButtonFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Border>\r\n                        <Rectangle Margin=\"15,0,0,0\" Stroke=\"#60000000\" StrokeThickness=\"1\" StrokeDashArray=\"1 2\" />\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\n    <Style x:Key=\"CheckBoxFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Border>\r\n                        <Rectangle Margin=\"15,0,0,0\" Stroke=\"#60000000\" StrokeThickness=\"1\" StrokeDashArray=\"1 2\" />\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\n    <Style TargetType=\"{x:Type CheckBox}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource CheckBoxFocusVisual}\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\" />\r\n<Setter Property=\"Template\" Value=\"{DynamicResource CheckBoxTemplate}\" />\r\n    </Style>\r\n    \r\n    <ControlTemplate x:Key=\"CheckBoxTemplate\" TargetType=\"{x:Type CheckBox}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedTrue\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedFalse\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"IndeterminateOn\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"IndeterminateIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"IndeterminateOff\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"IndeterminateIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocussedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"ContentFocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocussedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"ContentFocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\n                    <BulletDecorator Background=\"Transparent\" x:Name=\"bulletDecorator\">\r\n                        <BulletDecorator.Bullet>\r\n                            <Grid Width=\"16\" Height=\"16\">\r\n                                <Rectangle Height=\"14\" Margin=\"1\" x:Name=\"Background\" Width=\"14\" Fill=\"{TemplateBinding Background}\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" />\r\n                                <Rectangle Height=\"14\" Margin=\"1\" x:Name=\"BackgroundOverlay\" Width=\"14\" Opacity=\"0\" Fill=\"{x:Null}\" Stroke=\"{StaticResource HoverBrush}\" StrokeThickness=\"2\" />\r\n                                <Rectangle Height=\"16\" x:Name=\"PressedRectangle\" Width=\"16\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HoverBrush}\" StrokeThickness=\"1\" />\r\n                                <Path Height=\"10\" Margin=\"1,1,0,1.5\" x:Name=\"CheckIcon\" Width=\"10.5\" Opacity=\"0\" Fill=\"{StaticResource GlyphBrush}\" Stretch=\"Fill\" Data=\"M102.03442,598.79645 L105.22962,597.78918 L106.78825,600.42358 C106.78825,600.42358 108.51028,595.74304 110.21724,593.60419 C112.00967,591.35822 114.89314,591.42316 114.89314,591.42316 C114.89314,591.42316 112.67844,593.42645 111.93174,594.44464 C110.7449,596.06293 107.15683,604.13837 107.15683,604.13837 z\" />\r\n                                <Rectangle Height=\"8\" x:Name=\"IndeterminateIcon\" Width=\"10\" Opacity=\"0\" Fill=\"{StaticResource GlyphBrush}\" />\r\n                                <Rectangle Height=\"14\" x:Name=\"DisabledVisualElement\" Width=\"14\" Opacity=\"0\" Fill=\"{StaticResource DisabledBackgroundBrush}\" />\r\n                                <Rectangle Height=\"16\" x:Name=\"ContentFocusVisualElement\" Width=\"16\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HoverShineBrush}\" StrokeThickness=\"1\" />\r\n                                <Rectangle Height=\"12\" x:Name=\"ShineRectangle\" Width=\"14\" IsHitTestVisible=\"false\" Opacity=\"1\" Stroke=\"{x:Null}\" StrokeThickness=\"1\" Fill=\"{StaticResource ShineBrush}\" Margin=\"2,2,2,2\" />\r\n                            </Grid>\r\n                        </BulletDecorator.Bullet>\r\n                        <ContentPresenter RecognizesAccessKey=\"True\" Margin=\"5,0,0,0\" VerticalAlignment=\"Top\" HorizontalAlignment=\"Left\" />\r\n                    </BulletDecorator>\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocussedOff}\" x:Name=\"FocussedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocussedOn}\" x:Name=\"FocussedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsChecked\" Value=\"True\" />\r\n                                <Condition Property=\"IsThreeState\" Value=\"True\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"ThreeStateOn_BeginStoryboard\" Storyboard=\"{StaticResource CheckedFalse}\" />\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"ThreeStateOff_BeginStoryboard\" Storyboard=\"{StaticResource CheckedTrue}\" />\r\n                            </MultiTrigger.ExitActions>\r\n                        </MultiTrigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsChecked\" Value=\"{x:Null}\" />\r\n                                <Condition Property=\"IsThreeState\" Value=\"True\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"ThreeStateOn1_BeginStoryboard\" Storyboard=\"{StaticResource IndeterminateOn}\" />\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"ThreeStateOff1_BeginStoryboard\" Storyboard=\"{StaticResource IndeterminateOff}\" />\r\n                            </MultiTrigger.ExitActions>\r\n                            <Setter Property=\"Visibility\" TargetName=\"CheckIcon\" Value=\"Hidden\"/>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedFalse}\" x:Name=\"CheckedTrue_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"CheckedTrue_BeginStoryboard1\" Storyboard=\"{StaticResource CheckedTrue}\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Fill\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Background\" />\r\n                            <Setter Property=\"Stroke\" Value=\"{DynamicResource DisabledBorderBrush}\" TargetName=\"Background\" />\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                            <Setter Property=\"Opacity\" TargetName=\"bulletDecorator\" Value=\"0.5\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\n                </ControlTemplate>\r\n\n    <Style TargetType=\"{x:Type RadioButton}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource RadioButtonFocusVisual}\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\" />\r\n<Setter Property=\"Template\" Value=\"{DynamicResource RadioButtonTemplate}\" />\r\n        <Style.Triggers>\r\n        </Style.Triggers>\r\n    </Style>\n    \n    <ControlTemplate x:Key=\"RadioButtonTemplate\" TargetType=\"{x:Type RadioButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedEllipse\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedEllipse\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOn\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOff\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocussedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"ContentFocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocussedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"ContentFocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\n                    <BulletDecorator Background=\"Transparent\" x:Name=\"bulletDecorator\">\r\n                        <BulletDecorator.Bullet>\r\n                            <Grid Width=\"16\" Height=\"16\">\r\n                                <Ellipse Height=\"14\" Margin=\"1\" x:Name=\"Background\" Width=\"14\" Fill=\"{TemplateBinding Background}\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" />\r\n                                <Ellipse Height=\"14\" Margin=\"1\" x:Name=\"BackgroundOverlay\" Width=\"14\" StrokeThickness=\"2\" Stroke=\"{StaticResource HoverBrush}\" Opacity=\"0\" />\r\n                                <Ellipse Height=\"14\" Margin=\"1\" x:Name=\"PressedEllipse\" Width=\"14\" StrokeThickness=\"{TemplateBinding BorderThickness}\" Stroke=\"{StaticResource HoverBrush}\" Opacity=\"0\" />\r\n                                <Ellipse Height=\"6\" x:Name=\"CheckIcon\" Width=\"6\" Opacity=\"0\" Fill=\"{StaticResource GlyphBrush}\" />\r\n                                <Ellipse Height=\"14\" x:Name=\"DisabledVisualElement\" Width=\"14\" Opacity=\"0\" Fill=\"{StaticResource DisabledBackgroundBrush}\" />\r\n                                <Ellipse Height=\"16\" x:Name=\"ContentFocusVisualElement\" Width=\"16\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HoverShineBrush}\" StrokeThickness=\"1\" />\r\n                                <Ellipse Height=\"12\" Margin=\"2,2,2,2\" x:Name=\"ShineEllipse\" Width=\"12\" StrokeThickness=\"{TemplateBinding BorderThickness}\" Stroke=\"{x:Null}\" Fill=\"{StaticResource ShineBrush}\" />\r\n                            </Grid>\r\n                        </BulletDecorator.Bullet>\r\n                        <ContentPresenter RecognizesAccessKey=\"True\" Margin=\"5,0,0,0\" />\r\n                    </BulletDecorator>\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocussedOff}\" x:Name=\"FocussedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocussedOn}\" x:Name=\"FocussedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"false\">\r\n\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"CheckedOn_BeginStoryboard\" Storyboard=\"{StaticResource CheckedOn}\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"CheckedOff_BeginStoryboard\" Storyboard=\"{StaticResource CheckedOff}\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"True\"/>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"HoverOff_BeginStoryboard\" Storyboard=\"{StaticResource HoverOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"PressedOff_BeginStoryboard\" Storyboard=\"{StaticResource PressedOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"PressedOn_BeginStoryboard\" Storyboard=\"{StaticResource PressedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Fill\" TargetName=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                            <Setter Property=\"Stroke\" TargetName=\"Background\" Value=\"{DynamicResource DisabledBorderBrush}\"/>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                            <Setter Property=\"Opacity\" TargetName=\"bulletDecorator\" Value=\"0.5\"/>\r\n                        </Trigger>\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\n    \n    <Style d:IsControlPart=\"True\" TargetType=\"{x:Type RepeatButton}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"ContentPresenter\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.8\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"ContentPresenter\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0.3\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"ContentPresenter\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"ContentPresenter\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0.3\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Border x:Name=\"Border\" BorderThickness=\"{TemplateBinding BorderThickness}\" Opacity=\"1\" />\r\n                        <ContentPresenter HorizontalAlignment=\"Center\" x:Name=\"ContentPresenter\" VerticalAlignment=\"Center\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" ContentTemplateSelector=\"{TemplateBinding ContentTemplateSelector}\" Opacity=\"0.3\" Height=\"Auto\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\" />\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"ContentPresenter\" Value=\"0.1\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\n    <Style x:Key=\"NuclearThumbStyle\" d:IsControlPart=\"True\" TargetType=\"{x:Type Thumb}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.8\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0.3\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0.3\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid Margin=\"0,0,0,0\" x:Name=\"Grid\">\r\n                        <Rectangle HorizontalAlignment=\"Stretch\" x:Name=\"HoverRectangle\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" RadiusX=\"3\" RadiusY=\"4\" Stroke=\"{x:Null}\" Margin=\"4.5,-2,4.5,-2\" Opacity=\"0.3\" MinHeight=\"10\">\r\n                            <Rectangle.Fill>\r\n                                <SolidColorBrush Color=\"{DynamicResource WhiteColor}\" />\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                        <Rectangle HorizontalAlignment=\"Stretch\" x:Name=\"PressedRectangle\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" RadiusX=\"3\" RadiusY=\"4\" Stroke=\"{x:Null}\" Margin=\"4.5,-2,4.5,-2\" Opacity=\"0.3\" MinHeight=\"10\">\r\n                            <Rectangle.Fill>\r\n                                <SolidColorBrush Color=\"{DynamicResource WhiteColor}\" />\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\" />\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\" >\r\n                            <Setter Property=\"Opacity\" TargetName=\"Grid\" Value=\"0.1\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsDragging\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\n    <Style x:Key=\"NuclearScrollRepeatButtonStyle\" d:IsControlPart=\"True\" TargetType=\"{x:Type RepeatButton}\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"false\" />\r\n        <Setter Property=\"Focusable\" Value=\"false\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n                    <Grid>\r\n                        <Rectangle Fill=\"{TemplateBinding Background}\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\n    <Style TargetType=\"{x:Type ScrollBar}\">\r\n        <Setter Property=\"Stylus.IsFlicksEnabled\" Value=\"false\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ScrollBar}\">\r\n                    <Grid x:Name=\"GridRoot\" Width=\"{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}\" Background=\"{DynamicResource NormalBrush}\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition MaxHeight=\"18\" />\r\n                            <RowDefinition Height=\"0.00001*\" />\r\n                            <RowDefinition MaxHeight=\"18\" />\r\n                        </Grid.RowDefinitions>\n                        <RepeatButton x:Name=\"DecreaseRepeat\" Command=\"ScrollBar.LineUpCommand\" Background=\"{x:Null}\" BorderBrush=\"{x:Null}\" Foreground=\"{x:Null}\">\r\n                            <Grid Margin=\"0,0,0,0\">\r\n                                <Path Margin=\"4.742,3.997,4.946,5.327\" VerticalAlignment=\"Stretch\" Height=\"Auto\" Fill=\"{DynamicResource GlyphBrush}\" Stretch=\"Fill\" Stroke=\"{DynamicResource GlyphBrush}\" StrokeThickness=\"1\" Data=\"M5.2422477,11.132184 L11.5544,11.132184 8.6412958,4.4969033 z\" x:Name=\"DecreaseArrow\" />\r\n                            </Grid>\r\n                        </RepeatButton>\n                        <Track Grid.Row=\"1\" x:Name=\"PART_Track\" Orientation=\"Vertical\" IsDirectionReversed=\"true\">\r\n                            <Track.Thumb>\r\n                                <Thumb Style=\"{DynamicResource NuclearThumbStyle}\" Background=\"{x:Null}\" Foreground=\"{x:Null}\" />\r\n                            </Track.Thumb>\r\n                            <Track.IncreaseRepeatButton>\r\n                                <RepeatButton x:Name=\"PageUp\" Style=\"{DynamicResource NuclearScrollRepeatButtonStyle}\" Command=\"ScrollBar.PageDownCommand\" />\r\n                            </Track.IncreaseRepeatButton>\r\n                            <Track.DecreaseRepeatButton>\r\n                                <RepeatButton x:Name=\"PageDown\" Style=\"{DynamicResource NuclearScrollRepeatButtonStyle}\" Command=\"ScrollBar.PageUpCommand\" />\r\n                            </Track.DecreaseRepeatButton>\r\n                        </Track>\n                        <RepeatButton Grid.Row=\"2\" x:Name=\"IncreaseRepeat\" Command=\"ScrollBar.LineDownCommand\">\r\n                            <Grid>\r\n                                <Path Margin=\"4.742,3.997,4.946,5.327\" x:Name=\"IncreaseArrow\" VerticalAlignment=\"Stretch\" Height=\"Auto\" Fill=\"{DynamicResource GlyphBrush}\" Stretch=\"Fill\" Stroke=\"{DynamicResource GlyphBrush}\" StrokeThickness=\"1\" Data=\"M5.2422477,11.132184 L11.5544,11.132184 8.6412958,4.4969033 z\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                    <Path.RenderTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                            <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                            <RotateTransform Angle=\"180\" />\r\n                                            <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                        </TransformGroup>\r\n                                    </Path.RenderTransform>\r\n                                </Path>\r\n                            </Grid>\r\n                        </RepeatButton>\r\n                    </Grid>\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"Orientation\" Value=\"Horizontal\">\n                            <Setter Property=\"LayoutTransform\" TargetName=\"GridRoot\">\r\n                                <Setter.Value>\r\n                                    <RotateTransform Angle=\"-90\" />\r\n                                </Setter.Value>\r\n                            </Setter>\n                            <Setter TargetName=\"PART_Track\" Property=\"Orientation\" Value=\"Vertical\" />\n                            <Setter Property=\"Command\" Value=\"ScrollBar.LineLeftCommand\" TargetName=\"DecreaseRepeat\" />\r\n                            <Setter Property=\"Command\" Value=\"ScrollBar.LineRightCommand\" TargetName=\"IncreaseRepeat\" />\r\n                            <Setter Property=\"Command\" Value=\"ScrollBar.PageLeftCommand\" TargetName=\"PageDown\" />\r\n                            <Setter Property=\"Command\" Value=\"ScrollBar.PageRightCommand\" TargetName=\"PageUp\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\n    <Style x:Key=\"NuclearScrollViewer\" TargetType=\"{x:Type ScrollViewer}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ScrollViewer}\">\r\n                    <Grid Background=\"{TemplateBinding Background}\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\" />\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"*\" />\r\n                            <RowDefinition Height=\"Auto\" />\r\n                        </Grid.RowDefinitions>\r\n                        <ScrollContentPresenter Grid.Column=\"0\" Grid.Row=\"0\" Margin=\"{TemplateBinding Padding}\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" CanContentScroll=\"{TemplateBinding CanContentScroll}\" />\n                        <ScrollBar Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Grid.Column=\"0\" Grid.Row=\"1\" x:Name=\"PART_HorizontalScrollBar\" Orientation=\"Horizontal\" Value=\"{Binding Path=HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" ViewportSize=\"{TemplateBinding ViewportWidth}\" Minimum=\"0\" Maximum=\"{TemplateBinding ScrollableWidth}\" AutomationProperties.AutomationId=\"HorizontalScrollBar\" />\r\n                        <ScrollBar Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Grid.Column=\"1\" Grid.Row=\"0\" x:Name=\"PART_VerticalScrollBar\" Orientation=\"Vertical\" Value=\"{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" ViewportSize=\"{TemplateBinding ViewportHeight}\" Minimum=\"0\" Maximum=\"{TemplateBinding ScrollableHeight}\" AutomationProperties.AutomationId=\"VerticalScrollBar\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\n    <Style TargetType=\"{x:Type ListBox}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"Background\" Value=\"{StaticResource ControlBackgroundBrush}\" />\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"#FFA3AEB9\" Offset=\"0\" />\r\n                    <GradientStop Color=\"#FF8399A9\" Offset=\"0.375\" />\r\n                    <GradientStop Color=\"#FF718597\" Offset=\"0.375\" />\r\n                    <GradientStop Color=\"#FF617584\" Offset=\"1\" />\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\" />\r\n        <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\" />\r\n        <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"True\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListBox}\">\r\n                    <Grid>\r\n                        <Border x:Name=\"Border\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\" Background=\"{DynamicResource ControlBackgroundBrush}\" />\r\n                        <ScrollViewer Margin=\"1\" Style=\"{DynamicResource NuclearScrollViewer}\" Focusable=\"false\" Background=\"{x:Null}\">\n                            <StackPanel Margin=\"1,1,1,1\" IsItemsHost=\"true\" />\n                        </ScrollViewer>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\" />\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DisabledBorderBrush}\" TargetName=\"Border\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                            <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\n    <Style d:IsControlPart=\"True\" TargetType=\"{x:Type ListBoxItem}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListBoxItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOn\">\r\n\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOff\">\r\n\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocussedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocussedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid SnapsToDevicePixels=\"true\" Margin=\"1,1,1,1\">\r\n                        <Rectangle x:Name=\"Background\" IsHitTestVisible=\"False\" Opacity=\"0.25\" Fill=\"{StaticResource NormalBrush}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                        <Rectangle x:Name=\"HoverRectangle\" IsHitTestVisible=\"False\" Opacity=\"0\" Fill=\"{StaticResource NormalBrush}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                        <Rectangle x:Name=\"SelectedRectangle\" IsHitTestVisible=\"False\" Opacity=\"0\" Fill=\"{StaticResource SelectedBackgroundBrush}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Margin=\"5,2,0,2\" x:Name=\"contentPresenter\" />\r\n                        <Rectangle x:Name=\"FocusVisualElement\" Stroke=\"{StaticResource HoverShineBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocussedOff}\" x:Name=\"FocussedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocussedOn}\" x:Name=\"FocussedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\n                        <Trigger Property=\"IsSelected\" Value=\"true\">\r\n\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"SelectedOff_BeginStoryboard\" Storyboard=\"{StaticResource SelectedOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"SelectedOn_BeginStoryboard\" Storyboard=\"{StaticResource SelectedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" />\r\n                                <Condition Property=\"Selector.IsSelected\" Value=\"False\" />\r\n                            </MultiTrigger.Conditions>\r\n\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"HoverOff_BeginStoryboard\" Storyboard=\"{StaticResource HoverOff}\"/>\r\n                            </MultiTrigger.ExitActions>\r\n\r\n                        </MultiTrigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"Selector.IsSelected\" Value=\"True\" />\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" />\r\n                            </MultiTrigger.Conditions>\r\n\r\n                        </MultiTrigger>\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Style.Triggers>\r\n            <Trigger Property=\"Selector.IsSelected\" Value=\"True\">\r\n                <Setter Property=\"Foreground\">\r\n                    <Setter.Value>\r\n                        <SolidColorBrush Color=\"{DynamicResource BlackColor}\" />\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Trigger>\r\n        </Style.Triggers>\r\n    </Style>\r\n\r\n    <Style x:Key=\"ExpanderHeaderFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Border>\r\n                        <Rectangle SnapsToDevicePixels=\"true\" Margin=\"0\" Stroke=\"Black\" StrokeDashArray=\"1 2\" StrokeThickness=\"1\" />\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"ExpanderDownHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Border Padding=\"{TemplateBinding Padding}\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"2,2,2,2\">\r\n                        <Grid SnapsToDevicePixels=\"False\" Background=\"Transparent\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"19\" />\r\n                                <ColumnDefinition Width=\"*\" />\r\n                            </Grid.ColumnDefinitions>\r\n                            <Rectangle Margin=\"2,2,2,2\" x:Name=\"Rectangle\" Fill=\"{DynamicResource NormalBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" />\r\n                            <Rectangle Margin=\"2,2,2,2\" x:Name=\"ShineRectangle\" Fill=\"{DynamicResource ShineBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" />\r\n                            <Rectangle Margin=\"2,2,2,2\" x:Name=\"HoverRectangle\" Fill=\"{DynamicResource HoverBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" />\r\n                            <Rectangle Margin=\"2,2,2,2\" x:Name=\"HoverShineRectangle\" Fill=\"{DynamicResource HoverShineBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" />\r\n                            <Rectangle Margin=\"2,2,2,2\" x:Name=\"PressedRectangle\" Fill=\"{DynamicResource PressedBrush}\" Stroke=\"{DynamicResource PressedBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" />\r\n                            <Path HorizontalAlignment=\"Center\" x:Name=\"Up_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 0 L 4 4 L 8 0 Z\" />\r\n                            <Path Visibility=\"Collapsed\" HorizontalAlignment=\"Center\" x:Name=\"Down_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 4 L 4 0 L 8 4 Z\" />\r\n                            <ContentPresenter SnapsToDevicePixels=\"True\" HorizontalAlignment=\"Left\" Margin=\"4,2,0,2\" VerticalAlignment=\"Center\" Grid.Column=\"1\" RecognizesAccessKey=\"True\" />\r\n                        </Grid>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"Down_Arrow\" Value=\"Visible\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Up_Arrow\" Value=\"Collapsed\" />\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"ExpanderRightHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Border Padding=\"{TemplateBinding Padding}\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"2,2,2,2\">\r\n                        <Grid SnapsToDevicePixels=\"False\" Background=\"Transparent\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"19\" />\r\n                                <RowDefinition Height=\"*\" />\r\n                            </Grid.RowDefinitions>\r\n                            <Grid>\r\n                                <Grid.LayoutTransform>\r\n                                    <TransformGroup>\r\n                                        <TransformGroup.Children>\r\n                                            <TransformCollection>\r\n                                                <RotateTransform Angle=\"-90\" />\r\n                                            </TransformCollection>\r\n                                        </TransformGroup.Children>\r\n                                    </TransformGroup>\r\n                                </Grid.LayoutTransform>\r\n                                <Rectangle Margin=\"2,2,2,2\" x:Name=\"Rectangle\" Fill=\"{DynamicResource NormalBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" />\r\n                                <Rectangle Margin=\"2,2,2,2\" x:Name=\"ShineRectangle\" Fill=\"{DynamicResource ShineBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" />\r\n                                <Rectangle Margin=\"2,2,2,2\" x:Name=\"HoverRectangle\" Fill=\"{DynamicResource HoverBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" />\r\n                                <Rectangle Margin=\"2,2,2,2\" x:Name=\"HoverShineRectangle\" Fill=\"{DynamicResource HoverShineBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" />\r\n                                <Rectangle Margin=\"2,2,2,2\" x:Name=\"PressedRectangle\" Fill=\"{DynamicResource PressedBrush}\" Stroke=\"{DynamicResource PressedBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" />\r\n                                <Path HorizontalAlignment=\"Center\" x:Name=\"Up_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 0 L 4 4 L 8 0 Z\" />\r\n                                <Path Visibility=\"Collapsed\" HorizontalAlignment=\"Center\" x:Name=\"Down_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 4 L 4 0 L 8 4 Z\" />\r\n                            </Grid>\r\n                            <ContentPresenter SnapsToDevicePixels=\"True\" HorizontalAlignment=\"Center\" Margin=\"2,4,4,0\" VerticalAlignment=\"Top\" Grid.Row=\"1\" RecognizesAccessKey=\"True\">\r\n                                <ContentPresenter.LayoutTransform>\r\n                                    <TransformGroup>\r\n                                        <TransformGroup.Children>\r\n                                            <TransformCollection>\r\n                                                <RotateTransform Angle=\"-90\" />\r\n                                            </TransformCollection>\r\n                                        </TransformGroup.Children>\r\n                                    </TransformGroup>\r\n                                </ContentPresenter.LayoutTransform>\r\n                            </ContentPresenter>\r\n                        </Grid>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"Up_Arrow\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Down_Arrow\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"ExpanderUpHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Border Padding=\"{TemplateBinding Padding}\" CornerRadius=\"2,2,2,2\" BorderThickness=\"1,1,1,1\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\">\r\n                        <Grid SnapsToDevicePixels=\"False\" Background=\"Transparent\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"19\" />\r\n                                <ColumnDefinition Width=\"*\" />\r\n                            </Grid.ColumnDefinitions>\r\n                            <Grid>\r\n                                <Grid.LayoutTransform>\r\n                                    <TransformGroup>\r\n                                        <TransformGroup.Children>\r\n                                            <TransformCollection>\r\n                                                <RotateTransform Angle=\"180\" />\r\n                                            </TransformCollection>\r\n                                        </TransformGroup.Children>\r\n                                    </TransformGroup>\r\n                                </Grid.LayoutTransform>\r\n                                <Rectangle Margin=\"2,2,2,2\" x:Name=\"Rectangle\" Fill=\"{DynamicResource NormalBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" />\r\n                                <Rectangle Margin=\"2,2,2,2\" x:Name=\"ShineRectangle\" Fill=\"{DynamicResource ShineBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" />\r\n                                <Rectangle Margin=\"2,2,2,2\" x:Name=\"HoverRectangle\" Fill=\"{DynamicResource HoverBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" />\r\n                                <Rectangle Margin=\"2,2,2,2\" x:Name=\"HoverShineRectangle\" Fill=\"{DynamicResource HoverShineBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" />\r\n                                <Rectangle Margin=\"2,2,2,2\" x:Name=\"PressedRectangle\" Fill=\"{DynamicResource PressedBrush}\" Stroke=\"{DynamicResource PressedBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" />\r\n                                <Path HorizontalAlignment=\"Center\" x:Name=\"Up_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 0 L 4 4 L 8 0 Z\" />\r\n                                <Path Visibility=\"Collapsed\" HorizontalAlignment=\"Center\" x:Name=\"Down_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 4 L 4 0 L 8 4 Z\" />\r\n                            </Grid>\r\n                            <ContentPresenter SnapsToDevicePixels=\"True\" HorizontalAlignment=\"Left\" Margin=\"4,2,0,2\" VerticalAlignment=\"Center\" Grid.Column=\"1\" RecognizesAccessKey=\"True\" />\r\n                        </Grid>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"Up_Arrow\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Down_Arrow\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"ExpanderLeftHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Border Padding=\"{TemplateBinding Padding}\" CornerRadius=\"2,2,2,2\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"1,1,1,1\">\r\n                        <Grid SnapsToDevicePixels=\"False\" Background=\"Transparent\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"19\" />\r\n                                <RowDefinition Height=\"*\" />\r\n                            </Grid.RowDefinitions>\r\n                            <Grid>\r\n                                <Grid.LayoutTransform>\r\n                                    <TransformGroup>\r\n                                        <TransformGroup.Children>\r\n                                            <TransformCollection>\r\n                                                <RotateTransform Angle=\"90\" />\r\n                                            </TransformCollection>\r\n                                        </TransformGroup.Children>\r\n                                    </TransformGroup>\r\n                                </Grid.LayoutTransform>\r\n                                <Rectangle Margin=\"2,2,2,2\" x:Name=\"Rectangle\" Fill=\"{DynamicResource NormalBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" />\r\n                                <Rectangle Margin=\"2,2,2,2\" x:Name=\"ShineRectangle\" Fill=\"{DynamicResource ShineBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" />\r\n                                <Rectangle Margin=\"2,2,2,2\" x:Name=\"HoverRectangle\" Fill=\"{DynamicResource HoverBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" />\r\n                                <Rectangle Margin=\"2,2,2,2\" x:Name=\"HoverShineRectangle\" Fill=\"{DynamicResource HoverShineBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" />\r\n                                <Rectangle Margin=\"2,2,2,2\" x:Name=\"PressedRectangle\" Fill=\"{DynamicResource PressedBrush}\" Stroke=\"{DynamicResource PressedBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" />\r\n                                <Path HorizontalAlignment=\"Center\" x:Name=\"Up_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 0 L 4 4 L 8 0 Z\" />\r\n                                <Path Visibility=\"Collapsed\" HorizontalAlignment=\"Center\" x:Name=\"Down_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 4 L 4 0 L 8 4 Z\" />\r\n                            </Grid>\r\n                            <ContentPresenter SnapsToDevicePixels=\"True\" HorizontalAlignment=\"Center\" Margin=\"4,4,2,0\" VerticalAlignment=\"Top\" Grid.Row=\"1\" RecognizesAccessKey=\"True\">\r\n                                <ContentPresenter.LayoutTransform>\r\n                                    <TransformGroup>\r\n                                        <TransformGroup.Children>\r\n                                            <TransformCollection>\r\n                                                <RotateTransform Angle=\"90\" />\r\n                                            </TransformCollection>\r\n                                        </TransformGroup.Children>\r\n                                    </TransformGroup>\r\n                                </ContentPresenter.LayoutTransform>\r\n                            </ContentPresenter>\r\n                        </Grid>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"Up_Arrow\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Down_Arrow\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style TargetType=\"{x:Type Expander}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Expander}\">\r\n                    <Border SnapsToDevicePixels=\"true\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"3\">\r\n                        <DockPanel x:Name=\"dockPanel\">\r\n                            <ToggleButton FontFamily=\"{TemplateBinding FontFamily}\" FontSize=\"{TemplateBinding FontSize}\" FontStretch=\"{TemplateBinding FontStretch}\" FontStyle=\"{TemplateBinding FontStyle}\" FontWeight=\"{TemplateBinding FontWeight}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\" FocusVisualStyle=\"{StaticResource ExpanderHeaderFocusVisual}\" Margin=\"1,1,1,0\" MinHeight=\"0\" MinWidth=\"0\" x:Name=\"HeaderSite\" Style=\"{StaticResource ExpanderDownHeaderStyle}\" Content=\"{TemplateBinding Header}\" ContentTemplate=\"{TemplateBinding HeaderTemplate}\" ContentTemplateSelector=\"{TemplateBinding HeaderTemplateSelector}\" IsChecked=\"{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" DockPanel.Dock=\"Top\" />\r\n                            <Border Visibility=\"Collapsed\" Background=\"{DynamicResource ShadeBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"1,0,1,1\" CornerRadius=\"3,3,3,3\" x:Name=\"border\" Margin=\"1,1,1,1\">\r\n                                <ContentPresenter Focusable=\"false\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"1,1,1,1\" x:Name=\"ExpandSite\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" DockPanel.Dock=\"Bottom\" />\r\n                            </Border>\r\n                        </DockPanel>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsExpanded\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"border\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Down\" />\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Right\">\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Right\" />\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Left\" />\r\n                            <Setter Property=\"Style\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderRightHeaderStyle}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Up\">\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Top\" />\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Bottom\" />\r\n                            <Setter Property=\"Style\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderUpHeaderStyle}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Left\">\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Left\" />\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Right\" />\r\n                            <Setter Property=\"Style\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderLeftHeaderStyle}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\n    <ControlTemplate x:Key=\"ComboBoxToggleButton\" TargetType=\"{x:Type ToggleButton}\">\r\n        <ControlTemplate.Resources>\r\n            <Storyboard x:Key=\"HoverOn\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"HoverOff\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n        </ControlTemplate.Resources>\r\n        <Grid x:Name=\"grid\">\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition />\r\n                <ColumnDefinition Width=\"20\" />\r\n            </Grid.ColumnDefinitions>\r\n            <Rectangle Grid.ColumnSpan=\"2\" HorizontalAlignment=\"Stretch\" x:Name=\"Rectangle\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" RadiusX=\"3\" RadiusY=\"3\" Fill=\"{DynamicResource LightBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" />\r\n            <Rectangle Grid.Column=\"0\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" RadiusX=\"3\" RadiusY=\"3\" Fill=\"{DynamicResource LightBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" />\r\n            <Border Margin=\"2,2,2,2\" Grid.Column=\"1\" Background=\"{DynamicResource NormalBrush}\" CornerRadius=\"3,3,3,3\" x:Name=\"border\" />\r\n            <Border Margin=\"2,2,2,2\" Background=\"{DynamicResource HoverBrush}\" CornerRadius=\"3,3,3,3\" x:Name=\"HoverBorder\" Grid.Column=\"1\" Opacity=\"0\" />\r\n            <Border Margin=\"2,2,2,2\" Background=\"{DynamicResource HoverShineBrush}\" CornerRadius=\"3,3,3,3\" x:Name=\"HoverShineBorder\" Grid.Column=\"1\" Opacity=\"0\" />\r\n            <Path Grid.Column=\"1\" HorizontalAlignment=\"Center\" x:Name=\"Arrow\" VerticalAlignment=\"Center\" Fill=\"{x:Null}\" Data=\"M0.5,0.5 L3,6.5 5.5,0.5\" Stroke=\"{DynamicResource GlyphBrush}\" Margin=\"5,0,5,0\" Height=\"7\" StrokeThickness=\"2\" Stretch=\"Fill\" />\r\n            <Border Margin=\"2,2,2,2\" Background=\"{DynamicResource ShineBrush}\" CornerRadius=\"3,3,3,3\" x:Name=\"ShineBorder\" Grid.Column=\"1\" />\r\n        </Grid>\r\n        <ControlTemplate.Triggers>\r\n            <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                <Trigger.ExitActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                </Trigger.ExitActions>\r\n                <Trigger.EnterActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                </Trigger.EnterActions>\r\n            </Trigger>\r\n            <Trigger Property=\"IsChecked\" Value=\"true\" />\r\n            <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                <Setter Property=\"Stroke\" TargetName=\"Arrow\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                <Setter Property=\"Background\" TargetName=\"border\" Value=\"{DynamicResource DisabledBorderBrush}\"/>\r\n                <Setter Property=\"Opacity\" TargetName=\"grid\" Value=\"0.8\"/>\r\n            </Trigger>\r\n        </ControlTemplate.Triggers>\r\n    </ControlTemplate>\n    <ControlTemplate x:Key=\"ComboBoxTextBox\" TargetType=\"{x:Type TextBox}\">\n        <Border x:Name=\"PART_ContentHost\" Focusable=\"False\" Background=\"{TemplateBinding Background}\" />\r\n        <ControlTemplate.Triggers>\r\n        </ControlTemplate.Triggers>\r\n    </ControlTemplate>\n    <Style TargetType=\"{x:Type ComboBox}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n<Setter Property=\"Template\" Value=\"{DynamicResource ComboBoxTemplate}\" />\r\n    </Style>\n    \n     <ControlTemplate x:Key=\"ComboBoxTemplate\" TargetType=\"{x:Type ComboBox}\">\r\n                    <Grid x:Name=\"grid\">\n                        <ToggleButton Grid.Column=\"2\" Template=\"{DynamicResource ComboBoxToggleButton}\" x:Name=\"ToggleButton\" Focusable=\"false\" IsChecked=\"{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" ClickMode=\"Press\" />\r\n                        <ContentPresenter HorizontalAlignment=\"Left\" Margin=\"3,3,23,3\" x:Name=\"ContentSite\" VerticalAlignment=\"Center\" Content=\"{TemplateBinding SelectionBoxItem}\" ContentTemplate=\"{TemplateBinding SelectionBoxItemTemplate}\" ContentTemplateSelector=\"{TemplateBinding ItemTemplateSelector}\" IsHitTestVisible=\"False\" />\n                        <TextBox Visibility=\"Hidden\" Template=\"{DynamicResource ComboBoxTextBox}\" HorizontalAlignment=\"Left\" Margin=\"3,3,23,3\" x:Name=\"PART_EditableTextBox\" Style=\"{x:Null}\" VerticalAlignment=\"Center\" Focusable=\"True\" Background=\"{DynamicResource LightBrush}\" IsReadOnly=\"{TemplateBinding IsReadOnly}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" Foreground=\"{DynamicResource TextBrush}\" />\n                        <Popup IsOpen=\"{TemplateBinding IsDropDownOpen}\" Placement=\"Bottom\" x:Name=\"Popup\" Focusable=\"False\" AllowsTransparency=\"True\" PopupAnimation=\"Slide\">\r\n                            <Grid MaxHeight=\"{TemplateBinding MaxDropDownHeight}\" MinWidth=\"{TemplateBinding ActualWidth}\" x:Name=\"DropDown\" SnapsToDevicePixels=\"True\">\r\n                                <Border x:Name=\"DropDownBorder\" Background=\"{DynamicResource ControlBackgroundBrush}\" CornerRadius=\"3,3,3,3\" />\r\n                                <ScrollViewer Margin=\"4,6,4,6\" Style=\"{DynamicResource NuclearScrollViewer}\" SnapsToDevicePixels=\"True\" HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Auto\" CanContentScroll=\"True\" Foreground=\"{DynamicResource {x:Static SystemColors.ActiveCaptionTextBrushKey}}\">\n                                    <StackPanel IsItemsHost=\"True\" KeyboardNavigation.DirectionalNavigation=\"Contained\" />\n                                </ScrollViewer>\r\n                            </Grid>\r\n                        </Popup>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\n                        <Trigger Property=\"HasItems\" Value=\"false\">\r\n                            <Setter Property=\"MinHeight\" Value=\"95\" TargetName=\"DropDownBorder\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                            <Setter Property=\"Opacity\" TargetName=\"grid\" Value=\"0.5\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                            <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"AllowsTransparency\" SourceName=\"Popup\" Value=\"true\">\r\n                            <Setter Property=\"Margin\" Value=\"0,2,0,0\" TargetName=\"DropDownBorder\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEditable\" Value=\"true\">\r\n                            <Setter Property=\"IsTabStop\" Value=\"false\" />\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"PART_EditableTextBox\" />\r\n                            <Setter Property=\"Visibility\" Value=\"Hidden\" TargetName=\"ContentSite\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\n    \n    <Style d:IsControlPart=\"True\" TargetType=\"{x:Type ComboBoxItem}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ComboBoxItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOn\">\r\n\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOff\">\r\n\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n\r\n                    </ControlTemplate.Resources>\r\n                    <Grid SnapsToDevicePixels=\"true\" Margin=\"1,1,1,1\">\r\n                        <Rectangle x:Name=\"Background\" IsHitTestVisible=\"False\" Opacity=\"0.25\" Fill=\"{StaticResource NormalBrush}\" RadiusX=\"1\" RadiusY=\"1\" />\r\n                        <Rectangle x:Name=\"HoverRectangle\" IsHitTestVisible=\"False\" Opacity=\"0\" Fill=\"{StaticResource NormalBrush}\" RadiusX=\"1\" RadiusY=\"1\" />\r\n                        <Rectangle x:Name=\"SelectedRectangle\" IsHitTestVisible=\"False\" Opacity=\"0\" Fill=\"{StaticResource SelectedBackgroundBrush}\" RadiusX=\"1\" RadiusY=\"1\" />\r\n                        <ContentPresenter Margin=\"5,2,0,2\" x:Name=\"contentPresenter\" VerticalAlignment=\"Center\" />\r\n                        <Rectangle x:Name=\"FocusVisualElement\" Visibility=\"Collapsed\" Stroke=\"{StaticResource HoverShineBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\n                        <Trigger Property=\"IsHighlighted\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOff}\" x:Name=\"SelectedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\" x:Name=\"SelectedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\n    <Style TargetType=\"{x:Type ProgressBar}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ProgressBar}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"ValueChangedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PART_Track\" Storyboard.TargetProperty=\"(UIElement.BitmapEffect).(OuterGlowBitmapEffect.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\" />\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"1\" />\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:02\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"IndeterminateOn\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"IndeterminateGradientFill\" Storyboard.TargetProperty=\"(Shape.Fill).(LinearGradientBrush.Transform).(TransformGroup.Children)[0].X\" RepeatBehavior=\"Forever\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0\" />\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:2.4\" Value=\"145\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\n                        <Border x:Name=\"PART_Track\" BorderBrush=\"{DynamicResource SolidBorderBrush}\" BorderThickness=\"1\" CornerRadius=\"0,0,0,0\" Background=\"{DynamicResource LightBrush}\">\r\n                            <Border.BitmapEffect>\r\n                                <OuterGlowBitmapEffect Opacity=\"0\" GlowColor=\"{DynamicResource WhiteColor}\" GlowSize=\"3\" />\r\n                            </Border.BitmapEffect>\r\n                        </Border>\n                        <Border HorizontalAlignment=\"Left\" x:Name=\"PART_Indicator\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"1\" CornerRadius=\"0,0,0,0\">\n                            <Border.Background>\r\n                                <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                    <GradientStop Color=\"#B2FFFFFF\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#C6FFFFFF\" Offset=\"0.15\" />\r\n                                    <GradientStop Color=\"#D1FFFFFF\" Offset=\"0.275\" />\r\n                                    <GradientStop Color=\"#C6FFFFFF\" Offset=\"0.4\" />\r\n                                    <GradientStop Color=\"#BFFFFFFF\" Offset=\"0.65\" />\r\n                                    <GradientStop Color=\"#A5FFFFFF\" Offset=\"0.75\" />\r\n                                    <GradientStop Color=\"#91FFFFFF\" Offset=\"0.85\" />\r\n                                    <GradientStop Color=\"#72FFFFFF\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Border.Background>\n                        </Border>\r\n                        <Grid x:Name=\"IndeterminateRoot\" Visibility=\"Collapsed\">\r\n                            <Rectangle Margin=\"{TemplateBinding BorderThickness}\" x:Name=\"IndeterminateSolidFill\" Opacity=\"1\" RenderTransformOrigin=\"0.5,0.5\" RadiusX=\"2\" RadiusY=\"2\" Fill=\"{DynamicResource ControlBackgroundBrush}\" Stroke=\"#FF448DCA\" StrokeThickness=\"0\" />\r\n                            <Rectangle Margin=\"{TemplateBinding BorderThickness}\" x:Name=\"IndeterminateGradientFill\" RadiusX=\"2\" RadiusY=\"2\" StrokeThickness=\"1\">\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush EndPoint=\"0.508,1.394\" StartPoint=\"0.401,-0.394\" SpreadMethod=\"Repeat\">\r\n                                        <GradientStop Color=\"#00FFFFFF\" />\r\n                                        <GradientStop Color=\"#FEA1A1A1\" Offset=\"1\" />\r\n                                        <GradientStop Color=\"#00FEFEFE\" Offset=\"0.517\" />\r\n                                        <GradientStop Color=\"#FEA1A1A1\" Offset=\"0.517\" />\r\n                                        <LinearGradientBrush.Transform>\r\n                                            <TransformGroup>\r\n                                                <TranslateTransform X=\"0\" />\r\n                                            </TransformGroup>\r\n                                        </LinearGradientBrush.Transform>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                        </Grid>\r\n                        <Border Background=\"{DynamicResource DisabledBackgroundBrush}\" Opacity=\"0\" BorderThickness=\"1,1,1,1\" BorderBrush=\"{DynamicResource DisabledBorderBrush}\" x:Name=\"border\"/>\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"border\" Value=\"0.8\"/>\r\n                        </Trigger>\r\n                        <EventTrigger RoutedEvent=\"RangeBase.ValueChanged\">\r\n                            <BeginStoryboard Storyboard=\"{StaticResource ValueChangedOn}\" />\r\n                        </EventTrigger>\r\n                        <Trigger Property=\"IsIndeterminate\" Value=\"True\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource IndeterminateOn}\" />\r\n                            </Trigger.EnterActions>\r\n                            <Setter Property=\"Visibility\" TargetName=\"IndeterminateRoot\" Value=\"Visible\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\n    <Style TargetType=\"{x:Type TextBox}\">\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\" />\r\n        <Setter Property=\"AllowDrop\" Value=\"true\" />\r\n<Setter Property=\"Template\" Value=\"{DynamicResource TextBoxTemplate}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource ControlBackgroundBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"#FF000000\"/>\r\n    </Style>\n    \n    <ControlTemplate x:Key=\"TextBoxTemplate\" TargetType=\"{x:Type TextBox}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.5\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Border x:Name=\"Border\" Opacity=\"1\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\" Background=\"{TemplateBinding Background}\">\r\n                            <Grid>\r\n                                <Border BorderThickness=\"1\">\r\n                                    <ScrollViewer Margin=\"0\" x:Name=\"PART_ContentHost\" Style=\"{DynamicResource NuclearScrollViewer}\" />\r\n                                </Border>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Border x:Name=\"HoverBorder\" IsHitTestVisible=\"False\" Opacity=\"0\" BorderBrush=\"{StaticResource GlyphBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\" />\r\n                        <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Opacity=\"0\" BorderBrush=\"{StaticResource HoverShineBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\" />\r\n\r\n\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" />\r\n                                <Condition Property=\"IsFocused\" Value=\"False\" />\r\n                            </MultiTrigger.Conditions>\r\n\r\n                        </MultiTrigger>\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Background\" TargetName=\"Border\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                            <Setter Property=\"BorderBrush\" TargetName=\"Border\" Value=\"{DynamicResource DisabledBorderBrush}\"/>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\n    \n    <Style TargetType=\"{x:Type PasswordBox}\">\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\" />\r\n        <Setter Property=\"AllowDrop\" Value=\"true\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type PasswordBox}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.5\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Border x:Name=\"Border\" Opacity=\"1\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\" Background=\"{TemplateBinding Background}\">\r\n                            <Grid>\r\n                                <Border BorderThickness=\"1\">\r\n                                    <ScrollViewer Margin=\"0\" x:Name=\"PART_ContentHost\" Style=\"{DynamicResource NuclearScrollViewer}\" />\r\n                                </Border>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Border x:Name=\"HoverBorder\" IsHitTestVisible=\"False\" Opacity=\"0\" BorderBrush=\"{StaticResource GlyphBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\" />\r\n                        <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Opacity=\"0\" BorderBrush=\"{StaticResource HoverShineBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\" />\r\n\r\n\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" />\r\n                                <Condition Property=\"IsFocused\" Value=\"False\" />\r\n                            </MultiTrigger.Conditions>\r\n\r\n                        </MultiTrigger>\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Background\" TargetName=\"Border\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                            <Setter Property=\"BorderBrush\" TargetName=\"Border\" Value=\"{DynamicResource DisabledBorderBrush}\"/>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource ControlBackgroundBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"#FF000000\"/>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type RichTextBox}\">\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\" />\r\n        <Setter Property=\"AllowDrop\" Value=\"true\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type RichTextBox}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.5\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Border x:Name=\"Border\" Opacity=\"1\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\" Background=\"{TemplateBinding Background}\">\r\n                            <Grid>\r\n                                <Border BorderThickness=\"1\">\r\n                                    <ScrollViewer Margin=\"0\" x:Name=\"PART_ContentHost\" Style=\"{DynamicResource NuclearScrollViewer}\" />\r\n                                </Border>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Border x:Name=\"HoverBorder\" IsHitTestVisible=\"False\" Opacity=\"0\" BorderBrush=\"{StaticResource GlyphBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\" />\r\n                        <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Opacity=\"0\" BorderBrush=\"{StaticResource HoverShineBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\" />\r\n\r\n\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" />\r\n                                <Condition Property=\"IsFocused\" Value=\"False\" />\r\n                            </MultiTrigger.Conditions>\r\n\r\n                        </MultiTrigger>\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Background\" TargetName=\"Border\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                            <Setter Property=\"BorderBrush\" TargetName=\"Border\" Value=\"{DynamicResource DisabledBorderBrush}\"/>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource ControlBackgroundBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"#FF000000\"/>\r\n    </Style>\r\n    <Style TargetType=\"{x:Type Label}\">\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Label}\">\r\n                    <Grid>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" RecognizesAccessKey=\"True\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\" />\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n    </Style>\n\n    <Style TargetType=\"{x:Type Menu}\">\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource ControlBackgroundBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\" />\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"True\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Menu}\">\r\n                    <Grid>\r\n                        <Border Margin=\"1\" x:Name=\"Border\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" />\r\n                        <StackPanel Background=\"{TemplateBinding Background}\" IsItemsHost=\"True\" ClipToBounds=\"True\" Orientation=\"Horizontal\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\" />\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DisabledBorderBrush}\" TargetName=\"Border\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\n    <DropShadowBitmapEffect x:Key=\"PopupDropShadow\" ShadowDepth=\"1.5\" Softness=\"0.15\" />\n    <Style TargetType=\"{x:Type MenuItem}\">\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\" />\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type MenuItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HighlightedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HightlightedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Border x:Name=\"Border\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"0,0,0,0\" Margin=\"3,2,3,2\">\r\n                        <Grid Margin=\"0,0,0,0\">\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition MinWidth=\"17\" Width=\"Auto\" SharedSizeGroup=\"MenuItemIconColumnGroup\" />\r\n                                <ColumnDefinition Width=\"*\" />\r\n                                <ColumnDefinition Width=\"Auto\" SharedSizeGroup=\"MenuItemIGTColumnGroup\" />\r\n                                <ColumnDefinition Width=\"14\" />\r\n                            </Grid.ColumnDefinitions>\n                            <Border Grid.Column=\"0\" Grid.ColumnSpan=\"4\" Background=\"{DynamicResource HoverBrush}\" Opacity=\"0\" x:Name=\"HoverBorder\" CornerRadius=\"1,1,1,1\"/>\r\n                            <Border Grid.ColumnSpan=\"4\" Background=\"{DynamicResource HoverShineBrush}\" Opacity=\"0\" x:Name=\"HoverShineBorder\" CornerRadius=\"1,1,1,1\"/>\n                            <ContentPresenter Margin=\"4,0,6,0\" x:Name=\"Icon\" VerticalAlignment=\"Center\" ContentSource=\"Icon\" />\n                            <Grid Visibility=\"Hidden\" Margin=\"4,0,6,0\" x:Name=\"GlyphPanel\" VerticalAlignment=\"Center\">\r\n                                <Path x:Name=\"GlyphPanelpath\" VerticalAlignment=\"Center\" Fill=\"{TemplateBinding Foreground}\" Data=\"M0,2 L0,4.8 L2.5,7.4 L7.1,2.8 L7.1,0 L2.5,4.6 z\" FlowDirection=\"LeftToRight\" />\r\n                            </Grid>\n                            <ContentPresenter Grid.Column=\"1\" x:Name=\"HeaderHost\" RecognizesAccessKey=\"True\" ContentSource=\"Header\" Margin=\"2,1,2,1\" />\n                            <Grid Grid.Column=\"3\" Margin=\"4,0,6,0\" x:Name=\"ArrowPanel\" VerticalAlignment=\"Center\">\r\n                                <Path x:Name=\"ArrowPanelPath\" VerticalAlignment=\"Center\" Fill=\"{TemplateBinding Foreground}\" Data=\"M0,0 L0,8 L4,4 z\" />\r\n                            </Grid>\n                            <Popup IsOpen=\"{Binding Path=IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Right\" x:Name=\"SubMenuPopup\" Focusable=\"false\" AllowsTransparency=\"true\" PopupAnimation=\"{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}\">\r\n                                <Grid x:Name=\"SubMenu\">\r\n                                    <Border x:Name=\"SubMenuBorder\" Background=\"{DynamicResource LightBrush}\" BorderThickness=\"1\" Opacity=\"0.8\">\r\n                                        <Border.BorderBrush>\r\n                                            <SolidColorBrush Color=\"{DynamicResource WhiteColor}\" />\r\n                                        </Border.BorderBrush>\r\n                                    </Border>\n                                    <StackPanel IsItemsHost=\"True\" KeyboardNavigation.DirectionalNavigation=\"Cycle\" />\r\n                                </Grid>\r\n                            </Popup>\n                        </Grid>\r\n                    </Border>\n                    <ControlTemplate.Triggers>\n                        <Trigger Property=\"Role\" Value=\"TopLevelHeader\">\r\n                            <Setter Property=\"Margin\" Value=\"0,1,0,1\" />\r\n                            <Setter Property=\"Padding\" Value=\"6,3,6,3\" />\r\n                            <Setter Property=\"Grid.IsSharedSizeScope\" Value=\"true\" />\r\n                            <Setter Property=\"Placement\" Value=\"Bottom\" TargetName=\"SubMenuPopup\" />\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ArrowPanel\" />\r\n                        </Trigger>\n                        <Trigger Property=\"Role\" Value=\"TopLevelItem\">\r\n                            <Setter Property=\"Margin\" Value=\"0,1,0,1\" />\r\n                            <Setter Property=\"Padding\" Value=\"6,3,6,3\" />\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ArrowPanel\" />\r\n                        </Trigger>\n                        <Trigger Property=\"Role\" Value=\"SubmenuHeader\">\r\n                            <Setter Property=\"DockPanel.Dock\" Value=\"Top\" />\r\n                            <Setter Property=\"Padding\" Value=\"0,2,0,2\" />\r\n                            <Setter Property=\"Grid.IsSharedSizeScope\" Value=\"true\" />\r\n                        </Trigger>\n                        <Trigger Property=\"Role\" Value=\"SubmenuItem\">\r\n                            <Setter Property=\"DockPanel.Dock\" Value=\"Top\" />\r\n                            <Setter Property=\"Padding\" Value=\"0,2,0,2\" />\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ArrowPanel\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsSuspendingPopupAnimation\" Value=\"true\">\r\n                            <Setter Property=\"PopupAnimation\" Value=\"None\" TargetName=\"SubMenuPopup\" />\r\n                        </Trigger>\n                        <Trigger Property=\"Icon\" Value=\"{x:Null}\">\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"Icon\" />\r\n                        </Trigger>\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"GlyphPanel\" />\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"Icon\" />\r\n                        </Trigger>\n                        <Trigger Property=\"AllowsTransparency\" SourceName=\"SubMenuPopup\" Value=\"true\">\r\n                            <Setter Property=\"Margin\" Value=\"0,0,3,3\" TargetName=\"SubMenu\" />\r\n                            <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" TargetName=\"SubMenu\" />\r\n                            <Setter Property=\"BitmapEffect\" Value=\"{DynamicResource PopupDropShadow}\" TargetName=\"SubMenuBorder\" />\r\n                        </Trigger>\n                        <Trigger Property=\"IsHighlighted\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HightlightedOff}\" x:Name=\"HightlightedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HighlightedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\n    <Style TargetType=\"{x:Type Separator}\">\r\n        <Setter Property=\"Height\" Value=\"1\" />\r\n        <Setter Property=\"Margin\" Value=\"0,2,0,2\" />\r\n        <Setter Property=\"Focusable\" Value=\"false\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Separator}\">\r\n                    <Border BorderBrush=\"{DynamicResource SolidBorderBrush}\" BorderThickness=\"1\" />\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\n    <Style TargetType=\"{x:Type TabControl}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TabControl}\">\r\n                    <Grid ClipToBounds=\"true\" SnapsToDevicePixels=\"true\" KeyboardNavigation.TabNavigation=\"Local\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition x:Name=\"ColumnDefinition0\" />\r\n                            <ColumnDefinition x:Name=\"ColumnDefinition1\" Width=\"0\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\" x:Name=\"RowDefinition0\" />\r\n                            <RowDefinition Height=\"*\" x:Name=\"RowDefinition1\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Border CornerRadius=\"2,2,0,0\" Background=\"{DynamicResource LightBrush}\" x:Name=\"border\">\r\n                            <TabPanel x:Name=\"HeaderPanel\" IsItemsHost=\"true\" Panel.ZIndex=\"1\" KeyboardNavigation.TabIndex=\"1\" RenderTransformOrigin=\"0.5,0.5\" Width=\"Auto\" Height=\"Auto\">\r\n                                <TabPanel.LayoutTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform Angle=\"0\" />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </TabPanel.LayoutTransform>\r\n                                <TabPanel.RenderTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </TabPanel.RenderTransform>\r\n\r\n                            </TabPanel>\r\n                        </Border>\r\n                        <Border x:Name=\"ContentPanel\" Grid.Column=\"0\" Grid.Row=\"1\" KeyboardNavigation.DirectionalNavigation=\"Contained\" KeyboardNavigation.TabIndex=\"2\" KeyboardNavigation.TabNavigation=\"Local\" Background=\"{DynamicResource ShadeBrush}\" CornerRadius=\"0,0,2,2\">\r\n                            <ContentPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" x:Name=\"PART_SelectedContentHost\" ContentSource=\"SelectedContent\" />\r\n                        </Border>\r\n                        <Border HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" BorderThickness=\"0,0,0,1\" CornerRadius=\"10,0,0,0\" Opacity=\"0.5\" Margin=\"2,0,2,0\" x:Name=\"border1\">\r\n                            <Border.LayoutTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform ScaleX=\"1\" ScaleY=\"1\"/>\r\n                                    <SkewTransform AngleX=\"0\" AngleY=\"0\"/>\r\n                                    <RotateTransform Angle=\"0\"/>\r\n                                    <TranslateTransform X=\"0\" Y=\"0\"/>\r\n                                </TransformGroup>\r\n                            </Border.LayoutTransform>\r\n                            <Border.BorderBrush>\r\n                                <SolidColorBrush Color=\"{DynamicResource BlackColor}\"/>\r\n                            </Border.BorderBrush>\r\n                        </Border>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Bottom\">\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition1\" Value=\"Auto\" />\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"border\" Value=\"1\"/>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"ContentPanel\" Value=\"2,2,0,0\"/>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"border\" Value=\"0,0,2,2\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Left\">\r\n\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"HeaderPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"ContentPanel\" Value=\"1\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition0\" Value=\"Auto\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition1\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition1\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"border\" Value=\"0\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"border\" Value=\"0,0,0,0\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"ContentPanel\" Value=\"0,0,0,0\"/>\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"border1\">\r\n                                <Setter.Value>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\"/>\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\"/>\r\n                                        <RotateTransform Angle=\"-90\"/>\r\n                                        <TranslateTransform X=\"0\" Y=\"0\"/>\r\n                                    </TransformGroup>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                            <Setter Property=\"Margin\" TargetName=\"border1\" Value=\"0,0,0,0\"/>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"border\" Value=\"0,2,2,0\"/>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"ContentPanel\" Value=\"0,2,2,0\"/>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Right\">\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"HeaderPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition1\" Value=\"Auto\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition1\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"border\" Value=\"1\"/>\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"border1\">\r\n                                <Setter.Value>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\"/>\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\"/>\r\n                                        <RotateTransform Angle=\"90\"/>\r\n                                        <TranslateTransform X=\"0\" Y=\"0\"/>\r\n                                    </TransformGroup>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"border1\" Value=\"1\"/>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"ContentPanel\" Value=\"2,0,0,2\"/>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"border\" Value=\"0,2,2,0\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style d:IsControlPart=\"True\" TargetType=\"{x:Type TabItem}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TabItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid x:Name=\"grid\" Margin=\"2,1,2,3\">\r\n                        <Grid.LayoutTransform>\r\n                            <TransformGroup>\r\n                                <ScaleTransform ScaleX=\"1\" ScaleY=\"1\"/>\r\n                                <SkewTransform AngleX=\"0\" AngleY=\"0\"/>\r\n                                <RotateTransform Angle=\"0\"/>\r\n                                <TranslateTransform X=\"0\" Y=\"0\"/>\r\n                            </TransformGroup>\r\n                        </Grid.LayoutTransform>\r\n                        <Border x:Name=\"border\" BorderBrush=\"{x:Null}\" CornerRadius=\"2,2,2,2\" Opacity=\"0.5\">\r\n                            <Border.Background>\r\n                                <LinearGradientBrush EndPoint=\"0.5,0.976\" StartPoint=\"0.5,0.039\">\r\n                                    <GradientStop Color=\"#7F595959\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#19FFFFFF\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <Border x:Name=\"SelectedBorder\" BorderBrush=\"{x:Null}\" CornerRadius=\"2,2,2,2\" Opacity=\"0\" Background=\"{DynamicResource SelectedBackgroundBrush}\"/>\r\n                        <Border x:Name=\"HoverBorder\" BorderBrush=\"{x:Null}\" CornerRadius=\"2,2,2,2\" Opacity=\"0\">\r\n                            <Border.Background>\r\n                                <LinearGradientBrush EndPoint=\"0.5,0.976\" StartPoint=\"0.5,0.039\">\r\n                                    <GradientStop Color=\"#7F595959\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#19FFFFFF\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <Grid>\r\n                            <ContentPresenter x:Name=\"ContentSite\" RecognizesAccessKey=\"True\" ContentSource=\"Header\" d:LayoutOverrides=\"Width, Height\" HorizontalAlignment=\"Center\" Margin=\"6,1,6,1\" VerticalAlignment=\"Center\" />\r\n                        </Grid>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Left\">\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"grid\">\r\n                                <Setter.Value>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform Angle=\"-90\" />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Right\">\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"grid\">\r\n                                <Setter.Value>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform Angle=\"90\" />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Bottom\">\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"ContentSite\">\r\n                                <Setter.Value>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform Angle=\"180\" />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"grid\">\r\n                                <Setter.Value>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\"/>\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\"/>\r\n                                        <RotateTransform Angle=\"180\"/>\r\n                                        <TranslateTransform X=\"0\" Y=\"0\"/>\r\n                                    </TransformGroup>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" />\r\n                                <Condition Property=\"Selector.IsSelected\" Value=\"False\" />\r\n                            </MultiTrigger.Conditions>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsSelected\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOff}\" x:Name=\"SelectedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\" x:Name=\"SelectedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Setter Property=\"Panel.ZIndex\" Value=\"100\" />\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" SourceName=\"grid\" />\r\n                                <Condition Property=\"Selector.IsSelected\" Value=\"True\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <Setter Property=\"Background\" TargetName=\"border\" Value=\"{DynamicResource SelectedBackgroundBrush}\" />\r\n                            <Setter Property=\"Opacity\" TargetName=\"border\" Value=\"0.9\" />\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                            <Setter Property=\"Background\" TargetName=\"border\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                            <Setter Property=\"Opacity\" TargetName=\"grid\" Value=\"0.3\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Style.Triggers>\r\n            <Trigger Property=\"Selector.IsSelected\" Value=\"True\">\r\n                <Setter Property=\"Foreground\" >\r\n                    <Setter.Value>\r\n                        <SolidColorBrush Color=\"{DynamicResource BlackColor}\"/>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Trigger>\r\n        </Style.Triggers>\r\n    </Style>\n    <Style x:Key=\"NuclearSliderThumb\" d:IsControlPart=\"True\" TargetType=\"{x:Type Thumb}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"Height\" Value=\"14\" />\r\n        <Setter Property=\"Width\" Value=\"14\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Border x:Name=\"Background\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" />\r\n                        <Border x:Name=\"HoverBorder\" Opacity=\"0\" Background=\"{StaticResource HoverBrush}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" />\r\n                        <Border x:Name=\"HoverShineBorder\" Opacity=\"0\" Background=\"{StaticResource HoverShineBrush}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" />\r\n                        <Border x:Name=\"PressedBorder\" Opacity=\"0\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" Background=\"{StaticResource PressedBrush}\" />\r\n                        <Border x:Name=\"ShineBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" Background=\"{StaticResource ShineBrush}\" Opacity=\"1\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsDragging\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Background\" TargetName=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1,1,1,1\"/>\r\n    </Style>\n    <Style TargetType=\"{x:Type Slider}\">\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Slider}\">\r\n                    <Grid x:Name=\"GridRoot\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\" />\r\n                            <RowDefinition Height=\"Auto\" MinHeight=\"{TemplateBinding MinHeight}\" />\r\n                            <RowDefinition Height=\"Auto\" />\r\n                        </Grid.RowDefinitions>\n                        <TickBar Visibility=\"Collapsed\" x:Name=\"TopTick\" Height=\"4\" SnapsToDevicePixels=\"True\" Placement=\"Top\" Fill=\"{DynamicResource GlyphBrush}\" />\r\n                        <Border Grid.Row=\"1\" Margin=\"0\" x:Name=\"Border\" Height=\"4\" CornerRadius=\"2\" Background=\"{DynamicResource LightBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"1,1,1,1\" />\n                        <Track Grid.Row=\"1\" x:Name=\"PART_Track\">\r\n                            <Track.Thumb>\r\n                                <Thumb Style=\"{DynamicResource NuclearSliderThumb}\" Background=\"{DynamicResource NormalBrush}\" Foreground=\"{x:Null}\" Width=\"20\" />\r\n                            </Track.Thumb>\r\n                            <Track.IncreaseRepeatButton>\r\n                                <RepeatButton Style=\"{DynamicResource NuclearScrollRepeatButtonStyle}\" Command=\"Slider.IncreaseLarge\" />\r\n                            </Track.IncreaseRepeatButton>\r\n                            <Track.DecreaseRepeatButton>\r\n                                <RepeatButton Style=\"{DynamicResource NuclearScrollRepeatButtonStyle}\" Command=\"Slider.DecreaseLarge\" />\r\n                            </Track.DecreaseRepeatButton>\r\n                        </Track>\n                        <TickBar Visibility=\"Collapsed\" Grid.Row=\"2\" x:Name=\"BottomTick\" Height=\"4\" SnapsToDevicePixels=\"True\" Placement=\"Bottom\" Fill=\"{TemplateBinding Foreground}\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"TickPlacement\" Value=\"TopLeft\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"TopTick\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"TickPlacement\" Value=\"BottomRight\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"BottomTick\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"TickPlacement\" Value=\"Both\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"TopTick\" />\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"BottomTick\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\" />\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DisabledBorderBrush}\" TargetName=\"Border\" />\r\n                        </Trigger>\n                        <Trigger Property=\"Orientation\" Value=\"Vertical\">\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"GridRoot\">\r\n                                <Setter.Value>\r\n                                    <RotateTransform Angle=\"-90\" />\r\n                                </Setter.Value>\r\n                            </Setter>\n                            <Setter TargetName=\"PART_Track\" Property=\"Orientation\" Value=\"Horizontal\" />\r\n                        </Trigger>\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\n    <Style TargetType=\"{x:Type TreeView}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TreeView}\">\r\n                    <Grid>\r\n                        <Border x:Name=\"Border\" Background=\"{DynamicResource ControlBackgroundBrush}\" BorderBrush=\"{x:Null}\" BorderThickness=\"1\" CornerRadius=\"3,3,3,3\">\r\n                            <ScrollViewer Style=\"{DynamicResource NuclearScrollViewer}\" Focusable=\"False\" Padding=\"4\" HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Auto\" CanContentScroll=\"False\" Foreground=\"{DynamicResource {x:Static SystemColors.ActiveCaptionTextBrushKey}}\">\r\n                                <ItemsPresenter />\r\n                            </ScrollViewer>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\n    <Style x:Key=\"NuclearTreeViewItemToggleButton\" d:IsControlPart=\"True\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Focusable\" Value=\"False\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <Grid Width=\"15\" Height=\"13\">\r\n                        <Path Visibility=\"Collapsed\" HorizontalAlignment=\"Left\" Margin=\"1,1,1,1\" x:Name=\"IsExpandedPath\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 4 L 8 4 L 4 8 Z\" />\r\n                        <Path HorizontalAlignment=\"Left\" Margin=\"1,1,1,1\" x:Name=\"ExpandPath\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 4 0 L 8 4 L 4 8 Z\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsChecked\" Value=\"True\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"IsExpandedPath\" />\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ExpandPath\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\n    <Style d:IsControlPart=\"True\" TargetType=\"{x:Type TreeViewItem}\">\r\n        <Style.Triggers>\r\n            <Trigger Property=\"IsSelected\" Value=\"True\">\r\n                <Setter Property=\"Foreground\">\r\n                    <Setter.Value>\r\n                        <SolidColorBrush Color=\"{DynamicResource BlackColor}\"/>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Trigger>\r\n        </Style.Triggers>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\" />\r\n        <Setter Property=\"Padding\" Value=\"1,0,0,0\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TreeViewItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectionBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectionBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition MinWidth=\"19\" Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"*\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\" />\r\n                            <RowDefinition />\r\n                        </Grid.RowDefinitions>\r\n                        <ToggleButton x:Name=\"Expander\" Style=\"{DynamicResource NuclearTreeViewItemToggleButton}\" IsChecked=\"{Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}\" ClickMode=\"Press\" Background=\"{x:Null}\" BorderBrush=\"{x:Null}\" Foreground=\"{x:Null}\" />\r\n                        <Border Grid.Column=\"1\" x:Name=\"Selection_Border\" BorderThickness=\"1,1,1,1\" CornerRadius=\"3,3,3,3\">\r\n                            <Grid Width=\"Auto\" Height=\"Auto\">\r\n                                <Border x:Name=\"MainBorder\" Opacity=\"0.25\" Background=\"{DynamicResource NormalBrush}\" CornerRadius=\"2,2,2,2\"/>\r\n                                <Border x:Name=\"SelectionBorder\" Opacity=\"0\" Background=\"{DynamicResource SelectedBackgroundBrush}\" CornerRadius=\"2,2,2,2\"/>\r\n                                <Border x:Name=\"HoverBorder\" Opacity=\"0\" Background=\"{DynamicResource NormalBrush}\" CornerRadius=\"2,2,2,2\"/>\r\n                                <ContentPresenter x:Name=\"PART_Header\" ContentSource=\"Header\" d:LayoutOverrides=\"Width\" Height=\"Auto\" Margin=\"2,0,2,0\" />\r\n                            </Grid>\r\n                        </Border>\r\n                        <ItemsPresenter Grid.Column=\"1\" Grid.ColumnSpan=\"2\" Grid.Row=\"1\" x:Name=\"ItemsHost\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsExpanded\" Value=\"false\">\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ItemsHost\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"HasItems\" Value=\"false\">\r\n                            <Setter Property=\"Visibility\" Value=\"Hidden\" TargetName=\"Expander\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsSelected\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOff}\" x:Name=\"SelectedOn_BeginStoryboard1\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\" x:Name=\"SelectedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsSelected\" Value=\"true\" />\r\n                                <Condition Property=\"IsSelectionActive\" Value=\"false\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}\" />\r\n                            <Setter Property=\"Background\" TargetName=\"Selection_Border\" Value=\"{DynamicResource SelectedBackgroundBrush}\" />\r\n                            <Setter Property=\"Opacity\" TargetName=\"Selection_Border\" Value=\"0.5\" />\r\n                            <Setter Property=\"BorderBrush\" TargetName=\"Selection_Border\" Value=\"{DynamicResource NormalBorderBrush}\" />\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                        </Trigger>\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" SourceName=\"Selection_Border\" Value=\"True\" />\r\n                                <Condition Property=\"IsSelected\" Value=\"False\" />\r\n                            </MultiTrigger.Conditions>\r\n                        </MultiTrigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsSelected\" Value=\"true\" />\r\n                                <Condition Property=\"IsMouseOver\" Value=\"true\" SourceName=\"Selection_Border\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <Setter Property=\"Background\" TargetName=\"Selection_Border\" Value=\"{DynamicResource SelectedBackgroundBrush}\" />\r\n                            <Setter Property=\"Opacity\" TargetName=\"Selection_Border\" Value=\"0.8\" />\r\n                            <Setter Property=\"BorderBrush\" TargetName=\"Selection_Border\" Value=\"{DynamicResource NormalBorderBrush}\" />\r\n                        </MultiTrigger>\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"ButtonFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Rectangle SnapsToDevicePixels=\"true\" Margin=\"2\" Stroke=\"Black\" StrokeDashArray=\"1 2\" StrokeThickness=\"1\" />\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <LinearGradientBrush x:Key=\"ButtonNormalBackground\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#F3F3F3\" Offset=\"0\" />\r\n        <GradientStop Color=\"#EBEBEB\" Offset=\"0.5\" />\r\n        <GradientStop Color=\"#DDDDDD\" Offset=\"0.5\" />\r\n        <GradientStop Color=\"#CDCDCD\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"ButtonNormalBorder\" Color=\"#FF707070\" />\r\n\r\n    <Style TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{StaticResource ButtonFocusVisual}\" />\r\n        <Setter Property=\"Background\" Value=\"{StaticResource ButtonNormalBackground}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource ButtonNormalBorder}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"Padding\" Value=\"1\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.5\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.5\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Pressed\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Pressed\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid x:Name=\"grid\">\r\n\r\n                        <Border x:Name=\"Border\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" CornerRadius=\"3,3,3,3\" />\r\n                        <Border x:Name=\"CheckedBorder\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\" Background=\"{DynamicResource SelectedBackgroundBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" CornerRadius=\"3,3,3,3\" Opacity=\"0\" />\n                        <Border x:Name=\"HoverBorder\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" CornerRadius=\"3,3,3,3\" Opacity=\"0\" Background=\"{DynamicResource HoverBrush}\" />\r\n                        <Border x:Name=\"HoverShineBorder\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" CornerRadius=\"3,3,3,3\" Opacity=\"0\" Background=\"{DynamicResource HoverShineBrush}\" />\r\n                        <Border x:Name=\"Pressed\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\" BorderBrush=\"{DynamicResource PressedBorderBrush}\" CornerRadius=\"3,3,3,3\" Opacity=\"0\" Background=\"{DynamicResource PressedBrush}\" />\r\n                        <Rectangle Opacity=\"1\" Stroke=\"{x:Null}\" RadiusX=\"3\" RadiusY=\"3\" Margin=\"2,2,2,2\" VerticalAlignment=\"Stretch\" Height=\"Auto\" x:Name=\"Shine\">\r\n                            <Rectangle.Fill>\r\n                                <LinearGradientBrush EndPoint=\"0.5,0.971\" StartPoint=\"0.5,0.042\">\r\n                                    <GradientStop Color=\"#26FFFFFF\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"1\" />\r\n                                    <GradientStop Color=\"#26FFFFFF\" Offset=\"0.467\" />\r\n                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"0.475\" />\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n\r\n                        <ContentPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" RecognizesAccessKey=\"True\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Margin=\"4,4,4,4\" />\r\n                    </Grid>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\"/>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOff}\" x:Name=\"CheckedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOn}\" x:Name=\"CheckedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"#ADADAD\" />\r\n                            <Setter Property=\"Background\" TargetName=\"Border\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                            <Setter Property=\"BorderBrush\" TargetName=\"Border\" Value=\"{DynamicResource DisabledBorderBrush}\"/>\r\n                            <Setter Property=\"Opacity\" TargetName=\"grid\" Value=\"0.5\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Style.Triggers>\r\n            <Trigger Property=\"IsChecked\" Value=\"True\">\r\n                <Setter Property=\"Foreground\">\r\n                    <Setter.Value>\r\n                        <SolidColorBrush Color=\"{DynamicResource BlackColor}\" />\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Trigger>\r\n        </Style.Triggers>\r\n    </Style>\r\n\r\n    <BorderGapMaskConverter x:Key=\"BorderGapMaskConverter\" />\r\n    <Style TargetType=\"{x:Type GroupBox}\">\r\n        <Setter Property=\"BorderBrush\" Value=\"#D5DFE5\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type GroupBox}\">\r\n                    <Grid SnapsToDevicePixels=\"true\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"6\" />\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"*\" />\r\n                            <ColumnDefinition Width=\"6\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\" />\r\n                            <RowDefinition Height=\"Auto\" />\r\n                            <RowDefinition Height=\"*\" />\r\n                            <RowDefinition Height=\"6\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Border Grid.ColumnSpan=\"4\" Grid.RowSpan=\"4\" Background=\"{DynamicResource LightBrush}\" CornerRadius=\"4,4,4,4\" BorderThickness=\"1,1,1,1\" />\r\n                        <Border Grid.ColumnSpan=\"4\" Grid.Row=\"1\" Grid.RowSpan=\"3\" BorderThickness=\"1,1,1,1\" CornerRadius=\"4\" BorderBrush=\"{DynamicResource NormalBorderBrush}\">\r\n                            <Border.OpacityMask>\r\n                                <MultiBinding Converter=\"{StaticResource BorderGapMaskConverter}\" ConverterParameter=\"7\">\r\n                                    <Binding Path=\"ActualWidth\" ElementName=\"Header\" />\r\n                                    <Binding Path=\"ActualWidth\" RelativeSource=\"{RelativeSource Self}\" />\r\n                                    <Binding Path=\"ActualHeight\" RelativeSource=\"{RelativeSource Self}\" />\r\n                                </MultiBinding>\r\n                            </Border.OpacityMask>\r\n                            <Border BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\">\r\n                                <Border.BorderBrush>\r\n                                    <SolidColorBrush Color=\"{DynamicResource MainColor}\" />\r\n                                </Border.BorderBrush>\r\n                                <Border BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\">\r\n                                    <Border.BorderBrush>\r\n                                        <SolidColorBrush Color=\"{DynamicResource MainColor}\" />\r\n                                    </Border.BorderBrush>\r\n                                </Border>\r\n                            </Border>\r\n                        </Border>\r\n                        <Border Grid.Column=\"0\" Grid.ColumnSpan=\"4\" Grid.Row=\"1\" Grid.RowSpan=\"3\" Background=\"{TemplateBinding Background}\" BorderBrush=\"Transparent\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"4\" />\r\n                        <Border Grid.ColumnSpan=\"4\" Grid.RowSpan=\"2\" Background=\"{DynamicResource NormalBrush}\" BorderThickness=\"1,1,1,0\" CornerRadius=\"2,2,0,0\" x:Name=\"Main\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" />\r\n                        <Rectangle Opacity=\"1\" Stroke=\"{x:Null}\" RadiusX=\"3\" RadiusY=\"3\" VerticalAlignment=\"Stretch\" Height=\"Auto\" x:Name=\"Shine\" Grid.ColumnSpan=\"4\" Grid.RowSpan=\"2\" Margin=\"1,1,1,1\">\r\n                            <Rectangle.Fill>\r\n                                <LinearGradientBrush EndPoint=\"0.5,0.971\" StartPoint=\"0.5,0.042\">\r\n                                    <GradientStop Color=\"#26FFFFFF\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"1\" />\r\n                                    <GradientStop Color=\"#26FFFFFF\" Offset=\"0.467\" />\r\n                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"0.475\" />\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n\r\n                        <Border x:Name=\"Header\" Grid.Column=\"1\" Grid.Row=\"0\" Grid.RowSpan=\"2\" Padding=\"3,1,3,0\">\r\n                            <ContentPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" ContentSource=\"Header\" RecognizesAccessKey=\"True\" Margin=\"0,4,0,4\" />\r\n                        </Border>\r\n\r\n                        <ContentPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Margin=\"{TemplateBinding Padding}\" Grid.Column=\"1\" Grid.ColumnSpan=\"2\" Grid.Row=\"2\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\">\r\n            <Setter.Value>\r\n                <SolidColorBrush Color=\"{DynamicResource WhiteColor}\" />\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <SolidColorBrush x:Key=\"ListBorder\" Color=\"#828790\" />\r\n    <Style x:Key=\"{x:Static GridView.GridViewScrollViewerStyleKey}\" TargetType=\"{x:Type ScrollViewer}\">\r\n        <Setter Property=\"Focusable\" Value=\"false\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ScrollViewer}\">\r\n                    <Grid SnapsToDevicePixels=\"true\" Background=\"{TemplateBinding Background}\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\" />\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"*\" />\r\n                            <RowDefinition Height=\"Auto\" />\r\n                        </Grid.RowDefinitions>\r\n                        <DockPanel Margin=\"{TemplateBinding Padding}\">\r\n                            <ScrollViewer Focusable=\"false\" DockPanel.Dock=\"Top\" HorizontalScrollBarVisibility=\"Hidden\" VerticalScrollBarVisibility=\"Hidden\">\r\n                                <GridViewHeaderRowPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Margin=\"2,0,2,0\" AllowsColumnReorder=\"{Binding Path=TemplatedParent.View.AllowsColumnReorder, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderContainerStyle=\"{Binding Path=TemplatedParent.View.ColumnHeaderContainerStyle, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderContextMenu=\"{Binding Path=TemplatedParent.View.ColumnHeaderContextMenu, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderTemplate=\"{Binding Path=TemplatedParent.View.ColumnHeaderTemplate, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderTemplateSelector=\"{Binding Path=TemplatedParent.View.ColumnHeaderTemplateSelector, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderToolTip=\"{Binding Path=TemplatedParent.View.ColumnHeaderToolTip, RelativeSource={RelativeSource TemplatedParent}}\" Columns=\"{Binding Path=TemplatedParent.View.Columns, RelativeSource={RelativeSource TemplatedParent}}\" />\r\n\r\n                            </ScrollViewer>\r\n                            <ScrollContentPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" x:Name=\"PART_ScrollContentPresenter\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" CanContentScroll=\"{TemplateBinding CanContentScroll}\" KeyboardNavigation.DirectionalNavigation=\"Local\" />\r\n                        </DockPanel>\r\n                        <ScrollBar Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Cursor=\"Arrow\" x:Name=\"PART_HorizontalScrollBar\" Grid.Row=\"1\" Orientation=\"Horizontal\" ViewportSize=\"{TemplateBinding ViewportWidth}\" Maximum=\"{TemplateBinding ScrollableWidth}\" Minimum=\"0.0\" Value=\"{Binding Path=HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" />\r\n                        <ScrollBar Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Cursor=\"Arrow\" x:Name=\"PART_VerticalScrollBar\" Grid.Column=\"1\" Orientation=\"Vertical\" ViewportSize=\"{TemplateBinding ViewportHeight}\" Maximum=\"{TemplateBinding ScrollableHeight}\" Minimum=\"0.0\" Value=\"{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" />\r\n                        <DockPanel Grid.Column=\"1\" Grid.Row=\"1\" Background=\"{Binding Path=Background, ElementName=PART_VerticalScrollBar}\" LastChildFill=\"false\">\r\n                            <Rectangle Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Width=\"1\" Fill=\"White\" DockPanel.Dock=\"Left\" />\r\n                            <Rectangle Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Height=\"1\" Fill=\"White\" DockPanel.Dock=\"Top\" />\r\n                        </DockPanel>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style TargetType=\"{x:Type ListView}\">\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource {x:Static SystemColors.WindowBrushKey}}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource ListBorder}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Foreground\" Value=\"#FF042271\" />\r\n        <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\" />\r\n        <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\" />\r\n        <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"true\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListView}\">\r\n                    <Border x:Name=\"Bd\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"0,0,0,0\" BorderBrush=\"{DynamicResource DefaultedBorderBrush}\" Background=\"{DynamicResource ControlBackgroundBrush}\">\r\n\r\n                        <ScrollViewer Padding=\"{TemplateBinding Padding}\" Style=\"{DynamicResource {x:Static GridView.GridViewScrollViewerStyleKey}}\">\r\n                            <ItemsPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" />\r\n                        </ScrollViewer>\r\n                    </Border>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                            <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Background\" TargetName=\"Bd\" Value=\"{DynamicResource {x:Static SystemColors.ControlBrushKey}}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"ListViewItemFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Rectangle Stroke=\"#8E6EA6F5\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" />\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type ListViewItem}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{StaticResource ListViewItemFocusVisual}\" />\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Margin\" Value=\"0,0,0,1\" />\r\n        <Setter Property=\"Padding\" Value=\"5,2,5,2\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListViewItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOn\">\r\n\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOff\">\r\n\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocussedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocussedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Border SnapsToDevicePixels=\"true\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\" x:Name=\"border\">\r\n\r\n                        <Grid Margin=\"2,0,2,0\">\r\n                            <Rectangle x:Name=\"Background\" IsHitTestVisible=\"False\" Opacity=\"0.25\" Fill=\"{StaticResource NormalBrush}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                            <Rectangle x:Name=\"HoverRectangle\" IsHitTestVisible=\"False\" Opacity=\"0\" Fill=\"{StaticResource NormalBrush}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                            <Rectangle x:Name=\"SelectedRectangle\" IsHitTestVisible=\"False\" Opacity=\"0\" Fill=\"{StaticResource SelectedBackgroundBrush}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                            <GridViewRowPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Margin=\"0,2,0,2\" VerticalAlignment=\"Stretch\" />\r\n                        </Grid>\r\n\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsSelected\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOff}\" x:Name=\"SelectedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\" x:Name=\"SelectedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" />\r\n                                <Condition Property=\"Selector.IsSelected\" Value=\"False\" />\r\n                            </MultiTrigger.Conditions>\r\n\r\n                        </MultiTrigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"Selector.IsSelected\" Value=\"True\" />\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" />\r\n                            </MultiTrigger.Conditions>\r\n\r\n                        </MultiTrigger>\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                            <Setter Property=\"Fill\" TargetName=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsSelected\" Value=\"true\" />\r\n                                <Condition Property=\"Selector.IsSelectionActive\" Value=\"false\" />\r\n                            </MultiTrigger.Conditions>\r\n\r\n\r\n                        </MultiTrigger>\r\n\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Style.Triggers>\r\n            <Trigger Property=\"Selector.IsSelected\" Value=\"True\">\r\n                <Setter Property=\"Foreground\">\r\n                    <Setter.Value>\r\n                        <SolidColorBrush Color=\"{DynamicResource BlackColor}\" />\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Trigger>\r\n        </Style.Triggers>\r\n    </Style>\r\n\r\n\r\n    <Style x:Key=\"GridViewColumnHeaderGripper\" TargetType=\"{x:Type Thumb}\">\r\n        <Setter Property=\"Canvas.Right\" Value=\"-8.5\" />\r\n        <Setter Property=\"Width\" Value=\"18\" />\r\n        <Setter Property=\"Height\" Value=\"{Binding Path=ActualHeight, RelativeSource={RelativeSource TemplatedParent}}\" />\r\n        <Setter Property=\"Padding\" Value=\"0,3,0,4\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource LightBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <Border Padding=\"{TemplateBinding Padding}\">\r\n                        <Rectangle HorizontalAlignment=\"Center\" Width=\"0.5\">\r\n                            <Rectangle.Fill>\r\n                                <SolidColorBrush Color=\"{DynamicResource WhiteColor}\" />\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"{x:Type GridViewColumnHeader}\" TargetType=\"{x:Type GridViewColumnHeader}\">\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource LightBrush}\" />\r\n        <Setter Property=\"Padding\" Value=\"2,0,2,0\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type GridViewColumnHeader}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverShineBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"PressedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid Margin=\"0,1,0,1\">\r\n                        <Grid>\r\n\r\n                            <Border x:Name=\"Main\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" CornerRadius=\"0,0,0,0\" />\n                            <Rectangle Opacity=\"1\" Stroke=\"{x:Null}\" RadiusX=\"0\" RadiusY=\"0\" VerticalAlignment=\"Stretch\" Height=\"Auto\" x:Name=\"Shine\" Fill=\"{DynamicResource ShineBrush}\"/>\r\n                            <Border x:Name=\"HoverBorder\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\" Background=\"{DynamicResource HoverBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" CornerRadius=\"0,0,0,0\" Opacity=\"0\" />\r\n                            <Border x:Name=\"HoverShineBorder\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\" Background=\"{DynamicResource HoverShineBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" CornerRadius=\"0,0,0,0\" Opacity=\"0\" />\r\n                            <Border x:Name=\"PressedBorder\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\" Background=\"{DynamicResource PressedBrush}\" BorderBrush=\"{DynamicResource PressedBorderBrush}\" CornerRadius=\"0,0,0,0\" Opacity=\"0\" />\r\n\r\n                            <Border BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\">\r\n                                <Border.BorderBrush>\r\n                                    <SolidColorBrush Color=\"{DynamicResource WhiteColor}\"/>\r\n                                </Border.BorderBrush>\r\n                                <ContentPresenter VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" RecognizesAccessKey=\"True\" Margin=\"2,2,2,2\" />\r\n                            </Border>\r\n                        </Grid>\r\n                        <Canvas>\r\n                            <Thumb x:Name=\"PART_HeaderGripper\" Style=\"{StaticResource GridViewColumnHeaderGripper}\" Margin=\"0,0,7,0\" Width=\"Auto\" HorizontalAlignment=\"Stretch\" />\r\n                        </Canvas>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"Height\" Value=\"Auto\">\r\n                            <Setter Property=\"MinHeight\" Value=\"20\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"Role\" Value=\"Padding\">\r\n                            <Setter TargetName=\"PART_HeaderGripper\" Property=\"Visibility\" Value=\"Collapsed\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"Role\" Value=\"Floating\">\r\n                            <Setter TargetName=\"PART_HeaderGripper\" Property=\"Visibility\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Background\" Value=\"Yellow\" />\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource MouseOverBrush}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Static ToolBar.ButtonStyleKey}\" TargetType=\"{x:Type Button}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource NuclearButtonFocusVisual}\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\" />\r\n        <Setter Property=\"Template\" Value=\"{DynamicResource ButtonTemplate}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n\t\t\t\t\t\t<Setter Property=\"FontSize\" Value=\"10\"/>\r\n\t\t\t\t<Setter Property=\"MinHeight\" Value=\"18\"/>\r\n\t\t\t\t<Setter Property=\"MinWidth\" Value=\"50\"/>\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Static ToolBar.CheckBoxStyleKey}\" TargetType=\"{x:Type CheckBox}\">\r\n\t\t\t<Setter Property=\"FontSize\" Value=\"10\"/>\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource CheckBoxFocusVisual}\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\" />\r\n        <Setter Property=\"Template\" Value=\"{DynamicResource CheckBoxTemplate}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n    </Style>\n\r\n    <Style x:Key=\"{x:Static ToolBar.RadioButtonStyleKey}\" TargetType=\"{x:Type RadioButton}\">\r\n\t\t\t<Setter Property=\"FontSize\" Value=\"10\"/>\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource RadioButtonFocusVisual}\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\" />\r\n        <Setter Property=\"Template\" Value=\"{DynamicResource RadioButtonTemplate}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Style.Triggers>\r\n            <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                <Setter Property=\"Foreground\">\r\n                    <Setter.Value>\r\n                        <SolidColorBrush Color=\"{DynamicResource TopGradientSelectColor}\" />\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Trigger>\r\n        </Style.Triggers>\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Static ToolBar.ComboBoxStyleKey}\" TargetType=\"{x:Type ComboBox}\">\r\n\t\t\t<Setter Property=\"FontSize\" Value=\"10\"/>\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"Template\" Value=\"{DynamicResource ComboBoxTemplate}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Static ToolBar.TextBoxStyleKey}\" TargetType=\"{x:Type TextBox}\">\r\n\t\t\t<Setter Property=\"FontSize\" Value=\"10\"/>\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\" />\r\n        <Setter Property=\"AllowDrop\" Value=\"true\" />\r\n<Setter Property=\"Template\" Value=\"{DynamicResource TextBoxTemplate}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource ControlBackgroundBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"#FF000000\"/>\r\n    </Style>\n\r\n\r\n    <LinearGradientBrush x:Key=\"ToolBarHorizontalBackground\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#FFFFFF\" Offset=\"0\"/>\r\n        <GradientStop Color=\"#FFFBFF\" Offset=\"0.5\"/>\r\n        <GradientStop Color=\"#F7F7F7\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"ToolBarToggleButtonHorizontalBackground\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#ECECEC\" Offset=\"0\"/>\r\n        <GradientStop Color=\"#DDDDDD\" Offset=\"0.5\"/>\r\n        <GradientStop Color=\"#A0A0A0\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"ToolBarButtonHover\" Color=\"{StaticResource MainColor}\" />\r\n    <SolidColorBrush x:Key=\"ToolBarGripper\" Color=\"#C6C3C6\"/>\r\n    <Style x:Key=\"ToolBarHorizontalOverflowButtonStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource ToolBarToggleButtonHorizontalBackground}\"/>\r\n        <Setter Property=\"MinHeight\" Value=\"0\"/>\r\n        <Setter Property=\"MinWidth\" Value=\"0\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <Border SnapsToDevicePixels=\"true\" x:Name=\"Bd\" CornerRadius=\"0,0,0,0\" Background=\"{DynamicResource LightBrush}\">\r\n                        <Canvas SnapsToDevicePixels=\"true\" HorizontalAlignment=\"Right\" Margin=\"7,2,2,2\" VerticalAlignment=\"Bottom\" Width=\"6\" Height=\"7\">\r\n                            <Path Stroke=\"White\" Data=\"M 1 1.5 L 6 1.5\"/>\r\n                            <Path Stroke=\"{TemplateBinding Foreground}\" Data=\"M 0 0.5 L 5 0.5\"/>\r\n                            <Path Fill=\"White\" Data=\"M 0.5 4 L 6.5 4 L 3.5 7 Z\"/>\r\n                            <Path Fill=\"{TemplateBinding Foreground}\" Data=\"M -0.5 3 L 5.5 3 L 2.5 6 Z\"/>\r\n                        </Canvas>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Setter Property=\"Background\" TargetName=\"Bd\" Value=\"{DynamicResource MouseOverBrush}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                            <Setter Property=\"Background\" TargetName=\"Bd\" Value=\"{StaticResource ToolBarButtonHover}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{StaticResource ToolBarGripper}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <SolidColorBrush x:Key=\"ToolBarSubMenuBackground\" Color=\"#FFFDFDFD\"/>\r\n    <SolidColorBrush x:Key=\"ToolBarMenuBorder\" Color=\"#FFFFFFFF\"/>\r\n    <Style x:Key=\"ToolBarThumbStyle\" TargetType=\"{x:Type Thumb}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <Border SnapsToDevicePixels=\"True\" Background=\"Transparent\" Padding=\"{TemplateBinding Padding}\" CornerRadius=\"0,0,0,0\">\r\n                        <Rectangle>\r\n                            <Rectangle.Fill>\r\n                                <DrawingBrush TileMode=\"Tile\" Viewbox=\"0,0,4,4\" ViewboxUnits=\"Absolute\" Viewport=\"0,0,4,4\" ViewportUnits=\"Absolute\">\r\n                                    <DrawingBrush.Drawing>\r\n                                        <DrawingGroup>\r\n                                            <GeometryDrawing Brush=\"White\" Geometry=\"M 1 1 L 1 3 L 3 3 L 3 1 z\"/>\r\n                                            <GeometryDrawing Brush=\"{StaticResource ToolBarGripper}\" Geometry=\"M 0 0 L 0 2 L 2 2 L 2 0 z\"/>\r\n                                        </DrawingGroup>\r\n                                    </DrawingBrush.Drawing>\r\n                                </DrawingBrush>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Setter Property=\"Cursor\" Value=\"SizeAll\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <LinearGradientBrush x:Key=\"ToolBarToggleButtonVerticalBackground\" EndPoint=\"1,0\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#ECECEC\" Offset=\"0\"/>\r\n        <GradientStop Color=\"#DDDDDD\" Offset=\"0.5\"/>\r\n        <GradientStop Color=\"#A0A0A0\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <Style x:Key=\"ToolBarVerticalOverflowButtonStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource ToolBarToggleButtonVerticalBackground}\"/>\r\n        <Setter Property=\"MinHeight\" Value=\"0\"/>\r\n        <Setter Property=\"MinWidth\" Value=\"0\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <Border SnapsToDevicePixels=\"true\" x:Name=\"Bd\" Background=\"{TemplateBinding Background}\" CornerRadius=\"0,0,3,3\">\r\n                        <Canvas SnapsToDevicePixels=\"true\" HorizontalAlignment=\"Right\" Margin=\"2,7,2,2\" VerticalAlignment=\"Bottom\" Width=\"7\" Height=\"6\">\r\n                            <Path Stroke=\"White\" Data=\"M 1.5 1 L 1.5 6\"/>\r\n                            <Path Stroke=\"{TemplateBinding Foreground}\" Data=\"M 0.5 0 L 0.5 5\"/>\r\n                            <Path Fill=\"White\" Data=\"M 3.5 0.5 L 7 3.5 L 4 6.5 Z\"/>\r\n                            <Path Fill=\"{TemplateBinding Foreground}\" Data=\"M 3 -0.5 L 6 2.5 L 3 5.5 Z\"/>\r\n                        </Canvas>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Setter Property=\"Background\" TargetName=\"Bd\" Value=\"{StaticResource ToolBarButtonHover}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                            <Setter Property=\"Background\" TargetName=\"Bd\" Value=\"{StaticResource ToolBarButtonHover}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{StaticResource ToolBarGripper}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <LinearGradientBrush x:Key=\"ToolBarVerticalBackground\" EndPoint=\"1,0\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#FFFFFF\" Offset=\"0\"/>\r\n        <GradientStop Color=\"#FFFBFF\" Offset=\"0.5\"/>\r\n        <GradientStop Color=\"#F7F7F7\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <Style TargetType=\"{x:Type ToolBar}\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource ToolBarHorizontalBackground}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToolBar}\">\r\n                    <Grid SnapsToDevicePixels=\"true\" Margin=\"3,1,1,1\" x:Name=\"Grid\">\r\n                        <Grid HorizontalAlignment=\"Right\" x:Name=\"OverflowGrid\">\r\n                            <ToggleButton IsEnabled=\"{TemplateBinding HasOverflowItems}\" FocusVisualStyle=\"{x:Null}\" x:Name=\"OverflowButton\" Style=\"{StaticResource ToolBarHorizontalOverflowButtonStyle}\" ClickMode=\"Press\" IsChecked=\"{Binding Path=IsOverflowOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\"/>\r\n                            <Popup Focusable=\"false\" AllowsTransparency=\"true\" IsOpen=\"{Binding Path=IsOverflowOpen, RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Bottom\" PopupAnimation=\"{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}\" StaysOpen=\"False\" x:Name=\"OverflowPopup\">\r\n                                <Border x:Name=\"Shdw\">\r\n                                    <Border BorderThickness=\"1,1,1,1\" Background=\"{DynamicResource LightBrush}\" BorderBrush=\"{DynamicResource LightBrush}\">\r\n                                        <ToolBarOverflowPanel Focusable=\"true\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" FocusVisualStyle=\"{x:Null}\" Margin=\"2\" x:Name=\"PART_ToolBarOverflowPanel\" WrapWidth=\"200\" KeyboardNavigation.DirectionalNavigation=\"Cycle\" KeyboardNavigation.TabNavigation=\"Cycle\"/>\r\n                                    </Border>\r\n                                </Border>\r\n                            </Popup>\r\n                        </Grid>\r\n                        <Border Margin=\"0,0,11,0\" x:Name=\"MainPanelBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"0,0,0,0\" Padding=\"{TemplateBinding Padding}\" Background=\"{DynamicResource NormalBorderBrush}\">\r\n                            <Grid>\r\n\r\n                                <DockPanel KeyboardNavigation.TabIndex=\"1\" KeyboardNavigation.TabNavigation=\"Local\">\r\n                                    <Thumb Padding=\"6,5,1,6\" Margin=\"-3,-1,0,0\" x:Name=\"ToolBarThumb\" Style=\"{StaticResource ToolBarThumbStyle}\" Width=\"10\"/>\r\n                                    <ContentPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" HorizontalAlignment=\"Center\" Margin=\"4,0,4,0\" x:Name=\"ToolBarHeader\" VerticalAlignment=\"Center\" ContentSource=\"Header\"/>\r\n                                    <ToolBarPanel SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Margin=\"0,1,2,2\" x:Name=\"PART_ToolBarPanel\" IsItemsHost=\"true\" Background=\"{DynamicResource NormalBrush}\"/>\r\n                                </DockPanel>\r\n                                <Rectangle IsHitTestVisible=\"False\" Opacity=\"0.15\" VerticalAlignment=\"Top\" Height=\"13.995\" Grid.ColumnSpan=\"1\" Margin=\"0,0,2,0\">\r\n                                    <Rectangle.Fill>\r\n                                        <SolidColorBrush Color=\"{DynamicResource WhiteColor}\"/>\r\n                                    </Rectangle.Fill>\r\n                                </Rectangle>\r\n                            </Grid>\r\n                        </Border>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsOverflowOpen\" Value=\"true\">\r\n                            <Setter Property=\"IsEnabled\" TargetName=\"ToolBarThumb\" Value=\"false\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"Header\" Value=\"{x:Null}\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"ToolBarHeader\" Value=\"Collapsed\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"ToolBarTray.IsLocked\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"ToolBarThumb\" Value=\"Collapsed\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"HasDropShadow\" SourceName=\"OverflowPopup\" Value=\"true\">\r\n                            <Setter Property=\"Margin\" TargetName=\"Shdw\" Value=\"0,0,5,5\"/>\r\n                            <Setter Property=\"SnapsToDevicePixels\" TargetName=\"Shdw\" Value=\"true\"/>\r\n                            <Setter Property=\"Background\" TargetName=\"Shdw\" Value=\"#71000000\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"Orientation\" Value=\"Vertical\">\r\n                            <Setter Property=\"Margin\" TargetName=\"Grid\" Value=\"1,3,1,1\"/>\r\n                            <Setter Property=\"Style\" TargetName=\"OverflowButton\" Value=\"{StaticResource ToolBarVerticalOverflowButtonStyle}\"/>\r\n                            <Setter Property=\"Height\" TargetName=\"ToolBarThumb\" Value=\"10\"/>\r\n                            <Setter Property=\"Width\" TargetName=\"ToolBarThumb\" Value=\"Auto\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"ToolBarThumb\" Value=\"-1,-3,0,0\"/>\r\n                            <Setter Property=\"Padding\" TargetName=\"ToolBarThumb\" Value=\"5,6,6,1\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"ToolBarHeader\" Value=\"0,0,0,4\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"PART_ToolBarPanel\" Value=\"1,0,2,2\"/>\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ToolBarThumb\" Value=\"Top\"/>\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ToolBarHeader\" Value=\"Top\"/>\r\n                            <Setter Property=\"HorizontalAlignment\" TargetName=\"OverflowGrid\" Value=\"Stretch\"/>\r\n                            <Setter Property=\"VerticalAlignment\" TargetName=\"OverflowGrid\" Value=\"Bottom\"/>\r\n                            <Setter Property=\"Placement\" TargetName=\"OverflowPopup\" Value=\"Right\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"MainPanelBorder\" Value=\"0,0,0,11\"/>\r\n                            <Setter Property=\"Background\" Value=\"{StaticResource ToolBarVerticalBackground}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n    </Style>\r\n\r\n</ResourceDictionary>\r\n\r\n\r\n\r\n\r\n"
  },
  {
    "path": "WpfToolkit/WPF.Themes/IG/IG.MSControls.Toolkit.Implicit.xaml",
    "content": "﻿<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" \r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" \r\n                    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\" \r\n                    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" \r\n                    xmlns:sys=\"clr-namespace:System;assembly=mscorlib\" \r\n                    xmlns:inputToolkit=\"clr-namespace:System.Windows.Controls;assembly=DotNetProjects.Input.Toolkit\" \r\n                    xmlns:layoutToolkit=\"clr-namespace:System.Windows.Controls;assembly=DotNetProjects.Layout.Toolkit\" \r\n                    xmlns:inputToolkitPrimitives=\"clr-namespace:System.Windows.Controls.Primitives;assembly=DotNetProjects.Input.Toolkit\" \r\n                    xmlns:layoutToolkitPrimitives=\"clr-namespace:System.Windows.Controls.Primitives;assembly=DotNetProjects.Layout.Toolkit\" \r\n                    mc:Ignorable=\"d\">\r\n\r\n\t<!-- *********************************  RESOURCES  ********************************* -->\r\n\t<ResourceDictionary.MergedDictionaries>\r\n\t\t<ResourceDictionary Source=\"Styles.WPF.xaml\" />\r\n\t</ResourceDictionary.MergedDictionaries>\r\n\r\n\t<!-- *********************************  BRUSHES  ********************************* -->\r\n\t<!-- RatingItem Brushes -->\r\n\t<LinearGradientBrush x:Key=\"RatingItemBackgroundBrush\" StartPoint=\"0.49,-0.02\" EndPoint=\"0.49,1.51\">\r\n\t\t<GradientStop Color=\"{StaticResource Color_007}\" Offset=\"0\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_011}\" Offset=\"0.99\" />\r\n\t</LinearGradientBrush>\r\n\t<SolidColorBrush x:Key=\"RatingItemBorderBrush\" Color=\"{StaticResource Color_008}\" />\r\n\t<LinearGradientBrush x:Key=\"RatingItemHoverBackgroundBrush\" StartPoint=\"0.49,-0.02\" EndPoint=\"0.49,1.51\">\r\n\t\t<GradientStop Color=\"{StaticResource Color_045}\" Offset=\"0\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_034}\" Offset=\"0.43\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_033}\" Offset=\"0.76\" />\r\n\t</LinearGradientBrush>\r\n\t<SolidColorBrush x:Key=\"RatingItemHoverBorderBrush\" Color=\"{StaticResource Color_045}\" />\r\n\t<LinearGradientBrush x:Key=\"RatingItemActiveBackgroundBrush\" StartPoint=\"0.49,-0.02\" EndPoint=\"0.49,1.51\">\r\n\t\t<GradientStop Color=\"{StaticResource Color_033}\" Offset=\"0.13\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_034}\" Offset=\"0.43\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_045}\" Offset=\"0.81\" />\r\n\t</LinearGradientBrush>\r\n\t<SolidColorBrush x:Key=\"RatingItemActiveBorderBrush\" Color=\"{StaticResource Color_034}\" />\r\n\t<LinearGradientBrush x:Key=\"RatingItemReadOnlyBackgroundBrush\" StartPoint=\"0.49,-0.02\" EndPoint=\"0.49,1.51\">\r\n\t\t<GradientStop Color=\"{StaticResource Color_033}\" Offset=\"0.13\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_034}\" Offset=\"0.81\" />\r\n\t</LinearGradientBrush>\r\n\t<SolidColorBrush x:Key=\"RatingItemReadOnlyBorderBrush\" Color=\"{StaticResource Color_033}\" />\r\n\t<LinearGradientBrush x:Key=\"RatingItemDisabledBackgroundBrush\" StartPoint=\"0.13,-0.12\" EndPoint=\"0.55,0.58\">\r\n\t\t<GradientStop Color=\"{StaticResource Color_008}\" Offset=\"0\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_011}\" Offset=\"0.99\" />\r\n\t</LinearGradientBrush>\r\n\t<SolidColorBrush x:Key=\"RatingItemDisabledBorderBrush\" Color=\"{StaticResource Color_008}\" />\r\n\r\n\t<!-- Rating Brushes -->\r\n\t<SolidColorBrush x:Key=\"RatingReadOnlyBackgroundBrush\" Color=\"{StaticResource Color_023}\" />\r\n\t<SolidColorBrush x:Key=\"RatingReadOnlyBorderBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"RatingDisabledBackgroundBrush\" Color=\"{StaticResource Color_003}\" />\r\n\t<SolidColorBrush x:Key=\"RatingDisabledBorderBrush\" Color=\"{StaticResource Color_024}\" />\r\n\r\n\t<!-- Accordion Brushes -->\r\n\t<SolidColorBrush x:Key=\"AccordionBorderBrush\" Color=\"{StaticResource Color_007}\" />\r\n\t<LinearGradientBrush x:Key=\"AccordionButtonBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n\t\t<GradientStop Color=\"{StaticResource Color_004}\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_002}\" Offset=\"1\" />\r\n\t</LinearGradientBrush>\r\n\t<SolidColorBrush x:Key=\"AccordionButtonBorderBrush\" Color=\"{StaticResource Color_002}\" />\r\n\t<LinearGradientBrush x:Key=\"AccordionButtonHoverBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n\t\t<GradientStop Color=\"{StaticResource Color_014}\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_016}\" Offset=\"1\" />\r\n\t</LinearGradientBrush>\r\n\t<SolidColorBrush x:Key=\"AccordionButtonHoverBorderBrush\" Color=\"{StaticResource Color_016}\" />\r\n\t<LinearGradientBrush x:Key=\"AccordionButtonPressedBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n\t\t<GradientStop Color=\"{StaticResource Color_014}\" Offset=\"1\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_016}\" />\r\n\t</LinearGradientBrush>\r\n\t<SolidColorBrush x:Key=\"AccordionButtonPressedBorderBrush\" Color=\"{StaticResource Color_016}\" />\r\n\t<LinearGradientBrush x:Key=\"AccordionButtonExpandedBackgroundBrush\" StartPoint=\"0.7,-0.0390625\" EndPoint=\"0.7,1\">\r\n\t\t<GradientStop Color=\"{StaticResource Color_011}\" Offset=\"0\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_009}\" Offset=\"1\" />\r\n\t</LinearGradientBrush>\r\n\t<SolidColorBrush x:Key=\"AccordionButtonExpandedBorderBrush\" Color=\"{StaticResource Color_014}\" />\r\n\t<SolidColorBrush x:Key=\"AccordionArrowBackgroundBrush\" Color=\"{StaticResource Color_011}\" />\r\n\t<LinearGradientBrush x:Key=\"AccordionArrowExpandedBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n\t\t<GradientStop Color=\"{StaticResource Color_014}\" Offset=\"1\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_016}\" />\r\n\t</LinearGradientBrush>\r\n\r\n\t<!--********************************** RatingItem Style **********************************-->\r\n\t<Style x:Key=\"RatingItemStyle\" TargetType=\"{x:Type inputToolkit:RatingItem}\">\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type inputToolkit:RatingItem}\">\r\n\t\t\t\t\t<Grid Background=\"{TemplateBinding Background}\" Width=\"20\" Margin=\"2 0\">\r\n\t\t\t\t\t\t<Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t<RowDefinition Height=\"20\" />\r\n\t\t\t\t\t\t\t<RowDefinition Height=\"Auto\" />\r\n\t\t\t\t\t\t</Grid.RowDefinitions>\r\n\t\t\t\t\t\t<Border BorderThickness=\"0\" Background=\"{StaticResource TransparentBrush}\" />\r\n\t\t\t\t\t\t<Rectangle Fill=\"{StaticResource TransparentBrush}\" Margin=\"-2 0\" />\r\n\t\t\t\t\t\t<Path x:Name=\"DefaultRatingItem\" Data=\"M 26.8,10.8 C26.7,10.5 26.4,10.2 26.1,10.2 26.1,10.2 18.2,9.0 18.2,9.0 18.2,9.0 14.7,1.5 14.7,1.5 14.6,1.2 14.3,1 13.9,1 13.6,1 13.2,1.2 13.1,1.5 13.1,1.5 9.6,9.0 9.6,9.0 9.6,9.0 1.7,10.2 1.7,10.2 1.4,10.2 1.1,10.5 1.0,10.8 0.9,11.2 1.0,11.5 1.2,11.8 1.2,11.8 6.9,17.6 6.9,17.6 6.9,17.6 5.6,25.8 5.6,25.8 5.5,26.2 5.6,26.6 5.9,26.8 6.2,27.0 6.6,27.0 6.9,26.8 6.9,26.8 13.9,23.0 13.9,23.0 13.9,23.0 20.9,26.8 20.9,26.8 21.1,26.9 21.2,26.9 21.4,26.9 21.5,26.9 21.7,26.9 21.9,26.8 22.2,26.6 22.3,26.2 22.3,25.8 22.3,25.8 20.9,17.6 20.9,17.6 20.9,17.6 26.6,11.8 26.6,11.8 26.8,11.5 26.9,11.2 26.8,10.8 z\" Opacity=\"1\" Stretch=\"Fill\" Fill=\"{StaticResource RatingItemBackgroundBrush}\" Stroke=\"{StaticResource RatingItemBorderBrush}\" StrokeThickness=\"0.4\" StrokeLineJoin=\"Round\" UseLayoutRounding=\"False\" VerticalAlignment=\"Stretch\" />\r\n\r\n\t\t\t\t\t\t<inputToolkitPrimitives:LinearClipper ExpandDirection=\"Right\" RatioVisible=\"{TemplateBinding DisplayValue}\">\r\n\t\t\t\t\t\t\t<Path Data=\"M 26.8,10.8 C26.7,10.5 26.4,10.2 26.1,10.2 26.1,10.2 18.2,9.0 18.2,9.0 18.2,9.0 14.7,1.5 14.7,1.5 14.6,1.2 14.3,1 13.9,1 13.6,1 13.2,1.2 13.1,1.5 13.1,1.5 9.6,9.0 9.6,9.0 9.6,9.0 1.7,10.2 1.7,10.2 1.4,10.2 1.1,10.5 1.0,10.8 0.9,11.2 1.0,11.5 1.2,11.8 1.2,11.8 6.9,17.6 6.9,17.6 6.9,17.6 5.6,25.8 5.6,25.8 5.5,26.2 5.6,26.6 5.9,26.8 6.2,27.0 6.6,27.0 6.9,26.8 6.9,26.8 13.9,23.0 13.9,23.0 13.9,23.0 20.9,26.8 20.9,26.8 21.1,26.9 21.2,26.9 21.4,26.9 21.5,26.9 21.7,26.9 21.9,26.8 22.2,26.6 22.3,26.2 22.3,25.8 22.3,25.8 20.9,17.6 20.9,17.6 20.9,17.6 26.6,11.8 26.6,11.8 26.8,11.5 26.9,11.2 26.8,10.8 z\" Fill=\"{TemplateBinding Foreground}\" Opacity=\"1\" Stretch=\"Fill\" Stroke=\"{x:Null}\" StrokeLineJoin=\"Round\" UseLayoutRounding=\"False\" VerticalAlignment=\"Stretch\" />\r\n\t\t\t\t\t\t</inputToolkitPrimitives:LinearClipper>\r\n\r\n\t\t\t\t\t\t<Path x:Name=\"MouseOverRatingItem\" Data=\"M 26.8,10.8 C26.7,10.5 26.4,10.2 26.1,10.2 26.1,10.2 18.2,9.0 18.2,9.0 18.2,9.0 14.7,1.5 14.7,1.5 14.6,1.2 14.3,1 13.9,1 13.6,1 13.2,1.2 13.1,1.5 13.1,1.5 9.6,9.0 9.6,9.0 9.6,9.0 1.7,10.2 1.7,10.2 1.4,10.2 1.1,10.5 1.0,10.8 0.9,11.2 1.0,11.5 1.2,11.8 1.2,11.8 6.9,17.6 6.9,17.6 6.9,17.6 5.6,25.8 5.6,25.8 5.5,26.2 5.6,26.6 5.9,26.8 6.2,27.0 6.6,27.0 6.9,26.8 6.9,26.8 13.9,23.0 13.9,23.0 13.9,23.0 20.9,26.8 20.9,26.8 21.1,26.9 21.2,26.9 21.4,26.9 21.5,26.9 21.7,26.9 21.9,26.8 22.2,26.6 22.3,26.2 22.3,25.8 22.3,25.8 20.9,17.6 20.9,17.6 20.9,17.6 26.6,11.8 26.6,11.8 26.8,11.5 26.9,11.2 26.8,10.8 z\" Fill=\"{StaticResource RatingItemHoverBackgroundBrush}\" Opacity=\"0\" Stretch=\"Fill\" Stroke=\"{StaticResource RatingItemHoverBorderBrush}\" StrokeThickness=\"0.4\" StrokeLineJoin=\"Round\" UseLayoutRounding=\"False\" VerticalAlignment=\"Stretch\" />\r\n\r\n\t\t\t\t\t\t<Path x:Name=\"PressedRatingItem\" Data=\"M 26.8,10.8 C26.7,10.5 26.4,10.2 26.1,10.2 26.1,10.2 18.2,9.0 18.2,9.0 18.2,9.0 14.7,1.5 14.7,1.5 14.6,1.2 14.3,1 13.9,1 13.6,1 13.2,1.2 13.1,1.5 13.1,1.5 9.6,9.0 9.6,9.0 9.6,9.0 1.7,10.2 1.7,10.2 1.4,10.2 1.1,10.5 1.0,10.8 0.9,11.2 1.0,11.5 1.2,11.8 1.2,11.8 6.9,17.6 6.9,17.6 6.9,17.6 5.6,25.8 5.6,25.8 5.5,26.2 5.6,26.6 5.9,26.8 6.2,27.0 6.6,27.0 6.9,26.8 6.9,26.8 13.9,23.0 13.9,23.0 13.9,23.0 20.9,26.8 20.9,26.8 21.1,26.9 21.2,26.9 21.4,26.9 21.5,26.9 21.7,26.9 21.9,26.8 22.2,26.6 22.3,26.2 22.3,25.8 22.3,25.8 20.9,17.6 20.9,17.6 20.9,17.6 26.6,11.8 26.6,11.8 26.8,11.5 26.9,11.2 26.8,10.8 z\" Fill=\"{StaticResource RatingItemActiveBackgroundBrush}\" Opacity=\"0\" Stretch=\"Fill\" Stroke=\"{StaticResource RatingItemActiveBorderBrush}\" StrokeLineJoin=\"Round\" UseLayoutRounding=\"False\" VerticalAlignment=\"Stretch\" />\r\n\r\n\t\t\t\t\t\t<Path x:Name=\"ReadOnlyRatingItem\" Data=\"M 26.8,10.8 C26.7,10.5 26.4,10.2 26.1,10.2 26.1,10.2 18.2,9.0 18.2,9.0 18.2,9.0 14.7,1.5 14.7,1.5 14.6,1.2 14.3,1 13.9,1 13.6,1 13.2,1.2 13.1,1.5 13.1,1.5 9.6,9.0 9.6,9.0 9.6,9.0 1.7,10.2 1.7,10.2 1.4,10.2 1.1,10.5 1.0,10.8 0.9,11.2 1.0,11.5 1.2,11.8 1.2,11.8 6.9,17.6 6.9,17.6 6.9,17.6 5.6,25.8 5.6,25.8 5.5,26.2 5.6,26.6 5.9,26.8 6.2,27.0 6.6,27.0 6.9,26.8 6.9,26.8 13.9,23.0 13.9,23.0 13.9,23.0 20.9,26.8 20.9,26.8 21.1,26.9 21.2,26.9 21.4,26.9 21.5,26.9 21.7,26.9 21.9,26.8 22.2,26.6 22.3,26.2 22.3,25.8 22.3,25.8 20.9,17.6 20.9,17.6 20.9,17.6 26.6,11.8 26.6,11.8 26.8,11.5 26.9,11.2 26.8,10.8 z\" Fill=\"{StaticResource RatingItemReadOnlyBackgroundBrush}\" IsHitTestVisible=\"False\" Opacity=\"0\" Stretch=\"Fill\" Stroke=\"{StaticResource RatingItemReadOnlyBorderBrush}\" StrokeThickness=\"0.4\" StrokeLineJoin=\"Round\" UseLayoutRounding=\"False\" VerticalAlignment=\"Stretch\" />\r\n\r\n\t\t\t\t\t\t<Path x:Name=\"DisabledRatingItemBackground\" Data=\"M 26.8,10.8 C26.7,10.5 26.4,10.2 26.1,10.2 26.1,10.2 18.2,9.0 18.2,9.0 18.2,9.0 14.7,1.5 14.7,1.5 14.6,1.2 14.3,1 13.9,1 13.6,1 13.2,1.2 13.1,1.5 13.1,1.5 9.6,9.0 9.6,9.0 9.6,9.0 1.7,10.2 1.7,10.2 1.4,10.2 1.1,10.5 1.0,10.8 0.9,11.2 1.0,11.5 1.2,11.8 1.2,11.8 6.9,17.6 6.9,17.6 6.9,17.6 5.6,25.8 5.6,25.8 5.5,26.2 5.6,26.6 5.9,26.8 6.2,27.0 6.6,27.0 6.9,26.8 6.9,26.8 13.9,23.0 13.9,23.0 13.9,23.0 20.9,26.8 20.9,26.8 21.1,26.9 21.2,26.9 21.4,26.9 21.5,26.9 21.7,26.9 21.9,26.8 22.2,26.6 22.3,26.2 22.3,25.8 22.3,25.8 20.9,17.6 20.9,17.6 20.9,17.6 26.6,11.8 26.6,11.8 26.8,11.5 26.9,11.2 26.8,10.8 z\" Fill=\"{StaticResource RatingItemDisabledBackgroundBrush}\" Opacity=\"0\" Stretch=\"Fill\" Stroke=\"{StaticResource RatingItemDisabledBorderBrush}\" StrokeLineJoin=\"Round\" UseLayoutRounding=\"False\" VerticalAlignment=\"Stretch\" />\r\n\r\n\t\t\t\t\t\t<inputToolkitPrimitives:LinearClipper x:Name=\"DisabledRatingItem\" ExpandDirection=\"Right\" Opacity=\"0\" RatioVisible=\"{TemplateBinding DisplayValue}\">\r\n\t\t\t\t\t\t\t<Path Data=\"M 26.8,10.8 C26.7,10.5 26.4,10.2 26.1,10.2 26.1,10.2 18.2,9.0 18.2,9.0 18.2,9.0 14.7,1.5 14.7,1.5 14.6,1.2 14.3,1 13.9,1 13.6,1 13.2,1.2 13.1,1.5 13.1,1.5 9.6,9.0 9.6,9.0 9.6,9.0 1.7,10.2 1.7,10.2 1.4,10.2 1.1,10.5 1.0,10.8 0.9,11.2 1.0,11.5 1.2,11.8 1.2,11.8 6.9,17.6 6.9,17.6 6.9,17.6 5.6,25.8 5.6,25.8 5.5,26.2 5.6,26.6 5.9,26.8 6.2,27.0 6.6,27.0 6.9,26.8 6.9,26.8 13.9,23.0 13.9,23.0 13.9,23.0 20.9,26.8 20.9,26.8 21.1,26.9 21.2,26.9 21.4,26.9 21.5,26.9 21.7,26.9 21.9,26.8 22.2,26.6 22.3,26.2 22.3,25.8 22.3,25.8 20.9,17.6 20.9,17.6 20.9,17.6 26.6,11.8 26.6,11.8 26.8,11.5 26.9,11.2 26.8,10.8 z\" Fill=\"{StaticResource RatingItemDisabledBackgroundBrush}\" Opacity=\"1\" Stretch=\"Fill\" Stroke=\"{StaticResource RatingItemDisabledBorderBrush}\" StrokeLineJoin=\"Round\" UseLayoutRounding=\"False\" VerticalAlignment=\"Stretch\" />\r\n\t\t\t\t\t\t</inputToolkitPrimitives:LinearClipper>\r\n\t\t\t\t\t\t<ContentPresenter x:Name=\"Content\" Cursor=\"{TemplateBinding Cursor}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" HorizontalAlignment=\"Left\" Margin=\"{TemplateBinding Padding}\" Grid.Row=\"1\" Grid.RowSpan=\"2\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Opacity\" Value=\"1\" TargetName=\"MouseOverRatingItem\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsPressed\" Value=\"True\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Opacity\" Value=\"1\" TargetName=\"PressedRatingItem\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsEnabled\" Value=\"False\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Opacity\" Value=\"1\" TargetName=\"DisabledRatingItem\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Opacity\" Value=\"1\" TargetName=\"DisabledRatingItemBackground\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsReadOnly\" Value=\"True\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Opacity\" Value=\"0.7\" TargetName=\"ReadOnlyRatingItem\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- ********************************** Rating Style **********************************-->\r\n\t<Style x:Key=\"RatingStyle\" TargetType=\"{x:Type inputToolkit:Rating}\">\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource RatingItemActiveBackgroundBrush}\" />\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource TransparentBrush}\" />\r\n\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource TransparentBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"0\" />\r\n\t\t<Setter Property=\"ItemContainerStyle\" Value=\"{StaticResource RatingItemStyle}\" />\r\n\t\t<Setter Property=\"ItemsPanel\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ItemsPanelTemplate>\r\n\t\t\t\t\t<StackPanel IsItemsHost=\"True\" Orientation=\"Horizontal\" />\r\n\t\t\t\t</ItemsPanelTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type inputToolkit:Rating}\">\r\n\t\t\t\t\t<Grid x:Name=\"Root\">\r\n\t\t\t\t\t\t<Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\">\r\n\t\t\t\t\t\t\t<ItemsPresenter />\r\n\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t\t<Border x:Name=\"ReadOnlyVisualElement\" BorderBrush=\"{StaticResource RatingReadOnlyBorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{StaticResource RatingReadOnlyBackgroundBrush}\" IsHitTestVisible=\"False\" Opacity=\"0\" />\r\n\t\t\t\t\t\t<Border x:Name=\"DisabledVisualElement\" BorderBrush=\"{StaticResource RatingDisabledBorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{StaticResource RatingDisabledBackgroundBrush}\" IsHitTestVisible=\"False\" Opacity=\"0\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" RadiusY=\"1\" RadiusX=\"1\" StrokeThickness=\"1\" Visibility=\"Collapsed\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"IsReadOnly\" Value=\"True\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Opacity\" Value=\"0.03\" TargetName=\"ReadOnlyVisualElement\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  AccordionButton Style  ********************************* -->\r\n\t<Style x:Key=\"AccordionButtonStyle\" TargetType=\"layoutToolkitPrimitives:AccordionButton\">\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ThemeLightForegroundBrush}\" />\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource AccordionButtonBackgroundBrush}\" />\r\n\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource AccordionButtonBorderBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"HorizontalAlignment\" Value=\"Stretch\" />\r\n\t\t<Setter Property=\"VerticalAlignment\" Value=\"Stretch\" />\r\n\t\t<Setter Property=\"HorizontalContentAlignment\" Value=\"Center\" />\r\n\t\t<Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n\t\t<Setter Property=\"IsTabStop\" Value=\"True\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"layoutToolkitPrimitives:AccordionButton\">\r\n\t\t\t\t\t<Grid Background=\"{StaticResource TransparentBrush}\" Margin=\"{TemplateBinding Padding}\">\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"ExpandDirectionStates\">\r\n\t\t\t\t\t\t\t\t<VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0\" />\r\n\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"ExpandDown\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"icon\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>0</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"icon\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>0</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>0</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>Auto</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"cd1\" Storyboard.TargetProperty=\"Width\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>*</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation BeginTime=\"00:00:00\" Duration=\"00:00:00\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)\" To=\"-90\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"ExpandUp\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"icon\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"icon\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>0</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>*</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"cd1\" Storyboard.TargetProperty=\"Width\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>Auto</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation BeginTime=\"00:00:00\" Duration=\"00:00:00\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)\" To=\"90\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"ExpandLeft\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"icon\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"icon\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>0</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>Auto</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"rd1\" Storyboard.TargetProperty=\"Height\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>*</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"LayoutTransform\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<RotateTransform Angle=\"90\" />\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation BeginTime=\"00:00:00\" Duration=\"00:00:00\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)\" To=\"0\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"ExpandRight\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"icon\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>0</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"icon\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>0</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>0</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>*</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"rd1\" Storyboard.TargetProperty=\"Height\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>Auto</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"LayoutTransform\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<RotateTransform Angle=\"-90\" />\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation BeginTime=\"00:00:00\" Duration=\"00:00:00\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)\" To=\"180\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"ExpansionStates\">\r\n\t\t\t\t\t\t\t\t<VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0\" />\r\n\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Collapsed\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation BeginTime=\"00:00:00\" Duration=\"00:00:00.3\" To=\"0\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)\" Storyboard.TargetName=\"icon\" />\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Foreground)\" Storyboard.TargetName=\"contentControl\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ThemeLightForegroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Expanded\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation BeginTime=\"00:00:00\" Duration=\"00:00:00.3\" To=\"90\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)\" Storyboard.TargetName=\"icon\" />\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Path.Fill)\" Storyboard.TargetName=\"arrow\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource AccordionArrowExpandedBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Foreground)\" Storyboard.TargetName=\"contentControl\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ThemeForegroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"ExpandedBackground\">\r\n\t\t\t\t\t\t\t\t\t\t\t<SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CheckStates\">\r\n\t\t\t\t\t\t\t\t<VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"00:00:00\" />\r\n\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Checked\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unchecked\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0\" />\r\n\t\t\t\t\t\t\t\t\t<VisualTransition From=\"MouseOver\" GeneratedDuration=\"00:00:00.1\" To=\"Normal\" />\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\" />\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\" />\r\n\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"MouseOverBackground\">\r\n\t\t\t\t\t\t\t\t\t\t\t<SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Pressed\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"PressedBackground\">\r\n\t\t\t\t\t\t\t\t\t\t\t<SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard />\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"FocusStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Focused1\">\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unfocused\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Border>\r\n\t\t\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t\t\t<Border x:Name=\"Background\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Height=\"Auto\" Margin=\"0\" VerticalAlignment=\"Stretch\" />\r\n\t\t\t\t\t\t\t\t<Border x:Name=\"ExpandedBackground\" BorderBrush=\"{StaticResource AccordionButtonExpandedBorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{StaticResource AccordionButtonExpandedBackgroundBrush}\" Height=\"Auto\" Margin=\"0\" Opacity=\"0\" VerticalAlignment=\"Stretch\" />\r\n\t\t\t\t\t\t\t\t<Border x:Name=\"MouseOverBackground\" BorderBrush=\"{StaticResource AccordionButtonHoverBorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{StaticResource AccordionButtonHoverBackgroundBrush}\" Height=\"Auto\" Margin=\"0\" Opacity=\"0\" VerticalAlignment=\"Stretch\" />\r\n\t\t\t\t\t\t\t\t<Border x:Name=\"PressedBackground\" BorderBrush=\"{StaticResource AccordionButtonPressedBorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{StaticResource AccordionButtonPressedBackgroundBrush}\" Height=\"Auto\" Margin=\"0\" Opacity=\"0\" VerticalAlignment=\"Stretch\" />\r\n\t\t\t\t\t\t\t\t<Grid Background=\"{StaticResource TransparentBrush}\">\r\n\t\t\t\t\t\t\t\t\t<Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"Auto\" x:Name=\"cd0\" />\r\n\t\t\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"Auto\" x:Name=\"cd1\" />\r\n\t\t\t\t\t\t\t\t\t</Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t\t\t<Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t\t\t\t<RowDefinition Height=\"Auto\" x:Name=\"rd0\" />\r\n\t\t\t\t\t\t\t\t\t\t<RowDefinition Height=\"Auto\" x:Name=\"rd1\" />\r\n\t\t\t\t\t\t\t\t\t</Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t\t\t<Grid x:Name=\"icon\" Grid.Column=\"0\" HorizontalAlignment=\"Center\" Height=\"19\" Grid.Row=\"0\" RenderTransformOrigin=\"0.5,0.5\" VerticalAlignment=\"Center\" Width=\"19\">\r\n\t\t\t\t\t\t\t\t\t\t<Grid.RenderTransform>\r\n\t\t\t\t\t\t\t\t\t\t\t<TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<ScaleTransform />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<SkewTransform />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<RotateTransform Angle=\"-90\" />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<TranslateTransform />\r\n\t\t\t\t\t\t\t\t\t\t\t</TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t</Grid.RenderTransform>\r\n\t\t\t\t\t\t\t\t\t\t<Path x:Name=\"arrow\" Data=\"F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z\" Stretch=\"Uniform\" Height=\"4\" HorizontalAlignment=\"Center\" Margin=\"0,0,0,0\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"{StaticResource AccordionArrowBackgroundBrush}\" VerticalAlignment=\"Center\" Width=\"Auto\">\r\n\t\t\t\t\t\t\t\t\t\t\t<Path.RenderTransform>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ScaleTransform />\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SkewTransform />\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<RotateTransform />\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TranslateTransform />\r\n\t\t\t\t\t\t\t\t\t\t\t\t</TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t\t</Path.RenderTransform>\r\n\t\t\t\t\t\t\t\t\t\t</Path>\r\n\t\t\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t\t\t\t<ContentControl x:Name=\"contentControl\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"6 4\" Grid.Column=\"1\" Grid.Row=\"0\" Grid.RowSpan=\"1\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\">\r\n\t\t\t\t\t\t\t\t\t\t<ContentPresenter x:Name=\"header\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" />\r\n\t\t\t\t\t\t\t\t\t</ContentControl>\r\n\t\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  ExpandableContentControl Style  ********************************* -->\r\n\t<Style x:Key=\"ExpandableContentControlStyle\" TargetType=\"layoutToolkitPrimitives:ExpandableContentControl\">\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"0\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"6\" />\r\n\t\t<Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n\t\t<Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n\t\t<Setter Property=\"IsEnabled\" Value=\"true\" />\r\n\t\t<Setter Property=\"Cursor\" Value=\"Arrow\" />\r\n\t\t<Setter Property=\"IsTabStop\" Value=\"False\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"layoutToolkitPrimitives:ExpandableContentControl\">\r\n\t\t\t\t\t<ContentPresenter x:Name=\"ContentSite\" Cursor=\"{TemplateBinding Cursor}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" />\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  AccordionItem Style  ********************************* -->\r\n\t<Style x:Key=\"AccordionItemStyle\" TargetType=\"layoutToolkit:AccordionItem\">\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ThemeForegroundBrush}\" />\r\n\t\t<Setter Property=\"Background\" Value=\"White\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"0\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"0\" />\r\n\t\t<Setter Property=\"Margin\" Value=\"0\" />\r\n\t\t<Setter Property=\"HorizontalAlignment\" Value=\"Stretch\" />\r\n\t\t<Setter Property=\"VerticalAlignment\" Value=\"Stretch\" />\r\n\t\t<Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n\t\t<Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n\t\t<Setter Property=\"IsTabStop\" Value=\"False\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"layoutToolkit:AccordionItem\">\r\n\t\t\t\t\t<Grid Background=\"{TemplateBinding Background}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\">\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0\" />\r\n\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Pressed\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"FocusStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Focused\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unfocused\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"ExpansionStates\">\r\n\t\t\t\t\t\t\t\t<VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0\" />\r\n\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Collapsed\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard x:Name=\"AccordionItemCollapsedStoryboard\">\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(layoutToolkitPrimitives:ExpandableContentControl.Percentage)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<SplineDoubleKeyFrame KeyTime=\"00:00:00.3\" KeySpline=\"0.2,0,0,1\" Value=\"0\" />\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00.3\" Duration=\"00:00:00\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Collapsed</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Expanded\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard x:Name=\"AccordionItemExpandedStoryboard\">\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(layoutToolkitPrimitives:ExpandableContentControl.Percentage)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<SplineDoubleKeyFrame KeyTime=\"00:00:00.3\" KeySpline=\"0.2,0,0,1\" Value=\"1\" />\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"LockedStates\">\r\n\t\t\t\t\t\t\t\t<VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0\" />\r\n\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Locked\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"IsEnabled\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Boolean>False</sys:Boolean>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unlocked\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"IsEnabled\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Boolean>True</sys:Boolean>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"ExpandDirectionStates\">\r\n\t\t\t\t\t\t\t\t<VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0\" />\r\n\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"ExpandDown\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd1\" Storyboard.TargetProperty=\"Height\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>*</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>*</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"ExpandUp\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>0</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>*</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>*</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"ExpandLeft\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.ColumnSpan)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.ColumnSpan)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.RowSpan)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>2</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.RowSpan)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>2</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>0</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>*</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>*</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"ExpandRight\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.ColumnSpan)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.ColumnSpan)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.RowSpan)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>2</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.RowSpan)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>2</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>0</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>*</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd1\" Storyboard.TargetProperty=\"Width\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>*</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Border x:Name=\"Background\" Padding=\"{TemplateBinding Padding}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\">\r\n\t\t\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t\t\t<Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t\t\t<RowDefinition Height=\"Auto\" x:Name=\"rd0\" />\r\n\t\t\t\t\t\t\t\t\t<RowDefinition Height=\"Auto\" x:Name=\"rd1\" />\r\n\t\t\t\t\t\t\t\t</Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t\t<Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"Auto\" x:Name=\"cd0\" />\r\n\t\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"Auto\" x:Name=\"cd1\" />\r\n\t\t\t\t\t\t\t\t</Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t\t<layoutToolkitPrimitives:AccordionButton Name=\"ExpanderButton\" Content=\"{TemplateBinding Header}\" ContentTemplate=\"{TemplateBinding HeaderTemplate}\" IsChecked=\"{TemplateBinding IsSelected}\" IsTabStop=\"True\" Grid.Row=\"0\" Padding=\"0,0,0,0\" Margin=\"0,0,0,0\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\" />\r\n\t\t\t\t\t\t\t\t<layoutToolkitPrimitives:ExpandableContentControl Name=\"ExpandSite\" Grid.Row=\"1\" IsTabStop=\"False\" Percentage=\"0\" RevealMode=\"{TemplateBinding ExpandDirection}\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Margin=\"0,0,0,0\" FontFamily=\"{TemplateBinding FontFamily}\" FontSize=\"{TemplateBinding FontSize}\" FontStretch=\"{TemplateBinding FontStretch}\" FontStyle=\"{TemplateBinding FontStyle}\" FontWeight=\"{TemplateBinding FontWeight}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\" Style=\"{StaticResource ExpandableContentControlStyle}\" />\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  Accordion Style  ********************************* -->\r\n\t<Style x:Key=\"AccordionStyle\" TargetType=\"layoutToolkit:Accordion\">\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ThemeLightForegroundBrush}\" />\r\n\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource AccordionBorderBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"0\" />\r\n\t\t<Setter Property=\"Margin\" Value=\"0\" />\r\n\t\t<Setter Property=\"HorizontalAlignment\" Value=\"Left\" />\r\n\t\t<Setter Property=\"VerticalAlignment\" Value=\"Top\" />\r\n\t\t<Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n\t\t<Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n\t\t<Setter Property=\"Cursor\" Value=\"Arrow\" />\r\n\t\t<Setter Property=\"IsTabStop\" Value=\"False\" />\r\n\t\t<Setter Property=\"ItemsPanel\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ItemsPanelTemplate>\r\n\t\t\t\t\t<StackPanel VerticalAlignment=\"Top\" />\r\n\t\t\t\t</ItemsPanelTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"layoutToolkit:Accordion\">\r\n\t\t\t\t\t<Grid x:Name=\"Root\">\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Pressed\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"FocusStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Focused\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unfocused\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Border x:Name=\"Border\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Padding=\"{TemplateBinding Padding}\">\r\n\t\t\t\t\t\t\t<ScrollViewer BorderBrush=\"{StaticResource TransparentBrush}\" BorderThickness=\"0\" Background=\"{x:Null}\" HorizontalScrollBarVisibility=\"Disabled\" IsTabStop=\"False\" Margin=\"0\" Padding=\"0\" VerticalScrollBarVisibility=\"Disabled\">\r\n\t\t\t\t\t\t\t\t<ItemsPresenter />\r\n\t\t\t\t\t\t\t</ScrollViewer>\r\n\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  AutoCompleteBox Style  ********************************* -->\r\n\t<Style x:Key=\"AutoCompleteBoxStyle\" TargetType=\"{x:Type inputToolkit:AutoCompleteBox}\">\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ThemeForegroundBrush}\" />\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource ThemeLightForegroundBrush}\" />\r\n\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource TextBoxBorderBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"2\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"24\" />\r\n\t\t<Setter Property=\"MinWidth\" Value=\"45\" />\r\n\t\t<Setter Property=\"TextBoxStyle\" Value=\"{StaticResource TextBoxStyle}\" />\r\n\t\t<Setter Property=\"IsTabStop\" Value=\"False\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type inputToolkit:AutoCompleteBox}\">\r\n\t\t\t\t\t<Grid Opacity=\"{TemplateBinding Opacity}\">\r\n\t\t\t\t\t\t<TextBox x:Name=\"Text\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Foreground=\"{TemplateBinding Foreground}\" IsTabStop=\"True\" Margin=\"0\" Padding=\"{TemplateBinding Padding}\" Style=\"{TemplateBinding TextBoxStyle}\" />\r\n\t\t\t\t\t\t<Border x:Name=\"ValidationErrorElement\" BorderBrush=\"{StaticResource ValidationErrorElementBrush}\" BorderThickness=\"1\" CornerRadius=\"1\" Visibility=\"Collapsed\">\r\n\t\t\t\t\t\t\t<Border.ToolTip>\r\n\t\t\t\t\t\t\t\t<ToolTip x:Name=\"validationTooltip\" Placement=\"Right\" Template=\"{StaticResource ValidationToolTipTemplate}\">\r\n\t\t\t\t\t\t\t\t\t<ToolTip.Triggers>\r\n\t\t\t\t\t\t\t\t\t\t<EventTrigger RoutedEvent=\"FrameworkElement.Loaded\">\r\n\t\t\t\t\t\t\t\t\t\t\t<BeginStoryboard>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"IsHitTestVisible\" Storyboard.TargetName=\"validationTooltip\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Boolean>True</sys:Boolean>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t\t</BeginStoryboard>\r\n\t\t\t\t\t\t\t\t\t\t</EventTrigger>\r\n\t\t\t\t\t\t\t\t\t</ToolTip.Triggers>\r\n\t\t\t\t\t\t\t\t\t<!--TODO: Include ValidationTooltipTemplate-->\r\n\t\t\t\t\t\t\t\t\t<!--<ToolTip.Template>\r\n                                    <ControlTemplate TargetType=\"{x:Type ToolTip}\">\r\n                                        <Grid x:Name=\"Root\" Margin=\"5,0\" Opacity=\"0\" RenderTransformOrigin=\"0,0\">\r\n                                            <Grid.RenderTransform>\r\n                                                <TranslateTransform X=\"-25\"/>\r\n                                            </Grid.RenderTransform>\r\n                                            <Border Background=\"#052A2E31\" CornerRadius=\"5\" Margin=\"4,4,-4,-4\"/>\r\n                                            <Border Background=\"#152A2E31\" CornerRadius=\"4\" Margin=\"3,3,-3,-3\"/>\r\n                                            <Border Background=\"#252A2E31\" CornerRadius=\"3\" Margin=\"2,2,-2,-2\"/>\r\n                                            <Border Background=\"#352A2E31\" CornerRadius=\"2\" Margin=\"1,1,-1,-1\"/>\r\n                                            <Border Background=\"#FFDC000C\" CornerRadius=\"2\">\r\n                                                <TextBlock Foreground=\"White\" MaxWidth=\"250\" Margin=\"8,4\" TextWrapping=\"Wrap\" Text=\"{Binding (Validation.Errors)[0].ErrorContent}\"/>\r\n                                            </Border>\r\n                                        </Grid>\r\n                                    </ControlTemplate>\r\n                                </ToolTip.Template>-->\r\n\t\t\t\t\t\t\t\t</ToolTip>\r\n\t\t\t\t\t\t\t</Border.ToolTip>\r\n\t\t\t\t\t\t\t<Grid Background=\"Transparent\" HorizontalAlignment=\"Right\" Height=\"12\" Margin=\"1,-4,-4,0\" VerticalAlignment=\"Top\" Width=\"12\">\r\n\t\t\t\t\t\t\t\t<Path Data=\"M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z\" Fill=\"{StaticResource ValidationErrorElementBrush}\" Margin=\"1,3,0,0\" />\r\n\t\t\t\t\t\t\t\t<Path Data=\"M 0,0 L2,0 L 8,6 L8,8\" Fill=\"{StaticResource ThemeLightForegroundBrush}\" Margin=\"1,3,0,0\" />\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t\t<Popup x:Name=\"Popup\" AllowsTransparency=\"True\">\r\n\t\t\t\t\t\t\t<Grid Opacity=\"{TemplateBinding Opacity}\">\r\n\t\t\t\t\t\t\t\t<Border x:Name=\"PopupBorder\" BorderThickness=\"0\" HorizontalAlignment=\"Stretch\">\r\n\t\t\t\t\t\t\t\t\t<Border.RenderTransform>\r\n\t\t\t\t\t\t\t\t\t\t<TranslateTransform X=\"1\" Y=\"1\" />\r\n\t\t\t\t\t\t\t\t\t</Border.RenderTransform>\r\n\t\t\t\t\t\t\t\t\t<Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"0\" HorizontalAlignment=\"Stretch\" Opacity=\"1.0\" Padding=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t<Border.RenderTransform>\r\n\t\t\t\t\t\t\t\t\t\t\t<TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<TranslateTransform X=\"-1\" Y=\"-1\" />\r\n\t\t\t\t\t\t\t\t\t\t\t</TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t</Border.RenderTransform>\r\n\t\t\t\t\t\t\t\t\t\t<ListBox x:Name=\"Selector\" BorderThickness=\"0\" Background=\"{TemplateBinding Background}\" Foreground=\"{TemplateBinding Foreground}\" ScrollViewer.HorizontalScrollBarVisibility=\"Auto\" ItemTemplate=\"{TemplateBinding ItemTemplate}\" ItemContainerStyle=\"{TemplateBinding ItemContainerStyle}\" ScrollViewer.VerticalScrollBarVisibility=\"Auto\" />\r\n\t\t\t\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t</Popup>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n    \r\n <!--********************** Implicit Styles *********************** -->\r\n    <Style BasedOn=\"{StaticResource RatingItemStyle}\" TargetType=\"{x:Type inputToolkit:RatingItem}\" />\r\n    <Style BasedOn=\"{StaticResource RatingStyle}\" TargetType=\"{x:Type inputToolkit:Rating}\" />\r\n    <Style BasedOn=\"{StaticResource AccordionButtonStyle}\" TargetType=\"layoutToolkitPrimitives:AccordionButton\" />\r\n    <Style BasedOn=\"{StaticResource AccordionItemStyle}\" TargetType=\"layoutToolkit:AccordionItem\" />\r\n    <Style BasedOn=\"{StaticResource AccordionStyle}\" TargetType=\"layoutToolkit:Accordion\" />\r\n    <Style BasedOn=\"{StaticResource AutoCompleteBoxStyle}\" TargetType=\"{x:Type inputToolkit:AutoCompleteBox}\" />\r\n    \r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/IG/Styles.Shared.xaml",
    "content": "﻿<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" \r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" \r\n                    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\" \r\n                    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" \r\n                    mc:Ignorable=\"d\">\r\n\r\n  <!-- *********************************  COLORS  ********************************* -->\r\n  <ResourceDictionary.MergedDictionaries>\r\n    <ResourceDictionary Source=\"Theme.Colors.xaml\" />\r\n  </ResourceDictionary.MergedDictionaries>\r\n\r\n  <!-- *********************************  BRUSHES  ********************************* -->\r\n  <SolidColorBrush x:Key=\"ThemeForegroundBrush\" Color=\"{StaticResource Color_001}\" />\r\n  <SolidColorBrush x:Key=\"ThemeLightForegroundBrush\" Color=\"{StaticResource Color_011}\" />\r\n  <SolidColorBrush x:Key=\"TransparentBrush\" Color=\"{StaticResource Color_021}\" />\r\n  <SolidColorBrush x:Key=\"DarkGrayBorderBrush\" Color=\"{StaticResource Color_003}\" />\r\n  <SolidColorBrush x:Key=\"DisabledBackgroundBrush\" Color=\"{StaticResource Color_007}\" />\r\n  <SolidColorBrush x:Key=\"DisabledBorderBrush\" Color=\"{StaticResource Color_008}\" />\r\n\r\n  <!-- Scrollbar/ScrollViewer Brushes -->\r\n  <LinearGradientBrush x:Key=\"VScrollbarThumbHoverBackgroundBrush\" StartPoint=\"0.199,0.469\" EndPoint=\"1.17,0.469\">\r\n    <GradientStop Color=\"{StaticResource Color_014}\" />\r\n    <GradientStop Color=\"{StaticResource Color_016}\" Offset=\"1\" />\r\n  </LinearGradientBrush>\r\n\r\n  <LinearGradientBrush x:Key=\"VScrollbarThumbPressedBackgroundBrush\" StartPoint=\"0.199,0.469\" EndPoint=\"1.17,0.469\">\r\n    <GradientStop Color=\"{StaticResource Color_014}\" Offset=\"1\" />\r\n    <GradientStop Color=\"{StaticResource Color_016}\" />\r\n  </LinearGradientBrush>\r\n\r\n  <LinearGradientBrush x:Key=\"VScrollbarThumbBackgroundBrush\" EndPoint=\"1,0.5\" StartPoint=\"0,0.5\">\r\n    <GradientStop Color=\"{StaticResource Color_004}\" Offset=\"1\" />\r\n    <GradientStop Color=\"{StaticResource Color_005}\" />\r\n  </LinearGradientBrush>\r\n\r\n  <RadialGradientBrush x:Key=\"VScrollbarBackgroundBrush\" Center=\"0.071435546875,0.5039216175738735\" GradientOrigin=\"0,0.5\" RadiusX=\"0.5\" RadiusY=\"1.1\">\r\n    <GradientStop Color=\"{StaticResource Color_008}\" />\r\n    <GradientStop Color=\"{StaticResource Color_009}\" Offset=\"1\" />\r\n  </RadialGradientBrush>\r\n  <RadialGradientBrush x:Key=\"HScrollbarBackgroundBrush\" Center=\"0.495,0.128\" GradientOrigin=\"0.495,0.128\" RadiusX=\"1.134\" RadiusY=\"0.65\">\r\n    <GradientStop Color=\"{StaticResource Color_008}\" />\r\n    <GradientStop Color=\"{StaticResource Color_009}\" Offset=\"1\" />\r\n  </RadialGradientBrush>\r\n\r\n  <LinearGradientBrush x:Key=\"HScrollbarThumbBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n    <GradientStop Color=\"{StaticResource Color_004}\" Offset=\"1\" />\r\n    <GradientStop Color=\"{StaticResource Color_005}\" />\r\n  </LinearGradientBrush>\r\n\r\n  <LinearGradientBrush x:Key=\"HScrollbarThumbHoverBackgroundBrush\" StartPoint=\"0.684,-0.023\" EndPoint=\"0.684,0.971\">\r\n    <GradientStop Color=\"{StaticResource Color_014}\" />\r\n    <GradientStop Color=\"{StaticResource Color_016}\" Offset=\"1\" />\r\n  </LinearGradientBrush>\r\n\r\n  <LinearGradientBrush x:Key=\"HScrollbarThumbPressedBackgroundBrush\" StartPoint=\"0.684,1.2\" EndPoint=\"0.684,0.03\">\r\n    <GradientStop Color=\"{StaticResource Color_014}\" />\r\n    <GradientStop Color=\"{StaticResource Color_016}\" Offset=\"1\" />\r\n  </LinearGradientBrush>\r\n\r\n  <SolidColorBrush x:Key=\"ScrollbarBorderBrush\" Color=\"{StaticResource Color_022}\" />\r\n  <SolidColorBrush x:Key=\"ScrollbarThumbDisabledBrush\" Color=\"{StaticResource Color_005}\" />\r\n  <SolidColorBrush x:Key=\"ArrowHoverBorderBrush\" Color=\"{StaticResource Color_016}\" />\r\n  <SolidColorBrush x:Key=\"ArrowDisabledBorderBrush\" Color=\"{StaticResource Color_006}\" />\r\n  <SolidColorBrush x:Key=\"ArrowDarkBorderBrush\" Color=\"{StaticResource Color_004}\" />\r\n  <SolidColorBrush x:Key=\"ArrowBackgroundBrush\" Color=\"{StaticResource Color_005}\" />\r\n  <SolidColorBrush x:Key=\"ScrollviewerCornerBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n  <SolidColorBrush x:Key=\"ScrollviewerBorderBrush\" Color=\"{StaticResource Color_006}\" />\r\n\r\n  <!-- ComboBox Brushes -->\r\n  <LinearGradientBrush x:Key=\"ComboBoxBackgroundBrush\" StartPoint=\"0.505,0.469\" EndPoint=\"0.505,-0.023\">\r\n    <GradientStop Color=\"{StaticResource Color_011}\" Offset=\"0.377\" />\r\n    <GradientStop Color=\"{StaticResource Color_009}\" Offset=\"1\" />\r\n  </LinearGradientBrush>\r\n\r\n  <SolidColorBrush x:Key=\"ComboBoxBorderBrush\" Color=\"{StaticResource Color_006}\" />\r\n  <SolidColorBrush x:Key=\"ComboBoxHoverBorderBrush\" Color=\"{StaticResource Color_014}\" />\r\n  <SolidColorBrush x:Key=\"PopupBorderBrush\" Color=\"{StaticResource Color_007}\" />\r\n\r\n  <LinearGradientBrush x:Key=\"PopupBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n    <GradientStop Color=\"{StaticResource Color_009}\" Offset=\"1\" />\r\n    <GradientStop Color=\"{StaticResource Color_011}\" />\r\n  </LinearGradientBrush>\r\n\r\n  <!-- ComboBoxItem Brushes -->\r\n  <LinearGradientBrush x:Key=\"ComboBoxItemHoverBackgroundBrush\" StartPoint=\"0,0\" EndPoint=\"0,1\">\r\n    <GradientStop Color=\"{StaticResource Color_014}\" />\r\n    <GradientStop Color=\"{StaticResource Color_016}\" Offset=\"1\" />\r\n  </LinearGradientBrush>\r\n\r\n  <SolidColorBrush x:Key=\"ComboBoxItemHoverBorderBrush\" Color=\"{StaticResource Color_016}\" />\r\n  <LinearGradientBrush x:Key=\"ComboBoxItemPressedBackgroundBrush\" StartPoint=\"0,0 \" EndPoint=\"0,1 \">\r\n    <GradientStop Color=\"{StaticResource Color_014}\" Offset=\"1\" />\r\n    <GradientStop Color=\"{StaticResource Color_016}\" />\r\n  </LinearGradientBrush>\r\n  <SolidColorBrush x:Key=\"ComboBoxItemPressedBorderBrush\" Color=\"{StaticResource Color_016}\" />\r\n  <LinearGradientBrush x:Key=\"ComboBoxItemSelectedBackgroundBrush\" StartPoint=\"0,0\" EndPoint=\"0,1\">\r\n    <GradientStop Offset=\"0\" Color=\"{StaticResource Color_011}\" />\r\n    <GradientStop Offset=\"0.97\" Color=\"{StaticResource Color_009}\" />\r\n    <GradientStop Offset=\"0.99\" Color=\"{StaticResource Color_009}\" />\r\n  </LinearGradientBrush>\r\n\r\n  <SolidColorBrush x:Key=\"ComboBoxItemFocusedBorderBrush\" Color=\"{StaticResource Color_014}\" />\r\n\r\n  <!-- ToggleButton Brushes -->\r\n  <LinearGradientBrush x:Key=\"ToggleButtonPressedBackgroundBrush\" StartPoint=\"0,0 \" EndPoint=\"0,1 \">\r\n    <GradientStop Color=\"{StaticResource Color_014}\" Offset=\"1\" />\r\n    <GradientStop Color=\"{StaticResource Color_016}\" />\r\n  </LinearGradientBrush>\r\n\r\n  <LinearGradientBrush x:Key=\"ToggleButtonDisabledBackgroundBrush\" StartPoint=\"0,0 \" EndPoint=\"0,1 \">\r\n    <GradientStop Color=\"{StaticResource Color_008}\" />\r\n    <GradientStop Color=\"{StaticResource Color_006}\" Offset=\"1\" />\r\n  </LinearGradientBrush>\r\n\r\n  <LinearGradientBrush x:Key=\"ToggleButtonFocusedBackgroundBrush\" StartPoint=\"0,0 \" EndPoint=\"0,1 \">\r\n    <GradientStop Color=\"{StaticResource Color_004}\" Offset=\"1\" />\r\n    <GradientStop Color=\"{StaticResource Color_002}\" />\r\n  </LinearGradientBrush>\r\n\r\n  <LinearGradientBrush x:Key=\"ToggleButtonBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n    <GradientStop Color=\"{StaticResource Color_004}\" />\r\n    <GradientStop Color=\"{StaticResource Color_002}\" Offset=\"1\" />\r\n  </LinearGradientBrush>\r\n\r\n  <LinearGradientBrush x:Key=\"ToggleButtonHoverBackgroundBrush\" StartPoint=\"0,0\" EndPoint=\"0,1\">\r\n    <GradientStop Color=\"{StaticResource Color_014}\" />\r\n    <GradientStop Color=\"{StaticResource Color_016}\" Offset=\"1\" />\r\n  </LinearGradientBrush>\r\n\r\n  <SolidColorBrush x:Key=\"ToggleButtonBorderBrush\" Color=\"{StaticResource Color_002}\" />\r\n  <SolidColorBrush x:Key=\"ToggleButtonHoverBorderBrush\" Color=\"{StaticResource Color_016}\" />\r\n  <SolidColorBrush x:Key=\"ToggleButtonDisabledBorderBrush\" Color=\"{StaticResource Color_007}\" />\r\n  <SolidColorBrush x:Key=\"ToggleButtonPressedBorderBrush\" Color=\"{StaticResource Color_016}\" />\r\n  <SolidColorBrush x:Key=\"ToggleButtonFocusedBorderBrush\" Color=\"{StaticResource Color_014}\" />\r\n\r\n  <!-- TextBox Brushes -->\r\n  <RadialGradientBrush x:Key=\"TextBoxInnerShadowBackgroundBrush\" RadiusX=\"0.916\" RadiusY=\"1.667\" Center=\"0.72,0.528\" GradientOrigin=\"0.72,0.528\">\r\n    <GradientStop Color=\"{StaticResource Color_026}\" Offset=\"0.679\" />\r\n    <GradientStop Color=\"{StaticResource Color_027}\" Offset=\"0.913\" />\r\n  </RadialGradientBrush>\r\n\r\n  <LinearGradientBrush x:Key=\"TextBoxGradientBackgroundBrush\" StartPoint=\"0.505,0.469\" EndPoint=\"0.505,-0.023\">\r\n    <GradientStop Color=\"{StaticResource Color_011}\" Offset=\"0.377\" />\r\n    <GradientStop Color=\"{StaticResource Color_009}\" Offset=\"1\" />\r\n  </LinearGradientBrush>\r\n\r\n  <SolidColorBrush x:Key=\"TextBoxBorderBrush\" Color=\"{StaticResource Color_006}\" />\r\n  <SolidColorBrush x:Key=\"TextBoxHoverBorderBrush\" Color=\"{StaticResource Color_015}\" />\r\n  <SolidColorBrush x:Key=\"TextBoxnDisabledBorderBrush\" Color=\"{StaticResource Color_007}\" />\r\n  <SolidColorBrush x:Key=\"TextBoxDisabledForegroundBrush\" Color=\"{StaticResource Color_007}\" />\r\n  <SolidColorBrush x:Key=\"TextBoxFocusedBorderBrush\" Color=\"{StaticResource Color_015}\" />\r\n  <SolidColorBrush x:Key=\"ReadonlyBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n  <SolidColorBrush x:Key=\"ReadonlyBorderBrush\" Color=\"{StaticResource Color_006}\" />\r\n  <SolidColorBrush x:Key=\"TextBoxEditableBorderBrush\" Color=\"{StaticResource Color_008}\" />\r\n\r\n  <!-- Button Brushes -->\r\n  <LinearGradientBrush x:Key=\"ButtonBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n    <GradientStop Color=\"{StaticResource Color_004}\" />\r\n    <GradientStop Color=\"{StaticResource Color_002}\" Offset=\"1\" />\r\n  </LinearGradientBrush>\r\n\r\n  <LinearGradientBrush x:Key=\"ButtonHoverBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n    <GradientStop Color=\"{StaticResource Color_014}\" />\r\n    <GradientStop Color=\"{StaticResource Color_016}\" Offset=\"1\" />\r\n  </LinearGradientBrush>\r\n\r\n  <LinearGradientBrush x:Key=\"ButtonPressedBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n    <GradientStop Color=\"{StaticResource Color_014}\" Offset=\"1\" />\r\n    <GradientStop Color=\"{StaticResource Color_016}\" />\r\n  </LinearGradientBrush>\r\n\r\n  <LinearGradientBrush x:Key=\"ButtonFocusedBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n    <GradientStop Color=\"{StaticResource Color_003}\" />\r\n    <GradientStop Color=\"{StaticResource Color_001}\" Offset=\"1\" />\r\n  </LinearGradientBrush>\r\n\r\n  <LinearGradientBrush x:Key=\"ButtonDisabledBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n    <GradientStop Color=\"{StaticResource Color_008}\" />\r\n    <GradientStop Color=\"{StaticResource Color_006}\" Offset=\"1\" />\r\n  </LinearGradientBrush>\r\n\r\n  <SolidColorBrush x:Key=\"ButtonHoverBorderBrush\" Color=\"{StaticResource Color_016}\" />\r\n  <SolidColorBrush x:Key=\"ButtonFocusedBorderBrush\" Color=\"{StaticResource Color_014}\" />\r\n  <SolidColorBrush x:Key=\"ButtonPressedBorderBrush\" Color=\"{StaticResource Color_016}\" />\r\n  <SolidColorBrush x:Key=\"ButtonBorderBrush\" Color=\"{StaticResource Color_002}\" />\r\n  <SolidColorBrush x:Key=\"ButtonDisabledBorderBrush\" Color=\"{StaticResource Color_007}\" />\r\n\r\n  <!-- CheckBox Brushes -->\r\n  <RadialGradientBrush x:Key=\"CheckBoxInnerShadowBrush\" RadiusX=\"0.916\" RadiusY=\"2.028\" Center=\"0.929,0.499\" GradientOrigin=\"0.929,0.499\">\r\n    <GradientStop Color=\"{StaticResource Color_026}\" Offset=\"0.679\" />\r\n    <GradientStop Color=\"{StaticResource Color_027}\" Offset=\"0.997\" />\r\n  </RadialGradientBrush>\r\n\r\n  <RadialGradientBrush x:Key=\"CheckBoxBackgroundBrush\" RadiusX=\"0.916\" RadiusY=\"0.667\" Center=\"0.5,0.6\" GradientOrigin=\"0.5,0.6\">\r\n    <GradientStop Color=\"{StaticResource Color_011}\" Offset=\"0.645\" />\r\n    <GradientStop Color=\"{StaticResource Color_008}\" Offset=\"1\" />\r\n  </RadialGradientBrush>\r\n\r\n  <SolidColorBrush x:Key=\"CheckBoxBorderBrush\" Color=\"{StaticResource Color_006}\" />\r\n  <SolidColorBrush x:Key=\"CheckBoxHoverBorderBrush\" Color=\"{StaticResource Color_014}\" />\r\n  <SolidColorBrush x:Key=\"CheckBoxFocusedBorderBrush\" Color=\"{StaticResource Color_014}\" />\r\n  <SolidColorBrush x:Key=\"CheckBoxGlyphBackgroundBrush\" Color=\"{StaticResource Color_003}\" />\r\n\r\n  <!-- RadioButton Brushes -->\r\n  <RadialGradientBrush x:Key=\"RadioButtonBackgroundBrush\" RadiusX=\"0.916\" RadiusY=\"0.667\" Center=\"0.5,0.6\" GradientOrigin=\"0.5,0.6\">\r\n    <GradientStop Color=\"{StaticResource Color_011}\" Offset=\"0.645\" />\r\n    <GradientStop Color=\"{StaticResource Color_008}\" Offset=\"1\" />\r\n  </RadialGradientBrush>\r\n\r\n  <LinearGradientBrush x:Key=\"RadioButtonCheckBackgroundBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n    <GradientStop Offset=\"0\" Color=\"{StaticResource Color_014}\" />\r\n    <GradientStop Offset=\"0.80\" Color=\"{StaticResource Color_017}\" />\r\n    <GradientStop Offset=\"1\" Color=\"{StaticResource Color_017}\" />\r\n  </LinearGradientBrush>\r\n\r\n  <SolidColorBrush x:Key=\"RadioButtonHoverBorderBrush\" Color=\"{StaticResource Color_013}\" />\r\n  <SolidColorBrush x:Key=\"RadioButtonPressedBorderBrush\" Color=\"{StaticResource Color_015}\" />\r\n  <SolidColorBrush x:Key=\"RadioButtonDisabledBorderBrush\" Color=\"{StaticResource Color_007}\" />\r\n  <SolidColorBrush x:Key=\"RadioButtonBorderBrush\" Color=\"{StaticResource Color_006}\" />\r\n  <SolidColorBrush x:Key=\"RadioButtonCheckBorderBrush\" Color=\"{StaticResource Color_016}\" />\r\n\r\n  <!-- Validation Brushes -->\r\n  <SolidColorBrush x:Key=\"InvalidUnfocusedBrush\" Color=\"{StaticResource Color_019}\"  />\r\n  <SolidColorBrush x:Key=\"InvalidFocusedBrush\" Color=\"{StaticResource Color_020}\"  />\r\n  <SolidColorBrush x:Key=\"ValidationToolTipBackgroundFill\" Color=\"{StaticResource Color_027}\" />\r\n  <SolidColorBrush x:Key=\"ValidationErrorElementBrush\" Color=\"{StaticResource Color_020}\"  />\r\n\r\n  <!-- ListBox Brushes -->\r\n  <SolidColorBrush x:Key=\"ListBoxBorderBrush\" Color=\"{StaticResource Color_006}\" />\r\n\r\n  <SolidColorBrush x:Key=\"ListBoxItemBackgroundBrush\" Color=\"{StaticResource Color_021}\" />\r\n  <SolidColorBrush x:Key=\"ListBoxItemBorderBrush\" Color=\"{StaticResource Color_021}\" />\r\n\r\n  <LinearGradientBrush x:Key=\"ListBoxItemHoverBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n    <GradientStop Color=\"{StaticResource Color_014}\" />\r\n    <GradientStop Color=\"{StaticResource Color_016}\" Offset=\"1\" />\r\n  </LinearGradientBrush>\r\n  <SolidColorBrush x:Key=\"ListBoxItemHoverBorderBrush\" Color=\"{StaticResource Color_016}\" />\r\n\r\n  <SolidColorBrush x:Key=\"ListBoxItemFocusedBorderBrush\" Color=\"{StaticResource Color_014}\" />\r\n  <LinearGradientBrush x:Key=\"LIstBoxItemSelectedBackgroundBrush\" StartPoint=\"0.7,-0.0390625\" EndPoint=\"0.7,1\">\r\n    <GradientStop Color=\"{StaticResource Color_011}\" Offset=\"0\" />\r\n    <GradientStop Color=\"{StaticResource Color_009}\" Offset=\"1\" />\r\n  </LinearGradientBrush>\r\n\r\n  <!-- ******************************************************** SL-WPF INLINE-CONTROLS SHARED RESOURCES ***********************************************************\r\n*********************************************************************************************************************************************************************    -->\r\n\r\n  <!-- *********************************  ButtonStyle  ********************************* -->\r\n  <Style x:Key=\"ButtonStyle\" TargetType=\"Button\">\r\n    <Setter Property=\"Foreground\" Value=\"{StaticResource ThemeLightForegroundBrush}\" />\r\n    <Setter Property=\"Padding\" Value=\"8,0,8,2\" />\r\n    <Setter Property=\"Margin\" Value=\"0\" />\r\n    <Setter Property=\"MinHeight\" Value=\"22\" />\r\n    <Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n    <Setter Property=\"FontSize\" Value=\"12\" />\r\n    <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n    <Setter Property=\"Template\">\r\n      <Setter.Value>\r\n        <ControlTemplate TargetType=\"Button\">\r\n          <Grid>\r\n            <VisualStateManager.VisualStateGroups>\r\n              <VisualStateGroup x:Name=\"CommonStates\">\r\n                <VisualStateGroup.Transitions>\r\n                  <VisualTransition GeneratedDuration=\"0:0:0.2\" />\r\n                </VisualStateGroup.Transitions>\r\n                <VisualState x:Name=\"Normal\" />\r\n                <VisualState x:Name=\"MouseOver\">\r\n                  <Storyboard>\r\n                    <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"hover\" d:IsOptimized=\"True\" />\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Pressed\">\r\n                  <Storyboard>\r\n                    <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"pressed\" d:IsOptimized=\"True\" />\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Disabled\">\r\n                  <Storyboard>\r\n                    <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"disabled\" d:IsOptimized=\"True\" />\r\n                    <DoubleAnimation Duration=\"0\" To=\"0.5\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"contentPresenter\" d:IsOptimized=\"True\" />\r\n                  </Storyboard>\r\n                </VisualState>\r\n              </VisualStateGroup>\r\n              <VisualStateGroup x:Name=\"FocusStates\">\r\n                <VisualState x:Name=\"Focused\">\r\n                  <Storyboard>\r\n                    <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"focused\" d:IsOptimized=\"True\" />\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Unfocused\" />\r\n              </VisualStateGroup>\r\n            </VisualStateManager.VisualStateGroups>\r\n            <Rectangle x:Name=\"normal\" Opacity=\"1\" RadiusX=\"3\" RadiusY=\"3\" StrokeThickness=\"{TemplateBinding BorderThickness}\" Stroke=\"{StaticResource ButtonBorderBrush}\" Fill=\"{StaticResource ButtonBackgroundBrush}\" />\r\n            <Rectangle x:Name=\"hover\" Opacity=\"0\" RadiusX=\"3\" RadiusY=\"3\" StrokeThickness=\"{TemplateBinding BorderThickness}\" Stroke=\"{StaticResource ButtonHoverBorderBrush}\" Fill=\"{StaticResource ButtonHoverBackgroundBrush}\" />\r\n            <Rectangle x:Name=\"pressed\" Opacity=\"0\" RadiusX=\"3\" RadiusY=\"3\" StrokeThickness=\"{TemplateBinding BorderThickness}\" Stroke=\"{StaticResource ButtonPressedBorderBrush}\" Fill=\"{StaticResource ButtonPressedBackgroundBrush}\" />\r\n            <Rectangle x:Name=\"focused\" Opacity=\"0\" RadiusX=\"3\" RadiusY=\"3\" StrokeThickness=\"{TemplateBinding BorderThickness}\" Stroke=\"{StaticResource ButtonFocusedBorderBrush}\" />\r\n            <Rectangle x:Name=\"disabled\" Opacity=\"0\" RadiusX=\"3\" RadiusY=\"3\" StrokeThickness=\"{TemplateBinding BorderThickness}\" Stroke=\"{StaticResource ButtonDisabledBorderBrush}\" Fill=\"{StaticResource ButtonDisabledBackgroundBrush}\" />\r\n            <ContentPresenter x:Name=\"contentPresenter\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Margin=\"{TemplateBinding Padding}\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" />\r\n          </Grid>\r\n        </ControlTemplate>\r\n      </Setter.Value>\r\n    </Setter>\r\n  </Style>\r\n\r\n  <!-- ********************************** CheckBoxStyle **********************************-->\r\n  <Style x:Key=\"CheckBoxStyle\" TargetType=\"CheckBox\">\r\n    <Setter Property=\"Foreground\" Value=\"{StaticResource ThemeForegroundBrush}\" />\r\n    <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n    <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n    <Setter Property=\"Padding\" Value=\"4,1,0,0\" />\r\n    <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n    <Setter Property=\"Template\">\r\n      <Setter.Value>\r\n        <ControlTemplate TargetType=\"CheckBox\">\r\n          <Grid>\r\n            <Grid.ColumnDefinitions>\r\n              <ColumnDefinition Width=\"18\" />\r\n              <ColumnDefinition Width=\"*\" />\r\n            </Grid.ColumnDefinitions>\r\n            <VisualStateManager.VisualStateGroups>\r\n              <VisualStateGroup x:Name=\"CommonStates\">\r\n                <VisualStateGroup.Transitions>\r\n                  <VisualTransition GeneratedDuration=\"0:0:0.2\" />\r\n                </VisualStateGroup.Transitions>\r\n                <VisualState x:Name=\"Normal\" />\r\n                <VisualState x:Name=\"MouseOver\">\r\n                  <Storyboard>\r\n                    <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"hover\" d:IsOptimized=\"True\" />\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Pressed\">\r\n                  <Storyboard>\r\n                    <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"pressed\" d:IsOptimized=\"True\" />\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Disabled\">\r\n                  <Storyboard>\r\n                    <DoubleAnimation Duration=\"0\" To=\".55\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"contentPresenter\" />\r\n                    <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"disabled\" d:IsOptimized=\"True\" />\r\n                  </Storyboard>\r\n                </VisualState>\r\n              </VisualStateGroup>\r\n              <VisualStateGroup x:Name=\"CheckStates\">\r\n                <VisualState x:Name=\"Checked\">\r\n                  <Storyboard>\r\n                    <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"checkBox\" d:IsOptimized=\"True\" />\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Unchecked\" />\r\n                <VisualState x:Name=\"Indeterminate\">\r\n                  <Storyboard>\r\n                    <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"IndeterminateIcon\" d:IsOptimized=\"True\" />\r\n                  </Storyboard>\r\n                </VisualState>\r\n              </VisualStateGroup>\r\n              <VisualStateGroup x:Name=\"FocusStates\">\r\n                <VisualState x:Name=\"Focused\">\r\n                  <Storyboard>\r\n                    <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"focused\" d:IsOptimized=\"True\" />\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Unfocused\" />\r\n              </VisualStateGroup>\r\n              <VisualStateGroup x:Name=\"ValidationStates\">\r\n                <VisualState x:Name=\"Valid\" />\r\n                <VisualState x:Name=\"InvalidUnfocused\">\r\n                  <Storyboard>\r\n                    <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"invalidUnfocused\" d:IsOptimized=\"True\" />\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"InvalidFocused\">\r\n                  <Storyboard>\r\n                    <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"invalidFocused\" d:IsOptimized=\"True\" />\r\n                  </Storyboard>\r\n                </VisualState>\r\n              </VisualStateGroup>\r\n            </VisualStateManager.VisualStateGroups>\r\n            <Rectangle x:Name=\"normal\" Opacity=\"1\" Width=\"14\" RadiusX=\"1\" RadiusY=\"1\" Stroke=\"{StaticResource CheckBoxBorderBrush}\" StrokeThickness=\"1\" HorizontalAlignment=\"Left\" Margin=\"2,2,0,0\" Height=\"14\" VerticalAlignment=\"Top\" Fill=\"{StaticResource CheckBoxBackgroundBrush}\" />\r\n            <Rectangle x:Name=\"hover\" Width=\"14\" RadiusX=\"1\" RadiusY=\"1\" Stroke=\"{StaticResource CheckBoxHoverBorderBrush}\" StrokeThickness=\"1\" HorizontalAlignment=\"Left\" Margin=\"2,2,0,0\" Height=\"14\" VerticalAlignment=\"Top\" Fill=\"{StaticResource CheckBoxBackgroundBrush}\" Opacity=\"0\" />\r\n            <Rectangle x:Name=\"pressed\" Opacity=\"0\" Width=\"14\" RadiusX=\"1\" RadiusY=\"1\" Stroke=\"{StaticResource CheckBoxFocusedBorderBrush}\" StrokeThickness=\"1\" Fill=\"{StaticResource CheckBoxBackgroundBrush}\" HorizontalAlignment=\"Left\" Margin=\"2,2,0,0\" Height=\"14\" VerticalAlignment=\"Top\" />\r\n            <Rectangle x:Name=\"focused\" Opacity=\"0\" Width=\"14\" RadiusX=\"1\" RadiusY=\"1\" Stroke=\"{StaticResource CheckBoxFocusedBorderBrush}\" StrokeThickness=\"1\" Fill=\"{StaticResource CheckBoxBackgroundBrush}\" HorizontalAlignment=\"Left\" Margin=\"2,2,0,0\" Height=\"14\" VerticalAlignment=\"Top\" />\r\n            <Rectangle x:Name=\"disabled\" Opacity=\"0\" Width=\"14\" RadiusX=\"1\" RadiusY=\"1\" Stroke=\"{StaticResource DisabledBorderBrush}\" StrokeThickness=\"1\" Fill=\"{StaticResource CheckBoxBackgroundBrush}\" HorizontalAlignment=\"Left\" Margin=\"2,2,0,0\" Height=\"14\" VerticalAlignment=\"Top\" />\r\n            <Rectangle x:Name=\"invalidUnfocused\" Opacity=\"0\" Width=\"14\" RadiusX=\"1\" RadiusY=\"1\" Stroke=\"{StaticResource InvalidUnfocusedBrush}\" StrokeThickness=\"1\" HorizontalAlignment=\"Left\" Margin=\"2,2,0,0\" Height=\"14\" VerticalAlignment=\"Top\" Fill=\"{StaticResource CheckBoxBackgroundBrush}\" />\r\n            <Rectangle x:Name=\"invalidFocused\" Opacity=\"0\" Width=\"14\" RadiusX=\"1\" RadiusY=\"1\" Stroke=\"{StaticResource InvalidFocusedBrush}\" StrokeThickness=\"1\" HorizontalAlignment=\"Left\" Margin=\"2,2,0,0\" Height=\"14\" VerticalAlignment=\"Top\" Fill=\"{StaticResource CheckBoxBackgroundBrush}\" />\r\n            <Rectangle x:Name=\"innerShadow\" Width=\"14\" StrokeThickness=\"1\" HorizontalAlignment=\"Left\" Margin=\"2,2,0,0\" Height=\"14\" VerticalAlignment=\"Top\" RadiusX=\"0.5\" RadiusY=\"0.5\" Fill=\"{StaticResource CheckBoxInnerShadowBrush}\" />\r\n            <Path x:Name=\"checkBox\" Height=\"8\" Width=\"10\" Stretch=\"Fill\" Opacity=\"0\" Fill=\"{StaticResource CheckBoxGlyphBackgroundBrush}\" HorizontalAlignment=\"Left\" Data=\"M 1145.607177734375,430 C1145.607177734375,430 1141.449951171875,435.0772705078125 1141.449951171875,435.0772705078125 1141.449951171875,435.0772705078125 1139.232177734375,433.0999755859375 1139.232177734375,433.0999755859375 1139.232177734375,433.0999755859375 1138,434.5538330078125 1138,434.5538330078125 1138,434.5538330078125 1141.482177734375,438 1141.482177734375,438 1141.482177734375,438 1141.96875,437.9375 1141.96875,437.9375 1141.96875,437.9375 1147,431.34619140625 1147,431.34619140625 1147,431.34619140625 1145.607177734375,430 1145.607177734375,430 z\" Margin=\"4,5,0,0\" UseLayoutRounding=\"False\" VerticalAlignment=\"Top\" />\r\n            <Rectangle x:Name=\"IndeterminateIcon\" Fill=\"{StaticResource CheckBoxGlyphBackgroundBrush}\" Height=\"2\" Width=\"6\" VerticalAlignment=\"Top\" Margin=\"0,8,0,0\" Opacity=\"0\" />\r\n            <ContentPresenter x:Name=\"contentPresenter\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Grid.Column=\"1\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" />\r\n          </Grid>\r\n        </ControlTemplate>\r\n      </Setter.Value>\r\n    </Setter>\r\n  </Style>\r\n\r\n  <!-- ********************************** RadioButton Style **********************************-->\r\n  <Style x:Key=\"RadioButtonStyle\" TargetType=\"RadioButton\">\r\n    <Setter Property=\"Foreground\" Value=\"{StaticResource ThemeForegroundBrush}\" />\r\n    <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n    <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n    <Setter Property=\"Padding\" Value=\"4,0,0,0\" />\r\n    <Setter Property=\"Template\">\r\n      <Setter.Value>\r\n        <ControlTemplate TargetType=\"RadioButton\">\r\n          <Grid>\r\n            <Grid.ColumnDefinitions>\r\n              <ColumnDefinition Width=\"16\" />\r\n              <ColumnDefinition Width=\"*\" />\r\n            </Grid.ColumnDefinitions>\r\n            <VisualStateManager.VisualStateGroups>\r\n              <VisualStateGroup x:Name=\"CommonStates\">\r\n                <VisualState x:Name=\"Normal\" />\r\n                <VisualState x:Name=\"MouseOver\">\r\n                  <Storyboard>\r\n                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"hoverBd\">\r\n                      <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                        <DiscreteObjectKeyFrame.Value>\r\n                          <Visibility>Visible</Visibility>\r\n                        </DiscreteObjectKeyFrame.Value>\r\n                      </DiscreteObjectKeyFrame>\r\n                    </ObjectAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Pressed\">\r\n                  <Storyboard>\r\n                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"pressedBd\">\r\n                      <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                        <DiscreteObjectKeyFrame.Value>\r\n                          <Visibility>Visible</Visibility>\r\n                        </DiscreteObjectKeyFrame.Value>\r\n                      </DiscreteObjectKeyFrame>\r\n                    </ObjectAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Disabled\">\r\n                  <Storyboard>\r\n                    <DoubleAnimation Duration=\"0\" To=\".55\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"contentPresenter\" />\r\n                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Stroke\" Storyboard.TargetName=\"RadioButtonBackground\">\r\n                      <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource RadioButtonDisabledBorderBrush}\" />\r\n                    </ObjectAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n              </VisualStateGroup>\r\n              <VisualStateGroup x:Name=\"CheckStates\">\r\n                <VisualState x:Name=\"Checked\">\r\n                  <Storyboard>\r\n                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"check\">\r\n                      <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                        <DiscreteObjectKeyFrame.Value>\r\n                          <Visibility>Visible</Visibility>\r\n                        </DiscreteObjectKeyFrame.Value>\r\n                      </DiscreteObjectKeyFrame>\r\n                    </ObjectAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Unchecked\">\r\n                  <Storyboard>\r\n                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"check\">\r\n                      <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                        <DiscreteObjectKeyFrame.Value>\r\n                          <Visibility>Collapsed</Visibility>\r\n                        </DiscreteObjectKeyFrame.Value>\r\n                      </DiscreteObjectKeyFrame>\r\n                    </ObjectAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Indeterminate\" />\r\n              </VisualStateGroup>\r\n              <VisualStateGroup x:Name=\"FocusStates\">\r\n                <VisualState x:Name=\"Unfocused\" />\r\n                <VisualState x:Name=\"Focused\" />\r\n              </VisualStateGroup>\r\n            </VisualStateManager.VisualStateGroups>\r\n            <Rectangle x:Name=\"RadioButtonBackground\" Width=\"13\" Height=\"13\" RadiusX=\"3\" RadiusY=\"3\" Fill=\"{StaticResource RadioButtonBackgroundBrush}\" Stroke=\"{StaticResource RadioButtonBorderBrush}\" StrokeThickness=\"1\" Margin=\"2,2,0,0\" />\r\n            <Rectangle x:Name=\"hoverBd\" Visibility=\"Collapsed\" Width=\"13\" Height=\"13\" RadiusX=\"3\" RadiusY=\"3\" Fill=\"{StaticResource RadioButtonBackgroundBrush}\" Stroke=\"{StaticResource RadioButtonHoverBorderBrush}\" StrokeThickness=\"1\" Margin=\"2,2,0,0\" />\r\n            <Rectangle x:Name=\"pressedBd\" Visibility=\"Collapsed\" Width=\"13\" Height=\"13\" RadiusX=\"3\" RadiusY=\"3\" Fill=\"{StaticResource RadioButtonBackgroundBrush}\" Stroke=\"{StaticResource RadioButtonPressedBorderBrush}\" StrokeThickness=\"1\" Margin=\"2,2,0,0\" />\r\n            <Rectangle x:Name=\"check\" Visibility=\"Collapsed\" Width=\"9\" Height=\"9\" RadiusX=\"2\" RadiusY=\"2\" Stroke=\"{StaticResource RadioButtonCheckBorderBrush}\" StrokeThickness=\"1\" Fill=\"{StaticResource RadioButtonCheckBackgroundBrush}\" Margin=\"2,2,0,0\" />\r\n            <ContentPresenter x:Name=\"contentPresenter\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Grid.Column=\"1\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" />\r\n          </Grid>\r\n        </ControlTemplate>\r\n      </Setter.Value>\r\n    </Setter>\r\n  </Style>\r\n\r\n  <!-- *********************************  ComboBoxToggleButton Style   ********************************* -->\r\n  <Style x:Key=\"ComboToggleStyle\" TargetType=\"ToggleButton\">\r\n    <Setter Property=\"Background\" Value=\"{StaticResource ComboBoxBackgroundBrush}\" />\r\n    <Setter Property=\"BorderBrush\" Value=\"{StaticResource ComboBoxBorderBrush}\" />\r\n    <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n    <Setter Property=\"Foreground\" Value=\"{StaticResource ThemeLightForegroundBrush}\" />\r\n    <Setter Property=\"Padding\" Value=\"5,0,5,0\" />\r\n    <Setter Property=\"Template\">\r\n      <Setter.Value>\r\n        <ControlTemplate TargetType=\"ToggleButton\">\r\n          <Grid>\r\n            <VisualStateManager.VisualStateGroups>\r\n              <VisualStateGroup x:Name=\"CommonStates\">\r\n                <VisualState x:Name=\"Normal\" />\r\n                <VisualState x:Name=\"MouseOver\">\r\n                  <Storyboard>\r\n                    <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"hover\" d:IsOptimized=\"True\" />\r\n                    <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"arrowHover\" d:IsOptimized=\"True\" />\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Pressed\">\r\n                  <Storyboard>\r\n                    <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"pressed\" d:IsOptimized=\"True\" />\r\n                    <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"arrowHover\" d:IsOptimized=\"True\" />\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Disabled\">\r\n                  <Storyboard>\r\n                    <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"disabled\" d:IsOptimized=\"True\" />\r\n                    <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"arrowDisabled\" d:IsOptimized=\"True\" />\r\n                  </Storyboard>\r\n                </VisualState>\r\n              </VisualStateGroup>\r\n              <VisualStateGroup x:Name=\"CheckStates\">\r\n                <VisualState x:Name=\"Checked\">\r\n                  <Storyboard>\r\n                    <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"focused\" d:IsOptimized=\"True\" />\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Unchecked\" />\r\n                <VisualState x:Name=\"Indeterminate\" />\r\n              </VisualStateGroup>\r\n              <VisualStateGroup x:Name=\"FocusStates\">\r\n                <VisualState x:Name=\"Focused\" />\r\n                <VisualState x:Name=\"Unfocused\" />\r\n              </VisualStateGroup>\r\n            </VisualStateManager.VisualStateGroups>\r\n            <Grid.ColumnDefinitions>\r\n              <ColumnDefinition Width=\"*\" />\r\n              <ColumnDefinition Width=\"22\" />\r\n            </Grid.ColumnDefinitions>\r\n            <Rectangle Fill=\"Transparent\" HorizontalAlignment=\"Stretch\" />\r\n            <Rectangle x:Name=\"normal\" Fill=\"{StaticResource ToggleButtonBackgroundBrush}\" Stroke=\"{StaticResource ToggleButtonBorderBrush}\" RadiusX=\"3\" Grid.Column=\"1\" RadiusY=\"3\" Width=\"{Binding Height, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" />\r\n            <Rectangle x:Name=\"hover\" Fill=\"{StaticResource ToggleButtonHoverBackgroundBrush}\" Stroke=\"{StaticResource ToggleButtonHoverBorderBrush}\" RadiusX=\"3\" Grid.Column=\"1\" RadiusY=\"3\" Opacity=\"0\" />\r\n            <Rectangle x:Name=\"pressed\" Fill=\"{StaticResource ToggleButtonPressedBackgroundBrush}\" Stroke=\"{StaticResource ToggleButtonPressedBorderBrush}\" RadiusX=\"3\" Grid.Column=\"1\" RadiusY=\"3\" Opacity=\"0\" />\r\n            <Rectangle x:Name=\"disabled\" Fill=\"{StaticResource ToggleButtonDisabledBackgroundBrush}\" Stroke=\"{StaticResource ToggleButtonDisabledBorderBrush}\" RadiusX=\"3\" Grid.Column=\"1\" RadiusY=\"3\" Opacity=\"0\" />\r\n            <Rectangle x:Name=\"focused\" Fill=\"{StaticResource ToggleButtonFocusedBackgroundBrush}\" Stroke=\"{StaticResource ToggleButtonFocusedBorderBrush}\" RadiusX=\"3\" Grid.Column=\"1\" RadiusY=\"3\" Opacity=\"0\" />\r\n            <Path x:Name=\"BtnArrow\" Stretch=\"Uniform\" Height=\"4\" Fill=\"White\" Data=\"F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z\" Grid.Column=\"1\" UseLayoutRounding=\"False\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" />\r\n            <Path HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\" Height=\"7\" Width=\"10\" Stretch=\"Fill\" Opacity=\"1\" Data=\"M 17,19 C17,19 12,26 12,26 12,26 7,19 7,19 7,19 17,19 17,19 z\" Stroke=\"{StaticResource DarkGrayBorderBrush}\" Fill=\"{TemplateBinding Foreground}\" Grid.Column=\"1\" StrokeThickness=\"{TemplateBinding BorderThickness}\" />\r\n            <Path x:Name=\"arrowHover\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\" Height=\"7\" Width=\"10\" Stretch=\"Fill\" Opacity=\"0\" Data=\"M 17,19 C17,19 12,26 12,26 12,26 7,19 7,19 7,19 17,19 17,19 z\" Stroke=\"{StaticResource ArrowHoverBorderBrush}\" Fill=\"{TemplateBinding Foreground}\" Grid.Column=\"1\" StrokeThickness=\"{TemplateBinding BorderThickness}\" />\r\n            <Path x:Name=\"arrowDisabled\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\" Height=\"7\" Width=\"10\" Stretch=\"Fill\" Opacity=\"0\" Data=\"M 17,19 C17,19 12,26 12,26 12,26 7,19 7,19 7,19 17,19 17,19 z\" Stroke=\"{StaticResource ArrowDisabledBorderBrush}\" Fill=\"{TemplateBinding Foreground}\" Grid.Column=\"1\" StrokeThickness=\"{TemplateBinding BorderThickness}\" />\r\n          </Grid>\r\n        </ControlTemplate>\r\n      </Setter.Value>\r\n    </Setter>\r\n  </Style>\r\n\r\n  <!-- *********************************  ComboBoxItem Style  ********************************* -->\r\n  <Style x:Key=\"ComboBoxItemStyle\" TargetType=\"ComboBoxItem\">\r\n    <Setter Property=\"Padding\" Value=\"5,3,5,3\" />\r\n    <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n    <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n    <Setter Property=\"Background\" Value=\"{StaticResource TransparentBrush}\" />\r\n    <Setter Property=\"Foreground\" Value=\"{StaticResource ThemeForegroundBrush}\" />\r\n    <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n    <Setter Property=\"Template\">\r\n      <Setter.Value>\r\n        <ControlTemplate TargetType=\"ComboBoxItem\">\r\n          <Grid Background=\"{TemplateBinding Background}\">\r\n            <VisualStateManager.VisualStateGroups>\r\n              <VisualStateGroup x:Name=\"CommonStates\">\r\n                <VisualState x:Name=\"Normal\" />\r\n                <VisualState x:Name=\"MouseOver\">\r\n                  <Storyboard>\r\n                    <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"fillColor\" />\r\n                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"contentControl\" Storyboard.TargetProperty=\"Foreground\">\r\n                      <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ThemeLightForegroundBrush}\" />\r\n                    </ObjectAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Disabled\">\r\n                  <Storyboard>\r\n                    <DoubleAnimation Duration=\"0\" To=\"0.5\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"contentControl\" d:IsOptimized=\"True\" />\r\n                  </Storyboard>\r\n                </VisualState>\r\n              </VisualStateGroup>\r\n              <VisualStateGroup x:Name=\"SelectionStates\">\r\n                <VisualState x:Name=\"Unselected\" />\r\n                <VisualState x:Name=\"Selected\" />\r\n                <VisualState x:Name=\"SelectedUnfocused\" />\r\n              </VisualStateGroup>\r\n              <VisualStateGroup x:Name=\"FocusStates\">\r\n                <VisualState x:Name=\"Focused\">\r\n                  <Storyboard>\r\n                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                      <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                        <DiscreteObjectKeyFrame.Value>\r\n                          <Visibility>Visible</Visibility>\r\n                        </DiscreteObjectKeyFrame.Value>\r\n                      </DiscreteObjectKeyFrame>\r\n                    </ObjectAnimationUsingKeyFrames>\r\n                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"contentControl1\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                      <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                        <DiscreteObjectKeyFrame.Value>\r\n                          <Visibility>Collapsed</Visibility>\r\n                        </DiscreteObjectKeyFrame.Value>\r\n                      </DiscreteObjectKeyFrame>\r\n                    </ObjectAnimationUsingKeyFrames>\r\n                    <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"contentControl1\" d:IsOptimized=\"True\" />\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Unfocused\" />\r\n              </VisualStateGroup>\r\n              <VisualStateGroup x:Name=\"LayoutStates\">\r\n                <VisualState x:Name=\"AfterLoaded\" />\r\n                <VisualState x:Name=\"BeforeLoaded\" />\r\n                <VisualState x:Name=\"BeforeUnloaded\" />\r\n              </VisualStateGroup>\r\n            </VisualStateManager.VisualStateGroups>\r\n            <Rectangle x:Name=\"fillColor\" Fill=\"{StaticResource ComboBoxItemHoverBackgroundBrush}\" IsHitTestVisible=\"False\" Opacity=\"0\" RadiusY=\"1\" RadiusX=\"1\" Stroke=\"{StaticResource ComboBoxItemHoverBorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" />\r\n            <Rectangle x:Name=\"FocusVisualElement\" RadiusY=\"1\" RadiusX=\"1\" Stroke=\"{StaticResource ComboBoxItemFocusedBorderBrush}\" Visibility=\"Collapsed\" StrokeThickness=\"{TemplateBinding BorderThickness}\" />\r\n            <ContentControl x:Name=\"contentControl\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" Foreground=\"{TemplateBinding Foreground}\">\r\n              <ContentPresenter x:Name=\"contentPresenter\" />\r\n            </ContentControl>\r\n            <ContentControl x:Name=\"contentControl1\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Opacity=\"0\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" Foreground=\"{TemplateBinding Foreground}\">\r\n              <ContentPresenter x:Name=\"contentPresenter1\" />\r\n            </ContentControl>\r\n          </Grid>\r\n        </ControlTemplate>\r\n      </Setter.Value>\r\n    </Setter>\r\n  </Style>\r\n\r\n  <!-- *********************************  ListBoxItem Style  ********************************* -->\r\n  <Style x:Key=\"ListBoxItemStyle\" TargetType=\"ListBoxItem\">\r\n    <Setter Property=\"Background\" Value=\"{StaticResource TransparentBrush}\" />\r\n    <Setter Property=\"Foreground\" Value=\"{StaticResource ThemeForegroundBrush}\" />\r\n    <Setter Property=\"TextOptions.TextHintingMode\" Value=\"Animated\" />\r\n    <Setter Property=\"Padding\" Value=\"3\" />\r\n    <Setter Property=\"Margin\" Value=\"0\" />\r\n    <Setter Property=\"Height\" Value=\"22\" />\r\n    <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n    <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n    <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n    <Setter Property=\"Template\">\r\n      <Setter.Value>\r\n        <ControlTemplate TargetType=\"ListBoxItem\">\r\n          <Grid Background=\"{TemplateBinding Background}\">\r\n            <VisualStateManager.VisualStateGroups>\r\n              <VisualStateGroup x:Name=\"CommonStates\">\r\n                <VisualState x:Name=\"Normal\">\r\n                  <Storyboard>\r\n                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"contentControl\">\r\n                      <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ThemeForegroundBrush}\" />\r\n                    </ObjectAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"MouseOver\">\r\n                  <Storyboard>\r\n                    <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"hover\" />\r\n                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"contentControl\">\r\n                      <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ThemeLightForegroundBrush}\" />\r\n                    </ObjectAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Disabled\">\r\n                  <Storyboard>\r\n                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"contentPresenter\">\r\n                      <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\" />\r\n                    </DoubleAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n              </VisualStateGroup>\r\n              <VisualStateGroup x:Name=\"SelectionStates\">\r\n                <VisualState x:Name=\"Unselected\" />\r\n                <VisualState x:Name=\"Selected\">\r\n                  <Storyboard>\r\n                    <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"selected\" />\r\n                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"SelectedContent\">\r\n                      <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                        <DiscreteObjectKeyFrame.Value>\r\n                          <Visibility>Visible</Visibility>\r\n                        </DiscreteObjectKeyFrame.Value>\r\n                      </DiscreteObjectKeyFrame>\r\n                    </ObjectAnimationUsingKeyFrames>\r\n                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"contentControl\">\r\n                      <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                        <DiscreteObjectKeyFrame.Value>\r\n                          <Visibility>Collapsed</Visibility>\r\n                        </DiscreteObjectKeyFrame.Value>\r\n                      </DiscreteObjectKeyFrame>\r\n                    </ObjectAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"SelectedUnfocused\">\r\n                  <Storyboard>\r\n                    <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"selected\" />\r\n                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"SelectedContent\">\r\n                      <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                        <DiscreteObjectKeyFrame.Value>\r\n                          <Visibility>Visible</Visibility>\r\n                        </DiscreteObjectKeyFrame.Value>\r\n                      </DiscreteObjectKeyFrame>\r\n                    </ObjectAnimationUsingKeyFrames>\r\n                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"contentControl\">\r\n                      <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                        <DiscreteObjectKeyFrame.Value>\r\n                          <Visibility>Collapsed</Visibility>\r\n                        </DiscreteObjectKeyFrame.Value>\r\n                      </DiscreteObjectKeyFrame>\r\n                    </ObjectAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n              </VisualStateGroup>\r\n              <VisualStateGroup x:Name=\"FocusStates\">\r\n                <VisualState x:Name=\"Focused\">\r\n                  <Storyboard>\r\n                    <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"focused\" />\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Unfocused\" />\r\n              </VisualStateGroup>\r\n              <VisualStateGroup x:Name=\"LayoutStates\">\r\n                <VisualState x:Name=\"AfterLoaded\" />\r\n                <VisualState x:Name=\"BeforeLoaded\" />\r\n                <VisualState x:Name=\"BeforeUnloaded\" />\r\n              </VisualStateGroup>\r\n            </VisualStateManager.VisualStateGroups>\r\n            <Rectangle x:Name=\"hover\" Fill=\"{StaticResource ListBoxItemHoverBackgroundBrush}\" IsHitTestVisible=\"False\" Opacity=\"0\" RadiusY=\"1\" RadiusX=\"1\" />\r\n            <Rectangle x:Name=\"selected\" Fill=\"{StaticResource LIstBoxItemSelectedBackgroundBrush}\" IsHitTestVisible=\"False\" Opacity=\"0\" RadiusY=\"1\" RadiusX=\"1\" Stroke=\"{StaticResource ListBoxItemFocusedBorderBrush}\" />\r\n            <Rectangle x:Name=\"focused\" IsHitTestVisible=\"False\" Opacity=\"0\" RadiusY=\"1\" RadiusX=\"1\" Stroke=\"{StaticResource ListBoxItemFocusedBorderBrush}\" />\r\n            <ContentControl x:Name=\"contentControl\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\">\r\n              <ContentPresenter x:Name=\"contentPresenter\" Margin=\"5,3,5,0\" />\r\n            </ContentControl>\r\n            <ContentControl x:Name=\"SelectedContent\" Visibility=\"Collapsed\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\">\r\n              <ContentPresenter x:Name=\"contentPresenter2\" Margin=\"5,3,5,0\" />\r\n            </ContentControl>\r\n          </Grid>\r\n        </ControlTemplate>\r\n      </Setter.Value>\r\n    </Setter>\r\n  </Style>\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/IG/Styles.WPF.xaml",
    "content": "<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\" xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" xmlns:System=\"clr-namespace:System;assembly=mscorlib\" mc:Ignorable=\"d\">\r\n\r\n  <!-- *********************************  RESOURCES  ********************************* -->\r\n  <ResourceDictionary.MergedDictionaries>\r\n    <ResourceDictionary Source=\"Theme.Colors.xaml\" />\r\n    <ResourceDictionary Source=\"Styles.Shared.xaml\" />\r\n  </ResourceDictionary.MergedDictionaries>\r\n\r\n  <!-- ******************************************************** WPF SPECIFIC INLINE-CONTROLS RESOURCES ***********************************************************\r\n    ***********************************************************************************************************************************************************************    -->\r\n  <!-- *********************************  ScrollBarButton Style  ********************************* -->\r\n  <Style x:Key=\"ScrollBarButtonStyle\" TargetType=\"{x:Type RepeatButton}\">\r\n    <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n    <Setter Property=\"Focusable\" Value=\"false\" />\r\n    <Setter Property=\"IsTabStop\" Value=\"false\" />\r\n    <Setter Property=\"Template\">\r\n      <Setter.Value>\r\n        <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n          <Grid x:Name=\"grid1\">\r\n            <VisualStateManager.VisualStateGroups>\r\n              <VisualStateGroup x:Name=\"CommonStates\">\r\n                <VisualState x:Name=\"Normal\" />\r\n                <VisualState x:Name=\"MouseOver\">\r\n                  <Storyboard>\r\n                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"hover\">\r\n                      <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                    </DoubleAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Pressed\">\r\n                  <Storyboard>\r\n                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"pressed\">\r\n                      <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                    </DoubleAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Disabled\">\r\n                  <Storyboard>\r\n                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"normal\">\r\n                      <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\" />\r\n                    </DoubleAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n              </VisualStateGroup>\r\n            </VisualStateManager.VisualStateGroups>\r\n            <Rectangle Fill=\"Transparent\" />\r\n            <Path x:Name=\"normal\" Data=\"F1 M 541.537,173.589L 531.107,173.589L 536.322,167.49L 541.537,173.589 Z \" Height=\"5\" Stretch=\"Uniform\" Width=\"8\" Stroke=\"{StaticResource ArrowDarkBorderBrush}\" Fill=\"{StaticResource ArrowBackgroundBrush}\" />\r\n            <Path x:Name=\"hover\" Data=\"F1 M 541.537,173.589L 531.107,173.589L 536.322,167.49L 541.537,173.589 Z \" Height=\"5\" Stretch=\"Uniform\" Width=\"8\" Fill=\"{StaticResource ButtonFocusedBorderBrush}\" Opacity=\"0\" Stroke=\"{StaticResource ArrowHoverBorderBrush}\" />\r\n            <Path x:Name=\"pressed\" Data=\"F1 M 541.537,173.589L 531.107,173.589L 536.322,167.49L 541.537,173.589 Z \" Height=\"5\" Stretch=\"Uniform\" Width=\"8\" Fill=\"{StaticResource ButtonHoverBorderBrush}\" Opacity=\"0\" Stroke=\"{StaticResource ArrowHoverBorderBrush}\" />\r\n          </Grid>\r\n        </ControlTemplate>\r\n      </Setter.Value>\r\n    </Setter>\r\n  </Style>\r\n\r\n  <!-- *********************************  ScrollBarPageButton Style  ********************************* -->\r\n  <Style x:Key=\"ScrollBarPageButtonStyle\" TargetType=\"{x:Type RepeatButton}\">\r\n    <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n    <Setter Property=\"Background\" Value=\"Transparent\" />\r\n    <Setter Property=\"Focusable\" Value=\"false\" />\r\n    <Setter Property=\"IsTabStop\" Value=\"false\" />\r\n    <Setter Property=\"Template\">\r\n      <Setter.Value>\r\n        <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n          <Rectangle Fill=\"{TemplateBinding Background}\" Height=\"{TemplateBinding Height}\" Width=\"{TemplateBinding Width}\" />\r\n        </ControlTemplate>\r\n      </Setter.Value>\r\n    </Setter>\r\n  </Style>\r\n\r\n  <!-- *********************************  Horizontal ScrollBarThumb Style  ********************************* -->\r\n  <Style x:Key=\"HScrollBarThumbStyle\" TargetType=\"{x:Type Thumb}\">\r\n    <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n    <Setter Property=\"IsTabStop\" Value=\"false\" />\r\n    <Setter Property=\"Template\">\r\n      <Setter.Value>\r\n        <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n          <Grid Margin=\"0\">\r\n            <VisualStateManager.VisualStateGroups>\r\n              <VisualStateGroup x:Name=\"CommonStates\">\r\n                <VisualState x:Name=\"Normal\" />\r\n                <VisualState x:Name=\"MouseOver\">\r\n                  <Storyboard>\r\n                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"hover\">\r\n                      <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                    </DoubleAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Pressed\">\r\n                  <Storyboard>\r\n                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"pressed\">\r\n                      <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                    </DoubleAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Disabled\">\r\n                  <Storyboard>\r\n                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"normal\">\r\n                      <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\" />\r\n                    </DoubleAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n              </VisualStateGroup>\r\n            </VisualStateManager.VisualStateGroups>\r\n            <Rectangle x:Name=\"normal\" RadiusY=\"2\" RadiusX=\"2\" StrokeThickness=\"1\" Margin=\"1\" Fill=\"{StaticResource HScrollbarThumbBackgroundBrush}\" Stroke=\"{StaticResource ArrowDarkBorderBrush}\" />\r\n            <Rectangle x:Name=\"hover\" RadiusY=\"2\" RadiusX=\"2\" StrokeThickness=\"1\" Margin=\"1\" Fill=\"{StaticResource HScrollbarThumbHoverBackgroundBrush}\" Opacity=\"0\" Stroke=\"{StaticResource ArrowHoverBorderBrush}\" />\r\n            <Rectangle x:Name=\"pressed\" Fill=\"{StaticResource HScrollbarThumbPressedBackgroundBrush}\" RadiusY=\"2\" RadiusX=\"2\" StrokeThickness=\"1\" Margin=\"1\" Opacity=\"0\" Stroke=\"{StaticResource ArrowHoverBorderBrush}\" />\r\n          </Grid>\r\n        </ControlTemplate>\r\n      </Setter.Value>\r\n    </Setter>\r\n  </Style>\r\n\r\n  <!-- *********************************  Vertical ScrollbarThumb Style  ********************************* -->\r\n  <Style x:Key=\"VScrollBarThumbStyle\" TargetType=\"{x:Type Thumb}\">\r\n    <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n    <Setter Property=\"Stylus.IsPressAndHoldEnabled\" Value=\"false\" />\r\n    <Setter Property=\"Template\">\r\n      <Setter.Value>\r\n        <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n          <Grid x:Name=\"grid\" Height=\"Auto\" Width=\"Auto\">\r\n            <VisualStateManager.VisualStateGroups>\r\n              <VisualStateGroup x:Name=\"CommonStates\">\r\n                <VisualState x:Name=\"Normal\" />\r\n                <VisualState x:Name=\"MouseOver\">\r\n                  <Storyboard>\r\n                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"hover\">\r\n                      <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                    </DoubleAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Pressed\">\r\n                  <Storyboard>\r\n                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"pressed\">\r\n                      <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                    </DoubleAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Disabled\">\r\n                  <Storyboard>\r\n                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"normal\">\r\n                      <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0.4\" />\r\n                    </DoubleAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n              </VisualStateGroup>\r\n            </VisualStateManager.VisualStateGroups>\r\n            <Rectangle x:Name=\"normal\" RadiusY=\"2\" RadiusX=\"2\" StrokeThickness=\"1\" Margin=\"1\" Stroke=\"{StaticResource ArrowDarkBorderBrush}\" Fill=\"{StaticResource HScrollbarThumbBackgroundBrush}\">\r\n\r\n            </Rectangle>\r\n            <Rectangle x:Name=\"hover\" RadiusY=\"2\" RadiusX=\"2\" StrokeThickness=\"1\" Margin=\"1\" Fill=\"{StaticResource VScrollbarThumbHoverBackgroundBrush}\" Opacity=\"0\" Stroke=\"{StaticResource ArrowHoverBorderBrush}\" />\r\n            <Rectangle x:Name=\"pressed\" Fill=\"{StaticResource VScrollbarThumbPressedBackgroundBrush}\" RadiusY=\"2\" RadiusX=\"2\" StrokeThickness=\"1\" Margin=\"1\" Opacity=\"0\" Stroke=\"{StaticResource ArrowHoverBorderBrush}\" />\r\n          </Grid>\r\n        </ControlTemplate>\r\n      </Setter.Value>\r\n    </Setter>\r\n  </Style>\r\n\r\n  <!-- *********************************  ScrollBar Style  ********************************* -->\r\n  <Style x:Key=\"ScrollbarStyle\" TargetType=\"{x:Type ScrollBar}\">\r\n    <Setter Property=\"Stylus.IsPressAndHoldEnabled\" Value=\"false\" />\r\n    <Setter Property=\"Stylus.IsFlicksEnabled\" Value=\"false\" />\r\n    <Setter Property=\"Width\" Value=\"20\" />\r\n    <Setter Property=\"MinWidth\" Value=\"20\" />\r\n    <Setter Property=\"Template\">\r\n      <Setter.Value>\r\n        <ControlTemplate TargetType=\"{x:Type ScrollBar}\">\r\n          <Grid x:Name=\"Bg\" SnapsToDevicePixels=\"true\">\r\n            <Grid.RowDefinitions>\r\n              <RowDefinition MaxHeight=\"{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}\" />\r\n              <RowDefinition Height=\"0.00001*\" />\r\n              <RowDefinition MaxHeight=\"{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}\" />\r\n            </Grid.RowDefinitions>\r\n            <VisualStateManager.VisualStateGroups>\r\n              <VisualStateGroup x:Name=\"CommonStates\">\r\n                <VisualStateGroup.Transitions>\r\n                  <VisualTransition GeneratedDuration=\"0:0:0.3\" />\r\n                </VisualStateGroup.Transitions>\r\n                <VisualState x:Name=\"Normal\" />\r\n                <VisualState x:Name=\"MouseOver\" />\r\n                <VisualState x:Name=\"Disabled\">\r\n                  <Storyboard>\r\n                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"repeatButton\">\r\n                      <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0.6\" />\r\n                    </DoubleAnimationUsingKeyFrames>\r\n                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"repeatButton1\">\r\n                      <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0.6\" />\r\n                    </DoubleAnimationUsingKeyFrames>\r\n                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"thumb\">\r\n                      <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0\" />\r\n                    </DoubleAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n              </VisualStateGroup>\r\n            </VisualStateManager.VisualStateGroups>\r\n            <Rectangle Grid.RowSpan=\"3\" StrokeThickness=\"1\" Fill=\"{StaticResource VScrollbarBackgroundBrush}\" Stroke=\"{StaticResource ScrollbarBorderBrush}\" Margin=\"0\" />\r\n            <RepeatButton x:Name=\"repeatButton\" Margin=\"1\" Command=\"{x:Static ScrollBar.LineUpCommand}\" Style=\"{StaticResource ScrollBarButtonStyle}\" />\r\n            <Track x:Name=\"PART_Track\" IsDirectionReversed=\"true\" Grid.Row=\"1\">\r\n              <Track.DecreaseRepeatButton>\r\n                <RepeatButton Command=\"{x:Static ScrollBar.PageUpCommand}\" Style=\"{StaticResource ScrollBarPageButtonStyle}\" />\r\n              </Track.DecreaseRepeatButton>\r\n              <Track.IncreaseRepeatButton>\r\n                <RepeatButton Command=\"{x:Static ScrollBar.PageDownCommand}\" Style=\"{StaticResource ScrollBarPageButtonStyle}\" />\r\n              </Track.IncreaseRepeatButton>\r\n              <Track.Thumb>\r\n                <Thumb x:Name=\"thumb\" Style=\"{StaticResource VScrollBarThumbStyle}\" Margin=\"5,0\" />\r\n              </Track.Thumb>\r\n            </Track>\r\n            <RepeatButton x:Name=\"repeatButton1\" Command=\"{x:Static ScrollBar.LineDownCommand}\" Grid.Row=\"2\" Style=\"{StaticResource ScrollBarButtonStyle}\" Margin=\"1\" RenderTransformOrigin=\"0.5,0.5\">\r\n              <RepeatButton.RenderTransform>\r\n                <TransformGroup>\r\n                  <ScaleTransform />\r\n                  <SkewTransform />\r\n                  <RotateTransform Angle=\"180\" />\r\n                  <TranslateTransform />\r\n                </TransformGroup>\r\n              </RepeatButton.RenderTransform>\r\n              <Path x:Name=\"smallIncreaseGlyph\" Width=\"9\" Height=\"5\" Data=\"M 4,5 C4,5 4,4 4,4 4,4 3,4 3,4 3,4 3,3 3,3 3,3 2,3 2,3 2,3 2,2 2,2 2,2 1,2 1,2 1,2 1,1 1,1 1,1 0,1 0,1 0,1 0,0 0,0 0,0 9,0 9,0 9,0 9,1 9,1 9,1 8,1 8,1 8,1 8,2 8,2 8,2 7,2 7,2 7,2 7,3 7,3 7,3 6,3 6,3 6,3 6,4 6,4 6,4 5,4 5,4 5,4 5,5 5,5 5,5 4,5 4,5 z\" IsHitTestVisible=\"False\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" d:LayoutOverrides=\"Width, Height, Margin\" Fill=\"Lime\">\r\n              </Path>\r\n            </RepeatButton>\r\n          </Grid>\r\n          <ControlTemplate.Triggers>\r\n            <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n              <Setter Property=\"Background\" TargetName=\"Bg\" Value=\"{StaticResource DisabledBackgroundBrush}\" />\r\n            </Trigger>\r\n          </ControlTemplate.Triggers>\r\n        </ControlTemplate>\r\n      </Setter.Value>\r\n    </Setter>\r\n    <Style.Triggers>\r\n      <Trigger Property=\"Orientation\" Value=\"Horizontal\">\r\n        <Setter Property=\"Width\" Value=\"Auto\" />\r\n        <Setter Property=\"MinWidth\" Value=\"0\" />\r\n        <Setter Property=\"Height\" Value=\"20\" />\r\n        <Setter Property=\"MinHeight\" Value=\"20\" />\r\n        <Setter Property=\"Template\">\r\n          <Setter.Value>\r\n            <ControlTemplate TargetType=\"{x:Type ScrollBar}\">\r\n              <Grid x:Name=\"Bg\" SnapsToDevicePixels=\"true\">\r\n                <Grid.ColumnDefinitions>\r\n                  <ColumnDefinition MaxWidth=\"{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}\" />\r\n                  <ColumnDefinition Width=\"0.00001*\" />\r\n                  <ColumnDefinition MaxWidth=\"{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}\" />\r\n                </Grid.ColumnDefinitions>\r\n                <VisualStateManager.VisualStateGroups>\r\n                  <VisualStateGroup x:Name=\"CommonStates\">\r\n                    <VisualStateGroup.Transitions>\r\n                      <VisualTransition GeneratedDuration=\"0:0:0.3\" />\r\n                    </VisualStateGroup.Transitions>\r\n                    <VisualState x:Name=\"Normal\" />\r\n                    <VisualState x:Name=\"MouseOver\">\r\n                      <Storyboard>\r\n                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"repeatButton\">\r\n                          <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                        </DoubleAnimationUsingKeyFrames>\r\n                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"repeatButton1\">\r\n                          <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                        </DoubleAnimationUsingKeyFrames>\r\n                      </Storyboard>\r\n                    </VisualState>\r\n                    <VisualState x:Name=\"Disabled\" />\r\n                  </VisualStateGroup>\r\n                </VisualStateManager.VisualStateGroups>\r\n                <Rectangle Grid.ColumnSpan=\"5\" StrokeThickness=\"1\" Fill=\"{StaticResource HScrollbarBackgroundBrush}\" Stroke=\"{StaticResource ScrollbarBorderBrush}\" />\r\n                <RepeatButton x:Name=\"repeatButton\" Command=\"{x:Static ScrollBar.LineLeftCommand}\" Style=\"{StaticResource ScrollBarButtonStyle}\" Opacity=\"1\" RenderTransformOrigin=\"0.5,0.5\">\r\n                  <RepeatButton.RenderTransform>\r\n                    <TransformGroup>\r\n                      <ScaleTransform />\r\n                      <SkewTransform />\r\n                      <RotateTransform Angle=\"-90\" />\r\n                      <TranslateTransform />\r\n                    </TransformGroup>\r\n                  </RepeatButton.RenderTransform>\r\n                  <Path x:Name=\"horizontalSmallDecreaseGlyph\" Width=\"5\" Height=\"9\" Data=\"M 0,4 C0,4 1,4 1,4 1,4 1,3 1,3 1,3 2,3 2,3 2,3 2,2 2,2 2,2 3,2 3,2 3,2 3,1 3,1 3,1 4,1 4,1 4,1 4,0 4,0 4,0 5,0 5,0 5,0 5,9 5,9 5,9 4,9 4,9 4,9 4,8 4,8 4,8 3,8 3,8 3,8 3,7 3,7 3,7 2,7 2,7 2,7 2,6 2,6 2,6 1,6 1,6 1,6 1,5 1,5 1,5 0,5 0,5 0,5 0,4 0,4 z\" IsHitTestVisible=\"False\" HorizontalAlignment=\"Center\" Margin=\"0\" d:LayoutOverrides=\"Width\" VerticalAlignment=\"Center\" Fill=\"Magenta\">\r\n                  </Path>\r\n                </RepeatButton>\r\n                <Track x:Name=\"PART_Track\" Grid.Column=\"1\">\r\n                  <Track.DecreaseRepeatButton>\r\n                    <RepeatButton Command=\"{x:Static ScrollBar.PageLeftCommand}\" Style=\"{StaticResource ScrollBarPageButtonStyle}\" />\r\n                  </Track.DecreaseRepeatButton>\r\n                  <Track.IncreaseRepeatButton>\r\n                    <RepeatButton Command=\"{x:Static ScrollBar.PageRightCommand}\" Style=\"{StaticResource ScrollBarPageButtonStyle}\" />\r\n                  </Track.IncreaseRepeatButton>\r\n                  <Track.Thumb>\r\n                    <Thumb Style=\"{StaticResource HScrollBarThumbStyle}\" Margin=\"0,5\" />\r\n                  </Track.Thumb>\r\n                </Track>\r\n                <RepeatButton x:Name=\"repeatButton1\" Grid.Column=\"2\" Command=\"{x:Static ScrollBar.LineRightCommand}\" Style=\"{StaticResource ScrollBarButtonStyle}\" Opacity=\"1\" RenderTransformOrigin=\"0.5,0.5\">\r\n                  <RepeatButton.RenderTransform>\r\n                    <TransformGroup>\r\n                      <ScaleTransform />\r\n                      <SkewTransform />\r\n                      <RotateTransform Angle=\"90\" />\r\n                      <TranslateTransform />\r\n                    </TransformGroup>\r\n                  </RepeatButton.RenderTransform>\r\n                  <Path x:Name=\"horizontalSmallIncreaseGlyph\" Width=\"5\" Height=\"9\" Data=\"M 5,4 C5,4 4,4 4,4 4,4 4,3 4,3 4,3 3,3 3,3 3,3 3,2 3,2 3,2 2,2 2,2 2,2 2,1 2,1 2,1 1,1 1,1 1,1 1,0 1,0 1,0 0,0 0,0 0,0 0,9 0,9 0,9 1,9 1,9 1,9 1,8 1,8 1,8 2,8 2,8 2,8 2,7 2,7 2,7 3,7 3,7 3,7 3,6 3,6 3,6 4,6 4,6 4,6 4,5 4,5 4,5 5,5 5,5 5,5 5,4 5,4 z\" IsHitTestVisible=\"False\" HorizontalAlignment=\"Center\" Margin=\"0\" d:LayoutOverrides=\"Width\" VerticalAlignment=\"Center\" Fill=\"Cyan\">\r\n                  </Path>\r\n                </RepeatButton>\r\n              </Grid>\r\n              <ControlTemplate.Triggers>\r\n                <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                  <Setter Property=\"Background\" TargetName=\"Bg\" Value=\"{StaticResource DisabledBackgroundBrush}\" />\r\n                </Trigger>\r\n              </ControlTemplate.Triggers>\r\n            </ControlTemplate>\r\n          </Setter.Value>\r\n        </Setter>\r\n      </Trigger>\r\n    </Style.Triggers>\r\n  </Style>\r\n\r\n  <!-- *********************************  ScrollViewer Style ********************************* -->\r\n  <Style x:Key=\"ScrollViewerStyle\" TargetType=\"{x:Type ScrollViewer}\">\r\n    <Setter Property=\"Foreground\" Value=\"{StaticResource ThemeForegroundBrush}\" />\r\n    <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n    <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n    <Setter Property=\"VerticalScrollBarVisibility\" Value=\"Auto\" />\r\n    <Setter Property=\"Padding\" Value=\"0\" />\r\n    <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n    <Setter Property=\"Template\">\r\n      <Setter.Value>\r\n        <ControlTemplate TargetType=\"{x:Type ScrollViewer}\">\r\n          <Grid x:Name=\"Grid\">\r\n            <Grid.ColumnDefinitions>\r\n              <ColumnDefinition Width=\"*\" />\r\n              <ColumnDefinition Width=\"Auto\" />\r\n            </Grid.ColumnDefinitions>\r\n            <Grid.RowDefinitions>\r\n              <RowDefinition Height=\"*\" />\r\n              <RowDefinition Height=\"Auto\" />\r\n            </Grid.RowDefinitions>\r\n            <Rectangle x:Name=\"Corner\" Grid.Column=\"1\" Fill=\"{StaticResource ScrollviewerCornerBackgroundBrush}\" Grid.Row=\"1\" Opacity=\"0.5\" />\r\n            <ScrollContentPresenter x:Name=\"PART_ScrollContentPresenter\" CanContentScroll=\"{TemplateBinding CanContentScroll}\" CanHorizontallyScroll=\"False\" CanVerticallyScroll=\"False\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Grid.Column=\"0\" Margin=\"{TemplateBinding Padding}\" Grid.Row=\"0\" />\r\n            <ScrollBar x:Name=\"PART_VerticalScrollBar\" AutomationProperties.AutomationId=\"VerticalScrollBar\" Cursor=\"Arrow\" Grid.Column=\"1\" Maximum=\"{TemplateBinding ScrollableHeight}\" Minimum=\"0\" Grid.Row=\"0\" Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Value=\"{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" ViewportSize=\"{TemplateBinding ViewportHeight}\" Style=\"{StaticResource ScrollbarStyle}\" />\r\n            <ScrollBar x:Name=\"PART_HorizontalScrollBar\" AutomationProperties.AutomationId=\"HorizontalScrollBar\" Cursor=\"Arrow\" Grid.Column=\"0\" Maximum=\"{TemplateBinding ScrollableWidth}\" Minimum=\"0\" Orientation=\"Horizontal\" Grid.Row=\"1\" Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Value=\"{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" ViewportSize=\"{TemplateBinding ViewportWidth}\" Style=\"{StaticResource ScrollbarStyle}\" />\r\n          </Grid>\r\n        </ControlTemplate>\r\n      </Setter.Value>\r\n    </Setter>\r\n  </Style>\r\n\r\n  <ControlTemplate x:Key=\"ValidationToolTipTemplate\">\r\n    <Grid x:Name=\"Root\" Margin=\"5,0\" Opacity=\"0\" RenderTransformOrigin=\"0,0\">\r\n      <VisualStateManager.VisualStateGroups>\r\n        <VisualStateGroup x:Name=\"OpenStates\">\r\n          <VisualStateGroup.Transitions>\r\n            <VisualTransition GeneratedDuration=\"0\" />\r\n            <VisualTransition GeneratedDuration=\"0:0:0.2\" To=\"Open\">\r\n              <Storyboard>\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"xform\" Storyboard.TargetProperty=\"X\">\r\n                  <SplineDoubleKeyFrame KeyTime=\"0:0:0.2\" Value=\"0\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Root\" Storyboard.TargetProperty=\"Opacity\">\r\n                  <SplineDoubleKeyFrame KeyTime=\"0:0:0.2\" Value=\"1\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n              </Storyboard>\r\n            </VisualTransition>\r\n          </VisualStateGroup.Transitions>\r\n          <VisualState x:Name=\"Closed\">\r\n            <Storyboard>\r\n              <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Root\" Storyboard.TargetProperty=\"Opacity\">\r\n                <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0\" />\r\n              </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n          </VisualState>\r\n          <VisualState x:Name=\"Open\">\r\n            <Storyboard>\r\n              <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"xform\" Storyboard.TargetProperty=\"X\">\r\n                <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0\" />\r\n              </DoubleAnimationUsingKeyFrames>\r\n              <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Root\" Storyboard.TargetProperty=\"Opacity\">\r\n                <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n              </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n          </VisualState>\r\n        </VisualStateGroup>\r\n        <VisualStateGroup x:Name=\"ValidationStates\">\r\n          <VisualState x:Name=\"Valid\" />\r\n          <VisualState x:Name=\"InvalidFocused\" />\r\n          <VisualState x:Name=\"InvalidUnfocused\" />\r\n        </VisualStateGroup>\r\n      </VisualStateManager.VisualStateGroups>\r\n      <Grid.RenderTransform>\r\n        <TranslateTransform x:Name=\"xform\" X=\"-25\" />\r\n      </Grid.RenderTransform>\r\n      <Border Margin=\"4,4,-4,-4\" Background=\"{StaticResource ValidationToolTipBackgroundFill}\" CornerRadius=\"5\" />\r\n      <Border Margin=\"3,3,-3,-3\" Background=\"{StaticResource ValidationToolTipBackgroundFill}\" CornerRadius=\"4\" />\r\n      <Border Margin=\"2,2,-2,-2\" Background=\"{StaticResource ValidationToolTipBackgroundFill}\" CornerRadius=\"3\" />\r\n      <Border Margin=\"1,1,-1,-1\" Background=\"{StaticResource ValidationToolTipBackgroundFill}\" CornerRadius=\"2\" />\r\n      <Border Background=\"{StaticResource InvalidFocusedBrush}\" CornerRadius=\"2\" />\r\n      <Border CornerRadius=\"2\">\r\n        <TextBlock MaxWidth=\"250\" Margin=\"8,4,8,4\" Foreground=\"{StaticResource ThemeLightForegroundBrush}\" Text=\"{Binding Path=(Validation.Errors)[0].ErrorContent}\" TextWrapping=\"Wrap\" UseLayoutRounding=\"false\" />\r\n      </Border>\r\n    </Grid>\r\n  </ControlTemplate>\r\n\r\n  <!-- *********************************  ComboBoxEditableTextBox Style  ********************************* -->\r\n  <Style x:Key=\"ComboBoxEditableTextBoxStyle\" TargetType=\"{x:Type TextBox}\">\r\n    <Setter Property=\"Foreground\" Value=\"{StaticResource ThemeForegroundBrush}\" />\r\n    <Setter Property=\"FontSize\" Value=\"12\" />\r\n    <Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n    <Setter Property=\"AllowDrop\" Value=\"true\" />\r\n    <Setter Property=\"MinHeight\" Value=\"24\" />\r\n    <Setter Property=\"Padding\" Value=\"5,3\" />\r\n    <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\" />\r\n    <Setter Property=\"Template\">\r\n      <Setter.Value>\r\n        <ControlTemplate TargetType=\"{x:Type TextBox}\">\r\n          <ScrollViewer Style=\"{StaticResource ScrollViewerStyle}\" x:Name=\"PART_ContentHost\" Background=\"Transparent\" Focusable=\"false\" HorizontalScrollBarVisibility=\"Hidden\" VerticalScrollBarVisibility=\"Hidden\">\r\n            <VisualStateManager.VisualStateGroups>\r\n              <VisualStateGroup x:Name=\"CommonStates\">\r\n                <VisualState x:Name=\"Normal\" />\r\n                <VisualState x:Name=\"Disabled\">\r\n                  <Storyboard>\r\n                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"PART_ContentHost\">\r\n                      <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0.3\" />\r\n                    </DoubleAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"ReadOnly\" />\r\n                <VisualState x:Name=\"MouseOver\" />\r\n              </VisualStateGroup>\r\n            </VisualStateManager.VisualStateGroups>\r\n          </ScrollViewer>\r\n        </ControlTemplate>\r\n      </Setter.Value>\r\n    </Setter>\r\n  </Style>\r\n\r\n  <!-- *********************************  ComboBoxEditable Template  ********************************* -->\r\n  <ControlTemplate x:Key=\"ComboBoxEditableTemplate\" TargetType=\"{x:Type ComboBox}\">\r\n    <Grid x:Name=\"MainGrid\" SnapsToDevicePixels=\"true\">\r\n      <VisualStateManager.VisualStateGroups>\r\n        <VisualStateGroup x:Name=\"CommonStates\">\r\n          <VisualState x:Name=\"Normal\" />\r\n          <VisualState x:Name=\"MouseOver\">\r\n            <Storyboard>\r\n              <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"DropDownhover\">\r\n                <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n              </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n          </VisualState>\r\n          <VisualState x:Name=\"Disabled\" />\r\n        </VisualStateGroup>\r\n        <VisualStateGroup x:Name=\"FocusStates\">\r\n          <VisualState x:Name=\"Unfocused\" />\r\n          <VisualState x:Name=\"Focused\" />\r\n          <VisualState x:Name=\"FocusedDropDown\" />\r\n        </VisualStateGroup>\r\n      </VisualStateManager.VisualStateGroups>\r\n      <Border x:Name=\"ContentPresenterBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" Background=\"{StaticResource ThemeLightForegroundBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\">\r\n        <Grid>\r\n          <Grid.ColumnDefinitions>\r\n            <ColumnDefinition Width=\"*\" />\r\n            <ColumnDefinition Width=\"22\" />\r\n          </Grid.ColumnDefinitions>\r\n          <Rectangle x:Name=\"DropDownBackground\" Fill=\"{TemplateBinding Background}\" Height=\"22\" RadiusY=\"3\" RadiusX=\"3\" Grid.ColumnSpan=\"2\" VerticalAlignment=\"Top\" />\r\n          <Rectangle x:Name=\"DropDownNormal\" Fill=\"{StaticResource TransparentBrush}\" RadiusY=\"3\" RadiusX=\"3\" Stroke=\"{TemplateBinding BorderBrush}\" Grid.ColumnSpan=\"2\" StrokeThickness=\"{TemplateBinding BorderThickness}\" />\r\n          <Rectangle x:Name=\"DropDownhover\" RadiusY=\"3\" RadiusX=\"3\" Stroke=\"{StaticResource ComboBoxHoverBorderBrush}\" StrokeThickness=\"1\" Margin=\"0\" Opacity=\"0\" Grid.ColumnSpan=\"2\" />\r\n          <TextBox x:Name=\"PART_EditableTextBox\" Grid.Column=\"0\" Margin=\"0,0,0,-1\" HorizontalContentAlignment=\"Left\" IsReadOnly=\"{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}\" Style=\"{StaticResource ComboBoxEditableTextBoxStyle}\" />\r\n          <ToggleButton x:Name=\"DropDownToggle\" BorderThickness=\"{TemplateBinding BorderThickness}\" Style=\"{StaticResource ComboToggleStyle}\" Height=\"{TemplateBinding Height}\" Grid.Column=\"1\" HorizontalAlignment=\"Stretch\" IsChecked=\"{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" VerticalAlignment=\"Stretch\" />\r\n          <Rectangle x:Name=\"DropDownDisabled\" Fill=\"{StaticResource ToggleButtonDisabledBackgroundBrush}\" RadiusX=\"3\" RadiusY=\"3\" IsHitTestVisible=\"false\" d:LayoutOverrides=\"GridBox\" Grid.Column=\"1\" Opacity=\"0\" />\r\n          <TextBlock IsHitTestVisible=\"False\" Text=\" \" Margin=\"5,2,5,0\" Visibility=\"Collapsed\" />\r\n        </Grid>\r\n      </Border>\r\n      <Popup x:Name=\"PART_Popup\" Margin=\"1\" AllowsTransparency=\"true\" IsOpen=\"{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Bottom\" PopupAnimation=\"{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}\" Grid.ColumnSpan=\"2\">\r\n        <Border x:Name=\"DropDownBorder\" HorizontalAlignment=\"Stretch\" BorderBrush=\"{StaticResource PopupBorderBrush}\" Background=\"{StaticResource PopupBackgroundBrush}\" BorderThickness=\"1\" MaxHeight=\"{TemplateBinding MaxDropDownHeight}\" MinWidth=\"{Binding ActualWidth, ElementName=MainGrid}\">\r\n          <Border.Effect>\r\n            <DropShadowEffect BlurRadius=\"15\" Direction=\"270\" ShadowDepth=\"1\" Opacity=\"0.26\" Color=\"{StaticResource Color_000}\" />\r\n          </Border.Effect>\r\n          <ScrollViewer CanContentScroll=\"true\" BorderThickness=\"0\" Padding=\"1\" Style=\"{StaticResource ScrollViewerStyle}\" Margin=\"0\">\r\n            <ItemsPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" KeyboardNavigation.DirectionalNavigation=\"Contained\" />\r\n          </ScrollViewer>\r\n        </Border>\r\n      </Popup>\r\n    </Grid>\r\n  </ControlTemplate>\r\n\r\n  <!-- *********************************  ComboBox Style  ********************************* -->\r\n  <Style x:Key=\"ComboBoxStyle\" TargetType=\"ComboBox\">\r\n    <Setter Property=\"ItemContainerStyle\" Value=\"{StaticResource ComboBoxItemStyle}\" />\r\n    <Setter Property=\"Padding\" Value=\"5,3,20,3\" />\r\n    <Setter Property=\"MinHeight\" Value=\"24\" />\r\n    <Setter Property=\"Foreground\" Value=\"{StaticResource ThemeForegroundBrush}\" />\r\n    <Setter Property=\"Background\" Value=\"{StaticResource ComboBoxBackgroundBrush}\" />\r\n    <Setter Property=\"BorderBrush\" Value=\"{StaticResource ComboBoxBorderBrush}\" />\r\n    <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n    <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n    <Setter Property=\"Cursor\" Value=\"Hand\" />\r\n    <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\" />\r\n    <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\" />\r\n    <Setter Property=\"Template\">\r\n      <Setter.Value>\r\n        <ControlTemplate TargetType=\"ComboBox\">\r\n          <Grid x:Name=\"MainGrid\" SnapsToDevicePixels=\"true\">\r\n            <VisualStateManager.VisualStateGroups>\r\n              <VisualStateGroup x:Name=\"CommonStates\">\r\n                <VisualState x:Name=\"Normal\" />\r\n                <VisualState x:Name=\"MouseOver\">\r\n                  <Storyboard>\r\n                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"DropDownhover\">\r\n                      <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                    </DoubleAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Disabled\">\r\n                  <Storyboard>\r\n                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"DropDownDisabled\">\r\n                      <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0.3\" />\r\n                    </DoubleAnimationUsingKeyFrames>\r\n                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"ContentPresenter\">\r\n                      <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\" />\r\n                    </DoubleAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n              </VisualStateGroup>\r\n              <VisualStateGroup x:Name=\"FocusStates\">\r\n                <VisualState x:Name=\"Unfocused\" />\r\n                <VisualState x:Name=\"Focused\" />\r\n                <VisualState x:Name=\"FocusedDropDown\">\r\n                  <Storyboard>\r\n                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"DropDownBorder\">\r\n                      <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                    </ObjectAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n              </VisualStateGroup>\r\n              <VisualStateGroup x:Name=\"EmptyState\">\r\n                <VisualState x:Name=\"Empty\">\r\n                  <Storyboard>\r\n                    <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"itemText\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                      <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                        <DiscreteObjectKeyFrame.Value>\r\n                          <Visibility>Visible</Visibility>\r\n                        </DiscreteObjectKeyFrame.Value>\r\n                      </DiscreteObjectKeyFrame>\r\n                    </ObjectAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Selected\">\r\n                  <Storyboard>\r\n                    <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"itemText\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                      <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                        <DiscreteObjectKeyFrame.Value>\r\n                          <Visibility>Collapsed</Visibility>\r\n                        </DiscreteObjectKeyFrame.Value>\r\n                      </DiscreteObjectKeyFrame>\r\n                    </ObjectAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n              </VisualStateGroup>\r\n            </VisualStateManager.VisualStateGroups>\r\n            <Border x:Name=\"ContentPresenterBorder\">\r\n              <Grid>\r\n                <Grid.ColumnDefinitions>\r\n                  <ColumnDefinition Width=\"*\" />\r\n                  <ColumnDefinition Width=\"22\" />\r\n                </Grid.ColumnDefinitions>\r\n                <Rectangle x:Name=\"DropDownBackground\" Fill=\"{TemplateBinding Background}\" Height=\"22\" RadiusY=\"3\" RadiusX=\"3\" Grid.ColumnSpan=\"2\" VerticalAlignment=\"Top\" />\r\n                <Rectangle x:Name=\"DropDownNormal\" Fill=\"{StaticResource TransparentBrush}\" RadiusY=\"3\" RadiusX=\"3\" Stroke=\"{TemplateBinding BorderBrush}\" Grid.ColumnSpan=\"2\" StrokeThickness=\"{TemplateBinding BorderThickness}\" />\r\n                <Rectangle x:Name=\"DropDownhover\" RadiusY=\"3\" RadiusX=\"3\" Stroke=\"{StaticResource ComboBoxHoverBorderBrush}\" StrokeThickness=\"1\" Margin=\"0\" Opacity=\"0\" Grid.ColumnSpan=\"2\" />\r\n                <ToggleButton x:Name=\"DropDownToggle\" BorderThickness=\"{TemplateBinding BorderThickness}\" Style=\"{StaticResource ComboToggleStyle}\" Height=\"{TemplateBinding Height}\" Grid.ColumnSpan=\"2\" HorizontalAlignment=\"Stretch\" IsChecked=\"{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" VerticalAlignment=\"Stretch\" />\r\n                <Rectangle x:Name=\"DropDownDisabled\" Fill=\"{StaticResource ToggleButtonDisabledBackgroundBrush}\" RadiusX=\"3\" RadiusY=\"3\" IsHitTestVisible=\"false\" d:LayoutOverrides=\"GridBox\" Grid.Column=\"1\" Opacity=\"0\" />\r\n                <ContentPresenter x:Name=\"ContentPresenter\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" IsHitTestVisible=\"false\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Content=\"{TemplateBinding SelectionBoxItem}\" ContentTemplate=\"{TemplateBinding SelectionBoxItemTemplate}\" ContentStringFormat=\"{TemplateBinding SelectionBoxItemStringFormat}\" ContentTemplateSelector=\"{TemplateBinding ItemTemplateSelector}\" />\r\n                <TextBlock IsHitTestVisible=\"False\" Text=\" \" Margin=\"5,2,5,0\" Visibility=\"Collapsed\" />\r\n              </Grid>\r\n            </Border>\r\n            <Popup x:Name=\"PART_Popup\" Margin=\"1\" AllowsTransparency=\"true\" IsOpen=\"{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Bottom\" PopupAnimation=\"{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}\" Grid.ColumnSpan=\"2\">\r\n              <Border x:Name=\"DropDownBorder\" HorizontalAlignment=\"Stretch\" BorderBrush=\"{StaticResource PopupBorderBrush}\" Background=\"{StaticResource PopupBackgroundBrush}\" BorderThickness=\"1\" MaxHeight=\"{TemplateBinding MaxDropDownHeight}\" MinWidth=\"{Binding ActualWidth, ElementName=MainGrid}\">\r\n                <Border.Effect>\r\n                  <DropShadowEffect BlurRadius=\"15\" Direction=\"270\" ShadowDepth=\"1\" Opacity=\"0.26\" Color=\"{StaticResource Color_000}\" />\r\n                </Border.Effect>\r\n                <ScrollViewer CanContentScroll=\"true\" BorderThickness=\"0\" Padding=\"1\" Style=\"{StaticResource ScrollViewerStyle}\" Margin=\"0\">\r\n                  <ItemsPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" KeyboardNavigation.DirectionalNavigation=\"Contained\" />\r\n                </ScrollViewer>\r\n              </Border>\r\n            </Popup>\r\n          </Grid>\r\n        </ControlTemplate>\r\n      </Setter.Value>\r\n    </Setter>\r\n    <Style.Triggers>\r\n      <Trigger Property=\"IsEditable\" Value=\"true\">\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ThemeForegroundBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"{StaticResource TextBoxGradientBackgroundBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource TextBoxBorderBrush}\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"false\" />\r\n        <Setter Property=\"Template\" Value=\"{StaticResource ComboBoxEditableTemplate}\" />\r\n      </Trigger>\r\n    </Style.Triggers>\r\n  </Style>\r\n\r\n  <!-- ********************************** TextBox Style **********************************-->\r\n  <Style x:Key=\"TextBoxStyle\" TargetType=\"{x:Type TextBox}\">\r\n    <Setter Property=\"Background\" Value=\"{StaticResource TextBoxGradientBackgroundBrush}\" />\r\n    <Setter Property=\"BorderBrush\" Value=\"{StaticResource TextBoxBorderBrush}\" />\r\n    <Setter Property=\"Foreground\" Value=\"{StaticResource ThemeForegroundBrush}\" />\r\n    <Setter Property=\"Padding\" Value=\"2\" />\r\n    <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n    <Setter Property=\"Padding\" Value=\"4,2\" />\r\n    <Setter Property=\"MinHeight\" Value=\"24\" />\r\n    <Setter Property=\"AllowDrop\" Value=\"true\" />\r\n    <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\" />\r\n    <Setter Property=\"ScrollViewer.PanningMode\" Value=\"VerticalFirst\" />\r\n    <Setter Property=\"Stylus.IsFlicksEnabled\" Value=\"False\" />\r\n    <Setter Property=\"FlowDirection\" Value=\"LeftToRight\" />\r\n    <Setter Property=\"Template\">\r\n      <Setter.Value>\r\n        <ControlTemplate>\r\n          <Grid>\r\n            <Border Background=\"{StaticResource ThemeLightForegroundBrush}\" />\r\n            <Border Background=\"{TemplateBinding Background}\" Height=\"22\" CornerRadius=\"3\" VerticalAlignment=\"Top\" />\r\n            <Border x:Name=\"Bd\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\">\r\n              <ScrollViewer x:Name=\"PART_ContentHost\" />\r\n            </Border>\r\n            <Rectangle x:Name=\"innerShadow\" Width=\"20\" IsHitTestVisible=\"False\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" Margin=\"1,1,0,1\" RadiusX=\"2\" RadiusY=\"2\" Fill=\"{StaticResource TextBoxInnerShadowBackgroundBrush}\" />\r\n          </Grid>\r\n          <ControlTemplate.Triggers>\r\n            <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n              <Setter Property=\"BorderBrush\" Value=\"{StaticResource TextBoxnDisabledBorderBrush}\" TargetName=\"Bd\" />\r\n              <Setter Property=\"Foreground\" Value=\"{StaticResource TextBoxDisabledForegroundBrush}\" />\r\n            </Trigger>\r\n            <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n              <Setter Property=\"BorderBrush\" Value=\"{StaticResource TextBoxHoverBorderBrush}\" TargetName=\"Bd\" />\r\n            </Trigger>\r\n            <Trigger Property=\"IsFocused\" Value=\"True\">\r\n              <Setter Property=\"BorderBrush\" Value=\"{StaticResource TextBoxFocusedBorderBrush}\" TargetName=\"Bd\" />\r\n            </Trigger>\r\n            <MultiDataTrigger>\r\n              <MultiDataTrigger.Conditions>\r\n                <Condition Binding=\"{Binding IsReadOnly, RelativeSource={RelativeSource Self}}\" Value=\"True\" />\r\n                <Condition Binding=\"{Binding IsEnabled, RelativeSource={RelativeSource Self}}\" Value=\"True\" />\r\n              </MultiDataTrigger.Conditions>\r\n              <Setter Property=\"Background\" Value=\"{StaticResource ReadonlyBackgroundBrush}\" />\r\n              <Setter Property=\"BorderBrush\" Value=\"{StaticResource ReadonlyBorderBrush}\" />\r\n            </MultiDataTrigger>\r\n          </ControlTemplate.Triggers>\r\n        </ControlTemplate>\r\n      </Setter.Value>\r\n    </Setter>\r\n    <Style.Triggers>\r\n      <Trigger Property=\"Validation.HasError\" Value=\"True\">\r\n        <Setter Property=\"ToolTip\" Value=\"{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}\" />\r\n        <!--<Setter Property=\"ToolTip.Template\" Value=\"{StaticResource ValidationToolTipTemplate}\" />-->\r\n      </Trigger>\r\n    </Style.Triggers>\r\n  </Style>\r\n\r\n  <!-- ********************************** ListBoxStyle **********************************-->\r\n  <Style x:Key=\"ListBoxStyle\" TargetType=\"{x:Type ListBox}\">\r\n    <Setter Property=\"Background\" Value=\"{StaticResource ThemeLightForegroundBrush}\" />\r\n    <Setter Property=\"BorderBrush\" Value=\"{StaticResource ListBoxBorderBrush}\" />\r\n    <Setter Property=\"Foreground\" Value=\"{StaticResource ThemeForegroundBrush}\" />\r\n    <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n    <Setter Property=\"Padding\" Value=\"1\" />\r\n    <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\" />\r\n    <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\" />\r\n    <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"true\" />\r\n    <Setter Property=\"ScrollViewer.PanningMode\" Value=\"Both\" />\r\n    <Setter Property=\"Stylus.IsFlicksEnabled\" Value=\"False\" />\r\n    <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n    <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n    <Setter Property=\"ItemContainerStyle\" Value=\"{StaticResource ListBoxItemStyle}\" />\r\n    <Setter Property=\"Template\">\r\n      <Setter.Value>\r\n        <ControlTemplate TargetType=\"{x:Type ListBox}\">\r\n          <Border x:Name=\"Bd\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Padding=\"1\" SnapsToDevicePixels=\"true\">\r\n            <ScrollViewer Focusable=\"false\" Style=\"{StaticResource ScrollViewerStyle}\" Margin=\"-1\">\r\n              <ItemsPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" />\r\n            </ScrollViewer>\r\n          </Border>\r\n          <ControlTemplate.Triggers>\r\n            <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n              <Setter Property=\"Opacity\" TargetName=\"Bd\" Value=\"0.5\" />\r\n            </Trigger>\r\n            <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n              <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\" />\r\n            </Trigger>\r\n          </ControlTemplate.Triggers>\r\n        </ControlTemplate>\r\n      </Setter.Value>\r\n    </Setter>\r\n  </Style>\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/IG/Theme.Colors.xaml",
    "content": "﻿<ResourceDictionary\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:ig=\"http://schemas.infragistics.com/xaml\"\r\n    xmlns:igPrim=\"http://schemas.infragistics.com/xaml/primitives\"\r\n    xmlns:igPivot=\"http://schemas.infragistics.com/xaml\"\r\n    xmlns:igPivotPrim=\"http://schemas.infragistics.com/xaml/primitives\"\r\n    xmlns:System=\"clr-namespace:System;assembly=mscorlib\"\r\n\txmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n\txmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" mc:Ignorable=\"d\">\r\n\r\n  <!-- ********************************** COLORS **********************************-->\r\n\r\n  <!--Color Tuner Theme Brushes-->\r\n  <SolidColorBrush x:Key=\"Brush01\" Color=\"#FF2788B1\"/>\r\n  <SolidColorBrush x:Key=\"Brush02\" Color=\"#FF185170\"/>\r\n  <SolidColorBrush x:Key=\"Brush03\" Color=\"#FF7C7C7C\"/>\r\n  <SolidColorBrush x:Key=\"Brush04\" Color=\"#FF505050\"/>\r\n  <SolidColorBrush x:Key=\"Brush05\" Color=\"#FF333333\"/>\r\n\r\n  <!--Ig Theme Base colors-->\r\n  <Color x:Key=\"Color_000\">#FF000000</Color>\r\n  <Color x:Key=\"Color_001\">#FF333333</Color>\r\n  <Color x:Key=\"Color_002\">#FF3E3E3E</Color>\r\n  <Color x:Key=\"Color_003\">#FF505050</Color>\r\n  <Color x:Key=\"Color_004\">#FF696969</Color>\r\n  <Color x:Key=\"Color_005\">#FF818181</Color>\r\n  <Color x:Key=\"Color_006\">#FF9B9B9B</Color>\r\n  <Color x:Key=\"Color_007\">#FFB1B1B1</Color>\r\n  <Color x:Key=\"Color_008\">#FFD0D0D0</Color>\r\n  <Color x:Key=\"Color_009\">#FFE0E0E0</Color>\r\n  <Color x:Key=\"Color_010\">#FFF1F1F1</Color>\r\n  <Color x:Key=\"Color_011\">#FFffffff</Color>\r\n  <Color x:Key=\"Color_012\">#FFDCEDF3</Color>\r\n  <Color x:Key=\"Color_013\">#FF94D7F3</Color>\r\n  <Color x:Key=\"Color_014\">#FF3BB7EB</Color>\r\n  <Color x:Key=\"Color_015\">#FF16A9E7</Color>\r\n  <Color x:Key=\"Color_016\">#FF2788B1</Color>\r\n  <Color x:Key=\"Color_017\">#FF19759B</Color>\r\n  <Color x:Key=\"Color_018\">#FF1A5F7C</Color>\r\n\r\n  <!--Theme Error colors -->\r\n  <Color x:Key=\"Color_019\">#FFd3404b</Color>\r\n  <Color x:Key=\"Color_020\">#FFc62d36</Color>\r\n\r\n  <!--Whites with transparency-->\r\n  <Color x:Key=\"Color_021\">#00FFFFFF</Color>  <!--0% White-->\r\n  <Color x:Key=\"Color_022\">#33FFFFFF</Color>  <!--20% White-->\r\n  <Color x:Key=\"Color_023\">#66FFFFFF</Color>  <!--40% White-->\r\n  <Color x:Key=\"Color_024\">#99FFFFFF</Color>  <!--60% White-->\r\n  <Color x:Key=\"Color_025\">#CCFFFFFF</Color>  <!--80% White-->\r\n\r\n  <!--Blacks with transparency-->\r\n  <Color x:Key=\"Color_026\">#00000000</Color>  <!--0% Black-->\r\n  <Color x:Key=\"Color_027\">#33000000</Color>  <!--20% Black-->\r\n  <Color x:Key=\"Color_028\">#66000000</Color>  <!--40% Black-->\r\n  <Color x:Key=\"Color_029\">#99000000</Color>  <!--60% Black-->\r\n  <Color x:Key=\"Color_030\">#CC000000</Color>  <!--80% Black-->\r\n\r\n  <!--Colors for Chart Series-->\r\n  <Color x:Key=\"Color_031\">#FF6E7E16</Color>\r\n  <Color x:Key=\"Color_032\">#FFa4ba29</Color>\r\n  <Color x:Key=\"Color_033\">#FFfdbd48</Color>\r\n  <Color x:Key=\"Color_034\">#FFF7AA1B</Color>\r\n  <Color x:Key=\"Color_035\">#FFff888b</Color>\r\n  <Color x:Key=\"Color_036\">#FFff6a6f</Color>\r\n  <Color x:Key=\"Color_037\">#FF9e73c1</Color>\r\n  <Color x:Key=\"Color_038\">#FF714199</Color>\r\n  <Color x:Key=\"Color_039\">#FFf79036</Color>\r\n  <Color x:Key=\"Color_040\">#FFBC5900</Color>\r\n  <Color x:Key=\"Color_041\">#FF69299D</Color>\r\n  <Color x:Key=\"Color_042\">#FF371356</Color>\r\n  <Color x:Key=\"Color_043\">#FF48892d</Color>\r\n  <Color x:Key=\"Color_044\">#FF285017</Color>\r\n  <Color x:Key=\"Color_045\">#FFDC8F00</Color>\r\n  <Color x:Key=\"Color_046\">#FFCA4E52</Color>\r\n\r\n  <!--Specific ToolTip Color-->\r\n  <Color x:Key=\"Color_047\">#E5E7E7E7</Color>\r\n\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/IG/Theme.xaml",
    "content": "﻿<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" \r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" \r\n                    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\" \r\n                    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" \r\n                    mc:Ignorable=\"d\">\r\n\r\n\t<!-- *********************************  RESOURCES  ********************************* -->\r\n\t<ResourceDictionary.MergedDictionaries>\r\n\t\t<ResourceDictionary Source=\"Styles.WPF.xaml\" />\r\n        <ResourceDictionary Source=\"IG.MSControls.Toolkit.Implicit.xaml\" />        \r\n\t</ResourceDictionary.MergedDictionaries>\r\n\r\n\t<!-- *********************************  BRUSHES  ********************************* -->\r\n\t<!--  Slider Brushes -->\r\n\t<LinearGradientBrush x:Key=\"SliderThumbBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n\t\t<GradientStop Color=\"{StaticResource Color_004}\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_002}\" Offset=\"1\" />\r\n\t</LinearGradientBrush>\r\n\t<SolidColorBrush x:Key=\"SliderThumbBorderBrush\" Color=\"{StaticResource Color_002}\" />\r\n\t<LinearGradientBrush x:Key=\"SliderThumbHoverBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n\t\t<GradientStop Color=\"{StaticResource Color_014}\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_016}\" Offset=\"1\" />\r\n\t</LinearGradientBrush>\r\n\t<SolidColorBrush x:Key=\"SliderThumbHoverBorderBrush\" Color=\"{StaticResource Color_016}\" />\r\n\t<LinearGradientBrush x:Key=\"SliderThumbPressedBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n\t\t<GradientStop Color=\"{StaticResource Color_014}\" Offset=\"1\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_016}\" />\r\n\t</LinearGradientBrush>\r\n\t<SolidColorBrush x:Key=\"SliderThumbPressedBorderBrush\" Color=\"{StaticResource Color_016}\" />\r\n\t<LinearGradientBrush x:Key=\"SliderThumbDisabledBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n\t\t<GradientStop Color=\"{StaticResource Color_008}\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_006}\" Offset=\"1\" />\r\n\t</LinearGradientBrush>\r\n\t<SolidColorBrush x:Key=\"SliderThumbDisabledBorderBrush\" Color=\"{StaticResource Color_007}\" />\r\n\t<SolidColorBrush x:Key=\"SliderThumbFocusedBorderBrush\" Color=\"{StaticResource Color_014}\" />\r\n\t<LinearGradientBrush x:Key=\"HSliderTrackBackgroundBrush\" StartPoint=\"0.82,1\" EndPoint=\"0.82,0.25\">\r\n\t\t<GradientStop Offset=\"0\" Color=\"{StaticResource Color_006}\" />\r\n\t\t<GradientStop Offset=\"0.93\" Color=\"{StaticResource Color_008}\" />\r\n\t\t<GradientStop Offset=\"0.98\" Color=\"{StaticResource Color_008}\" />\r\n\t</LinearGradientBrush>\r\n\t<SolidColorBrush x:Key=\"HSliderTrackBorderBrush\" Color=\"{StaticResource Color_005}\" />\r\n\t<LinearGradientBrush x:Key=\"VSliderTrackBackgroundBrush\" StartPoint=\"0.82,1\" EndPoint=\"0.82,0.25\">\r\n\t\t<GradientStop Offset=\"0\" Color=\"{StaticResource Color_006}\" />\r\n\t\t<GradientStop Offset=\"0.93\" Color=\"{StaticResource Color_008}\" />\r\n\t\t<GradientStop Offset=\"0.98\" Color=\"{StaticResource Color_008}\" />\r\n\t</LinearGradientBrush>\r\n\t<SolidColorBrush x:Key=\"VSliderTrackBorderBrush\" Color=\"{StaticResource Color_005}\" />\r\n\t<LinearGradientBrush x:Key=\"SliderTrackDisabledBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n\t\t<GradientStop Color=\"{StaticResource Color_008}\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_006}\" Offset=\"1\" />\r\n\t</LinearGradientBrush>\r\n\t<LinearGradientBrush x:Key=\"SliderSelectionRangeBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n\t\t<GradientStop Color=\"{StaticResource Color_014}\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_016}\" Offset=\"1\" />\r\n\t</LinearGradientBrush>\r\n\t<SolidColorBrush x:Key=\"SliderSelectionRangeBorderBrush\" Color=\"{StaticResource Color_016}\" />\r\n\r\n\t<!--  GridSplitter Brushes -->\r\n\t<SolidColorBrush x:Key=\"GridSplitterBackgroundBrush\" Color=\"{StaticResource Color_002}\" />\r\n\t<SolidColorBrush x:Key=\"GridSplitterBorderBrush\" Color=\"{StaticResource Color_002}\" />\r\n\t<SolidColorBrush x:Key=\"GridSplitterHoverBackgroundBrush\" Color=\"{StaticResource Color_014}\" />\r\n\t<SolidColorBrush x:Key=\"GridSplitterHoverBorderBrush\" Color=\"{StaticResource Color_016}\" />\r\n\t<SolidColorBrush x:Key=\"GridSplitterPressedBackgroundBrush\" Color=\"{StaticResource Color_016}\" />\r\n\t<SolidColorBrush x:Key=\"GridSplitterFocusedBorderBrush\" Color=\"{StaticResource Color_014}\" />\r\n\r\n\t<!-- ProgressBar Brushes -->\r\n\t<LinearGradientBrush x:Key=\"ProgressBarBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n\t\t<GradientStop Offset=\"0\" Color=\"{StaticResource Color_010}\" />\r\n\t\t<GradientStop Offset=\"1\" Color=\"{StaticResource Color_008}\" />\r\n\t</LinearGradientBrush>\r\n\t<SolidColorBrush x:Key=\"ProgressBarBorderBrush\" Color=\"{StaticResource Color_006}\" />\r\n\t<LinearGradientBrush x:Key=\"ProgressBarForegroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n\t\t<GradientStop Offset=\"0\" Color=\"{StaticResource Color_014}\" />\r\n\t\t<GradientStop Offset=\"1\" Color=\"{StaticResource Color_017}\" />\r\n\t</LinearGradientBrush>\r\n\t<SolidColorBrush x:Key=\"ProgressBarDeterminateBorderBrush\" Color=\"{StaticResource Color_016}\" />\r\n\t<LinearGradientBrush x:Key=\"ProgressBarIndeterminateBackgroundBrush\" EndPoint=\"0,1\" MappingMode=\"Absolute\" SpreadMethod=\"Repeat\" StartPoint=\"20,1\" Opacity=\"0.8\">\r\n\t\t<LinearGradientBrush.Transform>\r\n\t\t\t<TransformGroup>\r\n\t\t\t\t<TranslateTransform X=\"0\" />\r\n\t\t\t\t<SkewTransform AngleX=\"-30\" />\r\n\t\t\t</TransformGroup>\r\n\t\t</LinearGradientBrush.Transform>\r\n\t\t<GradientStop Color=\"{StaticResource Color_016}\" Offset=\"0.249\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_014}\" Offset=\".25\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_014}\" Offset=\"0.75\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_016}\" Offset=\"0.751\" />\r\n\t</LinearGradientBrush>\r\n\t<SolidColorBrush x:Key=\"ProgressBarIndeterminateBorderBrush\" Color=\"{StaticResource Color_016}\" />\r\n\r\n\t<!-- Tooltip Brushes -->\r\n\t<LinearGradientBrush x:Key=\"TooltipBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n\t\t<GradientStop Color=\"{StaticResource Color_009}\" Offset=\"1\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_010}\" />\r\n\t</LinearGradientBrush>\r\n\t<SolidColorBrush x:Key=\"TooltipBorderBrush\" Color=\"{StaticResource Color_007}\" />\r\n\t<SolidColorBrush x:Key=\"TooltipShadowBackgroundBrush\" Color=\"{StaticResource Color_000}\" />\r\n\r\n\t<!-- Expander Brushes -->\r\n\t<LinearGradientBrush x:Key=\"ExpanderButtonBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n\t\t<GradientStop Color=\"{StaticResource Color_004}\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_002}\" Offset=\"1\" />\r\n\t</LinearGradientBrush>\r\n\t<SolidColorBrush x:Key=\"ExpanderButtonBorderBrush\" Color=\"{StaticResource Color_002}\" />\r\n\t<LinearGradientBrush x:Key=\"ExpanderButtonHoverBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n\t\t<GradientStop Color=\"{StaticResource Color_014}\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_016}\" Offset=\"1\" />\r\n\t</LinearGradientBrush>\r\n\t<SolidColorBrush x:Key=\"ExpanderButtonHoverBorderBrush\" Color=\"{StaticResource Color_016}\" />\r\n\t<LinearGradientBrush x:Key=\"ExpanderButtonPressedBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n\t\t<GradientStop Color=\"{StaticResource Color_014}\" Offset=\"1\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_016}\" />\r\n\t</LinearGradientBrush>\r\n\t<SolidColorBrush x:Key=\"ExpanderButtonPressedBorderBrush\" Color=\"{StaticResource Color_016}\" />\r\n\t<SolidColorBrush x:Key=\"ExpanderArrowBorderBrush\" Color=\"{StaticResource Color_011}\" />\r\n\t<SolidColorBrush x:Key=\"ExpanderDisabledBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"ExpanderDisabledForegroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\r\n\t<!-- GroupBox Brushes -->\r\n\t<SolidColorBrush x:Key=\"GroupBoxBorderBrush\" Color=\"{StaticResource Color_006}\" />\r\n\r\n\t<!-- PassWordBox Brushes -->\r\n\t<SolidColorBrush x:Key=\"PasswordBoxForegroundBrush\" Color=\"{StaticResource Color_016}\" />\r\n\r\n\t<!-- *********************************  SliderRepeatButton Style  ********************************* -->\r\n\t<Style x:Key=\"SliderRepeatButtonStyle\" TargetType=\"{x:Type RepeatButton}\">\r\n\t\t<Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n\t\t<Setter Property=\"Focusable\" Value=\"false\" />\r\n\t\t<Setter Property=\"IsTabStop\" Value=\"false\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n\t\t\t\t\t<Rectangle Fill=\"{StaticResource TransparentBrush}\" />\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  Horizontal Thumb Style  ********************************* -->\r\n\t<Style x:Key=\"HSliderThumbStyle\" TargetType=\"{x:Type Thumb}\">\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource SliderThumbBackgroundBrush}\" />\r\n\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource SliderThumbBorderBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"12\" />\r\n\t\t<Setter Property=\"MinWidth\" Value=\"8\" />\r\n\t\t<Setter Property=\"IsTabStop\" Value=\"False\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t<Path x:Name=\"HThumbBackground\" Data=\"M 1561,382 C1561,382 1559,382 1559,382 1557,382 1556,380 1556,379 1556,379 1556,373 1556,373 1556,371 1557,370 1559,370 1559,370 1561,370 1561,370 1563,370 1564,371 1564,373 1564,373 1564,379 1564,379 1564,380 1563,382 1561,382 z\" Fill=\"{TemplateBinding Background}\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" Height=\"12\" Width=\"8\" Stretch=\"Fill\" Opacity=\"1\" />\r\n\t\t\t\t\t\t<Path x:Name=\"HThumbHover\" Data=\"M 1561,382 C1561,382 1559,382 1559,382 1557,382 1556,380 1556,379 1556,379 1556,373 1556,373 1556,371 1557,370 1559,370 1559,370 1561,370 1561,370 1563,370 1564,371 1564,373 1564,373 1564,379 1564,379 1564,380 1563,382 1561,382 z\" Fill=\"{StaticResource SliderThumbHoverBackgroundBrush}\" Stroke=\"{StaticResource SliderThumbHoverBorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" Height=\"12\" Width=\"8\" Stretch=\"Fill\" Opacity=\"0\" />\r\n\t\t\t\t\t\t<Path x:Name=\"HThumbPressed\" Data=\"M 1561,382 C1561,382 1559,382 1559,382 1557,382 1556,380 1556,379 1556,379 1556,373 1556,373 1556,371 1557,370 1559,370 1559,370 1561,370 1561,370 1563,370 1564,371 1564,373 1564,373 1564,379 1564,379 1564,380 1563,382 1561,382 z\" Fill=\"{StaticResource SliderThumbPressedBackgroundBrush}\" Stroke=\"{StaticResource SliderThumbPressedBorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" Height=\"12\" Width=\"8\" Stretch=\"Fill\" Opacity=\"0\" />\r\n\t\t\t\t\t\t<Path x:Name=\"HThumbDisabled\" Data=\"M 1561,382 C1561,382 1559,382 1559,382 1557,382 1556,380 1556,379 1556,379 1556,373 1556,373 1556,371 1557,370 1559,370 1559,370 1561,370 1561,370 1563,370 1564,371 1564,373 1564,373 1564,379 1564,379 1564,380 1563,382 1561,382 z\" Fill=\"{StaticResource SliderThumbDisabledBackgroundBrush}\" Stroke=\"{StaticResource SliderThumbDisabledBorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" Height=\"12\" Width=\"8\" Stretch=\"Fill\" Opacity=\"0\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n\t\t\t\t\t\t\t<Setter TargetName=\"HThumbHover\" Property=\"Opacity\" Value=\"1\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsMouseCaptured\" Value=\"True\">\r\n\t\t\t\t\t\t\t<Setter TargetName=\"HThumbPressed\" Property=\"Opacity\" Value=\"1\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsEnabled\" Value=\"false\">\r\n\t\t\t\t\t\t\t<Setter TargetName=\"HThumbDisabled\" Property=\"Opacity\" Value=\"1\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  Vertical Thumb Style  ********************************* -->\r\n\t<Style x:Key=\"VSliderThumbStyle\" TargetType=\"{x:Type Thumb}\">\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource SliderThumbBackgroundBrush}\" />\r\n\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource SliderThumbBorderBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"8\" />\r\n\t\t<Setter Property=\"MinWidth\" Value=\"12\" />\r\n\t\t<Setter Property=\"IsTabStop\" Value=\"False\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t<Path x:Name=\"VThumbBackground\" Data=\"M 1531,375 C1531,375 1531,377 1531,377 1531,379 1529,380 1528,380 1528,380 1522,380 1522,380 1520,380 1519,379 1519,377 1519,377 1519,375 1519,375 1519,373 1520,372 1522,372 1522,372 1528,372 1528,372 1529,372 1531,373 1531,375 z\" Fill=\"{TemplateBinding Background}\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" Height=\"8\" Width=\"12\" Stretch=\"Fill\" Opacity=\"1\" />\r\n\t\t\t\t\t\t<Path x:Name=\"VThumbHover\" Data=\"M 1531,375 C1531,375 1531,377 1531,377 1531,379 1529,380 1528,380 1528,380 1522,380 1522,380 1520,380 1519,379 1519,377 1519,377 1519,375 1519,375 1519,373 1520,372 1522,372 1522,372 1528,372 1528,372 1529,372 1531,373 1531,375 z\" Fill=\"{StaticResource SliderThumbHoverBackgroundBrush}\" Stroke=\"{StaticResource SliderThumbHoverBorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" Height=\"8\" Width=\"12\" Stretch=\"Fill\" Opacity=\"0\" />\r\n\t\t\t\t\t\t<Path x:Name=\"VThumbPressed\" Data=\"M 1531,375 C1531,375 1531,377 1531,377 1531,379 1529,380 1528,380 1528,380 1522,380 1522,380 1520,380 1519,379 1519,377 1519,377 1519,375 1519,375 1519,373 1520,372 1522,372 1522,372 1528,372 1528,372 1529,372 1531,373 1531,375 z\" Fill=\"{StaticResource SliderThumbPressedBackgroundBrush}\" Stroke=\"{StaticResource SliderThumbPressedBorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" Height=\"8\" Width=\"12\" Stretch=\"Fill\" Opacity=\"0\" />\r\n\t\t\t\t\t\t<Path x:Name=\"VThumbDisabled\" Data=\"M 1531,375 C1531,375 1531,377 1531,377 1531,379 1529,380 1528,380 1528,380 1522,380 1522,380 1520,380 1519,379 1519,377 1519,377 1519,375 1519,375 1519,373 1520,372 1522,372 1522,372 1528,372 1528,372 1529,372 1531,373 1531,375 z\" Fill=\"{StaticResource SliderThumbDisabledBackgroundBrush}\" Stroke=\"{StaticResource SliderThumbDisabledBorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" Height=\"8\" Width=\"12\" Stretch=\"Fill\" Opacity=\"0\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n\t\t\t\t\t\t\t<Setter TargetName=\"VThumbHover\" Property=\"Opacity\" Value=\"1\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsMouseCaptured\" Value=\"True\">\r\n\t\t\t\t\t\t\t<Setter TargetName=\"VThumbPressed\" Property=\"Opacity\" Value=\"1\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsEnabled\" Value=\"false\">\r\n\t\t\t\t\t\t\t<Setter TargetName=\"VThumbDisabled\" Property=\"Opacity\" Value=\"1\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  Slider Style  ********************************* -->\r\n\t<Style x:Key=\"SliderStyle\" TargetType=\"{x:Type Slider}\">\r\n\t\t<Setter Property=\"Stylus.IsPressAndHoldEnabled\" Value=\"false\" />\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ThemeForegroundBrush}\" />\r\n\t\t<Setter Property=\"Background\" Value=\"Transparent\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type Slider}\">\r\n\t\t\t\t\t<Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" SnapsToDevicePixels=\"true\">\r\n\t\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t\t<Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t\t<RowDefinition Height=\"Auto\" />\r\n\t\t\t\t\t\t\t\t<RowDefinition Height=\"Auto\" MinHeight=\"{TemplateBinding MinHeight}\" />\r\n\t\t\t\t\t\t\t\t<RowDefinition Height=\"Auto\" />\r\n\t\t\t\t\t\t\t</Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t<TickBar x:Name=\"TopTick\" Fill=\"{TemplateBinding Foreground}\" Height=\"4\" Placement=\"Top\" Grid.Row=\"0\" Visibility=\"Collapsed\" />\r\n\t\t\t\t\t\t\t<TickBar x:Name=\"BottomTick\" Fill=\"{TemplateBinding Foreground}\" Height=\"4\" Placement=\"Bottom\" Grid.Row=\"2\" Visibility=\"Collapsed\" />\r\n\t\t\t\t\t\t\t<Border x:Name=\"TrackBackground\" Background=\"{StaticResource HSliderTrackBackgroundBrush}\" CornerRadius=\"1\" Height=\"4\" Grid.Row=\"1\" VerticalAlignment=\"center\" BorderBrush=\"{StaticResource HSliderTrackBorderBrush}\" BorderThickness=\"1\">\r\n\t\t\t\t\t\t\t\t<Canvas Margin=\"-6,-1\">\r\n\t\t\t\t\t\t\t\t\t<Rectangle x:Name=\"PART_SelectionRange\" Fill=\"{StaticResource SliderSelectionRangeBackgroundBrush}\" Stroke=\"{StaticResource SliderSelectionRangeBorderBrush}\" Height=\"4.0\" StrokeThickness=\"1.0\" RadiusY=\"1\" RadiusX=\"1\" Width=\"0\" Visibility=\"Hidden\" />\r\n\t\t\t\t\t\t\t\t</Canvas>\r\n\t\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t\t\t<Track x:Name=\"PART_Track\" Grid.Row=\"1\">\r\n\t\t\t\t\t\t\t\t<Track.DecreaseRepeatButton>\r\n\t\t\t\t\t\t\t\t\t<RepeatButton Command=\"{x:Static Slider.DecreaseLarge}\" Style=\"{StaticResource SliderRepeatButtonStyle}\" />\r\n\t\t\t\t\t\t\t\t</Track.DecreaseRepeatButton>\r\n\t\t\t\t\t\t\t\t<Track.IncreaseRepeatButton>\r\n\t\t\t\t\t\t\t\t\t<RepeatButton Command=\"{x:Static Slider.IncreaseLarge}\" Style=\"{StaticResource SliderRepeatButtonStyle}\" />\r\n\t\t\t\t\t\t\t\t</Track.IncreaseRepeatButton>\r\n\t\t\t\t\t\t\t\t<Track.Thumb>\r\n\t\t\t\t\t\t\t\t\t<Thumb x:Name=\"Thumb\" Style=\"{StaticResource HSliderThumbStyle}\" Height=\"18\" />\r\n\t\t\t\t\t\t\t\t</Track.Thumb>\r\n\t\t\t\t\t\t\t</Track>\r\n\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t</Border>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"TickPlacement\" Value=\"TopLeft\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"TopTick\" Value=\"Visible\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Style\" TargetName=\"Thumb\" Value=\"{StaticResource HSliderThumbStyle}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Margin\" TargetName=\"TrackBackground\" Value=\"5,2,5,0\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"TickPlacement\" Value=\"BottomRight\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"BottomTick\" Value=\"Visible\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Style\" TargetName=\"Thumb\" Value=\"{StaticResource HSliderThumbStyle}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Margin\" TargetName=\"TrackBackground\" Value=\"5,0,5,2\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"TickPlacement\" Value=\"Both\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"TopTick\" Value=\"Visible\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"BottomTick\" Value=\"Visible\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsSelectionRangeEnabled\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"PART_SelectionRange\" Value=\"Visible\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Foreground\" TargetName=\"Thumb\" Value=\"{StaticResource SliderThumbFocusedBorderBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t\t<Style.Triggers>\r\n\t\t\t<Trigger Property=\"Orientation\" Value=\"Vertical\">\r\n\t\t\t\t<Setter Property=\"Template\">\r\n\t\t\t\t\t<Setter.Value>\r\n\t\t\t\t\t\t<ControlTemplate TargetType=\"{x:Type Slider}\">\r\n\t\t\t\t\t\t\t<Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" SnapsToDevicePixels=\"true\">\r\n\t\t\t\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t\t\t\t<Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"Auto\" />\r\n\t\t\t\t\t\t\t\t\t\t<ColumnDefinition MinWidth=\"{TemplateBinding MinWidth}\" Width=\"Auto\" />\r\n\t\t\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"Auto\" />\r\n\t\t\t\t\t\t\t\t\t</Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t\t\t<TickBar x:Name=\"TopTick\" Grid.Column=\"0\" Fill=\"{TemplateBinding Foreground}\" Placement=\"Left\" Visibility=\"Collapsed\" Width=\"4\" />\r\n\t\t\t\t\t\t\t\t\t<TickBar x:Name=\"BottomTick\" Grid.Column=\"2\" Fill=\"{TemplateBinding Foreground}\" Placement=\"Right\" Visibility=\"Collapsed\" Width=\"4\" />\r\n\t\t\t\t\t\t\t\t\t<Border x:Name=\"TrackBackground\" Background=\"{StaticResource VSliderTrackBackgroundBrush}\" BorderBrush=\"{StaticResource VSliderTrackBorderBrush}\" Grid.Column=\"1\" CornerRadius=\"1\" HorizontalAlignment=\"center\" Width=\"4\" BorderThickness=\"1\">\r\n\t\t\t\t\t\t\t\t\t\t<Canvas Margin=\"-1,-6\">\r\n\t\t\t\t\t\t\t\t\t\t\t<Rectangle x:Name=\"PART_SelectionRange\" Fill=\"{StaticResource SliderSelectionRangeBackgroundBrush}\" Stroke=\"{StaticResource SliderSelectionRangeBorderBrush}\" StrokeThickness=\"1.0\" RadiusY=\"1\" RadiusX=\"1\" Visibility=\"Hidden\" Width=\"4.0\" />\r\n\t\t\t\t\t\t\t\t\t\t</Canvas>\r\n\t\t\t\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t\t\t\t\t<Track x:Name=\"PART_Track\" Grid.Column=\"1\">\r\n\t\t\t\t\t\t\t\t\t\t<Track.DecreaseRepeatButton>\r\n\t\t\t\t\t\t\t\t\t\t\t<RepeatButton Command=\"{x:Static Slider.DecreaseLarge}\" Style=\"{StaticResource SliderRepeatButtonStyle}\" />\r\n\t\t\t\t\t\t\t\t\t\t</Track.DecreaseRepeatButton>\r\n\t\t\t\t\t\t\t\t\t\t<Track.IncreaseRepeatButton>\r\n\t\t\t\t\t\t\t\t\t\t\t<RepeatButton Command=\"{x:Static Slider.IncreaseLarge}\" Style=\"{StaticResource SliderRepeatButtonStyle}\" />\r\n\t\t\t\t\t\t\t\t\t\t</Track.IncreaseRepeatButton>\r\n\t\t\t\t\t\t\t\t\t\t<Track.Thumb>\r\n\t\t\t\t\t\t\t\t\t\t\t<Thumb x:Name=\"Thumb\" Style=\"{StaticResource VSliderThumbStyle}\" Width=\"14\" Height=\"9\" />\r\n\t\t\t\t\t\t\t\t\t\t</Track.Thumb>\r\n\t\t\t\t\t\t\t\t\t</Track>\r\n\t\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t\t\t<Trigger Property=\"TickPlacement\" Value=\"TopLeft\">\r\n\t\t\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"TopTick\" Value=\"Visible\" />\r\n\t\t\t\t\t\t\t\t\t<Setter Property=\"Style\" TargetName=\"Thumb\" Value=\"{StaticResource VSliderThumbStyle}\" />\r\n\t\t\t\t\t\t\t\t\t<Setter Property=\"Margin\" TargetName=\"TrackBackground\" Value=\"2,5,0,5\" />\r\n\t\t\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t\t\t<Trigger Property=\"TickPlacement\" Value=\"BottomRight\">\r\n\t\t\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"BottomTick\" Value=\"Visible\" />\r\n\t\t\t\t\t\t\t\t\t<Setter Property=\"Style\" TargetName=\"Thumb\" Value=\"{StaticResource VSliderThumbStyle}\" />\r\n\t\t\t\t\t\t\t\t\t<Setter Property=\"Margin\" TargetName=\"TrackBackground\" Value=\"0,5,2,5\" />\r\n\t\t\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t\t\t<Trigger Property=\"TickPlacement\" Value=\"Both\">\r\n\t\t\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"TopTick\" Value=\"Visible\" />\r\n\t\t\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"BottomTick\" Value=\"Visible\" />\r\n\t\t\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t\t\t<Trigger Property=\"IsSelectionRangeEnabled\" Value=\"true\">\r\n\t\t\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"PART_SelectionRange\" Value=\"Visible\" />\r\n\t\t\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t\t\t<Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n\t\t\t\t\t\t\t\t\t<Setter Property=\"Foreground\" TargetName=\"Thumb\" Value=\"{StaticResource SliderThumbFocusedBorderBrush}\" />\r\n\t\t\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t\t\t</ControlTemplate>\r\n\t\t\t\t\t</Setter.Value>\r\n\t\t\t\t</Setter>\r\n\t\t\t</Trigger>\r\n\t\t</Style.Triggers>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  RepeatButton Style  ********************************* -->\r\n\t<Style x:Key=\"RepeatButtonStyle\" TargetType=\"{x:Type RepeatButton}\">\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"FontSize\" Value=\"12\" />\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ThemeLightForegroundBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"8,0,8,2\" />\r\n\t\t<Setter Property=\"Margin\" Value=\"0\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"22\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n\t\t\t\t\t<Grid SnapsToDevicePixels=\"True\">\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0:0:0.2\" />\r\n\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"hover\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Pressed\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"pressed\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"disabled\" />\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"0.5\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"contentPresenter\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"FocusStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Focused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"focused\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unfocused\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Rectangle x:Name=\"normal\" Opacity=\"1\" RadiusX=\"3\" RadiusY=\"3\" StrokeThickness=\"{TemplateBinding BorderThickness}\" Stroke=\"{StaticResource ButtonBorderBrush}\" Fill=\"{StaticResource ButtonBackgroundBrush}\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"hover\" Opacity=\"0\" RadiusX=\"3\" RadiusY=\"3\" StrokeThickness=\"{TemplateBinding BorderThickness}\" Stroke=\"{StaticResource ButtonHoverBorderBrush}\" Fill=\"{StaticResource ButtonHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"pressed\" Opacity=\"0\" RadiusX=\"3\" RadiusY=\"3\" StrokeThickness=\"{TemplateBinding BorderThickness}\" Stroke=\"{StaticResource ButtonPressedBorderBrush}\" Fill=\"{StaticResource ButtonPressedBackgroundBrush}\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"focused\" Opacity=\"0\" RadiusX=\"3\" RadiusY=\"3\" StrokeThickness=\"{TemplateBinding BorderThickness}\" Stroke=\"{StaticResource ButtonFocusedBorderBrush}\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"disabled\" Opacity=\"0\" RadiusX=\"3\" RadiusY=\"3\" StrokeThickness=\"{TemplateBinding BorderThickness}\" Stroke=\"{StaticResource ButtonDisabledBorderBrush}\" Fill=\"{StaticResource ButtonDisabledBackgroundBrush}\" />\r\n\t\t\t\t\t\t<ContentPresenter x:Name=\"contentPresenter\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Margin=\"{TemplateBinding Padding}\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- ********************************** GridSplitter Style **********************************-->\r\n\t<Style x:Key=\"GridSplitterStyle\" TargetType=\"{x:Type GridSplitter}\">\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ThemeLightForegroundBrush}\" />\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource GridSplitterBackgroundBrush}\" />\r\n\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource GridSplitterBorderBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"SnapsToDevicePixels\" Value=\"True\" />\r\n\t\t<Setter Property=\"PreviewStyle\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<Style TargetType=\"Control\">\r\n\t\t\t\t\t<Setter Property=\"Control.Template\">\r\n\t\t\t\t\t\t<Setter.Value>\r\n\t\t\t\t\t\t\t<ControlTemplate>\r\n\t\t\t\t\t\t\t\t<Rectangle Fill=\"{StaticResource GridSplitterPressedBackgroundBrush}\" RadiusX=\"3\" RadiusY=\"3\" Opacity=\"0.8\" />\r\n\t\t\t\t\t\t\t</ControlTemplate>\r\n\t\t\t\t\t\t</Setter.Value>\r\n\t\t\t\t\t</Setter>\r\n\t\t\t\t</Style>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate>\r\n\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t<Border x:Name=\"border\" BorderThickness=\"{TemplateBinding BorderThickness}\" BorderBrush=\"{TemplateBinding BorderBrush}\" Background=\"{TemplateBinding Background}\" CornerRadius=\"3\">\r\n\t\t\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t\t\t<StackPanel x:Name=\"HGrip\" Height=\"5\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Orientation=\"Vertical\">\r\n\t\t\t\t\t\t\t\t\t<Rectangle Fill=\"{StaticResource ThemeLightForegroundBrush}\" Height=\"1\" Margin=\"1\" StrokeThickness=\"0\" Width=\"15\" />\r\n\t\t\t\t\t\t\t\t\t<Rectangle Fill=\"{StaticResource ThemeLightForegroundBrush}\" Height=\"1\" Margin=\"0\" StrokeThickness=\"0\" Width=\"15\" />\r\n\t\t\t\t\t\t\t\t</StackPanel>\r\n\t\t\t\t\t\t\t\t<StackPanel x:Name=\"VGrip\" Width=\"5\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Orientation=\"Horizontal\" Visibility=\"Visible\">\r\n\t\t\t\t\t\t\t\t\t<Rectangle Fill=\"{StaticResource ThemeLightForegroundBrush}\" Height=\"15\" Margin=\"1\" StrokeThickness=\"0\" Width=\"1\" />\r\n\t\t\t\t\t\t\t\t\t<Rectangle Fill=\"{StaticResource ThemeLightForegroundBrush}\" Height=\"15\" Margin=\"0\" StrokeThickness=\"0\" Width=\"1\" />\r\n\t\t\t\t\t\t\t\t</StackPanel>\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"HorizontalAlignment\" Value=\"Stretch\">\r\n\t\t\t\t\t\t\t<Setter TargetName=\"HGrip\" Property=\"Visibility\" Value=\"Visible\" />\r\n\t\t\t\t\t\t\t<Setter TargetName=\"VGrip\" Property=\"Visibility\" Value=\"Collapsed\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"VerticalAlignment\" Value=\"Stretch\">\r\n\t\t\t\t\t\t\t<Setter TargetName=\"VGrip\" Property=\"Visibility\" Value=\"Visible\" />\r\n\t\t\t\t\t\t\t<Setter TargetName=\"HGrip\" Property=\"Visibility\" Value=\"Collapsed\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n\t\t\t\t\t\t\t<Setter TargetName=\"border\" Property=\"Background\" Value=\"{StaticResource GridSplitterHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t<Setter TargetName=\"border\" Property=\"BorderBrush\" Value=\"{StaticResource GridSplitterHoverBorderBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsFocused\" Value=\"True\">\r\n\t\t\t\t\t\t\t<Setter TargetName=\"border\" Property=\"BorderBrush\" Value=\"{StaticResource GridSplitterFocusedBorderBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- ********************************** ProgressBar Style **********************************-->\r\n\t<Style x:Key=\"ProgressBarStyle\" TargetType=\"{x:Type ProgressBar}\">\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ProgressBarForegroundBrush}\" />\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource ProgressBarBackgroundBrush}\" />\r\n\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource ProgressBarBorderBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type ProgressBar}\">\r\n\t\t\t\t\t<Grid x:Name=\"TemplateRoot\" SnapsToDevicePixels=\"true\">\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Determinate\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Indeterminate\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard RepeatBehavior=\"Forever\">\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"00:00:.5\" From=\"0\" To=\"20\" Storyboard.TargetProperty=\"(Shape.Fill).(LinearGradientBrush.Transform).(TransformGroup.Children)[0].X\" Storyboard.TargetName=\"IndeterminateGradientFill\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Border x:Name=\"ProgressBarTrack\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" CornerRadius=\"3\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"PART_Track\" Margin=\"1\" />\r\n\t\t\t\t\t\t<Decorator x:Name=\"PART_Indicator\" HorizontalAlignment=\"Left\" Margin=\"1\">\r\n\t\t\t\t\t\t\t<Grid x:Name=\"Foreground\">\r\n\t\t\t\t\t\t\t\t<Rectangle x:Name=\"Indicator\" Fill=\"{TemplateBinding Foreground}\" />\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t</Decorator>\r\n\t\t\t\t\t\t<Grid x:Name=\"IndeterminateRoot\" Visibility=\"Collapsed\">\r\n\t\t\t\t\t\t\t<Rectangle x:Name=\"IndeterminateSolidFill\" Fill=\"{TemplateBinding Foreground}\" Stroke=\"{StaticResource ProgressBarIndeterminateBorderBrush}\" StrokeThickness=\"1\" Opacity=\"1\" RadiusY=\"3\" RadiusX=\"3\" RenderTransformOrigin=\"0.5,0.5\" />\r\n\t\t\t\t\t\t\t<Rectangle x:Name=\"IndeterminateGradientFill\" Fill=\"{StaticResource ProgressBarIndeterminateBackgroundBrush}\" RadiusY=\"3\" RadiusX=\"3\" Margin=\"1\" />\r\n\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"Orientation\" Value=\"Vertical\">\r\n\t\t\t\t\t\t\t<Setter Property=\"LayoutTransform\" TargetName=\"TemplateRoot\">\r\n\t\t\t\t\t\t\t\t<Setter.Value>\r\n\t\t\t\t\t\t\t\t\t<RotateTransform Angle=\"-90\" />\r\n\t\t\t\t\t\t\t\t</Setter.Value>\r\n\t\t\t\t\t\t\t</Setter>\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsIndeterminate\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"Indicator\" Value=\"Collapsed\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"IndeterminateRoot\" Value=\"Visible\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsIndeterminate\" Value=\"false\">\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n    \r\n\t<!-- ********************************** PasswordBox Style **********************************-->\r\n\t<Style x:Key=\"PasswordBoxStyle\" TargetType=\"{x:Type PasswordBox}\">\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource PasswordBoxForegroundBrush}\" />\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource TextBoxGradientBackgroundBrush}\" />\r\n\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource TextBoxBorderBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"4,2\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"24\" />\r\n\t\t<Setter Property=\"PasswordChar\" Value=\"●\" />\r\n\t\t<Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\" />\r\n\t\t<Setter Property=\"AllowDrop\" Value=\"true\" />\r\n\t\t<Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\" />\r\n\t\t<Setter Property=\"ScrollViewer.PanningMode\" Value=\"VerticalFirst\" />\r\n\t\t<Setter Property=\"Stylus.IsFlicksEnabled\" Value=\"False\" />\r\n\t\t<Setter Property=\"FlowDirection\" Value=\"LeftToRight\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type PasswordBox}\">\r\n\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t<Border Background=\"{TemplateBinding Background}\" x:Name=\"Bd\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\">\r\n\t\t\t\t\t\t\t<ScrollViewer x:Name=\"PART_ContentHost\" />\r\n\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t\t<Rectangle x:Name=\"innerShadow\" Width=\"20\" IsHitTestVisible=\"False\" StrokeThickness=\"1\" HorizontalAlignment=\"Left\" Margin=\"1,1,0,1\" RadiusX=\"2\" RadiusY=\"2\" Fill=\"{StaticResource TextBoxInnerShadowBackgroundBrush}\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"IsEnabled\" Value=\"False\">\r\n\t\t\t\t\t\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource TextBoxnDisabledBorderBrush}\" TargetName=\"Bd\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource TextBoxDisabledForegroundBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n\t\t\t\t\t\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource TextBoxHoverBorderBrush}\" TargetName=\"Bd\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsFocused\" Value=\"True\">\r\n\t\t\t\t\t\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource TextBoxFocusedBorderBrush}\" TargetName=\"Bd\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<MultiDataTrigger>\r\n\t\t\t\t\t\t\t<MultiDataTrigger.Conditions>\r\n\t\t\t\t\t\t\t\t<Condition Binding=\"{Binding IsReadOnly, RelativeSource={RelativeSource Self}}\" Value=\"True\" />\r\n\t\t\t\t\t\t\t\t<Condition Binding=\"{Binding IsEnabled, RelativeSource={RelativeSource Self}}\" Value=\"True\" />\r\n\t\t\t\t\t\t\t</MultiDataTrigger.Conditions>\r\n\t\t\t\t\t\t\t<Setter Property=\"Background\" Value=\"{StaticResource ReadonlyBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource ReadonlyBorderBrush}\" />\r\n\t\t\t\t\t\t</MultiDataTrigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  Tooltip Style  ********************************* -->\r\n\t<Style x:Key=\"{x:Type ToolTip}\" TargetType=\"ToolTip\">\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ThemeForegroundBrush}\" />\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource TooltipBackgroundBrush}\" />\r\n\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource TooltipBorderBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"5\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"ToolTip\">\r\n\t\t\t\t\t<Grid x:Name=\"Shadow\">\r\n\t\t\t\t\t\t<Rectangle StrokeThickness=\"{TemplateBinding BorderThickness}\" Fill=\"{StaticResource TooltipShadowBackgroundBrush}\" Margin=\"-1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0.03\" />\r\n\t\t\t\t\t\t<Rectangle StrokeThickness=\"{TemplateBinding BorderThickness}\" Fill=\"{StaticResource TooltipShadowBackgroundBrush}\" Margin=\"-2\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0.03\" />\r\n\t\t\t\t\t\t<Rectangle StrokeThickness=\"{TemplateBinding BorderThickness}\" Fill=\"{StaticResource TooltipShadowBackgroundBrush}\" Margin=\"-3\" RadiusX=\"3\" RadiusY=\"3\" Opacity=\"0.03\" />\r\n\t\t\t\t\t\t<Rectangle StrokeThickness=\"{TemplateBinding BorderThickness}\" Fill=\"{StaticResource TooltipShadowBackgroundBrush}\" Margin=\"-4\" RadiusX=\"4\" RadiusY=\"4\" Opacity=\"0.03\" />\r\n\t\t\t\t\t\t<Rectangle StrokeThickness=\"{TemplateBinding BorderThickness}\" Fill=\"{StaticResource TooltipShadowBackgroundBrush}\" Margin=\"-5\" RadiusX=\"5\" RadiusY=\"5\" Opacity=\"0.03\" />\r\n\t\t\t\t\t\t<Rectangle Stroke=\"{TemplateBinding BorderBrush}\" Fill=\"{TemplateBinding Background}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" />\r\n\t\t\t\t\t\t<StackPanel Orientation=\"Horizontal\">\r\n\t\t\t\t\t\t\t<ContentPresenter Margin=\"{TemplateBinding Padding}\" Content=\"{TemplateBinding Content}\" />\r\n\t\t\t\t\t\t</StackPanel>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  Expander Right Style  ********************************* -->\r\n\t<Style x:Key=\"ExpanderRightHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n\t\t\t\t\t<Border Padding=\"{TemplateBinding Padding}\">\r\n\t\t\t\t\t\t<Grid Background=\"{StaticResource TransparentBrush}\" SnapsToDevicePixels=\"False\">\r\n\t\t\t\t\t\t\t<Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t\t<RowDefinition Height=\"19\" />\r\n\t\t\t\t\t\t\t\t<RowDefinition Height=\"*\" />\r\n\t\t\t\t\t\t\t</Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t\t\t<Grid.LayoutTransform>\r\n\t\t\t\t\t\t\t\t\t<TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t<TransformGroup.Children>\r\n\t\t\t\t\t\t\t\t\t\t\t<TransformCollection>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<RotateTransform Angle=\"-90\" />\r\n\t\t\t\t\t\t\t\t\t\t\t</TransformCollection>\r\n\t\t\t\t\t\t\t\t\t\t</TransformGroup.Children>\r\n\t\t\t\t\t\t\t\t\t</TransformGroup>\r\n\t\t\t\t\t\t\t\t</Grid.LayoutTransform>\r\n\t\t\t\t\t\t\t\t<Rectangle x:Name=\"rectangle\" Fill=\"{StaticResource ExpanderButtonBackgroundBrush}\" RadiusX=\"2\" RadiusY=\"2\" HorizontalAlignment=\"Center\" Height=\"19\" Stroke=\"{StaticResource ExpanderButtonBorderBrush}\" VerticalAlignment=\"Center\" Width=\"19\" />\r\n\t\t\t\t\t\t\t\t<Path x:Name=\"arrow\" Stretch=\"Fill\" Width=\"7\" Height=\"4\" Data=\"M0,0 L6.8,0 3.4,3.9 z\" HorizontalAlignment=\"Center\" Fill=\"{StaticResource ExpanderArrowBorderBrush}\" VerticalAlignment=\"Center\" RenderTransformOrigin=\"0.5, 0.5\" />\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t\t<ContentPresenter HorizontalAlignment=\"Center\" Margin=\"0,4,0,0\" Grid.Row=\"1\" RecognizesAccessKey=\"True\" SnapsToDevicePixels=\"True\" VerticalAlignment=\"Stretch\" />\r\n\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t</Border>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"IsChecked\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Data\" TargetName=\"arrow\" Value=\"M3.4,-4.4 L6.8,3.9 3.9566912E-07,3.9 z\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Stroke\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonHoverBorderBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsPressed\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonPressedBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Stroke\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonPressedBorderBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  Expander Up Style  ********************************* -->\r\n\t<Style x:Key=\"ExpanderUpHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n\t\t\t\t\t<Border Padding=\"{TemplateBinding Padding}\">\r\n\t\t\t\t\t\t<Grid Background=\"{StaticResource TransparentBrush}\" SnapsToDevicePixels=\"False\">\r\n\t\t\t\t\t\t\t<Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"19\" />\r\n\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"*\" />\r\n\t\t\t\t\t\t\t</Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t\t\t<Grid.LayoutTransform>\r\n\t\t\t\t\t\t\t\t\t<TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t<TransformGroup.Children>\r\n\t\t\t\t\t\t\t\t\t\t\t<TransformCollection>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<RotateTransform Angle=\"180\" />\r\n\t\t\t\t\t\t\t\t\t\t\t</TransformCollection>\r\n\t\t\t\t\t\t\t\t\t\t</TransformGroup.Children>\r\n\t\t\t\t\t\t\t\t\t</TransformGroup>\r\n\t\t\t\t\t\t\t\t</Grid.LayoutTransform>\r\n\t\t\t\t\t\t\t\t<Rectangle x:Name=\"rectangle\" Fill=\"{StaticResource ExpanderButtonBackgroundBrush}\" RadiusX=\"2\" RadiusY=\"2\" HorizontalAlignment=\"Center\" Height=\"19\" Stroke=\"{StaticResource ExpanderButtonBorderBrush}\" VerticalAlignment=\"Center\" Width=\"19\" />\r\n\t\t\t\t\t\t\t\t<Path x:Name=\"arrow\" Stretch=\"Fill\" Width=\"7\" Height=\"4\" Data=\"M0,0 L6.8,0 3.4,3.9 z\" HorizontalAlignment=\"Center\" Fill=\"{StaticResource ExpanderArrowBorderBrush}\" VerticalAlignment=\"Center\" RenderTransformOrigin=\"0.5, 0.5\" />\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t\t<ContentPresenter Grid.Column=\"1\" HorizontalAlignment=\"Stretch\" Margin=\"4,0,0,0\" RecognizesAccessKey=\"True\" SnapsToDevicePixels=\"True\" VerticalAlignment=\"Center\" />\r\n\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t</Border>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"IsChecked\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Data\" TargetName=\"arrow\" Value=\"M3.4,-4.4 L6.8,3.9 3.9566912E-07,3.9 z\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Stroke\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonHoverBorderBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsPressed\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonPressedBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Stroke\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonPressedBorderBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  Expander Left Style  ********************************* -->\r\n\t<Style x:Key=\"ExpanderLeftHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n\t\t\t\t\t<Border Padding=\"{TemplateBinding Padding}\">\r\n\t\t\t\t\t\t<Grid Background=\"{StaticResource TransparentBrush}\" SnapsToDevicePixels=\"False\">\r\n\t\t\t\t\t\t\t<Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t\t<RowDefinition Height=\"19\" />\r\n\t\t\t\t\t\t\t\t<RowDefinition Height=\"*\" />\r\n\t\t\t\t\t\t\t</Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t\t\t<Grid.LayoutTransform>\r\n\t\t\t\t\t\t\t\t\t<TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t<TransformGroup.Children>\r\n\t\t\t\t\t\t\t\t\t\t\t<TransformCollection>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<RotateTransform Angle=\"90\" />\r\n\t\t\t\t\t\t\t\t\t\t\t</TransformCollection>\r\n\t\t\t\t\t\t\t\t\t\t</TransformGroup.Children>\r\n\t\t\t\t\t\t\t\t\t</TransformGroup>\r\n\t\t\t\t\t\t\t\t</Grid.LayoutTransform>\r\n\t\t\t\t\t\t\t\t<Rectangle x:Name=\"rectangle\" Fill=\"{StaticResource ExpanderButtonBackgroundBrush}\" RadiusX=\"2\" RadiusY=\"2\" HorizontalAlignment=\"Center\" Height=\"19\" Stroke=\"{StaticResource ExpanderButtonBorderBrush}\" VerticalAlignment=\"Center\" Width=\"19\" />\r\n\t\t\t\t\t\t\t\t<Path x:Name=\"arrow\" Stretch=\"Fill\" Width=\"7\" Height=\"4\" Data=\"M0,0 L6.8,0 3.4,3.9 z\" HorizontalAlignment=\"Center\" Fill=\"{StaticResource ExpanderArrowBorderBrush}\" VerticalAlignment=\"Center\" RenderTransformOrigin=\"0.5, 0.5\" />\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t\t<ContentPresenter Grid.Row=\"1\" HorizontalAlignment=\"Center\" Margin=\"0,4,0,0\" RecognizesAccessKey=\"True\" SnapsToDevicePixels=\"True\" VerticalAlignment=\"Stretch\" />\r\n\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t</Border>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"IsChecked\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Data\" TargetName=\"arrow\" Value=\"M3.4,-4.4 L6.8,3.9 3.9566912E-07,3.9 z\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Stroke\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonHoverBorderBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsPressed\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonPressedBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Stroke\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonPressedBorderBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  Expander Down Style  ********************************* -->\r\n\t<Style x:Key=\"ExpanderDownHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n\t\t\t\t\t<Border Padding=\"{TemplateBinding Padding}\">\r\n\t\t\t\t\t\t<Grid Background=\"{StaticResource TransparentBrush}\" SnapsToDevicePixels=\"False\">\r\n\t\t\t\t\t\t\t<Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"19\" />\r\n\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"*\" />\r\n\t\t\t\t\t\t\t</Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t<Rectangle x:Name=\"rectangle\" Fill=\"{StaticResource ExpanderButtonBackgroundBrush}\" RadiusX=\"2\" RadiusY=\"2\" HorizontalAlignment=\"Center\" Height=\"19\" Stroke=\"{StaticResource ExpanderButtonBorderBrush}\" VerticalAlignment=\"Center\" Width=\"19\" />\r\n\t\t\t\t\t\t\t<Path x:Name=\"arrow\" Stretch=\"Fill\" Width=\"7\" Height=\"4\" Data=\"M0,0 L6.8,0 3.4,3.9 z\" HorizontalAlignment=\"Center\" Fill=\"{StaticResource ExpanderArrowBorderBrush}\" VerticalAlignment=\"Center\" RenderTransformOrigin=\"0.5, 0.5\" />\r\n\t\t\t\t\t\t\t<ContentPresenter Grid.Column=\"1\" HorizontalAlignment=\"Stretch\" Margin=\"4,0,0,0\" RecognizesAccessKey=\"True\" SnapsToDevicePixels=\"True\" VerticalAlignment=\"Center\" />\r\n\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t</Border>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"IsChecked\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Data\" TargetName=\"arrow\" Value=\"M3.4,-4.4 L6.8,3.9 3.9566912E-07,3.9 z\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Stroke\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonHoverBorderBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsPressed\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonPressedBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Stroke\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonPressedBorderBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  Expander Style  ********************************* -->\r\n\t<Style x:Key=\"ExpanderStyle\" TargetType=\"{x:Type Expander}\">\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n\t\t<Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type Expander}\">\r\n\t\t\t\t\t<Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" CornerRadius=\"3\" SnapsToDevicePixels=\"true\">\r\n\t\t\t\t\t\t<DockPanel>\r\n\t\t\t\t\t\t\t<ToggleButton x:Name=\"HeaderSite\" ContentTemplate=\"{TemplateBinding HeaderTemplate}\" ContentTemplateSelector=\"{TemplateBinding HeaderTemplateSelector}\" Content=\"{TemplateBinding Header}\" DockPanel.Dock=\"Top\" Foreground=\"{TemplateBinding Foreground}\" FontWeight=\"{TemplateBinding FontWeight}\" FontStyle=\"{TemplateBinding FontStyle}\" FontStretch=\"{TemplateBinding FontStretch}\" FontSize=\"{TemplateBinding FontSize}\" FontFamily=\"{TemplateBinding FontFamily}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" IsChecked=\"{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" Margin=\"1\" MinWidth=\"0\" MinHeight=\"0\" Padding=\"{TemplateBinding Padding}\" Style=\"{StaticResource ExpanderDownHeaderStyle}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\" />\r\n\t\t\t\t\t\t\t<ContentPresenter x:Name=\"ExpandSite\" DockPanel.Dock=\"Bottom\" Focusable=\"false\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" Visibility=\"Collapsed\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" />\r\n\t\t\t\t\t\t</DockPanel>\r\n\t\t\t\t\t</Border>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"IsExpanded\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"ExpandSite\" Value=\"Visible\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"ExpandDirection\" Value=\"Right\">\r\n\t\t\t\t\t\t\t<Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Right\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Left\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Style\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderRightHeaderStyle}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"ExpandDirection\" Value=\"Up\">\r\n\t\t\t\t\t\t\t<Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Top\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Bottom\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Style\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderUpHeaderStyle}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"ExpandDirection\" Value=\"Left\">\r\n\t\t\t\t\t\t\t<Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Left\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Right\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Style\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderLeftHeaderStyle}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsEnabled\" Value=\"false\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ExpanderDisabledForegroundBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  ToggleButton Style  ********************************* -->\r\n\t<Style x:Key=\"ToggleButtonStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ThemeLightForegroundBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"2\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"hover\" d:IsOptimized=\"True\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Pressed\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"pressed\" d:IsOptimized=\"True\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"disabled\" d:IsOptimized=\"True\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CheckStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Checked\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"pressed\" d:IsOptimized=\"True\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unchecked\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Indeterminate\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"FocusStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Focused\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unfocused\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Rectangle Fill=\"{StaticResource TransparentBrush}\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"normal\" Fill=\"{StaticResource ToggleButtonBackgroundBrush}\" Stroke=\"{StaticResource ToggleButtonBorderBrush}\" RadiusX=\"3\" Grid.Column=\"1\" RadiusY=\"3\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"hover\" Fill=\"{StaticResource ToggleButtonHoverBackgroundBrush}\" Stroke=\"{StaticResource ToggleButtonHoverBorderBrush}\" RadiusX=\"3\" Grid.Column=\"1\" RadiusY=\"3\" Opacity=\"0\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"pressed\" Fill=\"{StaticResource ToggleButtonPressedBackgroundBrush}\" Stroke=\"{StaticResource ToggleButtonPressedBorderBrush}\" RadiusX=\"3\" Grid.Column=\"1\" RadiusY=\"3\" Opacity=\"0\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"disabled\" Fill=\"{StaticResource ToggleButtonDisabledBackgroundBrush}\" Stroke=\"{StaticResource ToggleButtonDisabledBorderBrush}\" RadiusX=\"3\" Grid.Column=\"1\" RadiusY=\"3\" Opacity=\"0\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"focused\" Fill=\"{StaticResource ToggleButtonFocusedBackgroundBrush}\" Stroke=\"{StaticResource ToggleButtonFocusedBorderBrush}\" RadiusX=\"3\" Grid.Column=\"1\" RadiusY=\"3\" Opacity=\"0\" />\r\n\t\t\t\t\t\t<ContentPresenter x:Name=\"contentPresenter\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\t\r\n\t<!-- *********************************  GroupBox Style  ********************************* -->\r\n\t<BorderGapMaskConverter x:Key=\"BorderGapMaskConverter\" />\r\n\t<Style x:Key=\"GroupBoxStyle\" TargetType=\"{x:Type GroupBox}\">\r\n\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource GroupBoxBorderBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type GroupBox}\">\r\n\t\t\t\t\t<Grid SnapsToDevicePixels=\"true\">\r\n\t\t\t\t\t\t<Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t<ColumnDefinition Width=\"6\" />\r\n\t\t\t\t\t\t\t<ColumnDefinition Width=\"Auto\" />\r\n\t\t\t\t\t\t\t<ColumnDefinition Width=\"*\" />\r\n\t\t\t\t\t\t\t<ColumnDefinition Width=\"6\" />\r\n\t\t\t\t\t\t</Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t<Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t<RowDefinition Height=\"Auto\" />\r\n\t\t\t\t\t\t\t<RowDefinition Height=\"Auto\" />\r\n\t\t\t\t\t\t\t<RowDefinition Height=\"*\" />\r\n\t\t\t\t\t\t\t<RowDefinition Height=\"6\" />\r\n\t\t\t\t\t\t</Grid.RowDefinitions>\r\n\t\t\t\t\t\t<Border BorderBrush=\"{StaticResource TransparentBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Grid.ColumnSpan=\"4\" Grid.Column=\"0\" CornerRadius=\"4\" Grid.Row=\"1\" Grid.RowSpan=\"3\" />\r\n\t\t\t\t\t\t<Border x:Name=\"Header\" Grid.Column=\"1\" Padding=\"3,1,3,0\" Grid.Row=\"0\" Grid.RowSpan=\"2\">\r\n\t\t\t\t\t\t\t<ContentPresenter ContentSource=\"Header\" RecognizesAccessKey=\"True\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" />\r\n\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t\t<ContentPresenter Grid.ColumnSpan=\"2\" Grid.Column=\"1\" Margin=\"{TemplateBinding Padding}\" Grid.Row=\"2\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" />\r\n\t\t\t\t\t\t<Border Grid.ColumnSpan=\"4\" CornerRadius=\"4\" Grid.Row=\"1\" Grid.RowSpan=\"3\">\r\n\t\t\t\t\t\t\t<Border.OpacityMask>\r\n\t\t\t\t\t\t\t\t<MultiBinding ConverterParameter=\"7\" Converter=\"{StaticResource BorderGapMaskConverter}\">\r\n\t\t\t\t\t\t\t\t\t<Binding ElementName=\"Header\" Path=\"ActualWidth\" />\r\n\t\t\t\t\t\t\t\t\t<Binding Path=\"ActualWidth\" RelativeSource=\"{RelativeSource Self}\" />\r\n\t\t\t\t\t\t\t\t\t<Binding Path=\"ActualHeight\" RelativeSource=\"{RelativeSource Self}\" />\r\n\t\t\t\t\t\t\t\t</MultiBinding>\r\n\t\t\t\t\t\t\t</Border.OpacityMask>\r\n\t\t\t\t\t\t\t<Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\">\r\n\t\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n    \r\n    <!--********************** Implicit Styles *********************** -->\r\n    <Style BasedOn=\"{StaticResource ButtonStyle}\" TargetType=\"{x:Type Button}\" />\r\n    <Style BasedOn=\"{StaticResource ScrollbarStyle}\" TargetType=\"{x:Type ScrollBar}\" />\r\n    <Style BasedOn=\"{StaticResource ScrollViewerStyle}\" TargetType=\"{x:Type ScrollViewer}\" />\r\n    <Style BasedOn=\"{StaticResource ComboBoxStyle}\" TargetType=\"{x:Type ComboBox}\" />\r\n    <Style BasedOn=\"{StaticResource ComboBoxItemStyle}\" TargetType=\"{x:Type ComboBoxItem}\" />\r\n    <Style BasedOn=\"{StaticResource TextBoxStyle}\" TargetType=\"{x:Type TextBox}\" />\r\n    <Style BasedOn=\"{StaticResource ListBoxStyle}\" TargetType=\"{x:Type ListBox}\" />\r\n    <Style BasedOn=\"{StaticResource ListBoxItemStyle}\" TargetType=\"{x:Type ListBoxItem}\" />\r\n    <Style BasedOn=\"{StaticResource CheckBoxStyle}\" TargetType=\"{x:Type CheckBox}\" />\r\n    <Style BasedOn=\"{StaticResource RadioButtonStyle}\" TargetType=\"{x:Type RadioButton}\" />\r\n    <Style BasedOn=\"{StaticResource SliderStyle}\" TargetType=\"{x:Type Slider}\" />\r\n    <Style BasedOn=\"{StaticResource RepeatButtonStyle}\" TargetType=\"{x:Type RepeatButton}\" />\r\n    <Style BasedOn=\"{StaticResource GridSplitterStyle}\" TargetType=\"{x:Type GridSplitter}\" />\r\n    <Style BasedOn=\"{StaticResource ProgressBarStyle}\" TargetType=\"{x:Type ProgressBar}\" />\r\n    <Style BasedOn=\"{StaticResource PasswordBoxStyle}\" TargetType=\"{x:Type PasswordBox}\" />\r\n    <Style BasedOn=\"{StaticResource ExpanderStyle}\" TargetType=\"{x:Type Expander}\" />\r\n    <Style BasedOn=\"{StaticResource ToggleButtonStyle}\" TargetType=\"{x:Type ToggleButton}\" />\r\n    <Style BasedOn=\"{StaticResource GroupBoxStyle}\" TargetType=\"{x:Type GroupBox}\" />\r\n\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/JetPack/Assets/Brushes.xaml",
    "content": "﻿<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n      xmlns:ice=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation/options\"\r\n      xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" xmlns:System=\"clr-namespace:System;assembly=mscorlib\">\r\n\r\n   <!-- \r\n    ***************************************************************************\r\n    Green Accents\r\n    ***************************************************************************\r\n    -->\r\n\r\n   <LinearGradientBrush ice:Freeze=\"True\" x:Key=\"InputSelectionBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n      <GradientStop Color=\"#FF98B913\" Offset=\"0\" />\r\n      <GradientStop Color=\"#FF75A20A\" Offset=\"1\" />\r\n   </LinearGradientBrush>\r\n\r\n   <LinearGradientBrush ice:Freeze=\"True\" x:Key=\"ColorAccentBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n      <GradientStop Color=\"#BCD742\" Offset=\"0\" />\r\n      <GradientStop Color=\"#91B006\" Offset=\"1\" />\r\n   </LinearGradientBrush>\r\n\r\n   <LinearGradientBrush ice:Freeze=\"True\" x:Key=\"ColorAccentOverBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n      <GradientStop Color=\"#c3e040\" Offset=\"1\" />\r\n      <GradientStop Color=\"#9ebf0a\" />\r\n   </LinearGradientBrush>\r\n\r\n   <LinearGradientBrush ice:Freeze=\"True\" x:Key=\"ColorAccentSubduedBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n      <GradientStop Color=\"#FF6D9000\" Offset=\"0.31\" />\r\n      <GradientStop Color=\"#FF5A8100\" Offset=\"0.78\" />\r\n   </LinearGradientBrush>\r\n\r\n<SolidColorBrush ice:Freeze=\"True\" x:Key=\"DataGridMouseOverBrush\" Color=\"#DAE880\" />\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"DataGridSelectedBrush\" Color=\"#DDF062\" />\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"ColorAccentHighlightBrush\" Color=\"#c2df00\" />\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"ColorAccentSolidBrush\" Color=\"#FF75A20A\" />\r\n\r\n   <!-- \r\n    ***************************************************************************\r\n    Orange Accents (Remove Comments to Enable)\r\n    ***************************************************************************\r\n    -->\r\n\r\n   <!--\r\n    <LinearGradientBrush ice:Freeze=\"True\" x:Key=\"InputSelectionBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#ffb629\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FE770A\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n\r\n    <LinearGradientBrush ice:Freeze=\"True\" x:Key=\"ColorAccentBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#ffb72c\" Offset=\"0\" />\r\n        <GradientStop Color=\"#ff8700\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush ice:Freeze=\"True\" x:Key=\"ColorAccentOverBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#ffc149\" Offset=\"0\" />\r\n        <GradientStop Color=\"#ff9800\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush ice:Freeze=\"True\" x:Key=\"ColorAccentSubduedBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFCE5300\" Offset=\"1\" />\r\n        <GradientStop Color=\"#FFDD870D\" />\r\n    </LinearGradientBrush>\r\n\r\n    <SolidColorBrush ice:Freeze=\"True\" x:Key=\"ColorAccentHighlightBrush\" Color=\"#FFFFC600\" />\r\n    <SolidColorBrush ice:Freeze=\"True\" x:Key=\"ColorAccentSolidBrush\" Color=\"#FE770A\" />\r\n    -->\r\n\r\n   <!-- \r\n    ***************************************************************************\r\n    Blue Accents (Remove Comments to Enable)\r\n    ***************************************************************************\r\n    -->\r\n\r\n   <!--\r\n    <LinearGradientBrush ice:Freeze=\"True\" x:Key=\"InputSelectionBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#42baff\" Offset=\"0\" />\r\n        <GradientStop Color=\"#148cd1\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush ice:Freeze=\"True\" x:Key=\"ColorAccentBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#42baff\" Offset=\"0\" />\r\n        <GradientStop Color=\"#148cd1\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush ice:Freeze=\"True\" x:Key=\"ColorAccentOverBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#74cdff\" Offset=\"1\" />\r\n        <GradientStop Color=\"#1a9ee8\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush ice:Freeze=\"True\" x:Key=\"ColorAccentSubduedBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#1aa0ec\" Offset=\"0.31\" />\r\n        <GradientStop Color=\"#0072be\" Offset=\"0.78\" />\r\n    </LinearGradientBrush>\r\n\r\n    <SolidColorBrush ice:Freeze=\"True\" x:Key=\"ColorAccentHighlightBrush\" Color=\"#8ddbff\" />\r\n    <SolidColorBrush ice:Freeze=\"True\" x:Key=\"ColorAccentSolidBrush\" Color=\"#148cd1\" />\r\n    -->\r\n\r\n   <!-- \r\n    ***************************************************************************\r\n    General Brushes and Colors\r\n    ***************************************************************************\r\n    -->\r\n\r\n   <Color x:Key=\"ColorForegroundShadowColor\">#FFFFFF</Color>\r\n\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"ControlForeground\" Color=\"#FF202020\" />\r\n\r\n   <LinearGradientBrush ice:Freeze=\"True\" x:Key=\"ControlBackgroundNormal\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n      <GradientStop Color=\"#FFF7F7F7\" Offset=\"0.164\" />\r\n      <GradientStop Color=\"#FFC6C6C6\" Offset=\"0.802\" />\r\n      <GradientStop Color=\"#FFC6C6C6\" Offset=\"0.953\" />\r\n   </LinearGradientBrush>\r\n\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"ControlBackgroundAltBrush\" Color=\"#FF57575C\" />\r\n\r\n   <LinearGradientBrush ice:Freeze=\"True\" x:Key=\"ControlBackgroundOver\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n      <GradientStop Color=\"White\" Offset=\"0.211\" />\r\n      <GradientStop Color=\"#FFDEDEDE\" Offset=\"0.784\" />\r\n   </LinearGradientBrush>\r\n\r\n   <LinearGradientBrush ice:Freeze=\"True\" x:Key=\"ControlBackgroundPressed\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n      <GradientStop Color=\"#FFCECECE\" Offset=\"0.204\" />\r\n      <GradientStop Color=\"#FFAFAFAF\" Offset=\"0.864\" />\r\n   </LinearGradientBrush>\r\n\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"ControlOuterHighlightBrush\" Color=\"#40FFFFFF\" />\r\n\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"ControlHighlight\" Color=\"#80FFFFFF\" />\r\n\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"ControlBorderBrush\" Color=\"#FF686868\" />\r\n\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"ControlDarkEdge\" Color=\"#FF2E2E30\" />\r\n\r\n   <LinearGradientBrush ice:Freeze=\"True\" x:Key=\"StaticControlBackground\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n      <GradientStop Color=\"#FFE2E2E2\" Offset=\"0\" />\r\n      <GradientStop Color=\"#FFC6C6C6\" Offset=\"1\" />\r\n   </LinearGradientBrush>\r\n\r\n   <LinearGradientBrush ice:Freeze=\"True\" x:Key=\"StaticControlBackgroundOver\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n      <GradientStop Color=\"#FFF8F8F8\" Offset=\"0\" />\r\n      <GradientStop Color=\"#FFD0D0D0\" Offset=\"1\" />\r\n   </LinearGradientBrush>\r\n\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"InputBackgroundBrush\" Color=\"White\" />\r\n\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"InputForegroundBrush\" Color=\"#FF404040\" />\r\n\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"InputSelectionForegroundBrush\" Color=\"White\" />\r\n\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"InnerShadowDarkBrush\" Color=\"#50505050\" />\r\n\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"InnerShadowLightBrush\" Color=\"#20202020\" />\r\n\r\n   <LinearGradientBrush ice:Freeze=\"True\" x:Key=\"OverlayBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n      <GradientStop Color=\"#4CFFFFFF\" Offset=\"0\" />\r\n      <GradientStop Color=\"#4C000000\" Offset=\"1\" />\r\n   </LinearGradientBrush>\r\n\r\n   <LinearGradientBrush ice:Freeze=\"True\" x:Key=\"DisabledBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n      <GradientStop Color=\"#FF9C9DA0\" />\r\n      <GradientStop Color=\"#FF8B8C8E\" Offset=\"1\" />\r\n   </LinearGradientBrush>\r\n\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"DisabledBorderBrush\" Color=\"#66000000\" />\r\n\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"ReadOnlyBrush\" Color=\"#40000000\" />\r\n\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"ErrorBrush\" Color=\"#FFEF0A0A\" />\r\n\r\n   <LinearGradientBrush ice:Freeze=\"True\" x:Key=\"CheckBoxBackgroundBrush\" StartPoint=\"0,0\" EndPoint=\"0,1\">\r\n      <GradientStop Color=\"#FF57575C\" Offset=\"0.3\" />\r\n      <GradientStop Color=\"#FF55555A\" Offset=\"0.5\" />\r\n      <GradientStop Color=\"#FF4F4F54\" Offset=\"1.0\" />\r\n   </LinearGradientBrush>\r\n\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"CheckBoxBorderBrush\" Color=\"#FF343537\" />\r\n\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"CheckBoxInnerShadowBrush\" Color=\"#50303030\" />\r\n\r\n   <LinearGradientBrush ice:Freeze=\"True\" x:Key=\"RadioButtonBackgroundBrush\" StartPoint=\"0,0\" EndPoint=\"1,1\">\r\n      <GradientStop Color=\"#FF505050\" Offset=\"0.3\" />\r\n      <GradientStop Color=\"#FF484848\" Offset=\"1.0\" />\r\n   </LinearGradientBrush>\r\n\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"RadioButtonBorderBrush\" Color=\"#FF343537\" />\r\n\r\n   <RadialGradientBrush ice:Freeze=\"True\" x:Key=\"RadioButtonInnerShadowBrush\">\r\n      <GradientStop Color=\"#00000000\" Offset=\"0.5\" />\r\n      <GradientStop Color=\"#28000000\" Offset=\"1.0\" />\r\n   </RadialGradientBrush>\r\n\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"NormalFontBrush\" Color=\"#FFFFFF\" />\r\n\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"Heading1FontBrush\" Color=\"#FFFFFF\" />\r\n\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"Heading2FontBrush\" Color=\"#80FFFFFF\" />\r\n\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"Heading3FontBrush\" Color=\"#FFFFFF\" />\r\n\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"HyperlinkBrush\" Color=\"#FFD0FF00\" />\r\n\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"HyperlinkPressedBrush\" Color=\"#FFB1D900\" />\r\n\r\n   <LinearGradientBrush ice:Freeze=\"True\" x:Key=\"MouseOverSelectionBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n      <GradientStop Color=\"#FFEDEDEE\" Offset=\"0\" />\r\n      <GradientStop Color=\"#FFDEDEDF\" Offset=\"1\" />\r\n   </LinearGradientBrush>\r\n\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"ScrollBackgroundBrush\" Color=\"#FFDCDCDD\" />\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"ScrollBarDisabledBackground\" Color=\"#77DCDCDD\" />\r\n\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"HeaderForegroundBrush\" Color=\"#FF303030\" />\r\n\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"DarkBackground\" Color=\"#FF707176\" />\r\n\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"DarkBorder\" Color=\"#FF58585D\" />\r\n\r\n   <LinearGradientBrush ice:Freeze=\"True\" x:Key=\"DataGridHeaderBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n      <GradientStop Color=\"#606066\" Offset=\"0\" />\r\n      <GradientStop Color=\"#4D4D51\" Offset=\"1\" />\r\n   </LinearGradientBrush>\r\n\r\n   <!-- \r\n    ***************************************************************************\r\n    Dark Input Controls\r\n    ***************************************************************************\r\n    -->\r\n\r\n   <LinearGradientBrush ice:Freeze=\"True\" x:Key=\"DarkControlBackgroundBrush\" StartPoint=\"0,0\" EndPoint=\"0,1\">\r\n      <GradientStop Color=\"#FF57575F\" Offset=\"0.3\" />\r\n      <GradientStop Color=\"#FF505054\" Offset=\"1.0\" />\r\n   </LinearGradientBrush>\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"DarkControlBorderBrush\" Color=\"#D0505050\" />\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"DarkControlForegroundBrush\" Color=\"White\" />\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"DarkInnerShadowDarkBrush\" Color=\"#50303030\" />\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"DarkInnerShadowLightBrush\" Color=\"#20303030\" />\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"DarkControlHighlight\" Color=\"#4CFFFFFF\" />\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"DarkReadOnlyBrush\" Color=\"#40FFFFFF\" />\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"DarkDisabledBrush\" Color=\"#50FFFFFF\" />\r\n\r\n   <!-- \r\n    ***************************************************************************\r\n    Green Button\r\n    ***************************************************************************\r\n    -->\r\n\r\n   <Color x:Key=\"ControlForegroundGreenColor\">#FFFFFFFF</Color>\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"ControlForegroundGreen\"\r\n         Color=\"{StaticResource ControlForegroundGreenColor}\" />\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"HighlightBrushGreen\" Color=\"#BED126\" />\r\n   <LinearGradientBrush ice:Freeze=\"True\" x:Key=\"ControlBackgroundNormalGreen\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n      <GradientStop Color=\"#FFA0BB0E\" Offset=\"0.176\" />\r\n      <GradientStop Color=\"#FF6D9700\" Offset=\"0.894\" />\r\n   </LinearGradientBrush>\r\n   <LinearGradientBrush ice:Freeze=\"True\" x:Key=\"ControlBackgroundOverGreen\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n      <GradientStop Color=\"#FFAECC07\" Offset=\"0.228\" />\r\n      <GradientStop Color=\"#FF83B100\" Offset=\"0.849\" />\r\n   </LinearGradientBrush>\r\n   <LinearGradientBrush ice:Freeze=\"True\" x:Key=\"ControlBackgroundPressedGreen\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n      <GradientStop Color=\"#FF6D9000\" Offset=\"0.31\" />\r\n      <GradientStop Color=\"#FF5A8100\" Offset=\"0.78\" />\r\n   </LinearGradientBrush>\r\n   <Color x:Key=\"ColorForegroundShadowColorGreen\">#2B3D00</Color>\r\n\r\n   <!-- \r\n    ***************************************************************************\r\n    Orange Button\r\n    ***************************************************************************\r\n    -->\r\n\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"ControlForegroundOrange\" Color=\"#FFFFFF\" />\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"HighlightBrushOrange\" Color=\"#FFCC00\" />\r\n   <LinearGradientBrush ice:Freeze=\"True\" x:Key=\"ControlBackgroundNormalOrange\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n      <GradientStop Color=\"#FFFFA700\" Offset=\"0.482\" />\r\n      <GradientStop Color=\"#FFFF7600\" Offset=\"0.864\" />\r\n      <GradientStop Color=\"#FFFFB400\" Offset=\"0.169\" />\r\n   </LinearGradientBrush>\r\n   <LinearGradientBrush ice:Freeze=\"True\" x:Key=\"ControlBackgroundOverOrange\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n      <GradientStop Color=\"#FFFFC740\" Offset=\"0.254\" />\r\n      <GradientStop Color=\"#FFFFB400\" Offset=\"0.496\" />\r\n      <GradientStop Color=\"#FFFF9900\" Offset=\"1\" />\r\n   </LinearGradientBrush>\r\n   <LinearGradientBrush ice:Freeze=\"True\" x:Key=\"ControlBackgroundPressedOrange\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n      <GradientStop Color=\"#FFDD870D\" Offset=\"0.207\" />\r\n      <GradientStop Color=\"#FFCE5300\" Offset=\"0.858\" />\r\n   </LinearGradientBrush>\r\n   <Color x:Key=\"ColorForegroundShadowColorOrange\">#B62F00</Color>\r\n\r\n   <!-- \r\n    ***************************************************************************\r\n    Blue Button\r\n    ***************************************************************************\r\n    -->\r\n\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"ControlForegroundBlue\" Color=\"#FFFFFF\" />\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"HighlightBrushBlue\" Color=\"#B9DAEC\" />\r\n   <LinearGradientBrush ice:Freeze=\"True\" x:Key=\"ControlBackgroundNormalBlue\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n      <GradientStop Color=\"#FF99C7E2\" Offset=\"0.14\" />\r\n      <GradientStop Color=\"#FF87BDDD\" Offset=\"0.375\" />\r\n      <GradientStop Color=\"#FF4599CA\" Offset=\"0.871\" />\r\n   </LinearGradientBrush>\r\n   <LinearGradientBrush ice:Freeze=\"True\" x:Key=\"ControlBackgroundOverBlue\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n      <GradientStop Color=\"#FF81CDF8\" Offset=\"0.237\" />\r\n      <GradientStop Color=\"#FF2DACF3\" Offset=\"0.866\" />\r\n   </LinearGradientBrush>\r\n   <LinearGradientBrush ice:Freeze=\"True\" x:Key=\"ControlBackgroundPressedBlue\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n      <GradientStop Color=\"#FF769BB1\" Offset=\"0.22\" />\r\n      <GradientStop Color=\"#FF437694\" Offset=\"0.797\" />\r\n   </LinearGradientBrush>\r\n   <Color x:Key=\"ColorForegroundShadowColorBlue\">#FF00538E</Color>\r\n\r\n   <!-- \r\n    ***************************************************************************\r\n    Navigation\r\n    ***************************************************************************\r\n    -->\r\n\r\n   <Color x:Key=\"NavigationActiveForegroundColor\">White</Color>\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"NavigationForegroundColorBrush\"\r\n         Color=\"{StaticResource NavigationActiveForegroundColor}\" />\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"NavigationInactiveForegroundColorBrush\" Color=\"#FF58585D\" />\r\n\r\n   <!-- \r\n    ***************************************************************************\r\n    FocusVisuals\r\n    Note: to enable focus visuals, change the Color property of the \r\n    FocusVisualBrush resource below to a visible color (like #6000)\r\n    ***************************************************************************\r\n    -->\r\n\r\n   <System:Double x:Key=\"FocusVisualStrokeThickness\">1</System:Double>\r\n   <Thickness x:Key=\"FocusVisualThickness\">1,1,1,1</Thickness>\r\n   <SolidColorBrush ice:Freeze=\"True\" x:Key=\"FocusVisualBrush\" Color=\"#00000000\" />\r\n\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/JetPack/Assets/CoreStyles.xaml",
    "content": "﻿<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n      xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n      xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n      xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n      xmlns:System=\"clr-namespace:System;assembly=mscorlib\" mc:Ignorable=\"d\">\r\n\r\n   <!-- Global Settings. -->\r\n   <ResourceDictionary.MergedDictionaries>\r\n      <ResourceDictionary Source=\"Brushes.xaml\" />\r\n      <ResourceDictionary Source=\"Fonts.xaml\" />\r\n   </ResourceDictionary.MergedDictionaries>\r\n\r\n   <GridLengthConverter x:Key=\"GridLengthConverter\" />\r\n   <!-- Shared Effects. -->\r\n   <DropShadowEffect x:Key=\"ControlTextEffect\" BlurRadius=\"0\" Color=\"White\" Direction=\"293\" Opacity=\"0.5\"\r\n         ShadowDepth=\"1\" />\r\n   <DropShadowEffect x:Key=\"TextEffect\" BlurRadius=\"5\" Color=\"Black\" Direction=\"293\" Opacity=\"0.25\" ShadowDepth=\"0\" />\r\n   <DropShadowEffect x:Key=\"ControlShadowEffect\" BlurRadius=\"3\" Color=\"#000000\" Direction=\"-90\" Opacity=\"0.55\"\r\n         ShadowDepth=\"1\" />\r\n   <DropShadowEffect x:Key=\"LightControlShadowEffect\" Color=\"#55524f\" ShadowDepth=\"1\" BlurRadius=\"4\" Opacity=\"0.5\" />\r\n\r\n   <DropShadowEffect x:Key=\"HeaderTextEffect\" BlurRadius=\"0\" Color=\"White\" Direction=\"293\" Opacity=\"0.5\" ShadowDepth=\"1\" />\r\n\r\n   <!-- Default Font and Text Settings in UserControl. -->\r\n   <Style TargetType=\"UserControl\">\r\n      <Setter Property=\"FontFamily\" Value=\"{StaticResource DefaultFontFamily}\" />\r\n      <Setter Property=\"FontSize\" Value=\"{StaticResource DefaultFontSize}\" />\r\n      <Setter Property=\"TextOptions.TextHintingMode\" Value=\"Animated\" />\r\n   </Style>\r\n\r\n   <!-- \r\n    ***************************************************************************\r\n    Expander\r\n    ***************************************************************************\r\n    -->\r\n\r\n   <Style TargetType=\"Expander\">\r\n      <Setter Property=\"BorderThickness\" Value=\"0\" />\r\n      <Setter Property=\"Foreground\" Value=\"{StaticResource HeaderForegroundBrush}\" />\r\n      <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n      <Setter Property=\"Padding\" Value=\"0\" />\r\n      <Setter Property=\"TextOptions.TextHintingMode\" Value=\"Animated\" />\r\n      <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n      <Setter Property=\"Template\">\r\n         <Setter.Value>\r\n            <ControlTemplate TargetType=\"Expander\">\r\n               <Grid Background=\"Transparent\">\r\n                  <Grid.Resources>\r\n                     <ControlTemplate x:Key=\"ExpanderDownHeaderTemplate\" TargetType=\"ToggleButton\">\r\n                        <Grid Background=\"Transparent\">\r\n                           <VisualStateManager.VisualStateGroups>\r\n                              <VisualStateGroup x:Name=\"CheckStates\">\r\n                                 <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00\" />\r\n                                 </VisualStateGroup.Transitions>\r\n                                 <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                       <DoubleAnimation Duration=\"0\" To=\"8\"\r\n                                             Storyboard.TargetProperty=\"(FrameworkElement.Width)\"\r\n                                             Storyboard.TargetName=\"arrow\" d:IsOptimized=\"True\" />\r\n                                       <DoubleAnimation Duration=\"0\" To=\"5\"\r\n                                             Storyboard.TargetProperty=\"(FrameworkElement.Height)\"\r\n                                             Storyboard.TargetName=\"arrow\" d:IsOptimized=\"True\" />\r\n                                       <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Data\"\r\n                                             Storyboard.TargetName=\"arrow\">\r\n                                          <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\r\n                                             <DiscreteObjectKeyFrame.Value>\r\n                                                <PathGeometry>M0,0 L1,0 L0.5,1 z</PathGeometry>\r\n                                             </DiscreteObjectKeyFrame.Value>\r\n                                          </DiscreteObjectKeyFrame>\r\n                                          <!--Value=\"M0,0 L1,0 L0.5,1 z\" />-->\r\n                                       </ObjectAnimationUsingKeyFrames>\r\n                                       <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Margin\"\r\n                                             Storyboard.TargetName=\"arrow\">\r\n                                          <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                             <DiscreteObjectKeyFrame.Value>\r\n                                                <Thickness>0,2,0,0</Thickness>\r\n                                             </DiscreteObjectKeyFrame.Value>\r\n                                          </DiscreteObjectKeyFrame>\r\n                                          <!--Value=\"0,2,0,0\"-->\r\n                                       </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                 </VisualState>\r\n                                 <VisualState x:Name=\"Unchecked\" />\r\n                              </VisualStateGroup>\r\n                              <VisualStateGroup x:Name=\"CommonStates\">\r\n                                 <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\" />\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\" />\r\n                                 </VisualStateGroup.Transitions>\r\n                                 <VisualState x:Name=\"Normal\" />\r\n                                 <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                       <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"MouseOverElement\"\r\n                                             Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                                    </Storyboard>\r\n                                 </VisualState>\r\n                                 <VisualState x:Name=\"Pressed\" />\r\n                              </VisualStateGroup>\r\n                              <VisualStateGroup x:Name=\"FocusStates\">\r\n                                 <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                       <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\"\r\n                                             Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                                    </Storyboard>\r\n                                 </VisualState>\r\n                                 <VisualState x:Name=\"Unfocused\" />\r\n                              </VisualStateGroup>\r\n                           </VisualStateManager.VisualStateGroups>\r\n                           <StackPanel Orientation=\"Horizontal\">\r\n                              <Grid Effect=\"{StaticResource ControlShadowEffect}\" Height=\"18\" Width=\"18\">\r\n                                 <Ellipse x:Name=\"circle\" Fill=\"{StaticResource ControlBackgroundNormal}\" />\r\n                                 <Ellipse x:Name=\"MouseOverElement\" Fill=\"{StaticResource ControlBackgroundOver}\"\r\n                                       Opacity=\"0\" />\r\n                                 <Path x:Name=\"arrow\" Data=\"M0,0 L1,0.5 0,1Z\" Fill=\"#404040\" Width=\"5\" Height=\"8\"\r\n                                       Stretch=\"Fill\" />\r\n                              </Grid>\r\n                              <ContentControl x:Name=\"header\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                                    Content=\"{TemplateBinding Content}\" Effect=\"{StaticResource HeaderTextEffect}\"\r\n                                    FontWeight=\"Bold\" Foreground=\"{TemplateBinding Foreground}\" Grid.Row=\"1\"\r\n                                    Margin=\"6,0,0,0\" VerticalAlignment=\"Center\" />\r\n                           </StackPanel>\r\n                           <Rectangle x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Margin=\"-2\" Opacity=\"0\"\r\n                                 RadiusX=\"2\" RadiusY=\"2\" Stroke=\"{StaticResource FocusVisualBrush}\"\r\n                                 StrokeThickness=\"{StaticResource FocusVisualStrokeThickness}\" />\r\n                        </Grid>\r\n                     </ControlTemplate>\r\n                     <ControlTemplate x:Key=\"ExpanderUpHeaderTemplate\" TargetType=\"ToggleButton\">\r\n                        <Grid Background=\"Transparent\">\r\n                           <VisualStateManager.VisualStateGroups>\r\n                              <VisualStateGroup x:Name=\"CheckStates\">\r\n                                 <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00\" />\r\n                                 </VisualStateGroup.Transitions>\r\n                                 <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                       <DoubleAnimation Duration=\"0\" To=\"8\"\r\n                                             Storyboard.TargetProperty=\"(FrameworkElement.Width)\"\r\n                                             Storyboard.TargetName=\"arrow\" d:IsOptimized=\"True\" />\r\n                                       <DoubleAnimation Duration=\"0\" To=\"5\"\r\n                                             Storyboard.TargetProperty=\"(FrameworkElement.Height)\"\r\n                                             Storyboard.TargetName=\"arrow\" d:IsOptimized=\"True\" />\r\n                                       <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Data\"\r\n                                             Storyboard.TargetName=\"arrow\">\r\n                                          <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\r\n                                             <DiscreteObjectKeyFrame.Value>\r\n                                                <PathGeometry>M0,1 L1,1 L0.5,0 z</PathGeometry>\r\n                                             </DiscreteObjectKeyFrame.Value>\r\n                                          </DiscreteObjectKeyFrame>\r\n                                       </ObjectAnimationUsingKeyFrames>\r\n                                       <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Margin\"\r\n                                             Storyboard.TargetName=\"arrow\">\r\n                                          <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                             <DiscreteObjectKeyFrame.Value>\r\n                                                <Thickness>0,0,0,2</Thickness>\r\n                                             </DiscreteObjectKeyFrame.Value>\r\n                                          </DiscreteObjectKeyFrame>\r\n                                          <!--Value=\"0,0,0,2\" />-->\r\n                                       </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                 </VisualState>\r\n                                 <VisualState x:Name=\"Unchecked\" />\r\n                              </VisualStateGroup>\r\n                              <VisualStateGroup x:Name=\"CommonStates\">\r\n                                 <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\" />\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\" />\r\n                                 </VisualStateGroup.Transitions>\r\n                                 <VisualState x:Name=\"Normal\" />\r\n                                 <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                       <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"MouseOverElement\"\r\n                                             Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                                    </Storyboard>\r\n                                 </VisualState>\r\n                                 <VisualState x:Name=\"Pressed\" />\r\n                              </VisualStateGroup>\r\n                              <VisualStateGroup x:Name=\"FocusStates\">\r\n                                 <VisualState x:Name=\"Focused\" />\r\n                                 <VisualState x:Name=\"Unfocused\" />\r\n                              </VisualStateGroup>\r\n                           </VisualStateManager.VisualStateGroups>\r\n                           <StackPanel Orientation=\"Horizontal\">\r\n                              <Grid Effect=\"{StaticResource ControlShadowEffect}\" Height=\"18\" Width=\"18\">\r\n                                 <Ellipse x:Name=\"circle\" Fill=\"{StaticResource ControlBackgroundNormal}\" />\r\n                                 <Ellipse x:Name=\"MouseOverElement\" Fill=\"{StaticResource ControlBackgroundOver}\"\r\n                                       Opacity=\"0\" />\r\n                                 <Path x:Name=\"arrow\" Data=\"M0,0 L1,0.5 0,1Z\" Fill=\"#404040\" Width=\"5\" Height=\"8\"\r\n                                       Stretch=\"Fill\" />\r\n                              </Grid>\r\n                              <ContentControl x:Name=\"header\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                                    Content=\"{TemplateBinding Content}\" Effect=\"{StaticResource HeaderTextEffect}\"\r\n                                    FontWeight=\"Bold\" Foreground=\"{TemplateBinding Foreground}\" Grid.Row=\"1\"\r\n                                    Margin=\"6,0,0,0\" VerticalAlignment=\"Center\" />\r\n                           </StackPanel>\r\n                        </Grid>\r\n                     </ControlTemplate>\r\n                     <ControlTemplate x:Key=\"ExpanderLeftHeaderTemplate\" TargetType=\"ToggleButton\">\r\n                        <Grid Background=\"Transparent\">\r\n                           <VisualStateManager.VisualStateGroups>\r\n                              <VisualStateGroup x:Name=\"CheckStates\">\r\n                                 <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00\" />\r\n                                 </VisualStateGroup.Transitions>\r\n                                 <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                       <DoubleAnimation Duration=\"0\" To=\"5\"\r\n                                             Storyboard.TargetProperty=\"(FrameworkElement.Width)\"\r\n                                             Storyboard.TargetName=\"arrow\" d:IsOptimized=\"True\" />\r\n                                       <DoubleAnimation Duration=\"0\" To=\"8\"\r\n                                             Storyboard.TargetProperty=\"(FrameworkElement.Height)\"\r\n                                             Storyboard.TargetName=\"arrow\" d:IsOptimized=\"True\" />\r\n                                       <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Data\"\r\n                                             Storyboard.TargetName=\"arrow\">\r\n                                          <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\r\n                                             <DiscreteObjectKeyFrame.Value>\r\n                                                <PathGeometry>M1,0 L1,1 L0,0.5 z</PathGeometry>\r\n                                             </DiscreteObjectKeyFrame.Value>\r\n                                          </DiscreteObjectKeyFrame>\r\n                                          <!--Value=\"M1,0 L1,1 L0,0.5 z\" />-->\r\n                                       </ObjectAnimationUsingKeyFrames>\r\n                                       <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Margin\"\r\n                                             Storyboard.TargetName=\"arrow\">\r\n                                          <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                             <DiscreteObjectKeyFrame.Value>\r\n                                                <Thickness>0,0,2,0</Thickness>\r\n                                             </DiscreteObjectKeyFrame.Value>\r\n                                          </DiscreteObjectKeyFrame>\r\n                                          <!--Value=\"0,0,2,0\" />-->\r\n                                       </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                 </VisualState>\r\n                                 <VisualState x:Name=\"Unchecked\" />\r\n                              </VisualStateGroup>\r\n                              <VisualStateGroup x:Name=\"CommonStates\">\r\n                                 <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\" />\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\" />\r\n                                 </VisualStateGroup.Transitions>\r\n                                 <VisualState x:Name=\"Normal\" />\r\n                                 <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                       <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"MouseOverElement\"\r\n                                             Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                                    </Storyboard>\r\n                                 </VisualState>\r\n                                 <VisualState x:Name=\"Pressed\" />\r\n                              </VisualStateGroup>\r\n                              <VisualStateGroup x:Name=\"FocusStates\">\r\n                                 <VisualState x:Name=\"Focused\" />\r\n                                 <VisualState x:Name=\"Unfocused\" />\r\n                              </VisualStateGroup>\r\n                           </VisualStateManager.VisualStateGroups>\r\n                           <StackPanel Orientation=\"Horizontal\">\r\n                              <Grid Effect=\"{StaticResource ControlShadowEffect}\" Height=\"18\" Width=\"18\">\r\n                                 <Ellipse x:Name=\"circle\" Fill=\"{StaticResource ControlBackgroundNormal}\" />\r\n                                 <Ellipse x:Name=\"MouseOverElement\" Fill=\"{StaticResource ControlBackgroundOver}\"\r\n                                       Opacity=\"0\" />\r\n                                 <Path x:Name=\"arrow\" Data=\"M0,0 L1,0.5 0,1Z\" Fill=\"#404040\" Width=\"5\" Height=\"8\"\r\n                                       Stretch=\"Fill\" />\r\n                              </Grid>\r\n                              <ContentControl x:Name=\"header\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                                    Content=\"{TemplateBinding Content}\" Effect=\"{StaticResource HeaderTextEffect}\"\r\n                                    FontWeight=\"Bold\" Foreground=\"{TemplateBinding Foreground}\" Grid.Row=\"1\"\r\n                                    Margin=\"6,0,0,0\" VerticalAlignment=\"Center\" />\r\n                           </StackPanel>\r\n                        </Grid>\r\n                     </ControlTemplate>\r\n                     <ControlTemplate x:Key=\"ExpanderRightHeaderTemplate\" TargetType=\"ToggleButton\">\r\n                        <Grid Background=\"Transparent\">\r\n                           <VisualStateManager.VisualStateGroups>\r\n                              <VisualStateGroup x:Name=\"CheckStates\">\r\n                                 <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00\" />\r\n                                 </VisualStateGroup.Transitions>\r\n                                 <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                       <DoubleAnimation Duration=\"0\" To=\"5\"\r\n                                             Storyboard.TargetProperty=\"(FrameworkElement.Width)\"\r\n                                             Storyboard.TargetName=\"arrow\" d:IsOptimized=\"True\" />\r\n                                       <DoubleAnimation Duration=\"0\" To=\"8\"\r\n                                             Storyboard.TargetProperty=\"(FrameworkElement.Height)\"\r\n                                             Storyboard.TargetName=\"arrow\" d:IsOptimized=\"True\" />\r\n                                       <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Data\"\r\n                                             Storyboard.TargetName=\"arrow\">\r\n                                          <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\r\n                                             <DiscreteObjectKeyFrame.Value>\r\n                                                <PathGeometry>M1,0 L1,1 L0,0.5 z</PathGeometry>\r\n                                             </DiscreteObjectKeyFrame.Value>\r\n                                          </DiscreteObjectKeyFrame>\r\n                                          <!--Value=\"M1,0 L1,1 L0,0.5 z\" />-->\r\n                                       </ObjectAnimationUsingKeyFrames>\r\n                                       <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Margin\"\r\n                                             Storyboard.TargetName=\"arrow\">\r\n                                          <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                             <DiscreteObjectKeyFrame.Value>\r\n                                                <Thickness>0,0,2,0</Thickness>\r\n                                             </DiscreteObjectKeyFrame.Value>\r\n                                          </DiscreteObjectKeyFrame>\r\n                                          <!--Value=\"0,0,2,0\" />-->\r\n                                       </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                 </VisualState>\r\n                                 <VisualState x:Name=\"Unchecked\" />\r\n                              </VisualStateGroup>\r\n                              <VisualStateGroup x:Name=\"CommonStates\">\r\n                                 <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\" />\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\" />\r\n                                 </VisualStateGroup.Transitions>\r\n                                 <VisualState x:Name=\"Normal\" />\r\n                                 <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                       <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"MouseOverElement\"\r\n                                             Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                                    </Storyboard>\r\n                                 </VisualState>\r\n                                 <VisualState x:Name=\"Pressed\" />\r\n                              </VisualStateGroup>\r\n                              <VisualStateGroup x:Name=\"FocusStates\">\r\n                                 <VisualState x:Name=\"Focused\" />\r\n                                 <VisualState x:Name=\"Unfocused\" />\r\n                              </VisualStateGroup>\r\n                           </VisualStateManager.VisualStateGroups>\r\n                           <StackPanel Orientation=\"Horizontal\">\r\n                              <Grid Effect=\"{StaticResource ControlShadowEffect}\" Height=\"18\" Width=\"18\">\r\n                                 <Ellipse x:Name=\"circle\" Fill=\"{StaticResource ControlBackgroundNormal}\" />\r\n                                 <Ellipse x:Name=\"MouseOverElement\" Fill=\"{StaticResource ControlBackgroundOver}\"\r\n                                       Opacity=\"0\" />\r\n                                 <Path x:Name=\"arrow\" Data=\"M0,0 L1,0.5 0,1Z\" Fill=\"#404040\" Width=\"5\" Height=\"8\"\r\n                                       Stretch=\"Fill\" />\r\n                              </Grid>\r\n                              <ContentControl x:Name=\"header\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                                    Content=\"{TemplateBinding Content}\" Effect=\"{StaticResource HeaderTextEffect}\"\r\n                                    FontWeight=\"Bold\" Foreground=\"{TemplateBinding Foreground}\" Grid.Row=\"1\"\r\n                                    Margin=\"6,0,0,0\" VerticalAlignment=\"Center\" />\r\n                           </StackPanel>\r\n                        </Grid>\r\n                     </ControlTemplate>\r\n                  </Grid.Resources>\r\n                  <VisualStateManager.VisualStateGroups>\r\n                     <VisualStateGroup x:Name=\"CommonStates\">\r\n                        <VisualStateGroup.Transitions>\r\n                           <VisualTransition GeneratedDuration=\"0\" />\r\n                        </VisualStateGroup.Transitions>\r\n                        <VisualState x:Name=\"Normal\" />\r\n                        <VisualState x:Name=\"Disabled\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" To=\"0.55\" Storyboard.TargetProperty=\"(UIElement.Opacity)\"\r\n                                    Storyboard.TargetName=\"Background\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                     </VisualStateGroup>\r\n                     <VisualStateGroup x:Name=\"FocusStates\">\r\n                        <VisualState x:Name=\"Focused\" />\r\n                        <VisualState x:Name=\"Unfocused\" />\r\n                     </VisualStateGroup>\r\n                     <VisualStateGroup x:Name=\"ExpansionStates\">\r\n                        <VisualStateGroup.Transitions>\r\n                           <VisualTransition GeneratedDuration=\"0\" />\r\n                        </VisualStateGroup.Transitions>\r\n                        <VisualState x:Name=\"Collapsed\">\r\n                           <Storyboard>\r\n                              <!--<DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                Storyboard.TargetProperty=\"(ExpandableContentControl.Percentage)\"\r\n                                                Storyboard.TargetName=\"ExpandSite\">\r\n                                            <SplineDoubleKeyFrame KeySpline=\"0.2,0,0,1\" KeyTime=\"00:00:00.3\" Value=\"0\" />\r\n                                        </DoubleAnimationUsingKeyFrames>-->\r\n                              <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00.3\" Duration=\"00:00:00\"\r\n                                    Storyboard.TargetProperty=\"(UIElement.Visibility)\"\r\n                                    Storyboard.TargetName=\"ExpandSite\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"00:00:00\" Value=\"{x:Static Visibility.Collapsed}\" />\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Expanded\">\r\n                           <Storyboard>\r\n                              <!--<DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                Storyboard.TargetProperty=\"(ExpandableContentControl.Percentage)\"\r\n                                                Storyboard.TargetName=\"ExpandSite\">\r\n                                            <SplineDoubleKeyFrame KeySpline=\"0.2,0,0,1\" KeyTime=\"00:00:00.3\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>-->\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                     </VisualStateGroup>\r\n                     <VisualStateGroup x:Name=\"ExpandDirectionStates\">\r\n                        <VisualStateGroup.Transitions>\r\n                           <VisualTransition GeneratedDuration=\"0\" />\r\n                        </VisualStateGroup.Transitions>\r\n                        <VisualState x:Name=\"ExpandDown\">\r\n                           <Storyboard>\r\n                              <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Height\"\r\n                                    Storyboard.TargetName=\"rd1\">\r\n                                 <!--This code-->\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"*\" />\r\n\r\n                                 <!--Is replaced by this one :-->\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                    <DiscreteObjectKeyFrame.Value>\r\n                                       <GridLength>*</GridLength>\r\n                                    </DiscreteObjectKeyFrame.Value>\r\n                                 </DiscreteObjectKeyFrame>\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                              <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Width\"\r\n                                    Storyboard.TargetName=\"cd0\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                    <DiscreteObjectKeyFrame.Value>\r\n                                       <GridLength>*</GridLength>\r\n                                    </DiscreteObjectKeyFrame.Value>\r\n                                 </DiscreteObjectKeyFrame>\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"ExpandUp\">\r\n                           <Storyboard>\r\n                              <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Template\"\r\n                                    Storyboard.TargetName=\"ExpanderButton\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ExpanderUpHeaderTemplate}\" />\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                              <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"(Grid.Row)\"\r\n                                    Storyboard.TargetName=\"ExpanderButton\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                              <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"(Grid.Row)\"\r\n                                    Storyboard.TargetName=\"ExpandSite\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"0\" />\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                              <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Height\"\r\n                                    Storyboard.TargetName=\"rd0\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                    <DiscreteObjectKeyFrame.Value>\r\n                                       <GridLength>*</GridLength>\r\n                                    </DiscreteObjectKeyFrame.Value>\r\n                                 </DiscreteObjectKeyFrame>\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                              <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Width\"\r\n                                    Storyboard.TargetName=\"cd0\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                    <DiscreteObjectKeyFrame.Value>\r\n                                       <GridLength>*</GridLength>\r\n                                    </DiscreteObjectKeyFrame.Value>\r\n                                 </DiscreteObjectKeyFrame>\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                              <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Margin\"\r\n                                    Storyboard.TargetName=\"ExpandSite\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"0,0,0,6\" />\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"ExpandLeft\">\r\n                           <Storyboard>\r\n                              <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Template\"\r\n                                    Storyboard.TargetName=\"ExpanderButton\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ExpanderLeftHeaderTemplate}\" />\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                              <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"(Grid.Column)\"\r\n                                    Storyboard.TargetName=\"ExpanderButton\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                              <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"(Grid.Row)\"\r\n                                    Storyboard.TargetName=\"ExpandSite\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"0\" />\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                              <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Height\"\r\n                                    Storyboard.TargetName=\"rd0\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                    <DiscreteObjectKeyFrame.Value>\r\n                                       <GridLength>*</GridLength>\r\n                                    </DiscreteObjectKeyFrame.Value>\r\n                                 </DiscreteObjectKeyFrame>\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                              <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Width\"\r\n                                    Storyboard.TargetName=\"cd0\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                    <DiscreteObjectKeyFrame.Value>\r\n                                       <GridLength>*</GridLength>\r\n                                    </DiscreteObjectKeyFrame.Value>\r\n                                 </DiscreteObjectKeyFrame>\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                              <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Margin\"\r\n                                    Storyboard.TargetName=\"ExpandSite\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"0,0,6,0\" />\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"ExpandRight\">\r\n                           <Storyboard>\r\n                              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Template\"\r\n                                    Storyboard.TargetName=\"ExpanderButton\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\"\r\n                                       Value=\"{StaticResource ExpanderRightHeaderTemplate}\" />\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                              <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"(Grid.Row)\"\r\n                                    Storyboard.TargetName=\"ExpandSite\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"0\" />\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                              <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"(Grid.Column)\"\r\n                                    Storyboard.TargetName=\"ExpandSite\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                              <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Height\"\r\n                                    Storyboard.TargetName=\"rd0\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                    <DiscreteObjectKeyFrame.Value>\r\n                                       <GridLength>*</GridLength>\r\n                                    </DiscreteObjectKeyFrame.Value>\r\n                                 </DiscreteObjectKeyFrame>\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                              <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Width\"\r\n                                    Storyboard.TargetName=\"cd1\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                    <DiscreteObjectKeyFrame.Value>\r\n                                       <GridLength>*</GridLength>\r\n                                    </DiscreteObjectKeyFrame.Value>\r\n                                 </DiscreteObjectKeyFrame>\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                              <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Margin\"\r\n                                    Storyboard.TargetName=\"ExpandSite\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"6,0,0,0\" />\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                     </VisualStateGroup>\r\n                  </VisualStateManager.VisualStateGroups>\r\n                  <Border x:Name=\"Background\" BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                        BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\"\r\n                        CornerRadius=\"3\">\r\n                     <Grid>\r\n                        <Grid.ColumnDefinitions>\r\n                           <ColumnDefinition x:Name=\"cd0\" Width=\"Auto\" />\r\n                           <ColumnDefinition x:Name=\"cd1\" Width=\"Auto\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                           <RowDefinition x:Name=\"rd0\" Height=\"Auto\" />\r\n                           <RowDefinition x:Name=\"rd1\" Height=\"Auto\" />\r\n                        </Grid.RowDefinitions>\r\n                        <ToggleButton x:Name=\"ExpanderButton\" ContentTemplate=\"{TemplateBinding HeaderTemplate}\"\r\n                              Content=\"{TemplateBinding Header}\" Grid.Column=\"0\"\r\n                              Foreground=\"{TemplateBinding Foreground}\" FontWeight=\"{TemplateBinding FontWeight}\"\r\n                              FontStyle=\"{TemplateBinding FontStyle}\" FontStretch=\"{TemplateBinding FontStretch}\"\r\n                              FontSize=\"{TemplateBinding FontSize}\" FontFamily=\"{TemplateBinding FontFamily}\"\r\n                              HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                              IsChecked=\"{TemplateBinding IsExpanded}\" Margin=\"1\" MinWidth=\"0\" MinHeight=\"0\"\r\n                              Padding=\"{TemplateBinding Padding}\" Grid.Row=\"0\"\r\n                              Template=\"{StaticResource ExpanderDownHeaderTemplate}\"\r\n                              VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\" />\r\n                        <ContentControl x:Name=\"ExpandSite\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                              Content=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\"\r\n                              FontWeight=\"{TemplateBinding FontWeight}\" FontStyle=\"{TemplateBinding FontStyle}\"\r\n                              FontStretch=\"{TemplateBinding FontStretch}\" FontSize=\"{TemplateBinding FontSize}\"\r\n                              FontFamily=\"{TemplateBinding FontFamily}\"\r\n                              HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\"\r\n                              HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                              IsTabStop=\"False\" Margin=\"0,6,0,0\" Grid.Row=\"1\"\r\n                              VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"\r\n                              VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\" />\r\n                     </Grid>\r\n                  </Border>\r\n               </Grid>\r\n            </ControlTemplate>\r\n         </Setter.Value>\r\n      </Setter>\r\n   </Style>\r\n   <!--Percentage=\"0\"\r\n                                        RevealMode=\"{TemplateBinding ExpandDirection}\"-->\r\n   <!-- \r\n\t  ***************************************************************************\r\n\t  Button\r\n\t  ***************************************************************************\r\n\t  -->\r\n\r\n   <Style TargetType=\"Button\" x:Key=\"ButtonStyle\">\r\n      <Setter Property=\"Padding\" Value=\"18,6\" />\r\n       <Setter Property=\"TextBlock.TextWrapping\" Value=\"Wrap\" />\r\n      <Setter Property=\"TextOptions.TextHintingMode\" Value=\"Animated\" />\r\n      <Setter Property=\"Foreground\" Value=\"{StaticResource ControlForeground}\" />\r\n      <Setter Property=\"Template\">\r\n         <Setter.Value>\r\n            <ControlTemplate TargetType=\"Button\">\r\n               <Grid x:Name=\"Root\">\r\n                  <VisualStateManager.VisualStateGroups>\r\n                     <VisualStateGroup x:Name=\"CommonStates\">\r\n                        <VisualStateGroup.Transitions>\r\n                           <VisualTransition GeneratedDuration=\"0:0:0.1\" />\r\n                           <VisualTransition To=\"Pressed\" />\r\n                           <VisualTransition From=\"Pressed\" />\r\n                        </VisualStateGroup.Transitions>\r\n                        <VisualState x:Name=\"Normal\" />\r\n                        <VisualState x:Name=\"MouseOver\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"PressedElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"MouseOverElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Pressed\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"NormalElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0.25\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"PressedElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"MouseOverElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Disabled\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"NormalElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"DisabledElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"HighlightElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0.5\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"ContentHost\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0.75\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                     </VisualStateGroup>\r\n                     <VisualStateGroup x:Name=\"FocusStates\">\r\n                        <VisualState x:Name=\"Focused\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Unfocused\" />\r\n                     </VisualStateGroup>\r\n                  </VisualStateManager.VisualStateGroups>\r\n                  <Border x:Name=\"DisabledElement\" Background=\"{StaticResource DisabledBrush}\" CornerRadius=\"2\"\r\n                        Opacity=\"0\">\r\n                     <Border BorderBrush=\"{StaticResource DisabledBorderBrush}\" BorderThickness=\"0,0,1,1\"\r\n                           CornerRadius=\"2\" />\r\n                  </Border>\r\n                  <Border x:Name=\"NormalElement\" Background=\"{StaticResource ControlBackgroundNormal}\" CornerRadius=\"2\"\r\n                        Effect=\"{StaticResource ControlShadowEffect}\" />\r\n                  <Border x:Name=\"MouseOverElement\" Background=\"{StaticResource ControlBackgroundOver}\" CornerRadius=\"2\"\r\n                        Opacity=\"0\" />\r\n                  <Border x:Name=\"PressedElement\" Background=\"{StaticResource ControlBackgroundPressed}\"\r\n                        CornerRadius=\"2\" Opacity=\"0\" />\r\n                  <Border x:Name=\"HighlightElement\" BorderBrush=\"{StaticResource ControlHighlight}\"\r\n                        BorderThickness=\"1,1,0,0\" CornerRadius=\"2\" />\r\n                  <ContentPresenter x:Name=\"ContentHost\"\r\n                        HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                        Margin=\"{TemplateBinding Padding}\"\r\n                        VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\">\r\n                     <ContentPresenter.Effect>\r\n                        <DropShadowEffect Color=\"{StaticResource ColorForegroundShadowColor}\" Direction=\"-90\"\r\n                              BlurRadius=\"1\" ShadowDepth=\"1\" Opacity=\"0.5\" />\r\n                     </ContentPresenter.Effect>\r\n                  </ContentPresenter>\r\n                  <Rectangle x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Margin=\"1\" Opacity=\"0\" RadiusX=\"1\"\r\n                        RadiusY=\"1\" Stroke=\"{StaticResource FocusVisualBrush}\"\r\n                        StrokeThickness=\"{StaticResource FocusVisualStrokeThickness}\" />\r\n               </Grid>\r\n            </ControlTemplate>\r\n         </Setter.Value>\r\n      </Setter>\r\n   </Style>\r\n\r\n     <Style TargetType=\"Button\" BasedOn=\"{StaticResource ButtonStyle}\"/>\r\n   <!-- \r\n\t***************************************************************************\r\n\tGreenButton\r\n\t***************************************************************************\r\n\t-->\r\n\r\n   <Style x:Key=\"GreenButton\" TargetType=\"Button\">\r\n      <Setter Property=\"Padding\" Value=\"18,6\" />\r\n      <Setter Property=\"Foreground\" Value=\"{StaticResource ControlForegroundGreen}\" />\r\n      <Setter Property=\"Template\">\r\n         <Setter.Value>\r\n            <ControlTemplate TargetType=\"Button\">\r\n               <Grid x:Name=\"Root\">\r\n                  <VisualStateManager.VisualStateGroups>\r\n                     <VisualStateGroup x:Name=\"CommonStates\">\r\n                        <VisualStateGroup.Transitions>\r\n                           <VisualTransition GeneratedDuration=\"0:0:0.1\" />\r\n                           <VisualTransition To=\"Pressed\" />\r\n                           <VisualTransition From=\"Pressed\" />\r\n                        </VisualStateGroup.Transitions>\r\n                        <VisualState x:Name=\"Normal\" />\r\n                        <VisualState x:Name=\"MouseOver\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"PressedElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"MouseOverElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Pressed\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"NormalElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0.25\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"PressedElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"MouseOverElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"HighlightElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0.5\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Disabled\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"NormalElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"DisabledElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"HighlightElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0.5\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"ContentHost\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0.65\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                     </VisualStateGroup>\r\n                     <VisualStateGroup x:Name=\"FocusStates\">\r\n                        <VisualState x:Name=\"Focused\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Unfocused\" />\r\n                     </VisualStateGroup>\r\n                  </VisualStateManager.VisualStateGroups>\r\n                  <Border x:Name=\"DisabledElement\" Background=\"{StaticResource DisabledBrush}\" CornerRadius=\"2\"\r\n                        Opacity=\"0\">\r\n                     <Border BorderBrush=\"{StaticResource DisabledBorderBrush}\" BorderThickness=\"0,0,1,1\"\r\n                           CornerRadius=\"2\" />\r\n                  </Border>\r\n                  <Border x:Name=\"NormalElement\" Background=\"{StaticResource ControlBackgroundNormalGreen}\"\r\n                        CornerRadius=\"2\" Effect=\"{StaticResource ControlShadowEffect}\" />\r\n                  <Border x:Name=\"MouseOverElement\" Background=\"{StaticResource ControlBackgroundOverGreen}\"\r\n                        CornerRadius=\"2\" Opacity=\"0\" />\r\n                  <Border x:Name=\"PressedElement\" Background=\"{StaticResource ControlBackgroundPressedGreen}\"\r\n                        CornerRadius=\"2\" Opacity=\"0\" />\r\n                  <Border x:Name=\"HighlightElement\" BorderBrush=\"{StaticResource HighlightBrushGreen}\"\r\n                        BorderThickness=\"0.5,1,0,0\" CornerRadius=\"2\" />\r\n                  <ContentPresenter x:Name=\"ContentHost\"\r\n                        HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                        Margin=\"{TemplateBinding Padding}\"\r\n                        VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\">\r\n                     <ContentPresenter.Effect>\r\n                        <DropShadowEffect Color=\"{StaticResource ColorForegroundShadowColorGreen}\" Direction=\"90\"\r\n                              BlurRadius=\"1\" ShadowDepth=\"1\" Opacity=\"0.5\" />\r\n                     </ContentPresenter.Effect>\r\n                  </ContentPresenter>\r\n                  <Rectangle x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Margin=\"1\" Opacity=\"0\" RadiusX=\"1\"\r\n                        RadiusY=\"1\" Stroke=\"{StaticResource FocusVisualBrush}\"\r\n                        StrokeThickness=\"{StaticResource FocusVisualStrokeThickness}\" />\r\n               </Grid>\r\n            </ControlTemplate>\r\n         </Setter.Value>\r\n      </Setter>\r\n   </Style>\r\n\r\n   <!-- \r\n\t***************************************************************************\r\n\tOrangeButton\r\n\t***************************************************************************\r\n\t-->\r\n\r\n   <Style x:Key=\"OrangeButton\" TargetType=\"Button\">\r\n      <Setter Property=\"Padding\" Value=\"18,6\" />\r\n      <Setter Property=\"TextOptions.TextHintingMode\" Value=\"Fixed\" />\r\n      <Setter Property=\"Foreground\" Value=\"{StaticResource ControlForegroundOrange}\" />\r\n      <Setter Property=\"Template\">\r\n         <Setter.Value>\r\n            <ControlTemplate TargetType=\"Button\">\r\n               <Grid x:Name=\"Root\">\r\n                  <VisualStateManager.VisualStateGroups>\r\n                     <VisualStateGroup x:Name=\"CommonStates\">\r\n                        <VisualStateGroup.Transitions>\r\n                           <VisualTransition GeneratedDuration=\"0:0:0.1\" />\r\n                           <VisualTransition To=\"Pressed\" />\r\n                           <VisualTransition From=\"Pressed\" />\r\n                        </VisualStateGroup.Transitions>\r\n                        <VisualState x:Name=\"Normal\" />\r\n                        <VisualState x:Name=\"MouseOver\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"PressedElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"MouseOverElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Pressed\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"NormalElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0.25\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"PressedElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"MouseOverElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"HighlightElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0.5\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Disabled\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"NormalElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"DisabledElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"HighlightElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0.5\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"ContentHost\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0.65\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                     </VisualStateGroup>\r\n                     <VisualStateGroup x:Name=\"FocusStates\">\r\n                        <VisualState x:Name=\"Focused\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Unfocused\" />\r\n                     </VisualStateGroup>\r\n                  </VisualStateManager.VisualStateGroups>\r\n                  <Border x:Name=\"DisabledElement\" Background=\"{StaticResource DisabledBrush}\" CornerRadius=\"2\"\r\n                        Opacity=\"0\">\r\n                     <Border BorderBrush=\"{StaticResource DisabledBorderBrush}\" BorderThickness=\"0,0,1,1\"\r\n                           CornerRadius=\"2\" />\r\n                  </Border>\r\n                  <Border x:Name=\"NormalElement\" Background=\"{StaticResource ControlBackgroundNormalOrange}\"\r\n                        CornerRadius=\"2\" Effect=\"{StaticResource ControlShadowEffect}\" />\r\n                  <Border x:Name=\"MouseOverElement\" Background=\"{StaticResource ControlBackgroundOverOrange}\"\r\n                        CornerRadius=\"2\" Opacity=\"0\" />\r\n                  <Border x:Name=\"PressedElement\" Background=\"{StaticResource ControlBackgroundPressedOrange}\"\r\n                        CornerRadius=\"2\" Opacity=\"0\" />\r\n                  <Border x:Name=\"HighlightElement\" BorderBrush=\"{StaticResource HighlightBrushOrange}\"\r\n                        BorderThickness=\"0.5,1,0,0\" CornerRadius=\"2\" />\r\n                  <ContentPresenter x:Name=\"ContentHost\"\r\n                        HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                        Margin=\"{TemplateBinding Padding}\"\r\n                        VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\">\r\n                     <ContentPresenter.Effect>\r\n                        <DropShadowEffect Color=\"{StaticResource ColorForegroundShadowColorOrange}\" Direction=\"90\"\r\n                              BlurRadius=\"1\" ShadowDepth=\"1\" Opacity=\"0.5\" />\r\n                     </ContentPresenter.Effect>\r\n                  </ContentPresenter>\r\n                  <Rectangle x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Margin=\"1\" Opacity=\"0\" RadiusX=\"1\"\r\n                        RadiusY=\"1\" Stroke=\"{StaticResource FocusVisualBrush}\"\r\n                        StrokeThickness=\"{StaticResource FocusVisualStrokeThickness}\" />\r\n               </Grid>\r\n            </ControlTemplate>\r\n         </Setter.Value>\r\n      </Setter>\r\n   </Style>\r\n\r\n   <!-- \r\n\t***************************************************************************\r\n\tBlueButton\r\n\t***************************************************************************\r\n\t-->\r\n\r\n   <Style x:Key=\"BlueButton\" TargetType=\"Button\">\r\n      <Setter Property=\"Padding\" Value=\"18,6\" />\r\n      <Setter Property=\"TextOptions.TextHintingMode\" Value=\"Fixed\" />\r\n      <Setter Property=\"Foreground\" Value=\"{StaticResource ControlForegroundBlue}\" />\r\n      <Setter Property=\"Template\">\r\n         <Setter.Value>\r\n            <ControlTemplate TargetType=\"Button\">\r\n               <Grid x:Name=\"Root\">\r\n                  <VisualStateManager.VisualStateGroups>\r\n                     <VisualStateGroup x:Name=\"CommonStates\">\r\n                        <VisualStateGroup.Transitions>\r\n                           <VisualTransition GeneratedDuration=\"0:0:0.1\" />\r\n                           <VisualTransition To=\"Pressed\" />\r\n                           <VisualTransition From=\"Pressed\" />\r\n                        </VisualStateGroup.Transitions>\r\n                        <VisualState x:Name=\"Normal\" />\r\n                        <VisualState x:Name=\"MouseOver\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"PressedElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"MouseOverElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Pressed\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"NormalElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0.25\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"PressedElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"MouseOverElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"HighlightElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0.5\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Disabled\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"NormalElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"DisabledElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"HighlightElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0.5\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"ContentHost\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0.65\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                     </VisualStateGroup>\r\n                     <VisualStateGroup x:Name=\"FocusStates\">\r\n                        <VisualState x:Name=\"Focused\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Unfocused\" />\r\n                     </VisualStateGroup>\r\n                  </VisualStateManager.VisualStateGroups>\r\n                  <Border x:Name=\"DisabledElement\" Background=\"{StaticResource DisabledBrush}\" CornerRadius=\"2\"\r\n                        Opacity=\"0\">\r\n                     <Border BorderBrush=\"{StaticResource DisabledBorderBrush}\" BorderThickness=\"0,0,1,1\"\r\n                           CornerRadius=\"2\" />\r\n                  </Border>\r\n                  <Border x:Name=\"NormalElement\" Background=\"{StaticResource ControlBackgroundNormalBlue}\"\r\n                        CornerRadius=\"2\" Effect=\"{StaticResource ControlShadowEffect}\" />\r\n                  <Border x:Name=\"MouseOverElement\" Background=\"{StaticResource ControlBackgroundOverBlue}\"\r\n                        CornerRadius=\"2\" Opacity=\"0\" />\r\n                  <Border x:Name=\"PressedElement\" Background=\"{StaticResource ControlBackgroundPressedBlue}\"\r\n                        CornerRadius=\"2\" Opacity=\"0\" />\r\n                  <Border x:Name=\"HighlightElement\" BorderBrush=\"{StaticResource HighlightBrushBlue}\"\r\n                        BorderThickness=\"0.5,1,0,0\" CornerRadius=\"2\" />\r\n                  <ContentPresenter x:Name=\"ContentHost\"\r\n                        HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                        Margin=\"{TemplateBinding Padding}\"\r\n                        VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\">\r\n                     <ContentPresenter.Effect>\r\n                        <DropShadowEffect Color=\"{StaticResource ColorForegroundShadowColorBlue}\" Direction=\"90\"\r\n                              BlurRadius=\"1\" ShadowDepth=\"1\" Opacity=\"0.5\" />\r\n                     </ContentPresenter.Effect>\r\n                  </ContentPresenter>\r\n                  <Rectangle x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Margin=\"1\" Opacity=\"0\" RadiusX=\"1\"\r\n                        RadiusY=\"1\" Stroke=\"{StaticResource FocusVisualBrush}\"\r\n                        StrokeThickness=\"{StaticResource FocusVisualStrokeThickness}\" />\r\n               </Grid>\r\n            </ControlTemplate>\r\n         </Setter.Value>\r\n      </Setter>\r\n   </Style>\r\n\r\n   <!-- \r\n\t***************************************************************************\r\n\tRepeatButton\r\n\t***************************************************************************\r\n\t-->\r\n\r\n   <Style TargetType=\"RepeatButton\">\r\n      <Setter Property=\"Padding\" Value=\"18,6\" />\r\n      <Setter Property=\"TextOptions.TextHintingMode\" Value=\"Animated\" />\r\n      <Setter Property=\"Foreground\" Value=\"{StaticResource ControlForeground}\" />\r\n      <Setter Property=\"Template\">\r\n         <Setter.Value>\r\n            <ControlTemplate TargetType=\"RepeatButton\">\r\n               <Grid x:Name=\"Root\">\r\n                  <VisualStateManager.VisualStateGroups>\r\n                     <VisualStateGroup x:Name=\"CommonStates\">\r\n                        <VisualStateGroup.Transitions>\r\n                           <VisualTransition GeneratedDuration=\"0:0:0.1\" />\r\n                           <VisualTransition To=\"Pressed\" />\r\n                           <VisualTransition From=\"Pressed\" />\r\n                        </VisualStateGroup.Transitions>\r\n                        <VisualState x:Name=\"Normal\" />\r\n                        <VisualState x:Name=\"MouseOver\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"PressedElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"MouseOverElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Pressed\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"NormalElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0.25\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"PressedElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"MouseOverElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Disabled\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"NormalElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"DisabledElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"HighlightElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0.5\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"ContentHost\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0.75\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                     </VisualStateGroup>\r\n                     <VisualStateGroup x:Name=\"FocusStates\">\r\n                        <VisualState x:Name=\"Focused\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Unfocused\" />\r\n                     </VisualStateGroup>\r\n                  </VisualStateManager.VisualStateGroups>\r\n                  <Border x:Name=\"DisabledElement\" Background=\"{StaticResource DisabledBrush}\" CornerRadius=\"2\"\r\n                        Opacity=\"0\">\r\n                     <Border BorderBrush=\"{StaticResource DisabledBorderBrush}\" BorderThickness=\"0,0,1,1\"\r\n                           CornerRadius=\"2\" />\r\n                  </Border>\r\n                  <Border x:Name=\"NormalElement\" Background=\"{StaticResource ControlBackgroundNormal}\" CornerRadius=\"2\"\r\n                        Effect=\"{StaticResource ControlShadowEffect}\" />\r\n                  <Border x:Name=\"MouseOverElement\" Background=\"{StaticResource ControlBackgroundOver}\" CornerRadius=\"2\"\r\n                        Opacity=\"0\" />\r\n                  <Border x:Name=\"PressedElement\" Background=\"{StaticResource ControlBackgroundPressed}\"\r\n                        CornerRadius=\"2\" Opacity=\"0\" />\r\n                  <Border x:Name=\"HighlightElement\" BorderBrush=\"{StaticResource ControlHighlight}\"\r\n                        BorderThickness=\"1,1,0,0\" CornerRadius=\"2\" />\r\n                  <ContentPresenter x:Name=\"ContentHost\"\r\n                        HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                        Margin=\"{TemplateBinding Padding}\"\r\n                        VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\">\r\n                     <ContentPresenter.Effect>\r\n                        <DropShadowEffect Color=\"{StaticResource ColorForegroundShadowColor}\" Direction=\"-90\"\r\n                              BlurRadius=\"1\" ShadowDepth=\"1\" Opacity=\"0.5\" />\r\n                     </ContentPresenter.Effect>\r\n                  </ContentPresenter>\r\n                  <Rectangle x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Margin=\"1\" Opacity=\"0\" RadiusX=\"1\"\r\n                        RadiusY=\"1\" Stroke=\"{StaticResource FocusVisualBrush}\"\r\n                        StrokeThickness=\"{StaticResource FocusVisualStrokeThickness}\" />\r\n               </Grid>\r\n            </ControlTemplate>\r\n         </Setter.Value>\r\n      </Setter>\r\n   </Style>\r\n\r\n   <!-- \r\n    ***************************************************************************\r\n    ToggleButton\r\n    ***************************************************************************\r\n    -->\r\n\r\n   <Style TargetType=\"ToggleButton\">\r\n      <Setter Property=\"Padding\" Value=\"18,6\" />\r\n      <Setter Property=\"TextOptions.TextHintingMode\" Value=\"Animated\" />\r\n      <Setter Property=\"Foreground\" Value=\"{StaticResource ControlForeground}\" />\r\n      <Setter Property=\"Template\">\r\n         <Setter.Value>\r\n            <ControlTemplate TargetType=\"ToggleButton\">\r\n               <Grid x:Name=\"Root\">\r\n                  <VisualStateManager.VisualStateGroups>\r\n                     <VisualStateGroup x:Name=\"CommonStates\">\r\n                        <VisualStateGroup.Transitions>\r\n                           <VisualTransition GeneratedDuration=\"0:0:0.1\" />\r\n                           <VisualTransition To=\"Pressed\" />\r\n                           <VisualTransition From=\"Pressed\" />\r\n                        </VisualStateGroup.Transitions>\r\n                        <VisualState x:Name=\"Normal\" />\r\n                        <VisualState x:Name=\"MouseOver\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"MouseOverElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Disabled\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"NormalElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"DisabledElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"HighlightElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0.5\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"ContentHost\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0.75\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                     </VisualStateGroup>\r\n                     <VisualStateGroup x:Name=\"CheckStates\">\r\n                        <VisualState x:Name=\"Checked\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"(UIElement.Opacity)\"\r\n                                    Storyboard.TargetName=\"NormalElement\" />\r\n                              <DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"(UIElement.Opacity)\"\r\n                                    Storyboard.TargetName=\"HighlightElement\" />\r\n                              <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\"\r\n                                    Storyboard.TargetName=\"CheckedElement\" />\r\n                              <!--      <ObjectAnimationUsingKeyFrames\r\n                                                Storyboard.TargetProperty=\"(UIElement.Visibility)\"\r\n                                                Storyboard.TargetName=\"MouseOverElement\">\r\n                      <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Collapsed}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>-->\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Unchecked\" />\r\n                        <VisualState x:Name=\"Indeterminate\" />\r\n                     </VisualStateGroup>\r\n                     <VisualStateGroup x:Name=\"FocusStates\">\r\n                        <VisualState x:Name=\"Focused\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Unfocused\" />\r\n                     </VisualStateGroup>\r\n                  </VisualStateManager.VisualStateGroups>\r\n                  <Border x:Name=\"DisabledElement\" Background=\"{StaticResource DisabledBrush}\" CornerRadius=\"2\"\r\n                        Opacity=\"0\">\r\n                     <Border BorderBrush=\"{StaticResource DisabledBorderBrush}\" BorderThickness=\"0,0,1,1\"\r\n                           CornerRadius=\"2\" />\r\n                  </Border>\r\n                  <Border x:Name=\"NormalElement\" Background=\"{StaticResource ControlBackgroundNormal}\" CornerRadius=\"2\"\r\n                        Effect=\"{StaticResource ControlShadowEffect}\" />\r\n                  <Border x:Name=\"CheckedElement\" CornerRadius=\"2.5\" BorderBrush=\"#D0494a4d\" BorderThickness=\"1\"\r\n                        Margin=\"0,-1,0,-1\" Opacity=\"0\">\r\n                     <Border.Background>\r\n                        <LinearGradientBrush StartPoint=\"0,0\" EndPoint=\"0,1\">\r\n                           <GradientStop Offset=\"0.1\" Color=\"#FFE6E6E6\" />\r\n                           <GradientStop Offset=\"0.9\" Color=\"#FFC9C9C9\" />\r\n                        </LinearGradientBrush>\r\n                     </Border.Background>\r\n                     <Border BorderBrush=\"#70303030\" BorderThickness=\"1,1,0,0\" CornerRadius=\"2\">\r\n                        <Border BorderBrush=\"#30303030\" BorderThickness=\"1\" CornerRadius=\"1.5\">\r\n                           <Border BorderBrush=\"#10303030\" BorderThickness=\"1,1,0,0\" CornerRadius=\"1\" />\r\n                        </Border>\r\n                     </Border>\r\n                  </Border>\r\n                  <Border x:Name=\"MouseOverElement\" Background=\"{StaticResource ControlBackgroundOver}\" CornerRadius=\"2\"\r\n                        Opacity=\"0\" />\r\n                  <Border x:Name=\"HighlightElement\" BorderBrush=\"{StaticResource ControlHighlight}\"\r\n                        BorderThickness=\"1,1,0,0\" CornerRadius=\"2\" />\r\n                  <ContentPresenter x:Name=\"ContentHost\"\r\n                        HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                        Margin=\"{TemplateBinding Padding}\"\r\n                        VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\">\r\n                     <ContentPresenter.Effect>\r\n                        <DropShadowEffect Color=\"{StaticResource ColorForegroundShadowColor}\" Direction=\"-90\"\r\n                              BlurRadius=\"1\" ShadowDepth=\"1\" Opacity=\"0.5\" />\r\n                     </ContentPresenter.Effect>\r\n                  </ContentPresenter>\r\n                  <Rectangle x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Margin=\"1\" Opacity=\"0\" RadiusX=\"1\"\r\n                        RadiusY=\"1\" Stroke=\"{StaticResource FocusVisualBrush}\"\r\n                        StrokeThickness=\"{StaticResource FocusVisualStrokeThickness}\" />\r\n               </Grid>\r\n            </ControlTemplate>\r\n         </Setter.Value>\r\n      </Setter>\r\n   </Style>\r\n\r\n   <!-- \r\n    ***************************************************************************\r\n    ToolTip\r\n    ***************************************************************************\r\n    -->\r\n\r\n   <!-- TODO -->\r\n   <Style TargetType=\"ToolTip\">\r\n      <Setter Property=\"Background\" Value=\"{StaticResource ControlBackgroundNormalGreen}\" />\r\n      <Setter Property=\"FontFamily\" Value=\"{StaticResource ContentFontFamily}\" />\r\n      <Setter Property=\"FontSize\" Value=\"{StaticResource NormalFontSize}\" />\r\n      <Setter Property=\"Foreground\" Value=\"{StaticResource InputSelectionForegroundBrush}\" />\r\n      <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n      <Setter Property=\"Padding\" Value=\"6\" />\r\n      <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n      <Setter Property=\"Effect\">\r\n         <Setter.Value>\r\n            <DropShadowEffect BlurRadius=\"2\" Direction=\"293\" Opacity=\"0.24\" ShadowDepth=\"1\" />\r\n         </Setter.Value>\r\n      </Setter>\r\n      <Setter Property=\"Template\">\r\n         <Setter.Value>\r\n            <ControlTemplate TargetType=\"ToolTip\">\r\n               <Grid x:Name=\"LayoutRoot\">\r\n                  <Border x:Name=\"Background\" Background=\"{TemplateBinding Background}\" CornerRadius=\"3\">\r\n                     <Border.Effect>\r\n                        <DropShadowEffect BlurRadius=\"3\" Direction=\"0\" Opacity=\"0.1\" ShadowDepth=\"0\" />\r\n                     </Border.Effect>\r\n                  </Border>\r\n                  <Border x:Name=\"TopBorder\" BorderBrush=\"{StaticResource HighlightBrushGreen}\"\r\n                        BorderThickness=\"0,1,0,0\" CornerRadius=\"3\" />\r\n                  <Border x:Name=\"LeftBorder\" BorderThickness=\"1,0,0,0\" CornerRadius=\"3\">\r\n                     <Border.BorderBrush>\r\n                        <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                           <GradientStop Color=\"#FFBAD700\" Offset=\"0\" />\r\n                           <GradientStop Color=\"#FF94AD00\" Offset=\"1\" />\r\n                        </LinearGradientBrush>\r\n                     </Border.BorderBrush>\r\n                  </Border>\r\n                  <Border x:Name=\"Gradient\" Background=\"{StaticResource OverlayBrush}\" CornerRadius=\"2\" Margin=\"1,1,0,0\" />\r\n                  <ContentPresenter x:Name=\"contentPresenter\" Content=\"{TemplateBinding Content}\"\r\n                        ContentTemplate=\"{TemplateBinding ContentTemplate}\" Effect=\"{StaticResource TextEffect}\"\r\n                        HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                        Margin=\"{TemplateBinding Padding}\"\r\n                        VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" />\r\n               </Grid>\r\n            </ControlTemplate>\r\n         </Setter.Value>\r\n      </Setter>\r\n   </Style>\r\n\r\n   <!-- Validation ToolTip Template. -->\r\n   <ControlTemplate x:Key=\"ValidationToolTipTemplate\">\r\n      <Grid x:Name=\"Root\" Margin=\"5,0\" Opacity=\"0\" RenderTransformOrigin=\"0,0\">\r\n         <Grid.RenderTransform>\r\n            <TranslateTransform x:Name=\"xform\" X=\"-25\" />\r\n         </Grid.RenderTransform>\r\n         <VisualStateManager.VisualStateGroups>\r\n            <VisualStateGroup x:Name=\"OpenStates\">\r\n               <VisualStateGroup.Transitions>\r\n                  <VisualTransition GeneratedDuration=\"0\" />\r\n                  <VisualTransition GeneratedDuration=\"0:0:0.2\" To=\"Open\">\r\n                     <Storyboard>\r\n                        <DoubleAnimation Duration=\"0:0:0.2\" To=\"0\" Storyboard.TargetProperty=\"X\"\r\n                              Storyboard.TargetName=\"xform\">\r\n                           <DoubleAnimation.EasingFunction>\r\n                              <BackEase Amplitude=\".3\" EasingMode=\"EaseOut\" />\r\n                           </DoubleAnimation.EasingFunction>\r\n                        </DoubleAnimation>\r\n                        <DoubleAnimation Duration=\"0:0:0.2\" To=\"1\" Storyboard.TargetProperty=\"Opacity\"\r\n                              Storyboard.TargetName=\"Root\" />\r\n                     </Storyboard>\r\n                  </VisualTransition>\r\n               </VisualStateGroup.Transitions>\r\n               <VisualState x:Name=\"Closed\">\r\n                  <Storyboard>\r\n                     <DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"Opacity\"\r\n                           Storyboard.TargetName=\"Root\" />\r\n                  </Storyboard>\r\n               </VisualState>\r\n               <VisualState x:Name=\"Open\">\r\n                  <Storyboard>\r\n                     <DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"X\" Storyboard.TargetName=\"xform\" />\r\n                     <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\"\r\n                           Storyboard.TargetName=\"Root\" />\r\n                  </Storyboard>\r\n               </VisualState>\r\n            </VisualStateGroup>\r\n         </VisualStateManager.VisualStateGroups>\r\n         <Border Background=\"#052A2E31\" CornerRadius=\"5\" Margin=\"4,4,-4,-4\" />\r\n         <Border Background=\"#152A2E31\" CornerRadius=\"4\" Margin=\"3,3,-3,-3\" />\r\n         <Border Background=\"#252A2E31\" CornerRadius=\"3\" Margin=\"2,2,-2,-2\" />\r\n         <Border Background=\"#352A2E31\" CornerRadius=\"2\" Margin=\"1,1,-1,-1\" />\r\n         <Border Background=\"#FFDC000C\" CornerRadius=\"2\" />\r\n         <Border CornerRadius=\"2\">\r\n            <TextBlock Foreground=\"White\" MaxWidth=\"250\" Margin=\"8,4,8,4\" TextWrapping=\"Wrap\"\r\n                  Text=\"{Binding (Validation.Errors)[0].ErrorContent}\" UseLayoutRounding=\"false\" />\r\n         </Border>\r\n      </Grid>\r\n   </ControlTemplate>\r\n\r\n   <!-- \r\n\t***************************************************************************\r\n\tTextBox\r\n\t***************************************************************************\r\n\t-->\r\n\r\n   <Style TargetType=\"TextBox\">\r\n      <Setter Property=\"Background\" Value=\"{StaticResource InputBackgroundBrush}\" />\r\n      <Setter Property=\"BorderBrush\" Value=\"{StaticResource ControlBorderBrush}\" />\r\n      <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n      <Setter Property=\"Foreground\" Value=\"{StaticResource InputForegroundBrush}\" />\r\n      <Setter Property=\"Padding\" Value=\"5,4,5,4\" />\r\n      <Setter Property=\"SelectionBrush\" Value=\"{StaticResource InputSelectionBrush}\" />\r\n      <!--<Setter Property=\"SelectionForeground\" Value=\"{StaticResource InputSelectionForegroundBrush}\" />-->\r\n      <Setter Property=\"Template\">\r\n         <Setter.Value>\r\n            <ControlTemplate TargetType=\"TextBox\">\r\n\r\n               <Grid x:Name=\"RootElement\">\r\n                  <VisualStateManager.VisualStateGroups>\r\n                     <VisualStateGroup x:Name=\"CommonStates\">\r\n                        <VisualState x:Name=\"Normal\" />\r\n                        <VisualState x:Name=\"MouseOver\" />\r\n                        <VisualState x:Name=\"Disabled\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" To=\"0.55\" Storyboard.TargetProperty=\"Opacity\"\r\n                                    Storyboard.TargetName=\"DisabledVisualElement\" />\r\n                              <DoubleAnimation Duration=\"0\" To=\"0.5\" Storyboard.TargetProperty=\"(UIElement.Opacity)\"\r\n                                    Storyboard.TargetName=\"PART_ContentHost\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"ReadOnly\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" To=\"0.55\" Storyboard.TargetProperty=\"Opacity\"\r\n                                    Storyboard.TargetName=\"ReadOnlyVisualElement\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                     </VisualStateGroup>\r\n                     <VisualStateGroup x:Name=\"FocusStates\">\r\n                        <VisualState x:Name=\"Focused\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Unfocused\" />\r\n                     </VisualStateGroup>\r\n                     <VisualStateGroup x:Name=\"ValidationStates\">\r\n                        <VisualState x:Name=\"Valid\" />\r\n                        <VisualState x:Name=\"InvalidUnfocused\">\r\n                           <Storyboard>\r\n                              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\"\r\n                                    Storyboard.TargetName=\"ValidationErrorElement\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"InvalidFocused\">\r\n                           <Storyboard>\r\n                              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\"\r\n                                    Storyboard.TargetName=\"ValidationErrorElement\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"IsOpen\"\r\n                                    Storyboard.TargetName=\"validationTooltip\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                    <DiscreteObjectKeyFrame.Value>\r\n                                       <System:Boolean>True</System:Boolean>\r\n                                    </DiscreteObjectKeyFrame.Value>\r\n                                 </DiscreteObjectKeyFrame>\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                     </VisualStateGroup>\r\n                  </VisualStateManager.VisualStateGroups>\r\n                  <Border x:Name=\"Border\" Background=\"{TemplateBinding Background}\"\r\n                        BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                        CornerRadius=\"2.5\" Opacity=\"1\">\r\n                     <Grid>\r\n                        <Border x:Name=\"ReadOnlyVisualElement\" Background=\"{StaticResource ReadOnlyBrush}\"\r\n                              CornerRadius=\"2\" Opacity=\"0\" />\r\n                        <ScrollViewer x:Name=\"PART_ContentHost\" Foreground=\"{TemplateBinding Foreground}\"\r\n                              BorderThickness=\"0\" IsTabStop=\"False\" Margin=\"1\" Padding=\"{TemplateBinding Padding}\" />\r\n                     </Grid>\r\n                  </Border>\r\n                  <Border x:Name=\"OuterHighlight\" BorderBrush=\"{StaticResource ControlOuterHighlightBrush}\"\r\n                        BorderThickness=\"0,0,1,1\" CornerRadius=\"3\" Margin=\"0,0,-1,-1\" />\r\n                  <Border x:Name=\"InnerShadowDark\" BorderBrush=\"{StaticResource InnerShadowDarkBrush}\"\r\n                        BorderThickness=\"1,1,0,0\" CornerRadius=\"2\" Margin=\"1\" />\r\n                  <Border x:Name=\"InnerShadowLight\" BorderBrush=\"{StaticResource InnerShadowLightBrush}\"\r\n                        BorderThickness=\"1,1,0,0\" CornerRadius=\"1\" Margin=\"2\" />\r\n                  <Border x:Name=\"DisabledVisualElement\" Background=\"{StaticResource DisabledBrush}\"\r\n                        IsHitTestVisible=\"False\" Margin=\"1\" Opacity=\"0\" CornerRadius=\"2\" />\r\n                  <Rectangle x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Margin=\"2\" Opacity=\"0\" RadiusX=\"1\"\r\n                        RadiusY=\"1\" Stroke=\"{StaticResource FocusVisualBrush}\"\r\n                        StrokeThickness=\"{StaticResource FocusVisualStrokeThickness}\" />\r\n                  <Border x:Name=\"ValidationErrorElement\" BorderBrush=\"{StaticResource ErrorBrush}\" BorderThickness=\"1\"\r\n                        CornerRadius=\"3\" Visibility=\"Collapsed\">\r\n                     <ToolTipService.ToolTip>\r\n                        <ToolTip x:Name=\"validationTooltip\"\r\n                              DataContext=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Right\"\r\n                              PlacementTarget=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\"\r\n                              Template=\"{StaticResource ValidationToolTipTemplate}\">\r\n                           <ToolTip.Triggers>\r\n                              <!--<EventTrigger RoutedEvent=\"Canvas.Loaded\">\r\n                                 <BeginStoryboard>\r\n                                    <Storyboard>\r\n                                       <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"IsHitTestVisible\"\r\n                                             Storyboard.TargetName=\"validationTooltip\">\r\n                                          <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"True\" />\r\n                                       </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                 </BeginStoryboard>\r\n                              </EventTrigger>-->\r\n                           </ToolTip.Triggers>\r\n                        </ToolTip>\r\n                     </ToolTipService.ToolTip>\r\n                     <Grid Background=\"Transparent\" HorizontalAlignment=\"Right\" Height=\"12\" Margin=\"1,-4,-4,0\"\r\n                           VerticalAlignment=\"Top\" Width=\"12\">\r\n                        <Path Data=\"M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z\" Fill=\"{StaticResource ErrorBrush}\"\r\n                              Margin=\"1,3,0,0\" />\r\n                     </Grid>\r\n                  </Border>\r\n               </Grid>\r\n            </ControlTemplate>\r\n         </Setter.Value>\r\n      </Setter>\r\n   </Style>\r\n\r\n   <!-- \r\n\t***************************************************************************\r\n\tPasswordBox\r\n\t***************************************************************************\r\n\t-->\r\n\r\n   <Style TargetType=\"PasswordBox\">\r\n      <Setter Property=\"Background\" Value=\"{StaticResource InputBackgroundBrush}\" />\r\n      <Setter Property=\"BorderBrush\" Value=\"{StaticResource ControlBorderBrush}\" />\r\n      <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n      <Setter Property=\"Foreground\" Value=\"{StaticResource InputForegroundBrush}\" />\r\n      <Setter Property=\"Padding\" Value=\"5,4,5,4\" />\r\n      <Setter Property=\"SelectionBrush\" Value=\"{StaticResource InputSelectionBrush}\" />\r\n      <!--<Setter Property=\"SelectionBackground\" Value=\"{StaticResource InputSelectionBrush}\" />-->\r\n      <!--<Setter Property=\"SelectionForeground\" Value=\"{StaticResource InputSelectionForegroundBrush}\" />-->\r\n      <Setter Property=\"Template\">\r\n         <Setter.Value>\r\n            <ControlTemplate TargetType=\"PasswordBox\">\r\n               <Grid x:Name=\"RootElement\">\r\n                  <VisualStateManager.VisualStateGroups>\r\n                     <VisualStateGroup x:Name=\"CommonStates\">\r\n                        <VisualState x:Name=\"Normal\" />\r\n                        <VisualState x:Name=\"MouseOver\" />\r\n                        <VisualState x:Name=\"Disabled\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" To=\"0.55\" Storyboard.TargetProperty=\"Opacity\"\r\n                                    Storyboard.TargetName=\"DisabledVisualElement\" />\r\n                              <DoubleAnimation Duration=\"0\" To=\"0.5\" Storyboard.TargetProperty=\"(UIElement.Opacity)\"\r\n                                    Storyboard.TargetName=\"PART_ContentHost\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"ReadOnly\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" To=\"0.55\" Storyboard.TargetProperty=\"Opacity\"\r\n                                    Storyboard.TargetName=\"ReadOnlyVisualElement\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                     </VisualStateGroup>\r\n                     <VisualStateGroup x:Name=\"FocusStates\">\r\n                        <VisualState x:Name=\"Focused\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Unfocused\" />\r\n                     </VisualStateGroup>\r\n                     <VisualStateGroup x:Name=\"ValidationStates\">\r\n                        <VisualState x:Name=\"Valid\" />\r\n                        <VisualState x:Name=\"InvalidUnfocused\">\r\n                           <Storyboard>\r\n                              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\"\r\n                                    Storyboard.TargetName=\"ValidationErrorElement\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"InvalidFocused\">\r\n                           <Storyboard>\r\n                              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\"\r\n                                    Storyboard.TargetName=\"ValidationErrorElement\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"IsOpen\"\r\n                                    Storyboard.TargetName=\"validationTooltip\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                    <DiscreteObjectKeyFrame.Value>\r\n                                       <System:Boolean>True</System:Boolean>\r\n                                    </DiscreteObjectKeyFrame.Value>\r\n                                 </DiscreteObjectKeyFrame>\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                     </VisualStateGroup>\r\n                  </VisualStateManager.VisualStateGroups>\r\n                  <Border x:Name=\"Border\" Background=\"{TemplateBinding Background}\"\r\n                        BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                        CornerRadius=\"2.5\" Opacity=\"1\">\r\n                     <Grid>\r\n                        <Border x:Name=\"ReadOnlyVisualElement\" Background=\"{StaticResource ReadOnlyBrush}\"\r\n                              CornerRadius=\"2\" Opacity=\"0\" />\r\n                        <ScrollViewer x:Name=\"PART_ContentHost\" Foreground=\"{TemplateBinding Foreground}\"\r\n                              Padding=\"{TemplateBinding Padding}\" />\r\n\r\n                        <!--<Border x:Name=\"ContentElement\" BorderThickness=\"0\" Margin=\"1\"\r\n                                        Padding=\"{TemplateBinding Padding}\" />-->\r\n                     </Grid>\r\n                  </Border>\r\n                  <Border x:Name=\"OuterHighlight\" BorderBrush=\"{StaticResource ControlOuterHighlightBrush}\"\r\n                        BorderThickness=\"0,0,1,1\" CornerRadius=\"3\" Margin=\"0,0,-1,-1\" />\r\n                  <Border x:Name=\"InnerShadowDark\" BorderBrush=\"{StaticResource InnerShadowDarkBrush}\"\r\n                        BorderThickness=\"1,1,0,0\" CornerRadius=\"2\" Margin=\"1\" />\r\n                  <Border x:Name=\"InnerShadowLight\" BorderBrush=\"{StaticResource InnerShadowLightBrush}\"\r\n                        BorderThickness=\"1,1,0,0\" CornerRadius=\"1\" Margin=\"2\" />\r\n                  <Border x:Name=\"DisabledVisualElement\" Background=\"{StaticResource DisabledBrush}\"\r\n                        IsHitTestVisible=\"False\" Margin=\"1\" Opacity=\"0\" CornerRadius=\"2\" />\r\n                  <Rectangle x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Margin=\"2\" Opacity=\"0\" RadiusX=\"1\"\r\n                        RadiusY=\"1\" Stroke=\"{StaticResource FocusVisualBrush}\"\r\n                        StrokeThickness=\"{StaticResource FocusVisualStrokeThickness}\" />\r\n                  <Border x:Name=\"ValidationErrorElement\" BorderBrush=\"{StaticResource ErrorBrush}\" BorderThickness=\"1\"\r\n                        CornerRadius=\"3\" Visibility=\"Collapsed\">\r\n                     <ToolTipService.ToolTip>\r\n                        <ToolTip x:Name=\"validationTooltip\"\r\n                              DataContext=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Right\"\r\n                              PlacementTarget=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\"\r\n                              Template=\"{StaticResource ValidationToolTipTemplate}\">\r\n                           <!--<ToolTip.Triggers>\r\n                              <EventTrigger RoutedEvent=\"Canvas.Loaded\">\r\n                                 <BeginStoryboard>\r\n                                    <Storyboard>\r\n                                       <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"IsHitTestVisible\"\r\n                                             Storyboard.TargetName=\"validationTooltip\">\r\n                                          <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"True\" />\r\n                                       </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                 </BeginStoryboard>\r\n                              </EventTrigger>\r\n                           </ToolTip.Triggers>-->\r\n                        </ToolTip>\r\n                     </ToolTipService.ToolTip>\r\n                     <Grid Background=\"Transparent\" HorizontalAlignment=\"Right\" Height=\"12\" Margin=\"1,-4,-4,0\"\r\n                           VerticalAlignment=\"Top\" Width=\"12\">\r\n                        <Path Data=\"M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z\" Fill=\"{StaticResource ErrorBrush}\"\r\n                              Margin=\"1,3,0,0\" />\r\n                     </Grid>\r\n                  </Border>\r\n               </Grid>\r\n            </ControlTemplate>\r\n         </Setter.Value>\r\n      </Setter>\r\n   </Style>\r\n\r\n   <!-- \r\n    ***************************************************************************\r\n    CheckBox\r\n    ***************************************************************************\r\n    -->\r\n\r\n   <Style TargetType=\"CheckBox\">\r\n      <Setter Property=\"Background\" Value=\"{StaticResource CheckBoxBackgroundBrush}\" />\r\n      <Setter Property=\"BorderBrush\" Value=\"{StaticResource CheckBoxBorderBrush}\" />\r\n      <Setter Property=\"Foreground\" Value=\"{StaticResource NormalFontBrush}\" />\r\n      <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n      <Setter Property=\"Padding\" Value=\"6,1,0,0\" />\r\n      <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n      <Setter Property=\"Template\">\r\n         <Setter.Value>\r\n            <ControlTemplate TargetType=\"CheckBox\">\r\n               <Grid>\r\n                  <Grid.ColumnDefinitions>\r\n                     <ColumnDefinition Width=\"13\" />\r\n                     <ColumnDefinition Width=\"*\" />\r\n                  </Grid.ColumnDefinitions>\r\n                  <VisualStateManager.VisualStateGroups>\r\n                     <VisualStateGroup x:Name=\"CommonStates\">\r\n                        <VisualState x:Name=\"Normal\" />\r\n                        <VisualState x:Name=\"MouseOver\">\r\n                           <Storyboard>\r\n                              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\"\r\n                                    Storyboard.TargetName=\"MouseOverBorder\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Pressed\">\r\n                           <Storyboard>\r\n                              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\"\r\n                                    Storyboard.TargetName=\"PressedBorder\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Disabled\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" To=\".55\" Storyboard.TargetProperty=\"(UIElement.Opacity)\"\r\n                                    Storyboard.TargetName=\"contentPresenter\" />\r\n                              <DoubleAnimation Duration=\"0\" To=\"0.55\" Storyboard.TargetProperty=\"(UIElement.Opacity)\"\r\n                                    Storyboard.TargetName=\"DisabledVisualElement\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                     </VisualStateGroup>\r\n                     <VisualStateGroup x:Name=\"CheckStates\">\r\n                        <VisualState x:Name=\"Checked\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\"\r\n                                    Storyboard.TargetName=\"CheckIcon\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Unchecked\" />\r\n                        <VisualState x:Name=\"Indeterminate\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\"\r\n                                    Storyboard.TargetName=\"IndeterminateIcon\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                     </VisualStateGroup>\r\n                     <VisualStateGroup x:Name=\"FocusStates\">\r\n                        <VisualState x:Name=\"Focused\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Unfocused\" />\r\n                     </VisualStateGroup>\r\n                     <VisualStateGroup x:Name=\"ValidationStates\">\r\n                        <VisualState x:Name=\"Valid\" />\r\n                        <VisualState x:Name=\"InvalidUnfocused\">\r\n                           <Storyboard>\r\n                              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\"\r\n                                    Storyboard.TargetName=\"ValidationErrorElement\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"InvalidFocused\">\r\n                           <Storyboard>\r\n                              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\"\r\n                                    Storyboard.TargetName=\"ValidationErrorElement\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"IsOpen\"\r\n                                    Storyboard.TargetName=\"validationTooltip\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                    <DiscreteObjectKeyFrame.Value>\r\n                                       <System:Boolean>True</System:Boolean>\r\n                                    </DiscreteObjectKeyFrame.Value>\r\n                                 </DiscreteObjectKeyFrame>\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                     </VisualStateGroup>\r\n                  </VisualStateManager.VisualStateGroups>\r\n                  <Grid Height=\"12\" HorizontalAlignment=\"Left\"\r\n                        VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Width=\"12\">\r\n                     <Rectangle x:Name=\"Background\" Fill=\"{TemplateBinding Background}\" Height=\"12\"\r\n                           Stroke=\"{TemplateBinding BorderBrush}\" Width=\"12\" />\r\n                     <Border x:Name=\"OuterHighlight\" BorderBrush=\"{StaticResource ControlOuterHighlightBrush}\"\r\n                           BorderThickness=\"0,0,1,1\" CornerRadius=\"1,0,1,0\" Margin=\"1,1,-1,-1\" />\r\n                     <Border x:Name=\"InnerShadow\" BorderBrush=\"{StaticResource CheckBoxInnerShadowBrush}\"\r\n                           BorderThickness=\"1,1,0,0\" CornerRadius=\"0.5\" Margin=\"1,1,0,0\" />\r\n                     <Border x:Name=\"MouseOverBorder\" BorderBrush=\"{StaticResource ColorAccentBrush}\"\r\n                           BorderThickness=\"1\" Margin=\"1\" Visibility=\"Collapsed\" />\r\n                     <Border x:Name=\"PressedBorder\" BorderBrush=\"{StaticResource ColorAccentSubduedBrush}\"\r\n                           BorderThickness=\"1\" Margin=\"1\" Visibility=\"Collapsed\" />\r\n                     <Path x:Name=\"CheckIcon\"\r\n                           Data=\"M0.5625,5.0625 L1.5,3.9375 L2.9575791,4.9549685 C2.9575791,4.9549685 5.75,1.125 5.75,1.125 C5.75,1.125 6.9375,2 6.9375,2 C6.9375,2 3.186887,7.0000076 3.186887,7.0000076 z\"\r\n                           Fill=\"{StaticResource ColorAccentHighlightBrush}\" FlowDirection=\"LeftToRight\"\r\n                           Margin=\"2,2,0,1\" Opacity=\"0\" />\r\n                     <Rectangle x:Name=\"IndeterminateIcon\" Fill=\"{StaticResource ColorAccentHighlightBrush}\" Height=\"2\"\r\n                           Opacity=\"0\" Width=\"6\" />\r\n                     <Rectangle x:Name=\"DisabledVisualElement\" Fill=\"{StaticResource DisabledBrush}\" Height=\"12\"\r\n                           Opacity=\"0\" Width=\"12\" />\r\n                     <Rectangle x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Margin=\"2\" Opacity=\"0\"\r\n                           Stroke=\"{StaticResource FocusVisualBrush}\"\r\n                           StrokeThickness=\"{StaticResource FocusVisualStrokeThickness}\" />\r\n                     <Border x:Name=\"ValidationErrorElement\" BorderBrush=\"{StaticResource ErrorBrush}\"\r\n                           BorderThickness=\"1\" Margin=\"1\"\r\n                           ToolTipService.PlacementTarget=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\"\r\n                           Visibility=\"Collapsed\">\r\n                        <ToolTipService.ToolTip>\r\n                           <ToolTip x:Name=\"validationTooltip\"\r\n                                 DataContext=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\"\r\n                                 Placement=\"Right\"\r\n                                 PlacementTarget=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\"\r\n                                 Template=\"{StaticResource ValidationToolTipTemplate}\">\r\n                              <!--<ToolTip.Triggers>\r\n                                 <EventTrigger RoutedEvent=\"Canvas.Loaded\">\r\n                                    <BeginStoryboard>\r\n                                       <Storyboard>\r\n                                          <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"IsHitTestVisible\"\r\n                                                Storyboard.TargetName=\"validationTooltip\">\r\n                                             <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                   <System:Boolean>true</System:Boolean>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                             </DiscreteObjectKeyFrame>\r\n                                          </ObjectAnimationUsingKeyFrames>\r\n                                       </Storyboard>\r\n                                    </BeginStoryboard>\r\n                                 </EventTrigger>\r\n                              </ToolTip.Triggers>-->\r\n                           </ToolTip>\r\n                        </ToolTipService.ToolTip>\r\n                        <Grid Background=\"Transparent\" HorizontalAlignment=\"Right\" Height=\"10\" Margin=\"0,-4,-4,0\"\r\n                              VerticalAlignment=\"Top\" Width=\"10\">\r\n                           <Path Data=\"M 1,0 L5,0 A 2,2 90 0 1 7,2 L7,6 z\" Fill=\"{StaticResource ErrorBrush}\"\r\n                                 Margin=\"0,3,0,0\" />\r\n                        </Grid>\r\n                     </Border>\r\n                  </Grid>\r\n                  <ContentPresenter x:Name=\"contentPresenter\" Content=\"{TemplateBinding Content}\"\r\n                        ContentTemplate=\"{TemplateBinding ContentTemplate}\" Grid.Column=\"1\"\r\n                        HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                        Margin=\"{TemplateBinding Padding}\"\r\n                        VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" />\r\n               </Grid>\r\n            </ControlTemplate>\r\n         </Setter.Value>\r\n      </Setter>\r\n   </Style>\r\n\r\n   <!-- \r\n    ***************************************************************************\r\n    RadioButton\r\n    ***************************************************************************\r\n    -->\r\n\r\n   <Style TargetType=\"RadioButton\">\r\n      <Setter Property=\"Background\" Value=\"{StaticResource RadioButtonBackgroundBrush}\" />\r\n      <Setter Property=\"BorderBrush\" Value=\"{StaticResource RadioButtonBorderBrush}\" />\r\n      <Setter Property=\"Foreground\" Value=\"{StaticResource NormalFontBrush}\" />\r\n      <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n      <Setter Property=\"Padding\" Value=\"6,1,0,0\" />\r\n      <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n      <Setter Property=\"Template\">\r\n         <Setter.Value>\r\n            <ControlTemplate TargetType=\"RadioButton\">\r\n               <Grid>\r\n                  <Grid.ColumnDefinitions>\r\n                     <ColumnDefinition Width=\"13\" />\r\n                     <ColumnDefinition Width=\"*\" />\r\n                  </Grid.ColumnDefinitions>\r\n                  <VisualStateManager.VisualStateGroups>\r\n                     <VisualStateGroup x:Name=\"CommonStates\">\r\n                        <VisualState x:Name=\"Normal\" />\r\n                        <VisualState x:Name=\"MouseOver\">\r\n                           <Storyboard>\r\n                              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\"\r\n                                    Storyboard.TargetName=\"MouseOverBorder\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Pressed\">\r\n                           <Storyboard>\r\n                              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\"\r\n                                    Storyboard.TargetName=\"PressedBorder\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Disabled\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" To=\".55\" Storyboard.TargetProperty=\"(UIElement.Opacity)\"\r\n                                    Storyboard.TargetName=\"contentPresenter\" />\r\n                              <DoubleAnimation Duration=\"0\" To=\"0.55\" Storyboard.TargetProperty=\"(UIElement.Opacity)\"\r\n                                    Storyboard.TargetName=\"DisabledVisualElement\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                     </VisualStateGroup>\r\n                     <VisualStateGroup x:Name=\"CheckStates\">\r\n                        <VisualState x:Name=\"Checked\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\"\r\n                                    Storyboard.TargetName=\"CheckIcon\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Unchecked\" />\r\n                        <VisualState x:Name=\"Indeterminate\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\"\r\n                                    Storyboard.TargetName=\"IndeterminateIcon\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                     </VisualStateGroup>\r\n                     <VisualStateGroup x:Name=\"FocusStates\">\r\n                        <VisualState x:Name=\"Focused\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Unfocused\" />\r\n                     </VisualStateGroup>\r\n                     <VisualStateGroup x:Name=\"ValidationStates\">\r\n                        <VisualState x:Name=\"Valid\" />\r\n                        <VisualState x:Name=\"InvalidUnfocused\">\r\n                           <Storyboard>\r\n                              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\"\r\n                                    Storyboard.TargetName=\"ValidationErrorElement\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"InvalidFocused\">\r\n                           <Storyboard>\r\n                              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\"\r\n                                    Storyboard.TargetName=\"ValidationErrorElement\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"IsOpen\"\r\n                                    Storyboard.TargetName=\"validationTooltip\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                    <DiscreteObjectKeyFrame.Value>\r\n                                       <System:Boolean>True</System:Boolean>\r\n                                    </DiscreteObjectKeyFrame.Value>\r\n                                 </DiscreteObjectKeyFrame>\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                     </VisualStateGroup>\r\n                  </VisualStateManager.VisualStateGroups>\r\n                  <Grid Height=\"12\" HorizontalAlignment=\"Left\"\r\n                        VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Width=\"12\">\r\n                     <Ellipse x:Name=\"OuterHighlight\" Stroke=\"#90FFFFFF\" StrokeThickness=\"1\" Margin=\"1,1,-0.5,-0.5\" />\r\n                     <Ellipse x:Name=\"Background\" Fill=\"{TemplateBinding Background}\" Height=\"12\"\r\n                           Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\"\r\n                           Width=\"12\" />\r\n                     <Ellipse Fill=\"{StaticResource RadioButtonInnerShadowBrush}\" Margin=\"1\" />\r\n                     <Border x:Name=\"MouseOverBorder\" BorderBrush=\"{StaticResource ColorAccentBrush}\"\r\n                           BorderThickness=\"1\" CornerRadius=\"6\" Margin=\"1\" Visibility=\"Collapsed\" />\r\n                     <Border x:Name=\"PressedBorder\" BorderBrush=\"{StaticResource ColorAccentSubduedBrush}\"\r\n                           BorderThickness=\"1\" CornerRadius=\"6\" Margin=\"1\" Visibility=\"Collapsed\" />\r\n                     <Ellipse x:Name=\"CheckIcon\" Fill=\"{StaticResource ColorAccentHighlightBrush}\" Margin=\"3\"\r\n                           Opacity=\"0\" />\r\n                     <Ellipse x:Name=\"IndeterminateIcon\" Stroke=\"{StaticResource ColorAccentHighlightBrush}\"\r\n                           StrokeThickness=\"1\" Margin=\"3\" Opacity=\"0\" />\r\n                     <Ellipse x:Name=\"DisabledVisualElement\" Fill=\"{StaticResource DisabledBrush}\" Height=\"12\"\r\n                           Opacity=\"0\" Width=\"12\" />\r\n                     <Ellipse x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Margin=\"2\" Opacity=\"0\"\r\n                           Stroke=\"{StaticResource FocusVisualBrush}\"\r\n                           StrokeThickness=\"{StaticResource FocusVisualStrokeThickness}\" />\r\n                     <Grid x:Name=\"ValidationErrorElement\"\r\n                           ToolTipService.PlacementTarget=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\"\r\n                           Visibility=\"Collapsed\">\r\n                        <ToolTipService.ToolTip>\r\n                           <ToolTip x:Name=\"validationTooltip\"\r\n                                 DataContext=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\"\r\n                                 Placement=\"Right\"\r\n                                 PlacementTarget=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\"\r\n                                 Template=\"{StaticResource ValidationToolTipTemplate}\">\r\n                              <!--<ToolTip.Triggers>\r\n                                 <EventTrigger RoutedEvent=\"Canvas.Loaded\">\r\n                                    <BeginStoryboard>\r\n                                       <Storyboard>\r\n                                          <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"IsHitTestVisible\"\r\n                                                Storyboard.TargetName=\"validationTooltip\">\r\n                                             <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                   <System:Boolean>true</System:Boolean>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                             </DiscreteObjectKeyFrame>\r\n                                          </ObjectAnimationUsingKeyFrames>\r\n                                       </Storyboard>\r\n                                    </BeginStoryboard>\r\n                                 </EventTrigger>\r\n                              </ToolTip.Triggers>-->\r\n                           </ToolTip>\r\n                        </ToolTipService.ToolTip>\r\n                        <Ellipse Height=\"12\" Stroke=\"{StaticResource ErrorBrush}\" StrokeThickness=\"1\" Width=\"12\" />\r\n                        <Ellipse Fill=\"{StaticResource ErrorBrush}\" Height=\"4\" HorizontalAlignment=\"Right\"\r\n                              Margin=\"0,-3,-3,0\" VerticalAlignment=\"Top\" Width=\"4\" />\r\n                        <Ellipse Fill=\"Transparent\" Height=\"10\" HorizontalAlignment=\"Right\" Margin=\"0,-6,-5,0\"\r\n                              VerticalAlignment=\"Top\" Width=\"10\" />\r\n                     </Grid>\r\n                  </Grid>\r\n                  <ContentPresenter x:Name=\"contentPresenter\" Content=\"{TemplateBinding Content}\"\r\n                        ContentTemplate=\"{TemplateBinding ContentTemplate}\" Grid.Column=\"1\"\r\n                        HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                        Margin=\"{TemplateBinding Padding}\"\r\n                        VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" />\r\n               </Grid>\r\n            </ControlTemplate>\r\n         </Setter.Value>\r\n      </Setter>\r\n   </Style>\r\n\r\n   <Style x:Key=\"HeadingBase\" TargetType=\"TextBlock\">\r\n      <Setter Property=\"FontFamily\" Value=\"{StaticResource HeadingFontFamily}\" />\r\n      <Setter Property=\"FontWeight\" Value=\"Bold\" />\r\n      <Setter Property=\"Foreground\" Value=\"{StaticResource NormalFontBrush}\" />\r\n   </Style>\r\n   <Style x:Key=\"Heading1\" BasedOn=\"{StaticResource HeadingBase}\" TargetType=\"TextBlock\">\r\n      <Setter Property=\"FontSize\" Value=\"{StaticResource Heading1FontSize}\" />\r\n      <Setter Property=\"Foreground\" Value=\"{StaticResource Heading1FontBrush}\" />\r\n   </Style>\r\n   <Style x:Key=\"Heading2\" BasedOn=\"{StaticResource HeadingBase}\" TargetType=\"TextBlock\">\r\n      <Setter Property=\"FontSize\" Value=\"{StaticResource Heading2FontSize}\" />\r\n      <Setter Property=\"Foreground\" Value=\"{StaticResource Heading2FontBrush}\" />\r\n   </Style>\r\n   <Style x:Key=\"Heading3\" BasedOn=\"{StaticResource HeadingBase}\" TargetType=\"TextBlock\">\r\n      <Setter Property=\"FontSize\" Value=\"{StaticResource Heading3FontSize}\" />\r\n      <Setter Property=\"Foreground\" Value=\"{StaticResource Heading3FontBrush}\" />\r\n   </Style>\r\n   <Style x:Key=\"Heading4\" BasedOn=\"{StaticResource HeadingBase}\" TargetType=\"TextBlock\">\r\n      <Setter Property=\"FontSize\" Value=\"{StaticResource Heading4FontSize}\" />\r\n   </Style>\r\n   <Style x:Key=\"Heading5\" BasedOn=\"{StaticResource HeadingBase}\" TargetType=\"TextBlock\">\r\n      <Setter Property=\"FontSize\" Value=\"{StaticResource Heading5FontSize}\" />\r\n   </Style>\r\n   <Style x:Key=\"Heading6\" BasedOn=\"{StaticResource HeadingBase}\" TargetType=\"TextBlock\">\r\n      <Setter Property=\"FontSize\" Value=\"{StaticResource Heading6FontSize}\" />\r\n   </Style>\r\n\r\n   <!-- \r\n    ***************************************************************************\r\n    HyperlinkButton : NOT IN WPF\r\n    ***************************************************************************\r\n    -->\r\n\r\n   <!--<Style TargetType=\"HyperlinkButton\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"Cursor\" Value=\"Hand\" />\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ColorAccentHighlightBrush}\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"Padding\" Value=\"2,0,2,0\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"HyperlinkButton\">\r\n                    <Grid Background=\"{TemplateBinding Background}\" Cursor=\"{TemplateBinding Cursor}\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"1.0\"\r\n                                                Storyboard.TargetProperty=\"(UIElement.Opacity)\"\r\n                                                Storyboard.TargetName=\"Underline\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\" />\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimation Duration=\"0\" To=\"#FFA0A0A0\"\r\n                                                Storyboard.TargetProperty=\"(Control.Foreground).(SolidColorBrush.Color)\"\r\n                                                Storyboard.TargetName=\"contentPresenter\" d:IsOptimized=\"True\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\"\r\n                                                Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <StackPanel Margin=\"{TemplateBinding Padding}\"\r\n                                HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                                VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" UseLayoutRounding=\"True\">\r\n                            <ContentControl x:Name=\"contentPresenter\" Content=\"{TemplateBinding Content}\"\r\n                                    ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                                    Foreground=\"{TemplateBinding Foreground}\" />\r\n                            <Rectangle x:Name=\"Underline\" Height=\"1\" VerticalAlignment=\"Bottom\"\r\n                                    Fill=\"{TemplateBinding Foreground}\" Margin=\"0,1,0,2\" Opacity=\"0\" />\r\n                        </StackPanel>\r\n                        <Rectangle x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Margin=\"0\" Opacity=\"0\"\r\n                                RadiusX=\"2\" RadiusY=\"2\" Stroke=\"{StaticResource FocusVisualBrush}\"\r\n                                StrokeThickness=\"{StaticResource FocusVisualStrokeThickness}\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>-->\r\n\r\n   <!-- \r\n    ***************************************************************************\r\n    ProgressBar (control template separate so it can be reused)\r\n    ***************************************************************************\r\n    -->\r\n\r\n   <ControlTemplate x:Key=\"ProgressBarTemplate\" TargetType=\"ProgressBar\">\r\n      <Grid x:Name=\"Root\">\r\n         <VisualStateManager.VisualStateGroups>\r\n            <VisualStateGroup x:Name=\"CommonStates\">\r\n               <VisualState x:Name=\"Determinate\" />\r\n               <VisualState x:Name=\"Indeterminate\">\r\n                  <Storyboard RepeatBehavior=\"Forever\">\r\n                     <DoubleAnimation Duration=\"00:00:.5\" From=\"0\" To=\"20\"\r\n                           Storyboard.TargetProperty=\"(Shape.Fill).(LinearGradientBrush.Transform).(TransformGroup.Children)[0].X\"\r\n                           Storyboard.TargetName=\"IndeterminateGradientFill\" />\r\n\r\n                     <ColorAnimation Duration=\"0\" To=\"#66FFFFFF\"\r\n                           Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)\"\r\n                           Storyboard.TargetName=\"IndeterminateGradientFill\" d:IsOptimized=\"True\" />\r\n                     <ColorAnimation Duration=\"0\" To=\"#66FFFFFF\"\r\n                           Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\"\r\n                           Storyboard.TargetName=\"IndeterminateGradientFill\" d:IsOptimized=\"True\" />\r\n                     <ColorAnimation Duration=\"0\" To=\"#66FFFFFF\"\r\n                           Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\"\r\n                           Storyboard.TargetName=\"IndeterminateGradientFill\" d:IsOptimized=\"True\" />\r\n                     <DoubleAnimation Duration=\"0\" To=\"1\"\r\n                           Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Offset)\"\r\n                           Storyboard.TargetName=\"IndeterminateGradientFill\" d:IsOptimized=\"True\" />\r\n                     <ColorAnimation Duration=\"0\" To=\"Transparent\"\r\n                           Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\"\r\n                           Storyboard.TargetName=\"IndeterminateGradientFill\" d:IsOptimized=\"True\" />\r\n                     <DoubleAnimation Duration=\"0\" To=\"0.15\"\r\n                           Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Offset)\"\r\n                           Storyboard.TargetName=\"IndeterminateGradientFill\" d:IsOptimized=\"True\" />\r\n                     <DoubleAnimation Duration=\"0\" To=\"0.85\"\r\n                           Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Offset)\"\r\n                           Storyboard.TargetName=\"IndeterminateGradientFill\" d:IsOptimized=\"True\" />\r\n                     <DoubleAnimation Duration=\"0\" To=\"0.85\"\r\n                           Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[4].(GradientStop.Offset)\"\r\n                           Storyboard.TargetName=\"IndeterminateGradientFill\" d:IsOptimized=\"True\" />\r\n                     <ColorAnimation Duration=\"0\" To=\"#66FEFEFE\"\r\n                           Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[4].(GradientStop.Color)\"\r\n                           Storyboard.TargetName=\"IndeterminateGradientFill\" d:IsOptimized=\"True\" />\r\n                     <ColorAnimation Duration=\"0\" To=\"Transparent\"\r\n                           Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[5].(GradientStop.Color)\"\r\n                           Storyboard.TargetName=\"IndeterminateGradientFill\" d:IsOptimized=\"True\" />\r\n                     <DoubleAnimation Duration=\"0\" To=\"0.15\"\r\n                           Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[5].(GradientStop.Offset)\"\r\n                           Storyboard.TargetName=\"IndeterminateGradientFill\" d:IsOptimized=\"True\" />\r\n                     <DoubleAnimation Duration=\"0\" To=\"0\"\r\n                           Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Offset)\"\r\n                           Storyboard.TargetName=\"IndeterminateGradientFill\" d:IsOptimized=\"True\" />\r\n                     <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\"\r\n                           Storyboard.TargetName=\"DeterminateRoot\">\r\n                        <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                     </ObjectAnimationUsingKeyFrames>\r\n                     <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\"\r\n                           Storyboard.TargetName=\"IndeterminateGradientFill\">\r\n                        <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                     </ObjectAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n               </VisualState>\r\n            </VisualStateGroup>\r\n         </VisualStateManager.VisualStateGroups>\r\n         <Border x:Name=\"OuterHighlight\" BorderBrush=\"{StaticResource ControlOuterHighlightBrush}\" BorderThickness=\"1\"\r\n               CornerRadius=\"3\" Margin=\"0,0,-1,-1\" />\r\n         <Border x:Name=\"PART_Track\" Background=\"{TemplateBinding Background}\"\r\n               BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n               CornerRadius=\"2\" />\r\n\r\n         <!-- Inner Shadow. -->\r\n         <Border BorderBrush=\"{StaticResource InnerShadowDarkBrush}\" BorderThickness=\"1\" CornerRadius=\"2\" />\r\n         <Border BorderBrush=\"{StaticResource InnerShadowLightBrush}\" BorderThickness=\"1\" CornerRadius=\"1\" Margin=\"1\" />\r\n         <Grid x:Name=\"ProgressBarRootGrid\">\r\n            <Grid x:Name=\"DeterminateRoot\" Margin=\"1\">\r\n               <Grid x:Name=\"PART_Indicator\" HorizontalAlignment=\"Left\">\r\n                  <Rectangle Fill=\"{TemplateBinding Foreground}\" Margin=\"{TemplateBinding BorderThickness}\" RadiusX=\"1\"\r\n                        RadiusY=\"1\" />\r\n                  <Rectangle x:Name=\"Overlay\" Margin=\"{TemplateBinding BorderThickness}\" RadiusX=\"1\" RadiusY=\"1\"\r\n                        Visibility=\"Collapsed\">\r\n                     <Rectangle.Fill>\r\n                        <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                           <GradientStop Color=\"#2BFFFFFF\" Offset=\"0\" />\r\n                           <GradientStop Color=\"#2B000000\" Offset=\"1\" />\r\n                        </LinearGradientBrush>\r\n                     </Rectangle.Fill>\r\n                  </Rectangle>\r\n                  <Rectangle x:Name=\"IndeterminateGradientFill\" Margin=\"{TemplateBinding BorderThickness}\" Opacity=\"0.7\"\r\n                        RadiusX=\"1\" RadiusY=\"1\" StrokeThickness=\"1\" Visibility=\"Collapsed\">\r\n                     <Rectangle.Fill>\r\n                        <LinearGradientBrush EndPoint=\"0,1\" MappingMode=\"Absolute\" SpreadMethod=\"Repeat\"\r\n                              StartPoint=\"20,1\">\r\n                           <LinearGradientBrush.Transform>\r\n                              <TransformGroup>\r\n                                 <TranslateTransform X=\"0\" />\r\n                                 <SkewTransform AngleX=\"-45\" />\r\n                              </TransformGroup>\r\n                           </LinearGradientBrush.Transform>\r\n                           <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                           <GradientStop Color=\"#00FFFFFF\" Offset=\".25\" />\r\n                           <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.85\" />\r\n                           <GradientStop Color=\"#25FFFFFF\" Offset=\"0.339\" />\r\n                           <GradientStop Color=\"#33FEFEFE\" Offset=\"0.253\" />\r\n                           <GradientStop Color=\"#11FFFFFF\" Offset=\"0.545\" />\r\n                        </LinearGradientBrush>\r\n                     </Rectangle.Fill>\r\n                  </Rectangle>\r\n                  <Rectangle x:Name=\"Highlight\" Margin=\"{TemplateBinding BorderThickness}\" RadiusX=\"1\" RadiusY=\"1\">\r\n                     <Rectangle.Effect>\r\n                        <BlurEffect Radius=\"2\" />\r\n                     </Rectangle.Effect>\r\n                     <Rectangle.Fill>\r\n                        <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                           <GradientStop Color=\"#26FFFFFF\" Offset=\"0\" />\r\n                           <GradientStop Color=\"Transparent\" Offset=\"1\" />\r\n                           <GradientStop Color=\"#26FFFFFF\" Offset=\"0.5\" />\r\n                           <GradientStop Color=\"Transparent\" Offset=\"0.5\" />\r\n                        </LinearGradientBrush>\r\n                     </Rectangle.Fill>\r\n                  </Rectangle>\r\n               </Grid>\r\n            </Grid>\r\n         </Grid>\r\n      </Grid>\r\n   </ControlTemplate>\r\n   <Style TargetType=\"ProgressBar\">\r\n      <Setter Property=\"Background\" Value=\"{StaticResource ControlBackgroundAltBrush}\" />\r\n      <Setter Property=\"BorderThickness\" Value=\"0\" />\r\n      <Setter Property=\"Foreground\" Value=\"{StaticResource ColorAccentBrush}\" />\r\n      <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n      <Setter Property=\"Maximum\" Value=\"100\" />\r\n      <Setter Property=\"Template\" Value=\"{StaticResource ProgressBarTemplate}\" />\r\n   </Style>\r\n\r\n   <!-- \r\n    ***************************************************************************\r\n    ListBox / ListBoxItem\r\n    ***************************************************************************\r\n    -->\r\n\r\n   <Style TargetType=\"ListBoxItem\" x:Key=\"ListBoxItemStyle\">\r\n      <Setter Property=\"Foreground\" Value=\"{StaticResource InputForegroundBrush}\" />\r\n      <Setter Property=\"TextBlock.Foreground\" Value=\"{StaticResource InputForegroundBrush}\" />\r\n      <Setter Property=\"Background\" Value=\"Transparent\" />\r\n      <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n      <Setter Property=\"Padding\" Value=\"6,4\" />\r\n      <Setter Property=\"KeyboardNavigation.ControlTabNavigation\" Value=\"Local\" />\r\n      <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n      <Setter Property=\"Template\">\r\n         <Setter.Value>\r\n            <ControlTemplate TargetType=\"ListBoxItem\">\r\n               <Grid Background=\"{TemplateBinding Background}\">\r\n                  <VisualStateManager.VisualStateGroups>\r\n                     <VisualStateGroup x:Name=\"CommonStates\">\r\n                        <VisualState x:Name=\"Normal\" />\r\n                        <VisualState x:Name=\"MouseOver\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0:0:0.1\" To=\"1\" Storyboard.TargetProperty=\"Opacity\"\r\n                                    Storyboard.TargetName=\"MouseOverElement\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Disabled\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" To=\"0.35\" Storyboard.TargetProperty=\"Opacity\"\r\n                                    Storyboard.TargetName=\"contentPresenter\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                     </VisualStateGroup>\r\n                     <VisualStateGroup x:Name=\"SelectionStates\">\r\n                        <VisualState x:Name=\"Unselected\" />\r\n                        <VisualState x:Name=\"Selected\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\"\r\n                                    Storyboard.TargetName=\"SelectedElement\" />\r\n                              <DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"Opacity\"\r\n                                    Storyboard.TargetName=\"MouseOverElement\" />\r\n                              <ColorAnimation Duration=\"0\" To=\"White\"\r\n                                    Storyboard.TargetProperty=\"(Control.Foreground).(SolidColorBrush.Color)\"\r\n                                    Storyboard.TargetName=\"contentPresenter\" d:IsOptimized=\"True\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"SelectedUnfocused\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\"\r\n                                    Storyboard.TargetName=\"SelectedElement\" />\r\n                              <DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"Opacity\"\r\n                                    Storyboard.TargetName=\"MouseOverElement\" />\r\n                              <ColorAnimation Duration=\"0\" To=\"White\"\r\n                                    Storyboard.TargetProperty=\"(Control.Foreground).(SolidColorBrush.Color)\"\r\n                                    Storyboard.TargetName=\"contentPresenter\" d:IsOptimized=\"True\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                     </VisualStateGroup>\r\n                     <VisualStateGroup x:Name=\"FocusStates\">\r\n                        <VisualState x:Name=\"Focused\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Unfocused\" />\r\n                     </VisualStateGroup>\r\n                     <VisualStateGroup x:Name=\"LayoutStates\">\r\n                        <VisualState x:Name=\"AfterLoaded\" />\r\n                        <VisualState x:Name=\"BeforeLoaded\" />\r\n                        <VisualState x:Name=\"BeforeUnloaded\" />\r\n                     </VisualStateGroup>\r\n                  </VisualStateManager.VisualStateGroups>\r\n                  <Rectangle x:Name=\"MouseOverElement\" IsHitTestVisible=\"False\" Opacity=\"0\" RadiusX=\"0\" RadiusY=\"0\"\r\n                        Fill=\"{StaticResource MouseOverSelectionBrush}\" />\r\n                  <Rectangle x:Name=\"SelectedElement\" IsHitTestVisible=\"False\" Opacity=\"0\" RadiusX=\"0\" RadiusY=\"1\"\r\n                        Fill=\"{StaticResource InputSelectionBrush}\" />\r\n                  <ContentControl x:Name=\"contentPresenter\" Content=\"{TemplateBinding Content}\"\r\n                        ContentTemplate=\"{TemplateBinding ContentTemplate}\" Foreground=\"{TemplateBinding Foreground}\"\r\n                        HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                        Margin=\"{TemplateBinding Padding}\" />\r\n                  <Rectangle x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Margin=\"2\" Opacity=\"0\" RadiusX=\"1\"\r\n                        RadiusY=\"1\" Stroke=\"{StaticResource FocusVisualBrush}\"\r\n                        StrokeThickness=\"{StaticResource FocusVisualStrokeThickness}\" />\r\n               </Grid>\r\n            </ControlTemplate>\r\n         </Setter.Value>\r\n      </Setter>\r\n   </Style>\r\n   <Style TargetType=\"ListBoxItem\" BasedOn=\"{StaticResource ListBoxItemStyle}\"/>\r\n    \r\n   <Style TargetType=\"ListBox\">\r\n      <Setter Property=\"Background\" Value=\"{StaticResource InputBackgroundBrush}\" />\r\n      <Setter Property=\"BorderBrush\" Value=\"{StaticResource ControlBorderBrush}\" />\r\n      <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n      <Setter Property=\"Foreground\" Value=\"{StaticResource InputForegroundBrush}\" />\r\n      <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n      <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\" />\r\n      <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\" />\r\n      <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"true\" />\r\n      <Setter Property=\"ScrollViewer.PanningMode\" Value=\"Both\" />\r\n      <Setter Property=\"KeyboardNavigation.ControlTabNavigation\" Value=\"Once\" />\r\n      <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n      <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n      <Setter Property=\"Template\">\r\n         <Setter.Value>\r\n            <ControlTemplate TargetType=\"ListBox\">\r\n               <Grid>\r\n                  <VisualStateManager.VisualStateGroups>\r\n                     <VisualStateGroup x:Name=\"ValidationStates\">\r\n                        <VisualState x:Name=\"Valid\" />\r\n                        <VisualState x:Name=\"InvalidUnfocused\">\r\n                           <Storyboard>\r\n                              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\"\r\n                                    Storyboard.TargetName=\"ValidationErrorElement\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"InvalidFocused\">\r\n                           <Storyboard>\r\n                              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\"\r\n                                    Storyboard.TargetName=\"ValidationErrorElement\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"IsOpen\"\r\n                                    Storyboard.TargetName=\"validationTooltip\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                    <DiscreteObjectKeyFrame.Value>\r\n                                       <System:Boolean>True</System:Boolean>\r\n                                    </DiscreteObjectKeyFrame.Value>\r\n                                 </DiscreteObjectKeyFrame>\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                     </VisualStateGroup>\r\n                  </VisualStateManager.VisualStateGroups>\r\n                  <Grid>\r\n                     <Border x:Name=\"OuterHighlight\" BorderBrush=\"{StaticResource ControlOuterHighlightBrush}\"\r\n                           BorderThickness=\"0,0,1,1\" CornerRadius=\"3\" Margin=\"0,0,-1,-1\" />\r\n                     <Border Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                           BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" Margin=\"0\">\r\n                        <ScrollViewer Focusable=\"false\" Padding=\"{TemplateBinding Padding}\" Background=\"Transparent\"\r\n                              BorderBrush=\"Transparent\">\r\n                           <ItemsPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" />\r\n                        </ScrollViewer>\r\n                     </Border>\r\n                     <!-- Inner Shadow. -->\r\n                     <Border BorderBrush=\"{StaticResource InnerShadowDarkBrush}\" BorderThickness=\"1,1,0,0\"\r\n                           CornerRadius=\"2\" Margin=\"1\" />\r\n                     <Border BorderBrush=\"{StaticResource InnerShadowLightBrush}\" BorderThickness=\"1,1,0,0\"\r\n                           CornerRadius=\"1\" Margin=\"2,2,1,1\" />\r\n                  </Grid>\r\n                  <Border x:Name=\"ValidationErrorElement\" BorderBrush=\"{StaticResource ErrorBrush}\"\r\n                        BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" Visibility=\"Collapsed\">\r\n                     <ToolTipService.ToolTip>\r\n                        <ToolTip x:Name=\"validationTooltip\"\r\n                              DataContext=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Right\"\r\n                              PlacementTarget=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\"\r\n                              Template=\"{StaticResource ValidationToolTipTemplate}\">\r\n                           <!--<ToolTip.Triggers>\r\n                              <EventTrigger RoutedEvent=\"Canvas.Loaded\">\r\n                                 <BeginStoryboard>\r\n                                    <Storyboard>\r\n                                       <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"IsHitTestVisible\"\r\n                                             Storyboard.TargetName=\"validationTooltip\">\r\n                                          <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                             <DiscreteObjectKeyFrame.Value>\r\n                                                <System:Boolean>true</System:Boolean>\r\n                                             </DiscreteObjectKeyFrame.Value>\r\n                                          </DiscreteObjectKeyFrame>\r\n                                       </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                 </BeginStoryboard>\r\n                              </EventTrigger>\r\n                           </ToolTip.Triggers>-->\r\n                        </ToolTip>\r\n                     </ToolTipService.ToolTip>\r\n                     <Grid Background=\"Transparent\" HorizontalAlignment=\"Right\" Height=\"10\" Margin=\"0,-4,-4,0\"\r\n                           VerticalAlignment=\"Top\" Width=\"10\">\r\n                        <Path Data=\"M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z\" Fill=\"{StaticResource ErrorBrush}\"\r\n                              Margin=\"-1,3,0,0\" />\r\n                     </Grid>\r\n                  </Border>\r\n               </Grid>\r\n            </ControlTemplate>\r\n         </Setter.Value>\r\n      </Setter>\r\n   </Style>\r\n\r\n   <!-- \r\n    ***************************************************************************\r\n    ComboBox / ComboBoxItem\r\n    ***************************************************************************\r\n    -->\r\n\r\n   <Style TargetType=\"ComboBoxItem\">\r\n      <Setter Property=\"Background\" Value=\"Transparent\" />\r\n      <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n      <Setter Property=\"Padding\" Value=\"6,4\" />\r\n      <Setter Property=\"KeyboardNavigation.ControlTabNavigation\" Value=\"Local\" />\r\n      <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n      <Setter Property=\"Template\">\r\n         <Setter.Value>\r\n            <ControlTemplate TargetType=\"ComboBoxItem\">\r\n               <Grid Background=\"{TemplateBinding Background}\">\r\n                  <VisualStateManager.VisualStateGroups>\r\n                     <VisualStateGroup x:Name=\"CommonStates\">\r\n                        <VisualState x:Name=\"Normal\" />\r\n                        <VisualState x:Name=\"MouseOver\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0:0:0.1\" To=\"1\" Storyboard.TargetProperty=\"Opacity\"\r\n                                    Storyboard.TargetName=\"MouseOverElement\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Disabled\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" To=\"0.35\" Storyboard.TargetProperty=\"Opacity\"\r\n                                    Storyboard.TargetName=\"contentPresenter\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                     </VisualStateGroup>\r\n                     <VisualStateGroup x:Name=\"SelectionStates\">\r\n                        <VisualState x:Name=\"Unselected\" />\r\n                        <VisualState x:Name=\"Selected\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\"\r\n                                    Storyboard.TargetName=\"SelectedElement\" />\r\n                              <DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"Opacity\"\r\n                                    Storyboard.TargetName=\"MouseOverElement\" />\r\n                              <ColorAnimation Duration=\"0\" To=\"White\"\r\n                                    Storyboard.TargetProperty=\"(Control.Foreground).(SolidColorBrush.Color)\"\r\n                                    Storyboard.TargetName=\"contentPresenter\" d:IsOptimized=\"True\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"SelectedUnfocused\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\"\r\n                                    Storyboard.TargetName=\"SelectedElement\" />\r\n                              <DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"Opacity\"\r\n                                    Storyboard.TargetName=\"MouseOverElement\" />\r\n                              <ColorAnimation Duration=\"0\" To=\"White\"\r\n                                    Storyboard.TargetProperty=\"(Control.Foreground).(SolidColorBrush.Color)\"\r\n                                    Storyboard.TargetName=\"contentPresenter\" d:IsOptimized=\"True\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                     </VisualStateGroup>\r\n                     <VisualStateGroup x:Name=\"FocusStates\">\r\n                        <VisualState x:Name=\"Focused\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Unfocused\" />\r\n                     </VisualStateGroup>\r\n                     <VisualStateGroup x:Name=\"LayoutStates\">\r\n                        <VisualState x:Name=\"AfterLoaded\" />\r\n                        <VisualState x:Name=\"BeforeLoaded\" />\r\n                        <VisualState x:Name=\"BeforeUnloaded\" />\r\n                     </VisualStateGroup>\r\n                  </VisualStateManager.VisualStateGroups>\r\n                  <Rectangle x:Name=\"MouseOverElement\" IsHitTestVisible=\"False\" Opacity=\"0\" RadiusX=\"0\" RadiusY=\"0\"\r\n                        Fill=\"{StaticResource MouseOverSelectionBrush}\" />\r\n                  <Rectangle x:Name=\"SelectedElement\" IsHitTestVisible=\"False\" Opacity=\"0\" RadiusX=\"0\" RadiusY=\"1\"\r\n                        Fill=\"{StaticResource InputSelectionBrush}\" />\r\n                  <ContentPresenter x:Name=\"contentPresenter\"\r\n                        HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                        Margin=\"{TemplateBinding Padding}\" />\r\n                  <Rectangle x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Margin=\"2\" Opacity=\"0\" RadiusX=\"1\"\r\n                        RadiusY=\"1\" Stroke=\"{StaticResource FocusVisualBrush}\"\r\n                        StrokeThickness=\"{StaticResource FocusVisualStrokeThickness}\" />\r\n               </Grid>\r\n            </ControlTemplate>\r\n         </Setter.Value>\r\n      </Setter>\r\n   </Style>\r\n\r\n   <Style x:Key=\"ComboBoxButton\" TargetType=\"ToggleButton\">\r\n      <Setter Property=\"Padding\" Value=\"18,6\" />\r\n      <Setter Property=\"TextOptions.TextHintingMode\" Value=\"Animated\" />\r\n      <Setter Property=\"Foreground\" Value=\"{StaticResource ControlForeground}\" />\r\n      <Setter Property=\"Template\">\r\n         <Setter.Value>\r\n            <ControlTemplate TargetType=\"ToggleButton\">\r\n               <Grid x:Name=\"Root\">\r\n                  <VisualStateManager.VisualStateGroups>\r\n                     <VisualStateGroup x:Name=\"CommonStates\">\r\n                        <VisualStateGroup.Transitions>\r\n                           <VisualTransition GeneratedDuration=\"0:0:0.1\" />\r\n                           <VisualTransition To=\"Pressed\" />\r\n                           <VisualTransition From=\"Pressed\" />\r\n                        </VisualStateGroup.Transitions>\r\n                        <VisualState x:Name=\"Normal\" />\r\n                        <VisualState x:Name=\"MouseOver\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"PressedElement\"\r\n                                    Storyboard.TargetProperty=\"(UIElement.Opacity)\" To=\"0\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"MouseOverElement\"\r\n                                    Storyboard.TargetProperty=\"(UIElement.Opacity)\" To=\"1\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Pressed\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"NormalElement\"\r\n                                    Storyboard.TargetProperty=\"(UIElement.Opacity)\" To=\"0.25\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"PressedElement\"\r\n                                    Storyboard.TargetProperty=\"(UIElement.Opacity)\" To=\"1\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"MouseOverElement\"\r\n                                    Storyboard.TargetProperty=\"(UIElement.Opacity)\" To=\"0\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Disabled\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"NormalElement\"\r\n                                    Storyboard.TargetProperty=\"(UIElement.Opacity)\" To=\"0\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"DisabledElement\"\r\n                                    Storyboard.TargetProperty=\"(UIElement.Opacity)\" To=\"1\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"HighlightElement\"\r\n                                    Storyboard.TargetProperty=\"(UIElement.Opacity)\" To=\"0.5\" />\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"ContentHost\"\r\n                                    Storyboard.TargetProperty=\"(UIElement.Opacity)\" To=\"0.75\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                     </VisualStateGroup>\r\n                     <VisualStateGroup x:Name=\"FocusStates\">\r\n                        <VisualState x:Name=\"Focused\" />\r\n                        <VisualState x:Name=\"Unfocused\" />\r\n                     </VisualStateGroup>\r\n                     <VisualStateGroup x:Name=\"CheckStates\">\r\n                        <VisualState x:Name=\"Checked\" />\r\n                        <VisualState x:Name=\"Unchecked\" />\r\n                        <VisualState x:Name=\"Indeterminate\" />\r\n                     </VisualStateGroup>\r\n                  </VisualStateManager.VisualStateGroups>\r\n                  <Border x:Name=\"DisabledElement\" Background=\"{StaticResource DisabledBrush}\" CornerRadius=\"2\"\r\n                        Opacity=\"0\">\r\n                     <Border BorderBrush=\"{StaticResource DisabledBorderBrush}\" BorderThickness=\"0,0,1,1\"\r\n                           CornerRadius=\"2\" />\r\n                  </Border>\r\n                  <Border x:Name=\"NormalElement\" Background=\"{StaticResource ControlBackgroundNormal}\" CornerRadius=\"2\"\r\n                        Effect=\"{StaticResource ControlShadowEffect}\" />\r\n                  <Border x:Name=\"MouseOverElement\" Background=\"{StaticResource ControlBackgroundOver}\" CornerRadius=\"2\"\r\n                        Opacity=\"0\" />\r\n                  <Border x:Name=\"PressedElement\" Background=\"{StaticResource ControlBackgroundPressed}\"\r\n                        CornerRadius=\"2\" Opacity=\"0\" />\r\n                  <Border x:Name=\"HighlightElement\" BorderBrush=\"{StaticResource ControlHighlight}\"\r\n                        BorderThickness=\"1,1,0,0\" CornerRadius=\"2\" />\r\n                  <ContentPresenter x:Name=\"ContentHost\"\r\n                        HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                        Margin=\"{TemplateBinding Padding}\"\r\n                        VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\">\r\n                     <ContentPresenter.Effect>\r\n                        <DropShadowEffect Color=\"{StaticResource ColorForegroundShadowColor}\" Direction=\"-90\"\r\n                              BlurRadius=\"1\" ShadowDepth=\"1\" Opacity=\"0.5\" />\r\n                     </ContentPresenter.Effect>\r\n                  </ContentPresenter>\r\n               </Grid>\r\n            </ControlTemplate>\r\n         </Setter.Value>\r\n      </Setter>\r\n   </Style>\r\n\r\n   <Style TargetType=\"ComboBox\">\r\n      <Setter Property=\"Padding\" Value=\"12,6,25,6\" />\r\n      <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n      <Setter Property=\"KeyboardNavigation.ControlTabNavigation\" Value=\"Once\" />\r\n      <Setter Property=\"Foreground\" Value=\"{StaticResource ControlForeground}\" />\r\n      <Setter Property=\"Template\">\r\n         <Setter.Value>\r\n            <ControlTemplate TargetType=\"ComboBox\">\r\n               <Grid>\r\n                  <VisualStateManager.VisualStateGroups>\r\n                     <VisualStateGroup x:Name=\"CommonStates\">\r\n                        <VisualState x:Name=\"Normal\" />\r\n                        <VisualState x:Name=\"MouseOver\" />\r\n                        <VisualState x:Name=\"Disabled\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Storyboard.TargetName=\"HighlightLine\" Storyboard.TargetProperty=\"Opacity\"\r\n                                    To=\"0\" Duration=\"0\" />\r\n                              <DoubleAnimation Storyboard.TargetName=\"ShadowLine\" Storyboard.TargetProperty=\"Opacity\"\r\n                                    To=\"0\" Duration=\"0\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                     </VisualStateGroup>\r\n                     <VisualStateGroup x:Name=\"FocusStates\">\r\n                        <VisualState x:Name=\"Focused\" />\r\n                        <VisualState x:Name=\"Unfocused\" />\r\n                        <VisualState x:Name=\"FocusedDropDown\">\r\n                           <Storyboard>\r\n                              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\"\r\n                                    Storyboard.TargetName=\"PopupBorder\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                              </ObjectAnimationUsingKeyFrames>\r\n\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                     </VisualStateGroup>\r\n                     <VisualStateGroup x:Name=\"EditStates\">\r\n                        <VisualState x:Name=\"Editable\" />\r\n                        <VisualState x:Name=\"Uneditable\" />\r\n                     </VisualStateGroup>\r\n                     <VisualStateGroup x:Name=\"ValidationStates\">\r\n                        <VisualState x:Name=\"Valid\" />\r\n                        <VisualState x:Name=\"InvalidFocused\" />\r\n                        <VisualState x:Name=\"InvalidUnfocused\" />\r\n                     </VisualStateGroup>\r\n                  </VisualStateManager.VisualStateGroups>\r\n                  <Border x:Name=\"ContentPresenterBorder\">\r\n                     <Grid x:Name=\"MainGrid\">\r\n                        <ToggleButton x:Name=\"DropDownToggle\" Style=\"{StaticResource ComboBoxButton}\"\r\n                              IsChecked=\"{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\"\r\n                              HorizontalAlignment=\"Stretch\" Margin=\"0\" VerticalAlignment=\"Stretch\"\r\n                              HorizontalContentAlignment=\"Right\" Padding=\"3\">\r\n                           <Path x:Name=\"BtnArrow\" Width=\"8\" Height=\"4\" HorizontalAlignment=\"Right\" Margin=\"0,0,6,0\"\r\n                                 Data=\"M0,0 L1,0 0.5,1Z\" Fill=\"#606060\" Stretch=\"Fill\" />\r\n                        </ToggleButton>\r\n                        <Rectangle x:Name=\"HighlightLine\" Width=\"1\" HorizontalAlignment=\"Right\" Margin=\"0,2,26,2\">\r\n                           <Rectangle.Fill>\r\n                              <LinearGradientBrush EndPoint=\"1,1\" StartPoint=\"0,0\">\r\n                                 <GradientStop Color=\"#0FFF\" Offset=\"0\" />\r\n                                 <GradientStop Color=\"#FFFF\" Offset=\"0.3\" />\r\n                                 <GradientStop Color=\"#AFFF\" Offset=\"0.7\" />\r\n                                 <GradientStop Color=\"#0FFF\" Offset=\"1\" />\r\n                              </LinearGradientBrush>\r\n                           </Rectangle.Fill>\r\n                        </Rectangle>\r\n                        <Rectangle x:Name=\"ShadowLine\" Width=\"1\" HorizontalAlignment=\"Right\" Margin=\"0,2,27,2\">\r\n                           <Rectangle.Fill>\r\n                              <LinearGradientBrush EndPoint=\"1,1\" StartPoint=\"0,0\">\r\n                                 <GradientStop Color=\"#0000\" Offset=\"0\" />\r\n                                 <GradientStop Color=\"#3000\" Offset=\"0.3\" />\r\n                                 <GradientStop Color=\"#3000\" Offset=\"0.7\" />\r\n                                 <GradientStop Color=\"#0000\" Offset=\"1\" />\r\n                              </LinearGradientBrush>\r\n                           </Rectangle.Fill>\r\n                        </Rectangle>\r\n                        <ContentPresenter x:Name=\"ContentPresenter\"\r\n                              ContentTemplateSelector=\"{TemplateBinding ItemTemplateSelector}\"\r\n                              Content=\"{TemplateBinding SelectionBoxItem}\"\r\n                              HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                              Margin=\"{TemplateBinding Padding}\"\r\n                              VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\">\r\n                           <ContentPresenter.Effect>\r\n                              <DropShadowEffect Color=\"{StaticResource ColorForegroundShadowColor}\" Direction=\"-90\"\r\n                                    BlurRadius=\"1\" ShadowDepth=\"1\" Opacity=\"0.5\" />\r\n                           </ContentPresenter.Effect>\r\n\r\n                        </ContentPresenter>\r\n                        <Popup x:Name=\"PART_Popup\" Margin=\"0,1,0,0\" HorizontalAlignment=\"Stretch\"\r\n                              MinWidth=\"{Binding ActualWidth, ElementName=MainGrid}\"\r\n                              IsOpen=\"{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}\">\r\n                           <Border x:Name=\"PopupBorder\" Height=\"Auto\" HorizontalAlignment=\"Stretch\"\r\n                                 Background=\"{StaticResource InputBackgroundBrush}\" CornerRadius=\"0,0,4,4\"\r\n                                 Effect=\"{StaticResource ControlShadowEffect}\" Visibility=\"Visible\">\r\n                              <ScrollViewer x:Name=\"ScrollViewer\" BorderThickness=\"0\" Padding=\"0\" Margin=\"0,0,0,4\">\r\n                                 <ItemsPresenter />\r\n\r\n                              </ScrollViewer>\r\n                           </Border>\r\n                        </Popup>\r\n                     </Grid>\r\n                  </Border>\r\n\r\n               </Grid>\r\n            </ControlTemplate>\r\n         </Setter.Value>\r\n      </Setter>\r\n   </Style>\r\n\r\n   <!-- \r\n    ***************************************************************************\r\n    Slider\r\n    ***************************************************************************\r\n    -->\r\n\r\n   <Style x:Key=\"HorizontalSliderThumb\" TargetType=\"Thumb\">\r\n      <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n      <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n      <Setter Property=\"Template\">\r\n         <Setter.Value>\r\n            <ControlTemplate TargetType=\"Thumb\">\r\n               <Grid>\r\n                  <Path x:Name=\"ThumbElement\"\r\n                        Data=\"M-0.40,4.15C-0.40,3.60 0.37,2.89 0.92,2.89L8.07,2.89C8.62,2.89 9.40,3.60 9.40,4.15L9.40,11.06C 9.40,11.61 4.40,15.5 4.40,15.5C4.40,15.5 -0.40,11.61 -0.40,11.06z\"\r\n                        Stretch=\"Fill\" StrokeThickness=\"0\" UseLayoutRounding=\"False\">\r\n                     <Path.Stroke>\r\n                        <LinearGradientBrush StartPoint=\"0,0\" EndPoint=\"1,1\">\r\n                           <GradientStop Offset=\"0\" Color=\"#FFFDFDFD\" />\r\n                           <GradientStop Offset=\"1\" Color=\"#FF868788\" />\r\n                        </LinearGradientBrush>\r\n                     </Path.Stroke>\r\n                     <Path.Fill>\r\n                        <LinearGradientBrush StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n                           <GradientStop Offset=\"0\" Color=\"#FFFDFDFD\" />\r\n                           <GradientStop Offset=\"1\" Color=\"#FF9D9D9E\" />\r\n                        </LinearGradientBrush>\r\n                     </Path.Fill>\r\n                     <Path.Effect>\r\n                        <DropShadowEffect BlurRadius=\"4\" Opacity=\"0.5\" ShadowDepth=\"1\" />\r\n                     </Path.Effect>\r\n                  </Path>\r\n                  <Border Margin=\"0,0,0,4\" BorderBrush=\"{StaticResource ControlHighlight}\" BorderThickness=\"1,1,0,0\"\r\n                        CornerRadius=\"3\" />\r\n               </Grid>\r\n            </ControlTemplate>\r\n         </Setter.Value>\r\n      </Setter>\r\n   </Style>\r\n   <Style x:Key=\"VerticalSliderThumb\" TargetType=\"Thumb\">\r\n      <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n      <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n      <Setter Property=\"Template\">\r\n         <Setter.Value>\r\n            <ControlTemplate TargetType=\"Thumb\">\r\n               <Grid Height=\"12\" Width=\"16\">\r\n                  <Path\r\n                        Data=\"M1.6027589,0 L10.366944,0 C11.068047,0 16,6.1111116 16,6.1111116 C16,6.1111116 11.068047,12 10.366944,12 L1.6027589,12 C0.90168238,12 0,11.043701 0,10.368687 L0,1.6313124 C0,0.9562912 0.90168238,0 1.6027589,0 z\"\r\n                        Stretch=\"Fill\" StrokeThickness=\"0\" UseLayoutRounding=\"False\">\r\n                     <Path.Effect>\r\n                        <DropShadowEffect BlurRadius=\"4\" Opacity=\"0.5\" ShadowDepth=\"1\" />\r\n                     </Path.Effect>\r\n                     <Path.Fill>\r\n                        <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                           <GradientStop Color=\"#FFFDFDFD\" Offset=\"0\" />\r\n                           <GradientStop Color=\"#FF9D9D9E\" Offset=\"1\" />\r\n                        </LinearGradientBrush>\r\n                     </Path.Fill>\r\n                     <Path.Stroke>\r\n                        <LinearGradientBrush EndPoint=\"1,1\" StartPoint=\"0,0\">\r\n                           <GradientStop Color=\"#FFFDFDFD\" Offset=\"0\" />\r\n                           <GradientStop Color=\"#FF868788\" Offset=\"1\" />\r\n                        </LinearGradientBrush>\r\n                     </Path.Stroke>\r\n                  </Path>\r\n                  <Border BorderBrush=\"{StaticResource ControlHighlight}\" BorderThickness=\"1,1,0,0\" CornerRadius=\"3\"\r\n                        Margin=\"0,0,4,0\" />\r\n               </Grid>\r\n            </ControlTemplate>\r\n         </Setter.Value>\r\n      </Setter>\r\n   </Style>\r\n   <ControlTemplate x:Key=\"SliderRepeatButtonTemplate\" TargetType=\"{x:Type RepeatButton}\">\r\n      <Grid x:Name=\"Root\" Background=\"Transparent\" Opacity=\"0\" />\r\n   </ControlTemplate>\r\n\r\n   <ControlTemplate x:Key=\"RepeatButtonHorizontalValueTemplate\" TargetType=\"{x:Type RepeatButton}\">\r\n      <Border x:Name=\"HorizontalValueElement\" BorderThickness=\"1\" CornerRadius=\"2\" Height=\"8\" Margin=\"0,3,-8,0\"\r\n            VerticalAlignment=\"Top\">\r\n         <Border.BorderBrush>\r\n            <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n               <GradientStop Color=\"#FF38383C\" Offset=\"0\" />\r\n               <GradientStop Color=\"#FF424247\" Offset=\"1\" />\r\n            </LinearGradientBrush>\r\n         </Border.BorderBrush>\r\n         <Border BorderThickness=\"1\" CornerRadius=\"1\">\r\n            <Border.BorderBrush>\r\n               <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                  <GradientStop Color=\"#FFF1F1F1\" Offset=\"0\" />\r\n                  <GradientStop Color=\"#FF969696\" Offset=\"1\" />\r\n               </LinearGradientBrush>\r\n            </Border.BorderBrush>\r\n            <Border.Background>\r\n               <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                  <GradientStop Color=\"#FFCCCCCC\" Offset=\"0\" />\r\n                  <GradientStop Color=\"#FF9F9F9F\" Offset=\"1\" />\r\n               </LinearGradientBrush>\r\n            </Border.Background>\r\n         </Border>\r\n      </Border>\r\n   </ControlTemplate>\r\n   <ControlTemplate x:Key=\"RepeatButtonVerticalValueTemplate\" TargetType=\"{x:Type RepeatButton}\">\r\n      <Border x:Name=\"HorizontalValueElement\" BorderThickness=\"1\" CornerRadius=\"2\" Width=\"8\" Height=\"Auto\"\r\n            Margin=\"0,-8,3,0\" VerticalAlignment=\"Stretch\">\r\n         <Border.BorderBrush>\r\n            <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n               <GradientStop Color=\"#FF38383C\" Offset=\"0\" />\r\n               <GradientStop Color=\"#FF424247\" Offset=\"1\" />\r\n            </LinearGradientBrush>\r\n         </Border.BorderBrush>\r\n         <Border BorderThickness=\"1\" CornerRadius=\"1\">\r\n            <Border.BorderBrush>\r\n               <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                  <GradientStop Color=\"#FFF1F1F1\" Offset=\"0\" />\r\n                  <GradientStop Color=\"#FF969696\" Offset=\"1\" />\r\n               </LinearGradientBrush>\r\n            </Border.BorderBrush>\r\n            <Border.Background>\r\n               <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                  <GradientStop Color=\"#FFCCCCCC\" Offset=\"0\" />\r\n                  <GradientStop Color=\"#FF9F9F9F\" Offset=\"1\" />\r\n               </LinearGradientBrush>\r\n            </Border.Background>\r\n         </Border>\r\n      </Border>\r\n   </ControlTemplate>\r\n   <Style TargetType=\"Slider\">\r\n      <Setter Property=\"Background\" Value=\"{StaticResource ControlBackgroundAltBrush}\" />\r\n      <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n      <Setter Property=\"Maximum\" Value=\"10\" />\r\n      <Setter Property=\"Minimum\" Value=\"0\" />\r\n      <Setter Property=\"Value\" Value=\"0\" />\r\n      <Setter Property=\"BorderBrush\" Value=\"{StaticResource ControlBorderBrush}\" />\r\n      <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n      <Setter Property=\"Template\">\r\n         <Setter.Value>\r\n            <ControlTemplate TargetType=\"Slider\">\r\n               <Grid x:Name=\"Root\">\r\n\r\n                  <VisualStateManager.VisualStateGroups>\r\n                     <VisualStateGroup x:Name=\"CommonStates\">\r\n                        <VisualState x:Name=\"Normal\" />\r\n                        <VisualState x:Name=\"MouseOver\" />\r\n                        <VisualState x:Name=\"Disabled\">\r\n                           <Storyboard>\r\n                              <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Visibility\"\r\n                                    Storyboard.TargetName=\"HorizontalTrackRectangleDisabledOverlay\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                              <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Visibility\"\r\n                                    Storyboard.TargetName=\"VerticalTrackRectangleDisabledOverlay\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                     </VisualStateGroup>\r\n                     <VisualStateGroup x:Name=\"FocusStates\">\r\n                        <VisualState x:Name=\"Focused\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Unfocused\" />\r\n                     </VisualStateGroup>\r\n                  </VisualStateManager.VisualStateGroups>\r\n                  <Grid x:Name=\"HorizontalTemplate\">\r\n                     <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"Auto\" />\r\n                        <ColumnDefinition Width=\"Auto\" />\r\n                        <ColumnDefinition Width=\"*\" />\r\n                     </Grid.ColumnDefinitions>\r\n\r\n                     <Grid Grid.ColumnSpan=\"3\" Height=\"8\" Margin=\"0,3,0,0\" VerticalAlignment=\"Top\">\r\n                        <Border x:Name=\"Border\" BorderBrush=\"#D0505050\" BorderThickness=\"1\" CornerRadius=\"2\" Opacity=\"1\">\r\n                           <Border.Background>\r\n                              <LinearGradientBrush StartPoint=\"0,0\" EndPoint=\"0,1\">\r\n                                 <GradientStop Color=\"#57575c\" Offset=\"0.3\" />\r\n                                 <GradientStop Color=\"#505054\" Offset=\"1.0\" />\r\n                              </LinearGradientBrush>\r\n                           </Border.Background>\r\n                        </Border>\r\n                        <Border x:Name=\"DarkEdge\" BorderBrush=\"{StaticResource ControlDarkEdge}\"\r\n                              BorderThickness=\"1,1,0,0\" CornerRadius=\"2\" Margin=\"0\" />\r\n                        <Border x:Name=\"OuterHighlight\" BorderBrush=\"{StaticResource ControlOuterHighlightBrush}\"\r\n                              BorderThickness=\"0,0,1,1\" CornerRadius=\"2\" Margin=\"0,0,-1,-1\" />\r\n                        <Border x:Name=\"InnerShadowDark\" BorderBrush=\"#50303030\" BorderThickness=\"1,1,0,0\"\r\n                              CornerRadius=\"1\" Margin=\"1\" />\r\n                        <Border x:Name=\"InnerShadowLight\" BorderBrush=\"#20303030\" BorderThickness=\"1,1,0,0\"\r\n                              CornerRadius=\"1\" Margin=\"2\" />\r\n                     </Grid>\r\n                     <Border x:Name=\"HorizontalValueElement\" BorderThickness=\"1\" CornerRadius=\"2\" Grid.ColumnSpan=\"2\"\r\n                           Height=\"8\" Margin=\"0,3,4,0\" VerticalAlignment=\"Top\">\r\n                        <Border.BorderBrush>\r\n                           <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                              <GradientStop Color=\"#FF38383C\" Offset=\"0\" />\r\n                              <GradientStop Color=\"#FF424247\" Offset=\"1\" />\r\n                           </LinearGradientBrush>\r\n                        </Border.BorderBrush>\r\n                        <Border BorderThickness=\"1\" CornerRadius=\"1\">\r\n                           <Border.BorderBrush>\r\n                              <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                 <GradientStop Color=\"#FFF1F1F1\" Offset=\"0\" />\r\n                                 <GradientStop Color=\"#FF969696\" Offset=\"1\" />\r\n                              </LinearGradientBrush>\r\n                           </Border.BorderBrush>\r\n                           <Border.Background>\r\n                              <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                 <GradientStop Color=\"#FFCCCCCC\" Offset=\"0\" />\r\n                                 <GradientStop Color=\"#FF9F9F9F\" Offset=\"1\" />\r\n                              </LinearGradientBrush>\r\n                           </Border.Background>\r\n                        </Border>\r\n                     </Border>\r\n                     <Rectangle x:Name=\"HorizontalTrackRectangleDisabledOverlay\" Grid.Column=\"0\" Grid.ColumnSpan=\"3\"\r\n                           Fill=\"{StaticResource DisabledBrush}\" Height=\"10\" Margin=\"0,3,0,0\" Opacity=\".55\" RadiusX=\"2\"\r\n                           RadiusY=\"2\" VerticalAlignment=\"Top\" Visibility=\"Collapsed\" />\r\n                     <Track x:Name=\"PART_Track\" Grid.Row=\"0\" Grid.ColumnSpan=\"3\">\r\n                        <Track.DecreaseRepeatButton>\r\n\r\n                           <RepeatButton x:Name=\"HorizontalTrackLargeChangeDecreaseRepeatButton\" Height=\"18\"\r\n                                 IsTabStop=\"False\" Template=\"{DynamicResource RepeatButtonHorizontalValueTemplate}\" />\r\n                        </Track.DecreaseRepeatButton>\r\n                        <Track.IncreaseRepeatButton>\r\n\r\n                           <RepeatButton x:Name=\"HorizontalTrackLargeChangeIncreaseRepeatButton\" Height=\"18\"\r\n                                 IsTabStop=\"False\" Template=\"{DynamicResource SliderRepeatButtonTemplate}\" />\r\n                        </Track.IncreaseRepeatButton>\r\n                        <Track.Thumb>\r\n                           <Thumb x:Name=\"HorizontalThumb\" Height=\"16\" IsTabStop=\"True\"\r\n                                 Style=\"{StaticResource HorizontalSliderThumb}\" Width=\"12\" VerticalAlignment=\"Top\" />\r\n\r\n                        </Track.Thumb>\r\n                     </Track>\r\n\r\n                  </Grid>\r\n\r\n                  <Rectangle x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Margin=\"-2\" Opacity=\"0\" RadiusX=\"2\"\r\n                        RadiusY=\"2\" Stroke=\"{StaticResource FocusVisualBrush}\"\r\n                        StrokeThickness=\"{StaticResource FocusVisualStrokeThickness}\" />\r\n               </Grid>\r\n            </ControlTemplate>\r\n         </Setter.Value>\r\n\r\n      </Setter>\r\n      <Style.Triggers>\r\n         <Trigger Property=\"Orientation\" Value=\"Vertical\">\r\n            <Setter Property=\"Template\">\r\n               <Setter.Value>\r\n                  <ControlTemplate TargetType=\"{x:Type Slider}\">\r\n                     <Grid x:Name=\"VerticalTemplate\">\r\n                        <Grid.RowDefinitions>\r\n                           <RowDefinition Height=\"*\" />\r\n                           <RowDefinition Height=\"Auto\" />\r\n                           <RowDefinition Height=\"Auto\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Grid Grid.RowSpan=\"3\" Width=\"8\" Margin=\"3,0,0,0\" HorizontalAlignment=\"Left\">\r\n                           <Border x:Name=\"VertBorder\" BorderBrush=\"#D0505050\" BorderThickness=\"1\" CornerRadius=\"2\"\r\n                                 Opacity=\"1\">\r\n                              <Border.Background>\r\n                                 <LinearGradientBrush StartPoint=\"0,0\" EndPoint=\"0,1\">\r\n                                    <GradientStop Color=\"#57575c\" Offset=\"0.3\" />\r\n                                    <GradientStop Color=\"#505054\" Offset=\"1.0\" />\r\n                                 </LinearGradientBrush>\r\n                              </Border.Background>\r\n                           </Border>\r\n                           <Border x:Name=\"VertDarkEdge\" BorderBrush=\"{StaticResource ControlDarkEdge}\"\r\n                                 BorderThickness=\"1,1,0,0\" CornerRadius=\"2\" Margin=\"0\" />\r\n                           <Border x:Name=\"VertOuterHighlight\" BorderBrush=\"{StaticResource ControlOuterHighlightBrush}\"\r\n                                 BorderThickness=\"0,0,1,1\" CornerRadius=\"2\" Margin=\"0,0,-1,-1\" />\r\n                           <Border x:Name=\"VertInnerShadowDark\" BorderBrush=\"#50303030\" BorderThickness=\"1,1,0,0\"\r\n                                 CornerRadius=\"1\" Margin=\"1\" />\r\n                           <Border x:Name=\"VertInnerShadowLight\" BorderBrush=\"#20303030\" BorderThickness=\"1,1,0,0\"\r\n                                 CornerRadius=\"1\" Margin=\"2\" />\r\n                        </Grid>\r\n\r\n                        <Track x:Name=\"PART_Track\" Grid.Row=\"0\" Grid.RowSpan=\"3\">\r\n                           <Track.DecreaseRepeatButton>\r\n\r\n                              <RepeatButton x:Name=\"VerticalTrackLargeChangeDecreaseRepeatButton\" Width=\"18\"\r\n                                    IsTabStop=\"False\" Template=\"{DynamicResource RepeatButtonVerticalValueTemplate}\" />\r\n                           </Track.DecreaseRepeatButton>\r\n                           <Track.IncreaseRepeatButton>\r\n\r\n                              <RepeatButton x:Name=\"VerticalTrackLargeChangeIncreaseRepeatButton\" Width=\"18\"\r\n                                    IsTabStop=\"False\" Template=\"{DynamicResource SliderRepeatButtonTemplate}\" />\r\n                           </Track.IncreaseRepeatButton>\r\n                           <Track.Thumb>\r\n                              <Thumb x:Name=\"VerticalSliderThumb\" Width=\"16\" IsTabStop=\"True\"\r\n                                    Style=\"{StaticResource VerticalSliderThumb}\" Height=\"12\" VerticalAlignment=\"Top\" />\r\n\r\n                           </Track.Thumb>\r\n                        </Track>\r\n\r\n                     </Grid>\r\n                  </ControlTemplate>\r\n               </Setter.Value>\r\n            </Setter>\r\n         </Trigger>\r\n      </Style.Triggers>\r\n   </Style>\r\n\r\n   <!-- \r\n    ***************************************************************************\r\n    ScrollBar\r\n    ***************************************************************************\r\n    -->\r\n\r\n   <ControlTemplate x:Key=\"HorizontalThumbTemplate\" TargetType=\"Thumb\">\r\n      <Grid>\r\n         <VisualStateManager.VisualStateGroups>\r\n            <VisualStateGroup x:Name=\"CommonStates\">\r\n               <VisualStateGroup.Transitions>\r\n                  <VisualTransition GeneratedDuration=\"0:0:0.1\" />\r\n               </VisualStateGroup.Transitions>\r\n               <VisualState x:Name=\"Normal\" />\r\n               <VisualState x:Name=\"MouseOver\">\r\n                  <Storyboard>\r\n                     <DoubleAnimation Duration=\"0:0:0\" Storyboard.TargetName=\"Background\"\r\n                           Storyboard.TargetProperty=\"Opacity\" To=\"1.0\" />\r\n                  </Storyboard>\r\n               </VisualState>\r\n               <VisualState x:Name=\"Disabled\">\r\n                  <Storyboard>\r\n                     <DoubleAnimation Duration=\"0:0:0\" Storyboard.TargetName=\"Background\"\r\n                           Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                  </Storyboard>\r\n               </VisualState>\r\n            </VisualStateGroup>\r\n         </VisualStateManager.VisualStateGroups>\r\n         <Border x:Name=\"Background\" Opacity=\"0.5\" Margin=\"1\" CornerRadius=\"1,4,2,2\" BorderBrush=\"White\"\r\n               BorderThickness=\"1,1,0,0\">\r\n            <Border.Effect>\r\n               <DropShadowEffect ShadowDepth=\"0\" Opacity=\"0.3\" BlurRadius=\"4\" />\r\n            </Border.Effect>\r\n            <Border.Background>\r\n               <LinearGradientBrush StartPoint=\"0,0\" EndPoint=\"0,1\">\r\n                  <GradientStop Color=\"#f8f8f8\" Offset=\"0.1\" />\r\n                  <GradientStop Color=\"#c0c0c0\" Offset=\"1.0\" />\r\n               </LinearGradientBrush>\r\n            </Border.Background>\r\n            <Border CornerRadius=\"0,2,2,2\" BorderBrush=\"#40000000\" BorderThickness=\"0,0,1,1\" Margin=\"-1,-1,0,0\" />\r\n         </Border>\r\n      </Grid>\r\n   </ControlTemplate>\r\n   <ControlTemplate x:Key=\"LargeChangeButton\" TargetType=\"RepeatButton\">\r\n      <Grid x:Name=\"Root\" Background=\"Transparent\">\r\n         <VisualStateManager.VisualStateGroups>\r\n            <VisualStateGroup x:Name=\"CommonStates\">\r\n               <VisualState x:Name=\"Normal\" />\r\n            </VisualStateGroup>\r\n         </VisualStateManager.VisualStateGroups>\r\n      </Grid>\r\n   </ControlTemplate>\r\n   <ControlTemplate x:Key=\"SmallChangeButton\" TargetType=\"RepeatButton\">\r\n      <Grid x:Name=\"Root\">\r\n         <VisualStateManager.VisualStateGroups>\r\n            <VisualStateGroup x:Name=\"CommonStates\">\r\n               <VisualStateGroup.Transitions>\r\n                  <VisualTransition GeneratedDuration=\"0:0:0.1\" />\r\n               </VisualStateGroup.Transitions>\r\n               <VisualState x:Name=\"Normal\" />\r\n               <VisualState x:Name=\"MouseOver\">\r\n                  <Storyboard>\r\n                     <ColorAnimation Storyboard.TargetName=\"Background\"\r\n                           Storyboard.TargetProperty=\"(Border.Background).(SolidColorBrush.Color)\" To=\"#2000\" />\r\n                  </Storyboard>\r\n               </VisualState>\r\n               <VisualState x:Name=\"Pressed\">\r\n                  <Storyboard>\r\n                     <ColorAnimation Storyboard.TargetName=\"Background\"\r\n                           Storyboard.TargetProperty=\"(Border.Background).(SolidColorBrush.Color)\" To=\"#4000\" />\r\n                  </Storyboard>\r\n               </VisualState>\r\n               <VisualState x:Name=\"Disabled\">\r\n                  <Storyboard>\r\n                     <DoubleAnimation Duration=\"0:0:0\" Storyboard.TargetName=\"Background\"\r\n                           Storyboard.TargetProperty=\"Opacity\" To=\".7\" />\r\n                  </Storyboard>\r\n               </VisualState>\r\n            </VisualStateGroup>\r\n         </VisualStateManager.VisualStateGroups>\r\n         <Border x:Name=\"Background\" Background=\"#0000\">\r\n            <ContentPresenter HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" />\r\n         </Border>\r\n      </Grid>\r\n   </ControlTemplate>\r\n\r\n   <ControlTemplate x:Key=\"VerticalThumbTemplate\" TargetType=\"Thumb\">\r\n      <Grid>\r\n         <VisualStateManager.VisualStateGroups>\r\n            <VisualStateGroup x:Name=\"CommonStates\">\r\n               <VisualStateGroup.Transitions>\r\n                  <VisualTransition GeneratedDuration=\"0:0:0.1\" />\r\n               </VisualStateGroup.Transitions>\r\n               <VisualState x:Name=\"Normal\" />\r\n               <VisualState x:Name=\"MouseOver\">\r\n                  <Storyboard>\r\n                     <DoubleAnimation Duration=\"0:0:0\" Storyboard.TargetName=\"Background\"\r\n                           Storyboard.TargetProperty=\"Opacity\" To=\"1.0\" />\r\n                  </Storyboard>\r\n               </VisualState>\r\n               <VisualState x:Name=\"Disabled\">\r\n                  <Storyboard>\r\n                     <DoubleAnimation Duration=\"0:0:0\" Storyboard.TargetName=\"Background\"\r\n                           Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                  </Storyboard>\r\n               </VisualState>\r\n            </VisualStateGroup>\r\n         </VisualStateManager.VisualStateGroups>\r\n         <Border x:Name=\"Background\" Margin=\"1\" Opacity=\"0.5\" CornerRadius=\"1,4,2,2\" BorderBrush=\"White\"\r\n               BorderThickness=\"1,1,0,0\">\r\n            <Border.Effect>\r\n               <DropShadowEffect ShadowDepth=\"0\" Opacity=\"0.3\" BlurRadius=\"4\" />\r\n            </Border.Effect>\r\n            <Border.Background>\r\n               <LinearGradientBrush StartPoint=\"0,0\" EndPoint=\"1,0\">\r\n                  <GradientStop Color=\"#f8f8f8\" Offset=\"0.1\" />\r\n                  <GradientStop Color=\"#c0c0c0\" Offset=\"1.0\" />\r\n               </LinearGradientBrush>\r\n            </Border.Background>\r\n            <Border CornerRadius=\"0,2,2,2\" BorderBrush=\"#40000000\" BorderThickness=\"0,0,1,1\" Margin=\"-1,-1,0,0\" />\r\n         </Border>\r\n      </Grid>\r\n   </ControlTemplate>\r\n\r\n   <Style TargetType=\"{x:Type ScrollBar}\">\r\n      <Setter Property=\"Background\" Value=\"{StaticResource ScrollBackgroundBrush}\" />\r\n      <Setter Property=\"Stylus.IsPressAndHoldEnabled\" Value=\"false\" />\r\n      <Setter Property=\"Stylus.IsFlicksEnabled\" Value=\"false\" />\r\n      <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}\" />\r\n      <Setter Property=\"Width\" Value=\"{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}\" />\r\n      <Setter Property=\"MinWidth\" Value=\"{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}\" />\r\n      <Setter Property=\"Template\">\r\n         <Setter.Value>\r\n            <ControlTemplate TargetType=\"{x:Type ScrollBar}\">\r\n               <Grid x:Name=\"Bg\" Background=\"{TemplateBinding Background}\" SnapsToDevicePixels=\"true\">\r\n\r\n                  <Grid.RowDefinitions>\r\n                     <RowDefinition\r\n                           MaxHeight=\"{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}\" />\r\n                     <RowDefinition Height=\"0.00001*\" />\r\n                     <RowDefinition\r\n                           MaxHeight=\"{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}\" />\r\n                  </Grid.RowDefinitions>\r\n                  <RepeatButton Command=\"{x:Static ScrollBar.LineUpCommand}\" IsEnabled=\"{TemplateBinding IsMouseOver}\"\r\n                        Template=\"{StaticResource SmallChangeButton}\">\r\n                     <Path Width=\"7\" Height=\"4\" Data=\"M0,1 L1,1 0.5,0Z\" Fill=\"#606060\" Stretch=\"Fill\" />\r\n                  </RepeatButton>\r\n                  <Track x:Name=\"PART_Track\" IsDirectionReversed=\"true\" Grid.Row=\"1\">\r\n                     <Track.DecreaseRepeatButton>\r\n                        <RepeatButton Command=\"{x:Static ScrollBar.PageUpCommand}\"\r\n                              Template=\"{StaticResource LargeChangeButton}\" />\r\n                     </Track.DecreaseRepeatButton>\r\n                     <Track.IncreaseRepeatButton>\r\n                        <RepeatButton Command=\"{x:Static ScrollBar.PageDownCommand}\"\r\n                              Template=\"{StaticResource LargeChangeButton}\" />\r\n                     </Track.IncreaseRepeatButton>\r\n                     <Track.Thumb>\r\n                        <Thumb Template=\"{StaticResource VerticalThumbTemplate}\" />\r\n                     </Track.Thumb>\r\n                  </Track>\r\n                  <RepeatButton Command=\"{x:Static ScrollBar.LineDownCommand}\" IsEnabled=\"{TemplateBinding IsMouseOver}\"\r\n                        Grid.Row=\"2\" Template=\"{StaticResource SmallChangeButton}\">\r\n                     <Path Width=\"7\" Height=\"4\" Data=\"M0,0 L1,0 0.5,1Z\" Fill=\"#606060\" Stretch=\"Fill\" />\r\n                  </RepeatButton>\r\n               </Grid>\r\n               <ControlTemplate.Triggers>\r\n                  <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                     <Setter Property=\"Background\" TargetName=\"Bg\" Value=\"{StaticResource ScrollBarDisabledBackground}\" />\r\n                  </Trigger>\r\n               </ControlTemplate.Triggers>\r\n            </ControlTemplate>\r\n         </Setter.Value>\r\n      </Setter>\r\n      <Style.Triggers>\r\n         <Trigger Property=\"Orientation\" Value=\"Horizontal\">\r\n            <Setter Property=\"Width\" Value=\"Auto\" />\r\n            <Setter Property=\"MinWidth\" Value=\"0\" />\r\n            <Setter Property=\"Height\" Value=\"{DynamicResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}}\" />\r\n            <Setter Property=\"MinHeight\"\r\n                  Value=\"{DynamicResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}}\" />\r\n\r\n            <Setter Property=\"Template\">\r\n               <Setter.Value>\r\n                  <ControlTemplate TargetType=\"{x:Type ScrollBar}\">\r\n                     <Grid x:Name=\"Bg2\" Background=\"{TemplateBinding Background}\" SnapsToDevicePixels=\"true\">\r\n\r\n                        <Grid.ColumnDefinitions>\r\n                           <ColumnDefinition\r\n                                 MaxWidth=\"{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}\" />\r\n                           <ColumnDefinition Width=\"0.00001*\" />\r\n                           <ColumnDefinition\r\n                                 MaxWidth=\"{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}\" />\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <RepeatButton Command=\"{x:Static ScrollBar.LineLeftCommand}\"\r\n                              IsEnabled=\"{TemplateBinding IsMouseOver}\" Template=\"{StaticResource SmallChangeButton}\">\r\n                           <Path Width=\"4\" Height=\"7\" Data=\"M0,0.5 L1,1 1,0Z\" Fill=\"#404040\" Stretch=\"Fill\"\r\n                                 HorizontalAlignment=\"Left\" />\r\n                        </RepeatButton>\r\n                        <Track x:Name=\"PART_Track\" Grid.Column=\"1\">\r\n                           <Track.DecreaseRepeatButton>\r\n                              <RepeatButton Command=\"{x:Static ScrollBar.PageLeftCommand}\"\r\n                                    Template=\"{StaticResource LargeChangeButton}\" />\r\n                           </Track.DecreaseRepeatButton>\r\n                           <Track.IncreaseRepeatButton>\r\n                              <RepeatButton Command=\"{x:Static ScrollBar.PageRightCommand}\"\r\n                                    Template=\"{StaticResource LargeChangeButton}\" />\r\n                           </Track.IncreaseRepeatButton>\r\n                           <Track.Thumb>\r\n                              <Thumb Template=\"{StaticResource HorizontalThumbTemplate}\" />\r\n                           </Track.Thumb>\r\n                        </Track>\r\n                        <RepeatButton Grid.Column=\"2\" Command=\"{x:Static ScrollBar.LineRightCommand}\"\r\n                              IsEnabled=\"{TemplateBinding IsMouseOver}\" Template=\"{StaticResource SmallChangeButton}\">\r\n                           <Path Width=\"4\" Height=\"7\" Data=\"M0,0 L1,0.5 0,1Z\" Fill=\"#606060\" Stretch=\"Fill\" />\r\n                        </RepeatButton>\r\n                     </Grid>\r\n                     <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                           <Setter Property=\"Background\" TargetName=\"Bg2\"\r\n                                 Value=\"{DynamicResource ScrollBarDisabledBackground}\" />\r\n                        </Trigger>\r\n                     </ControlTemplate.Triggers>\r\n                  </ControlTemplate>\r\n               </Setter.Value>\r\n            </Setter>\r\n         </Trigger>\r\n      </Style.Triggers>\r\n   </Style>\r\n\r\n   <!-- \r\n    ***************************************************************************\r\n    ScrollViewer\r\n    ***************************************************************************\r\n    -->\r\n\r\n   <Style TargetType=\"ScrollViewer\">\r\n      <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n      <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n      <!--<Setter Property=\"HorizontalScrollBarVisibility\" Value=\"Auto\" />-->\r\n      <!--<Setter Property=\"VerticalScrollBarVisibility\" Value=\"Auto\" />-->\r\n      <Setter Property=\"Padding\" Value=\"0\" />\r\n      <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n      <Setter Property=\"BorderBrush\" Value=\"#80404040\" />\r\n      <Setter Property=\"Template\">\r\n         <Setter.Value>\r\n            <ControlTemplate TargetType=\"ScrollViewer\">\r\n               <Border Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                     BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2.5\">\r\n                  <Grid>\r\n                     <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"*\" />\r\n                        <RowDefinition Height=\"Auto\" />\r\n                     </Grid.RowDefinitions>\r\n                     <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"*\" />\r\n                        <ColumnDefinition Width=\"Auto\" />\r\n                     </Grid.ColumnDefinitions>\r\n                     <Border Grid.Column=\"1\" Grid.Row=\"1\" Background=\"Transparent\" CornerRadius=\"0,0,2.5,0\"\r\n                           Margin=\"0,-5,0,0\" />\r\n                     <ScrollContentPresenter x:Name=\"PART_ScrollContentPresenter\"     CanHorizontallyScroll=\"False\"\r\n                           CanVerticallyScroll=\"False\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                           Content=\"{TemplateBinding Content}\" Margin=\"{TemplateBinding Padding}\"/>\r\n                   \r\n\r\n                     <Border Grid.Column=\"1\" Grid.Row=\"1\" Background=\"{StaticResource ScrollBackgroundBrush}\"\r\n                           CornerRadius=\"0,0,2.5,0\" />\r\n                     <ScrollBar x:Name=\"PART_VerticalScrollBar\" Width=\"18\" Grid.Column=\"1\" Grid.Row=\"0\"\r\n                           IsTabStop=\"False\" Maximum=\"{TemplateBinding ScrollableHeight}\" Minimum=\"0\"\r\n                           Orientation=\"Vertical\" Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\"\r\n                           Value=\"{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\"\r\n                           ViewportSize=\"{TemplateBinding ViewportHeight}\" />\r\n                     <ScrollBar x:Name=\"PART_HorizontalScrollBar\" Height=\"18\" Grid.Column=\"0\" Grid.Row=\"1\"\r\n                           IsTabStop=\"False\" Maximum=\"{TemplateBinding ScrollableWidth}\" Minimum=\"0\"\r\n                           Orientation=\"Horizontal\" Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\"\r\n                           Value=\"{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\"\r\n                           ViewportSize=\"{TemplateBinding ViewportWidth}\" />\r\n                  </Grid>\r\n               </Border>\r\n            </ControlTemplate>\r\n         </Setter.Value>\r\n      </Setter>\r\n   </Style>\r\n\r\n   <!-- \r\n    ***************************************************************************\r\n    DarkTextBox\r\n    ***************************************************************************\r\n    -->\r\n\r\n   <Style x:Key=\"DarkTextBox\" TargetType=\"TextBox\">\r\n      <Setter Property=\"Background\" Value=\"{StaticResource DarkControlBackgroundBrush}\" />\r\n      <Setter Property=\"BorderBrush\" Value=\"{StaticResource DarkControlBorderBrush}\" />\r\n      <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n      <Setter Property=\"Foreground\" Value=\"White\" />\r\n      <Setter Property=\"Padding\" Value=\"5,4,5,4\" />\r\n      <Setter Property=\"SelectionBrush\" Value=\"{StaticResource InputSelectionBrush}\" />\r\n      <!--<Setter Property=\"SelectionBackground\" Value=\"{StaticResource InputSelectionBrush}\" />\r\n        <Setter Property=\"SelectionForeground\" Value=\"{StaticResource DarkControlForegroundBrush}\" />-->\r\n      <Setter Property=\"Template\">\r\n         <Setter.Value>\r\n            <ControlTemplate TargetType=\"TextBox\">\r\n               <Grid x:Name=\"RootElement\">\r\n                  <VisualStateManager.VisualStateGroups>\r\n                     <VisualStateGroup x:Name=\"CommonStates\">\r\n                        <VisualState x:Name=\"Normal\" />\r\n                        <VisualState x:Name=\"MouseOver\" />\r\n                        <VisualState x:Name=\"Disabled\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" To=\"0.55\" Storyboard.TargetProperty=\"Opacity\"\r\n                                    Storyboard.TargetName=\"DisabledVisualElement\" />\r\n                              <DoubleAnimation Duration=\"0\" To=\"0.5\" Storyboard.TargetProperty=\"(UIElement.Opacity)\"\r\n                                    Storyboard.TargetName=\"PART_ContentHost\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"ReadOnly\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" To=\"0.55\" Storyboard.TargetProperty=\"Opacity\"\r\n                                    Storyboard.TargetName=\"ReadOnlyVisualElement\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                     </VisualStateGroup>\r\n                     <VisualStateGroup x:Name=\"FocusStates\">\r\n                        <VisualState x:Name=\"Focused\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Unfocused\" />\r\n                     </VisualStateGroup>\r\n                     <VisualStateGroup x:Name=\"ValidationStates\">\r\n                        <VisualState x:Name=\"Valid\" />\r\n                        <VisualState x:Name=\"InvalidUnfocused\">\r\n                           <Storyboard>\r\n                              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\"\r\n                                    Storyboard.TargetName=\"ValidationErrorElement\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"InvalidFocused\">\r\n                           <Storyboard>\r\n                              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\"\r\n                                    Storyboard.TargetName=\"ValidationErrorElement\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"IsOpen\"\r\n                                    Storyboard.TargetName=\"validationTooltip\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                    <DiscreteObjectKeyFrame.Value>\r\n                                       <System:Boolean>True</System:Boolean>\r\n                                    </DiscreteObjectKeyFrame.Value>\r\n                                 </DiscreteObjectKeyFrame>\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                     </VisualStateGroup>\r\n                  </VisualStateManager.VisualStateGroups>\r\n                  <Border x:Name=\"Border\" Background=\"{TemplateBinding Background}\"\r\n                        BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                        CornerRadius=\"2.5\" Opacity=\"1\">\r\n                     <Grid>\r\n                        <Border x:Name=\"ReadOnlyVisualElement\" Background=\"{StaticResource DarkReadOnlyBrush}\"\r\n                              CornerRadius=\"2\" Opacity=\"0\" />\r\n                        <ScrollViewer x:Name=\"PART_ContentHost\" BorderThickness=\"0\" IsTabStop=\"False\" Margin=\"1\"\r\n                              Padding=\"{TemplateBinding Padding}\" Foreground=\"{TemplateBinding Foreground}\" />\r\n                     </Grid>\r\n                  </Border>\r\n                  <Border x:Name=\"DarkEdge\" BorderBrush=\"{StaticResource ControlDarkEdge}\" BorderThickness=\"1,1,0,0\"\r\n                        CornerRadius=\"2.5\" Margin=\"0\" />\r\n                  <Border x:Name=\"OuterHighlight\" BorderBrush=\"{StaticResource ControlOuterHighlightBrush}\"\r\n                        BorderThickness=\"0,0,1,1\" CornerRadius=\"3\" Margin=\"0,0,-1,-1\" />\r\n                  <Border x:Name=\"InnerShadowDark\" BorderBrush=\"{StaticResource DarkInnerShadowDarkBrush}\"\r\n                        BorderThickness=\"1,1,0,0\" CornerRadius=\"2\" Margin=\"1\" />\r\n                  <Border x:Name=\"InnerShadowLight\" BorderBrush=\"{StaticResource DarkInnerShadowLightBrush}\"\r\n                        BorderThickness=\"1,1,0,0\" CornerRadius=\"1\" Margin=\"2\" />\r\n                  <Border x:Name=\"DisabledVisualElement\" Background=\"{StaticResource DarkDisabledBrush}\"\r\n                        IsHitTestVisible=\"False\" Margin=\"1\" Opacity=\"0\" CornerRadius=\"2\" />\r\n                  <Rectangle x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Margin=\"2\" Opacity=\"0\" RadiusX=\"1\"\r\n                        RadiusY=\"1\" Stroke=\"{StaticResource FocusVisualBrush}\"\r\n                        StrokeThickness=\"{StaticResource FocusVisualStrokeThickness}\" />\r\n                  <Border x:Name=\"ValidationErrorElement\" BorderBrush=\"{StaticResource ErrorBrush}\" BorderThickness=\"1\"\r\n                        CornerRadius=\"3\" Visibility=\"Collapsed\">\r\n                     <ToolTipService.ToolTip>\r\n                        <ToolTip x:Name=\"validationTooltip\"\r\n                              DataContext=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Right\"\r\n                              PlacementTarget=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\"\r\n                              Template=\"{StaticResource ValidationToolTipTemplate}\">\r\n                           <!--<ToolTip.Triggers>\r\n                              <EventTrigger RoutedEvent=\"Canvas.Loaded\">\r\n                                 <BeginStoryboard>\r\n                                    <Storyboard>\r\n                                       <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"IsHitTestVisible\"\r\n                                             Storyboard.TargetName=\"validationTooltip\">\r\n                                          <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"True\" />\r\n                                       </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                 </BeginStoryboard>\r\n                              </EventTrigger>\r\n                           </ToolTip.Triggers>-->\r\n                        </ToolTip>\r\n                     </ToolTipService.ToolTip>\r\n                     <Grid Background=\"Transparent\" HorizontalAlignment=\"Right\" Height=\"12\" Margin=\"1,-4,-4,0\"\r\n                           VerticalAlignment=\"Top\" Width=\"12\">\r\n                        <Path Data=\"M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z\" Fill=\"{StaticResource ErrorBrush}\"\r\n                              Margin=\"1,3,0,0\" />\r\n                     </Grid>\r\n                  </Border>\r\n               </Grid>\r\n            </ControlTemplate>\r\n         </Setter.Value>\r\n      </Setter>\r\n   </Style>\r\n\r\n   <!-- \r\n    ***************************************************************************\r\n    DarkPasswordBox\r\n    ***************************************************************************\r\n    -->\r\n\r\n   <Style x:Key=\"DarkPasswordBox\" TargetType=\"PasswordBox\">\r\n      <Setter Property=\"Background\" Value=\"{StaticResource DarkControlBackgroundBrush}\" />\r\n      <Setter Property=\"BorderBrush\" Value=\"{StaticResource DarkControlBorderBrush}\" />\r\n      <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n      <Setter Property=\"Foreground\" Value=\"{StaticResource DarkControlForegroundBrush}\" />\r\n      <Setter Property=\"Padding\" Value=\"5,4,5,4\" />\r\n      <Setter Property=\"SelectionBrush\" Value=\"{StaticResource InputSelectionBrush}\" />\r\n      <!--<Setter Property=\"SelectionBackground\" Value=\"{StaticResource InputSelectionBrush}\" />\r\n        <Setter Property=\"SelectionForeground\" Value=\"{StaticResource InputSelectionForegroundBrush}\" />-->\r\n      <Setter Property=\"Template\">\r\n         <Setter.Value>\r\n            <ControlTemplate TargetType=\"PasswordBox\">\r\n               <Grid x:Name=\"RootElement\">\r\n                  <VisualStateManager.VisualStateGroups>\r\n                     <VisualStateGroup x:Name=\"CommonStates\">\r\n                        <VisualState x:Name=\"Normal\" />\r\n                        <VisualState x:Name=\"MouseOver\" />\r\n                        <VisualState x:Name=\"Disabled\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" To=\"0.55\" Storyboard.TargetProperty=\"Opacity\"\r\n                                    Storyboard.TargetName=\"DisabledVisualElement\" />\r\n                              <DoubleAnimation Duration=\"0\" To=\"0.5\" Storyboard.TargetProperty=\"(UIElement.Opacity)\"\r\n                                    Storyboard.TargetName=\"PART_ContentHost\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"ReadOnly\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" To=\"0.55\" Storyboard.TargetProperty=\"Opacity\"\r\n                                    Storyboard.TargetName=\"ReadOnlyVisualElement\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                     </VisualStateGroup>\r\n                     <VisualStateGroup x:Name=\"FocusStates\">\r\n                        <VisualState x:Name=\"Focused\">\r\n                           <Storyboard>\r\n                              <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\"\r\n                                    Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"Unfocused\" />\r\n                     </VisualStateGroup>\r\n                     <VisualStateGroup x:Name=\"ValidationStates\">\r\n                        <VisualState x:Name=\"Valid\" />\r\n                        <VisualState x:Name=\"InvalidUnfocused\">\r\n                           <Storyboard>\r\n                              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\"\r\n                                    Storyboard.TargetName=\"ValidationErrorElement\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                        <VisualState x:Name=\"InvalidFocused\">\r\n                           <Storyboard>\r\n                              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\"\r\n                                    Storyboard.TargetName=\"ValidationErrorElement\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                              <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"IsOpen\"\r\n                                    Storyboard.TargetName=\"validationTooltip\">\r\n                                 <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                    <DiscreteObjectKeyFrame.Value>\r\n                                       <System:Boolean>True</System:Boolean>\r\n                                    </DiscreteObjectKeyFrame.Value>\r\n                                 </DiscreteObjectKeyFrame>\r\n                              </ObjectAnimationUsingKeyFrames>\r\n                           </Storyboard>\r\n                        </VisualState>\r\n                     </VisualStateGroup>\r\n                  </VisualStateManager.VisualStateGroups>\r\n                  <Border x:Name=\"Border\" Background=\"{TemplateBinding Background}\"\r\n                        BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                        CornerRadius=\"2.5\" Opacity=\"1\">\r\n                     <Grid>\r\n                        <Border x:Name=\"ReadOnlyVisualElement\" Background=\"{StaticResource DarkDisabledBrush}\"\r\n                              CornerRadius=\"2\" Opacity=\"0\" />\r\n                        <ScrollViewer x:Name=\"PART_ContentHost\" Foreground=\"{TemplateBinding Foreground}\"\r\n                              Padding=\"{TemplateBinding Padding}\" />\r\n\r\n                     </Grid>\r\n                  </Border>\r\n                  <Border x:Name=\"DarkEdge\" BorderBrush=\"{StaticResource ControlDarkEdge}\" BorderThickness=\"1,1,0,0\"\r\n                        CornerRadius=\"2.5\" Margin=\"0\" />\r\n                  <Border x:Name=\"OuterHighlight\" BorderBrush=\"{StaticResource ControlOuterHighlightBrush}\"\r\n                        BorderThickness=\"0,0,1,1\" CornerRadius=\"3\" Margin=\"0,0,-1,-1\" />\r\n                  <Border x:Name=\"InnerShadowDark\" BorderBrush=\"{StaticResource DarkInnerShadowDarkBrush}\"\r\n                        BorderThickness=\"1,1,0,0\" CornerRadius=\"2\" Margin=\"1\" />\r\n                  <Border x:Name=\"InnerShadowLight\" BorderBrush=\"{StaticResource DarkInnerShadowLightBrush}\"\r\n                        BorderThickness=\"1,1,0,0\" CornerRadius=\"1\" Margin=\"2\" />\r\n                  <Border x:Name=\"DisabledVisualElement\" Background=\"{StaticResource DarkDisabledBrush}\"\r\n                        IsHitTestVisible=\"False\" Margin=\"1\" Opacity=\"0\" CornerRadius=\"2\" />\r\n                  <Rectangle x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Margin=\"2\" Opacity=\"0\" RadiusX=\"1\"\r\n                        RadiusY=\"1\" Stroke=\"{StaticResource FocusVisualBrush}\"\r\n                        StrokeThickness=\"{StaticResource FocusVisualStrokeThickness}\" />\r\n                  <Border x:Name=\"ValidationErrorElement\" BorderBrush=\"{StaticResource ErrorBrush}\" BorderThickness=\"1\"\r\n                        CornerRadius=\"3\" Visibility=\"Collapsed\">\r\n                     <ToolTipService.ToolTip>\r\n                        <ToolTip x:Name=\"validationTooltip\"\r\n                              DataContext=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Right\"\r\n                              PlacementTarget=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\"\r\n                              Template=\"{StaticResource ValidationToolTipTemplate}\">\r\n                           <!--<ToolTip.Triggers>\r\n                              <EventTrigger RoutedEvent=\"Canvas.Loaded\">\r\n                                 <BeginStoryboard>\r\n                                    <Storyboard>\r\n                                       <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"IsHitTestVisible\"\r\n                                             Storyboard.TargetName=\"validationTooltip\">\r\n                                          <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"True\" />\r\n                                       </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                 </BeginStoryboard>\r\n                              </EventTrigger>\r\n                           </ToolTip.Triggers>-->\r\n                        </ToolTip>\r\n                     </ToolTipService.ToolTip>\r\n                     <Grid Background=\"Transparent\" HorizontalAlignment=\"Right\" Height=\"12\" Margin=\"1,-4,-4,0\"\r\n                           VerticalAlignment=\"Top\" Width=\"12\">\r\n                        <Path Data=\"M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z\" Fill=\"{StaticResource ErrorBrush}\"\r\n                              Margin=\"1,3,0,0\" />\r\n                     </Grid>\r\n                  </Border>\r\n               </Grid>\r\n            </ControlTemplate>\r\n         </Setter.Value>\r\n      </Setter>\r\n   </Style>\r\n\r\n   <!-- Text Styles. -->\r\n   <Style TargetType=\"TextBlock\" x:Key=\"TextBlockLight\">\r\n\r\n      <Setter Property=\"Foreground\" Value=\"{StaticResource NormalFontBrush}\" />\r\n   </Style>\r\n\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/JetPack/Assets/Fonts.xaml",
    "content": "﻿<ResourceDictionary \r\n  xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" \r\n  xmlns:sys=\"clr-namespace:System;assembly=mscorlib\"\r\n  xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\">\r\n\r\n  <!-- Font Families. -->\r\n  <FontFamily x:Key=\"ContentFontFamily\">Trebuchet MS</FontFamily>\r\n  <FontFamily x:Key=\"DefaultFontFamily\">Trebuchet MS</FontFamily>\r\n  <FontFamily x:Key=\"InputFontFamily\">Trebuchet MS</FontFamily>\r\n  <FontFamily x:Key=\"NormalFontFamily\">Trebuchet MS</FontFamily>\r\n  <FontFamily x:Key=\"HeadingFontFamily\">Trebuchet MS</FontFamily>\r\n\r\n  <!-- Font Sizes. -->\r\n  <sys:Double x:Key=\"ContentFontSize\">13</sys:Double>\r\n  <sys:Double x:Key=\"DefaultFontSize\">12.5</sys:Double>\r\n  <sys:Double x:Key=\"InputFontSize\">11</sys:Double>\r\n  <sys:Double x:Key=\"NormalFontSize\">11</sys:Double>\r\n  <sys:Double x:Key=\"Heading1FontSize\">36</sys:Double>\r\n  <sys:Double x:Key=\"Heading2FontSize\">24</sys:Double>\r\n  <sys:Double x:Key=\"Heading3FontSize\">21</sys:Double>\r\n  <sys:Double x:Key=\"Heading4FontSize\">18</sys:Double>\r\n  <sys:Double x:Key=\"Heading5FontSize\">15</sys:Double>\r\n  <sys:Double x:Key=\"Heading6FontSize\">11</sys:Double>\r\n\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/JetPack/Assets/SdkStyles.xaml",
    "content": "﻿<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" xmlns:System=\"clr-namespace:System;assembly=mscorlib\" xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n                    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n                    xmlns:helpers=\"clr-namespace:WPF.Themes.JetPack.Helpers\"\r\n                    mc:Ignorable=\"d\">\r\n\r\n    <!-- Global Settings. -->\r\n    <ResourceDictionary.MergedDictionaries>\r\n        <ResourceDictionary Source=\"Brushes.xaml\" />\r\n        <ResourceDictionary Source=\"Fonts.xaml\" />\r\n        <ResourceDictionary Source=\"CoreStyles.xaml\" />\r\n    </ResourceDictionary.MergedDictionaries>\r\n\r\n    <!-- Redefine this brush for new color variations -->\r\n    <LinearGradientBrush x:Key=\"TreeViewItemSelectionBorder\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFBED126\" Offset=\"0\" />\r\n        <GradientStop Color=\"#2626292F\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <!---->\r\n\r\n   <!-- \r\n\t***************************************************************************\r\n\tDescriptionViewer\r\n\t***************************************************************************\r\n\t-->\r\n\r\n    <!--<Style TargetType=\"DescriptionViewer\">\r\n\t<Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n\t<Setter Property=\"GlyphTemplate\">\r\n\t\t<Setter.Value>\r\n\t\t\t<ControlTemplate TargetType=\"Button\">\r\n\t\t\t\t<Grid>\r\n\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\"/>\r\n\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\"\r\nStoryboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Icon\"/>\r\n\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t<VisualState x:Name=\"Pressed\">\r\n\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\"\r\nStoryboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Icon\"/>\r\n\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\"/>\r\n\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t<Grid x:Name=\"Icon\" HorizontalAlignment=\"Center\" Opacity=\"0.8\"\r\nVerticalAlignment=\"Center\" >\r\n\t\t\t\t\t\t<Ellipse Width=\"16\" Height=\"16\" Fill=\"#34acd9\">\r\n\t\t\t\t\t\t\t<Ellipse.Effect>\r\n\t\t\t\t\t\t\t\t<DropShadowEffect BlurRadius=\"3\" ShadowDepth=\"1\"\r\nDirection=\"-90\" Color=\"Black\" Opacity=\"0.5\" />\r\n\t\t\t\t\t\t\t</Ellipse.Effect>\r\n\t\t\t\t\t\t</Ellipse>\r\n\t\t\t\t\t\t<Path Width=\"12\" Height=\"12\" Stretch=\"Fill\" Fill=\"#FFFFFF\"\r\nData=\"F1 M 395.999,176.127C 333.109,176.127 282.128,227.109 282.128,290C 282.128,352.891 333.109,403.873 395.999,403.873C\r\n458.891,403.873 509.872,352.891 509.872,290C 509.872,227.109\r\n458.891,176.127 395.999,176.127 Z M 397.915,194.443C 410.167,194.443\r\n420.669,204.945 420.669,217.197C 420.669,229.699 410.167,240.201 397.915,240.201C 385.663,240.201 375.161,229.699 375.161,217.197C\r\n375.161,204.945 385.663,194.443 397.915,194.443 Z M 437.421,374.472C\r\n426.92,374.472 409.667,373.222 397.665,373.222C 385.913,373.222\r\n371.661,374.472 361.16,374.472C 360.16,374.472 359.158,370.972 359.158,368.972C 359.158,367.222 360.16,363.721 361.16,363.471C\r\n373.161,362.22 378.162,358.22 378.162,342.467L 378.162,304.961C\r\n378.162,291.709 373.161,288.959 361.16,287.959C 360.16,287.709\r\n359.158,284.458 359.158,282.707C 359.158,280.957 360.16,277.457 361.16,277.457C 377.412,274.206 400.166,264.955 411.417,259.704C\r\n412.417,259.203 414.917,257.703 416.919,257.703C 420.919,257.703\r\n422.669,259.203 422.419,260.954C 421.919,271.206 420.419,290.209 420.419,303.211L 420.419,342.467C 420.419,358.22 425.42,362.22 437.421,363.471C 438.421,363.721 439.423,367.222 439.423,368.972C\r\n439.423,370.972 438.421,374.472 437.421,374.472 Z \"/>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</Grid>\r\n\t\t\t</ControlTemplate>\r\n\t\t</Setter.Value>\r\n\t</Setter>\r\n\t<Setter Property=\"Template\">\r\n\t\t<Setter.Value>\r\n\t\t\t<ControlTemplate TargetType=\"DescriptionViewer\">\r\n\t\t\t\t<StackPanel Orientation=\"Horizontal\">\r\n\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<VisualStateGroup x:Name=\"DescriptionStates\">\r\n\t\t\t\t\t\t\t<VisualState x:Name=\"NoDescription\"/>\r\n\t\t\t\t\t\t\t<VisualState x:Name=\"HasDescription\">\r\n\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\"\r\nStoryboard.TargetProperty=\"Visibility\"\r\nStoryboard.TargetName=\"DescriptionContent\">\r\n\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Visible\"/>\r\n\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t<Border BorderBrush=\"{TemplateBinding BorderBrush}\"\r\nBorderThickness=\"{TemplateBinding BorderThickness}\"\r\nBackground=\"{TemplateBinding Background}\" Height=\"{TemplateBinding Height}\" Padding=\"{TemplateBinding Padding}\" Width=\"{TemplateBinding Width}\">\r\n\t\t\t\t\t\t<Button x:Name=\"DescriptionContent\" BorderBrush=\"#FFFFFFFF\"\r\nBorderThickness=\"1\" Background=\"#00000000\"\r\nHorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\nIsTabStop=\"False\" Padding=\"1\" Template=\"{TemplateBinding GlyphTemplate}\" Visibility=\"Collapsed\"\r\nVerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\">\r\n\t\t\t\t\t\t\t<ToolTipService.ToolTip>\r\n\t\t\t\t\t\t\t\t<ToolTip Placement=\"Right\" IsHitTestVisible=\"False\" Margin=\"5,-3,5,0\" Content=\"{TemplateBinding Description}\" PlacementTarget=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\" />\r\n\t\t\t\t\t\t\t</ToolTipService.ToolTip>\r\n\t\t\t\t\t\t</Button>\r\n\t\t\t\t\t</Border>\r\n\t\t\t\t</StackPanel>\r\n\t\t\t</ControlTemplate>\r\n\t\t</Setter.Value>\r\n\t</Setter>\r\n</Style>-->\r\n\r\n    <!-- \r\n\t***************************************************************************\r\n\tOpacityButton (helper style used by other controls)\r\n\t***************************************************************************\r\n\t-->\r\n\r\n    <Style x:Key=\"OpacityButton\" TargetType=\"Button\">\r\n        <Setter Property=\"Padding\" Value=\"0\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"Cursor\" Value=\"Hand\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Button\">\r\n                    <Grid x:Name=\"Root\" Background=\"Transparent\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.2\" />\r\n                                    <VisualTransition GeneratedDuration=\"0\" From=\"Pressed\" />\r\n                                    <VisualTransition GeneratedDuration=\"0\" To=\"Pressed\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"Translater\" Storyboard.TargetProperty=\"Y\" To=\"1\" />\r\n                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"ContentSite\" Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"ContentSite\" Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0.25\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"ContentSite\" d:IsOptimized=\"True\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <ContentPresenter x:Name=\"ContentSite\" Opacity=\"0.5\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\">\r\n                            <ContentPresenter.RenderTransform>\r\n                                <TranslateTransform Y=\"0\" x:Name=\"Translater\" />\r\n                            </ContentPresenter.RenderTransform>\r\n                        </ContentPresenter>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- \r\n\t***************************************************************************\r\n\tTreeView (including TreeViewItem)\r\n\t***************************************************************************\r\n\t-->\r\n\r\n    <Style TargetType=\"TreeViewItem\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Cursor\" Value=\"Arrow\" />\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ControlForegroundGreen}\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"True\" />\r\n        <Setter Property=\"Padding\" Value=\"4\" />\r\n        <Setter Property=\"KeyboardNavigation.ControlTabNavigation\" Value=\"Once\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TreeViewItem\">\r\n                    <Grid Background=\"{x:Null}\" Margin=\"{TemplateBinding Padding}\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"9\" />\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"*\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\" />\r\n                            <RowDefinition Height=\"*\" />\r\n                        </Grid.RowDefinitions>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\" />\r\n                                <VisualState x:Name=\"Pressed\" />\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0.55\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"PART_Header\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualState x:Name=\"Unselected\" />\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Selection\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"SelectedInactive\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Selection\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"HasItemsStates\">\r\n                                <VisualState x:Name=\"HasItems\" />\r\n                                <VisualState x:Name=\"NoItems\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ExpanderButton\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Collapsed}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"ExpansionStates\">\r\n                                <VisualState x:Name=\"Collapsed\" />\r\n                                <VisualState x:Name=\"Expanded\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ItemsHost\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\" />\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"ValidationStates\">\r\n                                <VisualState x:Name=\"Valid\" />\r\n                                <VisualState x:Name=\"InvalidUnfocused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"Validation\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"InvalidFocused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"Validation\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"IsOpen\" Storyboard.TargetName=\"ValidationToolTip\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <System:Boolean>True</System:Boolean>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <ToggleButton x:Name=\"ExpanderButton\" Height=\"9\" IsTabStop=\"False\" IsChecked=\"{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}\" KeyboardNavigation.ControlTabNavigation=\"Once\" VerticalAlignment=\"Stretch\">\r\n                            <ToggleButton.Template>\r\n                                <ControlTemplate TargetType=\"ToggleButton\">\r\n                                    <Grid x:Name=\"Root\" Background=\"Transparent\">\r\n                                        <VisualStateManager.VisualStateGroups>\r\n                                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                                <VisualState x:Name=\"Normal\" />\r\n                                                <VisualState x:Name=\"MouseOver\" />\r\n                                                <VisualState x:Name=\"Disabled\">\r\n                                                    <Storyboard>\r\n                                                        <DoubleAnimation Duration=\"0\" To=\".7\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Root\" />\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                            </VisualStateGroup>\r\n                                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                                <VisualState x:Name=\"Unchecked\" />\r\n                                                <VisualState x:Name=\"Checked\">\r\n                                                    <Storyboard>\r\n                                                        <DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"UncheckedVisual\" />\r\n                                                        <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"CheckedVisual\" />\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                            </VisualStateGroup>\r\n                                        </VisualStateManager.VisualStateGroups>\r\n                                        <Grid>\r\n                                            <Border CornerRadius=\"1\">\r\n                                                <Border.Effect>\r\n                                                    <DropShadowEffect Color=\"#55524f\" ShadowDepth=\"2\" BlurRadius=\"3\" Opacity=\"0.5\" />\r\n                                                </Border.Effect>\r\n                                                <Border.Background>\r\n                                                    <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                                        <GradientStop Color=\"#ffffff\" Offset=\"0\" />\r\n                                                        <GradientStop Color=\"#cccccc\" Offset=\"1\" />\r\n                                                    </LinearGradientBrush>\r\n                                                </Border.Background>\r\n                                            </Border>\r\n                                            <Path x:Name=\"UncheckedVisual\" Width=\"5\" Height=\"5\" StrokeThickness=\"1\" Stroke=\"Black\" Data=\"M0,2.5 L5,2.5 M2.5,0 L2.5,5\" Stretch=\"None\" />\r\n                                            <Path x:Name=\"CheckedVisual\" Opacity=\"0\" Width=\"5\" Height=\"5\" StrokeThickness=\"1\" Stroke=\"Black\" Data=\"M0,2.5 L5,2.5\" Stretch=\"None\" />\r\n                                        </Grid>\r\n                                    </Grid>\r\n                                </ControlTemplate>\r\n                            </ToggleButton.Template>\r\n                        </ToggleButton>\r\n                        <Border x:Name=\"Selection\" Grid.Column=\"1\" Margin=\"2,-4,-6,-4\" Background=\"{StaticResource InputSelectionBrush}\" BorderBrush=\"{StaticResource ColorAccentHighlightBrush}\" CornerRadius=\"1\" BorderThickness=\"0,1,0,0\" Opacity=\"0\" Effect=\"{StaticResource LightControlShadowEffect}\" />\r\n                        <Button x:Name=\"PART_Header\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Cursor=\"{TemplateBinding Cursor}\" ClickMode=\"Hover\" Grid.Column=\"1\" Foreground=\"{TemplateBinding Foreground}\" Margin=\"8,0,0,0\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" IsTabStop=\"False\" KeyboardNavigation.ControlTabNavigation=\"Once\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\">\r\n                            <Button.Template>\r\n                                <ControlTemplate TargetType=\"Button\">\r\n                                    <Grid Background=\"{TemplateBinding Background}\">\r\n                                        <VisualStateManager.VisualStateGroups>\r\n                                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                                <VisualState x:Name=\"Normal\" />\r\n                                                <VisualState x:Name=\"Pressed\" />\r\n                                                <VisualState x:Name=\"Disabled\">\r\n                                                    <Storyboard>\r\n                                                        <DoubleAnimation Duration=\"0\" To=\".55\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Content\" />\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                            </VisualStateGroup>\r\n                                        </VisualStateManager.VisualStateGroups>\r\n                                        <ContentPresenter x:Name=\"Content\" Cursor=\"{TemplateBinding Cursor}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" HorizontalAlignment=\"Left\" Margin=\"0\" />\r\n                                    </Grid>\r\n                                </ControlTemplate>\r\n                            </Button.Template>\r\n                            <ContentPresenter ContentTemplate=\"{TemplateBinding HeaderTemplate}\" Content=\"{TemplateBinding Header}\" />\r\n                        </Button>\r\n                        <Border x:Name=\"Validation\" BorderBrush=\"{StaticResource ErrorBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\" Grid.Column=\"1\" Margin=\"4,-2,-4,-2\" Visibility=\"Collapsed\">\r\n                            <ToolTipService.ToolTip>\r\n                                <ToolTip x:Name=\"ValidationToolTip\" DataContext=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\" IsHitTestVisible=\"True\" Placement=\"Right\" PlacementTarget=\"{Binding ElementName=PART_Header}\" Template=\"{StaticResource ValidationToolTipTemplate}\" />\r\n                            </ToolTipService.ToolTip>\r\n                            <Grid Background=\"Transparent\" HorizontalAlignment=\"Right\" Height=\"10\" Margin=\"0,-4,-4,0\" VerticalAlignment=\"Top\" Width=\"10\">\r\n                                <Path Data=\"M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 Z\" Fill=\"{StaticResource ErrorBrush}\" Margin=\"-1,3,0,0\" />\r\n                            </Grid>\r\n                        </Border>\r\n                        <ItemsPresenter x:Name=\"ItemsHost\" Grid.ColumnSpan=\"2\" Grid.Column=\"1\" Grid.Row=\"1\" Visibility=\"Collapsed\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style TargetType=\"TreeView\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"0\" />\r\n        <Setter Property=\"Cursor\" Value=\"Arrow\" />\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ControlForegroundGreen}\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"True\" />\r\n        <Setter Property=\"Padding\" Value=\"1\" />\r\n        <Setter Property=\"KeyboardNavigation.ControlTabNavigation\" Value=\"Once\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TreeView\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\" />\r\n                                <VisualState x:Name=\"Pressed\" />\r\n                                <VisualState x:Name=\"Disabled\" />\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\" />\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"ValidationStates\">\r\n                                <VisualState x:Name=\"Valid\" />\r\n                                <VisualState x:Name=\"InvalidUnfocused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"Validation\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"InvalidFocused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"Validation\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"IsOpen\" Storyboard.TargetName=\"ValidationToolTip\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <System:Boolean>True</System:Boolean>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\">\r\n                            <Border Background=\"{TemplateBinding Background}\" Margin=\"1\" Padding=\"{TemplateBinding Padding}\">\r\n                                <ScrollViewer x:Name=\"ScrollViewer\" BorderBrush=\"Transparent\" BorderThickness=\"0\" Background=\"{x:Null}\" IsTabStop=\"False\" KeyboardNavigation.ControlTabNavigation=\"Once\" CanContentScroll=\"false\" Focusable=\"false\" HorizontalScrollBarVisibility=\"{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}\" Padding=\"{TemplateBinding Padding}\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" VerticalScrollBarVisibility=\"{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}\">\r\n                                    <ItemsPresenter />\r\n                                </ScrollViewer>\r\n                            </Border>\r\n                        </Border>\r\n                        <Border x:Name=\"Validation\" BorderBrush=\"{StaticResource ErrorBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Grid.Column=\"1\" CornerRadius=\"2\" Visibility=\"Collapsed\">\r\n                            <ToolTipService.ToolTip>\r\n                                <ToolTip x:Name=\"ValidationToolTip\" DataContext=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\" IsHitTestVisible=\"True\" Placement=\"Right\" PlacementTarget=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\" Template=\"{StaticResource ValidationToolTipTemplate}\" />\r\n                            </ToolTipService.ToolTip>\r\n                            <Grid Background=\"Transparent\" HorizontalAlignment=\"Right\" Height=\"10\" Margin=\"0,-4,-4,0\" VerticalAlignment=\"Top\" Width=\"10\">\r\n                                <Path Data=\"M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 Z\" Fill=\"{StaticResource ErrorBrush}\" Margin=\"-1,3,0,0\" />\r\n                                <Path Data=\"M 0,0 L2,0 L 8,6 L8,8\" Fill=\"#FFFFFFFF\" Margin=\"-1,3,0,0\" />\r\n                            </Grid>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- \r\n\t***************************************************************************\r\n\tDatePicker (including DatePickerTextBox and DropDownButton)\r\n\t***************************************************************************\r\n\t-->\r\n\r\n    <ControlTemplate x:Key=\"DateDropDownButtonTemplate\" TargetType=\"Button\">\r\n        <Grid FlowDirection=\"LeftToRight\">\r\n            <VisualStateManager.VisualStateGroups>\r\n                <VisualStateGroup x:Name=\"CommonStates\">\r\n                    <VisualStateGroup.Transitions>\r\n                        <VisualTransition GeneratedDuration=\"0\" />\r\n                        <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"MouseOver\" />\r\n                        <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"Pressed\" />\r\n                    </VisualStateGroup.Transitions>\r\n                    <VisualState x:Name=\"Normal\" />\r\n                    <VisualState x:Name=\"MouseOver\">\r\n                        <Storyboard>\r\n                            <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"PressedElement\" Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"MouseOverElement\" Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                        </Storyboard>\r\n                    </VisualState>\r\n                    <VisualState x:Name=\"Pressed\">\r\n                        <Storyboard>\r\n                            <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"NormalElement\" Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0.25\" />\r\n                            <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"PressedElement\" Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                            <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"MouseOverElement\" Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0\" />\r\n                            <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"HighlightElement\" Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0.5\" />\r\n                        </Storyboard>\r\n                    </VisualState>\r\n                    <VisualState x:Name=\"Disabled\">\r\n                        <Storyboard>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"00:00:00.001\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"DisabledVisual\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </VisualState>\r\n                </VisualStateGroup>\r\n            </VisualStateManager.VisualStateGroups>\r\n            <Grid Width=\"26\" Height=\"24\" VerticalAlignment=\"Top\">\r\n                <Border CornerRadius=\"1\">\r\n                    <Border.Background>\r\n                        <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.65\" />\r\n                            <GradientStop Color=\"#FFF2F2F2\" Offset=\"0.90\" />\r\n                            <GradientStop Color=\"#FFDADADA\" Offset=\"1\" />\r\n                        </LinearGradientBrush>\r\n                    </Border.Background>\r\n                    <Border.Effect>\r\n                        <DropShadowEffect Color=\"#55524f\" ShadowDepth=\"2\" BlurRadius=\"3\" Opacity=\"0.5\" />\r\n                    </Border.Effect>\r\n                </Border>\r\n                <Border x:Name=\"NormalElement\" Height=\"6\" VerticalAlignment=\"Top\" CornerRadius=\"1,1,0,0\" Background=\"{StaticResource ControlBackgroundNormalGreen}\" />\r\n                <TextBlock Text=\"16\" FontSize=\"14\" Foreground=\"#FF292D2F\" FontWeight=\"Bold\" FontFamily=\"Arial\" Margin=\"0,6,0,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" />\r\n                <Border x:Name=\"MouseOverElement\" Height=\"6\" Background=\"{StaticResource ControlBackgroundOverGreen}\" CornerRadius=\"2,2,0,0\" Opacity=\"0\" VerticalAlignment=\"Top\" />\r\n                <Border x:Name=\"PressedElement\" Height=\"6\" Background=\"{StaticResource ControlBackgroundPressedGreen}\" CornerRadius=\"2,2,0,0\" Opacity=\"0\" VerticalAlignment=\"Top\" />\r\n                <Border x:Name=\"HighlightElement\" Height=\"6\" BorderBrush=\"{StaticResource HighlightBrushGreen}\" BorderThickness=\"0.5,1,0,0\" CornerRadius=\"1,1,0,0\" VerticalAlignment=\"Top\" />\r\n                <Border x:Name=\"DisabledVisual\" Background=\"{StaticResource DisabledBrush}\" CornerRadius=\"1,1,0,0\" Opacity=\"0\" />\r\n            </Grid>\r\n        </Grid>\r\n    </ControlTemplate>\r\n    <Style TargetType=\"DatePickerTextBox\">\r\n        <Setter Property=\"Background\" Value=\"White\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource ControlBorderBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource InputForegroundBrush}\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"Padding\" Value=\"5,4,5,4\" />\r\n        <Setter Property=\"SelectionBrush\" Value=\"{StaticResource InputSelectionBrush}\" />\r\n        <!--<Setter Property=\"SelectionForeground\" Value=\"{StaticResource InputSelectionForegroundBrush}\" />-->\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"DatePickerTextBox\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <Grid.Resources>\r\n                            <SolidColorBrush x:Key=\"WatermarkBrush\" Color=\"#FFAAAAAA\" />\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"MouseOver\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\" />\r\n                                <VisualState x:Name=\"Disabled\" />\r\n                                <VisualState x:Name=\"ReadOnly\" />\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"WatermarkStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Unwatermarked\" />\r\n                                <VisualState x:Name=\"Watermarked\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"ContentElement\" />\r\n                                        <!--<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\"\r\n                                                Storyboard.TargetName=\"Watermark\" />-->\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"Border\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2.5\" Opacity=\"1\">\r\n                            <Grid x:Name=\"WatermarkContent\">\r\n                                <Border x:Name=\"ContentElement\" BorderThickness=\"1\" Padding=\"{TemplateBinding Padding}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" />\r\n                                <!--<ContentControl x:Name=\"Watermark\" Background=\"{TemplateBinding Background}\"\r\n                                        Content=\"{TemplateBinding Watermark}\"\r\n                                        Foreground=\"{StaticResource WatermarkBrush}\"\r\n                                        FontSize=\"{TemplateBinding FontSize}\"\r\n                                        HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                                        HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                                        IsHitTestVisible=\"False\" IsTabStop=\"False\" Opacity=\"0\" Padding=\"2\"\r\n                                        VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                                        VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                                        Margin=\"{TemplateBinding Padding}\" />-->\r\n                            </Grid>\r\n                        </Border>\r\n                        <Rectangle x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Margin=\"1\" Opacity=\"0\" RadiusX=\"1\" RadiusY=\"1\" Stroke=\"{StaticResource FocusVisualBrush}\" StrokeThickness=\"{StaticResource FocusVisualStrokeThickness}\" />\r\n                        <Border x:Name=\"OuterHighlight\" BorderBrush=\"{StaticResource ControlOuterHighlightBrush}\" BorderThickness=\"0,0,1,1\" CornerRadius=\"3\" Margin=\"0,0,-1,-1\" />\r\n                        <Border x:Name=\"InnerShadowDark\" BorderBrush=\"{StaticResource InnerShadowDarkBrush}\" BorderThickness=\"1,1,0,0\" CornerRadius=\"2\" Margin=\"1\" />\r\n                        <Border x:Name=\"InnerShadowLight\" BorderBrush=\"{StaticResource InnerShadowLightBrush}\" BorderThickness=\"1,1,0,0\" CornerRadius=\"1\" Margin=\"2\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style TargetType=\"DatePicker\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource InputBackgroundBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource ControlBorderBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"Padding\" Value=\"5,4,5,4\" />\r\n        <!--<Setter Property=\"SelectionBrush\" Value=\"{StaticResource InputSelectionBrush}\" />-->\r\n        <!--<Setter Property=\"SelectionBackground\" Value=\"{StaticResource InputSelectionBrush}\" />-->\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"DatePicker\">\r\n                    <Grid x:Name=\"Root\">\r\n\r\n                        <Grid.Resources>\r\n                            <ControlTemplate x:Key=\"DropDownButtonTemplate\" TargetType=\"Button\">\r\n                                <Grid FlowDirection=\"LeftToRight\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0\" />\r\n                                                <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"MouseOver\" />\r\n                                                <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"Pressed\" />\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\" />\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"PressedElement\" Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0\" />\r\n                                                    <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"MouseOverElement\" Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"NormalElement\" Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0.25\" />\r\n                                                    <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"PressedElement\" Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"1\" />\r\n                                                    <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"MouseOverElement\" Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0\" />\r\n                                                    <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"HighlightElement\" Storyboard.TargetProperty=\"(FrameworkElement.Opacity)\" To=\"0.5\" />\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\" />\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Grid Width=\"26\" Height=\"24\" VerticalAlignment=\"Top\">\r\n                                        <Border CornerRadius=\"1\">\r\n                                            <Border.Background>\r\n                                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.65\" />\r\n                                                    <GradientStop Color=\"#FFF2F2F2\" Offset=\"0.90\" />\r\n                                                    <GradientStop Color=\"#FFDADADA\" Offset=\"1\" />\r\n                                                </LinearGradientBrush>\r\n                                            </Border.Background>\r\n                                            <Border.Effect>\r\n                                                <DropShadowEffect Color=\"#55524f\" ShadowDepth=\"2\" BlurRadius=\"3\" Opacity=\"0.5\" />\r\n                                            </Border.Effect>\r\n                                        </Border>\r\n                                        <Border x:Name=\"NormalElement\" Height=\"6\" VerticalAlignment=\"Top\" CornerRadius=\"1,1,0,0\" Background=\"{StaticResource ColorAccentBrush}\" />\r\n                                        <TextBlock Text=\"16\" FontSize=\"14\" Foreground=\"#FF292D2F\" FontWeight=\"Bold\" FontFamily=\"Arial\" Margin=\"0,6,0,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" />\r\n                                        <Border x:Name=\"MouseOverElement\" Height=\"6\" Background=\"{StaticResource ColorAccentOverBrush}\" CornerRadius=\"2,2,0,0\" Opacity=\"0\" VerticalAlignment=\"Top\" />\r\n                                        <Border x:Name=\"PressedElement\" Height=\"6\" Background=\"{StaticResource ColorAccentSubduedBrush}\" CornerRadius=\"2,2,0,0\" Opacity=\"0\" VerticalAlignment=\"Top\" />\r\n                                        <Border x:Name=\"HighlightElement\" Height=\"6\" BorderBrush=\"{StaticResource ColorAccentHighlightBrush}\" BorderThickness=\"0.5,1,0,0\" CornerRadius=\"1,1,0,0\" VerticalAlignment=\"Top\" />\r\n                                        <Border x:Name=\"DisabledVisual\" Background=\"{StaticResource DisabledBrush}\" CornerRadius=\"1,1,0,0\" Opacity=\"0\" />\r\n                                    </Grid>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                        </Grid.Resources>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\" />\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0.55\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"DisabledVisual\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"ValidationStates\">\r\n                                <VisualState x:Name=\"Valid\" />\r\n                                <VisualState x:Name=\"InvalidUnfocused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ValidationErrorElement\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"InvalidFocused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ValidationErrorElement\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"IsOpen\" Storyboard.TargetName=\"validationTooltip\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <System:Boolean>True</System:Boolean>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <DatePickerTextBox x:Name=\"TextBox\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Grid.Column=\"0\" Height=\"28\" Padding=\"{TemplateBinding Padding}\" Foreground=\"{StaticResource ControlForeground}\" SelectionBrush=\"{StaticResource InputSelectionForegroundBrush}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" />\r\n                        <!--SelectionBackground=\"{TemplateBinding SelectionBackground}\"-->\r\n                        <Border x:Name=\"ValidationErrorElement\" BorderBrush=\"{StaticResource ErrorBrush}\" BorderThickness=\"1\" CornerRadius=\"3\" Grid.Column=\"0\" Visibility=\"Collapsed\">\r\n                            <ToolTipService.ToolTip>\r\n                                <ToolTip x:Name=\"validationTooltip\" DataContext=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Right\" PlacementTarget=\"{Binding ElementName=TextBox}\" Template=\"{StaticResource ValidationToolTipTemplate}\">\r\n                                    <!--<ToolTip.Triggers>\r\n                                        <EventTrigger RoutedEvent=\"Canvas.Loaded\">\r\n                                            <BeginStoryboard>\r\n                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames\r\n                                                            Storyboard.TargetProperty=\"IsHitTestVisible\"\r\n                                                            Storyboard.TargetName=\"validationTooltip\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                            <DiscreteObjectKeyFrame.Value>\r\n                                                                <System:Boolean>true</System:Boolean>\r\n                                                            </DiscreteObjectKeyFrame.Value>\r\n                                                        </DiscreteObjectKeyFrame>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </BeginStoryboard>\r\n                                        </EventTrigger>\r\n                                    </ToolTip.Triggers>-->\r\n                                </ToolTip>\r\n                            </ToolTipService.ToolTip>\r\n                            <Grid Background=\"Transparent\" HorizontalAlignment=\"Right\" Height=\"12\" Margin=\"1,-4,-4,0\" VerticalAlignment=\"Top\" Width=\"12\">\r\n                                <Path Data=\"M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z\" Fill=\"{StaticResource ErrorBrush}\" Margin=\"1,3,0,0\" />\r\n                            </Grid>\r\n                        </Border>\r\n                        <Button x:Name=\"Button\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Foreground=\"{TemplateBinding Foreground}\" Grid.Column=\"1\" Margin=\"4,2,2,0\" Template=\"{StaticResource DropDownButtonTemplate}\" Width=\"26\" />\r\n                        <Grid x:Name=\"DisabledVisual\" Grid.ColumnSpan=\"2\" IsHitTestVisible=\"False\" Opacity=\"0\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"*\" />\r\n                                <ColumnDefinition Width=\"Auto\" />\r\n                            </Grid.ColumnDefinitions>\r\n                            <Rectangle Fill=\"{StaticResource DisabledBrush}\" RadiusX=\"3\" RadiusY=\"3\" Margin=\"0,0,-1,-1\" />\r\n                            <Rectangle Grid.Column=\"1\" Fill=\"{StaticResource DisabledBrush}\" Height=\"26\" Margin=\"4,0,2,0\" RadiusX=\"1\" RadiusY=\"1\" Width=\"26\" />\r\n                        </Grid>\r\n                        <Popup x:Name=\"Popup\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- \r\n\t*************************************************************************************\r\n\tCalendar (including CalendarItem, CalendarButton, and CalendarDayButton styles)\r\n\t*************************************************************************************\r\n\t-->\r\n\r\n    <Style TargetType=\"CalendarDayButton\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource HighlightBrushGreen}\" />\r\n        <Setter Property=\"FontSize\" Value=\"9\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"MinWidth\" Value=\"24\" />\r\n        <Setter Property=\"MinHeight\" Value=\"20\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"CalendarDayButton\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"OverBackground\" Storyboard.TargetProperty=\"Opacity\" To=\".5\" Duration=\"0\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"OverBackground\" Storyboard.TargetProperty=\"Opacity\" To=\".5\" Duration=\"0\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"OverBackground\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" Duration=\"0\" />\r\n                                        <DoubleAnimation Storyboard.TargetName=\"Content\" Storyboard.TargetProperty=\"Opacity\" To=\".35\" Duration=\"0\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Unselected\" />\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"SelectedBackground\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" Duration=\"0\" />\r\n                                        <ColorAnimation Duration=\"0\" To=\"White\" Storyboard.TargetProperty=\"(Control.Foreground).(SolidColorBrush.Color)\" Storyboard.TargetName=\"Content\" d:IsOptimized=\"True\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CalendarButtonFocusStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"CalendarButtonFocused\" />\r\n                                <VisualState x:Name=\"CalendarButtonUnfocused\" />\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"ActiveStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Active\" />\r\n                                <VisualState x:Name=\"Inactive\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimation Duration=\"0\" To=\"#FF9C9DA0\" Storyboard.TargetProperty=\"(Control.Foreground).(SolidColorBrush.Color)\" Storyboard.TargetName=\"Content\" d:IsOptimized=\"True\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"DayStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"RegularDay\" />\r\n                                <VisualState x:Name=\"Today\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"TodayBackground\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" Duration=\"0\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"BlackoutDayStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"NormalDay\" />\r\n                                <VisualState x:Name=\"BlackoutDay\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"BlackoutVisual\" Storyboard.TargetProperty=\"Opacity\" To=\"0.55\" Duration=\"0\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n\r\n                        <Rectangle x:Name=\"TodayBackground\" Opacity=\"0\" Fill=\"#FFAAAAAA\" RadiusX=\"1\" RadiusY=\"1\" />\r\n                        <Rectangle x:Name=\"SelectedBackground\" Opacity=\"0\" Fill=\"{StaticResource InputSelectionBrush}\" RadiusX=\"1\" RadiusY=\"1\" Effect=\"{StaticResource LightControlShadowEffect}\" />\r\n                        <Rectangle x:Name=\"OverBackground\" Opacity=\"0\" Fill=\"#2000\" RadiusX=\"1\" RadiusY=\"1\" />\r\n\r\n                        <ContentControl x:Name=\"Content\" IsTabStop=\"False\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" FontSize=\"{TemplateBinding FontSize}\" Margin=\"5,1,5,1\" Foreground=\"#404040\" />\r\n\r\n                        <Path x:Name=\"BlackoutVisual\" Opacity=\"0\" Margin=\"3\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"{StaticResource DisabledBrush}\" Stretch=\"Fill\" Data=\"M8.1772461,11.029181 L10.433105,11.029181 L11.700684,12.801641 L12.973633,11.029181 L15.191895,11.029181 L12.844727,13.999395 L15.21875,17.060919 L12.962891,17.060919 L11.673828,15.256231 L10.352539,17.060919 L8.1396484,17.060919 L10.519043,14.042364 z\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style TargetType=\"CalendarButton\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource ControlBackgroundOverGreen}\" />\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"MinWidth\" Value=\"42\" />\r\n        <Setter Property=\"MinHeight\" Value=\"40\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"CalendarButton\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\".5\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Background\" />\r\n                                        <ColorAnimation Duration=\"0\" To=\"{StaticResource ControlForegroundGreenColor}\" Storyboard.TargetProperty=\"(Control.Foreground).(SolidColorBrush.Color)\" Storyboard.TargetName=\"Content\" d:IsOptimized=\"True\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\".5\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Background\" />\r\n                                        <ColorAnimation Duration=\"0\" To=\"{StaticResource ControlForegroundGreenColor}\" Storyboard.TargetProperty=\"(Control.Foreground).(SolidColorBrush.Color)\" Storyboard.TargetName=\"Content\" d:IsOptimized=\"True\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\" />\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Unselected\" />\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\".75\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"SelectedBackground\" />\r\n                                        <ColorAnimation Duration=\"0\" To=\"{StaticResource ControlForegroundGreenColor}\" Storyboard.TargetProperty=\"(Control.Foreground).(SolidColorBrush.Color)\" Storyboard.TargetName=\"Content\" d:IsOptimized=\"True\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"ActiveStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Active\" />\r\n                                <VisualState x:Name=\"Inactive\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimation Duration=\"0\" To=\"#FF777777\" Storyboard.TargetProperty=\"(ContentControl.Foreground).(SolidColorBrush.Color)\" Storyboard.TargetName=\"Content\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CalendarButtonFocusStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"CalendarButtonFocused\" />\r\n                                <VisualState x:Name=\"CalendarButtonUnfocused\" />\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                                <VisualState x:Name=\"Focused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Rectangle x:Name=\"SelectedBackground\" Fill=\"{TemplateBinding Background}\" Opacity=\"0\" RadiusY=\"1\" RadiusX=\"1\" />\r\n                        <Rectangle x:Name=\"Background\" Fill=\"{TemplateBinding Background}\" Opacity=\"0\" RadiusY=\"1\" RadiusX=\"1\" />\r\n                        <ContentControl x:Name=\"Content\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"#FF333333\" FontSize=\"{TemplateBinding FontSize}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" IsTabStop=\"False\" Margin=\"1,0,1,1\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style TargetType=\"CalendarItem\">\r\n        <Setter Property=\"FontWeight\" Value=\"Normal\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"CalendarItem\">\r\n                    <Grid Margin=\"4\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"DisabledVisual\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"Background\" CornerRadius=\"2\" Background=\"{TemplateBinding Background}\">\r\n                            <Border.Effect>\r\n                                <DropShadowEffect Color=\"#55524f\" ShadowDepth=\"1\" BlurRadius=\"4\" Opacity=\"0.5\" />\r\n                            </Border.Effect>\r\n                        </Border>\r\n                        <Border x:Name=\"HeaderBackground\" CornerRadius=\"2,2,0,0\" Height=\"28\" VerticalAlignment=\"Top\" Background=\"{StaticResource StaticControlBackground}\" />\r\n                        <Grid>\r\n                            <Grid.Resources>\r\n                                <ControlTemplate x:Key=\"HeaderButtonTemplate\" TargetType=\"Button\">\r\n                                    <Grid Cursor=\"Hand\">\r\n                                        <VisualStateManager.VisualStateGroups>\r\n                                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                                <VisualState x:Name=\"Normal\" />\r\n                                                <VisualState x:Name=\"MouseOver\" />\r\n                                                <VisualState x:Name=\"Disabled\">\r\n                                                    <Storyboard>\r\n                                                        <DoubleAnimation Duration=\"0\" To=\".5\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Content\" />\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                                <VisualState x:Name=\"Pressed\" />\r\n                                            </VisualStateGroup>\r\n                                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                                <VisualState x:Name=\"Unfocused\" />\r\n                                                <VisualState x:Name=\"Focused\" />\r\n                                            </VisualStateGroup>\r\n                                        </VisualStateManager.VisualStateGroups>\r\n                                        <ContentControl x:Name=\"Content\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Foreground=\"{StaticResource HeaderForegroundBrush}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" IsTabStop=\"False\" Margin=\"1,5,1,9\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" />\r\n                                    </Grid>\r\n                                </ControlTemplate>\r\n                                <DataTemplate x:Name=\"DayTitleTemplate\">\r\n                                    <TextBlock FontWeight=\"Bold\" FontSize=\"9\" HorizontalAlignment=\"Center\" Margin=\"0,4,0,4\" Text=\"{Binding}\" VerticalAlignment=\"Center\" />\r\n                                </DataTemplate>\r\n                            </Grid.Resources>\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\" />\r\n                                <ColumnDefinition Width=\"Auto\" />\r\n                                <ColumnDefinition Width=\"Auto\" />\r\n                            </Grid.ColumnDefinitions>\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\" />\r\n                                <RowDefinition Height=\"*\" />\r\n                            </Grid.RowDefinitions>\r\n                            <Button x:Name=\"PreviousButton\" HorizontalAlignment=\"Left\" Style=\"{StaticResource OpacityButton}\" Visibility=\"Collapsed\" Width=\"30\">\r\n                                <Path Data=\"M1,0 L0,0.5 L1,1\" Stretch=\"Fill\" Fill=\"#404040\" Width=\"5\" Height=\"8\" />\r\n                            </Button>\r\n                            <Button x:Name=\"HeaderButton\" Grid.Column=\"1\" HorizontalAlignment=\"Center\" Template=\"{StaticResource HeaderButtonTemplate}\" VerticalAlignment=\"Center\" Margin=\"0,2,0,-2\" />\r\n                            <Button x:Name=\"NextButton\" Grid.Column=\"2\" HorizontalAlignment=\"Right\" Style=\"{StaticResource OpacityButton}\" Visibility=\"Collapsed\" Width=\"30\">\r\n                                <Path Data=\"M0,0 L1,0.5 L0,1\" Stretch=\"Fill\" Fill=\"#404040\" Width=\"5\" Height=\"8\" />\r\n                            </Button>\r\n                            <Grid x:Name=\"MonthView\" Grid.ColumnSpan=\"3\" Margin=\"6,6,6,6\" Grid.Row=\"1\">\r\n                                <Grid.Resources>\r\n                                    <Style TargetType=\"TextBlock\">\r\n                                        <Setter Property=\"Effect\" Value=\"{x:Null}\" />\r\n                                        <Setter Property=\"FontSize\" Value=\"9\" />\r\n                                        <Setter Property=\"Foreground\" Value=\"#9fa3aa\" />\r\n                                    </Style>\r\n                                </Grid.Resources>\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\" />\r\n                                    <ColumnDefinition Width=\"Auto\" />\r\n                                    <ColumnDefinition Width=\"Auto\" />\r\n                                    <ColumnDefinition Width=\"Auto\" />\r\n                                    <ColumnDefinition Width=\"Auto\" />\r\n                                    <ColumnDefinition Width=\"Auto\" />\r\n                                    <ColumnDefinition Width=\"Auto\" />\r\n                                </Grid.ColumnDefinitions>\r\n                                <Grid.RowDefinitions>\r\n                                    <RowDefinition Height=\"Auto\" />\r\n                                    <RowDefinition Height=\"Auto\" />\r\n                                    <RowDefinition Height=\"Auto\" />\r\n                                    <RowDefinition Height=\"Auto\" />\r\n                                    <RowDefinition Height=\"Auto\" />\r\n                                    <RowDefinition Height=\"Auto\" />\r\n                                    <RowDefinition Height=\"Auto\" />\r\n                                </Grid.RowDefinitions>\r\n                            </Grid>\r\n                            <Grid x:Name=\"YearView\" Grid.ColumnSpan=\"3\" Margin=\"6,6,7,6\" Grid.Row=\"1\" Visibility=\"Collapsed\">\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\" />\r\n                                    <ColumnDefinition Width=\"Auto\" />\r\n                                    <ColumnDefinition Width=\"Auto\" />\r\n                                    <ColumnDefinition Width=\"Auto\" />\r\n                                </Grid.ColumnDefinitions>\r\n                                <Grid.RowDefinitions>\r\n                                    <RowDefinition Height=\"Auto\" />\r\n                                    <RowDefinition Height=\"Auto\" />\r\n                                    <RowDefinition Height=\"Auto\" />\r\n                                </Grid.RowDefinitions>\r\n                            </Grid>\r\n                        </Grid>\r\n                        <Rectangle x:Name=\"DisabledVisual\" Fill=\"{StaticResource DisabledBrush}\" Opacity=\"0\" RadiusY=\"2\" RadiusX=\"2\" Stretch=\"Fill\" Stroke=\"{StaticResource DisabledBrush}\" StrokeThickness=\"1\" Visibility=\"Collapsed\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style TargetType=\"Calendar\">\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"Background\" Value=\"{StaticResource InputBackgroundBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"0\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Calendar\">\r\n                    <StackPanel x:Name=\"Root\" HorizontalAlignment=\"Center\">\r\n                        <CalendarItem x:Name=\"CalendarItem\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" />\r\n                    </StackPanel>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- \r\n\t***************************************************************************\r\n\tGridSplitter\r\n\t***************************************************************************\r\n\t-->\r\n\r\n    <Style TargetType=\"GridSplitter\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"true\" />\r\n        <Setter Property=\"Padding\" Value=\"10,3\" />\r\n        <Setter Property=\"PreviewStyle\">\r\n            <Setter.Value>\r\n                <Style TargetType=\"Control\">\r\n                    <Setter Property=\"Background\" Value=\"#FF868686\" />\r\n                    <Setter Property=\"Template\">\r\n                        <Setter.Value>\r\n                            <ControlTemplate TargetType=\"Control\">\r\n                                <Grid x:Name=\"Root\" Opacity=\".5\">\r\n                                    <Rectangle Fill=\"{TemplateBinding Background}\" />\r\n                                    <Grid x:Name=\"HorizontalTemplate\" Height=\"2\" />\r\n                                    <Grid x:Name=\"VerticalTemplate\" Visibility=\"Collapsed\" Width=\"2\" />\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                        </Setter.Value>\r\n                    </Setter>\r\n                </Style>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"GridSplitter\">\r\n                    <Grid x:Name=\"Root\" Background=\"{TemplateBinding Background}\" IsHitTestVisible=\"{TemplateBinding IsEnabled}\" d:DesignWidth=\"30\" d:DesignHeight=\"30\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\" />\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0.5\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Root\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Focused\" />\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid x:Name=\"HorizontalTemplate\" Height=\"2\" Visibility=\"Hidden\" VerticalAlignment=\"Center\">\r\n                            <Rectangle Height=\"1\" VerticalAlignment=\"Top\">\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush StartPoint=\"0,0\" EndPoint=\"1,0\">\r\n                                        <GradientStop Offset=\"0\" Color=\"#00000000\" />\r\n                                        <GradientStop Offset=\"0.2\" Color=\"#80000000\" />\r\n                                        <GradientStop Offset=\"0.8\" Color=\"#80000000\" />\r\n                                        <GradientStop Offset=\"1\" Color=\"#00000000\" />\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                            <Rectangle Height=\"1\" Margin=\"0,1,0,0\">\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush StartPoint=\"0,0\" EndPoint=\"1,0\">\r\n                                        <GradientStop Offset=\"0\" Color=\"#00FFFFFF\" />\r\n                                        <GradientStop Offset=\"0.2\" Color=\"#80FFFFFF\" />\r\n                                        <GradientStop Offset=\"0.8\" Color=\"#80FFFFFF\" />\r\n                                        <GradientStop Offset=\"1\" Color=\"#00FFFFFF\" />\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                        </Grid>\r\n                        <Grid x:Name=\"VerticalTemplate\" Visibility=\"Visible\" Width=\"2\" Background=\"{x:Null}\">\r\n                            <Rectangle HorizontalAlignment=\"Left\" Width=\"1\">\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush StartPoint=\"0,0\" EndPoint=\"0,1\">\r\n                                        <GradientStop Offset=\"0\" Color=\"#00000000\" />\r\n                                        <GradientStop Offset=\"0.2\" Color=\"#80000000\" />\r\n                                        <GradientStop Offset=\"0.8\" Color=\"#80000000\" />\r\n                                        <GradientStop Offset=\"1\" Color=\"#00000000\" />\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                            <Rectangle Margin=\"1,0,0,0\" Width=\"1\">\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush StartPoint=\"0,0\" EndPoint=\"0,1\">\r\n                                        <GradientStop Offset=\"0\" Color=\"#00FFFFFF\" />\r\n                                        <GradientStop Offset=\"0.2\" Color=\"#80FFFFFF\" />\r\n                                        <GradientStop Offset=\"0.8\" Color=\"#80FFFFFF\" />\r\n                                        <GradientStop Offset=\"1\" Color=\"#00FFFFFF\" />\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                        </Grid>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"ResizeDirection\" Value=\"Rows\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"VerticalTemplate\" Value=\"Hidden\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"HorizontalTemplate\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- \r\n\t***************************************************************************\r\n\tDataGrid (including cell, row, column header and row header styles)\r\n\t***************************************************************************\r\n\t-->\r\n\r\n    <ControlTemplate x:Key=\"DataGridCellTemplate\" TargetType=\"{x:Type DataGridCell}\">\r\n        <Grid x:Name=\"Root\" Background=\"{TemplateBinding Background}\" Margin=\"{TemplateBinding Padding}\">\r\n\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition />\r\n                <ColumnDefinition Width=\"Auto\" />\r\n            </Grid.ColumnDefinitions>\r\n            <VisualStateManager.VisualStateGroups>\r\n                <VisualStateGroup x:Name=\"CurrentStates\">\r\n                    <VisualState x:Name=\"Regular\" />\r\n                    <VisualState x:Name=\"Current\">\r\n                        <Storyboard>\r\n                            <DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"FocusVisual\" />\r\n                        </Storyboard>\r\n                    </VisualState>\r\n                </VisualStateGroup>\r\n                <VisualStateGroup x:Name=\"ValidationStates\">\r\n                    <VisualState x:Name=\"Valid\" />\r\n                    <VisualState x:Name=\"Invalid\">\r\n                        <Storyboard>\r\n                            <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"InvalidVisualElement\" />\r\n                            <ColorAnimation Duration=\"0\" To=\"#FFFFFFFF\" Storyboard.TargetProperty=\"(Fill).Color\" Storyboard.TargetName=\"FocusVisual\" />\r\n                        </Storyboard>\r\n                    </VisualState>\r\n                </VisualStateGroup>\r\n                <VisualStateGroup x:Name=\"CommonStates\">\r\n                    <VisualState x:Name=\"Normal\" />\r\n                    <VisualState x:Name=\"MouseOver\" />\r\n                </VisualStateGroup>\r\n                <VisualStateGroup x:Name=\"SelectionStates\">\r\n                    <VisualState x:Name=\"Unselected\" />\r\n                    <VisualState x:Name=\"Selected\" />\r\n                </VisualStateGroup>\r\n                <VisualStateGroup x:Name=\"FocusStates\">\r\n                    <VisualState x:Name=\"Unfocused\" />\r\n                    <VisualState x:Name=\"Focused\" />\r\n                </VisualStateGroup>\r\n                <VisualStateGroup x:Name=\"InteractionStates\">\r\n                    <VisualState x:Name=\"Display\" />\r\n                    <VisualState x:Name=\"Editing\">\r\n                        <Storyboard>\r\n\r\n                            <ThicknessAnimation BeginTime=\"00:00:00\" Storyboard.TargetName=\"Content\" Storyboard.TargetProperty=\"(FrameworkElement.Margin)\" Duration=\"0:00:00\" To=\"0\" />\r\n                        </Storyboard>\r\n                    </VisualState>\r\n                </VisualStateGroup>\r\n            </VisualStateManager.VisualStateGroups>\r\n            <Rectangle x:Name=\"FocusVisual\" Fill=\"#66FFFFFF\" HorizontalAlignment=\"Stretch\" IsHitTestVisible=\"false\" Opacity=\"0\" VerticalAlignment=\"Stretch\" />\r\n            <!--<ContentPresenter />-->\r\n            <ContentPresenter x:Name=\"Content\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Content=\"{TemplateBinding Content}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" />\r\n            <Rectangle x:Name=\"InvalidVisualElement\" HorizontalAlignment=\"Stretch\" IsHitTestVisible=\"False\" Opacity=\"0\" Stroke=\"{StaticResource ErrorBrush}\" StrokeThickness=\"1\" VerticalAlignment=\"Stretch\" />\r\n            <Rectangle x:Name=\"RightGridLine\" Grid.Column=\"1\" VerticalAlignment=\"Stretch\" Width=\"1\" Visibility=\"Hidden\" />\r\n        </Grid>\r\n    </ControlTemplate>\r\n    <Style TargetType=\"DataGridCell\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"Padding\" Value=\"0,3\" />\r\n        <Setter Property=\"Template\" Value=\"{StaticResource DataGridCellTemplate}\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"Foreground\" Value=\"#454543\" />\r\n\r\n        <Setter Property=\"TextElement.FontFamily\" Value=\"Trebuchet MS\" />\r\n\r\n    </Style>\r\n    <Style x:Key=\"CenteredCell\" TargetType=\"DataGridCell\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"Template\" Value=\"{StaticResource DataGridCellTemplate}\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n    </Style>\r\n    <Style x:Key=\"ColumnHeaderGripperStyle\" TargetType=\"{x:Type Thumb}\">\r\n        <Setter Property=\"Width\" Value=\"8\" />\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"Cursor\" Value=\"SizeWE\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <Border Background=\"{TemplateBinding Background}\" Padding=\"{TemplateBinding Padding}\" />\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style TargetType=\"DataGridColumnHeader\">\r\n        <Setter Property=\"Foreground\" Value=\"White\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"Padding\" Value=\"4\" />\r\n        <Setter Property=\"SeparatorBrush\" Value=\"#20FFFFFF\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"DataGridColumnHeader\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition />\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\" />\r\n                                <VisualState x:Name=\"Pressed\" />\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SortStates\">\r\n                                <VisualState x:Name=\"Unsorted\" />\r\n                                <VisualState x:Name=\"SortAscending\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"1.0\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"SortIcon\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"SortDescending\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"1.0\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"SortIcon\" />\r\n                                        <DoubleAnimation Duration=\"0\" To=\"-.9\" Storyboard.TargetProperty=\"(RenderTransform).ScaleY\" Storyboard.TargetName=\"SortIcon\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"NormalElement\" Grid.ColumnSpan=\"2\" Background=\"{StaticResource DataGridHeaderBrush}\" />\r\n                        <Grid HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition />\r\n                                <ColumnDefinition Width=\"Auto\" />\r\n                            </Grid.ColumnDefinitions>\r\n                            <ContentPresenter Content=\"{TemplateBinding Content}\" />\r\n                            <Path x:Name=\"SortIcon\" Grid.Column=\"1\" Data=\"F1 M -5.215,6.099L 5.215,6.099L 0,0L -5.215,6.099 Z \" Fill=\"White\" HorizontalAlignment=\"Left\" Margin=\"4,0,0,0\" Opacity=\"0\" RenderTransformOrigin=\".5,.5\" Stretch=\"Uniform\" VerticalAlignment=\"Center\" Width=\"8\">\r\n                                <Path.RenderTransform>\r\n                                    <ScaleTransform ScaleY=\".9\" ScaleX=\".9\" />\r\n                                </Path.RenderTransform>\r\n                            </Path>\r\n\r\n                        </Grid>\r\n                        <Border x:Name=\"VerticalSeparator\" BorderBrush=\"#40000000\" BorderThickness=\"1,0,0,0\" Grid.Column=\"1\" Visibility=\"{TemplateBinding SeparatorVisibility}\">\r\n                            <Rectangle Fill=\"{TemplateBinding SeparatorBrush}\" VerticalAlignment=\"Stretch\" Width=\"1\" />\r\n                        </Border>\r\n                        <Thumb x:Name=\"PART_LeftHeaderGripper\" HorizontalAlignment=\"Left\" Grid.ColumnSpan=\"2\" Style=\"{StaticResource ColumnHeaderGripperStyle}\" />\r\n\r\n                        <Thumb x:Name=\"PART_RightHeaderGripper\" HorizontalAlignment=\"Right\" Grid.ColumnSpan=\"2\" Style=\"{StaticResource ColumnHeaderGripperStyle}\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"RowHeaderGripperStyle\" TargetType=\"{x:Type Thumb}\">\r\n        <Setter Property=\"Height\" Value=\"8\" />\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"Cursor\" Value=\"SizeNS\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <Border Background=\"{TemplateBinding Background}\" Padding=\"{TemplateBinding Padding}\" />\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style TargetType=\"DataGridRowHeader\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"SeparatorBrush\" Value=\"#FFFFFFFF\" />\r\n        <Setter Property=\"SeparatorVisibility\" Value=\"Collapsed\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"DataGridRowHeader\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                            <ColumnDefinition />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition />\r\n                            <RowDefinition />\r\n                            <RowDefinition Height=\"Auto\" />\r\n                        </Grid.RowDefinitions>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"CurrentRowGlyph\" />\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"EditingRowGlyph\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"MouseOver_CurrentRow_Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"CurrentRowGlyph\" />\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"EditingRowGlyph\" />\r\n                                        <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"SelectedElement\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Normal_CurrentRow\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"CurrentRowGlyph\" />\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"EditingRowGlyph\" />\r\n                                        <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"SelectedElement\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"CurrentRowGlyph\" />\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"EditingRowGlyph\" />\r\n                                        <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"SelectedElement\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Normal_EditingRow\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"CurrentRowGlyph\" />\r\n                                        <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"EditingRowGlyph\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused_EditingRow\" />\r\n                                <VisualState x:Name=\"MouseOver_CurrentRow\" />\r\n                                <VisualState x:Name=\"MouseOver_Unfocused_EditingRow\" />\r\n                                <VisualState x:Name=\"MouseOver_EditingRow\" />\r\n                                <VisualState x:Name=\"MouseOver_Unfocused_Selected\" />\r\n                                <VisualState x:Name=\"MouseOver_Selected\" />\r\n                                <VisualState x:Name=\"MouseOver_Unfocused_CurrentRow_Selected\" />\r\n                                <VisualState x:Name=\"Unfocused_Selected\" />\r\n                                <VisualState x:Name=\"Unfocused_CurrentRow_Selected\" />\r\n                                <VisualState x:Name=\"Normal_CurrentRow_Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"CurrentRowGlyph\" />\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"EditingRowGlyph\" />\r\n                                        <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"SelectedElement\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"ValidationStates\">\r\n                                <VisualState x:Name=\"RowValid\" />\r\n                                <VisualState x:Name=\"RowInvalid\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"BackgroundRectangle\" />\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0.55\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"RowInvalidVisualElement\" />\r\n\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border BorderBrush=\"#20000000\" BorderThickness=\"0,0,1,0\" Grid.ColumnSpan=\"2\" Grid.RowSpan=\"3\">\r\n                            <Grid Background=\"{TemplateBinding Background}\">\r\n                                <Rectangle x:Name=\"RowInvalidVisualElement\" Grid.ColumnSpan=\"2\" Fill=\"{StaticResource ErrorBrush}\" Opacity=\"0\" Grid.RowSpan=\"3\" Stretch=\"Fill\" />\r\n                                <Rectangle x:Name=\"BackgroundRectangle\" Grid.ColumnSpan=\"2\" Fill=\"Transparent\" Grid.RowSpan=\"3\" Stretch=\"Fill\" />\r\n                            </Grid>\r\n                        </Border>\r\n                        <Rectangle x:Name=\"SelectedElement\" Fill=\"{DynamicResource HighlightBrushGreen}\" Grid.ColumnSpan=\"2\" Opacity=\"0\" Grid.RowSpan=\"2\" />\r\n                        <ContentPresenter Content=\"{TemplateBinding Content}\" Grid.Column=\"1\" HorizontalAlignment=\"Center\" Grid.RowSpan=\"2\" VerticalAlignment=\"Center\" />\r\n                        <Path x:Name=\"CurrentRowGlyph\" Data=\"F1 M 511.047,352.682L 511.047,342.252L 517.145,347.467L 511.047,352.682 Z \" Fill=\"White\" HorizontalAlignment=\"Center\" Height=\"10\" Margin=\"8,0,8,0\" Opacity=\"0\" Grid.RowSpan=\"2\" Stretch=\"Fill\" VerticalAlignment=\"Center\" Width=\"6\" />\r\n                        <Path x:Name=\"EditingRowGlyph\" Data=\"F1 M 511.047,352.682L 511.047,342.252L 517.145,347.467L 511.047,352.682 Z \" Fill=\"White\" HorizontalAlignment=\"Center\" Height=\"10\" Margin=\"8,0,8,0\" Opacity=\"0\" Grid.RowSpan=\"2\" Stretch=\"Fill\" VerticalAlignment=\"Center\" Width=\"6\" d:IsHidden=\"True\" />\r\n                        <Thumb x:Name=\"PART_TopHeaderGripper\" VerticalAlignment=\"Top\" Grid.RowSpan=\"3\" Style=\"{StaticResource RowHeaderGripperStyle}\" />\r\n                        <Thumb x:Name=\"PART_BottomHeaderGripper\" VerticalAlignment=\"Bottom\" Grid.RowSpan=\"3\" Style=\"{StaticResource RowHeaderGripperStyle}\" />\r\n                        <Rectangle x:Name=\"HorizontalSeparator\" Grid.ColumnSpan=\"2\" Fill=\"{TemplateBinding SeparatorBrush}\" HorizontalAlignment=\"Stretch\" Height=\"1\" Margin=\"1,0,1,0\" Grid.Row=\"2\" />\r\n\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"DataGridRow\">\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"DataGridRow\">\r\n                    <Grid x:Name=\"Root\" Background=\"{x:Null}\">\r\n                        <!--     <Grid.Resources>\r\n\r\n                    <Style TargetType=\"TextBlock\">\r\n                        <Setter Property=\"Foreground\" Value=\"White\" />\r\n                     </Style>\r\n\r\n                     <Storyboard x:Key=\"DetailsVisibleTransition\">\r\n                        <DoubleAnimation Duration=\"00:00:0.1\" Storyboard.TargetProperty=\"ContentHeight\"\r\n                              Storyboard.TargetName=\"DetailsPresenter\" />\r\n                     </Storyboard>\r\n                  </Grid.Resources>-->\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                            <ColumnDefinition />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition />\r\n                            <RowDefinition Height=\"Auto\" />\r\n                            <RowDefinition Height=\"Auto\" />\r\n                        </Grid.RowDefinitions>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" />\r\n                                    <VisualTransition From=\"MouseOver\" GeneratedDuration=\"0:0:0.1\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"MouseOverElement\" d:IsOptimized=\"True\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Normal_AlternatingRow\">\r\n\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"MouseOverElement\" d:IsOptimized=\"True\" />\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"AlternatingElement\">\r\n                                            <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n\r\n                                </VisualState>\r\n\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0.5\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"MouseOverElement\" d:IsOptimized=\"True\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Normal_Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"SelectedElement\" d:IsOptimized=\"True\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"MouseOver_Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"SelectedElement\" d:IsOptimized=\"True\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused_Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"SelectedElement\" d:IsOptimized=\"True\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused_Editing\" />\r\n                                <VisualState x:Name=\"Normal_Editing\">\r\n\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"MouseOver_Unfocused_Editing\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0.5\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"MouseOverElement\" d:IsOptimized=\"True\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"MouseOver_Editing\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0.5\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"MouseOverElement\" d:IsOptimized=\"True\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"MouseOver_Unfocused_Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0.5\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"SelectedElement\" d:IsOptimized=\"True\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"ValidationStates\">\r\n                                <VisualState x:Name=\"Valid\" />\r\n                                <VisualState x:Name=\"Invalid\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0.55\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"InvalidVisualElement\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Rectangle x:Name=\"AlternatingElement\" Fill=\"{Binding AlternatingRowBackground, Mode=OneWay, RelativeSource={RelativeSource FindAncestor,AncestorType=DataGrid}}\" Grid.ColumnSpan=\"2\" Opacity=\"0\" Grid.RowSpan=\"2\" />\r\n                        <Rectangle x:Name=\"MouseOverElement\" Fill=\"{StaticResource DataGridMouseOverBrush}\" Grid.ColumnSpan=\"2\" Opacity=\"0\" Grid.RowSpan=\"2\" />\r\n                        <!---->\r\n\t\t\t\t  \r\n                  <Rectangle x:Name=\"SelectedElement\" Fill=\"{StaticResource DataGridSelectedBrush}\" \r\n                        Grid.ColumnSpan=\"2\" Opacity=\"0\" Grid.RowSpan=\"2\" />\r\n                  <Rectangle x:Name=\"InvalidVisualElement\" Grid.ColumnSpan=\"2\" Fill=\"{StaticResource ErrorBrush}\"\r\n                        Opacity=\"0\" Grid.RowSpan=\"2\" />\r\n                  \t\t\r\n                  <DataGridRowHeader x:Name=\"RowHeader\" Grid.RowSpan=\"3\"\r\n                        Visibility=\"{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Row}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}\" />\r\n                  <DataGridCellsPresenter x:Name=\"CellsPresenter\" Grid.Column=\"1\" Padding=\"2\"\r\n                        ItemsPanel=\"{TemplateBinding ItemsPanel}\"  />\r\n                  <DataGridDetailsPresenter x:Name=\"DetailsPresenter\" Grid.Column=\"1\" Grid.Row=\"1\"\r\n                        Visibility=\"{TemplateBinding DetailsVisibility}\" />\r\n                  <Rectangle x:Name=\"BottomGridLine\" Grid.Column=\"1\" HorizontalAlignment=\"Stretch\" Height=\"1\"\r\n                        Grid.Row=\"2\" />\r\n               </Grid>\r\n            \t<ControlTemplate.Triggers>\r\n            \t\t<Trigger Property=\"ItemsControl.AlternationIndex\" Value=\"0\"/>\r\n            \t</ControlTemplate.Triggers>\r\n            </ControlTemplate>\r\n         </Setter.Value>\r\n      </Setter>\r\n   </Style>\r\n   <ControlTemplate x:Key=\"TopLeftHeaderTemplate\" TargetType=\"DataGridColumnHeader\">\r\n      <Border Background=\"{StaticResource DataGridHeaderBrush}\" CornerRadius=\"2,0,0,0\">\r\n         <Border BorderBrush=\"{TemplateBinding SeparatorBrush}\" BorderThickness=\"0,0,1,0\" Grid.Column=\"1\">\r\n            <Rectangle Fill=\"#20000000\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Stretch\" Width=\"1\" />\r\n         </Border>\r\n      </Border>\r\n   </ControlTemplate>\r\n   <ControlTemplate x:Key=\"TopRightHeaderTemplate\" TargetType=\"DataGridColumnHeader\">\r\n      <Border Background=\"{StaticResource DataGridHeaderBrush}\" CornerRadius=\"0,2,0,0\">\r\n         <Border BorderBrush=\"#20000000\" BorderThickness=\"1,0,0,0\">\r\n            <Rectangle Fill=\"{TemplateBinding SeparatorBrush}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Stretch\"\r\n                  Width=\"1\" />\r\n         </Border>\r\n      </Border>\r\n   </ControlTemplate>\r\n   <Style TargetType=\"{x:Type DataGrid}\">\r\n      <Setter Property=\"helpers:DataGridCheckBoxColumnFixer.Fix\" Value=\"True\" />\r\n      <Setter Property=\"AlternatingRowBackground\" Value=\"#ECECEC\" />\r\n      <Setter Property=\"AutoGenerateColumns\" Value=\"True\" />\r\n      <Setter Property=\"Background\" Value=\"#F6F6F6\" />\r\n      <Setter Property=\"BorderBrush\" Value=\"{StaticResource ControlBorderBrush}\" />\r\n      <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t  <Setter Property=\"TextElement.Foreground\" Value=\"Black\" />\r\n      \r\n      <Setter Property=\"CanUserReorderColumns\" Value=\"True\" />\r\n      <Setter Property=\"CanUserResizeColumns\" Value=\"True\" />\r\n      <Setter Property=\"CanUserSortColumns\" Value=\"True\" />\r\n      <Setter Property=\"CellStyle\" Value=\"{StaticResource ResourceKey={x:Type DataGridCell}}\" />\r\n      <Setter Property=\"GridLinesVisibility\" Value=\"None\" />\r\n      <Setter Property=\"HeadersVisibility\" Value=\"Column\" />\r\n      <Setter Property=\"HorizontalGridLinesBrush\" Value=\"#20000000\" />\r\n      <Setter Property=\"HorizontalScrollBarVisibility\" Value=\"Auto\" />\r\n      <Setter Property=\"IsTabStop\" Value=\"True\" />\r\n      <Setter Property=\"RowBackground\" Value=\"#00FFFFFF\" />\r\n      <Setter Property=\"RowDetailsVisibilityMode\" Value=\"VisibleWhenSelected\" />\r\n      <Setter Property=\"SelectionMode\" Value=\"Extended\" />\r\n      <Setter Property=\"VerticalGridLinesBrush\" Value=\"#20000000\" />\r\n      <Setter Property=\"VerticalScrollBarVisibility\" Value=\"Auto\" />\r\n      <!--<Setter Property=\"DragIndicatorStyle\">\r\n         <Setter.Value>\r\n            <Style TargetType=\"{x:Type DataGridColumnHeader}\">\r\n               <Setter Property=\"Foreground\" Value=\"#7FFFFFFF\" />\r\n               <Setter Property=\"Template\">\r\n                  <Setter.Value>\r\n                     <ControlTemplate TargetType=\"{x:Type DataGridColumnHeader}\">\r\n                        <Grid>\r\n                           <VisualStateManager.VisualStateGroups>\r\n                              <VisualStateGroup x:Name=\"SortStates\">\r\n                                 <VisualState x:Name=\"Unsorted\" />\r\n                                 <VisualState x:Name=\"SortAscending\">\r\n                                    <Storyboard>\r\n                                       <DoubleAnimation Duration=\"0\" To=\"1.0\" Storyboard.TargetProperty=\"Opacity\"\r\n                                             Storyboard.TargetName=\"SortIcon\" />\r\n                                    </Storyboard>\r\n                                 </VisualState>\r\n                                 <VisualState x:Name=\"SortDescending\">\r\n                                    <Storyboard>\r\n                                       <DoubleAnimation Duration=\"0\" To=\"1.0\" Storyboard.TargetProperty=\"Opacity\"\r\n                                             Storyboard.TargetName=\"SortIcon\" />\r\n                                       <DoubleAnimation Duration=\"0\" To=\"-.9\"\r\n                                             Storyboard.TargetProperty=\"(RenderTransform).ScaleY\"\r\n                                             Storyboard.TargetName=\"SortIcon\" />\r\n                                    </Storyboard>\r\n                                 </VisualState>\r\n                              </VisualStateGroup>\r\n                           </VisualStateManager.VisualStateGroups>\r\n                           <Rectangle x:Name=\"BackgroundRectangle\" Grid.ColumnSpan=\"2\" Fill=\"#66808080\" Stretch=\"Fill\" />\r\n                           <Grid HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                                 Margin=\"{TemplateBinding Padding}\"\r\n                                 VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\">\r\n                              <Grid.ColumnDefinitions>\r\n                                 <ColumnDefinition />\r\n                                 <ColumnDefinition Width=\"Auto\" />\r\n                              </Grid.ColumnDefinitions>\r\n                              <ContentPresenter Content=\"{TemplateBinding Content}\" />\r\n                              <Path x:Name=\"SortIcon\" Grid.Column=\"1\"\r\n                                    Data=\"F1 M -5.215,6.099L 5.215,6.099L 0,0L -5.215,6.099 Z \" Fill=\"#7FFFFFFF\"\r\n                                    HorizontalAlignment=\"Left\" Margin=\"4,0,0,0\" Opacity=\"0\"\r\n                                    RenderTransformOrigin=\".5,.5\" Stretch=\"Uniform\" VerticalAlignment=\"Center\" Width=\"8\">\r\n                                 <Path.RenderTransform>\r\n                                    <ScaleTransform ScaleY=\".9\" ScaleX=\".9\" />\r\n                                 </Path.RenderTransform>\r\n                              </Path>\r\n                           </Grid>\r\n                        </Grid>\r\n                     </ControlTemplate>\r\n                  </Setter.Value>\r\n               </Setter>\r\n            </Style>\r\n         </Setter.Value>\r\n      </Setter>-->\r\n                        <!--<Setter Property=\"DropLocationIndicatorStyle\">\r\n         <Setter.Value>\r\n            <Style TargetType=\"{x:Type DataGridColumnHeader}\">\r\n               <Setter Property=\"Background\" Value=\"#FF3F4346\" />\r\n               <Setter Property=\"Width\" Value=\"2\" />\r\n               <Setter Property=\"Template\">\r\n                  <Setter.Value>\r\n                     <ControlTemplate TargetType=\"{x:Type DataGridColumnHeader}\">\r\n                        <Rectangle Fill=\"{TemplateBinding Background}\" Height=\"{TemplateBinding Height}\"\r\n                              Width=\"{TemplateBinding Width}\" />\r\n                     </ControlTemplate>\r\n                  </Setter.Value>\r\n               </Setter>\r\n            </Style>\r\n         </Setter.Value>\r\n      </Setter>-->\r\n                        <Setter Property=\"ItemsPanel\">\r\n                            <Setter.Value>\r\n                                <ItemsPanelTemplate>\r\n                                    <DataGridRowsPresenter x:Name=\"PART_RowsPresenter\" IsItemsHost=\"True\" />\r\n                                </ItemsPanelTemplate>\r\n                            </Setter.Value>\r\n                        </Setter>\r\n                        <Setter Property=\"Template\">\r\n                            <Setter.Value>\r\n                                <ControlTemplate TargetType=\"{x:Type DataGrid}\">\r\n                                    <Grid>\r\n\r\n                                        <VisualStateManager.VisualStateGroups>\r\n                                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                                <VisualState x:Name=\"Normal\" />\r\n                                                <VisualState x:Name=\"Disabled\">\r\n                                                    <Storyboard>\r\n                                                        <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"DisabledVisualElement\" />\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                            </VisualStateGroup>\r\n                                            <VisualStateGroup x:Name=\"ValidationStates\">\r\n                                                <VisualState x:Name=\"Invalid\" />\r\n                                                <VisualState x:Name=\"Valid\" />\r\n                                            </VisualStateGroup>\r\n                                        </VisualStateManager.VisualStateGroups>\r\n                                        <Border Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2.5\">\r\n                                            <ScrollViewer x:Name=\"DG_ScrollViewer\" Focusable=\"false\">\r\n                                                <ScrollViewer.Template>\r\n                                                    <ControlTemplate TargetType=\"{x:Type ScrollViewer}\">\r\n                                                        <Grid x:Name=\"Root\">\r\n                                                            <!--<Grid.Resources>\r\n                           <ControlTemplate x:Key=\"TopLeftHeaderTemplate\" TargetType=\"DataGridColumnHeader\">\r\n                              <Border Background=\"{StaticResource DataGridHeaderBrush}\" CornerRadius=\"2,0,0,0\">\r\n                                 <Border BorderBrush=\"{TemplateBinding SeparatorBrush}\" BorderThickness=\"0,0,1,0\"\r\n                                       Grid.Column=\"1\">\r\n                                    <Rectangle Fill=\"#20000000\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Stretch\"\r\n                                          Width=\"1\" />\r\n                                 </Border>\r\n                              </Border>\r\n                           </ControlTemplate>\r\n                           <ControlTemplate x:Key=\"TopRightHeaderTemplate\" TargetType=\"DataGridColumnHeader\">\r\n                              <Border Background=\"{StaticResource DataGridHeaderBrush}\" CornerRadius=\"0,2,0,0\">\r\n                                 <Border BorderBrush=\"#20000000\" BorderThickness=\"1,0,0,0\">\r\n                                    <Rectangle Fill=\"{TemplateBinding SeparatorBrush}\" HorizontalAlignment=\"Left\"\r\n                                          VerticalAlignment=\"Stretch\" Width=\"1\" />\r\n                                 </Border>\r\n                              </Border>\r\n                           </ControlTemplate>\r\n                        </Grid.Resources>-->\r\n                                                            <Grid.ColumnDefinitions>\r\n                                                                <ColumnDefinition Width=\"Auto\" />\r\n                                                                <ColumnDefinition />\r\n                                                                <ColumnDefinition Width=\"Auto\" />\r\n                                                            </Grid.ColumnDefinitions>\r\n                                                            <Grid.RowDefinitions>\r\n                                                                <RowDefinition Height=\"Auto\" />\r\n                                                                <RowDefinition />\r\n                                                                <RowDefinition Height=\"Auto\" />\r\n                                                                <RowDefinition Height=\"Auto\" />\r\n                                                            </Grid.RowDefinitions>\r\n\r\n                                                            <Border x:Name=\"ColumnHeaderBackground\" Background=\"{StaticResource DataGridHeaderBrush}\" CornerRadius=\"2,2,0,0\" Grid.ColumnSpan=\"3\" MinHeight=\"28\" />\r\n                                                            <DataGridColumnHeader x:Name=\"TopLeftCornerHeader\" Visibility=\"{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.All}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}\" Template=\"{StaticResource TopLeftHeaderTemplate}\" Width=\"22\" />\r\n                                                            <Button Command=\"{x:Static DataGrid.SelectAllCommand}\" Focusable=\"false\" Opacity=\"0\" Style=\"{DynamicResource {ComponentResourceKey ResourceId=DataGridSelectAllButtonStyle, TypeInTargetAssembly={x:Type DataGrid}}}\" Visibility=\"{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.All}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}\" Width=\"{Binding CellsPanelHorizontalOffset, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}\" />\r\n                                                            <DataGridColumnHeadersPresenter x:Name=\"PART_ColumnHeadersPresenter\" Grid.Column=\"1\" />\r\n                                                            <!--<DataGridColumnHeader x:Name=\"TopRightCornerHeader\" Grid.Column=\"2\"\r\n                              Template=\"{StaticResource TopRightHeaderTemplate}\" />-->\r\n                                                            <Rectangle x:Name=\"ColumnHeadersAndRowsSeparator\" Grid.ColumnSpan=\"3\" Fill=\"#FFC9CACA\" Height=\"1\" StrokeThickness=\"1\" VerticalAlignment=\"Bottom\" Width=\"Auto\" />\r\n                                                            <!--<ItemsPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" />-->\r\n                                                            <!--<ScrollContentPresenter x:Name=\"PART_ScrollContentPresenter\"\r\n                              Grid.ColumnSpan=\"2\" Grid.Row=\"1\" />-->\r\n                                                            <!--<DataGridRowsPresenter x:Name=\"PART_RowsPresenter\" IsItemsHost=\"True\"\r\n                              SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Grid.ColumnSpan=\"2\"\r\n                              Grid.Row=\"1\">\r\n\r\n                        </DataGridRowsPresenter>-->\r\n\r\n                                                            <Border x:Name=\"BottomRightCorner\" CornerRadius=\"0,0,2,0\" Grid.Column=\"2\" Grid.Row=\"2\" />\r\n                                                            <Border x:Name=\"BottomLeftCorner\" CornerRadius=\"0,0,0,2\" Grid.ColumnSpan=\"2\" Grid.Row=\"2\" />\r\n                                                            <!--<ScrollBar x:Name=\"PART_VerticalScrollBar\" Grid.Column=\"2\" Margin=\"0\" Orientation=\"Vertical\" Grid.Row=\"1\"\r\n                        Width=\"18\" />-->\r\n                                                            <ScrollBar x:Name=\"PART_VerticalScrollBar\" Grid.Column=\"2\" Maximum=\"{TemplateBinding ScrollableHeight}\" Orientation=\"Vertical\" Grid.Row=\"1\" Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Width=\"18\" Value=\"{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" ViewportSize=\"{TemplateBinding ViewportHeight}\" />\r\n                                                            <Grid Grid.Column=\"1\" Grid.Row=\"2\">\r\n                                                                <Grid.ColumnDefinitions>\r\n                                                                    <ColumnDefinition Width=\"Auto\" />\r\n                                                                    <ColumnDefinition />\r\n                                                                </Grid.ColumnDefinitions>\r\n                                                                <Rectangle x:Name=\"FrozenColumnScrollBarSpacer\" />\r\n                                                                <!--<ScrollBar x:Name=\"PART_HorizontalScrollBar\" Grid.Column=\"1\" Height=\"18\" Orientation=\"Horizontal\" />-->\r\n\r\n                                                            </Grid>\r\n                                                            <ScrollBar x:Name=\"PART_HorizontalScrollBar\" Grid.Column=\"1\" Maximum=\"{TemplateBinding ScrollableWidth}\" Orientation=\"Horizontal\" Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Height=\"18\" Value=\"{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" ViewportSize=\"{TemplateBinding ViewportWidth}\" />\r\n                                                            <ScrollContentPresenter x:Name=\"PART_ScrollContentPresenter\" CanContentScroll=\"{TemplateBinding CanContentScroll}\" Grid.ColumnSpan=\"2\" Grid.Row=\"1\" />\r\n                                                            <Border x:Name=\"ColumnHeaderBorder\" CornerRadius=\"3,3,0,0\" Grid.ColumnSpan=\"3\" MinHeight=\"28\" BorderBrush=\"#3f3f42\" BorderThickness=\"1,1,1,0\" Margin=\"0,-1,-1,1\" />\r\n                                                            <Border x:Name=\"OuterHighlight\" BorderBrush=\"#40FFFFFF\" BorderThickness=\"0,0,1,1\" CornerRadius=\"3\" Grid.ColumnSpan=\"3\" Grid.RowSpan=\"4\" Margin=\"0,0,-2,-2\" />\r\n                                                            <Border x:Name=\"InnerShadowDark\" BorderBrush=\"#50505050\" BorderThickness=\"1,0,0,0\" CornerRadius=\"2\" Grid.ColumnSpan=\"3\" Grid.RowSpan=\"4\" Margin=\"0\" />\r\n                                                            <Border x:Name=\"InnerShadowLight\" BorderBrush=\"#20202020\" BorderThickness=\"1,1,0,0\" CornerRadius=\"1\" Grid.ColumnSpan=\"3\" Grid.RowSpan=\"4\" Margin=\"1,0,1,1\" />\r\n\r\n                                                            <!--<ValidationSummary x:Name=\"ValidationSummary\" Grid.ColumnSpan=\"3\" MaxHeight=\"90\"\r\n                                        Grid.Row=\"3\" />-->\r\n                                                        </Grid>\r\n                                                    </ControlTemplate>\r\n                                                </ScrollViewer.Template>\r\n\r\n                                                <ItemsPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" />\r\n                                                <!--//PEUT ETRE Grid.Column=\"1\"-->\r\n                                            </ScrollViewer>\r\n                                        </Border>\r\n                                        <Border x:Name=\"DisabledVisualElement\" Background=\"{StaticResource DisabledBrush}\" CornerRadius=\"2.5\" HorizontalAlignment=\"Stretch\" Height=\"Auto\" IsHitTestVisible=\"False\" Opacity=\"0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" />\r\n                                    </Grid>\r\n                                </ControlTemplate>\r\n                            </Setter.Value>\r\n                        </Setter>\r\n    </Style>\r\n\r\n    <!-- \r\n\t***************************************************************************\r\n\tLabel\r\n\t***************************************************************************\r\n\t-->\r\n\r\n    <Style TargetType=\"Label\">\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource HeaderForegroundBrush}\" />\r\n        <Setter Property=\"FontWeight\" Value=\"Bold\" />\r\n        <Setter Property=\"UseLayoutRounding\" Value=\"True\" />\r\n        <Setter Property=\"Margin\" Value=\"0,0,4,4\" />\r\n        <Setter Property=\"Effect\" Value=\"{StaticResource HeaderTextEffect}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Label\">\r\n                    <ContentPresenter />\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"PagingTextBoxStyle\" TargetType=\"TextBox\">\r\n        <Setter Property=\"BorderThickness\" Value=\"0\" />\r\n        <Setter Property=\"Background\" Value=\"{StaticResource InputBackgroundBrush}\" />\r\n        <!--<Setter Property=\"Foreground\" Value=\"{StaticResource InputForegroundBrush}\" />-->\r\n        <Setter Property=\"Padding\" Value=\"2\" />\r\n        <Setter Property=\"SelectionBrush\" Value=\"{StaticResource InputSelectionBrush}\" />\r\n        <!--<Setter Property=\"SelectionBackground\" Value=\"{StaticResource InputSelectionBrush}\" />-->\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TextBox\">\r\n                    <Grid x:Name=\"RootElement\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\" />\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation To=\"0.55\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"DisabledVisualElement\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ReadOnly\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"ReadOnlyVisualElement\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\" />\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"Border\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" CornerRadius=\"2\" Opacity=\"1\">\r\n                            <Grid>\r\n                                <Border x:Name=\"ReadOnlyVisualElement\" Background=\"{StaticResource ReadOnlyBrush}\" Opacity=\"0\" />\r\n                                <ScrollViewer x:Name=\"ContentElement\" BorderThickness=\"0\" HorizontalAlignment=\"Left\" IsTabStop=\"False\" Padding=\"{TemplateBinding Padding}\" VerticalAlignment=\"Center\" />\r\n                            </Grid>\r\n                        </Border>\r\n                        <Border x:Name=\"DisabledVisualElement\" Background=\"{StaticResource DisabledBrush}\" CornerRadius=\"2\" IsHitTestVisible=\"False\" Opacity=\"0\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- \r\n\t***************************************************************************\r\n\tTabControl\r\n\t***************************************************************************\r\n\t-->\r\n\r\n    <Style TargetType=\"TabItem\">\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"Background\" Value=\"{StaticResource DarkBackground}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource DarkControlBorderBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1,1,1,0\" />\r\n        <Setter Property=\"Padding\" Value=\"16,4\" />\r\n        <!--<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource HeaderTextStyle}\" />-->\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource NavigationForegroundColorBrush}\" />\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource ContentFontFamily}\" />\r\n        <Setter Property=\"FontSize\" Value=\"{StaticResource ContentFontSize}\" />\r\n\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"HorizontalAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"MinWidth\" Value=\"5\" />\r\n        <Setter Property=\"MinHeight\" Value=\"28\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TabItem\">\r\n                    <Grid x:Name=\"Root\" Margin=\"0,0,3,0\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\" />\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualState x:Name=\"Unselected\">\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Selected\">\r\n\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\" />\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"border1\" Height=\"1\" VerticalAlignment=\"Bottom\" Background=\"#4000\" Visibility=\"Hidden\" />\r\n\r\n                        <Border x:Name=\"border\" Padding=\"{TemplateBinding Padding}\" Background=\"{StaticResource DarkBorder}\" CornerRadius=\"2.5,2.5,0,0\" BorderThickness=\"1,1,1,0\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Width=\"Auto\" BorderBrush=\"White\">\r\n                            <ContentControl Foreground=\"#46FFFFFF\" x:Name=\"HeaderTopSelected\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Content=\"{TemplateBinding Header}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" IsTabStop=\"False\" />\r\n                        </Border>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Bottom\">\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"border\" Value=\"0,0,2.5,2.5\" />\r\n                            <Setter Property=\"BorderBrush\" TargetName=\"border\" Value=\"{DynamicResource DarkBorder}\" />\r\n\r\n                            <Setter Property=\"BorderThickness\" TargetName=\"border\" Value=\"1,0,1,1\" />\r\n                            <Setter Property=\"VerticalAlignment\" TargetName=\"border1\" Value=\"Top\" />\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"Selector.IsSelected\" Value=\"True\">\r\n\r\n                            <Setter Property=\"Visibility\" TargetName=\"border1\" Value=\"Hidden\" />\r\n                            <Setter Property=\"Background\" TargetName=\"border\" Value=\"{DynamicResource DarkBackground}\" />\r\n                            <Setter Property=\"BorderBrush\" TargetName=\"border\" Value=\"{DynamicResource DarkBorder}\" />\r\n                            <Setter Property=\"Panel.ZIndex\" TargetName=\"border\" Value=\"2\" />\r\n                            <Setter Property=\"Foreground\" TargetName=\"HeaderTopSelected\" Value=\"White\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"TabControl\">\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"Background\" Value=\"#FFFFFF\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"#404040\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"Padding\" Value=\"5\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TabControl\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"Disabled\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid x:Name=\"TemplateTop\" Effect=\"{StaticResource LightControlShadowEffect}\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition x:Name=\"ColumnDefinition0\" />\r\n                                <ColumnDefinition x:Name=\"ColumnDefinition1\" Width=\"0\" />\r\n                            </Grid.ColumnDefinitions>\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition x:Name=\"RowDefinition0\" Height=\"Auto\" />\r\n                                <RowDefinition x:Name=\"RowDefinition1\" Height=\"*\" />\r\n                            </Grid.RowDefinitions>\r\n                            <TabPanel x:Name=\"TabPanelTop\" Grid.Column=\"0\" Grid.Row=\"0\" IsItemsHost=\"True\" Margin=\"0,0,0,-1\" Panel.ZIndex=\"1\" />\r\n                            <Border x:Name=\"ContentPanel\" Grid.Column=\"0\" Grid.Row=\"1\" MinHeight=\"10\" MinWidth=\"10\" Background=\"{StaticResource DarkBackground}\" BorderBrush=\"{StaticResource DarkBorder}\" CornerRadius=\"0,2.5,2.5,2.5\" BorderThickness=\"1\">\r\n                                <ContentPresenter x:Name=\"PART_SelectedContentHost\" ContentSource=\"SelectedContent\" Margin=\"{TemplateBinding Padding}\" Cursor=\"{TemplateBinding Cursor}\" VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" />\r\n                            </Border>\r\n\r\n                        </Grid>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Bottom\">\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"TabPanelTop\" Value=\"1\" />\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition1\" Value=\"Auto\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"TabPanelTop\" Value=\"0,-1,0,0\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"ContentPanel\" Value=\"2.5,2.5,2.5,0\" />\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Left\">\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"TabPanelTop\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"TabPanelTop\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"ContentPanel\" Value=\"1\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition0\" Value=\"Auto\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition1\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition1\" Value=\"0\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"TabPanelTop\" Value=\"2,2,0,2\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Right\">\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"TabPanelTop\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"TabPanelTop\" Value=\"1\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition1\" Value=\"Auto\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition1\" Value=\"0\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"TabPanelTop\" Value=\"0,2,2,2\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n</ResourceDictionary>\r\n    "
  },
  {
    "path": "WpfToolkit/WPF.Themes/JetPack/Assets/Styles.xaml",
    "content": "﻿<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"  xmlns:System=\"clr-namespace:System;assembly=mscorlib\" xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\" xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" mc:Ignorable=\"d\">\r\n    <!--xmlns:navigation=\"clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation\" xmlns:uriMapper=\"clr-namespace:System.Windows.Navigation;assembly=System.Windows.Controls.Navigation\"-->\r\n\r\n    <ResourceDictionary.MergedDictionaries>\r\n        <ResourceDictionary Source=\"Brushes.xaml\" />\r\n        <ResourceDictionary Source=\"Fonts.xaml\" />\r\n        <ResourceDictionary Source=\"CoreStyles.xaml\" />\r\n    </ResourceDictionary.MergedDictionaries>\r\n\r\n    <!--\r\n    ***************************************************************************\r\n    A note about the width of the navigation app: this theme is designed to \r\n    max out at 960px. That keeps the content at a reasonable width on really\r\n    big screens, but if you'd like to change it, it's easy to do! Just change\r\n    the value of ContentMaxWidth (below). Or if you don't want a maxium width\r\n    for the content, then just delete the lines where it shows up.\r\n    ***************************************************************************\r\n    -->\r\n\r\n    <System:Double x:Key=\"ContentMaxWidth\">960</System:Double>\r\n\r\n    <!--\r\n    ***************************************************************************\r\n    Main Page Styles\r\n    ***************************************************************************\r\n    -->\r\n\r\n    <!--LayoutRootGridStyle-->\r\n    <Style x:Key=\"BackgroundBorderStyle\" TargetType=\"Border\">\r\n        <Setter Property=\"Background\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush StartPoint=\"0,0\" EndPoint=\"0,1\">\r\n                    <GradientStop Offset=\"0\" Color=\"#30FFFFFF\" />\r\n                    <GradientStop Offset=\"0.5\" Color=\"#00FFFFFF\" />\r\n                </LinearGradientBrush>        \r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush StartPoint=\"0,0\" EndPoint=\"0,1\">\r\n                    <GradientStop Offset=\"0\" Color=\"#30000000\" />\r\n                    <GradientStop Offset=\"0.5\" Color=\"#00000000\" />\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"MaxWidth\" Value=\"{StaticResource ContentMaxWidth}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1,0\" />\r\n    </Style>\r\n\r\n    <!--LayoutRootGridStyle-->\r\n    <Style x:Key=\"LayoutRootGridStyle\" TargetType=\"Grid\">\r\n        <Setter Property=\"MaxWidth\" Value=\"{StaticResource ContentMaxWidth}\" />\r\n        <Setter Property=\"HorizontalAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"Margin\" Value=\"46,0\" />\r\n        <Setter Property=\"VerticalAlignment\" Value=\"Top\" />\r\n    </Style>\r\n\r\n    <!--ContentBorderStyle-->\r\n    <Style x:Key=\"ContentBorderStyle\" TargetType=\"Border\">\r\n        <Setter Property=\"Background\" Value=\"{x:Null}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{x:Null}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"0,0,0,0\" />\r\n        <Setter Property=\"Margin\" Value=\"0,0,0,0\" />\r\n        <Setter Property=\"VerticalAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"HorizontalAlignment\" Value=\"Stretch\" />\r\n    </Style>\r\n\r\n    <!--ContentFrameStyle-->\r\n    <!--<Style x:Key=\"ContentFrameStyle\" TargetType=\"navigation:Frame\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\" />\r\n        <Setter Property=\"Padding\" Value=\"30,0\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n    </Style>-->\r\n\r\n    <!--NavigationGridStyle-->\r\n    <Style x:Key=\"NavigationGridStyle\" TargetType=\"Grid\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"Height\" Value=\"87\" />\r\n        <Setter Property=\"Margin\" Value=\"30,0\" />\r\n        <Setter Property=\"VerticalAlignment\" Value=\"Top\" />\r\n    </Style>\r\n\r\n    <!--BrandingBorderStyle-->\r\n    <Style x:Key=\"BrandingBorderStyle\" TargetType=\"Border\">\r\n        <Setter Property=\"Height\" Value=\"46\" />\r\n        <Setter Property=\"Margin\" Value=\"30,0\" />\r\n        <Setter Property=\"VerticalAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"HorizontalAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"Padding\" Value=\"0,5,0,0\" />\r\n    </Style>\r\n\r\n    <!--BrandingStackPanelStyle-->\r\n    <Style x:Key=\"BrandingStackPanelStyle\" TargetType=\"StackPanel\">\r\n        <Setter Property=\"HorizontalAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"Orientation\" Value=\"Vertical\" />\r\n    </Style>\r\n\r\n    <!--LogoIcon-->\r\n    <Style x:Key=\"LogoIcon\" TargetType=\"ContentControl\">\r\n        <Setter Property=\"Content\" Value=\"lorem ipsum dolor sit\" />\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource NavigationForegroundColorBrush}\" />\r\n        <Setter Property=\"Height\" Value=\"24\" />\r\n        <Setter Property=\"Margin\" Value=\"0\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ContentControl\">\r\n                    <Grid Margin=\"0,5,0,0\">\r\n                        <TextBlock Style=\"{StaticResource HeaderTextStyle}\" Text=\"{TemplateBinding Content}\" Foreground=\"{TemplateBinding Foreground}\" FontWeight=\"Normal\" FontSize=\"{TemplateBinding FontSize}\" Margin=\"10,4,0,0\" VerticalAlignment=\"Center\" Padding=\"0\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--ApplicationNameStyle-->\r\n    <Style x:Key=\"ApplicationNameStyle\" TargetType=\"TextBlock\">\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource NavigationForegroundColorBrush}\" />\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource HeadingFontFamily}\" />\r\n        <Setter Property=\"FontSize\" Value=\"{StaticResource Heading3FontSize}\" />\r\n        <Setter Property=\"FontWeight\" Value=\"Bold\" />\r\n        <Setter Property=\"TextOptions.TextHintingMode\" Value=\"Animated\" />\r\n        <Setter Property=\"Opacity\" Value=\"0.5\" />\r\n        <Setter Property=\"Margin\" Value=\"30,17,0,0\" />\r\n        <Setter Property=\"VerticalAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"HorizontalAlignment\" Value=\"Left\" />\r\n    </Style>\r\n\r\n    <!--LinksBorderStyle-->\r\n    <Style x:Key=\"LinksBorderStyle\" TargetType=\"Border\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource StaticControlBackground}\" />\r\n        <Setter Property=\"Effect\" Value=\"{StaticResource ControlShadowEffect}\" />\r\n        <Setter Property=\"Height\" Value=\"38\" />\r\n        <Setter Property=\"Margin\" Value=\"0\" />\r\n        <Setter Property=\"HorizontalAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalAlignment\" Value=\"Top\" />\r\n    </Style>\r\n\r\n    <!--LinksStackPanelStyle-->\r\n    <Style x:Key=\"LinksStackPanelStyle\" TargetType=\"StackPanel\">\r\n        <Setter Property=\"VerticalAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"HorizontalAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"Orientation\" Value=\"Horizontal\" />\r\n        <Setter Property=\"Height\" Value=\"47\" />\r\n        <Setter Property=\"Margin\" Value=\"0,0,0,0\" />\r\n    </Style>\r\n\r\n    <!--LinkStyle-->\r\n    <!--<Style x:Key=\"LinkStyle\" TargetType=\"HyperlinkButton\">\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Background\" Value=\"{StaticResource InputSelectionBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{x:Null}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource NavigationInactiveForegroundColorBrush}\" />\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource ContentFontFamily}\" />\r\n        <Setter Property=\"FontSize\" Value=\"{StaticResource Heading5FontSize}\" />\r\n        <Setter Property=\"FontWeight\" Value=\"Bold\" />\r\n        <Setter Property=\"TextOptions.TextHintingMode\" Value=\"Animated\" />\r\n        <Setter Property=\"Cursor\" Value=\"Hand\" />\r\n        <Setter Property=\"Height\" Value=\"47\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"Padding\" Value=\"24,4\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"HyperlinkButton\">\r\n                    <Grid x:Name=\"ButtonGrid\" Cursor=\"{TemplateBinding Cursor}\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"InteractiveElementBorder\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"InteractiveElementBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <EasingDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.95\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"InteractiveBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <EasingDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"InteractiveElementBorder\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"InteractiveElementBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <EasingDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.8\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"InteractiveBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <EasingDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"DisabledOverlay\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"ContentPresenter\" Storyboard.TargetProperty=\"(FrameworkElement.VerticalAlignment)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <VerticalAlignment>Center</VerticalAlignment>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledOverlay\" Storyboard.TargetProperty=\"(FrameworkElement.HorizontalAlignment)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <HorizontalAlignment>Center</HorizontalAlignment>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledOverlay\" Storyboard.TargetProperty=\"(FrameworkElement.VerticalAlignment)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <VerticalAlignment>Center</VerticalAlignment>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <EasingDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"LinkStates\">\r\n                                <VisualState x:Name=\"ActiveLink\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"ActiveBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <EasingDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"ContentBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <EasingDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"Indicator\" d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation To=\"{StaticResource NavigationActiveForegroundColor}\" BeginTime=\"00:00:00\" Duration=\"00:00:00\" Storyboard.TargetName=\"ContentPresenter\" Storyboard.TargetProperty=\"(UIElement.Foreground).(SolidColorBrush.Color)\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"InactiveLink\" />\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.35\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(Rectangle.RadiusX)\">\r\n                                            <EasingDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(Rectangle.RadiusY)\">\r\n                                            <EasingDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Path x:Name=\"Indicator\" Width=\"15\" Height=\"9\" Stretch=\"Fill\" Data=\"M0,0 L1,0 L0.5,1 Z\" Fill=\"{StaticResource ColorAccentSolidBrush}\" VerticalAlignment=\"Bottom\" Margin=\"0,0,0,0\" Effect=\"{StaticResource ControlShadowEffect}\" Opacity=\"0\" />\r\n                        <Grid Margin=\"0,0,0,9\">\r\n                            <Rectangle x:Name=\"FocusVisualElement\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Opacity=\"0\" Margin=\"-1\" RadiusX=\"1\" RadiusY=\"1\" />\r\n                            <Border x:Name=\"InteractiveBorder\" MinWidth=\"{TemplateBinding MinWidth}\" MinHeight=\"{TemplateBinding MinHeight}\" Background=\"{StaticResource StaticControlBackgroundOver}\" Opacity=\"0\" />\r\n                            <Border x:Name=\"InteractiveElementBorder\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Visibility=\"Collapsed\" />\r\n                            <Border x:Name=\"ActiveBorder\" MinWidth=\"{TemplateBinding MinWidth}\" MinHeight=\"{TemplateBinding MinHeight}\" Background=\"{StaticResource InputSelectionBrush}\" Opacity=\"0\" />\r\n                            <TextBlock x:Name=\"DisabledOverlay\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" Text=\"{TemplateBinding Content}\" Foreground=\"Purple\" Visibility=\"Collapsed\" />\r\n                            <Border x:Name=\"ContentBorder\" MinWidth=\"{TemplateBinding MinWidth}\" MinHeight=\"{TemplateBinding MinHeight}\" Opacity=\"1\" BorderBrush=\"Transparent\" BorderThickness=\"0.5,0\" />\r\n                            <ContentControl x:Name=\"ContentPresenter\" FontWeight=\"{TemplateBinding FontWeight}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Opacity=\"1\" />\r\n                        </Grid>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>-->\r\n\r\n    <!--DividerStyle-->\r\n    <Style x:Key=\"DividerStyle\" TargetType=\"Rectangle\">\r\n        <Setter Property=\"Visibility\" Value=\"Collapsed\" />\r\n    </Style>\r\n\r\n    <!--\r\n    ***************************************************************************\r\n    Style Updates for Nav Template\r\n    ***************************************************************************\r\n    -->\r\n\r\n    <!--NavBrandingStackPanelStyle-->\r\n    <!--<Style x:Key=\"NavBrandingStackPanelStyle\" TargetType=\"StackPanel\">\r\n        <Setter Property=\"HorizontalAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"Orientation\" Value=\"Horizontal\" />\r\n    </Style>-->\r\n\r\n    <!--LogoIcon-->\r\n    <!--<Style x:Key=\"NavLogoIcon\" TargetType=\"ContentControl\" BasedOn=\"{StaticResource LogoIcon}\">\r\n        <Setter Property=\"FontSize\" Value=\"12\" />\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource NavigationInactiveForegroundColorBrush}\" />\r\n        <Setter Property=\"Margin\" Value=\"8,0,0,2\" />\r\n    </Style>-->\r\n\r\n    <!--NavContentBorderStyle-->\r\n    <!--<Style x:Key=\"NavContentBorderStyle\" TargetType=\"Border\" BasedOn=\"{StaticResource ContentBorderStyle}\">\r\n        <Setter Property=\"Margin\" Value=\"0\" />\r\n    </Style>-->\r\n\r\n    <!--NavContentFrameStyle-->\r\n    <!--<Style x:Key=\"NavContentFrameStyle\" TargetType=\"navigation:Frame\" BasedOn=\"{StaticResource ContentFrameStyle}\">\r\n        <Setter Property=\"UriMapper\">\r\n            <Setter.Value>\r\n                <uriMapper:UriMapper>\r\n                    <uriMapper:UriMapping MappedUri=\"/Views/Home.xaml\" Uri=\"\" />\r\n                    <uriMapper:UriMapping MappedUri=\"/Views/{pageName}.xaml\" Uri=\"/{pageName}\" />\r\n                    <uriMapper:UriMapping MappedUri=\"/Views/{pageName}.xaml\" Uri=\"{}{pageName}\" />\r\n                </uriMapper:UriMapper>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>-->\r\n\r\n    <!--NavBrandingBorderStyle-->\r\n    <!--<Style x:Key=\"NavBrandingBorderStyle\" TargetType=\"Border\">\r\n        <Setter Property=\"Margin\" Value=\"0\" />\r\n        <Setter Property=\"VerticalAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"HorizontalAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"Padding\" Value=\"0,5,0,0\" />\r\n    </Style>-->\r\n\r\n    <!--NavLinksBorderStyle-->\r\n    <!--<Style x:Key=\"NavLinksBorderStyle\" TargetType=\"Border\" BasedOn=\"{StaticResource LinksBorderStyle}\">\r\n        <Setter Property=\"Margin\" Value=\"0\" />\r\n    </Style>-->\r\n\r\n    <!--\r\n    ***************************************************************************\r\n    Content Page Styles\r\n    ***************************************************************************\r\n    -->\r\n\r\n    <!--PageStyle-->\r\n    <Style x:Key=\"PageStyle\" TargetType=\"HeaderedContentControl\" />\r\n\r\n    <!--PageScrollViewerStyle-->\r\n    <Style x:Key=\"PageScrollViewerStyle\" TargetType=\"ScrollViewer\">\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"0,1,0,1\" />\r\n        <Setter Property=\"Margin\" Value=\"-58,-15,-58,-15\" />\r\n        <Setter Property=\"Padding\" Value=\"58,0,58,0\" />\r\n        <Setter Property=\"VerticalScrollBarVisibility\" Value=\"Auto\" />\r\n        <Setter Property=\"HorizontalScrollBarVisibility\" Value=\"Auto\" />\r\n    </Style>\r\n\r\n    <!--ContentPanelStyle-->\r\n    <Style x:Key=\"ContentPanelStyle\" TargetType=\"StackPanel\" />\r\n\r\n    <!--HeaderTextStyle-->\r\n    <Style x:Key=\"HeaderTextStyle\" TargetType=\"TextBlock\">\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource NavigationForegroundColorBrush}\" />\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource HeadingFontFamily}\" />\r\n        <Setter Property=\"FontSize\" Value=\"{StaticResource Heading1FontSize}\" />\r\n        <Setter Property=\"FontWeight\" Value=\"Bold\" />\r\n        <Setter Property=\"TextWrapping\" Value=\"Wrap\" />\r\n        <Setter Property=\"Margin\" Value=\"0,15,0,40\" />\r\n        <Setter Property=\"HorizontalAlignment\" Value=\"Left\" />\r\n    </Style>\r\n\r\n    <!--ContentTextStyle-->\r\n    <Style x:Key=\"ContentTextStyle\" TargetType=\"TextBlock\">\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource NavigationForegroundColorBrush}\" />\r\n        <Setter Property=\"FontFamily\" Value=\"{StaticResource ContentFontFamily}\" />\r\n        <Setter Property=\"FontSize\" Value=\"{StaticResource ContentFontSize}\" />\r\n        <Setter Property=\"TextWrapping\" Value=\"Wrap\" />\r\n        <Setter Property=\"Margin\" Value=\"0,2,0,2\" />\r\n        <Setter Property=\"HorizontalAlignment\" Value=\"Left\" />\r\n    </Style>\r\n\r\n    <!--PageHyperlinkButtonStyle-->\r\n    <!--<Style x:Key=\"PageHyperlinkButtonStyle\" TargetType=\"HyperlinkButton\">\r\n        <Setter Property=\"TargetName\" Value=\"_new\" />\r\n        <Setter Property=\"FontSize\" Value=\"{StaticResource DefaultFontSize}\" />\r\n        <Setter Property=\"VerticalAlignment\" Value=\"Center\" />\r\n    </Style>-->\r\n\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/JetPack/Helpers/DataGridCheckBoxColumnFixer.cs",
    "content": "﻿using System;\r\nusing System.Windows;\r\nusing System.Windows.Controls;\r\n\r\nnamespace WPF.Themes.JetPack.Helpers\r\n{\r\n    public class DataGridCheckBoxColumnFixer : DependencyObject\r\n    {\r\n        #region Fix\r\n\r\n        /// <summary>\r\n        /// Fix Attached Dependency Property\r\n        /// </summary>\r\n        public static readonly DependencyProperty FixProperty =\r\n            DependencyProperty.RegisterAttached(\"Fix\", typeof(bool), typeof(DataGridCheckBoxColumnFixer),\r\n                new FrameworkPropertyMetadata((bool)false, OnFixChanged));\r\n\r\n        private static Style _defaultElementStyle;\r\n        private static Style _defaultEditingElementStyle;\r\n\r\n        /// <summary>\r\n        /// Gets the Fix property. This dependency property \r\n        /// indicates ....\r\n        /// </summary>\r\n        public static bool GetFix(DependencyObject d)\r\n        {\r\n            return (bool)d.GetValue(FixProperty);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Sets the Fix property. This dependency property \r\n        /// indicates ....\r\n        /// </summary>\r\n        public static void SetFix(DependencyObject d, bool value)\r\n        {\r\n            d.SetValue(FixProperty, value);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles changes to the Fix property.\r\n        /// </summary>\r\n        private static void OnFixChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            bool oldFix = (bool)e.OldValue;\r\n            bool newFix = (bool)d.GetValue(FixProperty);\r\n\r\n            if (d == null) return;\r\n\r\n\r\n            DataGrid dataGrid = d as DataGrid;\r\n            if (oldFix) Unsubscribe(dataGrid);\r\n            if (!newFix) return;\r\n            if (dataGrid == null) return;\r\n            if (!dataGrid.AutoGenerateColumns) return;\r\n\r\n            dataGrid.AutoGeneratingColumn += DataGridAutoGeneratingColumn;\r\n            dataGrid.AutoGeneratedColumns += DataGridAutoGeneratedColumns;\r\n\r\n        }\r\n\r\n        static void DataGridAutoGeneratedColumns(object sender, EventArgs e)\r\n        {\r\n            var dataGrid = sender as DataGrid;\r\n            Unsubscribe(dataGrid);\r\n        }\r\n\r\n        private static void Unsubscribe(DataGrid dataGrid)\r\n        {\r\n            if (dataGrid != null)\r\n            {\r\n                dataGrid.AutoGeneratingColumn -= DataGridAutoGeneratingColumn;\r\n                dataGrid.AutoGeneratedColumns -= DataGridAutoGeneratedColumns;\r\n            }\r\n        }\r\n\r\n        public static Style DefaultElementStyle\r\n        {\r\n            get\r\n            {\r\n                if (_defaultElementStyle == null)\r\n                {\r\n                    Style baseStyle = Application.Current.FindResource(typeof(CheckBox)) as Style;\r\n\r\n                    Style style;\r\n                    if (baseStyle != null)\r\n                    {\r\n                        style = new Style(typeof(CheckBox), baseStyle);\r\n                    }\r\n                    else\r\n                    {\r\n                        style = new Style(typeof(CheckBox));\r\n                    }\r\n                    \r\n                    style.Setters.Add(new Setter(CheckBox.HorizontalAlignmentProperty, HorizontalAlignment.Center));\r\n                    style.Setters.Add(new Setter(CheckBox.VerticalAlignmentProperty, VerticalAlignment.Top));\r\n                    style.Seal();\r\n                    _defaultElementStyle = style;\r\n                }\r\n\r\n                return _defaultElementStyle;\r\n            }\r\n        }\r\n\r\n\r\n        public static Style DefaultEditingElementStyle\r\n        {\r\n            get\r\n            {\r\n                if (_defaultEditingElementStyle == null)\r\n                {\r\n                    Style baseStyle = Application.Current.FindResource(typeof(CheckBox)) as Style;\r\n\r\n                    Style style;\r\n                    if (baseStyle != null)\r\n                    {\r\n                        style = new Style(typeof(CheckBox), baseStyle);\r\n                    }\r\n                    else\r\n                    {\r\n                        style = new Style(typeof(CheckBox));\r\n                    }\r\n\r\n\r\n                    // When not in edit mode, the end-user should not be able to toggle the state\r\n                    style.Setters.Add(new Setter(UIElement.IsHitTestVisibleProperty, false));\r\n                    style.Setters.Add(new Setter(UIElement.FocusableProperty, false));\r\n                    style.Setters.Add(new Setter(CheckBox.HorizontalAlignmentProperty, HorizontalAlignment.Center));\r\n                    style.Setters.Add(new Setter(CheckBox.VerticalAlignmentProperty, VerticalAlignment.Top));\r\n                    style.Seal();\r\n                    _defaultEditingElementStyle = style;\r\n                }\r\n\r\n                return _defaultEditingElementStyle;\r\n            }\r\n        }\r\n\r\n        static void DataGridAutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e)\r\n        {\r\n            if (!(e.Column is DataGridCheckBoxColumn)) return;\r\n\r\n            var checkBoxColumn = e.Column as DataGridCheckBoxColumn;\r\n\r\n            checkBoxColumn.ElementStyle = DefaultElementStyle;\r\n            checkBoxColumn.EditingElementStyle = DefaultEditingElementStyle;\r\n        }\r\n\r\n        #endregion\r\n\r\n\r\n\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/WPF.Themes/JetPack/Helpers/GridLengthAnimation.cs",
    "content": "﻿using System;\r\nusing System.Windows;\r\nusing System.Windows.Media.Animation;\r\n\r\nnamespace WPF.Themes.JetPack.Helpers\r\n{\r\n\r\n    /// <summary>\r\n    /// Enables animation on gridLength(column and rows)\r\n    /// </summary>\r\n    public class GridLengthAnimation : AnimationTimeline\r\n    {\r\n        public override Type TargetPropertyType\r\n        {\r\n            get { return typeof(GridLength); }\r\n        }\r\n\r\n        protected override System.Windows.Freezable CreateInstanceCore()\r\n        {\r\n            return new GridLengthAnimation();\r\n        }\r\n\r\n        #region From\r\n\r\n        /// <summary>\r\n        /// From Dependency Property\r\n        /// </summary>\r\n        public static readonly DependencyProperty FromProperty =\r\n            DependencyProperty.Register(\"From\", typeof(GridLength), typeof(GridLengthAnimation),\r\n                new FrameworkPropertyMetadata((GridLength)GridLength.Auto));\r\n\r\n        /// <summary>\r\n        /// Gets or sets the From property. This dependency property \r\n        /// indicates the from value of the animation.\r\n        /// </summary>\r\n        public GridLength From\r\n        {\r\n            get { return (GridLength)GetValue(FromProperty); }\r\n            set { SetValue(FromProperty, value); }\r\n        }\r\n\r\n        #endregion\r\n\r\n        #region To\r\n\r\n        /// <summary>\r\n        /// To Dependency Property\r\n        /// </summary>\r\n        public static readonly DependencyProperty ToProperty =\r\n            DependencyProperty.Register(\"To\", typeof(GridLength), typeof(GridLengthAnimation),\r\n                new FrameworkPropertyMetadata((GridLength)GridLength.Auto));\r\n\r\n        /// <summary>\r\n        /// Gets or sets the To property. This dependency property \r\n        /// indicates the to value of the animation.\r\n        /// </summary>\r\n        public GridLength To\r\n        {\r\n            get { return (GridLength)GetValue(ToProperty); }\r\n            set { SetValue(ToProperty, value); }\r\n        }\r\n\r\n        #endregion\r\n\r\n\r\n\r\n        public override object GetCurrentValue(object defaultOriginValue, object defaultDestinationValue, AnimationClock clock)\r\n        {\r\n            //The main job is to convert the value from GridLenght to Double :)\r\n            \r\n            double fromValue = From.Value;\r\n            double toValue = To.Value;\r\n\r\n            if (fromValue > toValue)\r\n            {\r\n                return new GridLength((1 - clock.CurrentProgress.Value) *\r\n                    (fromValue - toValue) + toValue, GridUnitType.Star);\r\n            }\r\n            else\r\n            {\r\n                return new GridLength(clock.CurrentProgress.Value *\r\n                    (toValue - fromValue) + fromValue, GridUnitType.Star);\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/WPF.Themes/JetPack/Theme.xaml",
    "content": "﻿<ResourceDictionary\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\">\r\n  <ResourceDictionary.MergedDictionaries>\r\n    <ResourceDictionary\r\n        Source=\"/DotNetProjects.WPF.Themes;component/JetPack/Assets/Brushes.xaml\" />\r\n    <ResourceDictionary\r\n        Source=\"/DotNetProjects.WPF.Themes;component/JetPack/Assets/Fonts.xaml\" />\r\n    <ResourceDictionary\r\n        Source=\"/DotNetProjects.WPF.Themes;component/JetPack/Assets/CoreStyles.xaml\" />\r\n    <ResourceDictionary\r\n        Source=\"/DotNetProjects.WPF.Themes;component/JetPack/Assets/Styles.xaml\" />\r\n    <ResourceDictionary\r\n        Source=\"/DotNetProjects.WPF.Themes;component/JetPack/Assets/SdkStyles.xaml\" />\r\n    \r\n  </ResourceDictionary.MergedDictionaries>\r\n  \r\n  <!--THIS IS A FIX : do not remove it !--> \r\n  <Style TargetType=\"{x:Type Rectangle}\" />\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/MetroDark/MetroDark.MSControls.Toolkit.Implicit.xaml",
    "content": "﻿<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n                    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n                    xmlns:inputToolkit=\"clr-namespace:System.Windows.Controls;assembly=DotNetProjects.Input.Toolkit\"\r\n                    xmlns:inputToolkitPrimitives=\"clr-namespace:System.Windows.Controls.Primitives;assembly=DotNetProjects.Input.Toolkit\"\r\n                    xmlns:layoutToolkit=\"clr-namespace:System.Windows.Controls;assembly=DotNetProjects.Layout.Toolkit\"\r\n                    xmlns:layoutToolkitPrimitives=\"clr-namespace:System.Windows.Controls.Primitives;assembly=DotNetProjects.Layout.Toolkit\"\r\n                    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n                    xmlns:sys=\"clr-namespace:System;assembly=mscorlib\"\r\n                    mc:Ignorable=\"d\">\r\n\r\n    <!--  *********************************  RESOURCES  *********************************  -->\r\n    <ResourceDictionary.MergedDictionaries>\r\n        <ResourceDictionary Source=\"Styles.WPF.xaml\" />\r\n    </ResourceDictionary.MergedDictionaries>\r\n\r\n    <!--  *********************************  BRUSHES  *********************************  -->\r\n    <!--  Rating Brushes  -->\r\n    <SolidColorBrush x:Key=\"RatingReadOnlyBackgroundBrush\" Color=\"{StaticResource Color_013}\" />\r\n    <SolidColorBrush x:Key=\"RatingReadOnlyBorderBrush\" Color=\"{StaticResource Color_013}\" />\r\n    <SolidColorBrush x:Key=\"RatingDisabledBackgroundBrush\" Color=\"{StaticResource Color_004}\" />\r\n    <SolidColorBrush x:Key=\"RatingDisabledBorderBrush\" Color=\"{StaticResource Color_013}\" />\r\n\r\n    <!--  RatingItem Brushes  -->\r\n    <SolidColorBrush x:Key=\"RatingItemBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n    <SolidColorBrush x:Key=\"RatingItemBorderBrush\" Color=\"{StaticResource Color_004}\" />\r\n    <SolidColorBrush x:Key=\"RatingItemHoverBackgroundBrush\" Color=\"{StaticResource Color_023}\" />\r\n    <SolidColorBrush x:Key=\"RatingItemHoverBorderBrush\" Color=\"{StaticResource Color_023}\" />\r\n    <SolidColorBrush x:Key=\"RatingItemActiveBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n    <SolidColorBrush x:Key=\"RatingItemActiveBorderBrush\" Color=\"{StaticResource Color_024}\" />\r\n    <SolidColorBrush x:Key=\"RatingItemReadOnlyBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n    <SolidColorBrush x:Key=\"RatingItemReadOnlyBorderBrush\" Color=\"{StaticResource Color_024}\" />\r\n    <SolidColorBrush x:Key=\"RatingItemDisabledBackgroundBrush\" Color=\"{StaticResource Color_008}\" />\r\n    <SolidColorBrush x:Key=\"RatingItemDisabledBorderBrush\" Color=\"{StaticResource Color_005}\" />\r\n\r\n    <!--  Accordion Brushes  -->\r\n    <SolidColorBrush x:Key=\"AccordionBorderBrush\" Color=\"{StaticResource Color_004}\" />\r\n    <SolidColorBrush x:Key=\"AccordionBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n    <SolidColorBrush x:Key=\"AccordionItemBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n    <SolidColorBrush x:Key=\"AccordionButtonBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n    <SolidColorBrush x:Key=\"AccordionButtonBorderBrush\" Color=\"{StaticResource Color_004}\" />\r\n    <SolidColorBrush x:Key=\"AccordionButtonHoverBackgroundBrush\" Color=\"{StaticResource Color_006}\" />\r\n    <SolidColorBrush x:Key=\"AccordionButtonHoverBorderBrush\" Color=\"{StaticResource Color_003}\" />\r\n    <SolidColorBrush x:Key=\"AccordionButtonPressedBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n    <SolidColorBrush x:Key=\"AccordionButtonPressedBorderBrush\" Color=\"{StaticResource Color_024}\" />\r\n    <SolidColorBrush x:Key=\"AccordionButtonExpandedBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n    <SolidColorBrush x:Key=\"AccordionButtonExpandedBorderBrush\" Color=\"{StaticResource Color_024}\" />\r\n    <SolidColorBrush x:Key=\"AccordionArrowBackgroundBrush\" Color=\"{StaticResource Color_003}\" />\r\n    <SolidColorBrush x:Key=\"AccordionArrowExpandedBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\r\n    <!--  ********************************** RatingItem Style **********************************  -->\r\n    <Style x:Key=\"RatingItemStyle\" TargetType=\"{x:Type inputToolkit:RatingItem}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type inputToolkit:RatingItem}\">\r\n                    <Grid Width=\"30\"\r\n                          Margin=\"2 0\"\r\n                          Background=\"{TemplateBinding Background}\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"30\" />\r\n                            <RowDefinition Height=\"Auto\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Border Background=\"{StaticResource TransparentBrush}\" BorderThickness=\"0\" />\r\n                        <Rectangle Margin=\"-2 0\" Fill=\"{StaticResource TransparentBrush}\" />\r\n                        <Path x:Name=\"DefaultRatingItem\"\r\n                              VerticalAlignment=\"Stretch\"\r\n                              Data=\"M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z\"\r\n                              Fill=\"{StaticResource RatingItemBackgroundBrush}\"\r\n                              Opacity=\"1\"\r\n                              Stretch=\"Fill\"\r\n                              Stroke=\"{StaticResource RatingItemBorderBrush}\"\r\n                              StrokeLineJoin=\"Round\"\r\n                              StrokeThickness=\"0.4\"\r\n                              UseLayoutRounding=\"False\" />\r\n\r\n                        <inputToolkitPrimitives:LinearClipper ExpandDirection=\"Right\" RatioVisible=\"{TemplateBinding DisplayValue}\">\r\n                            <Path VerticalAlignment=\"Stretch\"\r\n                                  Data=\"M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z\"\r\n                                  Fill=\"{TemplateBinding Foreground}\"\r\n                                  Opacity=\"1\"\r\n                                  Stretch=\"Fill\"\r\n                                  Stroke=\"{x:Null}\"\r\n                                  StrokeLineJoin=\"Round\"\r\n                                  UseLayoutRounding=\"False\" />\r\n                        </inputToolkitPrimitives:LinearClipper>\r\n\r\n                        <Path x:Name=\"MouseOverRatingItem\"\r\n                              VerticalAlignment=\"Stretch\"\r\n                              Data=\"M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z\"\r\n                              Fill=\"{StaticResource RatingItemHoverBackgroundBrush}\"\r\n                              Opacity=\"0\"\r\n                              Stretch=\"Fill\"\r\n                              Stroke=\"{StaticResource RatingItemHoverBorderBrush}\"\r\n                              StrokeLineJoin=\"Round\"\r\n                              StrokeThickness=\"0.4\"\r\n                              UseLayoutRounding=\"False\" />\r\n\r\n                        <Path x:Name=\"PressedRatingItem\"\r\n                              VerticalAlignment=\"Stretch\"\r\n                              Data=\"M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z\"\r\n                              Fill=\"{StaticResource RatingItemActiveBackgroundBrush}\"\r\n                              Opacity=\"0\"\r\n                              Stretch=\"Fill\"\r\n                              Stroke=\"{StaticResource RatingItemActiveBorderBrush}\"\r\n                              StrokeLineJoin=\"Round\"\r\n                              UseLayoutRounding=\"False\" />\r\n\r\n                        <Path x:Name=\"ReadOnlyRatingItem\"\r\n                              VerticalAlignment=\"Stretch\"\r\n                              Data=\"M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z\"\r\n                              Fill=\"{StaticResource RatingItemReadOnlyBackgroundBrush}\"\r\n                              IsHitTestVisible=\"False\"\r\n                              Opacity=\"0\"\r\n                              Stretch=\"Fill\"\r\n                              Stroke=\"{StaticResource RatingItemReadOnlyBorderBrush}\"\r\n                              StrokeLineJoin=\"Round\"\r\n                              StrokeThickness=\"0.4\"\r\n                              UseLayoutRounding=\"False\" />\r\n\r\n                        <Path x:Name=\"DisabledRatingItemBackground\"\r\n                              VerticalAlignment=\"Stretch\"\r\n                              Data=\"M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z\"\r\n                              Fill=\"{StaticResource RatingItemDisabledBackgroundBrush}\"\r\n                              Opacity=\"0\"\r\n                              Stretch=\"Fill\"\r\n                              Stroke=\"{StaticResource RatingItemDisabledBorderBrush}\"\r\n                              StrokeLineJoin=\"Round\"\r\n                              UseLayoutRounding=\"False\" />\r\n\r\n                        <inputToolkitPrimitives:LinearClipper x:Name=\"DisabledRatingItem\"\r\n                                                              ExpandDirection=\"Right\"\r\n                                                              Opacity=\"0\"\r\n                                                              RatioVisible=\"{TemplateBinding DisplayValue}\">\r\n                            <Path VerticalAlignment=\"Stretch\"\r\n                                  Data=\"M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z\"\r\n                                  Fill=\"{StaticResource RatingItemDisabledBackgroundBrush}\"\r\n                                  Opacity=\"1\"\r\n                                  Stretch=\"Fill\"\r\n                                  Stroke=\"{StaticResource RatingItemDisabledBorderBrush}\"\r\n                                  StrokeLineJoin=\"Round\"\r\n                                  UseLayoutRounding=\"False\" />\r\n                        </inputToolkitPrimitives:LinearClipper>\r\n                        <ContentPresenter x:Name=\"Content\"\r\n                                          Grid.Row=\"1\"\r\n                                          Grid.RowSpan=\"2\"\r\n                                          Margin=\"{TemplateBinding Padding}\"\r\n                                          HorizontalAlignment=\"Left\"\r\n                                          ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                                          Cursor=\"{TemplateBinding Cursor}\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Setter TargetName=\"MouseOverRatingItem\" Property=\"Opacity\" Value=\"1\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"True\">\r\n                            <Setter TargetName=\"PressedRatingItem\" Property=\"Opacity\" Value=\"1\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter TargetName=\"DisabledRatingItem\" Property=\"Opacity\" Value=\"1\" />\r\n                            <Setter TargetName=\"DisabledRatingItemBackground\" Property=\"Opacity\" Value=\"1\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsReadOnly\" Value=\"True\">\r\n                            <Setter TargetName=\"ReadOnlyRatingItem\" Property=\"Opacity\" Value=\"0.7\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  ********************************** Rating Style **********************************  -->\r\n    <Style x:Key=\"RatingStyle\" TargetType=\"{x:Type inputToolkit:Rating}\">\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource RatingItemActiveBackgroundBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"{StaticResource TransparentBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource TransparentBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"0\" />\r\n        <Setter Property=\"ItemContainerStyle\" Value=\"{StaticResource RatingItemStyle}\" />\r\n        <Setter Property=\"ItemsPanel\">\r\n            <Setter.Value>\r\n                <ItemsPanelTemplate>\r\n                    <StackPanel IsItemsHost=\"True\" Orientation=\"Horizontal\" />\r\n                </ItemsPanelTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type inputToolkit:Rating}\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <Border Background=\"{TemplateBinding Background}\"\r\n                                BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                                BorderThickness=\"{TemplateBinding BorderThickness}\">\r\n                            <ItemsPresenter />\r\n                        </Border>\r\n                        <Border x:Name=\"ReadOnlyVisualElement\"\r\n                                Background=\"{StaticResource RatingReadOnlyBackgroundBrush}\"\r\n                                BorderBrush=\"{StaticResource RatingReadOnlyBorderBrush}\"\r\n                                BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                                IsHitTestVisible=\"False\"\r\n                                Opacity=\"0\" />\r\n                        <Border x:Name=\"DisabledVisualElement\"\r\n                                Background=\"{StaticResource RatingDisabledBackgroundBrush}\"\r\n                                BorderBrush=\"{StaticResource RatingDisabledBorderBrush}\"\r\n                                BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                                IsHitTestVisible=\"False\"\r\n                                Opacity=\"0\" />\r\n                        <Rectangle x:Name=\"FocusVisualElement\"\r\n                                   IsHitTestVisible=\"false\"\r\n                                   RadiusX=\"1\"\r\n                                   RadiusY=\"1\"\r\n                                   StrokeThickness=\"1\"\r\n                                   Visibility=\"Collapsed\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsReadOnly\" Value=\"True\">\r\n                            <Setter TargetName=\"ReadOnlyVisualElement\" Property=\"Opacity\" Value=\"0.03\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  *********************************  AccordionButton Style  *********************************  -->\r\n    <Style x:Key=\"AccordionButtonStyle\" TargetType=\"layoutToolkitPrimitives:AccordionButton\">\r\n        <Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n        <Setter Property=\"FontSize\" Value=\"14.667\" />\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"{StaticResource AccordionButtonBackgroundBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource AccordionButtonBorderBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Padding\" Value=\"5,7\" />\r\n        <Setter Property=\"MinHeight\" Value=\"30\" />\r\n        <Setter Property=\"HorizontalAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"True\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"layoutToolkitPrimitives:AccordionButton\">\r\n                    <Grid Margin=\"{TemplateBinding Padding}\" Background=\"{StaticResource TransparentBrush}\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"ExpandDirectionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"ExpandDown\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\"\r\n                                                                       Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"icon\"\r\n                                                                       Storyboard.TargetProperty=\"(Grid.Column)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>0</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\"\r\n                                                                       Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"icon\"\r\n                                                                       Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>0</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\"\r\n                                                                       Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"header\"\r\n                                                                       Storyboard.TargetProperty=\"(Grid.Column)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\"\r\n                                                                       Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"header\"\r\n                                                                       Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>0</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\"\r\n                                                                       Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"cd0\"\r\n                                                                       Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>Auto</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\"\r\n                                                                       Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"cd1\"\r\n                                                                       Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>*</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimation BeginTime=\"00:00:00\"\r\n                                                         Duration=\"00:00:00\"\r\n                                                         Storyboard.TargetName=\"arrow\"\r\n                                                         Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)\"\r\n                                                         To=\"-90\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ExpandUp\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\"\r\n                                                                       Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"icon\"\r\n                                                                       Storyboard.TargetProperty=\"(Grid.Column)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\"\r\n                                                                       Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"icon\"\r\n                                                                       Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\"\r\n                                                                       Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"header\"\r\n                                                                       Storyboard.TargetProperty=\"(Grid.Column)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>0</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\"\r\n                                                                       Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"header\"\r\n                                                                       Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\"\r\n                                                                       Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"cd0\"\r\n                                                                       Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>*</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\"\r\n                                                                       Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"cd1\"\r\n                                                                       Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>Auto</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimation BeginTime=\"00:00:00\"\r\n                                                         Duration=\"00:00:00\"\r\n                                                         Storyboard.TargetName=\"arrow\"\r\n                                                         Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)\"\r\n                                                         To=\"90\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ExpandLeft\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\"\r\n                                                                       Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"icon\"\r\n                                                                       Storyboard.TargetProperty=\"(Grid.Column)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\"\r\n                                                                       Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"icon\"\r\n                                                                       Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>0</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\"\r\n                                                                       Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"header\"\r\n                                                                       Storyboard.TargetProperty=\"(Grid.Column)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\"\r\n                                                                       Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"header\"\r\n                                                                       Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\"\r\n                                                                       Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"rd0\"\r\n                                                                       Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>Auto</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\"\r\n                                                                       Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"rd1\"\r\n                                                                       Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>*</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\"\r\n                                                                       Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"header\"\r\n                                                                       Storyboard.TargetProperty=\"LayoutTransform\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <TransformGroup>\r\n                                                        <RotateTransform Angle=\"90\" />\r\n                                                    </TransformGroup>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimation BeginTime=\"00:00:00\"\r\n                                                         Duration=\"00:00:00\"\r\n                                                         Storyboard.TargetName=\"arrow\"\r\n                                                         Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)\"\r\n                                                         To=\"0\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ExpandRight\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\"\r\n                                                                       Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"icon\"\r\n                                                                       Storyboard.TargetProperty=\"(Grid.Column)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>0</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\"\r\n                                                                       Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"icon\"\r\n                                                                       Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\"\r\n                                                                       Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"header\"\r\n                                                                       Storyboard.TargetProperty=\"(Grid.Column)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>0</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\"\r\n                                                                       Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"header\"\r\n                                                                       Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>0</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\"\r\n                                                                       Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"rd0\"\r\n                                                                       Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>*</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\"\r\n                                                                       Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"rd1\"\r\n                                                                       Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>Auto</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"0\"\r\n                                                                       Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"header\"\r\n                                                                       Storyboard.TargetProperty=\"LayoutTransform\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <TransformGroup>\r\n                                                        <RotateTransform Angle=\"-90\" />\r\n                                                    </TransformGroup>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimation BeginTime=\"00:00:00\"\r\n                                                         Duration=\"00:00:00\"\r\n                                                         Storyboard.TargetName=\"arrow\"\r\n                                                         Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)\"\r\n                                                         To=\"180\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"ExpansionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Collapsed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation BeginTime=\"00:00:00\"\r\n                                                         Duration=\"00:00:00.3\"\r\n                                                         Storyboard.TargetName=\"icon\"\r\n                                                         Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)\"\r\n                                                         To=\"0\" />\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"contentControl\" Storyboard.TargetProperty=\"(Foreground)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ForegroundBrush}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Expanded\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation BeginTime=\"00:00:00\"\r\n                                                         Duration=\"00:00:00.3\"\r\n                                                         Storyboard.TargetName=\"icon\"\r\n                                                         Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)\"\r\n                                                         To=\"90\" />\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(Path.Fill)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource AccordionArrowExpandedBackgroundBrush}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"contentControl\" Storyboard.TargetProperty=\"(Foreground)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource LightForegroundBrush}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                                       Duration=\"00:00:00.0010000\"\r\n                                                                       Storyboard.TargetName=\"ExpandedBackground\"\r\n                                                                       Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Checked\" />\r\n                                <VisualState x:Name=\"Unchecked\" />\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                    <VisualTransition From=\"MouseOver\"\r\n                                                      GeneratedDuration=\"00:00:00.1\"\r\n                                                      To=\"Normal\" />\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\" />\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                                       Duration=\"00:00:00.0010000\"\r\n                                                                       Storyboard.TargetName=\"MouseOverBackground\"\r\n                                                                       Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"contentControl\" Storyboard.TargetProperty=\"(Foreground)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource LightForegroundBrush}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                                       Duration=\"00:00:00.0010000\"\r\n                                                                       Storyboard.TargetName=\"PressedBackground\"\r\n                                                                       Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(Path.Fill)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource AccordionArrowExpandedBackgroundBrush}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"contentControl\" Storyboard.TargetProperty=\"(Foreground)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource LightForegroundBrush}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard />\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\" />\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border>\r\n                            <Grid>\r\n                                <Border x:Name=\"Background\"\r\n                                        Height=\"Auto\"\r\n                                        Margin=\"0\"\r\n                                        VerticalAlignment=\"Stretch\"\r\n                                        Background=\"{TemplateBinding Background}\"\r\n                                        BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                                        BorderThickness=\"{TemplateBinding BorderThickness}\" />\r\n                                <Border x:Name=\"ExpandedBackground\"\r\n                                        Height=\"Auto\"\r\n                                        Margin=\"0\"\r\n                                        VerticalAlignment=\"Stretch\"\r\n                                        Background=\"{StaticResource AccordionButtonExpandedBackgroundBrush}\"\r\n                                        BorderBrush=\"{StaticResource AccordionButtonExpandedBorderBrush}\"\r\n                                        BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                                        Opacity=\"0\" />\r\n                                <Border x:Name=\"MouseOverBackground\"\r\n                                        Height=\"Auto\"\r\n                                        Margin=\"0\"\r\n                                        VerticalAlignment=\"Stretch\"\r\n                                        Background=\"{StaticResource AccordionButtonHoverBackgroundBrush}\"\r\n                                        BorderBrush=\"{StaticResource AccordionButtonHoverBorderBrush}\"\r\n                                        BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                                        Opacity=\"0\" />\r\n                                <Border x:Name=\"PressedBackground\"\r\n                                        Height=\"Auto\"\r\n                                        Margin=\"0\"\r\n                                        VerticalAlignment=\"Stretch\"\r\n                                        Background=\"{StaticResource AccordionButtonPressedBackgroundBrush}\"\r\n                                        BorderBrush=\"{StaticResource AccordionButtonPressedBorderBrush}\"\r\n                                        BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                                        Opacity=\"0\" />\r\n                                <Grid Background=\"{StaticResource TransparentBrush}\">\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition x:Name=\"cd0\" Width=\"Auto\" />\r\n                                        <ColumnDefinition x:Name=\"cd1\" Width=\"Auto\" />\r\n                                    </Grid.ColumnDefinitions>\r\n                                    <Grid.RowDefinitions>\r\n                                        <RowDefinition x:Name=\"rd0\" Height=\"Auto\" />\r\n                                        <RowDefinition x:Name=\"rd1\" Height=\"Auto\" />\r\n                                    </Grid.RowDefinitions>\r\n                                    <Grid x:Name=\"icon\"\r\n                                          Grid.Row=\"0\"\r\n                                          Grid.Column=\"0\"\r\n                                          Width=\"19\"\r\n                                          Height=\"19\"\r\n                                          HorizontalAlignment=\"Center\"\r\n                                          VerticalAlignment=\"Center\"\r\n                                          RenderTransformOrigin=\"0.5,0.5\">\r\n                                        <Grid.RenderTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform />\r\n                                                <SkewTransform />\r\n                                                <RotateTransform Angle=\"-90\" />\r\n                                                <TranslateTransform />\r\n                                            </TransformGroup>\r\n                                        </Grid.RenderTransform>\r\n                                        <Path x:Name=\"arrow\"\r\n                                              Width=\"Auto\"\r\n                                              Height=\"4\"\r\n                                              Margin=\"0,0,0,0\"\r\n                                              HorizontalAlignment=\"Center\"\r\n                                              VerticalAlignment=\"Center\"\r\n                                              Data=\"F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z\"\r\n                                              Fill=\"{StaticResource AccordionArrowBackgroundBrush}\"\r\n                                              RenderTransformOrigin=\"0.5,0.5\"\r\n                                              Stretch=\"Uniform\">\r\n                                            <Path.RenderTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform />\r\n                                                    <SkewTransform />\r\n                                                    <RotateTransform />\r\n                                                    <TranslateTransform />\r\n                                                </TransformGroup>\r\n                                            </Path.RenderTransform>\r\n                                        </Path>\r\n                                    </Grid>\r\n                                    <ContentControl x:Name=\"contentControl\"\r\n                                                    Grid.Row=\"0\"\r\n                                                    Grid.RowSpan=\"1\"\r\n                                                    Grid.Column=\"1\"\r\n                                                    Margin=\"6,6,6,0\"\r\n                                                    HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\">\r\n                                        <ContentPresenter x:Name=\"header\"\r\n                                                          Content=\"{TemplateBinding Content}\"\r\n                                                          ContentTemplate=\"{TemplateBinding ContentTemplate}\" />\r\n                                    </ContentControl>\r\n                                </Grid>\r\n                            </Grid>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  *********************************  ExpandableContentControl Style  *********************************  -->\r\n    <Style x:Key=\"ExpandableContentControlStyle\" TargetType=\"layoutToolkitPrimitives:ExpandableContentControl\">\r\n        <Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n        <Setter Property=\"FontSize\" Value=\"13.333\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"0\" />\r\n        <Setter Property=\"Padding\" Value=\"15,7\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"IsEnabled\" Value=\"true\" />\r\n        <Setter Property=\"Cursor\" Value=\"Arrow\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"layoutToolkitPrimitives:ExpandableContentControl\">\r\n                    <ContentPresenter x:Name=\"ContentSite\"\r\n                                      Margin=\"{TemplateBinding Padding}\"\r\n                                      HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                                      VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                                      ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                                      Cursor=\"{TemplateBinding Cursor}\" />\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  *********************************  AccordionItem Style  *********************************  -->\r\n    <Style x:Key=\"AccordionItemStyle\" TargetType=\"layoutToolkit:AccordionItem\">\r\n        <Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n        <Setter Property=\"FontSize\" Value=\"14.667\" />\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"{StaticResource AccordionItemBackgroundBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"0\" />\r\n        <Setter Property=\"MinHeight\" Value=\"30\" />\r\n        <Setter Property=\"Margin\" Value=\"0\" />\r\n        <Setter Property=\"HorizontalAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"AccordionButtonStyle\" Value=\"{StaticResource AccordionButtonStyle}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"layoutToolkit:AccordionItem\">\r\n                    <Grid HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\"\r\n                          VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"\r\n                          Background=\"{TemplateBinding Background}\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"Pressed\" />\r\n                                <VisualState x:Name=\"MouseOver\" />\r\n                                <VisualState x:Name=\"Disabled\" />\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\" />\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"ExpansionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Collapsed\">\r\n                                    <Storyboard x:Name=\"AccordionItemCollapsedStoryboard\">\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                                       Storyboard.TargetName=\"ExpandSite\"\r\n                                                                       Storyboard.TargetProperty=\"(layoutToolkitPrimitives:ExpandableContentControl.Percentage)\">\r\n                                            <SplineDoubleKeyFrame KeySpline=\"0.2,0,0,1\"\r\n                                                                  KeyTime=\"00:00:00.3\"\r\n                                                                  Value=\"0\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00.3\"\r\n                                                                       Duration=\"00:00:00\"\r\n                                                                       Storyboard.TargetName=\"ExpandSite\"\r\n                                                                       Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Expanded\">\r\n                                    <Storyboard x:Name=\"AccordionItemExpandedStoryboard\">\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                                       Storyboard.TargetName=\"ExpandSite\"\r\n                                                                       Storyboard.TargetProperty=\"(layoutToolkitPrimitives:ExpandableContentControl.Percentage)\">\r\n                                            <SplineDoubleKeyFrame KeySpline=\"0.2,0,0,1\"\r\n                                                                  KeyTime=\"00:00:00.3\"\r\n                                                                  Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"LockedStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Locked\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"ExpanderButton\"\r\n                                                                       Storyboard.TargetProperty=\"IsEnabled\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Boolean>False</sys:Boolean>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unlocked\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"ExpanderButton\"\r\n                                                                       Storyboard.TargetProperty=\"IsEnabled\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Boolean>True</sys:Boolean>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"ExpandDirectionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"ExpandDown\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"rd1\"\r\n                                                                       Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>*</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"cd0\"\r\n                                                                       Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>*</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ExpandUp\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"ExpanderButton\"\r\n                                                                       Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"ExpandSite\"\r\n                                                                       Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>0</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"rd0\"\r\n                                                                       Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>*</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"cd0\"\r\n                                                                       Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>*</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ExpandLeft\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"ExpanderButton\"\r\n                                                                       Storyboard.TargetProperty=\"(Grid.ColumnSpan)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"ExpandSite\"\r\n                                                                       Storyboard.TargetProperty=\"(Grid.ColumnSpan)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"ExpanderButton\"\r\n                                                                       Storyboard.TargetProperty=\"(Grid.RowSpan)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>2</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"ExpandSite\"\r\n                                                                       Storyboard.TargetProperty=\"(Grid.RowSpan)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>2</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"ExpanderButton\"\r\n                                                                       Storyboard.TargetProperty=\"(Grid.Column)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"ExpandSite\"\r\n                                                                       Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>0</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"rd0\"\r\n                                                                       Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>*</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"cd0\"\r\n                                                                       Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>*</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ExpandRight\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"ExpanderButton\"\r\n                                                                       Storyboard.TargetProperty=\"(Grid.ColumnSpan)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"ExpandSite\"\r\n                                                                       Storyboard.TargetProperty=\"(Grid.ColumnSpan)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"ExpanderButton\"\r\n                                                                       Storyboard.TargetProperty=\"(Grid.RowSpan)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>2</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"ExpandSite\"\r\n                                                                       Storyboard.TargetProperty=\"(Grid.RowSpan)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>2</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"ExpandSite\"\r\n                                                                       Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>0</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"ExpandSite\"\r\n                                                                       Storyboard.TargetProperty=\"(Grid.Column)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <sys:Int32>1</sys:Int32>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"rd0\"\r\n                                                                       Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>*</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\"\r\n                                                                       Storyboard.TargetName=\"cd1\"\r\n                                                                       Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GridLength>*</GridLength>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"Background\"\r\n                                BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                                BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                                Padding=\"{TemplateBinding Padding}\">\r\n                            <Grid>\r\n                                <Grid.RowDefinitions>\r\n                                    <RowDefinition x:Name=\"rd0\" Height=\"Auto\" />\r\n                                    <RowDefinition x:Name=\"rd1\" Height=\"Auto\" />\r\n                                </Grid.RowDefinitions>\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition x:Name=\"cd0\" Width=\"Auto\" />\r\n                                    <ColumnDefinition x:Name=\"cd1\" Width=\"Auto\" />\r\n                                </Grid.ColumnDefinitions>\r\n                                <layoutToolkitPrimitives:AccordionButton Name=\"ExpanderButton\"\r\n                                                                         Grid.Row=\"0\"\r\n                                                                         Margin=\"0,0,0,0\"\r\n                                                                         HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\"\r\n                                                                         VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"\r\n                                                                         HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                                                                         VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                                                                         Content=\"{TemplateBinding Header}\"\r\n                                                                         ContentTemplate=\"{TemplateBinding HeaderTemplate}\"\r\n                                                                         IsChecked=\"{TemplateBinding IsSelected}\"\r\n                                                                         IsTabStop=\"True\"\r\n                                                                         Padding=\"0,0,0,0\" />\r\n                                <layoutToolkitPrimitives:ExpandableContentControl Name=\"ExpandSite\"\r\n                                                                                  Grid.Row=\"1\"\r\n                                                                                  Margin=\"0,0,0,0\"\r\n                                                                                  HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\"\r\n                                                                                  VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"\r\n                                                                                  HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                                                                                  VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                                                                                  Content=\"{TemplateBinding Content}\"\r\n                                                                                  ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                                                                                  FontFamily=\"{TemplateBinding FontFamily}\"\r\n                                                                                  FontSize=\"{TemplateBinding FontSize}\"\r\n                                                                                  FontStretch=\"{TemplateBinding FontStretch}\"\r\n                                                                                  FontStyle=\"{TemplateBinding FontStyle}\"\r\n                                                                                  FontWeight=\"{TemplateBinding FontWeight}\"\r\n                                                                                  Foreground=\"{TemplateBinding Foreground}\"\r\n                                                                                  IsTabStop=\"False\"\r\n                                                                                  Percentage=\"0\"\r\n                                                                                  RevealMode=\"{TemplateBinding ExpandDirection}\"\r\n                                                                                  Style=\"{StaticResource ExpandableContentControlStyle}\" />\r\n                            </Grid>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  *********************************  Accordion Style  *********************************  -->\r\n    <Style x:Key=\"AccordionStyle\" TargetType=\"layoutToolkit:Accordion\">\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource AccordionBorderBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"{StaticResource AccordionBackgroundBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Padding\" Value=\"0\" />\r\n        <Setter Property=\"Margin\" Value=\"0\" />\r\n        <Setter Property=\"HorizontalAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"Cursor\" Value=\"Arrow\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"ItemsPanel\">\r\n            <Setter.Value>\r\n                <ItemsPanelTemplate>\r\n                    <StackPanel VerticalAlignment=\"Top\" />\r\n                </ItemsPanelTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"layoutToolkit:Accordion\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"Pressed\" />\r\n                                <VisualState x:Name=\"MouseOver\" />\r\n                                <VisualState x:Name=\"Disabled\" />\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\" />\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"Border\"\r\n                                Background=\"{TemplateBinding Background}\"\r\n                                BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                                BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                                Padding=\"{TemplateBinding Padding}\">\r\n                            <ScrollViewer Margin=\"0\"\r\n                                          Background=\"{x:Null}\"\r\n                                          BorderBrush=\"{StaticResource TransparentBrush}\"\r\n                                          BorderThickness=\"0\"\r\n                                          HorizontalScrollBarVisibility=\"Disabled\"\r\n                                          IsTabStop=\"False\"\r\n                                          Padding=\"0\"\r\n                                          VerticalScrollBarVisibility=\"Disabled\">\r\n                                <ItemsPresenter />\r\n                            </ScrollViewer>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  *********************************  AutoCompleteBox Style  *********************************  -->\r\n    <Style x:Key=\"AutoCompleteBoxStyle\" TargetType=\"{x:Type inputToolkit:AutoCompleteBox}\">\r\n        <Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n        <Setter Property=\"FontSize\" Value=\"14.667\" />\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"{StaticResource TextBoxBackgroundBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource TextBoxBorderBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Padding\" Value=\"6,4\" />\r\n        <Setter Property=\"MinHeight\" Value=\"30\" />\r\n        <Setter Property=\"MinWidth\" Value=\"90\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"TextBoxStyle\" Value=\"{StaticResource TextBoxStyle}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type inputToolkit:AutoCompleteBox}\">\r\n                    <Grid Opacity=\"{TemplateBinding Opacity}\">\r\n                        <TextBox x:Name=\"Text\"\r\n                                 Margin=\"0\"\r\n                                 Background=\"{TemplateBinding Background}\"\r\n                                 BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                                 BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                                 Foreground=\"{TemplateBinding Foreground}\"\r\n                                 IsTabStop=\"True\"\r\n                                 Padding=\"{TemplateBinding Padding}\"\r\n                                 Style=\"{TemplateBinding TextBoxStyle}\" />\r\n                        <Border x:Name=\"ValidationErrorElement\"\r\n                                BorderBrush=\"{StaticResource ValidationErrorElement}\"\r\n                                BorderThickness=\"1\"\r\n                                CornerRadius=\"1\"\r\n                                Visibility=\"Collapsed\">\r\n                            <Border.ToolTip>\r\n                                <ToolTip x:Name=\"validationTooltip\"\r\n                                         Placement=\"Right\"\r\n                                         Template=\"{StaticResource ValidationToolTipTemplate}\">\r\n                                    <ToolTip.Triggers>\r\n                                        <EventTrigger RoutedEvent=\"FrameworkElement.Loaded\">\r\n                                            <BeginStoryboard>\r\n                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"validationTooltip\" Storyboard.TargetProperty=\"IsHitTestVisible\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                            <DiscreteObjectKeyFrame.Value>\r\n                                                                <sys:Boolean>True</sys:Boolean>\r\n                                                            </DiscreteObjectKeyFrame.Value>\r\n                                                        </DiscreteObjectKeyFrame>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </BeginStoryboard>\r\n                                        </EventTrigger>\r\n                                    </ToolTip.Triggers>\r\n                                    <!--  TODO: Include ValidationTooltipTemplate  -->\r\n                                    <!--\r\n                                        <ToolTip.Template>\r\n                                        <ControlTemplate TargetType=\"{x:Type ToolTip}\">\r\n                                        <Grid x:Name=\"Root\" Margin=\"5,0\" Opacity=\"0\" RenderTransformOrigin=\"0,0\">\r\n                                        <Grid.RenderTransform>\r\n                                        <TranslateTransform X=\"-25\"/>\r\n                                        </Grid.RenderTransform>\r\n                                        <Border Background=\"#052A2E31\" CornerRadius=\"5\" Margin=\"4,4,-4,-4\"/>\r\n                                        <Border Background=\"#152A2E31\" CornerRadius=\"4\" Margin=\"3,3,-3,-3\"/>\r\n                                        <Border Background=\"#252A2E31\" CornerRadius=\"3\" Margin=\"2,2,-2,-2\"/>\r\n                                        <Border Background=\"#352A2E31\" CornerRadius=\"2\" Margin=\"1,1,-1,-1\"/>\r\n                                        <Border Background=\"#FFDC000C\" CornerRadius=\"2\">\r\n                                        <TextBlock Foreground=\"White\" MaxWidth=\"250\" Margin=\"8,4\" TextWrapping=\"Wrap\" Text=\"{Binding (Validation.Errors)[0].ErrorContent}\"/>\r\n                                        </Border>\r\n                                        </Grid>\r\n                                        </ControlTemplate>\r\n                                        </ToolTip.Template>\r\n                                    -->\r\n                                </ToolTip>\r\n                            </Border.ToolTip>\r\n                            <Grid Width=\"12\"\r\n                                  Height=\"12\"\r\n                                  Margin=\"1,-4,-4,0\"\r\n                                  HorizontalAlignment=\"Right\"\r\n                                  VerticalAlignment=\"Top\"\r\n                                  Background=\"Transparent\">\r\n                                <Path Margin=\"1,3,0,0\"\r\n                                      Data=\"M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z\"\r\n                                      Fill=\"{StaticResource ValidationErrorElement}\" />\r\n                                <Path Margin=\"1,3,0,0\"\r\n                                      Data=\"M 0,0 L2,0 L 8,6 L8,8\"\r\n                                      Fill=\"{StaticResource LightForegroundBrush}\" />\r\n                            </Grid>\r\n                        </Border>\r\n                        <Popup x:Name=\"Popup\" AllowsTransparency=\"True\">\r\n                            <Grid Opacity=\"{TemplateBinding Opacity}\">\r\n                                <Border x:Name=\"PopupBorder\"\r\n                                        HorizontalAlignment=\"Stretch\"\r\n                                        BorderThickness=\"0\">\r\n                                    <Border.RenderTransform>\r\n                                        <TranslateTransform X=\"1\" Y=\"1\" />\r\n                                    </Border.RenderTransform>\r\n                                    <Border HorizontalAlignment=\"Stretch\"\r\n                                            BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                                            BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                                            CornerRadius=\"0\"\r\n                                            Opacity=\"1.0\"\r\n                                            Padding=\"0\">\r\n                                        <Border.RenderTransform>\r\n                                            <TransformGroup>\r\n                                                <TranslateTransform X=\"-1\" Y=\"-1\" />\r\n                                            </TransformGroup>\r\n                                        </Border.RenderTransform>\r\n                                        <ListBox x:Name=\"Selector\"\r\n                                                 Background=\"{TemplateBinding Background}\"\r\n                                                 BorderThickness=\"0\"\r\n                                                 Foreground=\"{TemplateBinding Foreground}\"\r\n                                                 ItemContainerStyle=\"{TemplateBinding ItemContainerStyle}\"\r\n                                                 ItemTemplate=\"{TemplateBinding ItemTemplate}\"\r\n                                                 ScrollViewer.HorizontalScrollBarVisibility=\"Auto\"\r\n                                                 ScrollViewer.VerticalScrollBarVisibility=\"Auto\" />\r\n                                    </Border>\r\n                                </Border>\r\n                            </Grid>\r\n                        </Popup>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  ********************** Implicit Styles ***********************  -->\r\n    <Style BasedOn=\"{StaticResource RatingItemStyle}\" TargetType=\"{x:Type inputToolkit:RatingItem}\" />\r\n    <Style BasedOn=\"{StaticResource RatingStyle}\" TargetType=\"{x:Type inputToolkit:Rating}\" />\r\n    <Style BasedOn=\"{StaticResource AccordionButtonStyle}\" TargetType=\"layoutToolkitPrimitives:AccordionButton\" />\r\n    <Style BasedOn=\"{StaticResource AccordionItemStyle}\" TargetType=\"layoutToolkit:AccordionItem\" />\r\n    <Style BasedOn=\"{StaticResource AccordionStyle}\" TargetType=\"layoutToolkit:Accordion\" />\r\n    <Style BasedOn=\"{StaticResource AutoCompleteBoxStyle}\" TargetType=\"{x:Type inputToolkit:AutoCompleteBox}\" />\r\n\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/MetroDark/Styles.Shared.xaml",
    "content": "﻿<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" \r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" \r\n                    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\" \r\n                    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" \r\n                    xmlns:System=\"clr-namespace:System;assembly=mscorlib\" \r\n                    mc:Ignorable=\"d\">\r\n\r\n\t<!-- *********************************  COLORS  ********************************* -->\r\n\t<ResourceDictionary.MergedDictionaries>\r\n\t\t<ResourceDictionary Source=\"Theme.Colors.xaml\" />\r\n\t</ResourceDictionary.MergedDictionaries>\r\n\r\n\t<!-- *********************************  BRUSHES  ********************************* -->\r\n\t<SolidColorBrush x:Key=\"ForegroundBrush\" Color=\"{StaticResource Color_002}\" />\r\n\t<SolidColorBrush x:Key=\"LightForegroundBrush\" Color=\"{StaticResource Color_001}\" />\r\n\t<SolidColorBrush x:Key=\"TransparentBrush\" Color=\"{StaticResource Color_016}\" />\r\n\t<SolidColorBrush x:Key=\"DisabledVisualElement\" Color=\"{StaticResource Color_009}\" Opacity=\"0.6\" />\r\n\t<SolidColorBrush x:Key=\"ValidationErrorElement\" Color=\"{StaticResource Color_028}\" />\r\n\t<SolidColorBrush x:Key=\"CaretForegroundBrush\" Color=\"{StaticResource Color_022}\" />\r\n\r\n\t<!-- Scrollbar Brushes -->\r\n\t<SolidColorBrush x:Key=\"HScrollbarThumbBackgroundBrush\" Color=\"{StaticResource Color_003}\" />\r\n\t<SolidColorBrush x:Key=\"VScrollbarThumbBackgroundBrush\" Color=\"{StaticResource Color_003}\" />\r\n\t<SolidColorBrush x:Key=\"ScrollbarPageButtonArrowBackgroundBrush\" Color=\"{StaticResource Color_003}\" />\r\n\t<SolidColorBrush x:Key=\"ScrollbarPageButtonArrowPressedBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"ScrollbarPageButtonArrowHoverBackgroundBrush\" Color=\"{StaticResource Color_005}\" />\r\n\t<SolidColorBrush x:Key=\"ScrollbarPageButtonArrowDisabledBackgroundBrush\" Color=\"{StaticResource Color_006}\" />\r\n\t<SolidColorBrush x:Key=\"VScrollbarThumbHoverBackgroundBrush\" Color=\"{StaticResource Color_005}\" />\r\n\t<SolidColorBrush x:Key=\"HScrollbarThumbHoverBackgroundBrush\" Color=\"{StaticResource Color_005}\" />\r\n\t<SolidColorBrush x:Key=\"VScrollbarThumbPressedBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"HScrollbarThumbPressedBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"VScrollbarThumbDisabledBackgroundBrush\" Color=\"{StaticResource Color_006}\" />\r\n\t<SolidColorBrush x:Key=\"HScrollbarThumbDisabledBackgroundBrush\" Color=\"{StaticResource Color_006}\" />\r\n\t<SolidColorBrush x:Key=\"ScrollbarDisabledBackgroundBrush\" Color=\"{StaticResource Color_006}\" />\r\n\t<SolidColorBrush x:Key=\"ScrollbarBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\r\n\t<!-- ComboBox Brushes -->\r\n\t<SolidColorBrush x:Key=\"ComboBoxBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"ComboBoxBorderBrush\" Color=\"{StaticResource Color_006}\" />\r\n\t<SolidColorBrush x:Key=\"ComboBoxReadOnlyBorderBrush\" Color=\"{StaticResource Color_006}\" />\r\n\t<SolidColorBrush x:Key=\"ComboBoxHoverBackgroundBrush\" Color=\"{StaticResource Color_007}\" />\r\n\t<SolidColorBrush x:Key=\"ComboBoxHoverBorderBrush\" Color=\"{StaticResource Color_003}\" />\r\n\t<SolidColorBrush x:Key=\"ComboBoxFocusedBorderBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"ComboBoxDisabledBackgroundBrush\" Color=\"{StaticResource Color_009}\" Opacity=\"0.6\" />\r\n\t<SolidColorBrush x:Key=\"PopupBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"PopupBorderBrush\" Color=\"{StaticResource Color_006}\" />\r\n\t<SolidColorBrush x:Key=\"ComboBoxReadOnlyBackgroundBrush\" Color=\"{StaticResource Color_064}\" />\r\n\t<!-- Need to change color or delete -->\r\n\r\n\t<!-- TextBox Brushes -->\r\n\t<SolidColorBrush x:Key=\"TextBoxBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"TextBoxBorderBrush\" Color=\"{StaticResource Color_006}\" />\r\n\t<SolidColorBrush x:Key=\"TextBoxHoverBackgroundBrush\" Color=\"{StaticResource Color_008}\" />\r\n\t<SolidColorBrush x:Key=\"TextBoxHoverBorderBrush\" Color=\"{StaticResource Color_003}\" />\r\n\t<SolidColorBrush x:Key=\"TextBoxFocusedBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"TextBoxReadOnlyBackgroundBrush\" Color=\"{StaticResource Color_007}\" />\r\n\r\n\t<!-- Button Brushes -->\r\n\t<SolidColorBrush x:Key=\"ButtonBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"ButtonBorderBrush\" Color=\"{StaticResource Color_006}\" />\r\n\t<SolidColorBrush x:Key=\"ButtonHoverBackgroundBrush\" Color=\"{StaticResource Color_006}\" />\r\n\t<SolidColorBrush x:Key=\"ButtonHoverBorderBrush\" Color=\"{StaticResource Color_004}\" />\r\n\t<SolidColorBrush x:Key=\"ButtonPressedBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"ButtonPressedBorderBrush\" Color=\"{StaticResource Color_024}\" />\r\n\r\n\t<!-- ComboBoxItem Brushes -->\r\n\t<SolidColorBrush x:Key=\"ComboBoxItemHoverBackgroundBrush\" Color=\"{StaticResource Color_006}\" />\r\n\t<SolidColorBrush x:Key=\"ComboBoxItemHoverBorderBrush\" Color=\"{StaticResource Color_004}\" />\r\n\t<SolidColorBrush x:Key=\"ComboBoxItemPressedBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"ComboBoxItemPressedBorderBrush\" Color=\"{StaticResource Color_024}\" />\r\n\r\n\t<!-- ComboBoxToggleButton Brushes -->\r\n\t<SolidColorBrush x:Key=\"ComboBoxToggleButtonBackgroundBrush\" Color=\"{StaticResource Color_008}\" />\r\n\t<SolidColorBrush x:Key=\"ComboBoxToggleButtonBorderBrush\" Color=\"{StaticResource Color_006}\" />\r\n\t<SolidColorBrush x:Key=\"ComboBoxToggleButtonPressedBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"ComboBoxToggleButtonDropDownSeparatorBackgroundBrush\" Color=\"{StaticResource Color_006}\" />\r\n\t<SolidColorBrush x:Key=\"ComboBoxToggleButtonPressedBorderBrush\" Color=\"{StaticResource Color_024}\" />\r\n\r\n\t<!-- ListBox Brushes -->\r\n\t<SolidColorBrush x:Key=\"ListBoxBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"ListBoxBorderBrush\" Color=\"{StaticResource Color_006}\" />\r\n\t<SolidColorBrush x:Key=\"ListBoxItemHoverBackgroundBrush\" Color=\"{StaticResource Color_006}\" />\r\n\t<SolidColorBrush x:Key=\"ListBoxItemHoverBorderBrush\" Color=\"{StaticResource Color_004}\" />\r\n\t<SolidColorBrush x:Key=\"ListBoxItemPressedBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"ListBoxItemPressedBorderBrush\" Color=\"{StaticResource Color_024}\" />\r\n\r\n\t<SolidColorBrush x:Key=\"ListBoxItemBackgroundBrush\" Color=\"{StaticResource Color_016}\" />\r\n\t<!-- Need to change color or delete -->\r\n\t<SolidColorBrush x:Key=\"ListBoxItemBorderBrush\" Color=\"{StaticResource Color_016}\" />\r\n\t<!-- Need to change color or delete -->\r\n\t<SolidColorBrush x:Key=\"ListBoxItemSelectedBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<!-- Need to change color or delete -->\r\n\t<SolidColorBrush x:Key=\"ListBoxItemSelectedBorderBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<!-- Need to change color or delete -->\r\n\r\n\t<!-- CheckBox Brushes -->\r\n\t<SolidColorBrush x:Key=\"CheckBoxBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"CheckBoxHoverBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"CheckBoxPressedBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"CheckBoxFocusedBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"CheckBoxInvalidUnfocusedBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"CheckBoxInvalidFocusedBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"CheckBoxBorderBrush\" Color=\"{StaticResource Color_006}\" />\r\n\t<SolidColorBrush x:Key=\"CheckBoxHoverBorderBrush\" Color=\"{StaticResource Color_004}\" />\r\n\t<SolidColorBrush x:Key=\"CheckBoxPressedBorderBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"CheckBoxFocusedBorderBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"CheckBoxInvalidUnfocusedBorderBrush\" Color=\"{StaticResource Color_029}\" />\r\n\t<SolidColorBrush x:Key=\"CheckBoxInvalidFocusedBorderBrush\" Color=\"{StaticResource Color_028}\" />\r\n\t<SolidColorBrush x:Key=\"CheckBoxIndeterminateCheckBackgroundBrush\" Color=\"{StaticResource Color_004}\" />\r\n\t<SolidColorBrush x:Key=\"CheckBoxCheckBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\r\n\t<!-- RadioButton Brushes -->\r\n\t<SolidColorBrush x:Key=\"RadioButtonBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"RadioButtonHoverBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"RadioButtonPressedBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"RadioButtonFocusedBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"RadioButtonInvalidUnfocusedBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"RadioButtonInvalidFocusedBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"RadioButtonBorderBrush\" Color=\"{StaticResource Color_006}\" />\r\n\t<SolidColorBrush x:Key=\"RadioButtonHoverBorderBrush\" Color=\"{StaticResource Color_004}\" />\r\n\t<SolidColorBrush x:Key=\"RadioButtonPressedBorderBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"RadioButtonFocusedBorderBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"RadioButtonInvalidUnfocusedBorderBrush\" Color=\"{StaticResource Color_029}\" />\r\n\t<SolidColorBrush x:Key=\"RadioButtonInvalidFocusedBorderBrush\" Color=\"{StaticResource Color_028}\" />\r\n\t<SolidColorBrush x:Key=\"RadioButtonCheckBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"RadioButtonIndeterminateCheckBackgroundBrush\" Color=\"{StaticResource Color_004}\" />\r\n\r\n\t<!-- Visual Glyphs brushes -->\r\n\t<SolidColorBrush x:Key=\"GlyphBackgroundBrush\" Color=\"{StaticResource Color_003}\" />\r\n\t<SolidColorBrush x:Key=\"GlyphHoverBackgroundBrush\" Color=\"{StaticResource Color_002}\" />\r\n\t<SolidColorBrush x:Key=\"GlyphPressedBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"GlyphDisabledBackgroundBrush\" Color=\"{StaticResource Color_005}\" />\r\n\r\n\t<!-- ValidationToolTip Brushes -->\r\n\t<SolidColorBrush x:Key=\"ValidationToolTipTemplateShadowBrush\" Color=\"{StaticResource Color_003}\" />\r\n\r\n\t<!-- ******************************************************** SL-WPF SHARED INLINE CONTROLS RESOURCES ***********************************************************\r\n          ***********************************************************************************************************************************************************************    -->\r\n\r\n\t<!-- *********************************  ValidationToolTip Template  ********************************* -->\r\n\t<ControlTemplate x:Key=\"ValidationToolTipTemplate\">\r\n\t\t<Grid x:Name=\"Root\" Margin=\"5,0\" Opacity=\"0\" RenderTransformOrigin=\"0,0\">\r\n\t\t\t<Grid.RenderTransform>\r\n\t\t\t\t<TranslateTransform x:Name=\"xform\" X=\"-25\" />\r\n\t\t\t</Grid.RenderTransform>\r\n\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t<VisualStateGroup x:Name=\"OpenStates\">\r\n\t\t\t\t\t<VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0\" />\r\n\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0:0:0.2\" To=\"Open\">\r\n\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0:0:0.2\" To=\"0\" Storyboard.TargetProperty=\"X\" Storyboard.TargetName=\"xform\">\r\n\t\t\t\t\t\t\t\t\t<DoubleAnimation.EasingFunction>\r\n\t\t\t\t\t\t\t\t\t\t<BackEase Amplitude=\".3\" EasingMode=\"EaseOut\" />\r\n\t\t\t\t\t\t\t\t\t</DoubleAnimation.EasingFunction>\r\n\t\t\t\t\t\t\t\t</DoubleAnimation>\r\n\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0:0:0.2\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Root\" />\r\n\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t</VisualTransition>\r\n\t\t\t\t\t</VisualStateGroup.Transitions>\r\n\t\t\t\t\t<VisualState x:Name=\"Closed\">\r\n\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Root\" />\r\n\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t<VisualState x:Name=\"Open\">\r\n\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"X\" Storyboard.TargetName=\"xform\" />\r\n\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Root\" />\r\n\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t</VisualState>\r\n\t\t\t\t</VisualStateGroup>\r\n\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t<Border Background=\"{StaticResource ValidationToolTipTemplateShadowBrush}\" CornerRadius=\"5\" Margin=\"4,4,-4,-4\" Opacity=\"0.02\" />\r\n\t\t\t<Border Background=\"{StaticResource ValidationToolTipTemplateShadowBrush}\" CornerRadius=\"4\" Margin=\"3,3,-3,-3\" Opacity=\"0.08\" />\r\n\t\t\t<Border Background=\"{StaticResource ValidationToolTipTemplateShadowBrush}\" CornerRadius=\"3\" Margin=\"2,2,-2,-2\" Opacity=\"0.15\" />\r\n\t\t\t<Border Background=\"{StaticResource ValidationToolTipTemplateShadowBrush}\" CornerRadius=\"2\" Margin=\"1,1,-1,-1\" Opacity=\"0.21\" />\r\n\t\t\t<Border Background=\"{StaticResource ValidationErrorElement}\" CornerRadius=\"2\" />\r\n\t\t\t<Border CornerRadius=\"2\">\r\n\t\t\t\t<TextBlock Foreground=\"{StaticResource ForegroundBrush}\" MaxWidth=\"250\" Margin=\"8,4,8,4\" TextWrapping=\"Wrap\" Text=\"{Binding (Validation.Errors)[0].ErrorContent}\" UseLayoutRounding=\"false\" />\r\n\t\t\t</Border>\r\n\t\t</Grid>\r\n\t</ControlTemplate>\r\n\r\n\t<!-- *********************************  ComboBoxToggleButton Style   ********************************* -->\r\n\t<Style x:Key=\"ComboBoxToggleButtonStyle\" TargetType=\"ToggleButton\">\r\n\t\t<Setter Property=\"FontSize\" Value=\"14.667\" />\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource ComboBoxToggleButtonBorderBrush}\" />\r\n\t\t<Setter Property=\"MinWidth\" Value=\"30\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"30\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"2\" />\r\n\t\t<Setter Property=\"Cursor\" Value=\"Hand\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"ToggleButton\">\r\n\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"Arrow\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource GlyphHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Pressed\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"Arrow\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource GlyphPressedBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"Arrow\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource GlyphDisabledBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CheckStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Checked\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"ArrowSelected\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unchecked\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Indeterminate\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"FocusStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Focused\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unfocused\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t<ColumnDefinition />\r\n\t\t\t\t\t\t\t<ColumnDefinition Width=\"30\" />\r\n\t\t\t\t\t\t</Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t<Rectangle x:Name=\"Bd\" Fill=\"{StaticResource TransparentBrush}\" Grid.ColumnSpan=\"2\" />\r\n\t\t\t\t\t\t<Grid Grid.Column=\"1\">\r\n\t\t\t\t\t\t\t<Rectangle Width=\"1\" Fill=\"{StaticResource ComboBoxToggleButtonDropDownSeparatorBackgroundBrush}\" HorizontalAlignment=\"Left\" Margin=\"-1,5,0,5\" />\r\n\t\t\t\t\t\t\t<Path x:Name=\"Arrow\" Width=\"10\" Height=\"6\" Fill=\"{StaticResource GlyphBackgroundBrush}\" Data=\"F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z \" Stretch=\"Fill\" />\r\n\t\t\t\t\t\t\t<Path x:Name=\"ArrowSelected\" Width=\"10\" Height=\"6\" Visibility=\"Collapsed\" Fill=\"{StaticResource GlyphPressedBackgroundBrush}\" Data=\"F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z \" Stretch=\"Fill\" />\r\n\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  ComboBoxItem Style  ********************************* -->\r\n\t<Style x:Key=\"ComboBoxItemStyle\" TargetType=\"ComboBoxItem\">\r\n\t\t<Setter Property=\"FontSize\" Value=\"14.667\" />\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"30\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"6,0\" />\r\n\t\t<Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n\t\t<Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource TransparentBrush}\" />\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"ComboBoxItem\">\r\n\t\t\t\t\t<Grid Background=\"{TemplateBinding Background}\">\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"fillColor\" />\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"contentControl\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource LightForegroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"DisabledVisualElement\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"SelectionStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unselected\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Selected\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"CheckedBd\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"contentControl\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Collapsed</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"contentControl1\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"contentControl1\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource LightForegroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"SelectedUnfocused\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"FocusStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Focused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"FocusVisualElement\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unfocused\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"LayoutStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"AfterLoaded\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"BeforeLoaded\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"BeforeUnloaded\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Rectangle Fill=\"{StaticResource TransparentBrush}\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"fillColor\" Fill=\"{StaticResource ComboBoxItemHoverBackgroundBrush}\" IsHitTestVisible=\"False\" Opacity=\"0\" Stroke=\"{StaticResource ComboBoxItemHoverBorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"CheckedBd\" Fill=\"{StaticResource ComboBoxItemPressedBackgroundBrush}\" IsHitTestVisible=\"False\" Visibility=\"Collapsed\" Stroke=\"{StaticResource ComboBoxItemPressedBorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" />\r\n\t\t\t\t\t\t<ContentControl x:Name=\"contentControl\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" Foreground=\"{TemplateBinding Foreground}\">\r\n\t\t\t\t\t\t\t<ContentPresenter x:Name=\"contentPresenter\" />\r\n\t\t\t\t\t\t</ContentControl>\r\n\t\t\t\t\t\t<ContentControl x:Name=\"contentControl1\" Visibility=\"Collapsed\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" Foreground=\"{StaticResource ForegroundBrush}\">\r\n\t\t\t\t\t\t\t<ContentPresenter x:Name=\"contentPresenter1\" />\r\n\t\t\t\t\t\t</ContentControl>\r\n\t\t\t\t\t\t<Rectangle x:Name=\"FocusVisualElement\" Stroke=\"{StaticResource ComboBoxItemPressedBackgroundBrush}\" Visibility=\"Collapsed\" StrokeThickness=\"2\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"DisabledVisualElement\" Fill=\"{StaticResource DisabledVisualElement}\" Visibility=\"Collapsed\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  ListBoxItem Style  ********************************* -->\r\n\t<Style x:Key=\"ListBoxItemStyle\" TargetType=\"ListBoxItem\">\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource TransparentBrush}\" />\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"FontSize\" Value=\"13.333\" />\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"30\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"6,2\" />\r\n\t\t<Setter Property=\"Margin\" Value=\"0\" />\r\n\t\t<Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n\t\t<Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"ListBoxItem\">\r\n\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Bd\" Storyboard.TargetProperty=\"Fill\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ListBoxItemHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Bd\" Storyboard.TargetProperty=\"Stroke\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ListBoxItemHoverBorderBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"contentControl\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource LightForegroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"DisabledVisualElement\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"SelectionStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unselected\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Selected\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"BgSelected\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"contentControl\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Collapsed</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"contentControl1\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"contentControl1\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource LightForegroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"SelectedUnfocused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"BgSelected\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"contentControl\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource LightForegroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"FocusStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Focused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"FocusedVisualElement\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unfocused\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Rectangle x:Name=\"Bd\" Fill=\"{TemplateBinding Background}\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"BgSelected\" Fill=\"{StaticResource ListBoxItemSelectedBackgroundBrush}\" Stroke=\"{StaticResource ListBoxItemSelectedBorderBrush}\" Visibility=\"Collapsed\" />\r\n\t\t\t\t\t\t<ContentControl x:Name=\"contentControl\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" Foreground=\"{TemplateBinding Foreground}\">\r\n\t\t\t\t\t\t\t<ContentPresenter x:Name=\"contentPresenter\" />\r\n\t\t\t\t\t\t</ContentControl>\r\n\t\t\t\t\t\t<ContentControl x:Name=\"contentControl1\" Visibility=\"Collapsed\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" Foreground=\"{StaticResource ForegroundBrush}\">\r\n\t\t\t\t\t\t\t<ContentPresenter x:Name=\"contentPresenter1\" />\r\n\t\t\t\t\t\t</ContentControl>\r\n\t\t\t\t\t\t<Rectangle x:Name=\"FocusedVisualElement\" IsHitTestVisible=\"False\" Visibility=\"Collapsed\" Stroke=\"{StaticResource ListBoxItemPressedBorderBrush}\" StrokeThickness=\"2\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"DisabledVisualElement\" Fill=\"{StaticResource DisabledVisualElement}\" Visibility=\"Collapsed\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- ********************************** CheckBoxStyle **********************************-->\r\n\t<Style x:Key=\"CheckBoxStyle\" TargetType=\"CheckBox\">\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"FontSize\" Value=\"14.667\" />\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n\t\t<Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"6,0,0,0\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"30\" />\r\n\t\t<Setter Property=\"MinWidth\" Value=\"30\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"CheckBox\">\r\n\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"hover\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Pressed\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"pressed\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\".55\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"contentPresenter\" />\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"disabled\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CheckStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Checked\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"checkBox\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unchecked\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Indeterminate\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"IndeterminateCheck\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"FocusStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Focused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"focused\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unfocused\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"ValidationStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Valid\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"InvalidUnfocused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"invalidUnfocused\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"InvalidFocused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"invalidFocused\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t<ColumnDefinition Width=\"30\" />\r\n\t\t\t\t\t\t\t<ColumnDefinition Width=\"*\" />\r\n\t\t\t\t\t\t</Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t<Rectangle Fill=\"{StaticResource TransparentBrush}\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"normal\" Opacity=\"1\" Stroke=\"{StaticResource CheckBoxBorderBrush}\" StrokeThickness=\"1\" Fill=\"{StaticResource CheckBoxBackgroundBrush}\" Width=\"18\" Height=\"18\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"hover\" Stroke=\"{StaticResource CheckBoxHoverBorderBrush}\" StrokeThickness=\"1\" Fill=\"{StaticResource CheckBoxHoverBackgroundBrush}\" Opacity=\"0\" Width=\"18\" Height=\"18\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"pressed\" Opacity=\"0\" Stroke=\"{StaticResource CheckBoxPressedBorderBrush}\" StrokeThickness=\"1\" Fill=\"{StaticResource CheckBoxPressedBackgroundBrush}\" Width=\"18\" Height=\"18\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"focused\" Opacity=\"0\" Stroke=\"{StaticResource CheckBoxFocusedBorderBrush}\" StrokeThickness=\"1\" Fill=\"{StaticResource CheckBoxFocusedBackgroundBrush}\" Width=\"18\" Height=\"18\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"invalidUnfocused\" Opacity=\"0\" Stroke=\"{StaticResource CheckBoxInvalidUnfocusedBackgroundBrush}\" StrokeThickness=\"1\" Fill=\"{StaticResource CheckBoxInvalidUnfocusedBackgroundBrush}\" Width=\"18\" Height=\"18\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"invalidFocused\" Opacity=\"0\" Stroke=\"{StaticResource CheckBoxInvalidFocusedBorderBrush}\" StrokeThickness=\"1\" Fill=\"{StaticResource CheckBoxInvalidFocusedBackgroundBrush}\" Width=\"18\" Height=\"18\" />\r\n\t\t\t\t\t\t<Path x:Name=\"checkBox\" Height=\"10\" Width=\"12\" Stretch=\"Fill\" Opacity=\"0\" Data=\"M 1145.607177734375,430 C1145.607177734375,430 1141.449951171875,435.0772705078125 1141.449951171875,435.0772705078125 1141.449951171875,435.0772705078125 1139.232177734375,433.0999755859375 1139.232177734375,433.0999755859375 1139.232177734375,433.0999755859375 1138,434.5538330078125 1138,434.5538330078125 1138,434.5538330078125 1141.482177734375,438 1141.482177734375,438 1141.482177734375,438 1141.96875,437.9375 1141.96875,437.9375 1141.96875,437.9375 1147,431.34619140625 1147,431.34619140625 1147,431.34619140625 1145.607177734375,430 1145.607177734375,430 z\" Fill=\"{StaticResource CheckBoxCheckBackgroundBrush}\" UseLayoutRounding=\"False\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"IndeterminateCheck\" Fill=\"{StaticResource CheckBoxIndeterminateCheckBackgroundBrush}\" Height=\"3\" Width=\"8\" Opacity=\"0\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"disabled\" Opacity=\"0\" StrokeThickness=\"1\" Fill=\"{StaticResource DisabledVisualElement}\" Width=\"18\" Height=\"18\" />\r\n\t\t\t\t\t\t<ContentPresenter x:Name=\"contentPresenter\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Grid.Column=\"1\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- ********************************** RadioButton Style **********************************-->\r\n\t<Style x:Key=\"RadioButtonStyle\" TargetType=\"RadioButton\">\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"FontSize\" Value=\"14.667\" />\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n\t\t<Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"6,0,0,0\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"30\" />\r\n\t\t<Setter Property=\"MinWidth\" Value=\"20\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"RadioButton\">\r\n\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"hover\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Pressed\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"pressed\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\".55\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"contentPresenter\" />\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"disabled\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CheckStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Checked\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"Checked1\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unchecked\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Indeterminate\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"FocusStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Focused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"focused\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unfocused\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"ValidationStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Valid\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"InvalidUnfocused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"invalidUnfocused\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"InvalidFocused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"invalidFocused\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t<ColumnDefinition Width=\"18\" />\r\n\t\t\t\t\t\t\t<ColumnDefinition Width=\"*\" />\r\n\t\t\t\t\t\t</Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t<Rectangle Fill=\"{StaticResource TransparentBrush}\" Margin=\"-6,0\" />\r\n\t\t\t\t\t\t<Ellipse x:Name=\"normal\" Opacity=\"1\" Stroke=\"{StaticResource RadioButtonBorderBrush}\" StrokeThickness=\"1\" Fill=\"{StaticResource RadioButtonBackgroundBrush}\" Width=\"18\" Height=\"18\" />\r\n\t\t\t\t\t\t<Ellipse x:Name=\"hover\" Stroke=\"{StaticResource RadioButtonHoverBorderBrush}\" StrokeThickness=\"1\" Fill=\"{StaticResource RadioButtonHoverBackgroundBrush}\" Opacity=\"0\" Width=\"18\" Height=\"18\" />\r\n\t\t\t\t\t\t<Ellipse x:Name=\"pressed\" Opacity=\"0\" Stroke=\"{StaticResource RadioButtonPressedBorderBrush}\" StrokeThickness=\"1\" Fill=\"{StaticResource RadioButtonPressedBackgroundBrush}\" Width=\"18\" Height=\"18\" />\r\n\t\t\t\t\t\t<Ellipse x:Name=\"focused\" Opacity=\"0\" Stroke=\"{StaticResource RadioButtonFocusedBorderBrush}\" StrokeThickness=\"1\" Fill=\"{StaticResource RadioButtonFocusedBackgroundBrush}\" Width=\"18\" Height=\"18\" />\r\n\t\t\t\t\t\t<Ellipse x:Name=\"invalidUnfocused\" Opacity=\"0\" Stroke=\"{StaticResource RadioButtonInvalidUnfocusedBorderBrush}\" StrokeThickness=\"1\" Fill=\"{StaticResource RadioButtonInvalidUnfocusedBackgroundBrush}\" Width=\"18\" Height=\"18\" />\r\n\t\t\t\t\t\t<Ellipse x:Name=\"invalidFocused\" Opacity=\"0\" Stroke=\"{StaticResource RadioButtonInvalidFocusedBorderBrush}\" StrokeThickness=\"1\" Fill=\"{StaticResource RadioButtonInvalidFocusedBackgroundBrush}\" Width=\"18\" Height=\"18\" />\r\n\t\t\t\t\t\t<Ellipse x:Name=\"Checked1\" Fill=\"{StaticResource RadioButtonCheckBackgroundBrush}\" Opacity=\"0\" Width=\"10\" Height=\"10\" />\r\n\t\t\t\t\t\t<ContentPresenter x:Name=\"contentPresenter\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Grid.Column=\"1\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" />\r\n\t\t\t\t\t\t<Ellipse x:Name=\"disabled\" Opacity=\"0\" StrokeThickness=\"1\" Fill=\"{StaticResource DisabledVisualElement}\" Width=\"18\" Height=\"18\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  ButtonStyle  ********************************* -->\r\n\t<Style x:Key=\"ButtonStyle\" TargetType=\"Button\">\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"FontSize\" Value=\"14.667\" />\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"10,0,10,2\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"30\" />\r\n\t\t<Setter Property=\"MinWidth\" Value=\"30\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"Button\">\r\n\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Bd\" Storyboard.TargetProperty=\"Fill\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Bd\" Storyboard.TargetProperty=\"Stroke\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonHoverBorderBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentControl\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource LightForegroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Pressed\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Bd\" Storyboard.TargetProperty=\"Fill\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonPressedBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Bd\" Storyboard.TargetProperty=\"Stroke\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonPressedBorderBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentControl\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource LightForegroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"DisabledVisualElement\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"FocusStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Focused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"FocusedVisualElement\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unfocused\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Rectangle x:Name=\"Bd\" Fill=\"{StaticResource ButtonBackgroundBrush}\" Stroke=\"{StaticResource ButtonBorderBrush}\" StrokeThickness=\"1\" />\r\n\t\t\t\t\t\t<ContentControl x:Name=\"ContentControl\" Foreground=\"{TemplateBinding Foreground}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\">\r\n\t\t\t\t\t\t\t<ContentPresenter x:Name=\"contentPresenter\" />\r\n\t\t\t\t\t\t</ContentControl>\r\n\t\t\t\t\t\t<Rectangle x:Name=\"FocusedVisualElement\" Stroke=\"{StaticResource ButtonPressedBorderBrush}\" Visibility=\"Collapsed\" StrokeThickness=\"2\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"DisabledVisualElement\" Fill=\"{StaticResource DisabledVisualElement}\" Visibility=\"Collapsed\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/MetroDark/Styles.WPF.xaml",
    "content": "﻿<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" \r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" \r\n                    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\" \r\n                    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" \r\n                    xmlns:System=\"clr-namespace:System;assembly=mscorlib\" mc:Ignorable=\"d\">\r\n\r\n\t<!-- *********************************  RESOURCES  ********************************* -->\r\n\t<ResourceDictionary.MergedDictionaries>\r\n\t\t<ResourceDictionary Source=\"Theme.Colors.xaml\" />\r\n\t\t<ResourceDictionary Source=\"Styles.Shared.xaml\" />\r\n\t</ResourceDictionary.MergedDictionaries>\r\n\r\n\t<!-- ******************************************************** WPF SPECIFIC INLINE-CONTROLS RESOURCES ***********************************************************\r\n    ***********************************************************************************************************************************************************************    -->\r\n\t<!-- *********************************  ScrollBarButton Style  ********************************* -->\r\n\t<Style x:Key=\"ScrollBarButtonStyle\" TargetType=\"{x:Type RepeatButton}\">\r\n\t\t<Setter Property=\"MinWidth\" Value=\"30\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"30\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"0\" />\r\n\t\t<Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n\t\t<Setter Property=\"Focusable\" Value=\"false\" />\r\n\t\t<Setter Property=\"IsTabStop\" Value=\"false\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n\t\t\t\t\t<Grid x:Name=\"grid1\">\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"Arrow\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ScrollbarPageButtonArrowHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Pressed\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"Arrow\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ScrollbarPageButtonArrowPressedBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"Arrow\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ScrollbarPageButtonArrowDisabledBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Rectangle Fill=\"{StaticResource TransparentBrush}\" Margin=\"-5\" />\r\n\t\t\t\t\t\t<Path x:Name=\"Arrow\" Data=\"F1 M 541.537,173.589L 531.107,173.589L 536.322,167.49L 541.537,173.589 Z \" Height=\"6\" Stretch=\"Uniform\" Width=\"10\" Fill=\"{StaticResource ScrollbarPageButtonArrowBackgroundBrush}\" Margin=\"{TemplateBinding Padding}\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  ScrollBarPageButton Style  ********************************* -->\r\n\t<Style x:Key=\"ScrollBarPageButtonStyle\" TargetType=\"{x:Type RepeatButton}\">\r\n\t\t<Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n\t\t<Setter Property=\"Background\" Value=\"Transparent\" />\r\n\t\t<Setter Property=\"Focusable\" Value=\"false\" />\r\n\t\t<Setter Property=\"IsTabStop\" Value=\"false\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n\t\t\t\t\t<Rectangle Fill=\"{TemplateBinding Background}\" Height=\"{TemplateBinding Height}\" Width=\"{TemplateBinding Width}\">\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Pressed\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t</Rectangle>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  Horizontal ScrollBarThumb Style  ********************************* -->\r\n\t<Style x:Key=\"HScrollBarThumbStyle\" TargetType=\"{x:Type Thumb}\">\r\n\t\t<Setter Property=\"MinWidth\" Value=\"20\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"30\" />\r\n\t\t<Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n\t\t<Setter Property=\"IsTabStop\" Value=\"false\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n\t\t\t\t\t<Grid Margin=\"0\">\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"Thumb\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource HScrollbarThumbHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Pressed\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"Thumb\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource HScrollbarThumbPressedBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"Thumb\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource HScrollbarThumbDisabledBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Rectangle Fill=\"{StaticResource TransparentBrush}\" Margin=\"-5\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"Thumb\" Margin=\"1\" Fill=\"{StaticResource HScrollbarThumbBackgroundBrush}\" Height=\"8\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  Vertical ScrollbarThumb Style  ********************************* -->\r\n\t<Style x:Key=\"VScrollBarThumbStyle\" TargetType=\"{x:Type Thumb}\">\r\n\t\t<Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n\t\t<Setter Property=\"MinWidth\" Value=\"30\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"20\" />\r\n\t\t<Setter Property=\"Stylus.IsPressAndHoldEnabled\" Value=\"false\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n\t\t\t\t\t<Grid x:Name=\"grid\" Height=\"Auto\" Width=\"Auto\">\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"Thumb\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource VScrollbarThumbHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Pressed\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"Thumb\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource VScrollbarThumbPressedBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"Thumb\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource VScrollbarThumbDisabledBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Rectangle Fill=\"{StaticResource TransparentBrush}\" Margin=\"-5\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"Thumb\" Fill=\"{StaticResource VScrollbarThumbBackgroundBrush}\" Width=\"8\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  ScrollBar Style  ********************************* -->\r\n\t<Style x:Key=\"ScrollBarStyle\" TargetType=\"{x:Type ScrollBar}\">\r\n\t\t<Setter Property=\"Stylus.IsPressAndHoldEnabled\" Value=\"false\" />\r\n\t\t<Setter Property=\"Stylus.IsFlicksEnabled\" Value=\"false\" />\r\n\t\t<Setter Property=\"Width\" Value=\"30\" />\r\n\t\t<Setter Property=\"MinWidth\" Value=\"30\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type ScrollBar}\">\r\n\t\t\t\t\t<Grid SnapsToDevicePixels=\"true\">\r\n\t\t\t\t\t\t<Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t<RowDefinition Height=\"30\" />\r\n\t\t\t\t\t\t\t<RowDefinition Height=\"0.00001*\" />\r\n\t\t\t\t\t\t\t<RowDefinition Height=\"30\" />\r\n\t\t\t\t\t\t</Grid.RowDefinitions>\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0:0:0.3\" />\r\n\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"repeatButton\">\r\n\t\t\t\t\t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0.6\" />\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"repeatButton1\">\r\n\t\t\t\t\t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0.6\" />\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"thumb\">\r\n\t\t\t\t\t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0\" />\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Rectangle x:Name=\"Bg\" Grid.RowSpan=\"3\" Fill=\"{StaticResource ScrollbarBackgroundBrush}\" Margin=\"0\" />\r\n\t\t\t\t\t\t<RepeatButton x:Name=\"repeatButton\" Command=\"{x:Static ScrollBar.LineUpCommand}\" IsEnabled=\"True\" Style=\"{StaticResource ScrollBarButtonStyle}\" HorizontalAlignment=\"Center\" />\r\n\t\t\t\t\t\t<Track x:Name=\"PART_Track\" IsDirectionReversed=\"true\" IsEnabled=\"True\" Grid.Row=\"1\">\r\n\t\t\t\t\t\t\t<Track.DecreaseRepeatButton>\r\n\t\t\t\t\t\t\t\t<RepeatButton Command=\"{x:Static ScrollBar.PageUpCommand}\" Style=\"{StaticResource ScrollBarPageButtonStyle}\" />\r\n\t\t\t\t\t\t\t</Track.DecreaseRepeatButton>\r\n\t\t\t\t\t\t\t<Track.IncreaseRepeatButton>\r\n\t\t\t\t\t\t\t\t<RepeatButton Command=\"{x:Static ScrollBar.PageDownCommand}\" Style=\"{StaticResource ScrollBarPageButtonStyle}\" />\r\n\t\t\t\t\t\t\t</Track.IncreaseRepeatButton>\r\n\t\t\t\t\t\t\t<Track.Thumb>\r\n\t\t\t\t\t\t\t\t<Thumb x:Name=\"thumb\" Style=\"{StaticResource VScrollBarThumbStyle}\" HorizontalAlignment=\"Center\" Width=\"30\" />\r\n\t\t\t\t\t\t\t</Track.Thumb>\r\n\t\t\t\t\t\t</Track>\r\n\t\t\t\t\t\t<RepeatButton x:Name=\"repeatButton1\" Command=\"{x:Static ScrollBar.LineDownCommand}\" IsEnabled=\"True\" Grid.Row=\"2\" Style=\"{StaticResource ScrollBarButtonStyle}\" RenderTransformOrigin=\"0.5,0.5\" HorizontalAlignment=\"Center\">\r\n\t\t\t\t\t\t\t<RepeatButton.RenderTransform>\r\n\t\t\t\t\t\t\t\t<TransformGroup>\r\n\t\t\t\t\t\t\t\t\t<ScaleTransform />\r\n\t\t\t\t\t\t\t\t\t<SkewTransform />\r\n\t\t\t\t\t\t\t\t\t<RotateTransform Angle=\"180\" />\r\n\t\t\t\t\t\t\t\t\t<TranslateTransform />\r\n\t\t\t\t\t\t\t\t</TransformGroup>\r\n\t\t\t\t\t\t\t</RepeatButton.RenderTransform>\r\n\t\t\t\t\t\t</RepeatButton>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"IsEnabled\" Value=\"false\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"Bg\" Value=\"{StaticResource ScrollbarDisabledBackgroundBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t\t<Style.Triggers>\r\n\t\t\t<Trigger Property=\"Orientation\" Value=\"Horizontal\">\r\n\t\t\t\t<Setter Property=\"Width\" Value=\"Auto\" />\r\n\t\t\t\t<Setter Property=\"MinWidth\" Value=\"0\" />\r\n\t\t\t\t<Setter Property=\"Height\" Value=\"30\" />\r\n\t\t\t\t<Setter Property=\"MinHeight\" Value=\"30\" />\r\n\t\t\t\t<Setter Property=\"Template\">\r\n\t\t\t\t\t<Setter.Value>\r\n\t\t\t\t\t\t<ControlTemplate TargetType=\"{x:Type ScrollBar}\">\r\n\t\t\t\t\t\t\t<Grid SnapsToDevicePixels=\"true\">\r\n\t\t\t\t\t\t\t\t<Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"30\" />\r\n\t\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"0.00001*\" />\r\n\t\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"30\" />\r\n\t\t\t\t\t\t\t\t</Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t\t\t<VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0:0:0.3\" />\r\n\t\t\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"repeatButton\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"repeatButton1\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\" />\r\n\t\t\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t\t<Rectangle x:Name=\"Bg\" Grid.ColumnSpan=\"5\" Fill=\"{StaticResource ScrollbarBackgroundBrush}\" Margin=\"0\" />\r\n\t\t\t\t\t\t\t\t<RepeatButton x:Name=\"repeatButton\" Command=\"{x:Static ScrollBar.LineLeftCommand}\" IsEnabled=\"True\" Style=\"{DynamicResource ScrollBarButtonStyle}\" Opacity=\"1\" RenderTransformOrigin=\"0.5,0.5\" VerticalAlignment=\"Center\">\r\n\t\t\t\t\t\t\t\t\t<RepeatButton.RenderTransform>\r\n\t\t\t\t\t\t\t\t\t\t<TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t\t<ScaleTransform />\r\n\t\t\t\t\t\t\t\t\t\t\t<SkewTransform />\r\n\t\t\t\t\t\t\t\t\t\t\t<RotateTransform Angle=\"-90\" />\r\n\t\t\t\t\t\t\t\t\t\t\t<TranslateTransform />\r\n\t\t\t\t\t\t\t\t\t\t</TransformGroup>\r\n\t\t\t\t\t\t\t\t\t</RepeatButton.RenderTransform>\r\n\t\t\t\t\t\t\t\t</RepeatButton>\r\n\t\t\t\t\t\t\t\t<Track x:Name=\"PART_Track\" Grid.Column=\"1\" IsEnabled=\"True\">\r\n\t\t\t\t\t\t\t\t\t<Track.DecreaseRepeatButton>\r\n\t\t\t\t\t\t\t\t\t\t<RepeatButton Command=\"{x:Static ScrollBar.PageLeftCommand}\" Style=\"{StaticResource ScrollBarPageButtonStyle}\" />\r\n\t\t\t\t\t\t\t\t\t</Track.DecreaseRepeatButton>\r\n\t\t\t\t\t\t\t\t\t<Track.IncreaseRepeatButton>\r\n\t\t\t\t\t\t\t\t\t\t<RepeatButton Command=\"{x:Static ScrollBar.PageRightCommand}\" Style=\"{StaticResource ScrollBarPageButtonStyle}\" />\r\n\t\t\t\t\t\t\t\t\t</Track.IncreaseRepeatButton>\r\n\t\t\t\t\t\t\t\t\t<Track.Thumb>\r\n\t\t\t\t\t\t\t\t\t\t<Thumb Style=\"{StaticResource HScrollBarThumbStyle}\" VerticalAlignment=\"Center\" Height=\"30\" />\r\n\t\t\t\t\t\t\t\t\t</Track.Thumb>\r\n\t\t\t\t\t\t\t\t</Track>\r\n\t\t\t\t\t\t\t\t<RepeatButton x:Name=\"repeatButton1\" Grid.Column=\"2\" Command=\"{x:Static ScrollBar.LineRightCommand}\" IsEnabled=\"True\" Style=\"{DynamicResource ScrollBarButtonStyle}\" Opacity=\"1\" RenderTransformOrigin=\"0.5,0.5\" VerticalAlignment=\"Center\">\r\n\t\t\t\t\t\t\t\t\t<RepeatButton.RenderTransform>\r\n\t\t\t\t\t\t\t\t\t\t<TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t\t<ScaleTransform />\r\n\t\t\t\t\t\t\t\t\t\t\t<SkewTransform />\r\n\t\t\t\t\t\t\t\t\t\t\t<RotateTransform Angle=\"90\" />\r\n\t\t\t\t\t\t\t\t\t\t\t<TranslateTransform />\r\n\t\t\t\t\t\t\t\t\t\t</TransformGroup>\r\n\t\t\t\t\t\t\t\t\t</RepeatButton.RenderTransform>\r\n\t\t\t\t\t\t\t\t</RepeatButton>\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t\t\t<Trigger Property=\"IsEnabled\" Value=\"false\">\r\n\t\t\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"Bg\" Value=\"{StaticResource ScrollbarDisabledBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t\t\t</ControlTemplate>\r\n\t\t\t\t\t</Setter.Value>\r\n\t\t\t\t</Setter>\r\n\t\t\t</Trigger>\r\n\t\t</Style.Triggers>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  ScrollViewer Style ********************************* -->\r\n\t<Style x:Key=\"ScrollViewerStyle\" TargetType=\"{x:Type ScrollViewer}\">\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n\t\t<Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n\t\t<Setter Property=\"VerticalScrollBarVisibility\" Value=\"Auto\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"0\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type ScrollViewer}\">\r\n\t\t\t\t\t<Grid x:Name=\"Grid\">\r\n\t\t\t\t\t\t<Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t<ColumnDefinition Width=\"*\" />\r\n\t\t\t\t\t\t\t<ColumnDefinition Width=\"Auto\" />\r\n\t\t\t\t\t\t</Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t<Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t<RowDefinition Height=\"*\" />\r\n\t\t\t\t\t\t\t<RowDefinition Height=\"Auto\" />\r\n\t\t\t\t\t\t</Grid.RowDefinitions>\r\n\t\t\t\t\t\t<ScrollContentPresenter x:Name=\"PART_ScrollContentPresenter\" CanContentScroll=\"{TemplateBinding CanContentScroll}\" CanHorizontallyScroll=\"False\" CanVerticallyScroll=\"False\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Grid.Column=\"0\" Margin=\"{TemplateBinding Padding}\" Grid.Row=\"0\" />\r\n\t\t\t\t\t\t<ScrollBar x:Name=\"PART_VerticalScrollBar\" AutomationProperties.AutomationId=\"VerticalScrollBar\" Cursor=\"Arrow\" Grid.Column=\"1\" Maximum=\"{TemplateBinding ScrollableHeight}\" Minimum=\"0\" Grid.Row=\"0\" Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Value=\"{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" ViewportSize=\"{TemplateBinding ViewportHeight}\" Style=\"{StaticResource ScrollBarStyle}\" />\r\n\t\t\t\t\t\t<ScrollBar x:Name=\"PART_HorizontalScrollBar\" AutomationProperties.AutomationId=\"HorizontalScrollBar\" Cursor=\"Arrow\" Grid.Column=\"0\" Maximum=\"{TemplateBinding ScrollableWidth}\" Minimum=\"0\" Orientation=\"Horizontal\" Grid.Row=\"1\" Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Value=\"{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" ViewportSize=\"{TemplateBinding ViewportWidth}\" Style=\"{StaticResource ScrollBarStyle}\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  ComboBoxEditableTextBox Style  ********************************* -->\r\n\t<Style x:Key=\"ComboBoxEditableTextBoxStyle\" TargetType=\"{x:Type TextBox}\">\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"FontSize\" Value=\"14.667\" />\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n\t\t<Setter Property=\"AllowDrop\" Value=\"true\" />\r\n\t\t<Setter Property=\"MinWidth\" Value=\"0\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"30\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"6,4\" />\r\n\t\t<Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type TextBox}\">\r\n\t\t\t\t\t<ScrollViewer Style=\"{StaticResource ScrollViewerStyle}\" x:Name=\"PART_ContentHost\" Background=\"Transparent\" Focusable=\"false\" HorizontalScrollBarVisibility=\"Hidden\" VerticalScrollBarVisibility=\"Hidden\">\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"PART_ContentHost\">\r\n\t\t\t\t\t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0.3\" />\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"ReadOnly\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t</ScrollViewer>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  ComboBoxEditable Template  ********************************* -->\r\n\t<ControlTemplate x:Key=\"ComboBoxEditableTemplate\" TargetType=\"{x:Type ComboBox}\">\r\n\t\t<Grid x:Name=\"MainGrid\" SnapsToDevicePixels=\"true\">\r\n\t\t\t<Grid.ColumnDefinitions>\r\n\t\t\t\t<ColumnDefinition Width=\"*\" />\r\n\t\t\t\t<ColumnDefinition Width=\"Auto\" />\r\n\t\t\t</Grid.ColumnDefinitions>\r\n\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"hover\">\r\n\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"disabled\">\r\n\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t</VisualState>\r\n\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t<VisualStateGroup x:Name=\"FocusStates\">\r\n\t\t\t\t\t<VisualState x:Name=\"Unfocused\" />\r\n\t\t\t\t\t<VisualState x:Name=\"Focused\">\r\n\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"focused\">\r\n\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t<VisualState x:Name=\"FocusedDropDown\">\r\n\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"focused\">\r\n\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t</VisualState>\r\n\t\t\t\t</VisualStateGroup>\r\n\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t<Rectangle x:Name=\"normal\" Fill=\"{StaticResource ComboBoxBackgroundBrush}\" Stroke=\"{StaticResource ComboBoxBorderBrush}\" StrokeThickness=\"1\" Grid.ColumnSpan=\"2\" />\r\n\t\t\t<Rectangle x:Name=\"hover\" Fill=\"{StaticResource ComboBoxHoverBackgroundBrush}\" Stroke=\"{StaticResource ComboBoxHoverBorderBrush}\" StrokeThickness=\"1\" Visibility=\"Collapsed\" Grid.ColumnSpan=\"2\" />\r\n\t\t\t<Popup x:Name=\"PART_Popup\" AllowsTransparency=\"true\" Grid.ColumnSpan=\"2\" IsOpen=\"{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}\" Margin=\"1\" PopupAnimation=\"{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}\" Placement=\"Bottom\">\r\n\t\t\t\t<Border x:Name=\"DropDownBorder\" HorizontalAlignment=\"Stretch\" Background=\"{StaticResource PopupBackgroundBrush}\" BorderBrush=\"{StaticResource PopupBorderBrush}\" BorderThickness=\"1\" MaxHeight=\"{TemplateBinding MaxDropDownHeight}\" MinWidth=\"{Binding ActualWidth, ElementName=MainGrid}\" CornerRadius=\"2\">\r\n\t\t\t\t\t<ScrollViewer x:Name=\"DropDownScrollViewer\" Style=\"{StaticResource ScrollViewerStyle}\">\r\n\t\t\t\t\t\t<Grid RenderOptions.ClearTypeHint=\"Enabled\">\r\n\t\t\t\t\t\t\t<Canvas HorizontalAlignment=\"Left\" Height=\"0\" VerticalAlignment=\"Top\" Width=\"0\">\r\n\t\t\t\t\t\t\t\t<Rectangle x:Name=\"OpaqueRect\" Fill=\"{Binding Background, ElementName=DropDownBorder}\" Height=\"{Binding ActualHeight, ElementName=DropDownBorder}\" Width=\"{Binding ActualWidth, ElementName=DropDownBorder}\" />\r\n\t\t\t\t\t\t\t</Canvas>\r\n\t\t\t\t\t\t\t<ItemsPresenter x:Name=\"ItemsPresenter\" KeyboardNavigation.DirectionalNavigation=\"Contained\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" />\r\n\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t</ScrollViewer>\r\n\t\t\t\t</Border>\r\n\t\t\t</Popup>\r\n\t\t\t<ToggleButton BorderBrush=\"{TemplateBinding BorderBrush}\" Background=\"{TemplateBinding Background}\" Grid.Column=\"0\" IsChecked=\"{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" Style=\"{StaticResource ComboBoxToggleButtonStyle}\" />\r\n\t\t\t<TextBox x:Name=\"PART_EditableTextBox\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" IsReadOnly=\"{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}\" Style=\"{StaticResource ComboBoxEditableTextBoxStyle}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\" Margin=\"0,0,31,0\" VerticalAlignment=\"Center\" />\r\n\t\t\t<Rectangle x:Name=\"focused\" Stroke=\"{StaticResource ComboBoxFocusedBorderBrush}\" StrokeThickness=\"1\" Visibility=\"Collapsed\" Grid.ColumnSpan=\"2\" />\r\n\t\t\t<Rectangle x:Name=\"disabled\" Fill=\"{StaticResource ComboBoxDisabledBackgroundBrush}\" Visibility=\"Collapsed\" Grid.ColumnSpan=\"2\" />\r\n\t\t</Grid>\r\n\t</ControlTemplate>\r\n\r\n\t<!-- *********************************  ComboBox Style  ********************************* -->\r\n\t<Style x:Key=\"ComboBoxStyle\" TargetType=\"{x:Type ComboBox}\">\r\n\t\t<Setter Property=\"Padding\" Value=\"6,5,6,3\" />\r\n\t\t<Setter Property=\"Margin\" Value=\"0\" />\r\n\t\t<Setter Property=\"FontSize\" Value=\"14.667\" />\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"30\" />\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource TransparentBrush}\" />\r\n\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource ComboBoxBorderBrush}\" />\r\n\t\t<Setter Property=\"ItemContainerStyle\" Value=\"{StaticResource ComboBoxItemStyle}\" />\r\n\t\t<Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\" />\r\n\t\t<Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\" />\r\n\t\t<Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"true\" />\r\n\t\t<Setter Property=\"ScrollViewer.PanningMode\" Value=\"Both\" />\r\n\t\t<Setter Property=\"Stylus.IsFlicksEnabled\" Value=\"False\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type ComboBox}\">\r\n\t\t\t\t\t<Grid x:Name=\"MainGrid\" SnapsToDevicePixels=\"true\">\r\n\t\t\t\t\t\t<Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t<ColumnDefinition Width=\"*\" />\r\n\t\t\t\t\t\t\t<ColumnDefinition MinWidth=\"30\" Width=\"0\" />\r\n\t\t\t\t\t\t</Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"hover\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"contentControl\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource LightForegroundBrush}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"disabled\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"FocusStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unfocused\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Focused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"focused\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"FocusedDropDown\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"focused\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Rectangle x:Name=\"normal\" Fill=\"{StaticResource ComboBoxBackgroundBrush}\" Stroke=\"{StaticResource ComboBoxBorderBrush}\" StrokeThickness=\"1\" Grid.ColumnSpan=\"2\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"hover\" Fill=\"{StaticResource ComboBoxHoverBackgroundBrush}\" Stroke=\"{StaticResource ComboBoxHoverBorderBrush}\" StrokeThickness=\"1\" Visibility=\"Collapsed\" Grid.ColumnSpan=\"2\" />\r\n\t\t\t\t\t\t<Popup x:Name=\"PART_Popup\" AllowsTransparency=\"true\" Grid.ColumnSpan=\"2\" IsOpen=\"{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}\" Margin=\"1\" PopupAnimation=\"{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}\" Placement=\"Bottom\">\r\n\t\t\t\t\t\t\t<Border x:Name=\"DropDownBorder\" HorizontalAlignment=\"Stretch\" Background=\"{StaticResource PopupBackgroundBrush}\" BorderBrush=\"{StaticResource PopupBorderBrush}\" BorderThickness=\"1\" MaxHeight=\"{TemplateBinding MaxDropDownHeight}\" MinWidth=\"{Binding ActualWidth, ElementName=MainGrid}\" CornerRadius=\"2\">\r\n\t\t\t\t\t\t\t\t<ScrollViewer x:Name=\"DropDownScrollViewer\" Style=\"{StaticResource ScrollViewerStyle}\">\r\n\t\t\t\t\t\t\t\t\t<Grid RenderOptions.ClearTypeHint=\"Enabled\">\r\n\t\t\t\t\t\t\t\t\t\t<Canvas HorizontalAlignment=\"Left\" Height=\"0\" VerticalAlignment=\"Top\" Width=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t<Rectangle x:Name=\"OpaqueRect\" Fill=\"{Binding Background, ElementName=DropDownBorder}\" Height=\"{Binding ActualHeight, ElementName=DropDownBorder}\" Width=\"{Binding ActualWidth, ElementName=DropDownBorder}\" />\r\n\t\t\t\t\t\t\t\t\t\t</Canvas>\r\n\t\t\t\t\t\t\t\t\t\t<ItemsPresenter x:Name=\"ItemsPresenter\" KeyboardNavigation.DirectionalNavigation=\"Contained\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" />\r\n\t\t\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t\t\t</ScrollViewer>\r\n\t\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t\t</Popup>\r\n\t\t\t\t\t\t<ToggleButton BorderBrush=\"{TemplateBinding BorderBrush}\" Background=\"{TemplateBinding Background}\" Grid.ColumnSpan=\"2\" IsChecked=\"{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" Style=\"{StaticResource ComboBoxToggleButtonStyle}\" />\r\n\t\t\t\t\t\t<ContentControl x:Name=\"contentControl\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" IsHitTestVisible=\"false\" Margin=\"{TemplateBinding Padding}\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\">\r\n\t\t\t\t\t\t\t<ContentPresenter ContentTemplate=\"{TemplateBinding SelectionBoxItemTemplate}\" ContentTemplateSelector=\"{TemplateBinding ItemTemplateSelector}\" Content=\"{TemplateBinding SelectionBoxItem}\" ContentStringFormat=\"{TemplateBinding SelectionBoxItemStringFormat}\" IsHitTestVisible=\"false\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" />\r\n\t\t\t\t\t\t</ContentControl>\r\n\t\t\t\t\t\t<Rectangle x:Name=\"focused\" Stroke=\"{StaticResource ComboBoxFocusedBorderBrush}\" StrokeThickness=\"1\" Visibility=\"Collapsed\" Grid.ColumnSpan=\"2\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"disabled\" Fill=\"{StaticResource ComboBoxDisabledBackgroundBrush}\" Visibility=\"Collapsed\" Grid.ColumnSpan=\"2\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"HasItems\" Value=\"false\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Height\" TargetName=\"DropDownBorder\" Value=\"95\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsEnabled\" Value=\"false\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Background\" Value=\"{StaticResource ComboBoxBackgroundBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsGrouping\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"ScrollViewer.CanContentScroll\" SourceName=\"DropDownScrollViewer\" Value=\"false\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Canvas.Top\" TargetName=\"OpaqueRect\" Value=\"{Binding VerticalOffset, ElementName=DropDownScrollViewer}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Canvas.Left\" TargetName=\"OpaqueRect\" Value=\"{Binding HorizontalOffset, ElementName=DropDownScrollViewer}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n                    </ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t\t<Style.Triggers>\r\n\t\t\t<Trigger Property=\"IsEditable\" Value=\"true\">\r\n\t\t\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t\t\t<Setter Property=\"Background\" Value=\"{StaticResource TextBoxBackgroundBrush}\" />\r\n\t\t\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource TextBoxBorderBrush}\" />\r\n\t\t\t\t<Setter Property=\"IsTabStop\" Value=\"false\" />\r\n\t\t\t\t<Setter Property=\"Padding\" Value=\"0\" />\r\n\t\t\t\t<Setter Property=\"Template\" Value=\"{StaticResource ComboBoxEditableTemplate}\" />\r\n\t\t\t</Trigger>            \r\n\t\t</Style.Triggers>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  TextBox Style  ********************************* -->\r\n\t<Style x:Key=\"TextBoxStyle\" TargetType=\"TextBox\">\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"FontSize\" Value=\"13.333\" />\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource TextBoxBackgroundBrush}\" />\r\n\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource TextBoxBorderBrush}\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"30\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"6,4\" />\r\n\t\t<Setter Property=\"SelectionBrush\" Value=\"{StaticResource TextBoxFocusedBrush}\" />\r\n\t\t<Setter Property=\"CaretBrush\" Value=\"{StaticResource CaretForegroundBrush}\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"TextBox\">\r\n\t\t\t\t\t<Grid x:Name=\"RootElement\">\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"Border\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TextBoxHoverBorderBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"Border\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TextBoxHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"DisabledVisualElement\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"ReadOnly\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"ReadOnlyVisualElement\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"FocusStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Focused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"FocusVisualElement\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unfocused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"FocusVisualElement\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"ValidationStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Valid\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"InvalidUnfocused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ValidationErrorElement\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"InvalidFocused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ValidationErrorElement\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"IsOpen\" Storyboard.TargetName=\"validationTooltip\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<System:Boolean>True</System:Boolean>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Border x:Name=\"Border\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Opacity=\"1\">\r\n\t\t\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t\t\t<Border x:Name=\"ReadOnlyVisualElement\" Background=\"{StaticResource TextBoxReadOnlyBackgroundBrush}\" Opacity=\"0\" />\r\n\t\t\t\t\t\t\t\t<ScrollViewer x:Name=\"PART_ContentHost\" BorderThickness=\"0\" IsTabStop=\"False\" Padding=\"{TemplateBinding Padding}\" />\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t\t<Border x:Name=\"DisabledVisualElement\" BorderBrush=\"{StaticResource DisabledVisualElement}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{StaticResource DisabledVisualElement}\" IsHitTestVisible=\"False\" Opacity=\"0\" />\r\n\t\t\t\t\t\t<Border x:Name=\"FocusVisualElement\" BorderBrush=\"{StaticResource TextBoxFocusedBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" IsHitTestVisible=\"False\" Opacity=\"0\" />\r\n\t\t\t\t\t\t<Border x:Name=\"ValidationErrorElement\" BorderBrush=\"{StaticResource ValidationErrorElement}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Visibility=\"Collapsed\">\r\n\t\t\t\t\t\t\t<ToolTipService.ToolTip>\r\n\t\t\t\t\t\t\t\t<ToolTip x:Name=\"validationTooltip\" DataContext=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Right\" PlacementTarget=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\" Template=\"{StaticResource ValidationToolTipTemplate}\">\r\n\t\t\t\t\t\t\t\t\t<ToolTip.Triggers>\r\n\t\t\t\t\t\t\t\t\t\t<EventTrigger RoutedEvent=\"Canvas.Loaded\">\r\n\t\t\t\t\t\t\t\t\t\t\t<BeginStoryboard>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"IsHitTestVisible\" Storyboard.TargetName=\"validationTooltip\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<System:Boolean>true</System:Boolean>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t\t</BeginStoryboard>\r\n\t\t\t\t\t\t\t\t\t\t</EventTrigger>\r\n\t\t\t\t\t\t\t\t\t</ToolTip.Triggers>\r\n\t\t\t\t\t\t\t\t</ToolTip>\r\n\t\t\t\t\t\t\t</ToolTipService.ToolTip>\r\n\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  ListBox Style  ********************************* -->\r\n\t<Style x:Key=\"ListBoxStyle\" TargetType=\"ListBox\">\r\n\t\t<Setter Property=\"Padding\" Value=\"0\" />\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource ListBoxBackgroundBrush}\" />\r\n\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource ListBoxBorderBrush}\" />\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n\t\t<Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n\t\t<Setter Property=\"IsTabStop\" Value=\"False\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"ItemContainerStyle\" Value=\"{StaticResource ListBoxItemStyle}\" />\r\n\t\t<Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\" />\r\n\t\t<Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"ListBox\">\r\n\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"ValidationStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Valid\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"InvalidUnfocused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ValidationErrorElement\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"InvalidFocused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ValidationErrorElement\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"IsOpen\" Storyboard.TargetName=\"validationTooltip\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<System:Boolean>True</System:Boolean>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Border BorderThickness=\"{TemplateBinding BorderThickness}\" BorderBrush=\"{TemplateBinding BorderBrush}\" Background=\"{TemplateBinding Background}\">\r\n\t\t\t\t\t\t\t<ScrollViewer x:Name=\"ScrollViewer\" BorderThickness=\"0\" Padding=\"{TemplateBinding Padding}\" Style=\"{StaticResource ScrollViewerStyle}\">\r\n\t\t\t\t\t\t\t\t<ItemsPresenter />\r\n\t\t\t\t\t\t\t</ScrollViewer>\r\n\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t\t<Border x:Name=\"ValidationErrorElement\" BorderBrush=\"{StaticResource ValidationErrorElement}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\" Visibility=\"Collapsed\">\r\n\t\t\t\t\t\t\t<ToolTipService.ToolTip>\r\n\t\t\t\t\t\t\t\t<ToolTip x:Name=\"validationTooltip\" DataContext=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Right\" PlacementTarget=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\" Template=\"{StaticResource ValidationToolTipTemplate}\">\r\n\t\t\t\t\t\t\t\t\t<ToolTip.Triggers>\r\n\t\t\t\t\t\t\t\t\t\t<EventTrigger RoutedEvent=\"Canvas.Loaded\">\r\n\t\t\t\t\t\t\t\t\t\t\t<BeginStoryboard>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"IsHitTestVisible\" Storyboard.TargetName=\"validationTooltip\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<System:Boolean>true</System:Boolean>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t\t</BeginStoryboard>\r\n\t\t\t\t\t\t\t\t\t\t</EventTrigger>\r\n\t\t\t\t\t\t\t\t\t</ToolTip.Triggers>\r\n\t\t\t\t\t\t\t\t</ToolTip>\r\n\t\t\t\t\t\t\t</ToolTipService.ToolTip>\r\n\t\t\t\t\t\t\t<Grid Background=\"{StaticResource TransparentBrush}\" HorizontalAlignment=\"Right\" Height=\"10\" Margin=\"0,-4,-4,0\" VerticalAlignment=\"Top\" Width=\"10\">\r\n\t\t\t\t\t\t\t\t<Path Data=\"M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z\" Fill=\"{StaticResource ValidationErrorElement}\" Margin=\"-1,3,0,0\" />\r\n\t\t\t\t\t\t\t\t<Path Data=\"M 0,0 L2,0 L 8,6 L8,8\" Fill=\"{StaticResource LightForegroundBrush}\" Margin=\"-1,3,0,0\" />\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/MetroDark/Theme.Colors.xaml",
    "content": "﻿<ResourceDictionary\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" mc:Ignorable=\"d\">\r\n\r\n    <!-- ********************************** THEME BRUSHES - For Color Tuner **********************************-->\r\n    <SolidColorBrush x:Key=\"Brush01\" Color=\"#FF00AADE\"/>\r\n    <SolidColorBrush x:Key=\"Brush02\" Color=\"White\"/>\r\n    <SolidColorBrush x:Key=\"Brush03\" Color=\"#FFC6C6C6\"/>\r\n    <SolidColorBrush x:Key=\"Brush04\" Color=\"#FF565656\"/>\r\n    <SolidColorBrush x:Key=\"Brush05\" Color=\"#FF333333\"/>\r\n    \r\n    <!-- ********************************** THEME COLORS **********************************-->\r\n    <!--Base Colors-->\t\t\r\n    <Color x:Key=\"Color_000\">#FF282828</Color>\r\n    <Color x:Key=\"Color_001\">#FFFFFFFF</Color>\r\n\t<Color x:Key=\"Color_002\">#FFBABABA</Color>\r\n    <Color x:Key=\"Color_003\">#FF858585</Color>\r\n    <Color x:Key=\"Color_004\">#FF747474</Color>\r\n    <Color x:Key=\"Color_005\">#FF565656</Color>\r\n    <Color x:Key=\"Color_006\">#FF454545</Color>\r\n    <Color x:Key=\"Color_007\">#FF333333</Color>\r\n    <Color x:Key=\"Color_008\">#FF292929</Color>\r\n    <Color x:Key=\"Color_009\">#FF181818</Color>\r\n\t\r\n<!--Transparent and Whites with transparency-->\t\t\r\n    <Color x:Key=\"Color_010\">#E5FFFFFF</Color><!--90% White-->\r\n    <Color x:Key=\"Color_011\">#BFFFFFFF</Color><!--75% White-->\r\n    <Color x:Key=\"Color_012\">#99FFFFFF</Color><!--60% White-->\r\n    <Color x:Key=\"Color_013\">#72FFFFFF</Color><!--45% White-->\r\n    <Color x:Key=\"Color_014\">#4CFFFFFF</Color><!--30% White-->\r\n    <Color x:Key=\"Color_016\">#00FFFFFF</Color><!--0% White-->\r\n\t\t\t\t\t\t\r\n<!--Blacks and grays with transparency-->\t\t\r\n    <Color x:Key=\"Color_018\">#72000000</Color><!--45% Black-->\r\n    <Color x:Key=\"Color_019\">#4C000000</Color><!--30% Black-->\r\n    <Color x:Key=\"Color_020\">#26000000</Color><!--15% Black-->\r\n    <Color x:Key=\"Color_021\">#00000000</Color><!--0% Black-->\r\n    <Color x:Key=\"Color_022\">#66E2E2E2</Color>\r\n\t\r\n<!--Theme Accent colors -->\t\t\r\n    <Color x:Key=\"Color_023\">#FF0086AF</Color>\r\n    <Color x:Key=\"Color_024\">#FF00AADE</Color>\r\n    <Color x:Key=\"Color_025\">#FF80D5EF</Color>\r\n    <Color x:Key=\"Color_026\">#FFB2E1EF</Color>\r\n    <Color x:Key=\"Color_027\">#2600AADE</Color>\r\n\t\r\n<!--Theme Error colors -->\t\t\r\n    <Color x:Key=\"Color_028\">#FFD0284C</Color>\r\n    <Color x:Key=\"Color_029\">#FFF55E7F</Color>\r\n\t  <Color x:Key=\"Color_030\">#FFFFCAD5</Color>\r\n\t\r\n<!--Colors for Chart Series-->\t\t\r\n    <Color x:Key=\"Color_035\">#FF006481</Color>\r\n    <Color x:Key=\"Color_037\">#FF8A9B0F</Color>\r\n    <Color x:Key=\"Color_038\">#FF3E4700</Color>\r\n    <Color x:Key=\"Color_040\">#FFF14D0F</Color>\r\n    <Color x:Key=\"Color_041\">#FF8D2E00</Color>\r\n    <Color x:Key=\"Color_043\">#FF81106B</Color>\r\n    <Color x:Key=\"Color_044\">#FF410135</Color>\r\n    <Color x:Key=\"Color_046\">#FFFCA910</Color>\r\n    <Color x:Key=\"Color_047\">#FF8D4902</Color>\r\n    <Color x:Key=\"Color_049\">#FF037A54</Color>\r\n    <Color x:Key=\"Color_050\">#FF003F2A</Color>\r\n    <Color x:Key=\"Color_052\">#FF154D85</Color>\r\n    <Color x:Key=\"Color_053\">#FF02284D</Color>\r\n    <Color x:Key=\"Color_055\">#FF543511</Color>\r\n    <Color x:Key=\"Color_056\">#FF211303</Color>\r\n    <Color x:Key=\"Color_058\">#FF89806D</Color>\r\n    <Color x:Key=\"Color_059\">#FF393225</Color>\r\n    <Color x:Key=\"Color_061\">#FF58458B</Color>\r\n    <Color x:Key=\"Color_062\">#FF211347</Color>\r\n    <Color x:Key=\"Color_063\">#7FB9B9B9</Color>\r\n    <Color x:Key=\"Color_064\">#33565656</Color>\r\n    <Color x:Key=\"Color_065\">#7F3F3F3F</Color>\r\n    <Color x:Key=\"Color_066\">#FF686868</Color>\r\n    <Color x:Key=\"Color_067\">#8000AADE</Color>\r\n    <Color x:Key=\"Color_068\">#CC3F3F3F</Color>\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/MetroDark/Theme.xaml",
    "content": "﻿<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" \r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" \r\n                    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\" \r\n                    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n                    mc:Ignorable=\"d\">\r\n\r\n\t<!-- *********************************  RESOURCES  ********************************* -->\r\n\t<ResourceDictionary.MergedDictionaries>\r\n\t\t<ResourceDictionary Source=\"Styles.WPF.xaml\" />\r\n        <ResourceDictionary Source=\"MetroDark.MSControls.Toolkit.Implicit.xaml\" />\r\n\t</ResourceDictionary.MergedDictionaries>\r\n\r\n\t<!-- *********************************  BRUSHES  ********************************* -->\r\n\t<!--  Slider Brushes -->\r\n    <SolidColorBrush x:Key=\"SliderThumbBackgroundBrush\" Color=\"{StaticResource Color_005}\" />\r\n    <SolidColorBrush x:Key=\"SliderThumbHoverBackgroundBrush\" Color=\"{StaticResource Color_002}\" />\r\n    <SolidColorBrush x:Key=\"SliderThumbPressedBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n    <SolidColorBrush x:Key=\"SliderThumbDisabledBackgroundBrush\" Color=\"{StaticResource Color_005}\" />\r\n    <SolidColorBrush x:Key=\"SliderTrackDisabledOverlayBackgroundBrush\" Color=\"{StaticResource Color_008}\" />\r\n    <SolidColorBrush x:Key=\"SliderThumbFocusedBorderBrush\" Color=\"{StaticResource Color_024}\" />\r\n    <SolidColorBrush x:Key=\"SliderTrackBackgroundBrush\" Color=\"{StaticResource Color_003}\" />\r\n    <SolidColorBrush x:Key=\"SliderSelectionRangeBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n    \r\n    <!--  GridSplitter Brushes -->\r\n\t<SolidColorBrush x:Key=\"GridSplitterBackgroundBrush\" Color=\"{StaticResource Color_008}\" />\r\n\t<SolidColorBrush x:Key=\"GridSplitterBorderBrush\" Color=\"{StaticResource Color_004}\" />\r\n\t<SolidColorBrush x:Key=\"GridSplitterHoverBackgroundBrush\" Color=\"{StaticResource Color_006}\" />\r\n\t<SolidColorBrush x:Key=\"GridSplitterHoverBorderBrush\" Color=\"{StaticResource Color_003}\" />\r\n\t<SolidColorBrush x:Key=\"GridSplitterPressedBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"GridSplitterFocusedBorderBrush\" Color=\"{StaticResource Color_024}\" />\r\n\r\n\t<!-- ProgressBar Brushes -->\r\n\t<SolidColorBrush x:Key=\"ProgressBarBackgroundBrush\" Color=\"{StaticResource Color_005}\" />\r\n\t<SolidColorBrush x:Key=\"ProgressBarForegroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<LinearGradientBrush x:Key=\"ProgressBarIndeterminateBackgroundBrush\" EndPoint=\"0,1\" MappingMode=\"Absolute\" SpreadMethod=\"Repeat\" StartPoint=\"20,1\" Opacity=\"0.8\">\r\n\t\t<LinearGradientBrush.Transform>\r\n\t\t\t<TransformGroup>\r\n\t\t\t\t<TranslateTransform X=\"0\" />\r\n\t\t\t\t<SkewTransform AngleX=\"-30\" />\r\n\t\t\t</TransformGroup>\r\n\t\t</LinearGradientBrush.Transform>\r\n\t\t<GradientStop Color=\"{StaticResource Color_023}\" Offset=\"0.249\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_024}\" Offset=\".25\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_024}\" Offset=\"0.75\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_023}\" Offset=\"0.751\" />\r\n\t</LinearGradientBrush>\r\n\r\n\t<!-- Tooltip Brushes -->\r\n\t<SolidColorBrush x:Key=\"TooltipBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"TooltipBorderBrush\" Color=\"{StaticResource Color_004}\" />\r\n\r\n\t<!-- Expander Brushes -->\r\n    <SolidColorBrush x:Key=\"ExpanderButtonBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n    <SolidColorBrush x:Key=\"ExpanderButtonBorderBrush\" Color=\"{StaticResource Color_004}\" />\r\n    <SolidColorBrush x:Key=\"ExpanderButtonHoverBackgroundBrush\" Color=\"{StaticResource Color_007}\" />\r\n    <SolidColorBrush x:Key=\"ExpanderButtonHoverBorderBrush\" Color=\"{StaticResource Color_003}\" />\r\n    <SolidColorBrush x:Key=\"ExpanderButtonPressedBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n    <SolidColorBrush x:Key=\"ExpanderButtonPressedBorderBrush\" Color=\"{StaticResource Color_024}\" />\r\n    <SolidColorBrush x:Key=\"ExpanderArrowHoverBorderBrush\" Color=\"{StaticResource Color_002}\" />\r\n    <SolidColorBrush x:Key=\"ExpanderArrowPressedBorderBrush\" Color=\"{StaticResource Color_009}\" />\r\n    <SolidColorBrush x:Key=\"ExpanderDisabledForegroundBrush\" Color=\"{StaticResource Color_007}\" />\r\n    <SolidColorBrush x:Key=\"ExpanderDisabledBackgroundBrush\" Color=\"{StaticResource Color_007}\" />\r\n    <SolidColorBrush x:Key=\"ExpanderBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\r\n    <!-- GroupBox Brushes -->\r\n\t<SolidColorBrush x:Key=\"GroupBoxBorderBrush\" Color=\"{StaticResource Color_003}\" />\r\n\r\n\t<!-- PassWordBox Brushes -->\r\n\t<SolidColorBrush x:Key=\"PasswordBoxForegroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\r\n\t<!-- *********************************  TextBlock Style  ********************************* -->\r\n\t<Style x:Key=\"TextBlockStyle\" TargetType=\"TextBlock\">\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"FontSize\" Value=\"13.333\" />\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t</Style>\r\n\r\n\t<!-- *********************************  Label Style  ********************************* -->\r\n\t<Style x:Key=\"LabelStyle\" TargetType=\"{x:Type Label}\">\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"FontSize\" Value=\"13.333\" />\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"IsTabStop\" Value=\"False\" />\r\n\t\t<Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n\t</Style>\r\n\r\n\t<!-- *********************************  SliderRepeatButton Style  ********************************* -->\r\n\t<Style x:Key=\"SliderRepeatButtonStyle\" TargetType=\"{x:Type RepeatButton}\">\r\n\t\t<Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n\t\t<Setter Property=\"Focusable\" Value=\"false\" />\r\n\t\t<Setter Property=\"IsTabStop\" Value=\"false\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n\t\t\t\t\t<Rectangle Fill=\"{StaticResource TransparentBrush}\" />\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  Slider Horizontal Thumb Style  ********************************* -->\r\n\t<Style x:Key=\"HSliderThumbStyle\" TargetType=\"{x:Type Thumb}\">\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource SliderThumbBackgroundBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"12\" />\r\n\t\t<Setter Property=\"MinWidth\" Value=\"8\" />\r\n\t\t<Setter Property=\"IsTabStop\" Value=\"False\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t<Ellipse x:Name=\"ThumbBackground\" Fill=\"{TemplateBinding Background}\" Width=\"16\" Height=\"16\" />\r\n\t\t\t\t\t\t<Ellipse x:Name=\"FocusedVisualElement\" Stroke=\"{StaticResource SliderThumbFocusedBorderBrush}\" Width=\"16\" Height=\"16\" StrokeThickness=\"2\" Opacity=\"0\" />\r\n\t\t\t\t\t\t<Ellipse x:Name=\"DisabledVisualElement\" Fill=\"{StaticResource DisabledVisualElement}\" Width=\"16\" Height=\"16\" Opacity=\"0\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n\t\t\t\t\t\t\t<Setter TargetName=\"ThumbBackground\" Property=\"Fill\" Value=\"{StaticResource SliderThumbHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsMouseCaptured\" Value=\"True\">\r\n\t\t\t\t\t\t\t<Setter TargetName=\"ThumbBackground\" Property=\"Fill\" Value=\"{StaticResource SliderThumbPressedBackgroundBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsEnabled\" Value=\"false\">\r\n\t\t\t\t\t\t\t<Setter TargetName=\"DisabledVisualElement\" Property=\"Opacity\" Value=\"1\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  Slider Vertical Thumb Style  ********************************* -->\r\n\t<Style x:Key=\"VSliderThumbStyle\" TargetType=\"{x:Type Thumb}\">\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource SliderThumbBackgroundBrush}\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"8\" />\r\n\t\t<Setter Property=\"MinWidth\" Value=\"12\" />\r\n\t\t<Setter Property=\"IsTabStop\" Value=\"False\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t<Ellipse x:Name=\"ThumbBackground\" Fill=\"{TemplateBinding Background}\" Width=\"16\" Height=\"16\" />\r\n\t\t\t\t\t\t<Ellipse x:Name=\"FocusedVisualElement\" Stroke=\"{StaticResource SliderThumbFocusedBorderBrush}\" Width=\"16\" Height=\"16\" StrokeThickness=\"2\" Opacity=\"0\" />\r\n\t\t\t\t\t\t<Ellipse x:Name=\"DisabledVisualElement\" Fill=\"{StaticResource DisabledVisualElement}\" Width=\"16\" Height=\"16\" Opacity=\"0\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n\t\t\t\t\t\t\t<Setter TargetName=\"ThumbBackground\" Property=\"Fill\" Value=\"{StaticResource SliderThumbHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsMouseCaptured\" Value=\"True\">\r\n\t\t\t\t\t\t\t<Setter TargetName=\"ThumbBackground\" Property=\"Fill\" Value=\"{StaticResource SliderThumbPressedBackgroundBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsEnabled\" Value=\"false\">\r\n\t\t\t\t\t\t\t<Setter TargetName=\"DisabledVisualElement\" Property=\"Opacity\" Value=\"1\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  Slider Style  ********************************* -->\r\n\t<Style x:Key=\"SliderStyle\" TargetType=\"{x:Type Slider}\">\r\n\t\t<Setter Property=\"Background\" Value=\"Transparent\" />\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"Stylus.IsPressAndHoldEnabled\" Value=\"false\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type Slider}\">\r\n\t\t\t\t\t<Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" SnapsToDevicePixels=\"true\">\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t\t<Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t\t<RowDefinition Height=\"Auto\" />\r\n\t\t\t\t\t\t\t\t<RowDefinition Height=\"Auto\" MinHeight=\"{TemplateBinding MinHeight}\" />\r\n\t\t\t\t\t\t\t\t<RowDefinition Height=\"Auto\" />\r\n\t\t\t\t\t\t\t</Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t<TickBar x:Name=\"TopTick\" Fill=\"{TemplateBinding Foreground}\" Height=\"6\" Placement=\"Top\" Grid.Row=\"0\" Visibility=\"Collapsed\" />\r\n\t\t\t\t\t\t\t<TickBar x:Name=\"BottomTick\" Fill=\"{TemplateBinding Foreground}\" Height=\"6\" Placement=\"Bottom\" Grid.Row=\"2\" Visibility=\"Collapsed\" />\r\n\t\t\t\t\t\t\t<Border x:Name=\"TrackBackground\" Background=\"{StaticResource SliderTrackBackgroundBrush}\" Height=\"6\" Grid.Row=\"1\" VerticalAlignment=\"center\">\r\n\t\t\t\t\t\t\t\t<Canvas Margin=\"-6,-1\">\r\n\t\t\t\t\t\t\t\t\t<Rectangle x:Name=\"PART_SelectionRange\" Fill=\"{StaticResource SliderSelectionRangeBackgroundBrush}\" Height=\"6\" Width=\"0\" Visibility=\"Hidden\" />\r\n\t\t\t\t\t\t\t\t</Canvas>\r\n\t\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t\t\t<Track x:Name=\"PART_Track\" Grid.Row=\"1\">\r\n\t\t\t\t\t\t\t\t<Track.DecreaseRepeatButton>\r\n\t\t\t\t\t\t\t\t\t<RepeatButton Command=\"{x:Static Slider.DecreaseLarge}\" Style=\"{StaticResource SliderRepeatButtonStyle}\" />\r\n\t\t\t\t\t\t\t\t</Track.DecreaseRepeatButton>\r\n\t\t\t\t\t\t\t\t<Track.IncreaseRepeatButton>\r\n\t\t\t\t\t\t\t\t\t<RepeatButton Command=\"{x:Static Slider.IncreaseLarge}\" Style=\"{StaticResource SliderRepeatButtonStyle}\" />\r\n\t\t\t\t\t\t\t\t</Track.IncreaseRepeatButton>\r\n\t\t\t\t\t\t\t\t<Track.Thumb>\r\n\t\t\t\t\t\t\t\t\t<Thumb x:Name=\"Thumb\" Style=\"{StaticResource HSliderThumbStyle}\" />\r\n\t\t\t\t\t\t\t\t</Track.Thumb>\r\n\t\t\t\t\t\t\t</Track>\r\n\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t</Border>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"TickPlacement\" Value=\"TopLeft\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"TopTick\" Value=\"Visible\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Style\" TargetName=\"Thumb\" Value=\"{StaticResource HSliderThumbStyle}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Margin\" TargetName=\"TrackBackground\" Value=\"5,2,5,0\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"TickPlacement\" Value=\"BottomRight\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"BottomTick\" Value=\"Visible\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Style\" TargetName=\"Thumb\" Value=\"{StaticResource HSliderThumbStyle}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Margin\" TargetName=\"TrackBackground\" Value=\"5,0,5,2\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"TickPlacement\" Value=\"Both\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"TopTick\" Value=\"Visible\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"BottomTick\" Value=\"Visible\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsSelectionRangeEnabled\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"PART_SelectionRange\" Value=\"Visible\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Foreground\" TargetName=\"Thumb\" Value=\"{StaticResource SliderThumbFocusedBorderBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t\t<Style.Triggers>\r\n\t\t\t<Trigger Property=\"Orientation\" Value=\"Vertical\">\r\n\t\t\t\t<Setter Property=\"Template\">\r\n\t\t\t\t\t<Setter.Value>\r\n\t\t\t\t\t\t<ControlTemplate TargetType=\"{x:Type Slider}\">\r\n\t\t\t\t\t\t\t<Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" SnapsToDevicePixels=\"true\">\r\n\t\t\t\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t\t\t\t<Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"Auto\" />\r\n\t\t\t\t\t\t\t\t\t\t<ColumnDefinition MinWidth=\"{TemplateBinding MinWidth}\" Width=\"Auto\" />\r\n\t\t\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"Auto\" />\r\n\t\t\t\t\t\t\t\t\t</Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t\t\t<TickBar x:Name=\"TopTick\" Grid.Column=\"0\" Fill=\"{TemplateBinding Foreground}\" Placement=\"Left\" Visibility=\"Collapsed\" Width=\"6\" />\r\n\t\t\t\t\t\t\t\t\t<TickBar x:Name=\"BottomTick\" Grid.Column=\"2\" Fill=\"{TemplateBinding Foreground}\" Placement=\"Right\" Visibility=\"Collapsed\" Width=\"6\" />\r\n\t\t\t\t\t\t\t\t\t<Border x:Name=\"TrackBackground\" Background=\"{StaticResource SliderTrackBackgroundBrush}\" Grid.Column=\"1\" HorizontalAlignment=\"center\" Width=\"6\">\r\n\t\t\t\t\t\t\t\t\t\t<Canvas Margin=\"-1,-6\">\r\n\t\t\t\t\t\t\t\t\t\t\t<Rectangle x:Name=\"PART_SelectionRange\" Fill=\"{StaticResource SliderSelectionRangeBackgroundBrush}\" Visibility=\"Hidden\" Width=\"6\" />\r\n\t\t\t\t\t\t\t\t\t\t</Canvas>\r\n\t\t\t\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t\t\t\t\t<Track x:Name=\"PART_Track\" Grid.Column=\"1\">\r\n\t\t\t\t\t\t\t\t\t\t<Track.DecreaseRepeatButton>\r\n\t\t\t\t\t\t\t\t\t\t\t<RepeatButton Command=\"{x:Static Slider.DecreaseLarge}\" Style=\"{StaticResource SliderRepeatButtonStyle}\" />\r\n\t\t\t\t\t\t\t\t\t\t</Track.DecreaseRepeatButton>\r\n\t\t\t\t\t\t\t\t\t\t<Track.IncreaseRepeatButton>\r\n\t\t\t\t\t\t\t\t\t\t\t<RepeatButton Command=\"{x:Static Slider.IncreaseLarge}\" Style=\"{StaticResource SliderRepeatButtonStyle}\" />\r\n\t\t\t\t\t\t\t\t\t\t</Track.IncreaseRepeatButton>\r\n\t\t\t\t\t\t\t\t\t\t<Track.Thumb>\r\n\t\t\t\t\t\t\t\t\t\t\t<Thumb x:Name=\"Thumb\" Style=\"{StaticResource VSliderThumbStyle}\" />\r\n\t\t\t\t\t\t\t\t\t\t</Track.Thumb>\r\n\t\t\t\t\t\t\t\t\t</Track>\r\n\t\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t\t\t<Trigger Property=\"TickPlacement\" Value=\"TopLeft\">\r\n\t\t\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"TopTick\" Value=\"Visible\" />\r\n\t\t\t\t\t\t\t\t\t<Setter Property=\"Style\" TargetName=\"Thumb\" Value=\"{StaticResource VSliderThumbStyle}\" />\r\n\t\t\t\t\t\t\t\t\t<Setter Property=\"Margin\" TargetName=\"TrackBackground\" Value=\"2,5,0,5\" />\r\n\t\t\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t\t\t<Trigger Property=\"TickPlacement\" Value=\"BottomRight\">\r\n\t\t\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"BottomTick\" Value=\"Visible\" />\r\n\t\t\t\t\t\t\t\t\t<Setter Property=\"Style\" TargetName=\"Thumb\" Value=\"{StaticResource VSliderThumbStyle}\" />\r\n\t\t\t\t\t\t\t\t\t<Setter Property=\"Margin\" TargetName=\"TrackBackground\" Value=\"0,5,2,5\" />\r\n\t\t\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t\t\t<Trigger Property=\"TickPlacement\" Value=\"Both\">\r\n\t\t\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"TopTick\" Value=\"Visible\" />\r\n\t\t\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"BottomTick\" Value=\"Visible\" />\r\n\t\t\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t\t\t<Trigger Property=\"IsSelectionRangeEnabled\" Value=\"true\">\r\n\t\t\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"PART_SelectionRange\" Value=\"Visible\" />\r\n\t\t\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t\t\t<Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n\t\t\t\t\t\t\t\t\t<Setter Property=\"Foreground\" TargetName=\"Thumb\" Value=\"{StaticResource SliderThumbFocusedBorderBrush}\" />\r\n\t\t\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t\t\t</ControlTemplate>\r\n\t\t\t\t\t</Setter.Value>\r\n\t\t\t\t</Setter>\r\n\t\t\t</Trigger>\r\n\t\t</Style.Triggers>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  RepeatButton Style  ********************************* -->\r\n\t<Style x:Key=\"RepeatButtonStyle\" TargetType=\"{x:Type RepeatButton}\">\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"FontSize\" Value=\"14.667\" />\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"10,0,10,2\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"30\" />\r\n\t\t<Setter Property=\"MinWidth\" Value=\"30\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n\t\t\t\t\t<Grid SnapsToDevicePixels=\"True\">\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Bd\" Storyboard.TargetProperty=\"Fill\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Bd\" Storyboard.TargetProperty=\"Stroke\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonHoverBorderBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentControl\">\r\n                                        <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource LightForegroundBrush}\" />\r\n                                    </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Pressed\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Bd\" Storyboard.TargetProperty=\"Fill\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonPressedBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Bd\" Storyboard.TargetProperty=\"Stroke\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonPressedBorderBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentControl\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource LightForegroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"DisabledVisualElement\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"FocusStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Focused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"FocusedVisualElement\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unfocused\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Rectangle x:Name=\"Bd\" Fill=\"{StaticResource ButtonBackgroundBrush}\" Stroke=\"{StaticResource ButtonBorderBrush}\" StrokeThickness=\"1\" />\r\n\t\t\t\t\t\t<ContentControl x:Name=\"ContentControl\" Foreground=\"{TemplateBinding Foreground}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\">\r\n\t\t\t\t\t\t\t<ContentPresenter x:Name=\"contentPresenter\" />\r\n\t\t\t\t\t\t</ContentControl>\r\n\t\t\t\t\t\t<Rectangle x:Name=\"FocusedVisualElement\" Stroke=\"{StaticResource ButtonPressedBorderBrush}\" Visibility=\"Collapsed\" StrokeThickness=\"2\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"DisabledVisualElement\" Fill=\"{StaticResource DisabledVisualElement}\" Visibility=\"Collapsed\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- ********************************** GridSplitter Style **********************************-->\r\n\t<Style x:Key=\"GridSplitterStyle\" TargetType=\"{x:Type GridSplitter}\">\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource GridSplitterBackgroundBrush}\" />\r\n\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource GridSplitterBorderBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"SnapsToDevicePixels\" Value=\"True\" />\r\n\t\t<Setter Property=\"PreviewStyle\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<Style TargetType=\"Control\">\r\n\t\t\t\t\t<Setter Property=\"Control.Template\">\r\n\t\t\t\t\t\t<Setter.Value>\r\n\t\t\t\t\t\t\t<ControlTemplate>\r\n\t\t\t\t\t\t\t\t<Rectangle Fill=\"{StaticResource GridSplitterPressedBackgroundBrush}\" Opacity=\"0.8\" />\r\n\t\t\t\t\t\t\t</ControlTemplate>\r\n\t\t\t\t\t\t</Setter.Value>\r\n\t\t\t\t\t</Setter>\r\n\t\t\t\t</Style>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate>\r\n\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t<Border x:Name=\"border\" BorderThickness=\"{TemplateBinding BorderThickness}\" BorderBrush=\"{TemplateBinding BorderBrush}\" Background=\"{TemplateBinding Background}\" MinHeight=\"8\" MinWidth=\"8\">\r\n\t\t\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t\t\t<StackPanel x:Name=\"HGrip\" Height=\"8\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Orientation=\"Vertical\">\r\n\t\t\t\t\t\t\t\t\t<Rectangle Fill=\"{StaticResource GlyphBackgroundBrush}\" Height=\"1\" Margin=\"1,2,1,1\" StrokeThickness=\"0\" Width=\"20\" />\r\n\t\t\t\t\t\t\t\t\t<Rectangle Fill=\"{StaticResource GlyphBackgroundBrush}\" Height=\"1\" Margin=\"1,1,1,2\" StrokeThickness=\"0\" Width=\"20\" />\r\n\t\t\t\t\t\t\t\t</StackPanel>\r\n\t\t\t\t\t\t\t\t<StackPanel x:Name=\"VGrip\" Width=\"8\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Orientation=\"Horizontal\" Visibility=\"Collapsed\">\r\n\t\t\t\t\t\t\t\t\t<Rectangle Fill=\"{StaticResource GlyphBackgroundBrush}\" Height=\"20\" Margin=\"2,1,1,1\" StrokeThickness=\"0\" Width=\"1\" />\r\n\t\t\t\t\t\t\t\t\t<Rectangle Fill=\"{StaticResource GlyphBackgroundBrush}\" Height=\"20\" Margin=\"1,1,2,1\" StrokeThickness=\"0\" Width=\"1\" />\r\n\t\t\t\t\t\t\t\t</StackPanel>\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"HorizontalAlignment\" Value=\"Stretch\">\r\n\t\t\t\t\t\t\t<Setter TargetName=\"HGrip\" Property=\"Visibility\" Value=\"Visible\" />\r\n\t\t\t\t\t\t\t<Setter TargetName=\"VGrip\" Property=\"Visibility\" Value=\"Collapsed\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"VerticalAlignment\" Value=\"Stretch\">\r\n\t\t\t\t\t\t\t<Setter TargetName=\"VGrip\" Property=\"Visibility\" Value=\"Visible\" />\r\n\t\t\t\t\t\t\t<Setter TargetName=\"HGrip\" Property=\"Visibility\" Value=\"Collapsed\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n\t\t\t\t\t\t\t<Setter TargetName=\"border\" Property=\"Background\" Value=\"{StaticResource GridSplitterHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t<Setter TargetName=\"border\" Property=\"BorderBrush\" Value=\"{StaticResource GridSplitterHoverBorderBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsFocused\" Value=\"True\">\r\n\t\t\t\t\t\t\t<Setter TargetName=\"border\" Property=\"BorderBrush\" Value=\"{StaticResource GridSplitterFocusedBorderBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- ********************************** ProgressBar Style **********************************-->\r\n\t<Style x:Key=\"ProgressBarStyle\" TargetType=\"{x:Type ProgressBar}\">\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ProgressBarForegroundBrush}\" />\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource ProgressBarBackgroundBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"0\" />\r\n\t\t<Setter Property=\"Height\" Value=\"6\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type ProgressBar}\">\r\n\t\t\t\t\t<Grid x:Name=\"TemplateRoot\" SnapsToDevicePixels=\"true\">\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Determinate\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Indeterminate\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard RepeatBehavior=\"Forever\">\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"00:00:.5\" From=\"0\" To=\"20\" Storyboard.TargetProperty=\"(Shape.Fill).(LinearGradientBrush.Transform).(TransformGroup.Children)[0].X\" Storyboard.TargetName=\"IndeterminateGradientFill\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Border x:Name=\"ProgressBarTrack\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"PART_Track\" Margin=\"{TemplateBinding BorderThickness}\" />\r\n\t\t\t\t\t\t<Decorator x:Name=\"PART_Indicator\" HorizontalAlignment=\"Left\" Margin=\"{TemplateBinding BorderThickness}\">\r\n\t\t\t\t\t\t\t<Grid x:Name=\"Foreground\">\r\n\t\t\t\t\t\t\t\t<Rectangle x:Name=\"Indicator\" Fill=\"{TemplateBinding Foreground}\" />\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t</Decorator>\r\n\t\t\t\t\t\t<Grid x:Name=\"IndeterminateRoot\" Visibility=\"Collapsed\">\r\n\t\t\t\t\t\t\t<Rectangle x:Name=\"IndeterminateSolidFill\" Fill=\"{TemplateBinding Foreground}\" Margin=\"{TemplateBinding BorderThickness}\" Opacity=\"1\" RenderTransformOrigin=\"0.5,0.5\" StrokeThickness=\"0\" />\r\n\t\t\t\t\t\t\t<Rectangle x:Name=\"IndeterminateGradientFill\" Fill=\"{StaticResource ProgressBarIndeterminateBackgroundBrush}\" Margin=\"{TemplateBinding BorderThickness}\" StrokeThickness=\"1\" />\r\n\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"Orientation\" Value=\"Vertical\">\r\n\t\t\t\t\t\t\t<Setter Property=\"LayoutTransform\" TargetName=\"TemplateRoot\">\r\n\t\t\t\t\t\t\t\t<Setter.Value>\r\n\t\t\t\t\t\t\t\t\t<RotateTransform Angle=\"-90\" />\r\n\t\t\t\t\t\t\t\t</Setter.Value>\r\n\t\t\t\t\t\t\t</Setter>\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsIndeterminate\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"Indicator\" Value=\"Collapsed\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"IndeterminateRoot\" Value=\"Visible\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsIndeterminate\" Value=\"false\">\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- ********************************** PasswordBox Style **********************************-->\r\n\t<Style x:Key=\"PasswordBoxStyle\" TargetType=\"{x:Type PasswordBox}\">\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"FontSize\" Value=\"13.333\" />\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource PasswordBoxForegroundBrush}\" />\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource TextBoxBackgroundBrush}\" />\r\n\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource TextBoxBorderBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"6,4\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"30\" />\r\n\t\t<Setter Property=\"SelectionBrush\" Value=\"{StaticResource TextBoxFocusedBrush}\" />\r\n\t\t<Setter Property=\"PasswordChar\" Value=\"●\" />\r\n\t\t<Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\" />\r\n\t\t<Setter Property=\"AllowDrop\" Value=\"true\" />\r\n\t\t<Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\" />\r\n\t\t<Setter Property=\"ScrollViewer.PanningMode\" Value=\"VerticalFirst\" />\r\n\t\t<Setter Property=\"Stylus.IsFlicksEnabled\" Value=\"False\" />\r\n\t\t<Setter Property=\"FlowDirection\" Value=\"LeftToRight\" />\r\n        <Setter Property=\"CaretBrush\" Value=\"{StaticResource CaretForegroundBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type PasswordBox}\">\r\n\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t<Border Background=\"{TemplateBinding Background}\" x:Name=\"Bd\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" />\r\n\t\t\t\t\t\t<Border x:Name=\"DisabledVisualElement\" BorderBrush=\"{StaticResource DisabledVisualElement}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{StaticResource DisabledVisualElement}\" IsHitTestVisible=\"False\" Opacity=\"0\" />\r\n\t\t\t\t\t\t<Border x:Name=\"ReadOnlyVisualElement\" Background=\"{StaticResource TextBoxReadOnlyBackgroundBrush}\" Opacity=\"0\" />\r\n\t\t\t\t\t\t<Border>\r\n\t\t\t\t\t\t\t<ScrollViewer x:Name=\"PART_ContentHost\" />\r\n\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"IsEnabled\" Value=\"False\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Opacity\" Value=\"1\" TargetName=\"DisabledVisualElement\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n\t\t\t\t\t\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource TextBoxHoverBorderBrush}\" TargetName=\"Bd\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsFocused\" Value=\"True\">\r\n\t\t\t\t\t\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource TextBoxFocusedBrush}\" TargetName=\"Bd\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<MultiDataTrigger>\r\n\t\t\t\t\t\t\t<MultiDataTrigger.Conditions>\r\n\t\t\t\t\t\t\t\t<Condition Binding=\"{Binding IsReadOnly, RelativeSource={RelativeSource Self}}\" Value=\"True\" />\r\n\t\t\t\t\t\t\t\t<Condition Binding=\"{Binding IsEnabled, RelativeSource={RelativeSource Self}}\" Value=\"True\" />\r\n\t\t\t\t\t\t\t</MultiDataTrigger.Conditions>\r\n\t\t\t\t\t\t\t<Setter Property=\"Opacity\" Value=\"1\" TargetName=\"ReadOnlyVisualElement\" />\r\n\t\t\t\t\t\t</MultiDataTrigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  ToolTip Style  ********************************* -->\r\n\t<Style x:Key=\"{x:Type ToolTip}\" TargetType=\"ToolTip\">\r\n\t\t<Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"FontSize\" Value=\"14.667\" />\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource TooltipBackgroundBrush}\" />\r\n\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource TooltipBorderBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"10,7\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"ToolTip\">\r\n\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t<Rectangle Stroke=\"{TemplateBinding BorderBrush}\" Fill=\"{TemplateBinding Background}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" />\r\n\t\t\t\t\t\t<StackPanel Orientation=\"Horizontal\" d:LayoutOverrides=\"Width, Height\">\r\n\t\t\t\t\t\t\t<ContentPresenter Margin=\"{TemplateBinding Padding}\" Content=\"{TemplateBinding Content}\" />\r\n\t\t\t\t\t\t</StackPanel>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  Expander Right Style  ********************************* -->\r\n\t<Style x:Key=\"ExpanderRightHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n\t\t\t\t\t<Border Padding=\"{TemplateBinding Padding}\">\r\n\t\t\t\t\t\t<Grid Background=\"{StaticResource TransparentBrush}\" SnapsToDevicePixels=\"False\">\r\n\t\t\t\t\t\t\t<Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t\t<RowDefinition Height=\"30\" />\r\n\t\t\t\t\t\t\t\t<RowDefinition Height=\"*\" />\r\n\t\t\t\t\t\t\t</Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t\t\t<Grid.LayoutTransform>\r\n\t\t\t\t\t\t\t\t\t<TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t<TransformGroup.Children>\r\n\t\t\t\t\t\t\t\t\t\t\t<TransformCollection>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<RotateTransform Angle=\"-90\" />\r\n\t\t\t\t\t\t\t\t\t\t\t</TransformCollection>\r\n\t\t\t\t\t\t\t\t\t\t</TransformGroup.Children>\r\n\t\t\t\t\t\t\t\t\t</TransformGroup>\r\n\t\t\t\t\t\t\t\t</Grid.LayoutTransform>\r\n\t\t\t\t\t\t\t\t<Rectangle x:Name=\"rectangle\" Width=\"30\" Height=\"30\" Fill=\"{StaticResource ExpanderButtonBackgroundBrush}\" HorizontalAlignment=\"Center\" Stroke=\"{StaticResource ExpanderButtonBorderBrush}\" VerticalAlignment=\"Center\" />\r\n\t\t\t\t\t\t\t\t<Path x:Name=\"arrow\" Width=\"10\" Height=\"6\" Fill=\"{StaticResource GlyphBackgroundBrush}\" Data=\"F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z \" Stretch=\"Fill\" RenderTransformOrigin=\"0.5, 0.5\" />\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t\t<ContentPresenter HorizontalAlignment=\"Center\" Margin=\"0,4,0,0\" Grid.Row=\"1\" RecognizesAccessKey=\"True\" SnapsToDevicePixels=\"True\" VerticalAlignment=\"Stretch\" />\r\n\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t</Border>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"IsChecked\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Data\" TargetName=\"arrow\" Value=\"M3.4,-4.4 L6.8,3.9 3.9566912E-07,3.9 z\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Stroke\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonHoverBorderBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"arrow\" Value=\"{StaticResource ExpanderArrowHoverBorderBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsPressed\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonPressedBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Stroke\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonPressedBorderBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"arrow\" Value=\"{StaticResource ExpanderArrowPressedBorderBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  Expander Up Style  ********************************* -->\r\n\t<Style x:Key=\"ExpanderUpHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n\t\t\t\t\t<Border Padding=\"{TemplateBinding Padding}\">\r\n\t\t\t\t\t\t<Grid Background=\"{StaticResource TransparentBrush}\" SnapsToDevicePixels=\"False\">\r\n\t\t\t\t\t\t\t<Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"30\" />\r\n\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"*\" />\r\n\t\t\t\t\t\t\t</Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t\t\t<Grid.LayoutTransform>\r\n\t\t\t\t\t\t\t\t\t<TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t<TransformGroup.Children>\r\n\t\t\t\t\t\t\t\t\t\t\t<TransformCollection>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<RotateTransform Angle=\"180\" />\r\n\t\t\t\t\t\t\t\t\t\t\t</TransformCollection>\r\n\t\t\t\t\t\t\t\t\t\t</TransformGroup.Children>\r\n\t\t\t\t\t\t\t\t\t</TransformGroup>\r\n\t\t\t\t\t\t\t\t</Grid.LayoutTransform>\r\n\t\t\t\t\t\t\t\t<Rectangle x:Name=\"rectangle\" Width=\"30\" Height=\"30\" Fill=\"{StaticResource ExpanderButtonBackgroundBrush}\" HorizontalAlignment=\"Center\" Stroke=\"{StaticResource ExpanderButtonBorderBrush}\" VerticalAlignment=\"Center\" />\r\n\t\t\t\t\t\t\t\t<Path x:Name=\"arrow\" Width=\"10\" Height=\"6\" Fill=\"{StaticResource GlyphBackgroundBrush}\" Data=\"F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z \" Stretch=\"Fill\" RenderTransformOrigin=\"0.5, 0.5\" />\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t\t<ContentPresenter Grid.Column=\"1\" HorizontalAlignment=\"Stretch\" Margin=\"4,0,0,0\" RecognizesAccessKey=\"True\" SnapsToDevicePixels=\"True\" VerticalAlignment=\"Center\" />\r\n\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t</Border>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"IsChecked\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Data\" TargetName=\"arrow\" Value=\"M3.4,-4.4 L6.8,3.9 3.9566912E-07,3.9 z\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Stroke\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonHoverBorderBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"arrow\" Value=\"{StaticResource ExpanderArrowHoverBorderBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsPressed\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonPressedBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Stroke\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonPressedBorderBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"arrow\" Value=\"{StaticResource ExpanderArrowPressedBorderBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  Expander Left Style  ********************************* -->\r\n\t<Style x:Key=\"ExpanderLeftHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n\t\t\t\t\t<Border Padding=\"{TemplateBinding Padding}\">\r\n\t\t\t\t\t\t<Grid Background=\"{StaticResource TransparentBrush}\" SnapsToDevicePixels=\"False\">\r\n\t\t\t\t\t\t\t<Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t\t<RowDefinition Height=\"30\" />\r\n\t\t\t\t\t\t\t\t<RowDefinition Height=\"*\" />\r\n\t\t\t\t\t\t\t</Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t\t\t<Grid.LayoutTransform>\r\n\t\t\t\t\t\t\t\t\t<TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t<TransformGroup.Children>\r\n\t\t\t\t\t\t\t\t\t\t\t<TransformCollection>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<RotateTransform Angle=\"90\" />\r\n\t\t\t\t\t\t\t\t\t\t\t</TransformCollection>\r\n\t\t\t\t\t\t\t\t\t\t</TransformGroup.Children>\r\n\t\t\t\t\t\t\t\t\t</TransformGroup>\r\n\t\t\t\t\t\t\t\t</Grid.LayoutTransform>\r\n\t\t\t\t\t\t\t\t<Rectangle x:Name=\"rectangle\" Width=\"30\" Height=\"30\" Fill=\"{StaticResource ExpanderButtonBackgroundBrush}\" HorizontalAlignment=\"Center\" Stroke=\"{StaticResource ExpanderButtonBorderBrush}\" VerticalAlignment=\"Center\" />\r\n\t\t\t\t\t\t\t\t<Path x:Name=\"arrow\" Width=\"10\" Height=\"6\" Fill=\"{StaticResource GlyphBackgroundBrush}\" Data=\"F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z \" Stretch=\"Fill\" RenderTransformOrigin=\"0.5, 0.5\" />\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t\t<ContentPresenter Grid.Row=\"1\" HorizontalAlignment=\"Center\" Margin=\"0,4,0,0\" RecognizesAccessKey=\"True\" SnapsToDevicePixels=\"True\" VerticalAlignment=\"Stretch\" />\r\n\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t</Border>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"IsChecked\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Data\" TargetName=\"arrow\" Value=\"M3.4,-4.4 L6.8,3.9 3.9566912E-07,3.9 z\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Stroke\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonHoverBorderBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"arrow\" Value=\"{StaticResource ExpanderArrowHoverBorderBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsPressed\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonPressedBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Stroke\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonPressedBorderBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"arrow\" Value=\"{StaticResource ExpanderArrowPressedBorderBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  Expander Down Style  ********************************* -->\r\n\t<Style x:Key=\"ExpanderDownHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n\t\t\t\t\t<Border Padding=\"{TemplateBinding Padding}\">\r\n\t\t\t\t\t\t<Grid Background=\"{StaticResource TransparentBrush}\" SnapsToDevicePixels=\"False\">\r\n\t\t\t\t\t\t\t<Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"30\" />\r\n\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"*\" />\r\n\t\t\t\t\t\t\t</Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t<Rectangle x:Name=\"rectangle\" Width=\"30\" Height=\"30\" Fill=\"{StaticResource ExpanderButtonBackgroundBrush}\" HorizontalAlignment=\"Center\" Stroke=\"{StaticResource ExpanderButtonBorderBrush}\" VerticalAlignment=\"Center\" />\r\n\t\t\t\t\t\t\t<Path x:Name=\"arrow\" Width=\"10\" Height=\"6\" Fill=\"{StaticResource GlyphBackgroundBrush}\" Data=\"F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z \" Stretch=\"Fill\" RenderTransformOrigin=\"0.5, 0.5\" />\r\n\t\t\t\t\t\t\t<ContentPresenter Grid.Column=\"1\" HorizontalAlignment=\"Stretch\" Margin=\"4,0,0,0\" RecognizesAccessKey=\"True\" SnapsToDevicePixels=\"True\" VerticalAlignment=\"Center\" />\r\n\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t</Border>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"IsChecked\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Data\" TargetName=\"arrow\" Value=\"M3.4,-4.4 L6.8,3.9 3.9566912E-07,3.9 z\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Stroke\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonHoverBorderBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"arrow\" Value=\"{StaticResource ExpanderArrowHoverBorderBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsPressed\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonPressedBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Stroke\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonPressedBorderBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"arrow\" Value=\"{StaticResource ExpanderArrowPressedBorderBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  Expander Style  ********************************* -->\r\n\t<Style x:Key=\"ExpanderStyle\" TargetType=\"{x:Type Expander}\">\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"FontSize\" Value=\"14.667\" />\r\n        <Setter Property=\"Background\" Value=\"{StaticResource ExpanderBackgroundBrush}\"/>\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Padding\" Value=\"2\" />\r\n\t\t<Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n\t\t<Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type Expander}\">\r\n\t\t\t\t\t<Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" CornerRadius=\"3\" SnapsToDevicePixels=\"true\">\r\n\t\t\t\t\t\t<DockPanel>\r\n\t\t\t\t\t\t\t<ToggleButton x:Name=\"HeaderSite\" ContentTemplate=\"{TemplateBinding HeaderTemplate}\" ContentTemplateSelector=\"{TemplateBinding HeaderTemplateSelector}\" Content=\"{TemplateBinding Header}\" DockPanel.Dock=\"Top\" Foreground=\"{TemplateBinding Foreground}\" FontWeight=\"{TemplateBinding FontWeight}\" FontStyle=\"{TemplateBinding FontStyle}\" FontStretch=\"{TemplateBinding FontStretch}\" FontSize=\"{TemplateBinding FontSize}\" FontFamily=\"{TemplateBinding FontFamily}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" IsChecked=\"{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" Margin=\"1\" MinWidth=\"0\" MinHeight=\"0\" Padding=\"{TemplateBinding Padding}\" Style=\"{StaticResource ExpanderDownHeaderStyle}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\" />\r\n\t\t\t\t\t\t\t<ContentPresenter x:Name=\"ExpandSite\" DockPanel.Dock=\"Bottom\" Focusable=\"false\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" Visibility=\"Collapsed\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" />\r\n\t\t\t\t\t\t</DockPanel>\r\n\t\t\t\t\t</Border>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"IsExpanded\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"ExpandSite\" Value=\"Visible\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"ExpandDirection\" Value=\"Right\">\r\n\t\t\t\t\t\t\t<Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Right\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Left\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Style\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderRightHeaderStyle}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"ExpandDirection\" Value=\"Up\">\r\n\t\t\t\t\t\t\t<Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Top\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Bottom\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Style\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderUpHeaderStyle}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"ExpandDirection\" Value=\"Left\">\r\n\t\t\t\t\t\t\t<Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Left\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Right\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Style\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderLeftHeaderStyle}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsEnabled\" Value=\"false\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ExpanderDisabledForegroundBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  ToggleButton Style  ********************************* -->\r\n\t<Style x:Key=\"ToggleButtonStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"FontSize\" Value=\"14.667\" />\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"10,0,10,2\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"30\" />\r\n\t\t<Setter Property=\"MinWidth\" Value=\"30\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Bd\" Storyboard.TargetProperty=\"Fill\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Bd\" Storyboard.TargetProperty=\"Stroke\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonHoverBorderBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"contentControl\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource LightForegroundBrush}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Pressed\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Bd\" Storyboard.TargetProperty=\"Fill\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonPressedBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Bd\" Storyboard.TargetProperty=\"Stroke\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonPressedBorderBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"contentControl\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource LightForegroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"DisabledVisualElement\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CheckStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"checked\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"contentControl\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"contentControl1\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"contentControl1\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource LightForegroundBrush}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unchecked\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Indeterminate\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"FocusStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Focused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"FocusedVisualElement\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unfocused\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Rectangle x:Name=\"Bd\" Fill=\"{StaticResource ButtonBackgroundBrush}\" Stroke=\"{StaticResource ButtonBorderBrush}\" StrokeThickness=\"1\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"checked\" Fill=\"{StaticResource ButtonPressedBackgroundBrush}\" Stroke=\"{StaticResource ButtonPressedBorderBrush}\" StrokeThickness=\"1\" Visibility=\"Collapsed\" />\r\n                        <ContentControl x:Name=\"contentControl\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" Foreground=\"{TemplateBinding Foreground}\">\r\n                            <ContentPresenter x:Name=\"contentPresenter\" />\r\n                        </ContentControl>\r\n                        <ContentControl x:Name=\"contentControl1\" Visibility=\"Collapsed\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" Foreground=\"{StaticResource ForegroundBrush}\">\r\n                            <ContentPresenter x:Name=\"contentPresenter1\" />\r\n                        </ContentControl>\r\n                        <Rectangle x:Name=\"FocusedVisualElement\" Stroke=\"{StaticResource ButtonPressedBorderBrush}\" Visibility=\"Collapsed\" StrokeThickness=\"2\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"DisabledVisualElement\" Fill=\"{StaticResource DisabledVisualElement}\" Visibility=\"Collapsed\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  GroupBox Style  ********************************* -->\r\n\t<BorderGapMaskConverter x:Key=\"BorderGapMaskConverter\" />\r\n\t<Style x:Key=\"GroupBoxStyle\" TargetType=\"{x:Type GroupBox}\">\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"FontSize\" Value=\"14.667\" />\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource GroupBoxBorderBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"5 7\" />\r\n\t\t<Setter Property=\"SnapsToDevicePixels\" Value=\"True\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type GroupBox}\">\r\n\t\t\t\t\t<Grid SnapsToDevicePixels=\"true\">\r\n\t\t\t\t\t\t<Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t<ColumnDefinition Width=\"6\" />\r\n\t\t\t\t\t\t\t<ColumnDefinition Width=\"Auto\" />\r\n\t\t\t\t\t\t\t<ColumnDefinition Width=\"*\" />\r\n\t\t\t\t\t\t\t<ColumnDefinition Width=\"6\" />\r\n\t\t\t\t\t\t</Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t<Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t<RowDefinition Height=\"Auto\" />\r\n\t\t\t\t\t\t\t<RowDefinition Height=\"Auto\" />\r\n\t\t\t\t\t\t\t<RowDefinition Height=\"*\" />\r\n\t\t\t\t\t\t\t<RowDefinition Height=\"6\" />\r\n\t\t\t\t\t\t</Grid.RowDefinitions>\r\n\t\t\t\t\t\t<Border BorderBrush=\"{StaticResource TransparentBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Grid.ColumnSpan=\"4\" Grid.Column=\"0\" Grid.Row=\"1\" Grid.RowSpan=\"3\" />\r\n\t\t\t\t\t\t<Border x:Name=\"Header\" Grid.Column=\"1\" Padding=\"10,5,10,0\" Grid.Row=\"0\" Grid.RowSpan=\"2\">\r\n\t\t\t\t\t\t\t<ContentPresenter ContentSource=\"Header\" Height=\"30\" RecognizesAccessKey=\"True\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" />\r\n\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t\t<ContentPresenter Grid.ColumnSpan=\"2\" Grid.Column=\"1\" Margin=\"{TemplateBinding Padding}\" Grid.Row=\"2\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" />\r\n\t\t\t\t\t\t<Border Grid.ColumnSpan=\"4\" Grid.Row=\"1\" Grid.RowSpan=\"3\">\r\n\t\t\t\t\t\t\t<Border.OpacityMask>\r\n\t\t\t\t\t\t\t\t<MultiBinding ConverterParameter=\"7\" Converter=\"{StaticResource BorderGapMaskConverter}\">\r\n\t\t\t\t\t\t\t\t\t<Binding ElementName=\"Header\" Path=\"ActualWidth\" />\r\n\t\t\t\t\t\t\t\t\t<Binding Path=\"ActualWidth\" RelativeSource=\"{RelativeSource Self}\" />\r\n\t\t\t\t\t\t\t\t\t<Binding Path=\"ActualHeight\" RelativeSource=\"{RelativeSource Self}\" />\r\n\t\t\t\t\t\t\t\t</MultiBinding>\r\n\t\t\t\t\t\t\t</Border.OpacityMask>\r\n\t\t\t\t\t\t\t<Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\">\r\n\t\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n    <!--********************** Implicit Styles *********************** -->\r\n    <Style BasedOn=\"{StaticResource ButtonStyle}\" TargetType=\"{x:Type Button}\" />\r\n    <Style BasedOn=\"{StaticResource ScrollBarStyle}\" TargetType=\"{x:Type ScrollBar}\" />\r\n    <Style BasedOn=\"{StaticResource ScrollViewerStyle}\" TargetType=\"{x:Type ScrollViewer}\" />\r\n    <Style BasedOn=\"{StaticResource ComboBoxStyle}\" TargetType=\"{x:Type ComboBox}\" />\r\n    <Style BasedOn=\"{StaticResource ComboBoxItemStyle}\" TargetType=\"{x:Type ComboBoxItem}\" />\r\n    <Style BasedOn=\"{StaticResource TextBoxStyle}\" TargetType=\"{x:Type TextBox}\" />\r\n    <Style BasedOn=\"{StaticResource ListBoxStyle}\" TargetType=\"{x:Type ListBox}\" />\r\n    <Style BasedOn=\"{StaticResource ListBoxItemStyle}\" TargetType=\"{x:Type ListBoxItem}\" />\r\n    <Style BasedOn=\"{StaticResource CheckBoxStyle}\" TargetType=\"{x:Type CheckBox}\" />\r\n    <Style BasedOn=\"{StaticResource RadioButtonStyle}\" TargetType=\"{x:Type RadioButton}\" />\r\n    <Style BasedOn=\"{StaticResource LabelStyle}\" TargetType=\"{x:Type Label}\" />\r\n    <Style BasedOn=\"{StaticResource SliderStyle}\" TargetType=\"{x:Type Slider}\" />\r\n    <Style BasedOn=\"{StaticResource RepeatButtonStyle}\" TargetType=\"{x:Type RepeatButton}\" />\r\n    <Style BasedOn=\"{StaticResource GridSplitterStyle}\" TargetType=\"{x:Type GridSplitter}\" />\r\n    <Style BasedOn=\"{StaticResource ProgressBarStyle}\" TargetType=\"{x:Type ProgressBar}\" />\r\n    <Style BasedOn=\"{StaticResource PasswordBoxStyle}\" TargetType=\"{x:Type PasswordBox}\" />\r\n    <Style BasedOn=\"{StaticResource ExpanderStyle}\" TargetType=\"{x:Type Expander}\" />\r\n    <Style BasedOn=\"{StaticResource ToggleButtonStyle}\" TargetType=\"{x:Type ToggleButton}\" />\r\n    <Style BasedOn=\"{StaticResource GroupBoxStyle}\" TargetType=\"{x:Type GroupBox}\" />\r\n\t\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/MetroLight/Metro.MSControls.Toolkit.Implicit.xaml",
    "content": "﻿<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" \r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" \r\n                    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\" \r\n                    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" \r\n                    xmlns:sys=\"clr-namespace:System;assembly=mscorlib\" \r\n                    xmlns:inputToolkit=\"clr-namespace:System.Windows.Controls;assembly=DotNetProjects.Input.Toolkit\" \r\n                    xmlns:inputToolkitPrimitives=\"clr-namespace:System.Windows.Controls.Primitives;assembly=DotNetProjects.Input.Toolkit\" \r\n                    xmlns:layoutToolkitPrimitives=\"clr-namespace:System.Windows.Controls.Primitives;assembly=DotNetProjects.Layout.Toolkit\" \r\n                    xmlns:layoutToolkit=\"clr-namespace:System.Windows.Controls;assembly=DotNetProjects.Layout.Toolkit\" \r\n                    mc:Ignorable=\"d\">\r\n\r\n\t<!-- *********************************  RESOURCES  ********************************* -->\r\n\t<ResourceDictionary.MergedDictionaries>\r\n\t\t<ResourceDictionary Source=\"Styles.WPF.xaml\" />\r\n\t</ResourceDictionary.MergedDictionaries>\r\n\r\n\t<!-- *********************************  BRUSHES  ********************************* -->\r\n\t<!-- Rating Brushes -->\r\n\t<SolidColorBrush x:Key=\"RatingReadOnlyBackgroundBrush\" Color=\"{StaticResource Color_013}\" />\r\n\t<SolidColorBrush x:Key=\"RatingReadOnlyBorderBrush\" Color=\"{StaticResource Color_013}\" />\r\n\t<SolidColorBrush x:Key=\"RatingDisabledBackgroundBrush\" Color=\"{StaticResource Color_004}\" />\r\n\t<SolidColorBrush x:Key=\"RatingDisabledBorderBrush\" Color=\"{StaticResource Color_013}\" />\r\n\r\n\t<!-- RatingItem Brushes -->\r\n\t<SolidColorBrush x:Key=\"RatingItemBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"RatingItemBorderBrush\" Color=\"{StaticResource Color_004}\" />\r\n\t<SolidColorBrush x:Key=\"RatingItemHoverBackgroundBrush\" Color=\"{StaticResource Color_023}\" />\r\n\t<SolidColorBrush x:Key=\"RatingItemHoverBorderBrush\" Color=\"{StaticResource Color_023}\" />\r\n\t<SolidColorBrush x:Key=\"RatingItemActiveBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"RatingItemActiveBorderBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"RatingItemReadOnlyBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"RatingItemReadOnlyBorderBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"RatingItemDisabledBackgroundBrush\" Color=\"{StaticResource Color_008}\" />\r\n\t<SolidColorBrush x:Key=\"RatingItemDisabledBorderBrush\" Color=\"{StaticResource Color_005}\" />\r\n\r\n\t<!-- Accordion Brushes -->\r\n\t<SolidColorBrush x:Key=\"AccordionBorderBrush\" Color=\"{StaticResource Color_004}\" />\r\n\t<SolidColorBrush x:Key=\"AccordionButtonBackgroundBrush\" Color=\"{StaticResource Color_008}\" />\r\n\t<SolidColorBrush x:Key=\"AccordionButtonBorderBrush\" Color=\"{StaticResource Color_004}\" />\r\n\t<SolidColorBrush x:Key=\"AccordionButtonHoverBackgroundBrush\" Color=\"{StaticResource Color_006}\" />\r\n\t<SolidColorBrush x:Key=\"AccordionButtonHoverBorderBrush\" Color=\"{StaticResource Color_003}\" />\r\n\t<SolidColorBrush x:Key=\"AccordionButtonPressedBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"AccordionButtonPressedBorderBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"AccordionButtonExpandedBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"AccordionButtonExpandedBorderBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"AccordionArrowBackgroundBrush\" Color=\"{StaticResource Color_003}\" />\r\n\t<SolidColorBrush x:Key=\"AccordionArrowExpandedBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\r\n\t<!--********************************** RatingItem Style **********************************-->\r\n\t<Style x:Key=\"RatingItemStyle\" TargetType=\"{x:Type inputToolkit:RatingItem}\">\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type inputToolkit:RatingItem}\">\r\n\t\t\t\t\t<Grid Background=\"{TemplateBinding Background}\" Width=\"30\" Margin=\"2 0\">\r\n\t\t\t\t\t\t<Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t<RowDefinition Height=\"30\" />\r\n\t\t\t\t\t\t\t<RowDefinition Height=\"Auto\" />\r\n\t\t\t\t\t\t</Grid.RowDefinitions>\r\n\t\t\t\t\t\t<Border BorderThickness=\"0\" Background=\"{StaticResource TransparentBrush}\" />\r\n\t\t\t\t\t\t<Rectangle Fill=\"{StaticResource TransparentBrush}\" Margin=\"-2 0\" />\r\n\t\t\t\t\t\t<Path x:Name=\"DefaultRatingItem\" Data=\"M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z\" Opacity=\"1\" Stretch=\"Fill\" Fill=\"{StaticResource RatingItemBackgroundBrush}\" Stroke=\"{StaticResource RatingItemBorderBrush}\" StrokeThickness=\"0.4\" StrokeLineJoin=\"Round\" UseLayoutRounding=\"False\" VerticalAlignment=\"Stretch\" />\r\n\r\n\t\t\t\t\t\t<inputToolkitPrimitives:LinearClipper ExpandDirection=\"Right\" RatioVisible=\"{TemplateBinding DisplayValue}\">\r\n\t\t\t\t\t\t\t<Path Data=\"M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z\" Fill=\"{TemplateBinding Foreground}\" Opacity=\"1\" Stretch=\"Fill\" Stroke=\"{x:Null}\" StrokeLineJoin=\"Round\" UseLayoutRounding=\"False\" VerticalAlignment=\"Stretch\" />\r\n\t\t\t\t\t\t</inputToolkitPrimitives:LinearClipper>\r\n\r\n\t\t\t\t\t\t<Path x:Name=\"MouseOverRatingItem\" Data=\"M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z\" Fill=\"{StaticResource RatingItemHoverBackgroundBrush}\" Opacity=\"0\" Stretch=\"Fill\" Stroke=\"{StaticResource RatingItemHoverBorderBrush}\" StrokeThickness=\"0.4\" StrokeLineJoin=\"Round\" UseLayoutRounding=\"False\" VerticalAlignment=\"Stretch\" />\r\n\r\n\t\t\t\t\t\t<Path x:Name=\"PressedRatingItem\" Data=\"M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z\" Fill=\"{StaticResource RatingItemActiveBackgroundBrush}\" Opacity=\"0\" Stretch=\"Fill\" Stroke=\"{StaticResource RatingItemActiveBorderBrush}\" StrokeLineJoin=\"Round\" UseLayoutRounding=\"False\" VerticalAlignment=\"Stretch\" />\r\n\r\n\t\t\t\t\t\t<Path x:Name=\"ReadOnlyRatingItem\" Data=\"M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z\" Fill=\"{StaticResource RatingItemReadOnlyBackgroundBrush}\" IsHitTestVisible=\"False\" Opacity=\"0\" Stretch=\"Fill\" Stroke=\"{StaticResource RatingItemReadOnlyBorderBrush}\" StrokeThickness=\"0.4\" StrokeLineJoin=\"Round\" UseLayoutRounding=\"False\" VerticalAlignment=\"Stretch\" />\r\n\r\n\t\t\t\t\t\t<Path x:Name=\"DisabledRatingItemBackground\" Data=\"M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z\" Fill=\"{StaticResource RatingItemDisabledBackgroundBrush}\" Opacity=\"0\" Stretch=\"Fill\" Stroke=\"{StaticResource RatingItemDisabledBorderBrush}\" StrokeLineJoin=\"Round\" UseLayoutRounding=\"False\" VerticalAlignment=\"Stretch\" />\r\n\r\n\t\t\t\t\t\t<inputToolkitPrimitives:LinearClipper x:Name=\"DisabledRatingItem\" ExpandDirection=\"Right\" Opacity=\"0\" RatioVisible=\"{TemplateBinding DisplayValue}\">\r\n\t\t\t\t\t\t\t<Path Data=\"M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z\" Fill=\"{StaticResource RatingItemDisabledBackgroundBrush}\" Opacity=\"1\" Stretch=\"Fill\" Stroke=\"{StaticResource RatingItemDisabledBorderBrush}\" StrokeLineJoin=\"Round\" UseLayoutRounding=\"False\" VerticalAlignment=\"Stretch\" />\r\n\t\t\t\t\t\t</inputToolkitPrimitives:LinearClipper>\r\n\t\t\t\t\t\t<ContentPresenter x:Name=\"Content\" Cursor=\"{TemplateBinding Cursor}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" HorizontalAlignment=\"Left\" Margin=\"{TemplateBinding Padding}\" Grid.Row=\"1\" Grid.RowSpan=\"2\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Opacity\" Value=\"1\" TargetName=\"MouseOverRatingItem\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsPressed\" Value=\"True\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Opacity\" Value=\"1\" TargetName=\"PressedRatingItem\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsEnabled\" Value=\"False\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Opacity\" Value=\"1\" TargetName=\"DisabledRatingItem\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Opacity\" Value=\"1\" TargetName=\"DisabledRatingItemBackground\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsReadOnly\" Value=\"True\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Opacity\" Value=\"0.7\" TargetName=\"ReadOnlyRatingItem\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- ********************************** Rating Style **********************************-->\r\n\t<Style x:Key=\"RatingStyle\" TargetType=\"{x:Type inputToolkit:Rating}\">\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource RatingItemActiveBackgroundBrush}\" />\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource TransparentBrush}\" />\r\n\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource TransparentBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"0\" />\r\n\t\t<Setter Property=\"ItemContainerStyle\" Value=\"{StaticResource RatingItemStyle}\" />\r\n\t\t<Setter Property=\"ItemsPanel\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ItemsPanelTemplate>\r\n\t\t\t\t\t<StackPanel IsItemsHost=\"True\" Orientation=\"Horizontal\" />\r\n\t\t\t\t</ItemsPanelTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type inputToolkit:Rating}\">\r\n\t\t\t\t\t<Grid x:Name=\"Root\">\r\n\t\t\t\t\t\t<Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\">\r\n\t\t\t\t\t\t\t<ItemsPresenter />\r\n\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t\t<Border x:Name=\"ReadOnlyVisualElement\" BorderBrush=\"{StaticResource RatingReadOnlyBorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{StaticResource RatingReadOnlyBackgroundBrush}\" IsHitTestVisible=\"False\" Opacity=\"0\" />\r\n\t\t\t\t\t\t<Border x:Name=\"DisabledVisualElement\" BorderBrush=\"{StaticResource RatingDisabledBorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{StaticResource RatingDisabledBackgroundBrush}\" IsHitTestVisible=\"False\" Opacity=\"0\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" RadiusY=\"1\" RadiusX=\"1\" StrokeThickness=\"1\" Visibility=\"Collapsed\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"IsReadOnly\" Value=\"True\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Opacity\" Value=\"0.03\" TargetName=\"ReadOnlyVisualElement\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  AccordionButton Style  ********************************* -->\r\n\t<Style x:Key=\"AccordionButtonStyle\" TargetType=\"layoutToolkitPrimitives:AccordionButton\">\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"FontSize\" Value=\"14.667\" />\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource AccordionButtonBackgroundBrush}\" />\r\n\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource AccordionButtonBorderBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"5,7\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"30\" />\r\n\t\t<Setter Property=\"HorizontalAlignment\" Value=\"Stretch\" />\r\n\t\t<Setter Property=\"VerticalAlignment\" Value=\"Stretch\" />\r\n\t\t<Setter Property=\"HorizontalContentAlignment\" Value=\"Center\" />\r\n\t\t<Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n\t\t<Setter Property=\"IsTabStop\" Value=\"True\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"layoutToolkitPrimitives:AccordionButton\">\r\n\t\t\t\t\t<Grid Background=\"{StaticResource TransparentBrush}\" Margin=\"{TemplateBinding Padding}\">\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"ExpandDirectionStates\">\r\n\t\t\t\t\t\t\t\t<VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0\" />\r\n\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"ExpandDown\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"icon\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>0</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"icon\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>0</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>0</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>Auto</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"cd1\" Storyboard.TargetProperty=\"Width\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>*</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation BeginTime=\"00:00:00\" Duration=\"00:00:00\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)\" To=\"-90\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"ExpandUp\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"icon\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"icon\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>0</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>*</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"cd1\" Storyboard.TargetProperty=\"Width\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>Auto</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation BeginTime=\"00:00:00\" Duration=\"00:00:00\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)\" To=\"90\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"ExpandLeft\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"icon\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"icon\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>0</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>Auto</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"rd1\" Storyboard.TargetProperty=\"Height\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>*</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"LayoutTransform\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<RotateTransform Angle=\"90\" />\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation BeginTime=\"00:00:00\" Duration=\"00:00:00\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)\" To=\"0\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"ExpandRight\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"icon\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>0</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"icon\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>0</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>0</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>*</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"rd1\" Storyboard.TargetProperty=\"Height\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>Auto</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"LayoutTransform\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<RotateTransform Angle=\"-90\" />\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation BeginTime=\"00:00:00\" Duration=\"00:00:00\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)\" To=\"180\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"ExpansionStates\">\r\n\t\t\t\t\t\t\t\t<VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0\" />\r\n\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Collapsed\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation BeginTime=\"00:00:00\" Duration=\"00:00:00.3\" To=\"0\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)\" Storyboard.TargetName=\"icon\" />\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Foreground)\" Storyboard.TargetName=\"contentControl\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Expanded\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation BeginTime=\"00:00:00\" Duration=\"00:00:00.3\" To=\"90\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)\" Storyboard.TargetName=\"icon\" />\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Path.Fill)\" Storyboard.TargetName=\"arrow\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource AccordionArrowExpandedBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Foreground)\" Storyboard.TargetName=\"contentControl\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource LightForegroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"ExpandedBackground\">\r\n\t\t\t\t\t\t\t\t\t\t\t<SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CheckStates\">\r\n\t\t\t\t\t\t\t\t<VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"00:00:00\" />\r\n\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Checked\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unchecked\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0\" />\r\n\t\t\t\t\t\t\t\t\t<VisualTransition From=\"MouseOver\" GeneratedDuration=\"00:00:00.1\" To=\"Normal\" />\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\" />\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\" />\r\n\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"MouseOverBackground\">\r\n\t\t\t\t\t\t\t\t\t\t\t<SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Pressed\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"PressedBackground\">\r\n\t\t\t\t\t\t\t\t\t\t\t<SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Path.Fill)\" Storyboard.TargetName=\"arrow\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource AccordionArrowExpandedBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(Foreground)\" Storyboard.TargetName=\"contentControl\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource LightForegroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard />\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"FocusStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Focused\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unfocused\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Border>\r\n\t\t\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t\t\t<Border x:Name=\"Background\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Height=\"Auto\" Margin=\"0\" VerticalAlignment=\"Stretch\" />\r\n\t\t\t\t\t\t\t\t<Border x:Name=\"ExpandedBackground\" BorderBrush=\"{StaticResource AccordionButtonExpandedBorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{StaticResource AccordionButtonExpandedBackgroundBrush}\" Height=\"Auto\" Margin=\"0\" Opacity=\"0\" VerticalAlignment=\"Stretch\" />\r\n\t\t\t\t\t\t\t\t<Border x:Name=\"MouseOverBackground\" BorderBrush=\"{StaticResource AccordionButtonHoverBorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{StaticResource AccordionButtonHoverBackgroundBrush}\" Height=\"Auto\" Margin=\"0\" Opacity=\"0\" VerticalAlignment=\"Stretch\" />\r\n\t\t\t\t\t\t\t\t<Border x:Name=\"PressedBackground\" BorderBrush=\"{StaticResource AccordionButtonPressedBorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{StaticResource AccordionButtonPressedBackgroundBrush}\" Height=\"Auto\" Margin=\"0\" Opacity=\"0\" VerticalAlignment=\"Stretch\" />\r\n\t\t\t\t\t\t\t\t<Grid Background=\"{StaticResource TransparentBrush}\">\r\n\t\t\t\t\t\t\t\t\t<Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t\t\t\t<ColumnDefinition x:Name=\"cd0\" Width=\"Auto\" />\r\n\t\t\t\t\t\t\t\t\t\t<ColumnDefinition x:Name=\"cd1\" Width=\"Auto\" />\r\n\t\t\t\t\t\t\t\t\t</Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t\t\t<Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t\t\t\t<RowDefinition x:Name=\"rd0\" Height=\"Auto\" />\r\n\t\t\t\t\t\t\t\t\t\t<RowDefinition x:Name=\"rd1\" Height=\"Auto\" />\r\n\t\t\t\t\t\t\t\t\t</Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t\t\t<Grid x:Name=\"icon\" Grid.Column=\"0\" HorizontalAlignment=\"Center\" Height=\"19\" Grid.Row=\"0\" RenderTransformOrigin=\"0.5,0.5\" VerticalAlignment=\"Center\" Width=\"19\">\r\n\t\t\t\t\t\t\t\t\t\t<Grid.RenderTransform>\r\n\t\t\t\t\t\t\t\t\t\t\t<TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<ScaleTransform />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<SkewTransform />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<RotateTransform Angle=\"-90\" />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<TranslateTransform />\r\n\t\t\t\t\t\t\t\t\t\t\t</TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t</Grid.RenderTransform>\r\n\t\t\t\t\t\t\t\t\t\t<Path x:Name=\"arrow\" Data=\"F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z\" Stretch=\"Uniform\" Height=\"4\" HorizontalAlignment=\"Center\" Margin=\"0,0,0,0\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"{StaticResource AccordionArrowBackgroundBrush}\" VerticalAlignment=\"Center\" Width=\"Auto\">\r\n\t\t\t\t\t\t\t\t\t\t\t<Path.RenderTransform>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ScaleTransform />\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SkewTransform />\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<RotateTransform />\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TranslateTransform />\r\n\t\t\t\t\t\t\t\t\t\t\t\t</TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t\t</Path.RenderTransform>\r\n\t\t\t\t\t\t\t\t\t\t</Path>\r\n\t\t\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t\t\t\t<ContentControl x:Name=\"contentControl\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"6,6,6,0\" Grid.Column=\"1\" Grid.Row=\"0\" Grid.RowSpan=\"1\">\r\n\t\t\t\t\t\t\t\t\t\t<ContentPresenter x:Name=\"header\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" />\r\n\t\t\t\t\t\t\t\t\t</ContentControl>\r\n\t\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  ExpandableContentControl Style  ********************************* -->\r\n\t<Style x:Key=\"ExpandableContentControlStyle\" TargetType=\"layoutToolkitPrimitives:ExpandableContentControl\">\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"FontSize\" Value=\"13.333\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"0\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"15,7\" />\r\n\t\t<Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n\t\t<Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n\t\t<Setter Property=\"IsEnabled\" Value=\"true\" />\r\n\t\t<Setter Property=\"Cursor\" Value=\"Arrow\" />\r\n\t\t<Setter Property=\"IsTabStop\" Value=\"False\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"layoutToolkitPrimitives:ExpandableContentControl\">\r\n\t\t\t\t\t<ContentPresenter x:Name=\"ContentSite\" Cursor=\"{TemplateBinding Cursor}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" />\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  AccordionItem Style  ********************************* -->\r\n\t<Style x:Key=\"AccordionItemStyle\" TargetType=\"layoutToolkit:AccordionItem\">\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"FontSize\" Value=\"14.667\" />\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"0\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"30\" />\r\n\t\t<Setter Property=\"Margin\" Value=\"0\" />\r\n\t\t<Setter Property=\"HorizontalAlignment\" Value=\"Stretch\" />\r\n\t\t<Setter Property=\"VerticalAlignment\" Value=\"Stretch\" />\r\n\t\t<Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n\t\t<Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n\t\t<Setter Property=\"IsTabStop\" Value=\"False\" />\r\n\t\t<Setter Property=\"AccordionButtonStyle\" Value=\"{StaticResource AccordionButtonStyle}\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"layoutToolkit:AccordionItem\">\r\n\t\t\t\t\t<Grid Background=\"{TemplateBinding Background}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\">\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0\" />\r\n\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Pressed\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"FocusStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Focused\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unfocused\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"ExpansionStates\">\r\n\t\t\t\t\t\t\t\t<VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0\" />\r\n\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Collapsed\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard x:Name=\"AccordionItemCollapsedStoryboard\">\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(layoutToolkitPrimitives:ExpandableContentControl.Percentage)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<SplineDoubleKeyFrame KeyTime=\"00:00:00.3\" KeySpline=\"0.2,0,0,1\" Value=\"0\" />\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00.3\" Duration=\"00:00:00\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Collapsed</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Expanded\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard x:Name=\"AccordionItemExpandedStoryboard\">\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(layoutToolkitPrimitives:ExpandableContentControl.Percentage)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<SplineDoubleKeyFrame KeyTime=\"00:00:00.3\" KeySpline=\"0.2,0,0,1\" Value=\"1\" />\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"LockedStates\">\r\n\t\t\t\t\t\t\t\t<VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0\" />\r\n\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Locked\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"IsEnabled\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Boolean>False</sys:Boolean>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unlocked\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"IsEnabled\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Boolean>True</sys:Boolean>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"ExpandDirectionStates\">\r\n\t\t\t\t\t\t\t\t<VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0\" />\r\n\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"ExpandDown\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd1\" Storyboard.TargetProperty=\"Height\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>*</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>*</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"ExpandUp\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>0</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>*</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>*</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"ExpandLeft\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.ColumnSpan)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.ColumnSpan)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.RowSpan)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>2</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.RowSpan)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>2</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>0</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>*</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>*</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"ExpandRight\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.ColumnSpan)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.ColumnSpan)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.RowSpan)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>2</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.RowSpan)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>2</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>0</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>*</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd1\" Storyboard.TargetProperty=\"Width\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>*</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Border x:Name=\"Background\" Padding=\"{TemplateBinding Padding}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\">\r\n\t\t\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t\t\t<Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t\t\t<RowDefinition Height=\"Auto\" x:Name=\"rd0\" />\r\n\t\t\t\t\t\t\t\t\t<RowDefinition Height=\"Auto\" x:Name=\"rd1\" />\r\n\t\t\t\t\t\t\t\t</Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t\t<Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"Auto\" x:Name=\"cd0\" />\r\n\t\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"Auto\" x:Name=\"cd1\" />\r\n\t\t\t\t\t\t\t\t</Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t\t<layoutToolkitPrimitives:AccordionButton Name=\"ExpanderButton\" Content=\"{TemplateBinding Header}\" ContentTemplate=\"{TemplateBinding HeaderTemplate}\" IsChecked=\"{TemplateBinding IsSelected}\" IsTabStop=\"True\" Grid.Row=\"0\" Padding=\"0,0,0,0\" Margin=\"0,0,0,0\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\" />\r\n\t\t\t\t\t\t\t\t<layoutToolkitPrimitives:ExpandableContentControl Name=\"ExpandSite\" Grid.Row=\"1\" IsTabStop=\"False\" Percentage=\"0\" RevealMode=\"{TemplateBinding ExpandDirection}\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Margin=\"0,0,0,0\" FontFamily=\"{TemplateBinding FontFamily}\" FontSize=\"{TemplateBinding FontSize}\" FontStretch=\"{TemplateBinding FontStretch}\" FontStyle=\"{TemplateBinding FontStyle}\" FontWeight=\"{TemplateBinding FontWeight}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\" Style=\"{StaticResource ExpandableContentControlStyle}\" />\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  Accordion Style  ********************************* -->\r\n\t<Style x:Key=\"AccordionStyle\" TargetType=\"layoutToolkit:Accordion\">\r\n\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource AccordionBorderBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"0\" />\r\n\t\t<Setter Property=\"Margin\" Value=\"0\" />\r\n\t\t<Setter Property=\"HorizontalAlignment\" Value=\"Left\" />\r\n\t\t<Setter Property=\"VerticalAlignment\" Value=\"Top\" />\r\n\t\t<Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n\t\t<Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n\t\t<Setter Property=\"Cursor\" Value=\"Arrow\" />\r\n\t\t<Setter Property=\"IsTabStop\" Value=\"False\" />\r\n\t\t<Setter Property=\"ItemsPanel\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ItemsPanelTemplate>\r\n\t\t\t\t\t<StackPanel VerticalAlignment=\"Top\" />\r\n\t\t\t\t</ItemsPanelTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"layoutToolkit:Accordion\">\r\n\t\t\t\t\t<Grid x:Name=\"Root\">\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Pressed\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"FocusStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Focused\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unfocused\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Border x:Name=\"Border\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Padding=\"{TemplateBinding Padding}\">\r\n\t\t\t\t\t\t\t<ScrollViewer BorderBrush=\"{StaticResource TransparentBrush}\" BorderThickness=\"0\" Background=\"{x:Null}\" HorizontalScrollBarVisibility=\"Disabled\" IsTabStop=\"False\" Margin=\"0\" Padding=\"0\" VerticalScrollBarVisibility=\"Disabled\">\r\n\t\t\t\t\t\t\t\t<ItemsPresenter />\r\n\t\t\t\t\t\t\t</ScrollViewer>\r\n\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  AutoCompleteBox Style  ********************************* -->\r\n\t<Style x:Key=\"AutoCompleteBoxStyle\" TargetType=\"{x:Type inputToolkit:AutoCompleteBox}\">\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"FontSize\" Value=\"14.667\" />\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource LightForegroundBrush}\" />\r\n\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource TextBoxBorderBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"6,4\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"30\" />\r\n\t\t<Setter Property=\"MinWidth\" Value=\"90\" />\r\n\t\t<Setter Property=\"IsTabStop\" Value=\"False\" />\r\n\t\t<Setter Property=\"TextBoxStyle\" Value=\"{StaticResource TextBoxStyle}\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type inputToolkit:AutoCompleteBox}\">\r\n\t\t\t\t\t<Grid Opacity=\"{TemplateBinding Opacity}\">\r\n\t\t\t\t\t\t<TextBox x:Name=\"Text\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Foreground=\"{TemplateBinding Foreground}\" IsTabStop=\"True\" Margin=\"0\" Padding=\"{TemplateBinding Padding}\" Style=\"{TemplateBinding TextBoxStyle}\" />\r\n\t\t\t\t\t\t<Border x:Name=\"ValidationErrorElement\" BorderBrush=\"{StaticResource ValidationErrorElement}\" BorderThickness=\"1\" CornerRadius=\"1\" Visibility=\"Collapsed\">\r\n\t\t\t\t\t\t\t<Border.ToolTip>\r\n\t\t\t\t\t\t\t\t<ToolTip x:Name=\"validationTooltip\" Placement=\"Right\" Template=\"{StaticResource ValidationToolTipTemplate}\">\r\n\t\t\t\t\t\t\t\t\t<ToolTip.Triggers>\r\n\t\t\t\t\t\t\t\t\t\t<EventTrigger RoutedEvent=\"FrameworkElement.Loaded\">\r\n\t\t\t\t\t\t\t\t\t\t\t<BeginStoryboard>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"IsHitTestVisible\" Storyboard.TargetName=\"validationTooltip\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Boolean>True</sys:Boolean>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t\t</BeginStoryboard>\r\n\t\t\t\t\t\t\t\t\t\t</EventTrigger>\r\n\t\t\t\t\t\t\t\t\t</ToolTip.Triggers>\r\n\t\t\t\t\t\t\t\t\t<!--TODO: Include ValidationTooltipTemplate-->\r\n\t\t\t\t\t\t\t\t\t<!--<ToolTip.Template>\r\n                                    <ControlTemplate TargetType=\"{x:Type ToolTip}\">\r\n                                        <Grid x:Name=\"Root\" Margin=\"5,0\" Opacity=\"0\" RenderTransformOrigin=\"0,0\">\r\n                                            <Grid.RenderTransform>\r\n                                                <TranslateTransform X=\"-25\"/>\r\n                                            </Grid.RenderTransform>\r\n                                            <Border Background=\"#052A2E31\" CornerRadius=\"5\" Margin=\"4,4,-4,-4\"/>\r\n                                            <Border Background=\"#152A2E31\" CornerRadius=\"4\" Margin=\"3,3,-3,-3\"/>\r\n                                            <Border Background=\"#252A2E31\" CornerRadius=\"3\" Margin=\"2,2,-2,-2\"/>\r\n                                            <Border Background=\"#352A2E31\" CornerRadius=\"2\" Margin=\"1,1,-1,-1\"/>\r\n                                            <Border Background=\"#FFDC000C\" CornerRadius=\"2\">\r\n                                                <TextBlock Foreground=\"White\" MaxWidth=\"250\" Margin=\"8,4\" TextWrapping=\"Wrap\" Text=\"{Binding (Validation.Errors)[0].ErrorContent}\"/>\r\n                                            </Border>\r\n                                        </Grid>\r\n                                    </ControlTemplate>\r\n                                </ToolTip.Template>-->\r\n\t\t\t\t\t\t\t\t</ToolTip>\r\n\t\t\t\t\t\t\t</Border.ToolTip>\r\n\t\t\t\t\t\t\t<Grid Background=\"Transparent\" HorizontalAlignment=\"Right\" Height=\"12\" Margin=\"1,-4,-4,0\" VerticalAlignment=\"Top\" Width=\"12\">\r\n\t\t\t\t\t\t\t\t<Path Data=\"M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z\" Fill=\"{StaticResource ValidationErrorElement}\" Margin=\"1,3,0,0\" />\r\n\t\t\t\t\t\t\t\t<Path Data=\"M 0,0 L2,0 L 8,6 L8,8\" Fill=\"{StaticResource LightForegroundBrush}\" Margin=\"1,3,0,0\" />\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t\t<Popup x:Name=\"Popup\" AllowsTransparency=\"True\">\r\n\t\t\t\t\t\t\t<Grid Opacity=\"{TemplateBinding Opacity}\">\r\n\t\t\t\t\t\t\t\t<Border x:Name=\"PopupBorder\" BorderThickness=\"0\" HorizontalAlignment=\"Stretch\">\r\n\t\t\t\t\t\t\t\t\t<Border.RenderTransform>\r\n\t\t\t\t\t\t\t\t\t\t<TranslateTransform X=\"1\" Y=\"1\" />\r\n\t\t\t\t\t\t\t\t\t</Border.RenderTransform>\r\n\t\t\t\t\t\t\t\t\t<Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"0\" HorizontalAlignment=\"Stretch\" Opacity=\"1.0\" Padding=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t<Border.RenderTransform>\r\n\t\t\t\t\t\t\t\t\t\t\t<TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<TranslateTransform X=\"-1\" Y=\"-1\" />\r\n\t\t\t\t\t\t\t\t\t\t\t</TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t</Border.RenderTransform>\r\n\t\t\t\t\t\t\t\t\t\t<ListBox x:Name=\"Selector\" BorderThickness=\"0\" Background=\"{TemplateBinding Background}\" Foreground=\"{TemplateBinding Foreground}\" ScrollViewer.HorizontalScrollBarVisibility=\"Auto\" ItemTemplate=\"{TemplateBinding ItemTemplate}\" ItemContainerStyle=\"{TemplateBinding ItemContainerStyle}\" ScrollViewer.VerticalScrollBarVisibility=\"Auto\" />\r\n\t\t\t\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t</Popup>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n    <!--********************** Implicit Styles *********************** -->\r\n    <Style BasedOn=\"{StaticResource RatingItemStyle}\" TargetType=\"{x:Type inputToolkit:RatingItem}\" />\r\n    <Style BasedOn=\"{StaticResource RatingStyle}\" TargetType=\"{x:Type inputToolkit:Rating}\" />\r\n    <Style BasedOn=\"{StaticResource AccordionButtonStyle}\" TargetType=\"layoutToolkitPrimitives:AccordionButton\" />\r\n    <Style BasedOn=\"{StaticResource AccordionItemStyle}\" TargetType=\"layoutToolkit:AccordionItem\" />\r\n    <Style BasedOn=\"{StaticResource AccordionStyle}\" TargetType=\"layoutToolkit:Accordion\" />\r\n    <Style BasedOn=\"{StaticResource AutoCompleteBoxStyle}\" TargetType=\"{x:Type inputToolkit:AutoCompleteBox}\" />\r\n\t\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/MetroLight/Styles.Shared.xaml",
    "content": "﻿<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\" xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" xmlns:System=\"clr-namespace:System;assembly=mscorlib\" mc:Ignorable=\"d\">\r\n\r\n\t<!-- *********************************  COLORS  ********************************* -->\r\n\t<ResourceDictionary.MergedDictionaries>\r\n\t\t<ResourceDictionary Source=\"Theme.Colors.xaml\" />\r\n\t</ResourceDictionary.MergedDictionaries>\r\n\r\n\t<!-- *********************************  BRUSHES  ********************************* -->\r\n\t<SolidColorBrush x:Key=\"ForegroundBrush\" Color=\"{StaticResource Color_001}\" />\r\n\t<SolidColorBrush x:Key=\"LightForegroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"TransparentBrush\" Color=\"{StaticResource Color_016}\" />\r\n\t<SolidColorBrush x:Key=\"DisabledVisualElement\" Color=\"{StaticResource Color_012}\" />\r\n\t<SolidColorBrush x:Key=\"ValidationErrorElement\" Color=\"{StaticResource Color_028}\" />\r\n\r\n\t<!-- Scrollbar Brushes -->\r\n\t<SolidColorBrush x:Key=\"HScrollbarThumbBackgroundBrush\" Color=\"{StaticResource Color_003}\" />\r\n\t<SolidColorBrush x:Key=\"VScrollbarThumbBackgroundBrush\" Color=\"{StaticResource Color_003}\" />\r\n\t<SolidColorBrush x:Key=\"ScrollbarPageButtonArrowBackgroundBrush\" Color=\"{StaticResource Color_003}\" />\r\n\t<SolidColorBrush x:Key=\"ScrollbarPageButtonArrowPressedBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"ScrollbarPageButtonArrowHoverBackgroundBrush\" Color=\"{StaticResource Color_002}\" />\r\n\t<SolidColorBrush x:Key=\"ScrollbarPageButtonArrowDisabledBackgroundBrush\" Color=\"{StaticResource Color_005}\" />\r\n\t<SolidColorBrush x:Key=\"VScrollbarThumbHoverBackgroundBrush\" Color=\"{StaticResource Color_002}\" />\r\n\t<SolidColorBrush x:Key=\"HScrollbarThumbHoverBackgroundBrush\" Color=\"{StaticResource Color_002}\" />\r\n\t<SolidColorBrush x:Key=\"VScrollbarThumbPressedBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"HScrollbarThumbPressedBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"VScrollbarThumbDisabledBackgroundBrush\" Color=\"{StaticResource Color_005}\" />\r\n\t<SolidColorBrush x:Key=\"HScrollbarThumbDisabledBackgroundBrush\" Color=\"{StaticResource Color_005}\" />\r\n\t<SolidColorBrush x:Key=\"ScrollbarDisabledBackgroundBrush\" Color=\"{StaticResource Color_007}\" />\r\n\t<SolidColorBrush x:Key=\"ScrollbarBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\r\n\t<!-- ComboBox Brushes -->\r\n\t<SolidColorBrush x:Key=\"ComboBoxBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"ComboBoxBorderBrush\" Color=\"{StaticResource Color_004}\" />\r\n\t<SolidColorBrush x:Key=\"ComboBoxReadOnlyBorderBrush\" Color=\"{StaticResource Color_004}\" />\r\n\t<SolidColorBrush x:Key=\"ComboBoxHoverBackgroundBrush\" Color=\"{StaticResource Color_007}\" />\r\n\t<SolidColorBrush x:Key=\"ComboBoxHoverBorderBrush\" Color=\"{StaticResource Color_003}\" />\r\n\t<SolidColorBrush x:Key=\"ComboBoxFocusedBorderBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"ComboBoxDisabledBackgroundBrush\" Color=\"{StaticResource Color_012}\" />\r\n\t<SolidColorBrush x:Key=\"ComboBoxReadOnlyBackgroundBrush\" Color=\"{StaticResource Color_064}\" />\r\n\t<SolidColorBrush x:Key=\"PopupBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"PopupBorderBrush\" Color=\"{StaticResource Color_004}\" />\r\n\r\n\t<!-- TextBox Brushes -->\r\n\t<SolidColorBrush x:Key=\"TextBoxBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"TextBoxBorderBrush\" Color=\"{StaticResource Color_004}\" />\r\n\t<SolidColorBrush x:Key=\"TextBoxHoverBackgroundBrush\" Color=\"{StaticResource Color_016}\" />\r\n\t<SolidColorBrush x:Key=\"TextBoxHoverBorderBrush\" Color=\"{StaticResource Color_003}\" />\r\n\t<SolidColorBrush x:Key=\"TextBoxFocusedBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"TextBoxReadOnlyBackgroundBrush\" Color=\"{StaticResource Color_064}\" />\r\n\r\n\t<!-- Button Brushes -->\r\n\t<SolidColorBrush x:Key=\"ButtonBackgroundBrush\" Color=\"{StaticResource Color_008}\" />\r\n\t<SolidColorBrush x:Key=\"ButtonBorderBrush\" Color=\"{StaticResource Color_004}\" />\r\n\t<SolidColorBrush x:Key=\"ButtonHoverBackgroundBrush\" Color=\"{StaticResource Color_006}\" />\r\n\t<SolidColorBrush x:Key=\"ButtonHoverBorderBrush\" Color=\"{StaticResource Color_003}\" />\r\n\t<SolidColorBrush x:Key=\"ButtonPressedBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"ButtonPressedBorderBrush\" Color=\"{StaticResource Color_024}\" />\r\n\r\n\t<!-- ComboBoxItem Brushes -->\r\n\t<SolidColorBrush x:Key=\"ComboBoxItemHoverBackgroundBrush\" Color=\"{StaticResource Color_006}\" />\r\n\t<SolidColorBrush x:Key=\"ComboBoxItemHoverBorderBrush\" Color=\"{StaticResource Color_003}\" />\r\n\t<SolidColorBrush x:Key=\"ComboBoxItemPressedBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"ComboBoxItemPressedBorderBrush\" Color=\"{StaticResource Color_024}\" />\r\n\r\n\t<!-- ComboBoxToggleButton Brushes -->\r\n\t<SolidColorBrush x:Key=\"ComboBoxToggleButtonBorderBrush\" Color=\"{StaticResource Color_004}\" />\r\n\t<SolidColorBrush x:Key=\"ComboBoxToggleButtonPressedBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"ComboBoxToggleButtonDropDownSeparatorBackgroundBrush\" Color=\"{StaticResource Color_006}\" />\r\n\t<SolidColorBrush x:Key=\"ComboBoxToggleButtonPressedBorderBrush\" Color=\"{StaticResource Color_024}\" />\r\n\r\n\t<!-- ListBox Brushes -->\r\n\t<SolidColorBrush x:Key=\"ListBoxBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"ListBoxBorderBrush\" Color=\"{StaticResource Color_004}\" />\r\n\t<SolidColorBrush x:Key=\"ListBoxItemBackgroundBrush\" Color=\"{StaticResource Color_016}\" />\r\n\t<SolidColorBrush x:Key=\"ListBoxItemBorderBrush\" Color=\"{StaticResource Color_016}\" />\r\n\t<SolidColorBrush x:Key=\"ListBoxItemHoverBackgroundBrush\" Color=\"{StaticResource Color_006}\" />\r\n\t<SolidColorBrush x:Key=\"ListBoxItemHoverBorderBrush\" Color=\"{StaticResource Color_003}\" />\r\n\t<SolidColorBrush x:Key=\"ListBoxItemPressedBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"ListBoxItemPressedBorderBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"ListBoxItemSelectedBackgroundBrush\" Color=\"{StaticResource Color_026}\" />\r\n\t<SolidColorBrush x:Key=\"ListBoxItemSelectedBorderBrush\" Color=\"{StaticResource Color_024}\" />\r\n\r\n\t<!-- CheckBox Brushes -->\r\n\t<SolidColorBrush x:Key=\"CheckBoxBackgroundlBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"CheckBoxHoverBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"CheckBoxPressedBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"CheckBoxFocusedBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"CheckBoxInvalidUnfocusedBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"CheckBoxInvalidFocusedBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"CheckBoxBorderBrush\" Color=\"{StaticResource Color_004}\" />\r\n\t<SolidColorBrush x:Key=\"CheckBoxHoverBorderBrush\" Color=\"{StaticResource Color_003}\" />\r\n\t<SolidColorBrush x:Key=\"CheckBoxPressedBorderBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"CheckBoxFocusedBorderBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"CheckBoxInvalidUnfocusedBorderBrush\" Color=\"{StaticResource Color_029}\" />\r\n\t<SolidColorBrush x:Key=\"CheckBoxInvalidFocusedBorderBrush\" Color=\"{StaticResource Color_028}\" />\r\n\t<SolidColorBrush x:Key=\"CheckBoxIndeterminateCheckBackgroundBrush\" Color=\"{StaticResource Color_003}\" />\r\n\t<SolidColorBrush x:Key=\"CheckBoxCheckBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\r\n\t<!-- RadioButton Brushes -->\r\n\t<SolidColorBrush x:Key=\"RadioButtonBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"RadioButtonHoverBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"RadioButtonPressedBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"RadioButtonFocusedBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"RadioButtonInvalidUnfocusedBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"RadioButtonInvalidFocusedBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"RadioButtonBorderBrush\" Color=\"{StaticResource Color_004}\" />\r\n\t<SolidColorBrush x:Key=\"RadioButtonHoverBorderBrush\" Color=\"{StaticResource Color_003}\" />\r\n\t<SolidColorBrush x:Key=\"RadioButtonPressedBorderBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"RadioButtonFocusedBorderBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"RadioButtonInvalidUnfocusedBorderBrush\" Color=\"{StaticResource Color_029}\" />\r\n\t<SolidColorBrush x:Key=\"RadioButtonInvalidFocusedBorderBrush\" Color=\"{StaticResource Color_028}\" />\r\n\t<SolidColorBrush x:Key=\"RadioButtonCheckBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\r\n\t<!-- Visual Glyphs brushes -->\r\n\t<SolidColorBrush x:Key=\"GlyphBackgroundBrush\" Color=\"{StaticResource Color_003}\" />\r\n\t<SolidColorBrush x:Key=\"GlyphHoverBackgroundBrush\" Color=\"{StaticResource Color_002}\" />\r\n\t<SolidColorBrush x:Key=\"GlyphPressedBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"GlyphDisabledBackgroundBrush\" Color=\"{StaticResource Color_005}\" />\r\n\r\n\t<!-- ValidationToolTip Brushes -->\r\n\t<SolidColorBrush x:Key=\"ValidationToolTipTemplateShadowBrush\" Color=\"{StaticResource Color_003}\" />\r\n\r\n\t<!-- ******************************************************** SL-WPF SHARED INLINE CONTROLS RESOURCES ***********************************************************\r\n          ***********************************************************************************************************************************************************************    -->\r\n\r\n\t<!-- *********************************  ValidationToolTip Template  ********************************* -->\r\n\t<ControlTemplate x:Key=\"ValidationToolTipTemplate\">\r\n\t\t<Grid x:Name=\"Root\" Margin=\"5,0\" Opacity=\"0\" RenderTransformOrigin=\"0,0\">\r\n\t\t\t<Grid.RenderTransform>\r\n\t\t\t\t<TranslateTransform x:Name=\"xform\" X=\"-25\" />\r\n\t\t\t</Grid.RenderTransform>\r\n\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t<VisualStateGroup x:Name=\"OpenStates\">\r\n\t\t\t\t\t<VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0\" />\r\n\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0:0:0.2\" To=\"Open\">\r\n\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0:0:0.2\" To=\"0\" Storyboard.TargetProperty=\"X\" Storyboard.TargetName=\"xform\">\r\n\t\t\t\t\t\t\t\t\t<DoubleAnimation.EasingFunction>\r\n\t\t\t\t\t\t\t\t\t\t<BackEase Amplitude=\".3\" EasingMode=\"EaseOut\" />\r\n\t\t\t\t\t\t\t\t\t</DoubleAnimation.EasingFunction>\r\n\t\t\t\t\t\t\t\t</DoubleAnimation>\r\n\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0:0:0.2\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Root\" />\r\n\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t</VisualTransition>\r\n\t\t\t\t\t</VisualStateGroup.Transitions>\r\n\t\t\t\t\t<VisualState x:Name=\"Closed\">\r\n\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Root\" />\r\n\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t<VisualState x:Name=\"Open\">\r\n\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"X\" Storyboard.TargetName=\"xform\" />\r\n\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"Root\" />\r\n\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t</VisualState>\r\n\t\t\t\t</VisualStateGroup>\r\n\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t<Border Background=\"{StaticResource ValidationToolTipTemplateShadowBrush}\" CornerRadius=\"5\" Margin=\"4,4,-4,-4\" Opacity=\"0.02\" />\r\n\t\t\t<Border Background=\"{StaticResource ValidationToolTipTemplateShadowBrush}\" CornerRadius=\"4\" Margin=\"3,3,-3,-3\" Opacity=\"0.08\" />\r\n\t\t\t<Border Background=\"{StaticResource ValidationToolTipTemplateShadowBrush}\" CornerRadius=\"3\" Margin=\"2,2,-2,-2\" Opacity=\"0.15\" />\r\n\t\t\t<Border Background=\"{StaticResource ValidationToolTipTemplateShadowBrush}\" CornerRadius=\"2\" Margin=\"1,1,-1,-1\" Opacity=\"0.21\" />\r\n\t\t\t<Border Background=\"{StaticResource ValidationErrorElement}\" CornerRadius=\"2\" />\r\n\t\t\t<Border CornerRadius=\"2\">\r\n\t\t\t\t<TextBlock Foreground=\"{StaticResource LightForegroundBrush}\" MaxWidth=\"250\" Margin=\"8,4,8,4\" TextWrapping=\"Wrap\" Text=\"{Binding (Validation.Errors)[0].ErrorContent}\" UseLayoutRounding=\"false\" />\r\n\t\t\t</Border>\r\n\t\t</Grid>\r\n\t</ControlTemplate>\r\n\r\n\t<!-- *********************************  ComboBoxToggleButton Style   ********************************* -->\r\n\t<Style x:Key=\"ComboBoxToggleButtonStyle\" TargetType=\"ToggleButton\">\r\n\t\t<Setter Property=\"FontSize\" Value=\"14.667\" />\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource ComboBoxToggleButtonBorderBrush}\" />\r\n\t\t<Setter Property=\"MinWidth\" Value=\"30\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"30\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"2\" />\r\n\t\t<Setter Property=\"Cursor\" Value=\"Hand\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"ToggleButton\">\r\n\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"Arrow\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource GlyphHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Pressed\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"Arrow\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource GlyphPressedBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"Arrow\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource GlyphDisabledBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CheckStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Checked\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"ArrowSelected\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unchecked\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Indeterminate\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"FocusStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Focused\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unfocused\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t<ColumnDefinition />\r\n\t\t\t\t\t\t\t<ColumnDefinition Width=\"30\" />\r\n\t\t\t\t\t\t</Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t<Rectangle x:Name=\"Bd\" Fill=\"{StaticResource TransparentBrush}\" Grid.ColumnSpan=\"2\" />\r\n\t\t\t\t\t\t<Grid Grid.Column=\"1\">\r\n\t\t\t\t\t\t\t<Rectangle Width=\"1\" Fill=\"{StaticResource ComboBoxToggleButtonDropDownSeparatorBackgroundBrush}\" HorizontalAlignment=\"Left\" Margin=\"-1,5,0,5\" />\r\n\t\t\t\t\t\t\t<Path x:Name=\"Arrow\" Width=\"10\" Height=\"6\" Fill=\"{StaticResource GlyphBackgroundBrush}\" Data=\"F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z \" Stretch=\"Fill\" />\r\n\t\t\t\t\t\t\t<Path x:Name=\"ArrowSelected\" Width=\"10\" Height=\"6\" Visibility=\"Collapsed\" Fill=\"{StaticResource GlyphPressedBackgroundBrush}\" Data=\"F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z \" Stretch=\"Fill\" />\r\n\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  ComboBoxItem Style  ********************************* -->\r\n\t<Style x:Key=\"ComboBoxItemStyle\" TargetType=\"ComboBoxItem\">\r\n\t\t<Setter Property=\"FontSize\" Value=\"14.667\" />\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"30\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"6,0\" />\r\n\t\t<Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n\t\t<Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource TransparentBrush}\" />\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"ComboBoxItem\">\r\n\t\t\t\t\t<Grid Background=\"{TemplateBinding Background}\">\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"fillColor\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"DisabledVisualElement\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"SelectionStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unselected\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Selected\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"CheckedBd\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"contentControl\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Collapsed</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"contentControl1\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"SelectedUnfocused\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"FocusStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Focused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"FocusVisualElement\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unfocused\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"LayoutStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"AfterLoaded\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"BeforeLoaded\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"BeforeUnloaded\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Rectangle Fill=\"{StaticResource TransparentBrush}\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"fillColor\" Fill=\"{StaticResource ComboBoxItemHoverBackgroundBrush}\" IsHitTestVisible=\"False\" Opacity=\"0\" Stroke=\"{StaticResource ComboBoxItemHoverBorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"CheckedBd\" Fill=\"{StaticResource ComboBoxItemPressedBackgroundBrush}\" IsHitTestVisible=\"False\" Visibility=\"Collapsed\" Stroke=\"{StaticResource ComboBoxItemPressedBorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" />\r\n\t\t\t\t\t\t<ContentControl x:Name=\"contentControl\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" Foreground=\"{TemplateBinding Foreground}\">\r\n\t\t\t\t\t\t\t<ContentPresenter x:Name=\"contentPresenter\" />\r\n\t\t\t\t\t\t</ContentControl>\r\n\t\t\t\t\t\t<ContentControl x:Name=\"contentControl1\" Visibility=\"Collapsed\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" Foreground=\"{StaticResource LightForegroundBrush}\">\r\n\t\t\t\t\t\t\t<ContentPresenter x:Name=\"contentPresenter1\" />\r\n\t\t\t\t\t\t</ContentControl>\r\n\t\t\t\t\t\t<Rectangle x:Name=\"FocusVisualElement\" Stroke=\"{StaticResource ComboBoxItemPressedBackgroundBrush}\" Visibility=\"Collapsed\" StrokeThickness=\"2\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"DisabledVisualElement\" Fill=\"{StaticResource DisabledVisualElement}\" Visibility=\"Collapsed\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  ListBoxItem Style  ********************************* -->\r\n\t<Style x:Key=\"ListBoxItemStyle\" TargetType=\"ListBoxItem\">\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource TransparentBrush}\" />\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"FontSize\" Value=\"13.333\" />\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"30\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"6,2\" />\r\n\t\t<Setter Property=\"Margin\" Value=\"0\" />\r\n\t\t<Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n\t\t<Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"ListBoxItem\">\r\n\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Bd\" Storyboard.TargetProperty=\"Fill\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ListBoxItemHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Bd\" Storyboard.TargetProperty=\"Stroke\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ListBoxItemHoverBorderBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"DisabledVisualElement\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"SelectionStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unselected\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Selected\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"BgSelected\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"SelectedUnfocused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"BgSelected\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"FocusStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Focused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"FocusedVisualElement\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unfocused\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Rectangle x:Name=\"Bd\" Fill=\"{TemplateBinding Background}\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"BgSelected\" Fill=\"{StaticResource ListBoxItemSelectedBackgroundBrush}\" Stroke=\"{StaticResource ListBoxItemSelectedBorderBrush}\" Visibility=\"Collapsed\" />\r\n\t\t\t\t\t\t<ContentControl x:Name=\"ContentControl\" Foreground=\"{TemplateBinding Foreground}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\">\r\n\t\t\t\t\t\t\t<ContentPresenter x:Name=\"contentPresenter\" />\r\n\t\t\t\t\t\t</ContentControl>\r\n\t\t\t\t\t\t<Rectangle x:Name=\"FocusedVisualElement\" IsHitTestVisible=\"False\" Visibility=\"Collapsed\" Stroke=\"{StaticResource ListBoxItemPressedBorderBrush}\" StrokeThickness=\"2\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"DisabledVisualElement\" Fill=\"{StaticResource DisabledVisualElement}\" Visibility=\"Collapsed\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- ********************************** CheckBoxStyle **********************************-->\r\n\t<Style x:Key=\"CheckBoxStyle\" TargetType=\"CheckBox\">\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"FontSize\" Value=\"14.667\" />\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n\t\t<Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"6,0,0,0\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"30\" />\r\n\t\t<Setter Property=\"MinWidth\" Value=\"30\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"CheckBox\">\r\n\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"hover\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Pressed\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"pressed\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\".55\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"contentPresenter\" />\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"disabled\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CheckStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Checked\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"checkBox\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unchecked\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Indeterminate\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"IndeterminateCheck\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"FocusStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Focused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"focused\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unfocused\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"ValidationStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Valid\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"InvalidUnfocused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"invalidUnfocused\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"InvalidFocused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"invalidFocused\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t<ColumnDefinition Width=\"30\" />\r\n\t\t\t\t\t\t\t<ColumnDefinition Width=\"*\" />\r\n\t\t\t\t\t\t</Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t<Rectangle Fill=\"{StaticResource TransparentBrush}\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"normal\" Opacity=\"1\" Stroke=\"{StaticResource CheckBoxBorderBrush}\" StrokeThickness=\"1\" Fill=\"{StaticResource CheckBoxBackgroundlBrush}\" Width=\"18\" Height=\"18\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"hover\" Stroke=\"{StaticResource CheckBoxHoverBorderBrush}\" StrokeThickness=\"1\" Fill=\"{StaticResource CheckBoxHoverBackgroundBrush}\" Opacity=\"0\" Width=\"18\" Height=\"18\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"pressed\" Opacity=\"0\" Stroke=\"{StaticResource CheckBoxPressedBorderBrush}\" StrokeThickness=\"1\" Fill=\"{StaticResource CheckBoxPressedBackgroundBrush}\" Width=\"18\" Height=\"18\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"focused\" Opacity=\"0\" Stroke=\"{StaticResource CheckBoxFocusedBorderBrush}\" StrokeThickness=\"1\" Fill=\"{StaticResource CheckBoxFocusedBackgroundBrush}\" Width=\"18\" Height=\"18\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"invalidUnfocused\" Opacity=\"0\" Stroke=\"{StaticResource CheckBoxInvalidUnfocusedBorderBrush}\" StrokeThickness=\"1\" Fill=\"{StaticResource CheckBoxInvalidUnfocusedBackgroundBrush}\" Width=\"18\" Height=\"18\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"invalidFocused\" Opacity=\"0\" Stroke=\"{StaticResource CheckBoxInvalidFocusedBorderBrush}\" StrokeThickness=\"1\" Fill=\"{StaticResource CheckBoxInvalidFocusedBackgroundBrush}\" Width=\"18\" Height=\"18\" />\r\n\t\t\t\t\t\t<Path x:Name=\"checkBox\" Height=\"10\" Width=\"12\" Stretch=\"Fill\" Opacity=\"0\" Data=\"M 1145.607177734375,430 C1145.607177734375,430 1141.449951171875,435.0772705078125 1141.449951171875,435.0772705078125 1141.449951171875,435.0772705078125 1139.232177734375,433.0999755859375 1139.232177734375,433.0999755859375 1139.232177734375,433.0999755859375 1138,434.5538330078125 1138,434.5538330078125 1138,434.5538330078125 1141.482177734375,438 1141.482177734375,438 1141.482177734375,438 1141.96875,437.9375 1141.96875,437.9375 1141.96875,437.9375 1147,431.34619140625 1147,431.34619140625 1147,431.34619140625 1145.607177734375,430 1145.607177734375,430 z\" Fill=\"{StaticResource CheckBoxCheckBackgroundBrush}\" UseLayoutRounding=\"False\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"IndeterminateCheck\" Fill=\"{StaticResource CheckBoxIndeterminateCheckBackgroundBrush}\" Height=\"3\" Width=\"8\" Opacity=\"0\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"disabled\" Opacity=\"0\" StrokeThickness=\"1\" Fill=\"{StaticResource DisabledVisualElement}\" Width=\"18\" Height=\"18\" />\r\n\t\t\t\t\t\t<ContentPresenter x:Name=\"contentPresenter\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Grid.Column=\"1\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- ********************************** RadioButton Style **********************************-->\r\n\t<Style x:Key=\"RadioButtonStyle\" TargetType=\"RadioButton\">\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"FontSize\" Value=\"14.667\" />\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n\t\t<Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"6,0,0,0\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"30\" />\r\n\t\t<Setter Property=\"MinWidth\" Value=\"20\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"RadioButton\">\r\n\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"hover\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Pressed\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"pressed\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\".55\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"contentPresenter\" />\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"disabled\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CheckStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Checked\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"Checked1\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unchecked\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Indeterminate\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"FocusStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Focused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"focused\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unfocused\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"ValidationStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Valid\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"InvalidUnfocused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"invalidUnfocused\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"InvalidFocused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"invalidFocused\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t<ColumnDefinition Width=\"18\" />\r\n\t\t\t\t\t\t\t<ColumnDefinition Width=\"*\" />\r\n\t\t\t\t\t\t</Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t<Rectangle Fill=\"{StaticResource TransparentBrush}\" Margin=\"-6,0\" />\r\n\t\t\t\t\t\t<Ellipse x:Name=\"normal\" Opacity=\"1\" Stroke=\"{StaticResource RadioButtonBorderBrush}\" StrokeThickness=\"1\" Fill=\"{StaticResource RadioButtonBackgroundBrush}\" Width=\"18\" Height=\"18\" />\r\n\t\t\t\t\t\t<Ellipse x:Name=\"hover\" Stroke=\"{StaticResource RadioButtonHoverBorderBrush}\" StrokeThickness=\"1\" Fill=\"{StaticResource RadioButtonHoverBackgroundBrush}\" Opacity=\"0\" Width=\"18\" Height=\"18\" />\r\n\t\t\t\t\t\t<Ellipse x:Name=\"pressed\" Opacity=\"0\" Stroke=\"{StaticResource RadioButtonPressedBorderBrush}\" StrokeThickness=\"1\" Fill=\"{StaticResource RadioButtonPressedBackgroundBrush}\" Width=\"18\" Height=\"18\" />\r\n\t\t\t\t\t\t<Ellipse x:Name=\"focused\" Opacity=\"0\" Stroke=\"{StaticResource RadioButtonFocusedBorderBrush}\" StrokeThickness=\"1\" Fill=\"{StaticResource RadioButtonFocusedBackgroundBrush}\" Width=\"18\" Height=\"18\" />\r\n\t\t\t\t\t\t<Ellipse x:Name=\"invalidUnfocused\" Opacity=\"0\" Stroke=\"{StaticResource RadioButtonInvalidUnfocusedBorderBrush}\" StrokeThickness=\"1\" Fill=\"{StaticResource RadioButtonInvalidUnfocusedBackgroundBrush}\" Width=\"18\" Height=\"18\" />\r\n\t\t\t\t\t\t<Ellipse x:Name=\"invalidFocused\" Opacity=\"0\" Stroke=\"{StaticResource RadioButtonInvalidFocusedBorderBrush}\" StrokeThickness=\"1\" Fill=\"{StaticResource RadioButtonInvalidFocusedBackgroundBrush}\" Width=\"18\" Height=\"18\" />\r\n\t\t\t\t\t\t<Ellipse x:Name=\"Checked1\" Fill=\"{StaticResource RadioButtonCheckBackgroundBrush}\" Opacity=\"0\" Width=\"10\" Height=\"10\" />\r\n\t\t\t\t\t\t<ContentPresenter x:Name=\"contentPresenter\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Grid.Column=\"1\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" />\r\n\t\t\t\t\t\t<Ellipse x:Name=\"disabled\" Opacity=\"0\" StrokeThickness=\"1\" Fill=\"{StaticResource DisabledVisualElement}\" Width=\"18\" Height=\"18\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  ButtonStyle  ********************************* -->\r\n\t<Style x:Key=\"ButtonStyle\" TargetType=\"Button\">\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"FontSize\" Value=\"14.667\" />\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"10,0,10,2\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"30\" />\r\n\t\t<Setter Property=\"MinWidth\" Value=\"30\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"Button\">\r\n\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Bd\" Storyboard.TargetProperty=\"Fill\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Bd\" Storyboard.TargetProperty=\"Stroke\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonHoverBorderBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Pressed\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Bd\" Storyboard.TargetProperty=\"Fill\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonPressedBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Bd\" Storyboard.TargetProperty=\"Stroke\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonPressedBorderBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentControl\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource LightForegroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"DisabledVisualElement\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"FocusStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Focused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"FocusedVisualElement\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unfocused\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Rectangle x:Name=\"Bd\" Fill=\"{StaticResource ButtonBackgroundBrush}\" Stroke=\"{StaticResource ButtonBorderBrush}\" StrokeThickness=\"1\" />\r\n\t\t\t\t\t\t<ContentControl x:Name=\"ContentControl\" Foreground=\"{TemplateBinding Foreground}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\">\r\n\t\t\t\t\t\t\t<ContentPresenter x:Name=\"contentPresenter\" />\r\n\t\t\t\t\t\t</ContentControl>\r\n\t\t\t\t\t\t<Rectangle x:Name=\"FocusedVisualElement\" Stroke=\"{StaticResource ButtonPressedBorderBrush}\" Visibility=\"Collapsed\" StrokeThickness=\"2\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"DisabledVisualElement\" Fill=\"{StaticResource DisabledVisualElement}\" Visibility=\"Collapsed\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/MetroLight/Styles.WPF.xaml",
    "content": "﻿<ResourceDictionary\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n\t  xmlns:System=\"clr-namespace:System;assembly=mscorlib\"\r\n\t  mc:Ignorable=\"d\">\r\n\r\n\t<!-- *********************************  RESOURCES  ********************************* -->\r\n\t<ResourceDictionary.MergedDictionaries>\r\n\t\t<ResourceDictionary Source=\"Theme.Colors.xaml\" />\r\n\t\t<ResourceDictionary Source=\"Styles.Shared.xaml\" />\r\n\t</ResourceDictionary.MergedDictionaries>\r\n\r\n\t<!-- ******************************************************** WPF SPECIFIC INLINE-CONTROLS RESOURCES ***********************************************************\r\n    ***********************************************************************************************************************************************************************    -->\r\n\t<!-- *********************************  ScrollBarButton Style  ********************************* -->\r\n\t<Style x:Key=\"ScrollBarButtonStyle\" TargetType=\"{x:Type RepeatButton}\">\r\n\t\t<Setter Property=\"MinWidth\" Value=\"30\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"30\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"0\" />\r\n\t\t<Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n\t\t<Setter Property=\"Focusable\" Value=\"false\" />\r\n\t\t<Setter Property=\"IsTabStop\" Value=\"false\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n\t\t\t\t\t<Grid x:Name=\"grid1\">\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"Arrow\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ScrollbarPageButtonArrowHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Pressed\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"Arrow\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ScrollbarPageButtonArrowPressedBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"Arrow\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ScrollbarPageButtonArrowDisabledBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Rectangle Fill=\"{StaticResource TransparentBrush}\" Margin=\"-5\" />\r\n\t\t\t\t\t\t<Path x:Name=\"Arrow\" Data=\"F1 M 541.537,173.589L 531.107,173.589L 536.322,167.49L 541.537,173.589 Z \" Height=\"6\" Stretch=\"Uniform\" Width=\"10\" Fill=\"{StaticResource ScrollbarPageButtonArrowBackgroundBrush}\" Margin=\"{TemplateBinding Padding}\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  ScrollBarPageButton Style  ********************************* -->\r\n\t<Style x:Key=\"ScrollBarPageButtonStyle\" TargetType=\"{x:Type RepeatButton}\">\r\n\t\t<Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n\t\t<Setter Property=\"Background\" Value=\"Transparent\" />\r\n\t\t<Setter Property=\"Focusable\" Value=\"false\" />\r\n\t\t<Setter Property=\"IsTabStop\" Value=\"false\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n\t\t\t\t\t<Rectangle Fill=\"{TemplateBinding Background}\" Height=\"{TemplateBinding Height}\" Width=\"{TemplateBinding Width}\">\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Pressed\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t</Rectangle>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  Horizontal ScrollBarThumb Style  ********************************* -->\r\n\t<Style x:Key=\"HScrollBarThumbStyle\" TargetType=\"{x:Type Thumb}\">\r\n\t\t<Setter Property=\"MinWidth\" Value=\"20\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"30\" />\r\n\t\t<Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n\t\t<Setter Property=\"IsTabStop\" Value=\"false\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n\t\t\t\t\t<Grid Margin=\"0\">\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"Thumb\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource HScrollbarThumbHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Pressed\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"Thumb\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource HScrollbarThumbPressedBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"Thumb\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource HScrollbarThumbDisabledBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Rectangle Fill=\"{StaticResource TransparentBrush}\" Margin=\"-5\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"Thumb\" Margin=\"1\" Fill=\"{StaticResource HScrollbarThumbBackgroundBrush}\" Height=\"8\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  Vertical ScrollbarThumb Style  ********************************* -->\r\n\t<Style x:Key=\"VScrollBarThumbStyle\" TargetType=\"{x:Type Thumb}\">\r\n\t\t<Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n\t\t<Setter Property=\"MinWidth\" Value=\"30\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"20\" />\r\n\t\t<Setter Property=\"Stylus.IsPressAndHoldEnabled\" Value=\"false\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n\t\t\t\t\t<Grid x:Name=\"grid\" Height=\"Auto\" Width=\"Auto\">\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"Thumb\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource VScrollbarThumbHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Pressed\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"Thumb\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource VScrollbarThumbPressedBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Fill\" Storyboard.TargetName=\"Thumb\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource VScrollbarThumbDisabledBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Rectangle Fill=\"{StaticResource TransparentBrush}\" Margin=\"-5\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"Thumb\" Fill=\"{StaticResource VScrollbarThumbBackgroundBrush}\" Width=\"8\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  ScrollBar Style  ********************************* -->\r\n\t<Style x:Key=\"ScrollBarStyle\" TargetType=\"{x:Type ScrollBar}\">\r\n\t\t<Setter Property=\"Stylus.IsPressAndHoldEnabled\" Value=\"false\" />\r\n\t\t<Setter Property=\"Stylus.IsFlicksEnabled\" Value=\"false\" />\r\n\t\t<Setter Property=\"Width\" Value=\"30\" />\r\n\t\t<Setter Property=\"MinWidth\" Value=\"30\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type ScrollBar}\">\r\n            <Grid  SnapsToDevicePixels=\"true\">\r\n\t\t\t\t\t\t<Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t<RowDefinition Height=\"30\" />\r\n\t\t\t\t\t\t\t<RowDefinition Height=\"0.00001*\" />\r\n\t\t\t\t\t\t\t<RowDefinition Height=\"30\" />\r\n\t\t\t\t\t\t</Grid.RowDefinitions>\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0:0:0.3\" />\r\n\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"repeatButton\">\r\n\t\t\t\t\t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0.6\" />\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"repeatButton1\">\r\n\t\t\t\t\t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0.6\" />\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"thumb\">\r\n\t\t\t\t\t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0\" />\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n                  <Rectangle x:Name=\"Bg\" Grid.RowSpan=\"3\" Fill=\"{StaticResource ScrollbarBackgroundBrush}\" Margin=\"0\"/>\r\n\t\t\t\t\t\t<RepeatButton x:Name=\"repeatButton\" Command=\"{x:Static ScrollBar.LineUpCommand}\" IsEnabled=\"True\" Style=\"{StaticResource ScrollBarButtonStyle}\" HorizontalAlignment=\"Center\" />\r\n\t\t\t\t\t\t<Track x:Name=\"PART_Track\" IsDirectionReversed=\"true\" IsEnabled=\"True\" Grid.Row=\"1\">\r\n\t\t\t\t\t\t\t<Track.DecreaseRepeatButton>\r\n\t\t\t\t\t\t\t\t<RepeatButton Command=\"{x:Static ScrollBar.PageUpCommand}\" Style=\"{StaticResource ScrollBarPageButtonStyle}\" />\r\n\t\t\t\t\t\t\t</Track.DecreaseRepeatButton>\r\n\t\t\t\t\t\t\t<Track.IncreaseRepeatButton>\r\n\t\t\t\t\t\t\t\t<RepeatButton Command=\"{x:Static ScrollBar.PageDownCommand}\" Style=\"{StaticResource ScrollBarPageButtonStyle}\" />\r\n\t\t\t\t\t\t\t</Track.IncreaseRepeatButton>\r\n\t\t\t\t\t\t\t<Track.Thumb>\r\n\t\t\t\t\t\t\t\t<Thumb x:Name=\"thumb\" Style=\"{StaticResource VScrollBarThumbStyle}\" HorizontalAlignment=\"Center\" Width=\"30\" />\r\n\t\t\t\t\t\t\t</Track.Thumb>\r\n\t\t\t\t\t\t</Track>\r\n\t\t\t\t\t\t<RepeatButton x:Name=\"repeatButton1\" Command=\"{x:Static ScrollBar.LineDownCommand}\" IsEnabled=\"True\" Grid.Row=\"2\" Style=\"{StaticResource ScrollBarButtonStyle}\" RenderTransformOrigin=\"0.5,0.5\" HorizontalAlignment=\"Center\">\r\n\t\t\t\t\t\t\t<RepeatButton.RenderTransform>\r\n\t\t\t\t\t\t\t\t<TransformGroup>\r\n\t\t\t\t\t\t\t\t\t<ScaleTransform />\r\n\t\t\t\t\t\t\t\t\t<SkewTransform />\r\n\t\t\t\t\t\t\t\t\t<RotateTransform Angle=\"180\" />\r\n\t\t\t\t\t\t\t\t\t<TranslateTransform />\r\n\t\t\t\t\t\t\t\t</TransformGroup>\r\n\t\t\t\t\t\t\t</RepeatButton.RenderTransform>\r\n\t\t\t\t\t\t</RepeatButton>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                <Setter Property=\"Fill\" TargetName=\"Bg\" Value=\"{StaticResource ScrollbarDisabledBackgroundBrush}\"/>\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t\t<Style.Triggers>\r\n\t\t\t<Trigger Property=\"Orientation\" Value=\"Horizontal\">\r\n\t\t\t\t<Setter Property=\"Width\" Value=\"Auto\" />\r\n\t\t\t\t<Setter Property=\"MinWidth\" Value=\"0\" />\r\n\t\t\t\t<Setter Property=\"Height\" Value=\"30\" />\r\n\t\t\t\t<Setter Property=\"MinHeight\" Value=\"30\" />\r\n\t\t\t\t<Setter Property=\"Template\">\r\n\t\t\t\t\t<Setter.Value>\r\n\t\t\t\t\t\t<ControlTemplate TargetType=\"{x:Type ScrollBar}\">\r\n                <Grid SnapsToDevicePixels=\"true\">\r\n\t\t\t\t\t\t\t\t<Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"30\" />\r\n\t\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"0.00001*\" />\r\n\t\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"30\" />\r\n\t\t\t\t\t\t\t\t</Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t\t\t<VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0:0:0.3\" />\r\n\t\t\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"repeatButton\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"repeatButton1\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\" />\r\n\t\t\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n                  <Rectangle x:Name=\"Bg\" Grid.ColumnSpan=\"5\" Fill=\"{StaticResource ScrollbarBackgroundBrush}\" Margin=\"0\"/>\r\n\t\t\t\t\t\t\t\t<RepeatButton x:Name=\"repeatButton\" Command=\"{x:Static ScrollBar.LineLeftCommand}\" IsEnabled=\"True\" Style=\"{DynamicResource ScrollBarButtonStyle}\" Opacity=\"1\" RenderTransformOrigin=\"0.5,0.5\" VerticalAlignment=\"Center\">\r\n\t\t\t\t\t\t\t\t\t<RepeatButton.RenderTransform>\r\n\t\t\t\t\t\t\t\t\t\t<TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t\t<ScaleTransform />\r\n\t\t\t\t\t\t\t\t\t\t\t<SkewTransform />\r\n\t\t\t\t\t\t\t\t\t\t\t<RotateTransform Angle=\"-90\" />\r\n\t\t\t\t\t\t\t\t\t\t\t<TranslateTransform />\r\n\t\t\t\t\t\t\t\t\t\t</TransformGroup>\r\n\t\t\t\t\t\t\t\t\t</RepeatButton.RenderTransform>\r\n\t\t\t\t\t\t\t\t</RepeatButton>\r\n\t\t\t\t\t\t\t\t<Track x:Name=\"PART_Track\" Grid.Column=\"1\" IsEnabled=\"True\">\r\n\t\t\t\t\t\t\t\t\t<Track.DecreaseRepeatButton>\r\n\t\t\t\t\t\t\t\t\t\t<RepeatButton Command=\"{x:Static ScrollBar.PageLeftCommand}\" Style=\"{StaticResource ScrollBarPageButtonStyle}\" />\r\n\t\t\t\t\t\t\t\t\t</Track.DecreaseRepeatButton>\r\n\t\t\t\t\t\t\t\t\t<Track.IncreaseRepeatButton>\r\n\t\t\t\t\t\t\t\t\t\t<RepeatButton Command=\"{x:Static ScrollBar.PageRightCommand}\" Style=\"{StaticResource ScrollBarPageButtonStyle}\" />\r\n\t\t\t\t\t\t\t\t\t</Track.IncreaseRepeatButton>\r\n\t\t\t\t\t\t\t\t\t<Track.Thumb>\r\n\t\t\t\t\t\t\t\t\t\t<Thumb Style=\"{StaticResource HScrollBarThumbStyle}\" VerticalAlignment=\"Center\" Height=\"30\" />\r\n\t\t\t\t\t\t\t\t\t</Track.Thumb>\r\n\t\t\t\t\t\t\t\t</Track>\r\n\t\t\t\t\t\t\t\t<RepeatButton x:Name=\"repeatButton1\" Grid.Column=\"2\" Command=\"{x:Static ScrollBar.LineRightCommand}\" IsEnabled=\"True\" Style=\"{DynamicResource ScrollBarButtonStyle}\" Opacity=\"1\" RenderTransformOrigin=\"0.5,0.5\" VerticalAlignment=\"Center\">\r\n\t\t\t\t\t\t\t\t\t<RepeatButton.RenderTransform>\r\n\t\t\t\t\t\t\t\t\t\t<TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t\t<ScaleTransform />\r\n\t\t\t\t\t\t\t\t\t\t\t<SkewTransform />\r\n\t\t\t\t\t\t\t\t\t\t\t<RotateTransform Angle=\"90\" />\r\n\t\t\t\t\t\t\t\t\t\t\t<TranslateTransform />\r\n\t\t\t\t\t\t\t\t\t\t</TransformGroup>\r\n\t\t\t\t\t\t\t\t\t</RepeatButton.RenderTransform>\r\n\t\t\t\t\t\t\t\t</RepeatButton>\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t\t\t<Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                    <Setter Property=\"Fill\" TargetName=\"Bg\" Value=\"{StaticResource ScrollbarDisabledBackgroundBrush}\"/>\r\n\t\t\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t\t\t</ControlTemplate>\r\n\t\t\t\t\t</Setter.Value>\r\n\t\t\t\t</Setter>\r\n\t\t\t</Trigger>\r\n\t\t</Style.Triggers>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  ScrollViewer Style ********************************* -->\r\n\t<Style x:Key=\"ScrollViewerStyle\" TargetType=\"{x:Type ScrollViewer}\">\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n\t\t<Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n\t\t<Setter Property=\"VerticalScrollBarVisibility\" Value=\"Auto\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"0\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type ScrollViewer}\">\r\n\t\t\t\t\t<Grid x:Name=\"Grid\">\r\n\t\t\t\t\t\t<Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t<ColumnDefinition Width=\"*\" />\r\n\t\t\t\t\t\t\t<ColumnDefinition Width=\"Auto\" />\r\n\t\t\t\t\t\t</Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t<Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t<RowDefinition Height=\"*\" />\r\n\t\t\t\t\t\t\t<RowDefinition Height=\"Auto\" />\r\n\t\t\t\t\t\t</Grid.RowDefinitions>\r\n\t\t\t\t\t\t<ScrollContentPresenter x:Name=\"PART_ScrollContentPresenter\" CanContentScroll=\"{TemplateBinding CanContentScroll}\" CanHorizontallyScroll=\"False\" CanVerticallyScroll=\"False\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Grid.Column=\"0\" Margin=\"{TemplateBinding Padding}\" Grid.Row=\"0\" />\r\n\t\t\t\t\t\t<ScrollBar x:Name=\"PART_VerticalScrollBar\" AutomationProperties.AutomationId=\"VerticalScrollBar\" Cursor=\"Arrow\" Grid.Column=\"1\" Maximum=\"{TemplateBinding ScrollableHeight}\" Minimum=\"0\" Grid.Row=\"0\" Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Value=\"{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" ViewportSize=\"{TemplateBinding ViewportHeight}\" Style=\"{StaticResource ScrollBarStyle}\" />\r\n\t\t\t\t\t\t<ScrollBar x:Name=\"PART_HorizontalScrollBar\" AutomationProperties.AutomationId=\"HorizontalScrollBar\" Cursor=\"Arrow\" Grid.Column=\"0\" Maximum=\"{TemplateBinding ScrollableWidth}\" Minimum=\"0\" Orientation=\"Horizontal\" Grid.Row=\"1\" Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Value=\"{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" ViewportSize=\"{TemplateBinding ViewportWidth}\" Style=\"{StaticResource ScrollBarStyle}\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  ComboBoxEditableTextBox Style  ********************************* -->\r\n\t<Style x:Key=\"ComboBoxEditableTextBoxStyle\" TargetType=\"{x:Type TextBox}\">\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"FontSize\" Value=\"14.667\" />\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n\t\t<Setter Property=\"AllowDrop\" Value=\"true\" />\r\n\t\t<Setter Property=\"MinWidth\" Value=\"0\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"30\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"6,4\" />\r\n\t\t<Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type TextBox}\">\r\n\t\t\t\t\t<ScrollViewer Style=\"{StaticResource ScrollViewerStyle}\" x:Name=\"PART_ContentHost\" Background=\"Transparent\" Focusable=\"false\" HorizontalScrollBarVisibility=\"Hidden\" VerticalScrollBarVisibility=\"Hidden\">\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"PART_ContentHost\">\r\n\t\t\t\t\t\t\t\t\t\t\t<EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0.3\" />\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"ReadOnly\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t</ScrollViewer>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  ComboBoxEditable Template  ********************************* -->\r\n\t<ControlTemplate x:Key=\"ComboBoxEditableTemplate\" TargetType=\"{x:Type ComboBox}\">\r\n\t\t<Grid x:Name=\"MainGrid\" SnapsToDevicePixels=\"true\">\r\n\t\t\t<Grid.ColumnDefinitions>\r\n\t\t\t\t<ColumnDefinition Width=\"*\" />\r\n\t\t\t\t<ColumnDefinition Width=\"Auto\" />\r\n\t\t\t</Grid.ColumnDefinitions>\r\n\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"hover\">\r\n\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"disabled\">\r\n\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t</VisualState>\r\n\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t<VisualStateGroup x:Name=\"FocusStates\">\r\n\t\t\t\t\t<VisualState x:Name=\"Unfocused\" />\r\n\t\t\t\t\t<VisualState x:Name=\"Focused\">\r\n\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"focused\">\r\n\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t<VisualState x:Name=\"FocusedDropDown\">\r\n\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"focused\">\r\n\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t</VisualState>\r\n\t\t\t\t</VisualStateGroup>\r\n\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t<Rectangle x:Name=\"normal\" Fill=\"{StaticResource ComboBoxBackgroundBrush}\" Stroke=\"{StaticResource ComboBoxBorderBrush}\" StrokeThickness=\"1\" Grid.ColumnSpan=\"2\" />\r\n\t\t\t<Rectangle x:Name=\"hover\" Fill=\"{StaticResource ComboBoxHoverBackgroundBrush}\" Stroke=\"{StaticResource ComboBoxHoverBorderBrush}\" StrokeThickness=\"1\" Visibility=\"Collapsed\" Grid.ColumnSpan=\"2\" />\r\n\t\t\t<Popup x:Name=\"PART_Popup\" AllowsTransparency=\"true\" Grid.ColumnSpan=\"2\" IsOpen=\"{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}\" Margin=\"1\" PopupAnimation=\"{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}\" Placement=\"Bottom\">\r\n\t\t\t\t<Border x:Name=\"DropDownBorder\" HorizontalAlignment=\"Stretch\" Background=\"{StaticResource PopupBackgroundBrush}\" BorderBrush=\"{StaticResource PopupBorderBrush}\" BorderThickness=\"1\" MaxHeight=\"{TemplateBinding MaxDropDownHeight}\" MinWidth=\"{Binding ActualWidth, ElementName=MainGrid}\" CornerRadius=\"2\">\r\n\t\t\t\t\t<ScrollViewer x:Name=\"DropDownScrollViewer\" Style=\"{StaticResource ScrollViewerStyle}\">\r\n\t\t\t\t\t\t<Grid RenderOptions.ClearTypeHint=\"Enabled\">\r\n\t\t\t\t\t\t\t<Canvas HorizontalAlignment=\"Left\" Height=\"0\" VerticalAlignment=\"Top\" Width=\"0\">\r\n\t\t\t\t\t\t\t\t<Rectangle x:Name=\"OpaqueRect\" Fill=\"{Binding Background, ElementName=DropDownBorder}\" Height=\"{Binding ActualHeight, ElementName=DropDownBorder}\" Width=\"{Binding ActualWidth, ElementName=DropDownBorder}\" />\r\n\t\t\t\t\t\t\t</Canvas>\r\n\t\t\t\t\t\t\t<ItemsPresenter x:Name=\"ItemsPresenter\" KeyboardNavigation.DirectionalNavigation=\"Contained\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" />\r\n\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t</ScrollViewer>\r\n\t\t\t\t</Border>\r\n\t\t\t</Popup>\r\n\t\t\t<ToggleButton BorderBrush=\"{TemplateBinding BorderBrush}\" Background=\"{TemplateBinding Background}\" Grid.Column=\"0\" IsChecked=\"{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" Style=\"{StaticResource ComboBoxToggleButtonStyle}\" />\r\n\t\t\t<TextBox x:Name=\"PART_EditableTextBox\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" IsReadOnly=\"{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}\" Style=\"{StaticResource ComboBoxEditableTextBoxStyle}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\" Margin=\"0,0,31,0\" VerticalAlignment=\"Center\" />\r\n\t\t\t<Rectangle x:Name=\"focused\" Stroke=\"{StaticResource ComboBoxFocusedBorderBrush}\" StrokeThickness=\"1\" Visibility=\"Collapsed\" Grid.ColumnSpan=\"2\" />\r\n\t\t\t<Rectangle x:Name=\"disabled\" Fill=\"{StaticResource ComboBoxDisabledBackgroundBrush}\" Visibility=\"Collapsed\" Grid.ColumnSpan=\"2\" />\r\n\t\t</Grid>\r\n\t</ControlTemplate>\r\n\r\n\t<!-- *********************************  ComboBox Style  ********************************* -->\r\n\t<Style x:Key=\"ComboBoxStyle\" TargetType=\"{x:Type ComboBox}\">\r\n      <Setter Property=\"Padding\" Value=\"6,5,35,3\"/>\r\n\t\t<Setter Property=\"Margin\" Value=\"0\" />\r\n\t\t<Setter Property=\"FontSize\" Value=\"14.667\" />\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"30\" />\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource TransparentBrush}\" />\r\n\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource ComboBoxBorderBrush}\" />\r\n\t\t<Setter Property=\"ItemContainerStyle\" Value=\"{StaticResource ComboBoxItemStyle}\" />\r\n\t\t<Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\" />\r\n\t\t<Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\" />\r\n\t\t<Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"true\" />\r\n\t\t<Setter Property=\"ScrollViewer.PanningMode\" Value=\"Both\" />\r\n\t\t<Setter Property=\"Stylus.IsFlicksEnabled\" Value=\"False\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type ComboBox}\">\r\n\t\t\t\t\t<Grid x:Name=\"MainGrid\" SnapsToDevicePixels=\"true\">\r\n\t\t\t\t\t\t<Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t<ColumnDefinition Width=\"*\" />\r\n\t\t\t\t\t\t\t<ColumnDefinition MinWidth=\"30\" Width=\"0\" />\r\n\t\t\t\t\t\t</Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"hover\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"disabled\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"FocusStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unfocused\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Focused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"focused\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"FocusedDropDown\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"focused\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Rectangle x:Name=\"normal\" Fill=\"{StaticResource ComboBoxBackgroundBrush}\" Stroke=\"{StaticResource ComboBoxBorderBrush}\" StrokeThickness=\"1\" Grid.ColumnSpan=\"2\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"hover\" Fill=\"{StaticResource ComboBoxHoverBackgroundBrush}\" Stroke=\"{StaticResource ComboBoxHoverBorderBrush}\" StrokeThickness=\"1\" Visibility=\"Collapsed\" Grid.ColumnSpan=\"2\" />\r\n\t\t\t\t\t\t<Popup x:Name=\"PART_Popup\" AllowsTransparency=\"true\" Grid.ColumnSpan=\"2\" IsOpen=\"{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}\" Margin=\"1\" PopupAnimation=\"{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}\" Placement=\"Bottom\">\r\n\t\t\t\t\t\t\t<Border x:Name=\"DropDownBorder\" HorizontalAlignment=\"Stretch\" Background=\"{StaticResource PopupBackgroundBrush}\" BorderBrush=\"{StaticResource PopupBorderBrush}\" BorderThickness=\"1\" MaxHeight=\"{TemplateBinding MaxDropDownHeight}\" MinWidth=\"{Binding ActualWidth, ElementName=MainGrid}\" CornerRadius=\"2\">\r\n\t\t\t\t\t\t\t\t<ScrollViewer x:Name=\"DropDownScrollViewer\" Style=\"{StaticResource ScrollViewerStyle}\">\r\n\t\t\t\t\t\t\t\t\t<Grid RenderOptions.ClearTypeHint=\"Enabled\">\r\n\t\t\t\t\t\t\t\t\t\t<Canvas HorizontalAlignment=\"Left\" Height=\"0\" VerticalAlignment=\"Top\" Width=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t<Rectangle x:Name=\"OpaqueRect\" Fill=\"{Binding Background, ElementName=DropDownBorder}\" Height=\"{Binding ActualHeight, ElementName=DropDownBorder}\" Width=\"{Binding ActualWidth, ElementName=DropDownBorder}\" />\r\n\t\t\t\t\t\t\t\t\t\t</Canvas>\r\n\t\t\t\t\t\t\t\t\t\t<ItemsPresenter x:Name=\"ItemsPresenter\" KeyboardNavigation.DirectionalNavigation=\"Contained\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" />\r\n\t\t\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t\t\t</ScrollViewer>\r\n\t\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t\t</Popup>\r\n\t\t\t\t\t\t<ToggleButton BorderBrush=\"{TemplateBinding BorderBrush}\" Background=\"{TemplateBinding Background}\" Grid.ColumnSpan=\"2\" IsChecked=\"{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" Style=\"{StaticResource ComboBoxToggleButtonStyle}\" />\r\n              <ContentPresenter Grid.ColumnSpan=\"2\" ContentTemplate=\"{TemplateBinding SelectionBoxItemTemplate}\" ContentTemplateSelector=\"{TemplateBinding ItemTemplateSelector}\" Content=\"{TemplateBinding SelectionBoxItem}\" ContentStringFormat=\"{TemplateBinding SelectionBoxItemStringFormat}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" IsHitTestVisible=\"false\" Margin=\"{TemplateBinding Padding}\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n\t\t\t\t\t\t<Rectangle x:Name=\"focused\" Stroke=\"{StaticResource ComboBoxFocusedBorderBrush}\" StrokeThickness=\"1\" Visibility=\"Collapsed\" Grid.ColumnSpan=\"2\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"disabled\" Fill=\"{StaticResource ComboBoxDisabledBackgroundBrush}\" Visibility=\"Collapsed\" Grid.ColumnSpan=\"2\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"HasItems\" Value=\"false\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Height\" TargetName=\"DropDownBorder\" Value=\"95\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsEnabled\" Value=\"false\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Background\" Value=\"{StaticResource ComboBoxBackgroundBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsGrouping\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"ScrollViewer.CanContentScroll\" SourceName=\"DropDownScrollViewer\" Value=\"false\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Canvas.Top\" TargetName=\"OpaqueRect\" Value=\"{Binding VerticalOffset, ElementName=DropDownScrollViewer}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Canvas.Left\" TargetName=\"OpaqueRect\" Value=\"{Binding HorizontalOffset, ElementName=DropDownScrollViewer}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t\t<Style.Triggers>\r\n\t\t\t<Trigger Property=\"IsEditable\" Value=\"true\">\r\n\t\t\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t\t\t<Setter Property=\"Background\" Value=\"{StaticResource TextBoxBackgroundBrush}\" />\r\n\t\t\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource TextBoxBorderBrush}\" />\r\n\t\t\t\t<Setter Property=\"IsTabStop\" Value=\"false\" />\r\n\t\t\t\t<Setter Property=\"Padding\" Value=\"0\" />\r\n\t\t\t\t<Setter Property=\"Template\" Value=\"{StaticResource ComboBoxEditableTemplate}\" />\r\n\t\t\t</Trigger>\r\n\t\t</Style.Triggers>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  TextBox Style  ********************************* -->\r\n\t<Style x:Key=\"TextBoxStyle\" TargetType=\"TextBox\">\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"FontSize\" Value=\"13.333\" />\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource TextBoxBackgroundBrush}\" />\r\n\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource TextBoxBorderBrush}\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"30\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"6,4\" />\r\n\t\t<Setter Property=\"SelectionBrush\" Value=\"{StaticResource TextBoxFocusedBrush}\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"TextBox\">\r\n\t\t\t\t\t<Grid x:Name=\"RootElement\">\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"BorderBrush\" Storyboard.TargetName=\"Border\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TextBoxHoverBorderBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"Border\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TextBoxHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"DisabledVisualElement\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"ReadOnly\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"ReadOnlyVisualElement\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"FocusStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Focused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"FocusVisualElement\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unfocused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"0\" To=\"0\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"FocusVisualElement\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"ValidationStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Valid\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"InvalidUnfocused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ValidationErrorElement\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"InvalidFocused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ValidationErrorElement\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n                      <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"IsOpen\" Storyboard.TargetName=\"validationTooltip\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t  <DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<System:Boolean>True</System:Boolean>\r\n\t\t\t\t\t\t\t\t\t\t\t  </DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n                      </ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Border x:Name=\"Border\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Opacity=\"1\">\r\n\t\t\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t\t\t<Border x:Name=\"ReadOnlyVisualElement\" Background=\"{StaticResource TextBoxReadOnlyBackgroundBrush}\" Opacity=\"0\" />\r\n\t\t\t\t\t\t\t\t<ScrollViewer x:Name=\"PART_ContentHost\" BorderThickness=\"0\" IsTabStop=\"False\" Padding=\"{TemplateBinding Padding}\" />\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t\t<Border x:Name=\"DisabledVisualElement\" BorderBrush=\"{StaticResource DisabledVisualElement}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{StaticResource DisabledVisualElement}\" IsHitTestVisible=\"False\" Opacity=\"0\" />\r\n\t\t\t\t\t\t<Border x:Name=\"FocusVisualElement\" BorderBrush=\"{StaticResource TextBoxFocusedBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" IsHitTestVisible=\"False\" Opacity=\"0\" />\r\n\t\t\t\t\t\t<Border x:Name=\"ValidationErrorElement\" BorderBrush=\"{StaticResource ValidationErrorElement}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Visibility=\"Collapsed\">\r\n                <ToolTipService.ToolTip>\r\n\t\t\t\t\t\t\t\t<ToolTip x:Name=\"validationTooltip\" DataContext=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Right\" PlacementTarget=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\" Template=\"{StaticResource ValidationToolTipTemplate}\">\r\n\t\t\t\t\t\t\t\t<ToolTip.Triggers>\r\n\t\t\t\t\t\t\t\t\t<EventTrigger RoutedEvent=\"Canvas.Loaded\">\r\n\t\t\t\t\t\t\t\t\t<BeginStoryboard>\r\n\t\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"IsHitTestVisible\" Storyboard.TargetName=\"validationTooltip\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<System:Boolean>true</System:Boolean>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t\t</BeginStoryboard>\r\n\t\t\t\t\t\t\t\t\t</EventTrigger>\r\n\t\t\t\t\t\t\t\t</ToolTip.Triggers>\r\n\t\t\t\t\t\t\t\t</ToolTip>\r\n                </ToolTipService.ToolTip>\r\n\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  ListBox Style  ********************************* -->\r\n\t<Style x:Key=\"ListBoxStyle\" TargetType=\"ListBox\">\r\n\t\t<Setter Property=\"Padding\" Value=\"0\" />\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource ListBoxBackgroundBrush}\" />\r\n\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource ListBoxBorderBrush}\" />\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n\t\t<Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n\t\t<Setter Property=\"IsTabStop\" Value=\"False\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"ItemContainerStyle\" Value=\"{StaticResource ListBoxItemStyle}\" />\r\n\t\t<Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\" />\r\n\t\t<Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"ListBox\">\r\n\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"ValidationStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Valid\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"InvalidUnfocused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ValidationErrorElement\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"InvalidFocused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ValidationErrorElement\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"IsOpen\" Storyboard.TargetName=\"validationTooltip\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<System:Boolean>True</System:Boolean>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Border BorderThickness=\"{TemplateBinding BorderThickness}\" BorderBrush=\"{TemplateBinding BorderBrush}\" Background=\"{TemplateBinding Background}\">\r\n\t\t\t\t\t\t\t<ScrollViewer x:Name=\"ScrollViewer\" BorderThickness=\"0\" Padding=\"{TemplateBinding Padding}\" Style=\"{StaticResource ScrollViewerStyle}\">\r\n\t\t\t\t\t\t\t\t<ItemsPresenter />\r\n\t\t\t\t\t\t\t</ScrollViewer>\r\n\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t\t<Border x:Name=\"ValidationErrorElement\" BorderBrush=\"{StaticResource ValidationErrorElement}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\" Visibility=\"Collapsed\">\r\n\t\t\t\t\t\t\t<ToolTipService.ToolTip>\r\n\t\t\t\t\t\t\t\t<ToolTip x:Name=\"validationTooltip\" DataContext=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Right\" PlacementTarget=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\" Template=\"{StaticResource ValidationToolTipTemplate}\">\r\n\t\t\t\t\t\t\t\t\t<ToolTip.Triggers>\r\n\t\t\t\t\t\t\t\t\t\t<EventTrigger RoutedEvent=\"Canvas.Loaded\">\r\n\t\t\t\t\t\t\t\t\t\t\t<BeginStoryboard>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"IsHitTestVisible\" Storyboard.TargetName=\"validationTooltip\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<System:Boolean>true</System:Boolean>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t\t</BeginStoryboard>\r\n\t\t\t\t\t\t\t\t\t\t</EventTrigger>\r\n\t\t\t\t\t\t\t\t\t</ToolTip.Triggers>\r\n\t\t\t\t\t\t\t\t</ToolTip>\r\n\t\t\t\t\t\t\t</ToolTipService.ToolTip>\r\n\t\t\t\t\t\t\t<Grid Background=\"{StaticResource TransparentBrush}\" HorizontalAlignment=\"Right\" Height=\"10\" Margin=\"0,-4,-4,0\" VerticalAlignment=\"Top\" Width=\"10\">\r\n\t\t\t\t\t\t\t\t<Path Data=\"M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z\" Fill=\"{StaticResource ValidationErrorElement}\" Margin=\"-1,3,0,0\" />\r\n\t\t\t\t\t\t\t\t<Path Data=\"M 0,0 L2,0 L 8,6 L8,8\" Fill=\"{StaticResource LightForegroundBrush}\" Margin=\"-1,3,0,0\" />\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/MetroLight/Theme.Colors.xaml",
    "content": "﻿<ResourceDictionary\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" mc:Ignorable=\"d\">\r\n\r\n    <!-- ********************************** THEME BRUSHES - For Color Tuner **********************************-->\r\n    <SolidColorBrush x:Key=\"Brush01\" Color=\"#FF00AADE\"/>\r\n    <SolidColorBrush x:Key=\"Brush02\" Color=\"White\"/>\r\n    <SolidColorBrush x:Key=\"Brush03\" Color=\"#FFC6C6C6\"/>\r\n    <SolidColorBrush x:Key=\"Brush04\" Color=\"#FF565656\"/>\r\n    <SolidColorBrush x:Key=\"Brush05\" Color=\"#FF333333\"/>\r\n    \r\n    <!-- ********************************** THEME COLORS **********************************-->\r\n    <!--Base Colors-->\t\t\r\n    <Color x:Key=\"Color_000\">#FF282828</Color>\r\n    <Color x:Key=\"Color_001\">#FF3F3F3F</Color>\r\n    <Color x:Key=\"Color_002\">#FF565656</Color>\r\n    <Color x:Key=\"Color_003\">#FF858585</Color>\r\n    <Color x:Key=\"Color_004\">#FFB9B9B9</Color>\r\n    <Color x:Key=\"Color_005\">#FFD7D7D7</Color>\r\n    <Color x:Key=\"Color_006\">#FFE7E7E7</Color>\r\n    <Color x:Key=\"Color_007\">#FFF4F4F4</Color>\r\n    <Color x:Key=\"Color_008\">#FFF9F9F9</Color>\r\n    <Color x:Key=\"Color_009\">#FFFFFFFF</Color>\r\n\t\r\n<!--Transparent and Whites with transparency-->\t\t\r\n    <Color x:Key=\"Color_010\">#E5FFFFFF</Color><!--90% White-->\r\n    <Color x:Key=\"Color_011\">#BFFFFFFF</Color><!--75% White-->\r\n    <Color x:Key=\"Color_012\">#99FFFFFF</Color><!--60% White-->\r\n    <Color x:Key=\"Color_013\">#72FFFFFF</Color><!--45% White-->\r\n    <Color x:Key=\"Color_014\">#4CFFFFFF</Color><!--30% White-->\r\n    <Color x:Key=\"Color_016\">#00FFFFFF</Color><!--0% White-->\r\n\t\t\t\t\t\t\r\n<!--Blacks and grays with transparency-->\t\t\r\n    <Color x:Key=\"Color_018\">#72000000</Color><!--45% Black-->\r\n    <Color x:Key=\"Color_019\">#4C000000</Color><!--30% Black-->\r\n    <Color x:Key=\"Color_020\">#26000000</Color><!--15% Black-->\r\n    <Color x:Key=\"Color_021\">#00000000</Color><!--0% Black-->\r\n    <Color x:Key=\"Color_022\">#66E2E2E2</Color>\r\n\t\r\n<!--Theme Accent colors -->\t\t\r\n    <Color x:Key=\"Color_023\">#FF0086AF</Color>\r\n    <Color x:Key=\"Color_024\">#FF00AADE</Color>\r\n    <Color x:Key=\"Color_025\">#FF80D5EF</Color>\r\n    <Color x:Key=\"Color_026\">#FFB2E1EF</Color>\r\n    <Color x:Key=\"Color_027\">#2600AADE</Color>\r\n\t\r\n<!--Theme Error colors -->\t\t\r\n    <Color x:Key=\"Color_028\">#FFD0284C</Color>\r\n    <Color x:Key=\"Color_029\">#FFF55E7F</Color>\r\n\t<Color x:Key=\"Color_030\">#FFFFCAD5</Color>\r\n\t\r\n<!--Colors for Chart Series-->\t\t\r\n    <Color x:Key=\"Color_035\">#FF006481</Color>\r\n    <Color x:Key=\"Color_037\">#FF8A9B0F</Color>\r\n    <Color x:Key=\"Color_038\">#FF3E4700</Color>\r\n    <Color x:Key=\"Color_040\">#FFF14D0F</Color>\r\n    <Color x:Key=\"Color_041\">#FF8D2E00</Color>\r\n    <Color x:Key=\"Color_043\">#FF81106B</Color>\r\n    <Color x:Key=\"Color_044\">#FF410135</Color>\r\n    <Color x:Key=\"Color_046\">#FFFCA910</Color>\r\n    <Color x:Key=\"Color_047\">#FF8D4902</Color>\r\n    <Color x:Key=\"Color_049\">#FF037A54</Color>\r\n    <Color x:Key=\"Color_050\">#FF003F2A</Color>\r\n    <Color x:Key=\"Color_052\">#FF154D85</Color>\r\n    <Color x:Key=\"Color_053\">#FF02284D</Color>\r\n    <Color x:Key=\"Color_055\">#FF543511</Color>\r\n    <Color x:Key=\"Color_056\">#FF211303</Color>\r\n    <Color x:Key=\"Color_058\">#FF89806D</Color>\r\n    <Color x:Key=\"Color_059\">#FF393225</Color>\r\n    <Color x:Key=\"Color_061\">#FF58458B</Color>\r\n    <Color x:Key=\"Color_062\">#FF211347</Color>\r\n    <Color x:Key=\"Color_063\">#7FB9B9B9</Color>\r\n    <Color x:Key=\"Color_064\">#33565656</Color>\r\n    <Color x:Key=\"Color_065\">#7F3F3F3F</Color>\r\n    <Color x:Key=\"Color_066\">#FF686868</Color>\r\n    <Color x:Key=\"Color_067\">#8000AADE</Color>\r\n    <Color x:Key=\"Color_068\">#CC3F3F3F</Color>\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/MetroLight/Theme.xaml",
    "content": "﻿<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" \r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" \r\n                    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\" \r\n                    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" \r\n                    mc:Ignorable=\"d\">\r\n\r\n\t<!-- *********************************  RESOURCES  ********************************* -->\r\n\t<ResourceDictionary.MergedDictionaries>\r\n\t\t<ResourceDictionary Source=\"Styles.WPF.xaml\" />\r\n        <ResourceDictionary Source=\"Metro.MSControls.Toolkit.Implicit.xaml\" />\r\n\t</ResourceDictionary.MergedDictionaries>\r\n\r\n\t<!-- *********************************  BRUSHES  ********************************* -->\r\n\t<!--  Slider Brushes -->\r\n\t<SolidColorBrush x:Key=\"SliderThumbBackgroundBrush\" Color=\"{StaticResource Color_003}\" />\r\n\t<SolidColorBrush x:Key=\"SliderThumbHoverBackgroundBrush\" Color=\"{StaticResource Color_002}\" />\r\n\t<SolidColorBrush x:Key=\"SliderThumbPressedBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"SliderThumbDisabledBackgroundBrush\" Color=\"{StaticResource Color_005}\" />\r\n\t<SolidColorBrush x:Key=\"SliderTrackDisabledOverlayBackgroundBrush\" Color=\"{StaticResource Color_008}\" />\r\n\t<SolidColorBrush x:Key=\"SliderThumbFocusedBorderBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"SliderTrackBackgroundBrush\" Color=\"{StaticResource Color_005}\" />\r\n\t<SolidColorBrush x:Key=\"SliderSelectionRangeBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\r\n\t<!--  GridSplitter Brushes -->\r\n\t<SolidColorBrush x:Key=\"GridSplitterBackgroundBrush\" Color=\"{StaticResource Color_008}\" />\r\n\t<SolidColorBrush x:Key=\"GridSplitterBorderBrush\" Color=\"{StaticResource Color_004}\" />\r\n\t<SolidColorBrush x:Key=\"GridSplitterHoverBackgroundBrush\" Color=\"{StaticResource Color_006}\" />\r\n\t<SolidColorBrush x:Key=\"GridSplitterHoverBorderBrush\" Color=\"{StaticResource Color_003}\" />\r\n\t<SolidColorBrush x:Key=\"GridSplitterPressedBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"GridSplitterFocusedBorderBrush\" Color=\"{StaticResource Color_024}\" />\r\n\r\n\t<!-- ProgressBar Brushes -->\r\n\t<SolidColorBrush x:Key=\"ProgressBarBackgroundBrush\" Color=\"{StaticResource Color_005}\" />\r\n\t<SolidColorBrush x:Key=\"ProgressBarForegroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<LinearGradientBrush x:Key=\"ProgressBarIndeterminateBackgroundBrush\" EndPoint=\"0,1\" MappingMode=\"Absolute\" SpreadMethod=\"Repeat\" StartPoint=\"20,1\" Opacity=\"0.8\">\r\n\t\t<LinearGradientBrush.Transform>\r\n\t\t\t<TransformGroup>\r\n\t\t\t\t<TranslateTransform X=\"0\" />\r\n\t\t\t\t<SkewTransform AngleX=\"-30\" />\r\n\t\t\t</TransformGroup>\r\n\t\t</LinearGradientBrush.Transform>\r\n\t\t<GradientStop Color=\"{StaticResource Color_023}\" Offset=\"0.249\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_024}\" Offset=\".25\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_024}\" Offset=\"0.75\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_023}\" Offset=\"0.751\" />\r\n\t</LinearGradientBrush>\r\n\r\n\t<!-- Tooltip Brushes -->\r\n\t<SolidColorBrush x:Key=\"TooltipBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"TooltipBorderBrush\" Color=\"{StaticResource Color_004}\" />\r\n\r\n\t<!-- Expander Brushes -->\r\n\t<SolidColorBrush x:Key=\"ExpanderButtonBackgroundBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"ExpanderButtonBorderBrush\" Color=\"{StaticResource Color_004}\" />\r\n\t<SolidColorBrush x:Key=\"ExpanderButtonHoverBackgroundBrush\" Color=\"{StaticResource Color_007}\" />\r\n\t<SolidColorBrush x:Key=\"ExpanderButtonHoverBorderBrush\" Color=\"{StaticResource Color_003}\" />\r\n\t<SolidColorBrush x:Key=\"ExpanderButtonPressedBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"ExpanderButtonPressedBorderBrush\" Color=\"{StaticResource Color_024}\" />\r\n\t<SolidColorBrush x:Key=\"ExpanderArrowHoverBorderBrush\" Color=\"{StaticResource Color_002}\" />\r\n\t<SolidColorBrush x:Key=\"ExpanderArrowPressedBorderBrush\" Color=\"{StaticResource Color_009}\" />\r\n\t<SolidColorBrush x:Key=\"ExpanderDisabledForegroundBrush\" Color=\"{StaticResource Color_007}\" />\r\n\t<SolidColorBrush x:Key=\"ExpanderDisabledBackgroundBrush\" Color=\"{StaticResource Color_007}\" />\r\n\r\n\t<!-- GroupBox Brushes -->\r\n\t<SolidColorBrush x:Key=\"GroupBoxBorderBrush\" Color=\"{StaticResource Color_003}\" />\r\n\r\n\t<!-- PassWordBox Brushes -->\r\n\t<SolidColorBrush x:Key=\"PasswordBoxForegroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\r\n\t<!-- *********************************  TextBlock Style  ********************************* -->\r\n\t<Style x:Key=\"TextBlockStyle\" TargetType=\"TextBlock\">\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"FontSize\" Value=\"13.333\" />\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t</Style>\r\n\r\n\t<!-- *********************************  Label Style  ********************************* -->\r\n\t<Style x:Key=\"LabelStyle\" TargetType=\"{x:Type Label}\">\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"FontSize\" Value=\"13.333\" />\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"IsTabStop\" Value=\"False\" />\r\n\t\t<Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n\t</Style>\r\n\r\n\t<!-- *********************************  SliderRepeatButton Style  ********************************* -->\r\n\t<Style x:Key=\"SliderRepeatButtonStyle\" TargetType=\"{x:Type RepeatButton}\">\r\n\t\t<Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n\t\t<Setter Property=\"Focusable\" Value=\"false\" />\r\n\t\t<Setter Property=\"IsTabStop\" Value=\"false\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n\t\t\t\t\t<Rectangle Fill=\"{StaticResource TransparentBrush}\" />\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  Slider Horizontal Thumb Style  ********************************* -->\r\n\t<Style x:Key=\"HSliderThumbStyle\" TargetType=\"{x:Type Thumb}\">\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource SliderThumbBackgroundBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"12\" />\r\n\t\t<Setter Property=\"MinWidth\" Value=\"8\" />\r\n\t\t<Setter Property=\"IsTabStop\" Value=\"False\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t<Ellipse x:Name=\"ThumbBackground\" Fill=\"{TemplateBinding Background}\" Width=\"16\" Height=\"16\" />\r\n\t\t\t\t\t\t<Ellipse x:Name=\"FocusedVisualElement\" Stroke=\"{StaticResource SliderThumbFocusedBorderBrush}\" Width=\"16\" Height=\"16\" StrokeThickness=\"2\" Opacity=\"0\" />\r\n\t\t\t\t\t\t<Ellipse x:Name=\"DisabledVisualElement\" Fill=\"{StaticResource DisabledVisualElement}\" Width=\"16\" Height=\"16\" Opacity=\"0\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n\t\t\t\t\t\t\t<Setter TargetName=\"ThumbBackground\" Property=\"Fill\" Value=\"{StaticResource SliderThumbHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsMouseCaptured\" Value=\"True\">\r\n\t\t\t\t\t\t\t<Setter TargetName=\"ThumbBackground\" Property=\"Fill\" Value=\"{StaticResource SliderThumbPressedBackgroundBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsEnabled\" Value=\"false\">\r\n\t\t\t\t\t\t\t<Setter TargetName=\"DisabledVisualElement\" Property=\"Opacity\" Value=\"1\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  Slider Vertical Thumb Style  ********************************* -->\r\n\t<Style x:Key=\"VSliderThumbStyle\" TargetType=\"{x:Type Thumb}\">\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource SliderThumbBackgroundBrush}\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"8\" />\r\n\t\t<Setter Property=\"MinWidth\" Value=\"12\" />\r\n\t\t<Setter Property=\"IsTabStop\" Value=\"False\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t<Ellipse x:Name=\"ThumbBackground\" Fill=\"{TemplateBinding Background}\" Width=\"16\" Height=\"16\" />\r\n\t\t\t\t\t\t<Ellipse x:Name=\"FocusedVisualElement\" Stroke=\"{StaticResource SliderThumbFocusedBorderBrush}\" Width=\"16\" Height=\"16\" StrokeThickness=\"2\" Opacity=\"0\" />\r\n\t\t\t\t\t\t<Ellipse x:Name=\"DisabledVisualElement\" Fill=\"{StaticResource DisabledVisualElement}\" Width=\"16\" Height=\"16\" Opacity=\"0\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n\t\t\t\t\t\t\t<Setter TargetName=\"ThumbBackground\" Property=\"Fill\" Value=\"{StaticResource SliderThumbHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsMouseCaptured\" Value=\"True\">\r\n\t\t\t\t\t\t\t<Setter TargetName=\"ThumbBackground\" Property=\"Fill\" Value=\"{StaticResource SliderThumbPressedBackgroundBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsEnabled\" Value=\"false\">\r\n\t\t\t\t\t\t\t<Setter TargetName=\"DisabledVisualElement\" Property=\"Opacity\" Value=\"1\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  Slider Style  ********************************* -->\r\n\t<Style x:Key=\"SliderStyle\" TargetType=\"{x:Type Slider}\">\r\n\t\t<Setter Property=\"Background\" Value=\"Transparent\" />\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"Stylus.IsPressAndHoldEnabled\" Value=\"false\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type Slider}\">\r\n\t\t\t\t\t<Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" SnapsToDevicePixels=\"true\">\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t\t<Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t\t<RowDefinition Height=\"Auto\" />\r\n\t\t\t\t\t\t\t\t<RowDefinition Height=\"Auto\" MinHeight=\"{TemplateBinding MinHeight}\" />\r\n\t\t\t\t\t\t\t\t<RowDefinition Height=\"Auto\" />\r\n\t\t\t\t\t\t\t</Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t<TickBar x:Name=\"TopTick\" Fill=\"{TemplateBinding Foreground}\" Height=\"6\" Placement=\"Top\" Grid.Row=\"0\" Visibility=\"Collapsed\" />\r\n\t\t\t\t\t\t\t<TickBar x:Name=\"BottomTick\" Fill=\"{TemplateBinding Foreground}\" Height=\"6\" Placement=\"Bottom\" Grid.Row=\"2\" Visibility=\"Collapsed\" />\r\n\t\t\t\t\t\t\t<Border x:Name=\"TrackBackground\" Background=\"{StaticResource SliderTrackBackgroundBrush}\" Height=\"6\" Grid.Row=\"1\" VerticalAlignment=\"center\">\r\n\t\t\t\t\t\t\t\t<Canvas Margin=\"-6,-1\">\r\n\t\t\t\t\t\t\t\t\t<Rectangle x:Name=\"PART_SelectionRange\" Fill=\"{StaticResource SliderSelectionRangeBackgroundBrush}\" Height=\"6\" Width=\"0\" Visibility=\"Hidden\" />\r\n\t\t\t\t\t\t\t\t</Canvas>\r\n\t\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t\t\t<Track x:Name=\"PART_Track\" Grid.Row=\"1\">\r\n\t\t\t\t\t\t\t\t<Track.DecreaseRepeatButton>\r\n\t\t\t\t\t\t\t\t\t<RepeatButton Command=\"{x:Static Slider.DecreaseLarge}\" Style=\"{StaticResource SliderRepeatButtonStyle}\" />\r\n\t\t\t\t\t\t\t\t</Track.DecreaseRepeatButton>\r\n\t\t\t\t\t\t\t\t<Track.IncreaseRepeatButton>\r\n\t\t\t\t\t\t\t\t\t<RepeatButton Command=\"{x:Static Slider.IncreaseLarge}\" Style=\"{StaticResource SliderRepeatButtonStyle}\" />\r\n\t\t\t\t\t\t\t\t</Track.IncreaseRepeatButton>\r\n\t\t\t\t\t\t\t\t<Track.Thumb>\r\n\t\t\t\t\t\t\t\t\t<Thumb x:Name=\"Thumb\" Style=\"{StaticResource HSliderThumbStyle}\" />\r\n\t\t\t\t\t\t\t\t</Track.Thumb>\r\n\t\t\t\t\t\t\t</Track>\r\n\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t</Border>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"TickPlacement\" Value=\"TopLeft\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"TopTick\" Value=\"Visible\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Style\" TargetName=\"Thumb\" Value=\"{StaticResource HSliderThumbStyle}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Margin\" TargetName=\"TrackBackground\" Value=\"5,2,5,0\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"TickPlacement\" Value=\"BottomRight\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"BottomTick\" Value=\"Visible\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Style\" TargetName=\"Thumb\" Value=\"{StaticResource HSliderThumbStyle}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Margin\" TargetName=\"TrackBackground\" Value=\"5,0,5,2\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"TickPlacement\" Value=\"Both\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"TopTick\" Value=\"Visible\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"BottomTick\" Value=\"Visible\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsSelectionRangeEnabled\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"PART_SelectionRange\" Value=\"Visible\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Foreground\" TargetName=\"Thumb\" Value=\"{StaticResource SliderThumbFocusedBorderBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t\t<Style.Triggers>\r\n\t\t\t<Trigger Property=\"Orientation\" Value=\"Vertical\">\r\n\t\t\t\t<Setter Property=\"Template\">\r\n\t\t\t\t\t<Setter.Value>\r\n\t\t\t\t\t\t<ControlTemplate TargetType=\"{x:Type Slider}\">\r\n\t\t\t\t\t\t\t<Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" SnapsToDevicePixels=\"true\">\r\n\t\t\t\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t\t\t\t<Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"Auto\" />\r\n\t\t\t\t\t\t\t\t\t\t<ColumnDefinition MinWidth=\"{TemplateBinding MinWidth}\" Width=\"Auto\" />\r\n\t\t\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"Auto\" />\r\n\t\t\t\t\t\t\t\t\t</Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t\t\t<TickBar x:Name=\"TopTick\" Grid.Column=\"0\" Fill=\"{TemplateBinding Foreground}\" Placement=\"Left\" Visibility=\"Collapsed\" Width=\"6\" />\r\n\t\t\t\t\t\t\t\t\t<TickBar x:Name=\"BottomTick\" Grid.Column=\"2\" Fill=\"{TemplateBinding Foreground}\" Placement=\"Right\" Visibility=\"Collapsed\" Width=\"6\" />\r\n\t\t\t\t\t\t\t\t\t<Border x:Name=\"TrackBackground\" Background=\"{StaticResource SliderTrackBackgroundBrush}\" Grid.Column=\"1\" HorizontalAlignment=\"center\" Width=\"6\">\r\n\t\t\t\t\t\t\t\t\t\t<Canvas Margin=\"-1,-6\">\r\n\t\t\t\t\t\t\t\t\t\t\t<Rectangle x:Name=\"PART_SelectionRange\" Fill=\"{StaticResource SliderSelectionRangeBackgroundBrush}\" Visibility=\"Hidden\" Width=\"6\" />\r\n\t\t\t\t\t\t\t\t\t\t</Canvas>\r\n\t\t\t\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t\t\t\t\t<Track x:Name=\"PART_Track\" Grid.Column=\"1\">\r\n\t\t\t\t\t\t\t\t\t\t<Track.DecreaseRepeatButton>\r\n\t\t\t\t\t\t\t\t\t\t\t<RepeatButton Command=\"{x:Static Slider.DecreaseLarge}\" Style=\"{StaticResource SliderRepeatButtonStyle}\" />\r\n\t\t\t\t\t\t\t\t\t\t</Track.DecreaseRepeatButton>\r\n\t\t\t\t\t\t\t\t\t\t<Track.IncreaseRepeatButton>\r\n\t\t\t\t\t\t\t\t\t\t\t<RepeatButton Command=\"{x:Static Slider.IncreaseLarge}\" Style=\"{StaticResource SliderRepeatButtonStyle}\" />\r\n\t\t\t\t\t\t\t\t\t\t</Track.IncreaseRepeatButton>\r\n\t\t\t\t\t\t\t\t\t\t<Track.Thumb>\r\n\t\t\t\t\t\t\t\t\t\t\t<Thumb x:Name=\"Thumb\" Style=\"{StaticResource VSliderThumbStyle}\" />\r\n\t\t\t\t\t\t\t\t\t\t</Track.Thumb>\r\n\t\t\t\t\t\t\t\t\t</Track>\r\n\t\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t\t\t<Trigger Property=\"TickPlacement\" Value=\"TopLeft\">\r\n\t\t\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"TopTick\" Value=\"Visible\" />\r\n\t\t\t\t\t\t\t\t\t<Setter Property=\"Style\" TargetName=\"Thumb\" Value=\"{StaticResource VSliderThumbStyle}\" />\r\n\t\t\t\t\t\t\t\t\t<Setter Property=\"Margin\" TargetName=\"TrackBackground\" Value=\"2,5,0,5\" />\r\n\t\t\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t\t\t<Trigger Property=\"TickPlacement\" Value=\"BottomRight\">\r\n\t\t\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"BottomTick\" Value=\"Visible\" />\r\n\t\t\t\t\t\t\t\t\t<Setter Property=\"Style\" TargetName=\"Thumb\" Value=\"{StaticResource VSliderThumbStyle}\" />\r\n\t\t\t\t\t\t\t\t\t<Setter Property=\"Margin\" TargetName=\"TrackBackground\" Value=\"0,5,2,5\" />\r\n\t\t\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t\t\t<Trigger Property=\"TickPlacement\" Value=\"Both\">\r\n\t\t\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"TopTick\" Value=\"Visible\" />\r\n\t\t\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"BottomTick\" Value=\"Visible\" />\r\n\t\t\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t\t\t<Trigger Property=\"IsSelectionRangeEnabled\" Value=\"true\">\r\n\t\t\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"PART_SelectionRange\" Value=\"Visible\" />\r\n\t\t\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t\t\t<Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n\t\t\t\t\t\t\t\t\t<Setter Property=\"Foreground\" TargetName=\"Thumb\" Value=\"{StaticResource SliderThumbFocusedBorderBrush}\" />\r\n\t\t\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t\t\t</ControlTemplate>\r\n\t\t\t\t\t</Setter.Value>\r\n\t\t\t\t</Setter>\r\n\t\t\t</Trigger>\r\n\t\t</Style.Triggers>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  RepeatButton Style  ********************************* -->\r\n\t<Style x:Key=\"RepeatButtonStyle\" TargetType=\"{x:Type RepeatButton}\">\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"FontSize\" Value=\"14.667\" />\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"10,0,10,2\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"30\" />\r\n\t\t<Setter Property=\"MinWidth\" Value=\"30\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n\t\t\t\t\t<Grid SnapsToDevicePixels=\"True\">\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Bd\" Storyboard.TargetProperty=\"Fill\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Bd\" Storyboard.TargetProperty=\"Stroke\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonHoverBorderBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Pressed\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Bd\" Storyboard.TargetProperty=\"Fill\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonPressedBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Bd\" Storyboard.TargetProperty=\"Stroke\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonPressedBorderBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentControl\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource LightForegroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"DisabledVisualElement\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"FocusStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Focused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"FocusedVisualElement\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unfocused\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Rectangle x:Name=\"Bd\" Fill=\"{StaticResource ButtonBackgroundBrush}\" Stroke=\"{StaticResource ButtonBorderBrush}\" StrokeThickness=\"1\" />\r\n\t\t\t\t\t\t<ContentControl x:Name=\"ContentControl\" Foreground=\"{TemplateBinding Foreground}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\">\r\n\t\t\t\t\t\t\t<ContentPresenter x:Name=\"contentPresenter\" />\r\n\t\t\t\t\t\t</ContentControl>\r\n\t\t\t\t\t\t<Rectangle x:Name=\"FocusedVisualElement\" Stroke=\"{StaticResource ButtonPressedBorderBrush}\" Visibility=\"Collapsed\" StrokeThickness=\"2\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"DisabledVisualElement\" Fill=\"{StaticResource DisabledVisualElement}\" Visibility=\"Collapsed\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- ********************************** GridSplitter Style **********************************-->\r\n\t<Style x:Key=\"GridSplitterStyle\" TargetType=\"{x:Type GridSplitter}\">\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource GridSplitterBackgroundBrush}\" />\r\n\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource GridSplitterBorderBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"SnapsToDevicePixels\" Value=\"True\" />\r\n\t\t<Setter Property=\"PreviewStyle\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<Style TargetType=\"Control\">\r\n\t\t\t\t\t<Setter Property=\"Control.Template\">\r\n\t\t\t\t\t\t<Setter.Value>\r\n\t\t\t\t\t\t\t<ControlTemplate>\r\n\t\t\t\t\t\t\t\t<Rectangle Fill=\"{StaticResource GridSplitterPressedBackgroundBrush}\" Opacity=\"0.8\" />\r\n\t\t\t\t\t\t\t</ControlTemplate>\r\n\t\t\t\t\t\t</Setter.Value>\r\n\t\t\t\t\t</Setter>\r\n\t\t\t\t</Style>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate>\r\n\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t<Border x:Name=\"border\" BorderThickness=\"{TemplateBinding BorderThickness}\" BorderBrush=\"{TemplateBinding BorderBrush}\" Background=\"{TemplateBinding Background}\" MinHeight=\"8\" MinWidth=\"8\">\r\n\t\t\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t\t\t<StackPanel x:Name=\"HGrip\" Height=\"8\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Orientation=\"Vertical\">\r\n\t\t\t\t\t\t\t\t\t<Rectangle Fill=\"{StaticResource GlyphBackgroundBrush}\" Height=\"1\" Margin=\"1,2,1,1\" StrokeThickness=\"0\" Width=\"20\" />\r\n\t\t\t\t\t\t\t\t\t<Rectangle Fill=\"{StaticResource GlyphBackgroundBrush}\" Height=\"1\" Margin=\"1,1,1,2\" StrokeThickness=\"0\" Width=\"20\" />\r\n\t\t\t\t\t\t\t\t</StackPanel>\r\n\t\t\t\t\t\t\t\t<StackPanel x:Name=\"VGrip\" Width=\"8\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Orientation=\"Horizontal\" Visibility=\"Collapsed\">\r\n\t\t\t\t\t\t\t\t\t<Rectangle Fill=\"{StaticResource GlyphBackgroundBrush}\" Height=\"20\" Margin=\"2,1,1,1\" StrokeThickness=\"0\" Width=\"1\" />\r\n\t\t\t\t\t\t\t\t\t<Rectangle Fill=\"{StaticResource GlyphBackgroundBrush}\" Height=\"20\" Margin=\"1,1,2,1\" StrokeThickness=\"0\" Width=\"1\" />\r\n\t\t\t\t\t\t\t\t</StackPanel>\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"HorizontalAlignment\" Value=\"Stretch\">\r\n\t\t\t\t\t\t\t<Setter TargetName=\"HGrip\" Property=\"Visibility\" Value=\"Visible\" />\r\n\t\t\t\t\t\t\t<Setter TargetName=\"VGrip\" Property=\"Visibility\" Value=\"Collapsed\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"VerticalAlignment\" Value=\"Stretch\">\r\n\t\t\t\t\t\t\t<Setter TargetName=\"VGrip\" Property=\"Visibility\" Value=\"Visible\" />\r\n\t\t\t\t\t\t\t<Setter TargetName=\"HGrip\" Property=\"Visibility\" Value=\"Collapsed\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n\t\t\t\t\t\t\t<Setter TargetName=\"border\" Property=\"Background\" Value=\"{StaticResource GridSplitterHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t<Setter TargetName=\"border\" Property=\"BorderBrush\" Value=\"{StaticResource GridSplitterHoverBorderBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsFocused\" Value=\"True\">\r\n\t\t\t\t\t\t\t<Setter TargetName=\"border\" Property=\"BorderBrush\" Value=\"{StaticResource GridSplitterFocusedBorderBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- ********************************** ProgressBar Style **********************************-->\r\n\t<Style x:Key=\"ProgressBarStyle\" TargetType=\"{x:Type ProgressBar}\">\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ProgressBarForegroundBrush}\" />\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource ProgressBarBackgroundBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"0\" />\r\n\t\t<Setter Property=\"Height\" Value=\"6\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type ProgressBar}\">\r\n\t\t\t\t\t<Grid x:Name=\"TemplateRoot\" SnapsToDevicePixels=\"true\">\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Determinate\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Indeterminate\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard RepeatBehavior=\"Forever\">\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation Duration=\"00:00:.5\" From=\"0\" To=\"20\" Storyboard.TargetProperty=\"(Shape.Fill).(LinearGradientBrush.Transform).(TransformGroup.Children)[0].X\" Storyboard.TargetName=\"IndeterminateGradientFill\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Border x:Name=\"ProgressBarTrack\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"PART_Track\" Margin=\"{TemplateBinding BorderThickness}\" />\r\n\t\t\t\t\t\t<Decorator x:Name=\"PART_Indicator\" HorizontalAlignment=\"Left\" Margin=\"{TemplateBinding BorderThickness}\">\r\n\t\t\t\t\t\t\t<Grid x:Name=\"Foreground\">\r\n\t\t\t\t\t\t\t\t<Rectangle x:Name=\"Indicator\" Fill=\"{TemplateBinding Foreground}\" />\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t</Decorator>\r\n\t\t\t\t\t\t<Grid x:Name=\"IndeterminateRoot\" Visibility=\"Collapsed\">\r\n\t\t\t\t\t\t\t<Rectangle x:Name=\"IndeterminateSolidFill\" Fill=\"{TemplateBinding Foreground}\" Margin=\"{TemplateBinding BorderThickness}\" Opacity=\"1\" RenderTransformOrigin=\"0.5,0.5\" StrokeThickness=\"0\" />\r\n\t\t\t\t\t\t\t<Rectangle x:Name=\"IndeterminateGradientFill\" Fill=\"{StaticResource ProgressBarIndeterminateBackgroundBrush}\" Margin=\"{TemplateBinding BorderThickness}\" StrokeThickness=\"1\" />\r\n\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"Orientation\" Value=\"Vertical\">\r\n\t\t\t\t\t\t\t<Setter Property=\"LayoutTransform\" TargetName=\"TemplateRoot\">\r\n\t\t\t\t\t\t\t\t<Setter.Value>\r\n\t\t\t\t\t\t\t\t\t<RotateTransform Angle=\"-90\" />\r\n\t\t\t\t\t\t\t\t</Setter.Value>\r\n\t\t\t\t\t\t\t</Setter>\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsIndeterminate\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"Indicator\" Value=\"Collapsed\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"IndeterminateRoot\" Value=\"Visible\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsIndeterminate\" Value=\"false\">\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- ********************************** PasswordBox Style **********************************-->\r\n\t<Style x:Key=\"PasswordBoxStyle\" TargetType=\"{x:Type PasswordBox}\">\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"FontSize\" Value=\"13.333\" />\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource PasswordBoxForegroundBrush}\" />\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource TextBoxBackgroundBrush}\" />\r\n\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource TextBoxBorderBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"6,4\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"30\" />\r\n\t\t<Setter Property=\"SelectionBrush\" Value=\"{StaticResource TextBoxFocusedBrush}\" />\r\n\t\t<Setter Property=\"PasswordChar\" Value=\"●\" />\r\n\t\t<Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\" />\r\n\t\t<Setter Property=\"AllowDrop\" Value=\"true\" />\r\n\t\t<Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\" />\r\n\t\t<Setter Property=\"ScrollViewer.PanningMode\" Value=\"VerticalFirst\" />\r\n\t\t<Setter Property=\"Stylus.IsFlicksEnabled\" Value=\"False\" />\r\n\t\t<Setter Property=\"FlowDirection\" Value=\"LeftToRight\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type PasswordBox}\">\r\n\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t<Border Background=\"{TemplateBinding Background}\" x:Name=\"Bd\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" />\r\n\t\t\t\t\t\t<Border x:Name=\"DisabledVisualElement\" BorderBrush=\"{StaticResource DisabledVisualElement}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{StaticResource DisabledVisualElement}\" IsHitTestVisible=\"False\" Opacity=\"0\" />\r\n\t\t\t\t\t\t<Border x:Name=\"ReadOnlyVisualElement\" Background=\"{StaticResource TextBoxReadOnlyBackgroundBrush}\" Opacity=\"0\" />\r\n\t\t\t\t\t\t<Border>\r\n\t\t\t\t\t\t\t<ScrollViewer x:Name=\"PART_ContentHost\" />\r\n\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"IsEnabled\" Value=\"False\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Opacity\" Value=\"1\" TargetName=\"DisabledVisualElement\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n\t\t\t\t\t\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource TextBoxHoverBorderBrush}\" TargetName=\"Bd\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsFocused\" Value=\"True\">\r\n\t\t\t\t\t\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource TextBoxFocusedBrush}\" TargetName=\"Bd\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<MultiDataTrigger>\r\n\t\t\t\t\t\t\t<MultiDataTrigger.Conditions>\r\n\t\t\t\t\t\t\t\t<Condition Binding=\"{Binding IsReadOnly, RelativeSource={RelativeSource Self}}\" Value=\"True\" />\r\n\t\t\t\t\t\t\t\t<Condition Binding=\"{Binding IsEnabled, RelativeSource={RelativeSource Self}}\" Value=\"True\" />\r\n\t\t\t\t\t\t\t</MultiDataTrigger.Conditions>\r\n\t\t\t\t\t\t\t<Setter Property=\"Opacity\" Value=\"1\" TargetName=\"ReadOnlyVisualElement\" />\r\n\t\t\t\t\t\t</MultiDataTrigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  ToolTip Style  ********************************* -->\r\n\t<Style x:Key=\"{x:Type ToolTip}\" TargetType=\"ToolTip\">\r\n\t\t<Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"FontSize\" Value=\"14.667\" />\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource TooltipBackgroundBrush}\" />\r\n\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource TooltipBorderBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"10,7\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"ToolTip\">\r\n\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t<Rectangle Stroke=\"{TemplateBinding BorderBrush}\" Fill=\"{TemplateBinding Background}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" />\r\n\t\t\t\t\t\t<StackPanel Orientation=\"Horizontal\" d:LayoutOverrides=\"Width, Height\">\r\n\t\t\t\t\t\t\t<ContentPresenter Margin=\"{TemplateBinding Padding}\" Content=\"{TemplateBinding Content}\" />\r\n\t\t\t\t\t\t</StackPanel>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  Expander Right Style  ********************************* -->\r\n\t<Style x:Key=\"ExpanderRightHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n\t\t\t\t\t<Border Padding=\"{TemplateBinding Padding}\">\r\n\t\t\t\t\t\t<Grid Background=\"{StaticResource TransparentBrush}\" SnapsToDevicePixels=\"False\">\r\n\t\t\t\t\t\t\t<Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t\t<RowDefinition Height=\"30\" />\r\n\t\t\t\t\t\t\t\t<RowDefinition Height=\"*\" />\r\n\t\t\t\t\t\t\t</Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t\t\t<Grid.LayoutTransform>\r\n\t\t\t\t\t\t\t\t\t<TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t<TransformGroup.Children>\r\n\t\t\t\t\t\t\t\t\t\t\t<TransformCollection>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<RotateTransform Angle=\"-90\" />\r\n\t\t\t\t\t\t\t\t\t\t\t</TransformCollection>\r\n\t\t\t\t\t\t\t\t\t\t</TransformGroup.Children>\r\n\t\t\t\t\t\t\t\t\t</TransformGroup>\r\n\t\t\t\t\t\t\t\t</Grid.LayoutTransform>\r\n\t\t\t\t\t\t\t\t<Rectangle x:Name=\"rectangle\" Width=\"30\" Height=\"30\" Fill=\"{StaticResource ExpanderButtonBackgroundBrush}\" HorizontalAlignment=\"Center\" Stroke=\"{StaticResource ExpanderButtonBorderBrush}\" VerticalAlignment=\"Center\" />\r\n\t\t\t\t\t\t\t\t<Path x:Name=\"arrow\" Width=\"10\" Height=\"6\" Fill=\"{StaticResource GlyphBackgroundBrush}\" Data=\"F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z \" Stretch=\"Fill\" RenderTransformOrigin=\"0.5, 0.5\" />\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t\t<ContentPresenter HorizontalAlignment=\"Center\" Margin=\"0,4,0,0\" Grid.Row=\"1\" RecognizesAccessKey=\"True\" SnapsToDevicePixels=\"True\" VerticalAlignment=\"Stretch\" />\r\n\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t</Border>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"IsChecked\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Data\" TargetName=\"arrow\" Value=\"M3.4,-4.4 L6.8,3.9 3.9566912E-07,3.9 z\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Stroke\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonHoverBorderBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"arrow\" Value=\"{StaticResource ExpanderArrowHoverBorderBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsPressed\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonPressedBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Stroke\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonPressedBorderBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"arrow\" Value=\"{StaticResource ExpanderArrowPressedBorderBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  Expander Up Style  ********************************* -->\r\n\t<Style x:Key=\"ExpanderUpHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n\t\t\t\t\t<Border Padding=\"{TemplateBinding Padding}\">\r\n\t\t\t\t\t\t<Grid Background=\"{StaticResource TransparentBrush}\" SnapsToDevicePixels=\"False\">\r\n\t\t\t\t\t\t\t<Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"30\" />\r\n\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"*\" />\r\n\t\t\t\t\t\t\t</Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t\t\t<Grid.LayoutTransform>\r\n\t\t\t\t\t\t\t\t\t<TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t<TransformGroup.Children>\r\n\t\t\t\t\t\t\t\t\t\t\t<TransformCollection>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<RotateTransform Angle=\"180\" />\r\n\t\t\t\t\t\t\t\t\t\t\t</TransformCollection>\r\n\t\t\t\t\t\t\t\t\t\t</TransformGroup.Children>\r\n\t\t\t\t\t\t\t\t\t</TransformGroup>\r\n\t\t\t\t\t\t\t\t</Grid.LayoutTransform>\r\n\t\t\t\t\t\t\t\t<Rectangle x:Name=\"rectangle\" Width=\"30\" Height=\"30\" Fill=\"{StaticResource ExpanderButtonBackgroundBrush}\" HorizontalAlignment=\"Center\" Stroke=\"{StaticResource ExpanderButtonBorderBrush}\" VerticalAlignment=\"Center\" />\r\n\t\t\t\t\t\t\t\t<Path x:Name=\"arrow\" Width=\"10\" Height=\"6\" Fill=\"{StaticResource GlyphBackgroundBrush}\" Data=\"F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z \" Stretch=\"Fill\" RenderTransformOrigin=\"0.5, 0.5\" />\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t\t<ContentPresenter Grid.Column=\"1\" HorizontalAlignment=\"Stretch\" Margin=\"4,0,0,0\" RecognizesAccessKey=\"True\" SnapsToDevicePixels=\"True\" VerticalAlignment=\"Center\" />\r\n\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t</Border>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"IsChecked\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Data\" TargetName=\"arrow\" Value=\"M3.4,-4.4 L6.8,3.9 3.9566912E-07,3.9 z\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Stroke\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonHoverBorderBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"arrow\" Value=\"{StaticResource ExpanderArrowHoverBorderBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsPressed\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonPressedBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Stroke\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonPressedBorderBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"arrow\" Value=\"{StaticResource ExpanderArrowPressedBorderBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  Expander Left Style  ********************************* -->\r\n\t<Style x:Key=\"ExpanderLeftHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n\t\t\t\t\t<Border Padding=\"{TemplateBinding Padding}\">\r\n\t\t\t\t\t\t<Grid Background=\"{StaticResource TransparentBrush}\" SnapsToDevicePixels=\"False\">\r\n\t\t\t\t\t\t\t<Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t\t<RowDefinition Height=\"30\" />\r\n\t\t\t\t\t\t\t\t<RowDefinition Height=\"*\" />\r\n\t\t\t\t\t\t\t</Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t\t\t<Grid.LayoutTransform>\r\n\t\t\t\t\t\t\t\t\t<TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t<TransformGroup.Children>\r\n\t\t\t\t\t\t\t\t\t\t\t<TransformCollection>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<RotateTransform Angle=\"90\" />\r\n\t\t\t\t\t\t\t\t\t\t\t</TransformCollection>\r\n\t\t\t\t\t\t\t\t\t\t</TransformGroup.Children>\r\n\t\t\t\t\t\t\t\t\t</TransformGroup>\r\n\t\t\t\t\t\t\t\t</Grid.LayoutTransform>\r\n\t\t\t\t\t\t\t\t<Rectangle x:Name=\"rectangle\" Width=\"30\" Height=\"30\" Fill=\"{StaticResource ExpanderButtonBackgroundBrush}\" HorizontalAlignment=\"Center\" Stroke=\"{StaticResource ExpanderButtonBorderBrush}\" VerticalAlignment=\"Center\" />\r\n\t\t\t\t\t\t\t\t<Path x:Name=\"arrow\" Width=\"10\" Height=\"6\" Fill=\"{StaticResource GlyphBackgroundBrush}\" Data=\"F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z \" Stretch=\"Fill\" RenderTransformOrigin=\"0.5, 0.5\" />\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t\t<ContentPresenter Grid.Row=\"1\" HorizontalAlignment=\"Center\" Margin=\"0,4,0,0\" RecognizesAccessKey=\"True\" SnapsToDevicePixels=\"True\" VerticalAlignment=\"Stretch\" />\r\n\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t</Border>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"IsChecked\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Data\" TargetName=\"arrow\" Value=\"M3.4,-4.4 L6.8,3.9 3.9566912E-07,3.9 z\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Stroke\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonHoverBorderBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"arrow\" Value=\"{StaticResource ExpanderArrowHoverBorderBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsPressed\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonPressedBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Stroke\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonPressedBorderBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"arrow\" Value=\"{StaticResource ExpanderArrowPressedBorderBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  Expander Down Style  ********************************* -->\r\n\t<Style x:Key=\"ExpanderDownHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n\t\t\t\t\t<Border Padding=\"{TemplateBinding Padding}\">\r\n\t\t\t\t\t\t<Grid Background=\"{StaticResource TransparentBrush}\" SnapsToDevicePixels=\"False\">\r\n\t\t\t\t\t\t\t<Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"30\" />\r\n\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"*\" />\r\n\t\t\t\t\t\t\t</Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t<Rectangle x:Name=\"rectangle\" Width=\"30\" Height=\"30\" Fill=\"{StaticResource ExpanderButtonBackgroundBrush}\" HorizontalAlignment=\"Center\" Stroke=\"{StaticResource ExpanderButtonBorderBrush}\" VerticalAlignment=\"Center\" />\r\n\t\t\t\t\t\t\t<Path x:Name=\"arrow\" Width=\"10\" Height=\"6\" Fill=\"{StaticResource GlyphBackgroundBrush}\" Data=\"F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z \" Stretch=\"Fill\" RenderTransformOrigin=\"0.5, 0.5\" />\r\n\t\t\t\t\t\t\t<ContentPresenter Grid.Column=\"1\" HorizontalAlignment=\"Stretch\" Margin=\"4,0,0,0\" RecognizesAccessKey=\"True\" SnapsToDevicePixels=\"True\" VerticalAlignment=\"Center\" />\r\n\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t</Border>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"IsChecked\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Data\" TargetName=\"arrow\" Value=\"M3.4,-4.4 L6.8,3.9 3.9566912E-07,3.9 z\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Stroke\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonHoverBorderBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"arrow\" Value=\"{StaticResource ExpanderArrowHoverBorderBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsPressed\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonPressedBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Stroke\" TargetName=\"rectangle\" Value=\"{StaticResource ExpanderButtonPressedBorderBrush}\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Fill\" TargetName=\"arrow\" Value=\"{StaticResource ExpanderArrowPressedBorderBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  Expander Style  ********************************* -->\r\n\t<Style x:Key=\"ExpanderStyle\" TargetType=\"{x:Type Expander}\">\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"FontSize\" Value=\"14.667\" />\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n\t\t<Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type Expander}\">\r\n\t\t\t\t\t<Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" CornerRadius=\"3\" SnapsToDevicePixels=\"true\">\r\n\t\t\t\t\t\t<DockPanel>\r\n\t\t\t\t\t\t\t<ToggleButton x:Name=\"HeaderSite\" ContentTemplate=\"{TemplateBinding HeaderTemplate}\" ContentTemplateSelector=\"{TemplateBinding HeaderTemplateSelector}\" Content=\"{TemplateBinding Header}\" DockPanel.Dock=\"Top\" Foreground=\"{TemplateBinding Foreground}\" FontWeight=\"{TemplateBinding FontWeight}\" FontStyle=\"{TemplateBinding FontStyle}\" FontStretch=\"{TemplateBinding FontStretch}\" FontSize=\"{TemplateBinding FontSize}\" FontFamily=\"{TemplateBinding FontFamily}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" IsChecked=\"{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" Margin=\"1\" MinWidth=\"0\" MinHeight=\"0\" Padding=\"{TemplateBinding Padding}\" Style=\"{StaticResource ExpanderDownHeaderStyle}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\" />\r\n\t\t\t\t\t\t\t<ContentPresenter x:Name=\"ExpandSite\" DockPanel.Dock=\"Bottom\" Focusable=\"false\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" Visibility=\"Collapsed\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" />\r\n\t\t\t\t\t\t</DockPanel>\r\n\t\t\t\t\t</Border>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"IsExpanded\" Value=\"true\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Visibility\" TargetName=\"ExpandSite\" Value=\"Visible\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"ExpandDirection\" Value=\"Right\">\r\n\t\t\t\t\t\t\t<Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Right\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Left\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Style\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderRightHeaderStyle}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"ExpandDirection\" Value=\"Up\">\r\n\t\t\t\t\t\t\t<Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Top\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Bottom\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Style\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderUpHeaderStyle}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"ExpandDirection\" Value=\"Left\">\r\n\t\t\t\t\t\t\t<Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Left\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Right\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Style\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderLeftHeaderStyle}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsEnabled\" Value=\"false\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ExpanderDisabledForegroundBrush}\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  ToggleButton Style  ********************************* -->\r\n\t<Style x:Key=\"ToggleButtonStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"FontSize\" Value=\"14.667\" />\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"10,0,10,2\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"30\" />\r\n\t\t<Setter Property=\"MinWidth\" Value=\"30\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Bd\" Storyboard.TargetProperty=\"Fill\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonHoverBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Bd\" Storyboard.TargetProperty=\"Stroke\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonHoverBorderBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Pressed\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Bd\" Storyboard.TargetProperty=\"Fill\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonPressedBackgroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Bd\" Storyboard.TargetProperty=\"Stroke\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonPressedBorderBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentControl\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource LightForegroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"DisabledVisualElement\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CheckStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Checked\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"checked\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Foreground\" Storyboard.TargetName=\"ContentControl\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource LightForegroundBrush}\" />\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unchecked\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Indeterminate\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"FocusStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Focused\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"FocusedVisualElement\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Visible</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unfocused\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Rectangle x:Name=\"Bd\" Fill=\"{StaticResource ButtonBackgroundBrush}\" Stroke=\"{StaticResource ButtonBorderBrush}\" StrokeThickness=\"1\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"checked\" Fill=\"{StaticResource ButtonPressedBackgroundBrush}\" Stroke=\"{StaticResource ButtonPressedBorderBrush}\" StrokeThickness=\"1\" Visibility=\"Collapsed\" />\r\n\t\t\t\t\t\t<ContentControl x:Name=\"ContentControl\" Foreground=\"{TemplateBinding Foreground}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\">\r\n\t\t\t\t\t\t\t<ContentPresenter x:Name=\"contentPresenter\" />\r\n\t\t\t\t\t\t</ContentControl>\r\n\t\t\t\t\t\t<Rectangle x:Name=\"FocusedVisualElement\" Stroke=\"{StaticResource ButtonPressedBorderBrush}\" Visibility=\"Collapsed\" StrokeThickness=\"2\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"DisabledVisualElement\" Fill=\"{StaticResource DisabledVisualElement}\" Visibility=\"Collapsed\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  GroupBox Style  ********************************* -->\r\n\t<BorderGapMaskConverter x:Key=\"BorderGapMaskConverter\" />\r\n\t<Style x:Key=\"GroupBoxStyle\" TargetType=\"{x:Type GroupBox}\">\r\n\t\t<Setter Property=\"FontFamily\" Value=\"Segoe UI\" />\r\n\t\t<Setter Property=\"FontSize\" Value=\"14.667\" />\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource GroupBoxBorderBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"5 7\" />\r\n\t\t<Setter Property=\"SnapsToDevicePixels\" Value=\"True\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type GroupBox}\">\r\n\t\t\t\t\t<Grid SnapsToDevicePixels=\"true\">\r\n\t\t\t\t\t\t<Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t<ColumnDefinition Width=\"6\" />\r\n\t\t\t\t\t\t\t<ColumnDefinition Width=\"Auto\" />\r\n\t\t\t\t\t\t\t<ColumnDefinition Width=\"*\" />\r\n\t\t\t\t\t\t\t<ColumnDefinition Width=\"6\" />\r\n\t\t\t\t\t\t</Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t<Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t<RowDefinition Height=\"Auto\" />\r\n\t\t\t\t\t\t\t<RowDefinition Height=\"Auto\" />\r\n\t\t\t\t\t\t\t<RowDefinition Height=\"*\" />\r\n\t\t\t\t\t\t\t<RowDefinition Height=\"6\" />\r\n\t\t\t\t\t\t</Grid.RowDefinitions>\r\n\t\t\t\t\t\t<Border BorderBrush=\"{StaticResource TransparentBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Grid.ColumnSpan=\"4\" Grid.Column=\"0\" Grid.Row=\"1\" Grid.RowSpan=\"3\" />\r\n\t\t\t\t\t\t<Border x:Name=\"Header\" Grid.Column=\"1\" Padding=\"10,5,10,0\" Grid.Row=\"0\" Grid.RowSpan=\"2\">\r\n\t\t\t\t\t\t\t<ContentPresenter ContentSource=\"Header\" Height=\"30\" RecognizesAccessKey=\"True\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" />\r\n\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t\t<ContentPresenter Grid.ColumnSpan=\"2\" Grid.Column=\"1\" Margin=\"{TemplateBinding Padding}\" Grid.Row=\"2\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" />\r\n\t\t\t\t\t\t<Border Grid.ColumnSpan=\"4\" Grid.Row=\"1\" Grid.RowSpan=\"3\">\r\n\t\t\t\t\t\t\t<Border.OpacityMask>\r\n\t\t\t\t\t\t\t\t<MultiBinding ConverterParameter=\"7\" Converter=\"{StaticResource BorderGapMaskConverter}\">\r\n\t\t\t\t\t\t\t\t\t<Binding ElementName=\"Header\" Path=\"ActualWidth\" />\r\n\t\t\t\t\t\t\t\t\t<Binding Path=\"ActualWidth\" RelativeSource=\"{RelativeSource Self}\" />\r\n\t\t\t\t\t\t\t\t\t<Binding Path=\"ActualHeight\" RelativeSource=\"{RelativeSource Self}\" />\r\n\t\t\t\t\t\t\t\t</MultiBinding>\r\n\t\t\t\t\t\t\t</Border.OpacityMask>\r\n\t\t\t\t\t\t\t<Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\">\r\n\t\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n    \r\n    <!--********************** Implicit Styles *********************** -->\r\n    <Style BasedOn=\"{StaticResource ButtonStyle}\" TargetType=\"{x:Type Button}\" />\r\n    <Style BasedOn=\"{StaticResource ScrollBarStyle}\" TargetType=\"{x:Type ScrollBar}\" />\r\n    <Style BasedOn=\"{StaticResource ScrollViewerStyle}\" TargetType=\"{x:Type ScrollViewer}\" />\r\n    <Style BasedOn=\"{StaticResource ComboBoxStyle}\" TargetType=\"{x:Type ComboBox}\" />\r\n    <Style BasedOn=\"{StaticResource ComboBoxItemStyle}\" TargetType=\"{x:Type ComboBoxItem}\" />\r\n    <Style BasedOn=\"{StaticResource TextBoxStyle}\" TargetType=\"{x:Type TextBox}\" />\r\n    <Style BasedOn=\"{StaticResource ListBoxStyle}\" TargetType=\"{x:Type ListBox}\" />\r\n    <Style BasedOn=\"{StaticResource ListBoxItemStyle}\" TargetType=\"{x:Type ListBoxItem}\" />\r\n    <Style BasedOn=\"{StaticResource CheckBoxStyle}\" TargetType=\"{x:Type CheckBox}\" />\r\n    <Style BasedOn=\"{StaticResource RadioButtonStyle}\" TargetType=\"{x:Type RadioButton}\" />\r\n    <Style BasedOn=\"{StaticResource LabelStyle}\" TargetType=\"{x:Type Label}\" />\r\n    <Style BasedOn=\"{StaticResource SliderStyle}\" TargetType=\"{x:Type Slider}\" />\r\n    <Style BasedOn=\"{StaticResource RepeatButtonStyle}\" TargetType=\"{x:Type RepeatButton}\" />\r\n    <Style BasedOn=\"{StaticResource GridSplitterStyle}\" TargetType=\"{x:Type GridSplitter}\" />\r\n    <Style BasedOn=\"{StaticResource ProgressBarStyle}\" TargetType=\"{x:Type ProgressBar}\" />\r\n    <Style BasedOn=\"{StaticResource PasswordBoxStyle}\" TargetType=\"{x:Type PasswordBox}\" />\r\n    <Style BasedOn=\"{StaticResource ExpanderStyle}\" TargetType=\"{x:Type Expander}\" />\r\n    <Style BasedOn=\"{StaticResource ToggleButtonStyle}\" TargetType=\"{x:Type ToggleButton}\" />\r\n    <Style BasedOn=\"{StaticResource GroupBoxStyle}\" TargetType=\"{x:Type GroupBox}\" />\r\n\t\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/MoonUICore/Theme.xaml",
    "content": "﻿<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n                    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n                    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n                    mc:Ignorable=\"d\">\r\n\r\n\r\n    <Color x:Key=\"Fill_active_top\">#FF8FC1E5</Color>\r\n    <Brush x:Key=\"Fill_active_top_\">#FF8FC1E5</Brush>\r\n    <Color x:Key=\"Fill_active_bottom\">#FF6bacdd</Color>\r\n    <Color x:Key=\"Fill_active_bottom_dark\">#FF5699cc</Color>\r\n    <Color x:Key=\"Stroke_active_top\">#FF5cace8</Color>\r\n    <Color x:Key=\"Stroke_active_bottom\">#FF3c95d7</Color>\r\n    <Color x:Key=\"Stroke_active_light\">#FFb3d4ec</Color>\r\n\r\n    <Color x:Key=\"Fill_orange_normal_top\">#FFf2b50e</Color>\r\n    <Color x:Key=\"Fill_orange_normal_bottom\">#FFefa307</Color>\r\n    <Color x:Key=\"Fill_orange_over_bottom\">#FFe09707</Color>\r\n    <Color x:Key=\"Stroke_orange_top\">#FFf0a808</Color>\r\n    <Color x:Key=\"Stroke_orange_bottom\">#FFd38d03</Color>\r\n    <Color x:Key=\"Stroke_orange_light\">#FFffd566</Color>\r\n\r\n    <Color x:Key=\"Fill_normal_top\">#FFF9F9F9</Color>\r\n    <Color x:Key=\"Fill_normal_bottom\">#FFE9E9E9</Color>\r\n    <Color x:Key=\"BorderStroke_top\">#FFCACACA</Color>\r\n    <Color x:Key=\"BorderStroke_bottom\">#FFAFAFAF</Color>\r\n    <Color x:Key=\"Fill_over_top\">#FFDBDBDB</Color>\r\n    <Color x:Key=\"Fill_over_bottom\">#FFF6F6F6</Color>\r\n    <Color x:Key=\"Fill_pressed_light\">#FF6D6D6D</Color>\r\n    <Color x:Key=\"Fill_pressed_dark\">#FF545454</Color>\r\n    <Brush x:Key=\"Fill_pressed_light_\">#FF6D6D6D</Brush>\r\n    <Brush x:Key=\"Fill_pressed_dark_\">#FF545454</Brush>\r\n\r\n    <Brush x:Key=\"Shadow_first_color\">#19000000</Brush>\r\n    <Brush x:Key=\"Shadow_second_color\">#0C000000</Brush>\r\n\r\n    <Color x:Key=\"CheckBox_main_color\">#FFd7d7d7</Color>\r\n    <Brush x:Key=\"CheckBox_main_color_\">#FFd7d7d7</Brush>\r\n    <Color x:Key=\"CheckBox_stroke_color\">#FFbababa</Color>\r\n    <Brush x:Key=\"CheckBox_stroke_color_\">#FFbababa</Brush>\r\n    <Color x:Key=\"CheckBox_fill_top\">#FFfafafa</Color>\r\n    <Color x:Key=\"CheckBox_fill_bottom\">#FFe9e9e9</Color>\r\n    <Brush x:Key=\"CheckBox_fill_bottom_\">#FFe9e9e9</Brush>\r\n\r\n    <Color x:Key=\"TextBox_fill\">#FFeeeeee</Color>\r\n    <Brush x:Key=\"TextBox_fill_\">#FFeeeeee</Brush>\r\n\r\n    <Color x:Key=\"Text_dark\">#FF515151</Color>\r\n    <Brush x:Key=\"Text_dark_\">#FF515151</Brush>\r\n    <Brush x:Key=\"Text_light_\">#FFFFFFFF</Brush>\r\n    <Brush x:Key=\"Text_disabled_\">#80000000</Brush>\r\n\r\n    <Style TargetType=\"{x:Type Button}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"Height\" Value=\"36\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Button}\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"rectangle\"\r\n                                                        Storyboard.TargetProperty=\"Fill.GradientStops[1].Color\"\r\n                                                        To=\"{StaticResource Fill_pressed_light}\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"rectangle\"\r\n                                                        Storyboard.TargetProperty=\"Fill.GradientStops[0].Color\"\r\n                                                        To=\"{StaticResource Fill_pressed_dark}\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <DoubleAnimation Duration=\"0\"\r\n                                                         Storyboard.TargetName=\"rectangle\"\r\n                                                         Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Offset)\"\r\n                                                         To=\"0.239\"\r\n                                                         d:IsOptimized=\"True\" />\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"rectangle\" Storyboard.TargetProperty=\"(Shape.Stroke)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Null}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"textBlock\"\r\n                                                        Storyboard.TargetProperty=\"(TextBlock.Foreground).Color\"\r\n                                                        To=\"White\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"textBlock1\"\r\n                                                        Storyboard.TargetProperty=\"(TextBlock.Foreground).Color\"\r\n                                                        To=\"#FF414141\"\r\n                                                        d:IsOptimized=\"True\" />\r\n\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"rectangle\"\r\n                                                        Storyboard.TargetProperty=\"Fill.GradientStops[0].Color\"\r\n                                                        To=\"{StaticResource Fill_normal_top}\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"rectangle\"\r\n                                                        Storyboard.TargetProperty=\"Fill.GradientStops[1].Color\"\r\n                                                        To=\"{StaticResource Fill_normal_bottom}\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"textBlock\"\r\n                                                        Storyboard.TargetProperty=\"(TextBlock.Foreground).Color\"\r\n                                                        To=\"#5B717171\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"textBlock1\"\r\n                                                        Storyboard.TargetProperty=\"(TextBlock.Foreground).Color\"\r\n                                                        To=\"#AFFFFFFF\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"PointerOver\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"rectangle\"\r\n                                                        Storyboard.TargetProperty=\"Fill.GradientStops[1].Color\"\r\n                                                        To=\"{StaticResource Fill_over_top}\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"rectangle\"\r\n                                                        Storyboard.TargetProperty=\"Fill.GradientStops[0].Color\"\r\n                                                        To=\"{StaticResource Fill_over_bottom}\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Normal\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"rectangle\"\r\n                                                        Storyboard.TargetProperty=\"Fill.GradientStops[0].Color\"\r\n                                                        To=\"{StaticResource Fill_normal_top}\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"rectangle\"\r\n                                                        Storyboard.TargetProperty=\"Fill.GradientStops[1].Color\"\r\n                                                        To=\"{StaticResource Fill_over_top}\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"rectangle\"\r\n                                                        Storyboard.TargetProperty=\"Fill.GradientStops[0].Color\"\r\n                                                        To=\"{StaticResource Fill_over_bottom}\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\" />\r\n                                <VisualState x:Name=\"PointerFocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Rectangle Margin=\"0,1,0,-1\"\r\n                                   Fill=\"{StaticResource Shadow_second_color}\"\r\n                                   RadiusX=\"5\"\r\n                                   RadiusY=\"5\"\r\n                                   d:IsHidden=\"True\" />\r\n                        <Rectangle Margin=\"1,0\"\r\n                                   Fill=\"{StaticResource Shadow_first_color}\"\r\n                                   RadiusX=\"4\"\r\n                                   RadiusY=\"4\" />\r\n                        <Rectangle x:Name=\"rectangle\"\r\n                                   Margin=\"1,0,1,1\"\r\n                                   RadiusX=\"2\"\r\n                                   RadiusY=\"2\">\r\n                            <Rectangle.Fill>\r\n                                <LinearGradientBrush StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n                                    <GradientStop Color=\"{StaticResource Fill_normal_top}\" />\r\n                                    <GradientStop Offset=\"1\" Color=\"{StaticResource Fill_normal_bottom}\" />\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.Fill>\r\n                            <Rectangle.Stroke>\r\n                                <LinearGradientBrush StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n                                    <GradientStop Color=\"{StaticResource BorderStroke_top}\" />\r\n                                    <GradientStop Offset=\"1\" Color=\"{StaticResource BorderStroke_bottom}\" />\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.Stroke>\r\n                        </Rectangle>\r\n\r\n\r\n                        <TextBlock x:Name=\"textBlock1\"\r\n                                   Margin=\"0,0.5,0,-1\"\r\n                                   HorizontalAlignment=\"Stretch\"\r\n                                   VerticalAlignment=\"Center\"\r\n                                   FontFamily=\"{TemplateBinding FontFamily}\"\r\n                                   FontSize=\"{TemplateBinding FontSize}\"\r\n                                   FontStyle=\"{TemplateBinding FontStyle}\"\r\n                                   FontWeight=\"{TemplateBinding FontWeight}\"\r\n                                   Foreground=\"White\"\r\n                                   Text=\"{TemplateBinding Content}\"\r\n                                   TextAlignment=\"Center\"\r\n                                   TextWrapping=\"Wrap\" />\r\n                        <TextBlock x:Name=\"textBlock\"\r\n                                   Margin=\"0\"\r\n                                   HorizontalAlignment=\"Stretch\"\r\n                                   VerticalAlignment=\"Center\"\r\n                                   FontFamily=\"{TemplateBinding FontFamily}\"\r\n                                   FontSize=\"{TemplateBinding FontSize}\"\r\n                                   FontStyle=\"{TemplateBinding FontStyle}\"\r\n                                   FontWeight=\"{TemplateBinding FontWeight}\"\r\n                                   Foreground=\"{StaticResource Text_dark_}\"\r\n                                   Padding=\"{TemplateBinding Padding}\"\r\n                                   Text=\"{TemplateBinding Content}\"\r\n                                   TextAlignment=\"Center\"\r\n                                   TextWrapping=\"Wrap\" />\r\n                        <ContentPresenter x:Name=\"ContentPresnt\"\r\n                                          HorizontalAlignment=\"Center\"\r\n                                          VerticalAlignment=\"Center\"\r\n                                          RecognizesAccessKey=\"True\"\r\n                                          TextBlock.Foreground=\"Transparent\"\r\n                                          TextElement.Foreground=\"Transparent\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"ButtonGreen\" TargetType=\"{x:Type Button}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Button}\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"rectangle\"\r\n                                                        Storyboard.TargetProperty=\"Fill.GradientStops[1].Color\"\r\n                                                        To=\"{StaticResource Fill_pressed_light}\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"rectangle\"\r\n                                                        Storyboard.TargetProperty=\"Fill.GradientStops[0].Color\"\r\n                                                        To=\"{StaticResource Fill_pressed_dark}\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"rectangle\" Storyboard.TargetProperty=\"(Shape.Stroke)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Null}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"textBlock\"\r\n                                                        Storyboard.TargetProperty=\"(TextBlock.Foreground).Color\"\r\n                                                        To=\"White\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"textBlock1\"\r\n                                                        Storyboard.TargetProperty=\"(TextBlock.Foreground).Color\"\r\n                                                        To=\"#FF414141\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"path\"\r\n                                                        Storyboard.TargetProperty=\"(Shape.Stroke).Color\"\r\n                                                        To=\"Transparent\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"rectangle\"\r\n                                                        Storyboard.TargetProperty=\"Fill.GradientStops[0].Color\"\r\n                                                        To=\"{StaticResource Fill_normal_top}\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"rectangle\"\r\n                                                        Storyboard.TargetProperty=\"Fill.GradientStops[1].Color\"\r\n                                                        To=\"{StaticResource Fill_normal_bottom}\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"path\"\r\n                                                        Storyboard.TargetProperty=\"(Shape.Fill).Color\"\r\n                                                        To=\"Transparent\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"path\"\r\n                                                        Storyboard.TargetProperty=\"(Shape.Stroke).Color\"\r\n                                                        To=\"Transparent\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"textBlock\"\r\n                                                        Storyboard.TargetProperty=\"(TextBlock.Foreground).Color\"\r\n                                                        To=\"#5B717171\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"textBlock1\"\r\n                                                        Storyboard.TargetProperty=\"(TextBlock.Foreground).Color\"\r\n                                                        To=\"#AFFFFFFF\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"rectangle\" Storyboard.TargetProperty=\"(Shape.Stroke)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <LinearGradientBrush StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n                                                        <GradientStop Color=\"{StaticResource BorderStroke_top}\" />\r\n                                                        <GradientStop Offset=\"1\" Color=\"{StaticResource BorderStroke_bottom}\" />\r\n                                                    </LinearGradientBrush>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"rectangle\"\r\n                                                        Storyboard.TargetProperty=\"Fill.GradientStops[1].Color\"\r\n                                                        To=\"#FF85A420\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"rectangle\"\r\n                                                        Storyboard.TargetProperty=\"Fill.GradientStops[0].Color\"\r\n                                                        To=\"#FFB6D846\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Normal\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"rectangle\"\r\n                                                        Storyboard.TargetProperty=\"Fill.GradientStops[0].Color\"\r\n                                                        To=\"#FFB6D846\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\" />\r\n                                <VisualState x:Name=\"PointerFocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Rectangle Margin=\"0,1,0,-1\"\r\n                                   Fill=\"{StaticResource Shadow_second_color}\"\r\n                                   RadiusX=\"5\"\r\n                                   RadiusY=\"5\" />\r\n                        <Rectangle Fill=\"{StaticResource Shadow_first_color}\"\r\n                                   RadiusX=\"4\"\r\n                                   RadiusY=\"4\" />\r\n                        <Rectangle x:Name=\"rectangle\"\r\n                                   Margin=\"1,0,1,1\"\r\n                                   RadiusX=\"2\"\r\n                                   RadiusY=\"2\">\r\n                            <Rectangle.Fill>\r\n                                <LinearGradientBrush StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n                                    <GradientStop Color=\"#FFB6D846\" />\r\n                                    <GradientStop Offset=\"1\" Color=\"#FF93B329\" />\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.Fill>\r\n                            <Rectangle.Stroke>\r\n                                <LinearGradientBrush StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n                                    <GradientStop Color=\"#FF62A921\" />\r\n                                    <GradientStop Offset=\"0.999\" Color=\"#FF529C25\" />\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.Stroke>\r\n                        </Rectangle>\r\n                        <Path x:Name=\"path\"\r\n                              Height=\"1\"\r\n                              Margin=\"2.5,1.334,2.5,0\"\r\n                              VerticalAlignment=\"Top\"\r\n                              Data=\"M2.75,4.66667 L121.083,4.66667\"\r\n                              Fill=\"White\"\r\n                              Stretch=\"Fill\"\r\n                              Stroke=\"#FFD9FA73\"\r\n                              UseLayoutRounding=\"False\" />\r\n                        <TextBlock x:Name=\"textBlock1\"\r\n                                   Margin=\"0,1.5,0,-1.5\"\r\n                                   HorizontalAlignment=\"Stretch\"\r\n                                   VerticalAlignment=\"Center\"\r\n                                   FontFamily=\"{TemplateBinding FontFamily}\"\r\n                                   FontSize=\"{TemplateBinding FontSize}\"\r\n                                   FontStyle=\"{TemplateBinding FontStyle}\"\r\n                                   FontWeight=\"{TemplateBinding FontWeight}\"\r\n                                   Foreground=\"#39000000\"\r\n                                   Text=\"{TemplateBinding Content}\"\r\n                                   TextAlignment=\"Center\"\r\n                                   TextWrapping=\"Wrap\" />\r\n                        <TextBlock x:Name=\"textBlock\"\r\n                                   Margin=\"0\"\r\n                                   HorizontalAlignment=\"Stretch\"\r\n                                   VerticalAlignment=\"Center\"\r\n                                   FontFamily=\"{TemplateBinding FontFamily}\"\r\n                                   FontSize=\"{TemplateBinding FontSize}\"\r\n                                   FontStyle=\"{TemplateBinding FontStyle}\"\r\n                                   FontWeight=\"{TemplateBinding FontWeight}\"\r\n                                   Foreground=\"White\"\r\n                                   Text=\"{TemplateBinding Content}\"\r\n                                   TextAlignment=\"Center\"\r\n                                   TextWrapping=\"Wrap\" />\r\n                        <ContentPresenter HorizontalAlignment=\"Center\"\r\n                                          VerticalAlignment=\"Center\"\r\n                                          RecognizesAccessKey=\"True\"\r\n                                          TextElement.Foreground=\"Transparent\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"ButtonBlue\" TargetType=\"{x:Type Button}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Button}\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"rectangle\"\r\n                                                        Storyboard.TargetProperty=\"Fill.GradientStops[1].Color\"\r\n                                                        To=\"{StaticResource Fill_pressed_light}\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"rectangle\"\r\n                                                        Storyboard.TargetProperty=\"Fill.GradientStops[0].Color\"\r\n                                                        To=\"{StaticResource Fill_pressed_dark}\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"textBlock\"\r\n                                                        Storyboard.TargetProperty=\"(TextBlock.Foreground).Color\"\r\n                                                        To=\"White\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"textBlock1\"\r\n                                                        Storyboard.TargetProperty=\"(TextBlock.Foreground).Color\"\r\n                                                        To=\"#FF414141\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"path\"\r\n                                                        Storyboard.TargetProperty=\"(Shape.Stroke).Color\"\r\n                                                        To=\"Transparent\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"rectangle\"\r\n                                                        Storyboard.TargetProperty=\"Fill.GradientStops[0].Color\"\r\n                                                        To=\"{StaticResource Fill_normal_top}\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"rectangle\"\r\n                                                        Storyboard.TargetProperty=\"Fill.GradientStops[1].Color\"\r\n                                                        To=\"{StaticResource Fill_normal_bottom}\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"path\"\r\n                                                        Storyboard.TargetProperty=\"(Shape.Fill).Color\"\r\n                                                        To=\"Transparent\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"path\"\r\n                                                        Storyboard.TargetProperty=\"(Shape.Stroke).Color\"\r\n                                                        To=\"Transparent\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"textBlock\"\r\n                                                        Storyboard.TargetProperty=\"(TextBlock.Foreground).Color\"\r\n                                                        To=\"#5B717171\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"textBlock1\"\r\n                                                        Storyboard.TargetProperty=\"(TextBlock.Foreground).Color\"\r\n                                                        To=\"#AFFFFFFF\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"rectangle\" Storyboard.TargetProperty=\"(Shape.Stroke)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <LinearGradientBrush StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n                                                        <GradientStop Color=\"{StaticResource BorderStroke_top}\" />\r\n                                                        <GradientStop Offset=\"1\" Color=\"{StaticResource BorderStroke_bottom}\" />\r\n                                                    </LinearGradientBrush>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"rectangle\"\r\n                                                        Storyboard.TargetProperty=\"Fill.GradientStops[1].Color\"\r\n                                                        To=\"{StaticResource Fill_active_bottom_dark}\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"rectangle\"\r\n                                                        Storyboard.TargetProperty=\"Fill.GradientStops[0].Color\"\r\n                                                        To=\"{StaticResource Fill_active_top}\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Normal\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"rectangle\"\r\n                                                        Storyboard.TargetProperty=\"Fill.GradientStops[0].Color\"\r\n                                                        To=\"{StaticResource Fill_active_top}\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"rectangle\"\r\n                                                        Storyboard.TargetProperty=\"Fill.GradientStops[1].Color\"\r\n                                                        To=\"{StaticResource Fill_active_bottom}\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"textBlock\"\r\n                                                        Storyboard.TargetProperty=\"(TextBlock.Foreground).Color\"\r\n                                                        To=\"White\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"textBlock1\"\r\n                                                        Storyboard.TargetProperty=\"(TextBlock.Foreground).Color\"\r\n                                                        To=\"#3B000000\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\" />\r\n                                <VisualState x:Name=\"PointerFocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Rectangle Margin=\"0,1,0,-1\"\r\n                                   Fill=\"{StaticResource Shadow_second_color}\"\r\n                                   RadiusX=\"5\"\r\n                                   RadiusY=\"5\" />\r\n                        <Rectangle Fill=\"{StaticResource Shadow_first_color}\"\r\n                                   RadiusX=\"4\"\r\n                                   RadiusY=\"4\" />\r\n                        <Rectangle x:Name=\"rectangle\"\r\n                                   Margin=\"1,0,1,1\"\r\n                                   RadiusX=\"2\"\r\n                                   RadiusY=\"2\">\r\n                            <Rectangle.Fill>\r\n                                <LinearGradientBrush StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n                                    <GradientStop Color=\"{StaticResource Fill_active_top}\" />\r\n                                    <GradientStop Offset=\"1\" Color=\"{StaticResource Fill_active_bottom}\" />\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.Fill>\r\n                            <Rectangle.Stroke>\r\n                                <LinearGradientBrush StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n                                    <GradientStop Offset=\"0.015\" Color=\"{StaticResource Stroke_active_top}\" />\r\n                                    <GradientStop Offset=\"1\" Color=\"{StaticResource Stroke_active_bottom}\" />\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.Stroke>\r\n                        </Rectangle>\r\n                        <Path x:Name=\"path\"\r\n                              Height=\"1\"\r\n                              Margin=\"2.5,1.334,2.5,0\"\r\n                              VerticalAlignment=\"Top\"\r\n                              Data=\"M2.75,4.66667 L121.083,4.66667\"\r\n                              Fill=\"White\"\r\n                              Stretch=\"Fill\"\r\n                              UseLayoutRounding=\"False\">\r\n                            <Path.Stroke>\r\n                                <SolidColorBrush Color=\"{StaticResource Stroke_active_light}\" />\r\n                            </Path.Stroke>\r\n                        </Path>\r\n                        <TextBlock x:Name=\"textBlock1\"\r\n                                   Margin=\"0,1.5,0,-1.5\"\r\n                                   HorizontalAlignment=\"Stretch\"\r\n                                   VerticalAlignment=\"Center\"\r\n                                   FontFamily=\"{TemplateBinding FontFamily}\"\r\n                                   FontSize=\"{TemplateBinding FontSize}\"\r\n                                   FontStyle=\"{TemplateBinding FontStyle}\"\r\n                                   FontWeight=\"{TemplateBinding FontWeight}\"\r\n                                   Foreground=\"#39000000\"\r\n                                   RenderTransformOrigin=\"0.5,0.5\"\r\n                                   Text=\"{TemplateBinding Content}\"\r\n                                   TextAlignment=\"Center\"\r\n                                   TextWrapping=\"Wrap\" />\r\n                        <TextBlock x:Name=\"textBlock\"\r\n                                   Margin=\"0\"\r\n                                   HorizontalAlignment=\"Stretch\"\r\n                                   VerticalAlignment=\"Center\"\r\n                                   FontFamily=\"{TemplateBinding FontFamily}\"\r\n                                   FontSize=\"{TemplateBinding FontSize}\"\r\n                                   FontStyle=\"{TemplateBinding FontStyle}\"\r\n                                   FontWeight=\"{TemplateBinding FontWeight}\"\r\n                                   Foreground=\"White\"\r\n                                   Text=\"{TemplateBinding Content}\"\r\n                                   TextAlignment=\"Center\"\r\n                                   TextWrapping=\"Wrap\" />\r\n                        <ContentPresenter HorizontalAlignment=\"Center\"\r\n                                          VerticalAlignment=\"Center\"\r\n                                          RecognizesAccessKey=\"True\"\r\n                                          TextElement.Foreground=\"Transparent\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"ButtonOrange\" TargetType=\"{x:Type Button}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Button}\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"rectangle\"\r\n                                                        Storyboard.TargetProperty=\"Fill.GradientStops[1].Color\"\r\n                                                        To=\"{StaticResource Fill_pressed_light}\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"rectangle\"\r\n                                                        Storyboard.TargetProperty=\"Fill.GradientStops[0].Color\"\r\n                                                        To=\"{StaticResource Fill_pressed_dark}\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <DoubleAnimation Duration=\"0\"\r\n                                                         Storyboard.TargetName=\"rectangle\"\r\n                                                         Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Offset)\"\r\n                                                         To=\"0.239\"\r\n                                                         d:IsOptimized=\"True\" />\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"rectangle\" Storyboard.TargetProperty=\"(Shape.Stroke)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Null}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"textBlock\"\r\n                                                        Storyboard.TargetProperty=\"(TextBlock.Foreground).Color\"\r\n                                                        To=\"White\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"textBlock1\"\r\n                                                        Storyboard.TargetProperty=\"(TextBlock.Foreground).Color\"\r\n                                                        To=\"#FF414141\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"path\"\r\n                                                        Storyboard.TargetProperty=\"(Shape.Stroke).Color\"\r\n                                                        To=\"Transparent\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"rectangle\"\r\n                                                        Storyboard.TargetProperty=\"Fill.GradientStops[0].Color\"\r\n                                                        To=\"{StaticResource Fill_normal_top}\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"rectangle\"\r\n                                                        Storyboard.TargetProperty=\"Fill.GradientStops[1].Color\"\r\n                                                        To=\"{StaticResource Fill_normal_bottom}\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"path\"\r\n                                                        Storyboard.TargetProperty=\"(Shape.Fill).Color\"\r\n                                                        To=\"Transparent\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"path\"\r\n                                                        Storyboard.TargetProperty=\"(Shape.Stroke).Color\"\r\n                                                        To=\"Transparent\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"textBlock\"\r\n                                                        Storyboard.TargetProperty=\"(TextBlock.Foreground).Color\"\r\n                                                        To=\"#5B717171\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"textBlock1\"\r\n                                                        Storyboard.TargetProperty=\"(TextBlock.Foreground).Color\"\r\n                                                        To=\"#AFFFFFFF\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"rectangle\" Storyboard.TargetProperty=\"(Shape.Stroke)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <LinearGradientBrush StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n                                                        <GradientStop Color=\"{StaticResource BorderStroke_top}\" />\r\n                                                        <GradientStop Offset=\"1\" Color=\"{StaticResource BorderStroke_bottom}\" />\r\n                                                    </LinearGradientBrush>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"rectangle\"\r\n                                                        Storyboard.TargetProperty=\"Fill.GradientStops[1].Color\"\r\n                                                        To=\"{StaticResource Fill_orange_over_bottom}\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"rectangle\"\r\n                                                        Storyboard.TargetProperty=\"Fill.GradientStops[0].Color\"\r\n                                                        To=\"{StaticResource Fill_orange_normal_top}\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Normal\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"rectangle\"\r\n                                                        Storyboard.TargetProperty=\"Fill.GradientStops[0].Color\"\r\n                                                        To=\"{StaticResource Fill_orange_normal_top}\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                        <ColorAnimation Duration=\"0\"\r\n                                                        Storyboard.TargetName=\"rectangle\"\r\n                                                        Storyboard.TargetProperty=\"Fill.GradientStops[1].Color\"\r\n                                                        To=\"{StaticResource Fill_orange_normal_bottom}\"\r\n                                                        d:IsOptimized=\"True\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\" />\r\n                                <VisualState x:Name=\"PointerFocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Rectangle Margin=\"0,1,0,-1\"\r\n                                   Fill=\"{StaticResource Shadow_second_color}\"\r\n                                   RadiusX=\"5\"\r\n                                   RadiusY=\"5\" />\r\n                        <Rectangle Fill=\"{StaticResource Shadow_first_color}\"\r\n                                   RadiusX=\"4\"\r\n                                   RadiusY=\"4\" />\r\n                        <Rectangle x:Name=\"rectangle\"\r\n                                   Margin=\"1,0,1,1\"\r\n                                   RadiusX=\"2\"\r\n                                   RadiusY=\"2\">\r\n                            <Rectangle.Fill>\r\n                                <LinearGradientBrush StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n                                    <GradientStop Color=\"{StaticResource Fill_orange_normal_top}\" />\r\n                                    <GradientStop Offset=\"1\" Color=\"{StaticResource Fill_orange_normal_bottom}\" />\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.Fill>\r\n                            <Rectangle.Stroke>\r\n                                <LinearGradientBrush StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n                                    <GradientStop Color=\"{StaticResource Stroke_orange_top}\" />\r\n                                    <GradientStop Offset=\"1\" Color=\"{StaticResource Stroke_orange_bottom}\" />\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.Stroke>\r\n                        </Rectangle>\r\n                        <Path x:Name=\"path\"\r\n                              Height=\"1\"\r\n                              Margin=\"2.5,1.334,2.5,0\"\r\n                              VerticalAlignment=\"Top\"\r\n                              Data=\"M2.75,4.66667 L121.083,4.66667\"\r\n                              Fill=\"White\"\r\n                              Stretch=\"Fill\"\r\n                              UseLayoutRounding=\"False\">\r\n                            <Path.Stroke>\r\n                                <SolidColorBrush Color=\"{StaticResource Stroke_orange_light}\" />\r\n                            </Path.Stroke>\r\n                        </Path>\r\n                        <TextBlock x:Name=\"textBlock1\"\r\n                                   Margin=\"0,1.5,0,-1.5\"\r\n                                   HorizontalAlignment=\"Stretch\"\r\n                                   VerticalAlignment=\"Center\"\r\n                                   FontFamily=\"{TemplateBinding FontFamily}\"\r\n                                   FontSize=\"{TemplateBinding FontSize}\"\r\n                                   FontStyle=\"{TemplateBinding FontStyle}\"\r\n                                   FontWeight=\"{TemplateBinding FontWeight}\"\r\n                                   Foreground=\"#39000000\"\r\n                                   Text=\"{TemplateBinding Content}\"\r\n                                   TextAlignment=\"Center\"\r\n                                   TextWrapping=\"Wrap\" />\r\n                        <TextBlock x:Name=\"textBlock\"\r\n                                   Margin=\"0\"\r\n                                   HorizontalAlignment=\"Stretch\"\r\n                                   VerticalAlignment=\"Center\"\r\n                                   FontFamily=\"{TemplateBinding FontFamily}\"\r\n                                   FontSize=\"{TemplateBinding FontSize}\"\r\n                                   FontStyle=\"{TemplateBinding FontStyle}\"\r\n                                   FontWeight=\"{TemplateBinding FontWeight}\"\r\n                                   Foreground=\"White\"\r\n                                   Text=\"{TemplateBinding Content}\"\r\n                                   TextAlignment=\"Center\"\r\n                                   TextWrapping=\"Wrap\" />\r\n                        <ContentPresenter HorizontalAlignment=\"Center\"\r\n                                          VerticalAlignment=\"Center\"\r\n                                          RecognizesAccessKey=\"True\"\r\n                                          TextElement.Foreground=\"Transparent\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"CheckBoxSwitcher\" TargetType=\"{x:Type CheckBox}\">\r\n        <Setter Property=\"Foreground\" Value=\"#FF313131\" />\r\n        <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type CheckBox}\">\r\n                    <Grid>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"37\" />\r\n                            <ColumnDefinition Width=\"23*\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.2\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"PointerOver\" />\r\n                                <VisualState x:Name=\"Pressed\" />\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"ellipse\" Storyboard.TargetProperty=\"(Shape.Fill)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <SolidColorBrush Color=\"#FFD7D7D7\" />\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"ellipse1\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"CheckedPointerOver\" />\r\n                                <VisualState x:Name=\"CheckedPressed\" />\r\n                                <VisualState x:Name=\"CheckedDisabled\" />\r\n                                <VisualState x:Name=\"Indeterminate2\" />\r\n                                <VisualState x:Name=\"IndeterminatePointerOver\" />\r\n                                <VisualState x:Name=\"IndeterminatePressed\" />\r\n                                <VisualState x:Name=\"IndeterminateDisabled\" />\r\n                                <VisualState x:Name=\"Normal\" />\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.2\">\r\n                                        <VisualTransition.GeneratedEasingFunction>\r\n                                            <QuinticEase EasingMode=\"EaseOut\" />\r\n                                        </VisualTransition.GeneratedEasingFunction>\r\n                                    </VisualTransition>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"rectangle\" Storyboard.TargetProperty=\"Fill\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <LinearGradientBrush StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n                                                        <GradientStop Offset=\"1\" Color=\"{StaticResource Fill_active_bottom}\" />\r\n                                                        <GradientStop Color=\"{StaticResource Fill_active_bottom}\" />\r\n                                                    </LinearGradientBrush>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"rectangle1\" Storyboard.TargetProperty=\"(FrameworkElement.Margin)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Thickness>0</Thickness>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ellipse2\" Storyboard.TargetProperty=\"RenderTransform.Children[3].X\">\r\n                                            <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"16\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ellipse\" Storyboard.TargetProperty=\"RenderTransform.Children[3].X\">\r\n                                            <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"18\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ellipse1\" Storyboard.TargetProperty=\"RenderTransform.Children[3].X\">\r\n                                            <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"18\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\" />\r\n                                <VisualState x:Name=\"Indeterminate\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ellipse2\" Storyboard.TargetProperty=\"RenderTransform.Children[3].X\">\r\n                                            <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"8\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ellipse\" Storyboard.TargetProperty=\"RenderTransform.Children[3].X\">\r\n                                            <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"8\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ellipse1\" Storyboard.TargetProperty=\"RenderTransform.Children[3].X\">\r\n                                            <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"8\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                                <VisualState x:Name=\"PointerFocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Rectangle x:Name=\"rectangle1\"\r\n                                   Width=\"35\"\r\n                                   Height=\"16\"\r\n                                   Margin=\"0,2,0,-1\"\r\n                                   HorizontalAlignment=\"Left\"\r\n                                   VerticalAlignment=\"Center\"\r\n                                   Fill=\"White\"\r\n                                   RadiusX=\"8\"\r\n                                   RadiusY=\"8\"\r\n                                   RenderTransformOrigin=\"0.5,0.5\" />\r\n                        <Rectangle x:Name=\"rectangle\"\r\n                                   Width=\"35\"\r\n                                   Height=\"18\"\r\n                                   Margin=\"0\"\r\n                                   HorizontalAlignment=\"Left\"\r\n                                   VerticalAlignment=\"Center\"\r\n                                   RadiusX=\"8\"\r\n                                   RadiusY=\"8\">\r\n                            <Rectangle.Stroke>\r\n                                <SolidColorBrush Color=\"{StaticResource CheckBox_stroke_color}\" />\r\n                            </Rectangle.Stroke>\r\n                            <Rectangle.Fill>\r\n                                <SolidColorBrush Color=\"{StaticResource CheckBox_main_color}\" />\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                        <Ellipse x:Name=\"ellipse2\"\r\n                                 Width=\"18\"\r\n                                 Height=\"18\"\r\n                                 Margin=\"1,0,0,0\"\r\n                                 HorizontalAlignment=\"Left\"\r\n                                 VerticalAlignment=\"Center\"\r\n                                 Fill=\"#0E000000\"\r\n                                 RenderTransformOrigin=\"0.5,0.5\">\r\n                            <Ellipse.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform />\r\n                                    <SkewTransform />\r\n                                    <RotateTransform />\r\n                                    <TranslateTransform />\r\n                                </TransformGroup>\r\n                            </Ellipse.RenderTransform>\r\n                        </Ellipse>\r\n                        <Ellipse x:Name=\"ellipse\"\r\n                                 Width=\"18\"\r\n                                 Height=\"18\"\r\n                                 Margin=\"0\"\r\n                                 HorizontalAlignment=\"Left\"\r\n                                 VerticalAlignment=\"Center\"\r\n                                 RenderTransformOrigin=\"0.5,0.5\">\r\n                            <Ellipse.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform />\r\n                                    <SkewTransform />\r\n                                    <RotateTransform />\r\n                                    <TranslateTransform />\r\n                                </TransformGroup>\r\n                            </Ellipse.RenderTransform>\r\n                            <Ellipse.Fill>\r\n                                <LinearGradientBrush StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n                                    <GradientStop Offset=\"1\" Color=\"{StaticResource CheckBox_fill_bottom}\" />\r\n                                    <GradientStop Color=\"{StaticResource CheckBox_fill_top}\" />\r\n                                </LinearGradientBrush>\r\n                            </Ellipse.Fill>\r\n                            <Ellipse.Stroke>\r\n                                <SolidColorBrush Color=\"{StaticResource CheckBox_stroke_color}\" />\r\n                            </Ellipse.Stroke>\r\n                        </Ellipse>\r\n                        <Ellipse x:Name=\"ellipse1\"\r\n                                 Width=\"16\"\r\n                                 Height=\"16\"\r\n                                 Margin=\"1,0,0,0\"\r\n                                 HorizontalAlignment=\"Left\"\r\n                                 VerticalAlignment=\"Center\"\r\n                                 RenderTransformOrigin=\"0.5,0.5\">\r\n                            <Ellipse.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform />\r\n                                    <SkewTransform />\r\n                                    <RotateTransform />\r\n                                    <TranslateTransform />\r\n                                </TransformGroup>\r\n                            </Ellipse.RenderTransform>\r\n                            <Ellipse.Stroke>\r\n                                <LinearGradientBrush StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n                                    <GradientStop Color=\"White\" />\r\n                                    <GradientStop Offset=\"0.5\" Color=\"Transparent\" />\r\n                                    <GradientStop Offset=\"0.163\" Color=\"White\" />\r\n                                </LinearGradientBrush>\r\n                            </Ellipse.Stroke>\r\n                        </Ellipse>\r\n                        <TextBlock Grid.Column=\"1\"\r\n                                   Margin=\"7,1,0,-1\"\r\n                                   HorizontalAlignment=\"Left\"\r\n                                   VerticalAlignment=\"Center\"\r\n                                   FontFamily=\"{TemplateBinding FontFamily}\"\r\n                                   FontSize=\"{TemplateBinding FontSize}\"\r\n                                   FontStyle=\"{TemplateBinding FontStyle}\"\r\n                                   FontWeight=\"{TemplateBinding FontWeight}\"\r\n                                   Foreground=\"{TemplateBinding Background}\"\r\n                                   Text=\"{TemplateBinding Content}\"\r\n                                   TextWrapping=\"Wrap\" />\r\n                        <TextBlock x:Name=\"textBlock\"\r\n                                   Grid.Column=\"1\"\r\n                                   Margin=\"7,0,0,0\"\r\n                                   HorizontalAlignment=\"Left\"\r\n                                   VerticalAlignment=\"Center\"\r\n                                   Panel.ZIndex=\"1\"\r\n                                   FontFamily=\"{TemplateBinding FontFamily}\"\r\n                                   FontSize=\"{TemplateBinding FontSize}\"\r\n                                   FontStyle=\"{TemplateBinding FontStyle}\"\r\n                                   FontWeight=\"{TemplateBinding FontWeight}\"\r\n                                   Foreground=\"{TemplateBinding Foreground}\"\r\n                                   Text=\"{TemplateBinding Content}\"\r\n                                   TextWrapping=\"Wrap\"\r\n                                   ToolTipService.ToolTip=\"{TemplateBinding ToolTipService.ToolTip}\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"#80000000\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type ProgressBar}\">\r\n        <Setter Property=\"Height\" Value=\"20\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ProgressBar}\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.2\">\r\n                                        <VisualTransition.GeneratedEasingFunction>\r\n                                            <ElasticEase />\r\n                                        </VisualTransition.GeneratedEasingFunction>\r\n                                    </VisualTransition>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Determinate\" />\r\n                                <VisualState x:Name=\"Updating\" />\r\n                                <VisualState x:Name=\"Indeterminate\">\r\n                                    <Storyboard RepeatBehavior=\"Forever\">\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"DeterminateRoot\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"border\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0:0:1\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"grid\" Storyboard.TargetProperty=\"RenderTransform.Children[3].X\">\r\n                                            <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"-25\" />\r\n                                            <EasingDoubleKeyFrame KeyTime=\"0:0:1\" Value=\"25\" />\r\n                                            <EasingDoubleKeyFrame KeyTime=\"0:0:2\" Value=\"-25\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Error\" />\r\n                                <VisualState x:Name=\"Paused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Rectangle Margin=\"0,1\"\r\n                                   Fill=\"White\"\r\n                                   RadiusX=\"8.5\"\r\n                                   RadiusY=\"8.5\" />\r\n                        <Rectangle Margin=\"0,0,0,1\"\r\n                                   RadiusX=\"8.5\"\r\n                                   RadiusY=\"8.5\">\r\n                            <Rectangle.Stroke>\r\n                                <SolidColorBrush Color=\"{StaticResource CheckBox_stroke_color}\" />\r\n                            </Rectangle.Stroke>\r\n                            <Rectangle.Fill>\r\n                                <SolidColorBrush Color=\"{StaticResource CheckBox_main_color}\" />\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                        <Path Height=\"1\"\r\n                              Margin=\"5,1,5,0\"\r\n                              VerticalAlignment=\"Top\"\r\n                              Data=\"M7.5,22.5312 L86.125,22.5312\"\r\n                              Stretch=\"Fill\"\r\n                              Stroke=\"#0F000000\"\r\n                              UseLayoutRounding=\"False\" />\r\n                        <Path Height=\"1\"\r\n                              Margin=\"7,1,7,0\"\r\n                              VerticalAlignment=\"Bottom\"\r\n                              Data=\"M7.5,22.5312 L86.125,22.5312\"\r\n                              Stretch=\"Fill\"\r\n                              Stroke=\"White\"\r\n                              UseLayoutRounding=\"False\" />\r\n\r\n                        <Border x:Name=\"DeterminateRoot\"\r\n                                Margin=\"0,0,0,1\"\r\n                                BorderThickness=\"{TemplateBinding BorderThickness}\">\r\n                            <Grid x:Name=\"PART_Track\"\r\n                                  Margin=\"0.2,-0.8,-0.2,-0.4\"\r\n                                  HorizontalAlignment=\"Stretch\">\r\n                                <Rectangle x:Name=\"PART_Indicator\"\r\n                                           Margin=\"0,0,0,-1\"\r\n                                           HorizontalAlignment=\"Left\"\r\n                                           Fill=\"#1F000000\"\r\n                                           RadiusX=\"8.5\"\r\n                                           RadiusY=\"8.5\" />\r\n                                <Rectangle Width=\"{Binding ActualWidth,\r\n                                                           ElementName=PART_Indicator}\"\r\n                                           HorizontalAlignment=\"Left\"\r\n                                           RadiusX=\"8.5\"\r\n                                           RadiusY=\"8.5\">\r\n                                    <Rectangle.Stroke>\r\n                                        <LinearGradientBrush StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n                                            <GradientStop Color=\"{StaticResource Stroke_active_top}\" />\r\n                                            <GradientStop Offset=\"1\" Color=\"{StaticResource Stroke_active_bottom}\" />\r\n                                        </LinearGradientBrush>\r\n                                    </Rectangle.Stroke>\r\n                                    <Rectangle.Fill>\r\n                                        <LinearGradientBrush StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n                                            <GradientStop Offset=\"1\" Color=\"{StaticResource Fill_active_bottom}\" />\r\n                                            <GradientStop Color=\"{StaticResource Fill_active_top}\" />\r\n                                        </LinearGradientBrush>\r\n                                    </Rectangle.Fill>\r\n                                </Rectangle>\r\n                                <Rectangle Width=\"{Binding ActualWidth,\r\n                                                           ElementName=PART_Indicator}\"\r\n                                           Margin=\"0,1,0,0\"\r\n                                           HorizontalAlignment=\"Left\"\r\n                                           Fill=\"{x:Null}\"\r\n                                           RadiusX=\"8.5\"\r\n                                           RadiusY=\"8.5\">\r\n                                    <Rectangle.Stroke>\r\n                                        <LinearGradientBrush StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n                                            <GradientStop Offset=\"0.009\" Color=\"#93FFFFFF\" />\r\n                                            <GradientStop Offset=\"0.119\" Color=\"#009EC7E6\" />\r\n                                        </LinearGradientBrush>\r\n                                    </Rectangle.Stroke>\r\n                                </Rectangle>\r\n                                <Path x:Name=\"path\"\r\n                                      Width=\"{Binding ActualWidth,\r\n                                                      ElementName=PART_Indicator}\"\r\n                                      Height=\"1\"\r\n                                      Margin=\"0,1,0,0\"\r\n                                      HorizontalAlignment=\"Left\"\r\n                                      VerticalAlignment=\"Top\"\r\n                                      Data=\"M7.5,22.5312 L86.125,22.5312\"\r\n                                      RenderTransformOrigin=\"0.5,0.5\"\r\n                                      Stretch=\"Fill\"\r\n                                      UseLayoutRounding=\"False\"\r\n                                      Visibility=\"Hidden\">\r\n\r\n                                    <Path.Stroke>\r\n                                        <SolidColorBrush Color=\"{StaticResource Stroke_active_light}\" />\r\n                                    </Path.Stroke>\r\n                                </Path>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Border x:Name=\"border\"\r\n                                Margin=\"25,0\"\r\n                                RenderTransformOrigin=\"0.5,0.5\"\r\n                                Visibility=\"Collapsed\">\r\n                            <Grid x:Name=\"grid\"\r\n                                  Margin=\"0\"\r\n                                  RenderTransformOrigin=\"0.5,0.5\">\r\n                                <Grid.RenderTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform />\r\n                                        <SkewTransform />\r\n                                        <RotateTransform />\r\n                                        <TranslateTransform />\r\n                                    </TransformGroup>\r\n                                </Grid.RenderTransform>\r\n                                <Rectangle Margin=\"0,0,0,0.5\"\r\n                                           Fill=\"#4C000000\"\r\n                                           RadiusX=\"8.5\"\r\n                                           RadiusY=\"8.5\" />\r\n                                <Rectangle Margin=\"0,0,0,1\"\r\n                                           RadiusX=\"8.5\"\r\n                                           RadiusY=\"8.5\">\r\n                                    <Rectangle.Stroke>\r\n                                        <LinearGradientBrush StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n                                            <GradientStop Color=\"{StaticResource BorderStroke_top}\" />\r\n                                            <GradientStop Offset=\"1\" Color=\"{StaticResource BorderStroke_bottom}\" />\r\n                                        </LinearGradientBrush>\r\n                                    </Rectangle.Stroke>\r\n                                    <Rectangle.Fill>\r\n                                        <LinearGradientBrush StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n                                            <GradientStop Offset=\"1\" Color=\"{StaticResource CheckBox_fill_bottom}\" />\r\n                                            <GradientStop Color=\"{StaticResource CheckBox_fill_top}\" />\r\n                                        </LinearGradientBrush>\r\n                                    </Rectangle.Fill>\r\n                                </Rectangle>\r\n                                <Path x:Name=\"path1\"\r\n                                      Height=\"1\"\r\n                                      Margin=\"6,1,6,0\"\r\n                                      VerticalAlignment=\"Top\"\r\n                                      Data=\"M7.5,22.5312 L86.125,22.5312\"\r\n                                      Stretch=\"Fill\"\r\n                                      Stroke=\"White\"\r\n                                      UseLayoutRounding=\"False\" />\r\n                            </Grid>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type CheckBox}\">\r\n        <Setter Property=\"Foreground\" Value=\"#FF313131\" />\r\n        <Setter Property=\"Height\" Value=\"20\" />\r\n        <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type CheckBox}\">\r\n                    <Grid>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"23\" />\r\n                            <ColumnDefinition Width=\"23*\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.2\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"PointerOver\" />\r\n                                <VisualState x:Name=\"Pressed\" />\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"rectangle1\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"CheckedPointerOver\" />\r\n                                <VisualState x:Name=\"CheckedPressed\" />\r\n                                <VisualState x:Name=\"CheckedDisabled\" />\r\n                                <VisualState x:Name=\"Indeterminate2\" />\r\n                                <VisualState x:Name=\"IndeterminatePointerOver\" />\r\n                                <VisualState x:Name=\"IndeterminatePressed\" />\r\n                                <VisualState x:Name=\"IndeterminateDisabled\" />\r\n                                <VisualState x:Name=\"Normal\" />\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"grid\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"path\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"rectangle\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"grid_Copy\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"rectangle\" Storyboard.TargetProperty=\"(Rectangle.RadiusX)\">\r\n                                            <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"rectangle\" Storyboard.TargetProperty=\"(Rectangle.RadiusY)\">\r\n                                            <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\" />\r\n                                <VisualState x:Name=\"Indeterminate\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"path1\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                                <VisualState x:Name=\"PointerFocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <TextBlock Grid.Column=\"1\"\r\n                                   Margin=\"7,1.5,0,-1.5\"\r\n                                   HorizontalAlignment=\"Left\"\r\n                                   VerticalAlignment=\"Center\"\r\n                                   FontFamily=\"{TemplateBinding FontFamily}\"\r\n                                   FontSize=\"{TemplateBinding FontSize}\"\r\n                                   FontStyle=\"{TemplateBinding FontStyle}\"\r\n                                   FontWeight=\"{TemplateBinding FontWeight}\"\r\n                                   Foreground=\"{TemplateBinding Background}\"\r\n                                   Text=\"{TemplateBinding Content}\"\r\n                                   TextWrapping=\"Wrap\" />\r\n                        <TextBlock Grid.Column=\"1\"\r\n                                   Margin=\"7,0,0,0\"\r\n                                   HorizontalAlignment=\"Left\"\r\n                                   VerticalAlignment=\"Center\"\r\n                                   Panel.ZIndex=\"1\"\r\n                                   FontFamily=\"{TemplateBinding FontFamily}\"\r\n                                   FontSize=\"{TemplateBinding FontSize}\"\r\n                                   FontStyle=\"{TemplateBinding FontStyle}\"\r\n                                   FontWeight=\"{TemplateBinding FontWeight}\"\r\n                                   Foreground=\"{TemplateBinding Foreground}\"\r\n                                   Text=\"{TemplateBinding Content}\"\r\n                                   TextWrapping=\"Wrap\"\r\n                                   ToolTipService.ToolTip=\"{TemplateBinding ToolTipService.ToolTip}\" />\r\n                        <Rectangle Width=\"18\"\r\n                                   Height=\"18\"\r\n                                   Margin=\"0,1,0,-1\"\r\n                                   HorizontalAlignment=\"Center\"\r\n                                   VerticalAlignment=\"Center\"\r\n                                   Fill=\"White\"\r\n                                   RadiusX=\"2.375\"\r\n                                   RadiusY=\"2.375\" />\r\n                        <Rectangle Width=\"18\"\r\n                                   Height=\"18\"\r\n                                   Margin=\"0\"\r\n                                   HorizontalAlignment=\"Center\"\r\n                                   VerticalAlignment=\"Center\"\r\n                                   RadiusX=\"1\"\r\n                                   RadiusY=\"1\">\r\n                            <Rectangle.Stroke>\r\n                                <SolidColorBrush Color=\"{StaticResource CheckBox_stroke_color}\" />\r\n                            </Rectangle.Stroke>\r\n                            <Rectangle.Fill>\r\n                                <SolidColorBrush Color=\"{StaticResource CheckBox_main_color}\" />\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                        <Path x:Name=\"path1\"\r\n                              Width=\"11\"\r\n                              Height=\"2\"\r\n                              Margin=\"13.375,19,0,0\"\r\n                              HorizontalAlignment=\"Left\"\r\n                              VerticalAlignment=\"Top\"\r\n                              Data=\"M14.375,20 L23.375,20\"\r\n                              Stretch=\"Fill\"\r\n                              StrokeThickness=\"2\"\r\n                              UseLayoutRounding=\"False\"\r\n                              Visibility=\"Collapsed\">\r\n                            <Path.Stroke>\r\n                                <SolidColorBrush Color=\"{StaticResource Fill_pressed_light}\" />\r\n                            </Path.Stroke>\r\n                        </Path>\r\n                        <Rectangle x:Name=\"rectangle\"\r\n                                   Width=\"18\"\r\n                                   Height=\"18\"\r\n                                   Margin=\"0\"\r\n                                   HorizontalAlignment=\"Center\"\r\n                                   VerticalAlignment=\"Center\"\r\n                                   RadiusX=\"2.375\"\r\n                                   RadiusY=\"2.375\"\r\n                                   Visibility=\"Collapsed\">\r\n                            <Rectangle.Stroke>\r\n                                <SolidColorBrush Color=\"{StaticResource CheckBox_stroke_color}\" />\r\n                            </Rectangle.Stroke>\r\n                            <Rectangle.Fill>\r\n                                <LinearGradientBrush StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n                                    <GradientStop Color=\"{StaticResource CheckBox_fill_top}\" />\r\n                                    <GradientStop Offset=\"1\" Color=\"{StaticResource CheckBox_fill_bottom}\" />\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                        <Path x:Name=\"path\"\r\n                              Width=\"14\"\r\n                              Height=\"1\"\r\n                              Margin=\"0,-7,0,7\"\r\n                              HorizontalAlignment=\"Center\"\r\n                              VerticalAlignment=\"Center\"\r\n                              Data=\"M11.375,5.5 L27,5.5\"\r\n                              Stretch=\"Fill\"\r\n                              Stroke=\"White\"\r\n                              UseLayoutRounding=\"False\"\r\n                              Visibility=\"Collapsed\" />\r\n                        <Grid x:Name=\"grid_Copy\"\r\n                              Margin=\"0,2,0,0\"\r\n                              HorizontalAlignment=\"Center\"\r\n                              VerticalAlignment=\"Center\"\r\n                              Visibility=\"Collapsed\">\r\n                            <Path Width=\"7\"\r\n                                  Height=\"6\"\r\n                                  Margin=\"-5,4,0,0\"\r\n                                  HorizontalAlignment=\"Center\"\r\n                                  VerticalAlignment=\"Center\"\r\n                                  Data=\"M14.375,20.375 L18.7083,24.7083\"\r\n                                  RenderTransformOrigin=\"0.5,0.5\"\r\n                                  Stretch=\"Fill\"\r\n                                  Stroke=\"White\"\r\n                                  StrokeThickness=\"2\"\r\n                                  UseLayoutRounding=\"False\" />\r\n                            <Path Width=\"9\"\r\n                                  Height=\"10\"\r\n                                  Margin=\"5,0,0,0\"\r\n                                  HorizontalAlignment=\"Center\"\r\n                                  VerticalAlignment=\"Center\"\r\n                                  Data=\"M18.541,25.541 L25.5,18\"\r\n                                  Stretch=\"Fill\"\r\n                                  Stroke=\"White\"\r\n                                  StrokeThickness=\"1.5\"\r\n                                  UseLayoutRounding=\"False\" />\r\n                        </Grid>\r\n                        <Grid x:Name=\"grid\"\r\n                              Margin=\"0,1,0,0\"\r\n                              HorizontalAlignment=\"Center\"\r\n                              VerticalAlignment=\"Center\"\r\n                              Visibility=\"Collapsed\">\r\n                            <Path Width=\"7\"\r\n                                  Height=\"6\"\r\n                                  Margin=\"-5,4,0,0\"\r\n                                  HorizontalAlignment=\"Center\"\r\n                                  VerticalAlignment=\"Center\"\r\n                                  Data=\"M14.375,20.375 L18.7083,24.7083\"\r\n                                  RenderTransformOrigin=\"0.5,0.5\"\r\n                                  Stretch=\"Fill\"\r\n                                  StrokeThickness=\"2\"\r\n                                  UseLayoutRounding=\"False\">\r\n                                <Path.Stroke>\r\n                                    <SolidColorBrush Color=\"{StaticResource Fill_pressed_light}\" />\r\n                                </Path.Stroke>\r\n                            </Path>\r\n                            <Path Width=\"9\"\r\n                                  Height=\"10\"\r\n                                  Margin=\"5,0,0,0\"\r\n                                  HorizontalAlignment=\"Center\"\r\n                                  VerticalAlignment=\"Center\"\r\n                                  Data=\"M18.541,25.541 L25.5,18\"\r\n                                  Stretch=\"Fill\"\r\n                                  StrokeThickness=\"1.5\"\r\n                                  UseLayoutRounding=\"False\">\r\n                                <Path.Stroke>\r\n                                    <SolidColorBrush Color=\"{StaticResource Fill_pressed_light}\" />\r\n                                </Path.Stroke>\r\n                            </Path>\r\n                        </Grid>\r\n                        <Rectangle x:Name=\"rectangle1\"\r\n                                   Width=\"18\"\r\n                                   Height=\"18\"\r\n                                   Margin=\"0\"\r\n                                   HorizontalAlignment=\"Center\"\r\n                                   VerticalAlignment=\"Center\"\r\n                                   Fill=\"#35000000\"\r\n                                   RadiusX=\"2.375\"\r\n                                   RadiusY=\"2.375\"\r\n                                   Visibility=\"Collapsed\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"#80000000\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <SolidColorBrush x:Key=\"WindowBackgroundBrush\" Color=\"Transparent\" />\r\n\r\n    <SolidColorBrush x:Key=\"MainColor\" Color=\"DeepSkyBlue\" />\r\n    <SolidColorBrush x:Key=\"MainColorLight\" Color=\"LightSkyBlue\" />\r\n    <SolidColorBrush x:Key=\"MainColorDark\" Color=\"#00A7DF\" />\r\n\r\n    <SolidColorBrush x:Key=\"BorderMainBrush\" Color=\"LightGray\" />\r\n    <SolidColorBrush x:Key=\"BorderDarkMainBrush\" Color=\"#C0C0C0\" />\r\n\r\n    <SolidColorBrush x:Key=\"BackgroundGrayDark\" Color=\"#FFEFEFEF\" />\r\n    <SolidColorBrush x:Key=\"BackgroundGrayLight\" Color=\"#F5F5F5\" />\r\n\r\n    <SolidColorBrush x:Key=\"ForegroundDisabledBrush\" Color=\"DimGray\" />\r\n    <SolidColorBrush x:Key=\"ForegroundBrush\" Color=\"Black\" />\r\n\r\n\r\n    <LinearGradientBrush x:Key=\"FormBackgroundBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n        <GradientStop Offset=\"0.31\" Color=\"#FFFFFD\" />\r\n        <GradientStop Offset=\"1\" Color=\"#FFF8F8F8\" />\r\n    </LinearGradientBrush>\r\n\r\n\r\n    <ControlTemplate x:Key=\"ComboBoxToggleButton\" TargetType=\"ToggleButton\">\r\n        <Grid>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition />\r\n                <ColumnDefinition Width=\"20\" />\r\n            </Grid.ColumnDefinitions>\r\n            <VisualStateManager.VisualStateGroups>\r\n                <VisualStateGroup x:Name=\"CommonStates\">\r\n                    <VisualState x:Name=\"Normal\">\r\n                        <Storyboard>\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"rectangle\" Storyboard.TargetProperty=\"Fill.GradientStops[0].Offset\">\r\n                                <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </VisualState>\r\n                    <VisualState x:Name=\"MouseOver\" />\r\n                    <VisualState x:Name=\"Pressed\">\r\n                        <Storyboard>\r\n                            <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"rectangle\" Storyboard.TargetProperty=\"Fill.GradientStops[0].Color\">\r\n                                <EasingColorKeyFrame KeyTime=\"0\" Value=\"{StaticResource Fill_pressed_dark}\" />\r\n                            </ColorAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"rectangle\" Storyboard.TargetProperty=\"Fill.GradientStops[1].Offset\">\r\n                                <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0.316\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"rectangle\" Storyboard.TargetProperty=\"Fill.GradientStops[1].Color\">\r\n                                <EasingColorKeyFrame KeyTime=\"0\" Value=\"{StaticResource Fill_pressed_light}\" />\r\n                            </ColorAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </VisualState>\r\n                    <VisualState x:Name=\"Disabled\">\r\n                        <Storyboard>\r\n                            <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"Arrow\" Storyboard.TargetProperty=\"Fill.Color\">\r\n                                <EasingColorKeyFrame KeyTime=\"0\" Value=\"#FFC5C5C5\" />\r\n                            </ColorAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"rectangle\" Storyboard.TargetProperty=\"Fill.GradientStops[0].Offset\">\r\n                                <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"rectangle\" Storyboard.TargetProperty=\"Fill.GradientStops[0].Color\">\r\n                                <EasingColorKeyFrame KeyTime=\"0\" Value=\"{StaticResource CheckBox_fill_top}\" />\r\n                            </ColorAnimationUsingKeyFrames>\r\n                            <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"rectangle\" Storyboard.TargetProperty=\"Fill.GradientStops[1].Color\">\r\n                                <EasingColorKeyFrame KeyTime=\"0\" Value=\"{StaticResource CheckBox_fill_bottom}\" />\r\n                            </ColorAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </VisualState>\r\n                </VisualStateGroup>\r\n                <VisualStateGroup x:Name=\"CheckStates\">\r\n                    <VisualState x:Name=\"Checked\">\r\n                        <Storyboard>\r\n                            <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"rectangle\" Storyboard.TargetProperty=\"Fill.GradientStops[0].Color\">\r\n                                <EasingColorKeyFrame KeyTime=\"0\" Value=\"{StaticResource Fill_pressed_dark}\" />\r\n                            </ColorAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"rectangle\" Storyboard.TargetProperty=\"Fill.GradientStops[1].Offset\">\r\n                                <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0.435\" />\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"rectangle\" Storyboard.TargetProperty=\"Fill.GradientStops[1].Color\">\r\n                                <EasingColorKeyFrame KeyTime=\"0\" Value=\"{StaticResource Fill_pressed_light}\" />\r\n                            </ColorAnimationUsingKeyFrames>\r\n                            <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"Arrow\" Storyboard.TargetProperty=\"Fill.Color\">\r\n                                <EasingColorKeyFrame KeyTime=\"0\" Value=\"#FFCBCBCB\" />\r\n                            </ColorAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </VisualState>\r\n                    <VisualState x:Name=\"Unchecked\" />\r\n                    <VisualState x:Name=\"Indeterminate\" />\r\n                </VisualStateGroup>\r\n                <VisualStateGroup x:Name=\"FocusStates\">\r\n                    <VisualState x:Name=\"Unfocused\" />\r\n                    <VisualState x:Name=\"Focused\" />\r\n                </VisualStateGroup>\r\n                <VisualStateGroup x:Name=\"ValidationStates\">\r\n                    <VisualState x:Name=\"Valid\" />\r\n                    <VisualState x:Name=\"InvalidFocused\" />\r\n                    <VisualState x:Name=\"InvalidUnfocused\" />\r\n                </VisualStateGroup>\r\n            </VisualStateManager.VisualStateGroups>\r\n            <Grid x:Name=\"Border\" Grid.ColumnSpan=\"2\">\r\n                <Rectangle Margin=\"0,1,0,-1\"\r\n                           Fill=\"{StaticResource Shadow_second_color}\"\r\n                           RadiusX=\"5\"\r\n                           RadiusY=\"5\"\r\n                           d:IsHidden=\"True\" />\r\n                <Rectangle Margin=\"1,0\"\r\n                           Fill=\"{StaticResource Shadow_first_color}\"\r\n                           RadiusX=\"4\"\r\n                           RadiusY=\"4\" />\r\n                <Rectangle x:Name=\"rectangle\"\r\n                           Margin=\"1,0,1,1\"\r\n                           RadiusX=\"2\"\r\n                           RadiusY=\"2\">\r\n                    <Rectangle.Fill>\r\n                        <LinearGradientBrush StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n                            <GradientStop Color=\"{StaticResource Fill_normal_top}\" />\r\n                            <GradientStop Offset=\"1\" Color=\"{StaticResource Fill_normal_bottom}\" />\r\n                        </LinearGradientBrush>\r\n                    </Rectangle.Fill>\r\n                    <Rectangle.Stroke>\r\n                        <LinearGradientBrush StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n                            <GradientStop Color=\"{StaticResource BorderStroke_top}\" />\r\n                            <GradientStop Offset=\"1\" Color=\"{StaticResource BorderStroke_bottom}\" />\r\n                        </LinearGradientBrush>\r\n                    </Rectangle.Stroke>\r\n                </Rectangle>\r\n                <Path x:Name=\"path\"\r\n                      Height=\"1\"\r\n                      Margin=\"3,1,3,0\"\r\n                      VerticalAlignment=\"Top\"\r\n                      Data=\"M2.75,4.66667 L121.083,4.66667\"\r\n                      Fill=\"White\"\r\n                      Stretch=\"Fill\"\r\n                      Stroke=\"{x:Null}\"\r\n                      UseLayoutRounding=\"False\" />\r\n            </Grid>\r\n            <Border x:Name=\"Border2\"\r\n                    Grid.Column=\"0\"\r\n                    Margin=\"1\"\r\n                    Background=\"{StaticResource WindowBackgroundBrush}\"\r\n                    BorderBrush=\"{DynamicResource BorderDarkMainBrush}\"\r\n                    BorderThickness=\"0,0,1,0\"\r\n                    SnapsToDevicePixels=\"True\" />\r\n            <Path x:Name=\"Arrow\"\r\n                  Grid.Column=\"1\"\r\n                  HorizontalAlignment=\"Center\"\r\n                  VerticalAlignment=\"Center\"\r\n                  Data=\"M 0 0 L 4 4 L 8 0 Z\"\r\n                  Fill=\"#FF838383\" />\r\n        </Grid>\r\n    </ControlTemplate>\r\n\r\n    <ControlTemplate x:Key=\"ComboBoxTextBox\" TargetType=\"TextBox\">\r\n        <Border x:Name=\"PART_ContentHost\"\r\n                Background=\"{TemplateBinding Background}\"\r\n                Focusable=\"False\" />\r\n    </ControlTemplate>\r\n\r\n    <Style TargetType=\"ComboBox\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource Text_dark_}\" />\r\n        <Setter Property=\"Validation.ErrorTemplate\" Value=\"{x:Null}\" />\r\n        <Setter Property=\"VerticalAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n        <Setter Property=\"IsEditable\" Value=\"False\" />\r\n        <Setter Property=\"IsReadOnly\" Value=\"True\" />\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"false\" />\r\n        <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\" />\r\n        <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\" />\r\n        <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"true\" />\r\n        <Setter Property=\"Margin\" Value=\"2\" />\r\n        <Setter Property=\"Height\" Value=\"30\" />\r\n        <Setter Property=\"MinHeight\" Value=\"20\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ComboBox\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\" />\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"PART_EditableTextBox\" Storyboard.TargetProperty=\"Foreground.Color\">\r\n                                            <EasingColorKeyFrame KeyTime=\"0\" Value=\"{StaticResource CheckBox_stroke_color}\" />\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <BooleanAnimationUsingKeyFrames Storyboard.TargetName=\"ToggleButton\" Storyboard.TargetProperty=\"(UIElement.IsEnabled)\">\r\n                                            <DiscreteBooleanKeyFrame KeyTime=\"0\" Value=\"True\" />\r\n                                        </BooleanAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                                <VisualState x:Name=\"Focused\" />\r\n                                <VisualState x:Name=\"FocusedDropDown\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"PART_EditableTextBox\" Storyboard.TargetProperty=\"Foreground.Color\">\r\n                                            <EasingColorKeyFrame KeyTime=\"0\" Value=\"{StaticResource TextBox_fill}\" />\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <ToggleButton x:Name=\"ToggleButton\"\r\n                                      Grid.Column=\"2\"\r\n                                      ClickMode=\"Press\"\r\n                                      Focusable=\"false\"\r\n                                      IsChecked=\"{Binding IsDropDownOpen,\r\n                                                          Mode=TwoWay,\r\n                                                          RelativeSource={RelativeSource TemplatedParent}}\"\r\n                                      Template=\"{StaticResource ComboBoxToggleButton}\" />\r\n\r\n                        <ContentPresenter x:Name=\"ContentSite\"\r\n                                          Margin=\"6,3,23,3\"\r\n                                          HorizontalAlignment=\"Left\"\r\n                                          VerticalAlignment=\"Center\"\r\n                                          Content=\"{TemplateBinding SelectionBoxItem}\"\r\n                                          ContentTemplate=\"{TemplateBinding SelectionBoxItemTemplate}\"\r\n                                          ContentTemplateSelector=\"{TemplateBinding ItemTemplateSelector}\"\r\n                                          IsHitTestVisible=\"False\" />\r\n\r\n                        <TextBox x:Name=\"PART_EditableTextBox\"\r\n                                 Margin=\"3,3,23,3\"\r\n                                 HorizontalAlignment=\"Left\"\r\n                                 VerticalAlignment=\"Center\"\r\n                                 Background=\"Transparent\"\r\n                                 Focusable=\"True\"\r\n                                 IsReadOnly=\"{TemplateBinding IsReadOnly}\"\r\n                                 Style=\"{x:Null}\"\r\n                                 Template=\"{StaticResource ComboBoxTextBox}\"\r\n                                 Visibility=\"Hidden\" />\r\n\r\n                        <Popup x:Name=\"Popup\"\r\n                               AllowsTransparency=\"True\"\r\n                               Focusable=\"False\"\r\n                               IsOpen=\"{TemplateBinding IsDropDownOpen}\"\r\n                               Placement=\"Bottom\"\r\n                               PopupAnimation=\"Fade\">\r\n                            <Grid x:Name=\"DropDown\"\r\n                                  MinWidth=\"{TemplateBinding ActualWidth}\"\r\n                                  MaxHeight=\"{TemplateBinding MaxDropDownHeight}\">\r\n                                <Border BorderThickness=\"0\" CornerRadius=\"2\">\r\n                                    <Border.Background>\r\n                                        <SolidColorBrush Color=\"#0C000000\" />\r\n                                    </Border.Background>\r\n                                </Border>\r\n                                <Border x:Name=\"DropDownBorder\"\r\n                                        Margin=\"1\"\r\n                                        BorderBrush=\"{DynamicResource BorderMainBrush}\"\r\n                                        BorderThickness=\"1\"\r\n                                        CornerRadius=\"2\">\r\n                                    <Border.Background>\r\n                                        <SolidColorBrush Color=\"{DynamicResource TextBox_fill}\" />\r\n                                    </Border.Background>\r\n                                </Border>\r\n                                <ScrollViewer Margin=\"2\" SnapsToDevicePixels=\"True\">\r\n                                    <StackPanel IsItemsHost=\"True\"\r\n                                                KeyboardNavigation.DirectionalNavigation=\"Contained\"\r\n                                                TextBlock.Foreground=\"#FF717171\" />\r\n                                </ScrollViewer>\r\n                            </Grid>\r\n                        </Popup>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsDropDownOpen\" Value=\"True\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource Text_light_}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource Text_disabled_}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"HasItems\" Value=\"false\">\r\n                            <Setter TargetName=\"DropDownBorder\" Property=\"MinHeight\" Value=\"95\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                            <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEditable\" Value=\"true\">\r\n                            <Setter Property=\"IsTabStop\" Value=\"false\" />\r\n                            <Setter TargetName=\"PART_EditableTextBox\" Property=\"Visibility\" Value=\"Visible\" />\r\n                            <Setter TargetName=\"ContentSite\" Property=\"Visibility\" Value=\"Hidden\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Style.Triggers />\r\n    </Style>\r\n\r\n    <Geometry x:Key=\"SliderThumbDisabledGeometry\">M -5,-10.5 L 5,-10.5 L 5,10.5 L -5,10.5 Z</Geometry>\r\n    <Geometry x:Key=\"SliderPointedThumbDisabledGeometry\">M 4.5,-8.5 L -4.5,-8.5 L -4.5,4.5 L -0.5,8.5 L 0.5,8.5 L 4.5,4.5 Z</Geometry>\r\n    <Geometry x:Key=\"SliderPointedThumbOuterBorderGeometry\">M 4.5,-7.5 A 1 1 0 0 0 3.5,-8.5 L -3.5,-8.5 A 1 1 0 0 0 -4.5,-7.5 L -4.5,4.5 L -0.5,8.5 L 0.5,8.5 L 4.5,4.5 Z</Geometry>\r\n    <Geometry x:Key=\"SliderPointedThumbMiddleBorderGeometry\">M 3.5,-7.5 L -3.5,-7.5 L -3.5,4.5 L 0,8 L 3.5,4.5 Z</Geometry>\r\n\r\n    <SolidColorBrush x:Key=\"HorizontalSliderTrackNormalBackground\" Color=\"#FFE7EAEA\" />\r\n    <Style x:Key=\"SliderRepeatButtonStyle\" TargetType=\"{x:Type RepeatButton}\">\r\n        <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"false\" />\r\n        <Setter Property=\"Focusable\" Value=\"false\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n                    <Rectangle Fill=\"Transparent\" />\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Geometry x:Key=\"SliderThumbOuterBorderGeometry\">M -5,-9.5 A 1 1 0 0 1 -4,-10.5 L 4,-10.5 A 1 1 0 0 1 5,-9.5 L 5,9.5 A 1 1 0 0 1 4,10.5 L -4,10.5 A 1 1 0 0 1 -5,9.5 Z</Geometry>\r\n    <Geometry x:Key=\"SliderThumbMiddleBorderGeometry\">M -4,-9.5 L 4,-9.5 L 4,9.5 L -4,9.5 Z</Geometry>\r\n\r\n    <Style x:Key=\"HorizontalSliderThumbStyle\" TargetType=\"{x:Type Thumb}\">\r\n        <Setter Property=\"Focusable\" Value=\"false\" />\r\n        <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n        <Setter Property=\"Height\" Value=\"22\" />\r\n        <Setter Property=\"Width\" Value=\"11\" />\r\n        <Setter Property=\"Foreground\" Value=\"Gray\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\" />\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Fill.GradientStops[0].Color\">\r\n                                            <EasingColorKeyFrame KeyTime=\"0\" Value=\"{StaticResource Fill_over_top}\" />\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Fill.GradientStops[1].Color\">\r\n                                            <EasingColorKeyFrame KeyTime=\"0\" Value=\"{StaticResource Fill_over_bottom}\" />\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Offset)\">\r\n                                            <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Offset)\">\r\n                                            <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Canvas SnapsToDevicePixels=\"true\">\r\n                            <Canvas.RenderTransform>\r\n                                <TranslateTransform X=\"5.5\" Y=\"11\" />\r\n                            </Canvas.RenderTransform>\r\n                            <Path x:Name=\"OuterBorder_Copy\"\r\n                                  Margin=\"0,1,0,0\"\r\n                                  Data=\"{StaticResource SliderThumbOuterBorderGeometry}\"\r\n                                  Fill=\"#1E000000\"\r\n                                  Stroke=\"{x:Null}\" />\r\n                            <Path x:Name=\"Background\" Data=\"{StaticResource SliderThumbOuterBorderGeometry}\">\r\n                                <Path.Fill>\r\n                                    <LinearGradientBrush StartPoint=\"0,0\" EndPoint=\"0,1\">\r\n                                        <GradientStop Offset=\"0\" Color=\"{DynamicResource CheckBox_fill_top}\" />\r\n                                        <GradientStop Offset=\"1\" Color=\"{DynamicResource CheckBox_fill_bottom}\" />\r\n                                    </LinearGradientBrush>\r\n                                </Path.Fill>\r\n                            </Path>\r\n                            <Path x:Name=\"OuterBorder\" Data=\"{StaticResource SliderThumbOuterBorderGeometry}\">\r\n                                <Path.Stroke>\r\n                                    <SolidColorBrush Color=\"{DynamicResource CheckBox_stroke_color}\" />\r\n                                </Path.Stroke>\r\n                            </Path>\r\n\r\n                        </Canvas>\r\n                        <Grid Width=\"Auto\"\r\n                              Height=\"Auto\"\r\n                              Margin=\"2,7,2,5\"\r\n                              HorizontalAlignment=\"Stretch\"\r\n                              VerticalAlignment=\"Stretch\"\r\n                              SnapsToDevicePixels=\"False\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition />\r\n                                <RowDefinition />\r\n                                <RowDefinition />\r\n                                <RowDefinition />\r\n                            </Grid.RowDefinitions>\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition />\r\n                                <ColumnDefinition />\r\n                            </Grid.ColumnDefinitions>\r\n                            <Rectangle Width=\"1\"\r\n                                       Height=\"1\"\r\n                                       Fill=\"{DynamicResource Text_light_}\" />\r\n                            <Rectangle Grid.Row=\"1\"\r\n                                       Width=\"1\"\r\n                                       Height=\"1\"\r\n                                       Fill=\"{DynamicResource Text_light_}\" />\r\n                            <Rectangle Grid.Column=\"1\"\r\n                                       Width=\"1\"\r\n                                       Height=\"1\"\r\n                                       Fill=\"{DynamicResource Text_light_}\" />\r\n                            <Rectangle Grid.Row=\"2\"\r\n                                       Width=\"1\"\r\n                                       Height=\"1\"\r\n                                       Fill=\"{DynamicResource Text_light_}\" />\r\n                            <Rectangle Grid.Row=\"1\"\r\n                                       Grid.Column=\"1\"\r\n                                       Width=\"1\"\r\n                                       Height=\"1\"\r\n                                       Fill=\"{DynamicResource Text_light_}\" />\r\n                            <Rectangle Grid.Row=\"3\"\r\n                                       Width=\"1\"\r\n                                       Height=\"1\"\r\n                                       Fill=\"{DynamicResource Text_light_}\" />\r\n                            <Rectangle Grid.Row=\"2\"\r\n                                       Grid.Column=\"1\"\r\n                                       Width=\"1\"\r\n                                       Height=\"1\"\r\n                                       Fill=\"{DynamicResource Text_light_}\" />\r\n                            <Rectangle Grid.Row=\"3\"\r\n                                       Grid.Column=\"1\"\r\n                                       Width=\"1\"\r\n                                       Height=\"1\"\r\n                                       Fill=\"{DynamicResource Text_light_}\" />\r\n                        </Grid>\r\n                        <Grid Width=\"Auto\"\r\n                              Height=\"Auto\"\r\n                              Margin=\"2,6\"\r\n                              HorizontalAlignment=\"Stretch\"\r\n                              VerticalAlignment=\"Stretch\"\r\n                              SnapsToDevicePixels=\"False\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition />\r\n                                <RowDefinition />\r\n                                <RowDefinition />\r\n                                <RowDefinition />\r\n                            </Grid.RowDefinitions>\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition />\r\n                                <ColumnDefinition />\r\n                            </Grid.ColumnDefinitions>\r\n                            <Rectangle Width=\"1\"\r\n                                       Height=\"1\"\r\n                                       Fill=\"{DynamicResource Text_dark_}\" />\r\n                            <Rectangle Grid.Row=\"1\"\r\n                                       Width=\"1\"\r\n                                       Height=\"1\"\r\n                                       Fill=\"{DynamicResource Text_dark_}\" />\r\n                            <Rectangle Grid.Column=\"1\"\r\n                                       Width=\"1\"\r\n                                       Height=\"1\"\r\n                                       Fill=\"{DynamicResource Text_dark_}\" />\r\n                            <Rectangle Grid.Row=\"2\"\r\n                                       Width=\"1\"\r\n                                       Height=\"1\"\r\n                                       Fill=\"{DynamicResource Text_dark_}\" />\r\n                            <Rectangle Grid.Row=\"1\"\r\n                                       Grid.Column=\"1\"\r\n                                       Width=\"1\"\r\n                                       Height=\"1\"\r\n                                       Fill=\"{DynamicResource Text_dark_}\" />\r\n                            <Rectangle Grid.Row=\"3\"\r\n                                       Width=\"1\"\r\n                                       Height=\"1\"\r\n                                       Fill=\"{DynamicResource Text_dark_}\" />\r\n                            <Rectangle Grid.Row=\"2\"\r\n                                       Grid.Column=\"1\"\r\n                                       Width=\"1\"\r\n                                       Height=\"1\"\r\n                                       Fill=\"{DynamicResource Text_dark_}\" />\r\n                            <Rectangle Grid.Row=\"3\"\r\n                                       Grid.Column=\"1\"\r\n                                       Width=\"1\"\r\n                                       Height=\"1\"\r\n                                       Fill=\"{DynamicResource Text_dark_}\" />\r\n                        </Grid>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter TargetName=\"Background\" Property=\"Fill\" Value=\"{StaticResource CheckBox_main_color_}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"VerticalSliderThumbStyle\" TargetType=\"{x:Type Thumb}\">\r\n        <Setter Property=\"Focusable\" Value=\"false\" />\r\n        <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n        <Setter Property=\"Height\" Value=\"11\" />\r\n        <Setter Property=\"Width\" Value=\"22\" />\r\n        <Setter Property=\"Foreground\" Value=\"Gray\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\" />\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Fill.GradientStops[0].Color\">\r\n                                            <EasingColorKeyFrame KeyTime=\"0\" Value=\"{StaticResource Fill_over_top}\" />\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Fill.GradientStops[1].Color\">\r\n                                            <EasingColorKeyFrame KeyTime=\"0\" Value=\"{StaticResource Fill_over_bottom}\" />\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Canvas SnapsToDevicePixels=\"true\">\r\n                            <Canvas.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <TransformGroup.Children>\r\n                                        <TransformCollection>\r\n                                            <RotateTransform Angle=\"90\" />\r\n                                            <TranslateTransform X=\"11\" Y=\"5.5\" />\r\n                                        </TransformCollection>\r\n                                    </TransformGroup.Children>\r\n                                </TransformGroup>\r\n                            </Canvas.RenderTransform>\r\n                            <Path x:Name=\"Background\" Data=\"{StaticResource SliderThumbOuterBorderGeometry}\">\r\n                                <Path.Fill>\r\n                                    <LinearGradientBrush StartPoint=\"0,0\" EndPoint=\"1,0\">\r\n                                        <GradientStop Offset=\"0\" Color=\"{DynamicResource CheckBox_fill_top}\" />\r\n                                        <GradientStop Offset=\"1\" Color=\"{DynamicResource CheckBox_fill_bottom}\" />\r\n                                    </LinearGradientBrush>\r\n                                </Path.Fill>\r\n                            </Path>\r\n                            <Path x:Name=\"InnerBorder\"\r\n                                  Data=\"{StaticResource SliderThumbMiddleBorderGeometry}\"\r\n                                  Stroke=\"White\"\r\n                                  StrokeThickness=\"1\"\r\n                                  Visibility=\"Collapsed\"\r\n                                  d:IsHidden=\"True\" />\r\n                            <Path x:Name=\"OuterBorder\"\r\n                                  Data=\"{StaticResource SliderThumbOuterBorderGeometry}\"\r\n                                  StrokeThickness=\"1\">\r\n                                <Path.Stroke>\r\n                                    <SolidColorBrush Color=\"{DynamicResource CheckBox_stroke_color}\" />\r\n                                </Path.Stroke>\r\n                            </Path>\r\n                        </Canvas>\r\n                        <Grid Width=\"10\"\r\n                              Height=\"6\"\r\n                              Margin=\"0,0,0,-1\"\r\n                              HorizontalAlignment=\"Center\"\r\n                              VerticalAlignment=\"Stretch\"\r\n                              SnapsToDevicePixels=\"False\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition />\r\n                                <RowDefinition />\r\n                            </Grid.RowDefinitions>\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition />\r\n                                <ColumnDefinition />\r\n                                <ColumnDefinition />\r\n                                <ColumnDefinition />\r\n                            </Grid.ColumnDefinitions>\r\n                            <Rectangle Width=\"1\"\r\n                                       Height=\"1\"\r\n                                       Fill=\"{DynamicResource Text_light_}\" />\r\n                            <Rectangle Grid.Row=\"1\"\r\n                                       Width=\"1\"\r\n                                       Height=\"1\"\r\n                                       Fill=\"{DynamicResource Text_light_}\" />\r\n                            <Rectangle Grid.Column=\"1\"\r\n                                       Width=\"1\"\r\n                                       Height=\"1\"\r\n                                       Fill=\"{DynamicResource Text_light_}\" />\r\n                            <Rectangle Grid.Column=\"2\"\r\n                                       Width=\"1\"\r\n                                       Height=\"1\"\r\n                                       Fill=\"{DynamicResource Text_light_}\" />\r\n                            <Rectangle Grid.Row=\"1\"\r\n                                       Grid.Column=\"1\"\r\n                                       Width=\"1\"\r\n                                       Height=\"1\"\r\n                                       Fill=\"{DynamicResource Text_light_}\" />\r\n                            <Rectangle Grid.Column=\"3\"\r\n                                       Width=\"1\"\r\n                                       Height=\"1\"\r\n                                       Fill=\"{DynamicResource Text_light_}\" />\r\n                            <Rectangle Grid.Row=\"1\"\r\n                                       Grid.Column=\"2\"\r\n                                       Width=\"1\"\r\n                                       Height=\"1\"\r\n                                       Fill=\"{DynamicResource Text_light_}\" />\r\n                            <Rectangle Grid.Row=\"1\"\r\n                                       Grid.Column=\"3\"\r\n                                       Width=\"1\"\r\n                                       Height=\"1\"\r\n                                       Fill=\"{DynamicResource Text_light_}\" />\r\n                        </Grid>\r\n                        <Grid Width=\"10\"\r\n                              Height=\"6\"\r\n                              Margin=\"0,2.5\"\r\n                              HorizontalAlignment=\"Center\"\r\n                              VerticalAlignment=\"Stretch\"\r\n                              SnapsToDevicePixels=\"False\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition />\r\n                                <RowDefinition />\r\n                            </Grid.RowDefinitions>\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition />\r\n                                <ColumnDefinition />\r\n                                <ColumnDefinition />\r\n                                <ColumnDefinition />\r\n                            </Grid.ColumnDefinitions>\r\n                            <Rectangle Width=\"1\"\r\n                                       Height=\"1\"\r\n                                       Fill=\"{DynamicResource Text_dark_}\" />\r\n                            <Rectangle Grid.Row=\"1\"\r\n                                       Width=\"1\"\r\n                                       Height=\"1\"\r\n                                       Fill=\"{DynamicResource Text_dark_}\" />\r\n                            <Rectangle Grid.Column=\"1\"\r\n                                       Width=\"1\"\r\n                                       Height=\"1\"\r\n                                       Fill=\"{DynamicResource Text_dark_}\" />\r\n                            <Rectangle Grid.Column=\"2\"\r\n                                       Width=\"1\"\r\n                                       Height=\"1\"\r\n                                       Fill=\"{DynamicResource Text_dark_}\" />\r\n                            <Rectangle Grid.Row=\"1\"\r\n                                       Grid.Column=\"1\"\r\n                                       Width=\"1\"\r\n                                       Height=\"1\"\r\n                                       Fill=\"{DynamicResource Text_dark_}\" />\r\n                            <Rectangle Grid.Column=\"3\"\r\n                                       Width=\"1\"\r\n                                       Height=\"1\"\r\n                                       Fill=\"{DynamicResource Text_dark_}\" />\r\n                            <Rectangle Grid.Row=\"1\"\r\n                                       Grid.Column=\"2\"\r\n                                       Width=\"1\"\r\n                                       Height=\"1\"\r\n                                       Fill=\"{DynamicResource Text_dark_}\" />\r\n                            <Rectangle Grid.Row=\"1\"\r\n                                       Grid.Column=\"3\"\r\n                                       Width=\"1\"\r\n                                       Height=\"1\"\r\n                                       Fill=\"{DynamicResource Text_dark_}\" />\r\n                        </Grid>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter TargetName=\"Background\" Property=\"Fill\" Value=\"{StaticResource CheckBox_main_color_}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type Slider}\">\r\n        <Setter Property=\"Stylus.IsPressAndHoldEnabled\" Value=\"false\" />\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"Foreground\" Value=\"#FFC4C4C4\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Slider}\">\r\n                    <Border Background=\"{TemplateBinding Background}\"\r\n                            BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                            BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                            SnapsToDevicePixels=\"true\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\" />\r\n                                <VisualState x:Name=\"Disabled\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid>\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\" />\r\n                                <RowDefinition Height=\"Auto\" MinHeight=\"{TemplateBinding MinHeight}\" />\r\n                                <RowDefinition Height=\"Auto\" />\r\n                            </Grid.RowDefinitions>\r\n                            <TickBar x:Name=\"TopTick\"\r\n                                     Grid.Row=\"0\"\r\n                                     Height=\"4\"\r\n                                     Fill=\"{TemplateBinding Foreground}\"\r\n                                     Placement=\"Top\"\r\n                                     Visibility=\"Collapsed\" />\r\n                            <TickBar x:Name=\"BottomTick\"\r\n                                     Grid.Row=\"2\"\r\n                                     Height=\"4\"\r\n                                     Fill=\"{TemplateBinding Foreground}\"\r\n                                     Placement=\"Bottom\"\r\n                                     Visibility=\"Collapsed\" />\r\n                            <Border x:Name=\"TrackBackground\"\r\n                                    Grid.Row=\"1\"\r\n                                    Height=\"6\"\r\n                                    Margin=\"5,0\"\r\n                                    VerticalAlignment=\"center\"\r\n                                    BorderThickness=\"1\"\r\n                                    CornerRadius=\"1\">\r\n                                <Border.BorderBrush>\r\n                                    <SolidColorBrush Color=\"{DynamicResource CheckBox_stroke_color}\" />\r\n                                </Border.BorderBrush>\r\n                                <Border.Background>\r\n                                    <SolidColorBrush Color=\"#FFd7d7d7\" />\r\n                                </Border.Background>\r\n                                <Canvas Height=\"6\" Margin=\"0\">\r\n                                    <Rectangle x:Name=\"PART_SelectionRange\"\r\n                                               Height=\"Auto\"\r\n                                               Fill=\"{DynamicResource {x:Static SystemColors.HighlightBrushKey}}\"\r\n                                               Stroke=\"{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}\"\r\n                                               StrokeThickness=\"1.0\"\r\n                                               Visibility=\"Hidden\" />\r\n                                </Canvas>\r\n                            </Border>\r\n                            <Track x:Name=\"PART_Track\" Grid.Row=\"1\">\r\n                                <Track.DecreaseRepeatButton>\r\n                                    <RepeatButton Command=\"{x:Static Slider.DecreaseLarge}\" Style=\"{StaticResource SliderRepeatButtonStyle}\" />\r\n                                </Track.DecreaseRepeatButton>\r\n                                <Track.IncreaseRepeatButton>\r\n                                    <RepeatButton Command=\"{x:Static Slider.IncreaseLarge}\" Style=\"{StaticResource SliderRepeatButtonStyle}\" />\r\n                                </Track.IncreaseRepeatButton>\r\n                                <Track.Thumb>\r\n                                    <Thumb x:Name=\"Thumb\" Style=\"{StaticResource HorizontalSliderThumbStyle}\" />\r\n                                </Track.Thumb>\r\n                            </Track>\r\n                        </Grid>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"TickPlacement\" Value=\"TopLeft\">\r\n                            <Setter TargetName=\"TopTick\" Property=\"Visibility\" Value=\"Visible\" />\r\n\r\n                            <Setter TargetName=\"TrackBackground\" Property=\"Margin\" Value=\"5,2,5,0\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"TickPlacement\" Value=\"BottomRight\">\r\n                            <Setter TargetName=\"BottomTick\" Property=\"Visibility\" Value=\"Visible\" />\r\n                            <Setter TargetName=\"TrackBackground\" Property=\"Margin\" Value=\"5,0,5,2\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"TickPlacement\" Value=\"Both\">\r\n                            <Setter TargetName=\"TopTick\" Property=\"Visibility\" Value=\"Visible\" />\r\n                            <Setter TargetName=\"BottomTick\" Property=\"Visibility\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsSelectionRangeEnabled\" Value=\"true\">\r\n                            <Setter TargetName=\"PART_SelectionRange\" Property=\"Visibility\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                            <Setter TargetName=\"Thumb\" Property=\"Foreground\" Value=\"Blue\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Style.Triggers>\r\n            <Trigger Property=\"Orientation\" Value=\"Vertical\">\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"{x:Type Slider}\">\r\n                            <Border Background=\"{TemplateBinding Background}\"\r\n                                    BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                                    BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                                    SnapsToDevicePixels=\"true\">\r\n                                <Grid>\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition Width=\"Auto\" />\r\n                                        <ColumnDefinition Width=\"Auto\" MinWidth=\"{TemplateBinding MinWidth}\" />\r\n                                        <ColumnDefinition Width=\"Auto\" />\r\n                                    </Grid.ColumnDefinitions>\r\n                                    <TickBar x:Name=\"TopTick\"\r\n                                             Grid.Column=\"0\"\r\n                                             Width=\"4\"\r\n                                             Fill=\"{TemplateBinding Foreground}\"\r\n                                             Placement=\"Left\"\r\n                                             Visibility=\"Collapsed\" />\r\n                                    <TickBar x:Name=\"BottomTick\"\r\n                                             Grid.Column=\"2\"\r\n                                             Width=\"4\"\r\n                                             Fill=\"{TemplateBinding Foreground}\"\r\n                                             Placement=\"Right\"\r\n                                             Visibility=\"Collapsed\" />\r\n                                    <Border x:Name=\"TrackBackground\"\r\n                                            Grid.Column=\"1\"\r\n                                            Width=\"6\"\r\n                                            Margin=\"0,5\"\r\n                                            HorizontalAlignment=\"center\"\r\n                                            BorderThickness=\"1\"\r\n                                            CornerRadius=\"1\">\r\n                                        <Border.Background>\r\n                                            <SolidColorBrush Color=\"{DynamicResource CheckBox_main_color}\" />\r\n                                        </Border.Background>\r\n                                        <Border.BorderBrush>\r\n                                            <SolidColorBrush Color=\"{DynamicResource CheckBox_stroke_color}\" />\r\n                                        </Border.BorderBrush>\r\n                                        <Canvas Margin=\"-1,-6\">\r\n                                            <Rectangle x:Name=\"PART_SelectionRange\"\r\n                                                       Width=\"4.0\"\r\n                                                       Fill=\"{DynamicResource {x:Static SystemColors.HighlightBrushKey}}\"\r\n                                                       Stroke=\"{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}\"\r\n                                                       StrokeThickness=\"1.0\"\r\n                                                       Visibility=\"Hidden\" />\r\n                                        </Canvas>\r\n                                    </Border>\r\n                                    <Track x:Name=\"PART_Track\" Grid.Column=\"1\">\r\n                                        <Track.DecreaseRepeatButton>\r\n                                            <RepeatButton Command=\"{x:Static Slider.DecreaseLarge}\" Style=\"{StaticResource SliderRepeatButtonStyle}\" />\r\n                                        </Track.DecreaseRepeatButton>\r\n                                        <Track.IncreaseRepeatButton>\r\n                                            <RepeatButton Command=\"{x:Static Slider.IncreaseLarge}\" Style=\"{StaticResource SliderRepeatButtonStyle}\" />\r\n                                        </Track.IncreaseRepeatButton>\r\n                                        <Track.Thumb>\r\n                                            <Thumb x:Name=\"Thumb\" Style=\"{StaticResource VerticalSliderThumbStyle}\" />\r\n                                        </Track.Thumb>\r\n                                    </Track>\r\n                                </Grid>\r\n                            </Border>\r\n                            <ControlTemplate.Triggers>\r\n                                <Trigger Property=\"TickPlacement\" Value=\"TopLeft\">\r\n                                    <Setter TargetName=\"TopTick\" Property=\"Visibility\" Value=\"Visible\" />\r\n                                    <Setter TargetName=\"TrackBackground\" Property=\"Margin\" Value=\"2,5,0,5\" />\r\n                                </Trigger>\r\n                                <Trigger Property=\"TickPlacement\" Value=\"BottomRight\">\r\n                                    <Setter TargetName=\"BottomTick\" Property=\"Visibility\" Value=\"Visible\" />\r\n                                    <Setter TargetName=\"TrackBackground\" Property=\"Margin\" Value=\"0,5,2,5\" />\r\n                                </Trigger>\r\n                                <Trigger Property=\"TickPlacement\" Value=\"Both\">\r\n                                    <Setter TargetName=\"TopTick\" Property=\"Visibility\" Value=\"Visible\" />\r\n                                    <Setter TargetName=\"BottomTick\" Property=\"Visibility\" Value=\"Visible\" />\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsSelectionRangeEnabled\" Value=\"true\">\r\n                                    <Setter TargetName=\"PART_SelectionRange\" Property=\"Visibility\" Value=\"Visible\" />\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                                    <Setter TargetName=\"Thumb\" Property=\"Foreground\" Value=\"Blue\" />\r\n                                </Trigger>\r\n                            </ControlTemplate.Triggers>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Trigger>\r\n        </Style.Triggers>\r\n    </Style>\r\n\r\n    <SolidColorBrush x:Key=\"CheckBoxStroke\" Color=\"#8E8F8F\" />\r\n\r\n    <Style x:Key=\"CheckRadioFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Rectangle Margin=\"14,0,0,0\"\r\n                               SnapsToDevicePixels=\"true\"\r\n                               Stroke=\"{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}\"\r\n                               StrokeDashArray=\"1 2\"\r\n                               StrokeThickness=\"1\" />\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type RadioButton}\">\r\n        <Setter Property=\"Foreground\" Value=\"#FF313131\" />\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type RadioButton}\">\r\n                    <BulletDecorator Background=\"Transparent\">\r\n                        <BulletDecorator.Bullet>\r\n                            <Grid Width=\"13\" Height=\"13\">\r\n                                <Ellipse x:Name=\"Border\" StrokeThickness=\"1\">\r\n                                    <Ellipse.Stroke>\r\n                                        <SolidColorBrush Color=\"{DynamicResource CheckBox_stroke_color}\" />\r\n                                    </Ellipse.Stroke>\r\n                                    <Ellipse.Fill>\r\n                                        <SolidColorBrush Color=\"{DynamicResource CheckBox_main_color}\" />\r\n                                    </Ellipse.Fill>\r\n                                </Ellipse>\r\n                                <Ellipse x:Name=\"CheckMark\"\r\n                                         Margin=\"4\"\r\n                                         Fill=\"{DynamicResource Fill_pressed_dark_}\" />\r\n                            </Grid>\r\n                        </BulletDecorator.Bullet>\r\n                        <ContentPresenter Margin=\"4,0,0,0\"\r\n                                          HorizontalAlignment=\"Left\"\r\n                                          VerticalAlignment=\"Center\"\r\n                                          RecognizesAccessKey=\"True\" />\r\n                    </BulletDecorator>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsChecked\" Value=\"false\">\r\n                            <Setter TargetName=\"CheckMark\" Property=\"Visibility\" Value=\"Collapsed\" />\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Setter TargetName=\"Border\" Property=\"Fill\" Value=\"{DynamicResource CheckBox_fill_bottom_}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Setter TargetName=\"Border\" Property=\"Fill\" Value=\"#EEE\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Setter TargetName=\"Border\" Property=\"Fill\" Value=\"{DynamicResource Fill_pressed_dark_}\" />\r\n                            <Setter TargetName=\"Border\" Property=\"Stroke\" Value=\"{DynamicResource Fill_pressed_light_}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter TargetName=\"Border\" Property=\"Fill\" Value=\"{DynamicResource CheckBox_fill_bottom_}\" />\r\n                            <Setter TargetName=\"Border\" Property=\"Stroke\" Value=\"{DynamicResource CheckBox_stroke_color_}\" />\r\n                            <Setter Property=\"Foreground\" Value=\"#80000000\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n\r\n\r\n    <SolidColorBrush x:Key=\"ListBorder\" Color=\"#828790\" />\r\n\r\n    <Style TargetType=\"{x:Type ListBox}\">\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource TextBox_fill_}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource CheckBox_stroke_color_}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource Text_dark_}\" />\r\n        <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\" />\r\n        <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\" />\r\n        <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"true\" />\r\n        <Setter Property=\"ScrollViewer.PanningMode\" Value=\"Both\" />\r\n        <Setter Property=\"Stylus.IsFlicksEnabled\" Value=\"False\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListBox}\">\r\n                    <Border x:Name=\"Bd\"\r\n                            Background=\"{TemplateBinding Background}\"\r\n                            BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                            BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                            CornerRadius=\"1\"\r\n                            Padding=\"1\"\r\n                            SnapsToDevicePixels=\"true\">\r\n                        <ScrollViewer Focusable=\"false\" Padding=\"{TemplateBinding Padding}\">\r\n                            <ItemsPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" />\r\n                        </ScrollViewer>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter TargetName=\"Bd\" Property=\"Background\" Value=\"{DynamicResource {x:Static SystemColors.ControlBrushKey}}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                            <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"RadioButtonLarge\" TargetType=\"{x:Type RadioButton}\">\r\n        <Setter Property=\"Foreground\" Value=\"#FF313131\" />\r\n        <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type RadioButton}\">\r\n                    <BulletDecorator Background=\"Transparent\">\r\n                        <BulletDecorator.Bullet>\r\n                            <Grid Width=\"23\" Height=\"23\">\r\n                                <Ellipse x:Name=\"Border\" StrokeThickness=\"1\">\r\n                                    <Ellipse.Stroke>\r\n                                        <SolidColorBrush Color=\"{DynamicResource CheckBox_stroke_color}\" />\r\n                                    </Ellipse.Stroke>\r\n                                    <Ellipse.Fill>\r\n                                        <SolidColorBrush Color=\"{DynamicResource CheckBox_main_color}\" />\r\n                                    </Ellipse.Fill>\r\n                                </Ellipse>\r\n                                <Ellipse x:Name=\"CheckMark\"\r\n                                         Margin=\"6\"\r\n                                         Fill=\"{DynamicResource Fill_pressed_dark_}\" />\r\n                            </Grid>\r\n                        </BulletDecorator.Bullet>\r\n                        <ContentPresenter Margin=\"6,0,0,0\"\r\n                                          HorizontalAlignment=\"Left\"\r\n                                          VerticalAlignment=\"Center\"\r\n                                          RecognizesAccessKey=\"True\" />\r\n                    </BulletDecorator>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsChecked\" Value=\"false\">\r\n                            <Setter TargetName=\"CheckMark\" Property=\"Visibility\" Value=\"Collapsed\" />\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Setter TargetName=\"Border\" Property=\"Fill\" Value=\"{DynamicResource CheckBox_fill_bottom_}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Setter TargetName=\"Border\" Property=\"Fill\" Value=\"#EEE\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Setter TargetName=\"Border\" Property=\"Fill\" Value=\"{DynamicResource Fill_pressed_dark_}\" />\r\n                            <Setter TargetName=\"Border\" Property=\"Stroke\" Value=\"{DynamicResource Fill_pressed_light_}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter TargetName=\"Border\" Property=\"Fill\" Value=\"#000\" />\r\n                            <Setter TargetName=\"Border\" Property=\"Stroke\" Value=\"#40000000\" />\r\n                            <Setter Property=\"Foreground\" Value=\"#80000000\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <LinearGradientBrush x:Key=\"TextBoxBorder\" MappingMode=\"Absolute\" StartPoint=\"0,0\" EndPoint=\"0,20\">\r\n        <GradientStop Offset=\"0.05\" Color=\"#ABADB3\" />\r\n        <GradientStop Offset=\"0.07\" Color=\"#E2E3EA\" />\r\n        <GradientStop Offset=\"1\" Color=\"#E3E9EF\" />\r\n    </LinearGradientBrush>\r\n\r\n\r\n    <Style TargetType=\"{x:Type TextBox}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource Text_dark_}\" />\r\n        <Setter Property=\"Background\" Value=\"#55FFFFFF\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource TextBoxBorder}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"0\" />\r\n        <Setter Property=\"Padding\" Value=\"1\" />\r\n        <Setter Property=\"AllowDrop\" Value=\"true\" />\r\n        <Setter Property=\"Height\" Value=\"30\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\" />\r\n        <Setter Property=\"Stylus.IsFlicksEnabled\" Value=\"False\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TextBox}\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"Disabled\" />\r\n                                <VisualState x:Name=\"ReadOnly\" />\r\n                                <VisualState x:Name=\"MouseOver\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Rectangle x:Name=\"rectangle1\"\r\n                                   Margin=\"0,1,0,-1\"\r\n                                   Fill=\"{TemplateBinding Background}\"\r\n                                   RadiusX=\"3\"\r\n                                   RadiusY=\"3\" />\r\n                        <Rectangle x:Name=\"rectangle\"\r\n                                   Margin=\"0\"\r\n                                   RadiusX=\"3\"\r\n                                   RadiusY=\"3\">\r\n                            <Rectangle.Fill>\r\n                                <SolidColorBrush Color=\"{StaticResource TextBox_fill}\" />\r\n                            </Rectangle.Fill>\r\n                            <Rectangle.Stroke>\r\n                                <SolidColorBrush Color=\"{StaticResource CheckBox_stroke_color}\" />\r\n                            </Rectangle.Stroke>\r\n                        </Rectangle>\r\n                        <Grid Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"Center\">\r\n                            <ScrollViewer x:Name=\"PART_ContentHost\"\r\n                                          Margin=\"1\"\r\n                                          VerticalContentAlignment=\"Stretch\"\r\n                                          BorderThickness=\"0\"\r\n                                          CanContentScroll=\"False\"\r\n                                          Foreground=\"{DynamicResource Text_dark_}\"\r\n                                          IsTabStop=\"False\"\r\n                                          Padding=\"{TemplateBinding Padding}\" />\r\n                        </Grid>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter TargetName=\"rectangle\" Property=\"Fill\" Value=\"{DynamicResource CheckBox_fill_bottom_}\" />\r\n                            <Setter TargetName=\"PART_ContentHost\" Property=\"Background\" Value=\"#00000000\" />\r\n                            <Setter Property=\"Foreground\" Value=\"#80000000\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"CheckToogleButton\" TargetType=\"{x:Type CheckBox}\">\r\n        <Setter Property=\"Foreground\" Value=\"#FF313131\" />\r\n        <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type CheckBox}\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.2\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"PointerOver\" />\r\n                                <VisualState x:Name=\"Pressed\" />\r\n                                <VisualState x:Name=\"Disabled\" />\r\n                                <VisualState x:Name=\"CheckedPointerOver\" />\r\n                                <VisualState x:Name=\"CheckedPressed\" />\r\n                                <VisualState x:Name=\"CheckedDisabled\" />\r\n                                <VisualState x:Name=\"Indeterminate2\" />\r\n                                <VisualState x:Name=\"IndeterminatePointerOver\" />\r\n                                <VisualState x:Name=\"IndeterminatePressed\" />\r\n                                <VisualState x:Name=\"IndeterminateDisabled\" />\r\n                                <VisualState x:Name=\"Normal\" />\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.2\">\r\n                                        <VisualTransition.GeneratedEasingFunction>\r\n                                            <QuinticEase EasingMode=\"EaseOut\" />\r\n                                        </VisualTransition.GeneratedEasingFunction>\r\n                                    </VisualTransition>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ChToogleButton\" Storyboard.TargetProperty=\"RenderTransform.Children[3].X\">\r\n                                            <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"25\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\" />\r\n                                <VisualState x:Name=\"Indeterminate\" />\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                                <VisualState x:Name=\"PointerFocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid x:Name=\"ChToogleStateBackground\" Margin=\"0,0,1,0\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition />\r\n                                <ColumnDefinition />\r\n                            </Grid.ColumnDefinitions>\r\n                            <Border x:Name=\"ChTglBorderON\"\r\n                                    Margin=\"1,0,0,1\"\r\n                                    BorderThickness=\"1\"\r\n                                    CornerRadius=\"3\">\r\n                                <Border.BorderBrush>\r\n                                    <SolidColorBrush Color=\"{DynamicResource CheckBox_stroke_color}\" />\r\n                                </Border.BorderBrush>\r\n                                <Border.Background>\r\n                                    <SolidColorBrush Color=\"{DynamicResource Fill_active_bottom}\" />\r\n                                </Border.Background>\r\n                            </Border>\r\n                            <Border x:Name=\"ChTglBorderOFF\"\r\n                                    Grid.Column=\"1\"\r\n                                    Margin=\"0,0,1,1\"\r\n                                    BorderThickness=\"1\"\r\n                                    CornerRadius=\"3\">\r\n                                <Border.BorderBrush>\r\n                                    <SolidColorBrush Color=\"{DynamicResource Text_dark}\" />\r\n                                </Border.BorderBrush>\r\n                                <Border.Background>\r\n                                    <LinearGradientBrush StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n                                        <GradientStop Offset=\"0\" Color=\"{DynamicResource Fill_pressed_dark}\" />\r\n                                        <GradientStop Offset=\"0.327\" Color=\"{DynamicResource Fill_pressed_light}\" />\r\n                                    </LinearGradientBrush>\r\n                                </Border.Background>\r\n                            </Border>\r\n                            <TextBlock Grid.Column=\"1\"\r\n                                       HorizontalAlignment=\"Right\"\r\n                                       VerticalAlignment=\"Center\"\r\n                                       FontSize=\"8\"\r\n                                       FontWeight=\"Bold\"\r\n                                       Padding=\"0,0,6,0\"\r\n                                       SnapsToDevicePixels=\"True\"\r\n                                       Text=\"OFF\">\r\n                                <TextBlock.Foreground>\r\n                                    <SolidColorBrush Color=\"{DynamicResource TextBox_fill}\" />\r\n                                </TextBlock.Foreground>\r\n                            </TextBlock>\r\n                            <TextBlock Grid.Column=\"0\"\r\n                                       HorizontalAlignment=\"Left\"\r\n                                       VerticalAlignment=\"Center\"\r\n                                       FontSize=\"8\"\r\n                                       FontWeight=\"Bold\"\r\n                                       Padding=\"6,0,0,0\"\r\n                                       SnapsToDevicePixels=\"True\"\r\n                                       Text=\"ON\">\r\n                                <TextBlock.Foreground>\r\n                                    <SolidColorBrush Color=\"{DynamicResource TextBox_fill}\" />\r\n                                </TextBlock.Foreground>\r\n                            </TextBlock>\r\n                        </Grid>\r\n                        <Grid x:Name=\"ChToogleButton\"\r\n                              Margin=\"0,0,25,0\"\r\n                              RenderTransformOrigin=\"0.5,0.5\">\r\n                            <Grid.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform />\r\n                                    <SkewTransform />\r\n                                    <RotateTransform />\r\n                                    <TranslateTransform X=\"0\" />\r\n                                </TransformGroup>\r\n                            </Grid.RenderTransform>\r\n                            <Rectangle Margin=\"0,1,0,-1\"\r\n                                       Fill=\"{StaticResource Shadow_second_color}\"\r\n                                       RadiusX=\"5\"\r\n                                       RadiusY=\"5\"\r\n                                       d:IsHidden=\"True\" />\r\n                            <Rectangle Margin=\"1,0\"\r\n                                       Fill=\"{StaticResource Shadow_first_color}\"\r\n                                       RadiusX=\"4\"\r\n                                       RadiusY=\"4\" />\r\n                            <Rectangle x:Name=\"rectangle\"\r\n                                       Margin=\"1,0,1,1\"\r\n                                       RadiusX=\"2\"\r\n                                       RadiusY=\"2\">\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n                                        <GradientStop Color=\"{StaticResource Fill_normal_top}\" />\r\n                                        <GradientStop Offset=\"1\" Color=\"{StaticResource Fill_normal_bottom}\" />\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                                <Rectangle.Stroke>\r\n                                    <LinearGradientBrush StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n                                        <GradientStop Color=\"{StaticResource BorderStroke_top}\" />\r\n                                        <GradientStop Offset=\"1\" Color=\"{StaticResource BorderStroke_bottom}\" />\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Stroke>\r\n                            </Rectangle>\r\n                            <Grid x:Name=\"ChToogleText\" Margin=\"0,0,0.4,0.4\">\r\n                                <TextBlock x:Name=\"ChTglBackText\"\r\n                                           Grid.Column=\"1\"\r\n                                           Margin=\"7,1,0,-1\"\r\n                                           HorizontalAlignment=\"Center\"\r\n                                           VerticalAlignment=\"Center\"\r\n                                           FontFamily=\"{TemplateBinding FontFamily}\"\r\n                                           FontSize=\"{TemplateBinding FontSize}\"\r\n                                           FontStyle=\"{TemplateBinding FontStyle}\"\r\n                                           FontWeight=\"{TemplateBinding FontWeight}\"\r\n                                           Foreground=\"White\"\r\n                                           Text=\"{TemplateBinding Content}\"\r\n                                           TextWrapping=\"Wrap\" />\r\n                                <TextBlock x:Name=\"ChTglMainText\"\r\n                                           Grid.Column=\"1\"\r\n                                           Margin=\"7,0,0,0\"\r\n                                           HorizontalAlignment=\"Center\"\r\n                                           VerticalAlignment=\"Center\"\r\n                                           Panel.ZIndex=\"1\"\r\n                                           FontFamily=\"{TemplateBinding FontFamily}\"\r\n                                           FontSize=\"{TemplateBinding FontSize}\"\r\n                                           FontStyle=\"{TemplateBinding FontStyle}\"\r\n                                           FontWeight=\"{TemplateBinding FontWeight}\"\r\n                                           IsEnabled=\"False\"\r\n                                           Text=\"{TemplateBinding Content}\"\r\n                                           TextWrapping=\"Wrap\"\r\n                                           ToolTipService.ToolTip=\"{TemplateBinding ToolTipService.ToolTip}\">\r\n                                    <TextBlock.Foreground>\r\n                                        <SolidColorBrush Color=\"{DynamicResource Text_dark}\" />\r\n                                    </TextBlock.Foreground>\r\n                                </TextBlock>\r\n                            </Grid>\r\n                            <Grid Margin=\"0\">\r\n                                <Grid Width=\"7\"\r\n                                      Height=\"10\"\r\n                                      Margin=\"4,0,0,-1\"\r\n                                      HorizontalAlignment=\"Left\"\r\n                                      VerticalAlignment=\"Center\"\r\n                                      SnapsToDevicePixels=\"False\">\r\n                                    <Grid.RowDefinitions>\r\n                                        <RowDefinition />\r\n                                        <RowDefinition />\r\n                                        <RowDefinition />\r\n                                        <RowDefinition />\r\n                                    </Grid.RowDefinitions>\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition />\r\n                                        <ColumnDefinition />\r\n                                    </Grid.ColumnDefinitions>\r\n                                    <Rectangle Width=\"1\"\r\n                                               Height=\"1\"\r\n                                               Fill=\"{DynamicResource Text_light_}\" />\r\n                                    <Rectangle Grid.Row=\"1\"\r\n                                               Width=\"1\"\r\n                                               Height=\"1\"\r\n                                               Fill=\"{DynamicResource Text_light_}\" />\r\n                                    <Rectangle Grid.Column=\"1\"\r\n                                               Width=\"1\"\r\n                                               Height=\"1\"\r\n                                               Fill=\"{DynamicResource Text_light_}\" />\r\n                                    <Rectangle Grid.Row=\"2\"\r\n                                               Width=\"1\"\r\n                                               Height=\"1\"\r\n                                               Fill=\"{DynamicResource Text_light_}\" />\r\n                                    <Rectangle Grid.Row=\"1\"\r\n                                               Grid.Column=\"1\"\r\n                                               Width=\"1\"\r\n                                               Height=\"1\"\r\n                                               Fill=\"{DynamicResource Text_light_}\" />\r\n                                    <Rectangle Grid.Row=\"3\"\r\n                                               Width=\"1\"\r\n                                               Height=\"1\"\r\n                                               Fill=\"{DynamicResource Text_light_}\" />\r\n                                    <Rectangle Grid.Row=\"2\"\r\n                                               Grid.Column=\"1\"\r\n                                               Width=\"1\"\r\n                                               Height=\"1\"\r\n                                               Fill=\"{DynamicResource Text_light_}\" />\r\n                                    <Rectangle Grid.Row=\"3\"\r\n                                               Grid.Column=\"1\"\r\n                                               Width=\"1\"\r\n                                               Height=\"1\"\r\n                                               Fill=\"{DynamicResource Text_light_}\" />\r\n                                </Grid>\r\n                                <Grid Width=\"7\"\r\n                                      Height=\"10\"\r\n                                      Margin=\"4,0,0,0\"\r\n                                      HorizontalAlignment=\"Left\"\r\n                                      VerticalAlignment=\"Center\"\r\n                                      SnapsToDevicePixels=\"False\">\r\n                                    <Grid.RowDefinitions>\r\n                                        <RowDefinition />\r\n                                        <RowDefinition />\r\n                                        <RowDefinition />\r\n                                        <RowDefinition />\r\n                                    </Grid.RowDefinitions>\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition />\r\n                                        <ColumnDefinition />\r\n                                    </Grid.ColumnDefinitions>\r\n                                    <Rectangle Width=\"1\"\r\n                                               Height=\"1\"\r\n                                               Fill=\"{DynamicResource Text_dark_}\" />\r\n                                    <Rectangle Grid.Row=\"1\"\r\n                                               Width=\"1\"\r\n                                               Height=\"1\"\r\n                                               Fill=\"{DynamicResource Text_dark_}\" />\r\n                                    <Rectangle Grid.Column=\"1\"\r\n                                               Width=\"1\"\r\n                                               Height=\"1\"\r\n                                               Fill=\"{DynamicResource Text_dark_}\" />\r\n                                    <Rectangle Grid.Row=\"2\"\r\n                                               Width=\"1\"\r\n                                               Height=\"1\"\r\n                                               Fill=\"{DynamicResource Text_dark_}\" />\r\n                                    <Rectangle Grid.Row=\"1\"\r\n                                               Grid.Column=\"1\"\r\n                                               Width=\"1\"\r\n                                               Height=\"1\"\r\n                                               Fill=\"{DynamicResource Text_dark_}\" />\r\n                                    <Rectangle Grid.Row=\"3\"\r\n                                               Width=\"1\"\r\n                                               Height=\"1\"\r\n                                               Fill=\"{DynamicResource Text_dark_}\" />\r\n                                    <Rectangle Grid.Row=\"2\"\r\n                                               Grid.Column=\"1\"\r\n                                               Width=\"1\"\r\n                                               Height=\"1\"\r\n                                               Fill=\"{DynamicResource Text_dark_}\" />\r\n                                    <Rectangle Grid.Row=\"3\"\r\n                                               Grid.Column=\"1\"\r\n                                               Width=\"1\"\r\n                                               Height=\"1\"\r\n                                               Fill=\"{DynamicResource Text_dark_}\" />\r\n                                </Grid>\r\n                                <Grid Width=\"7\"\r\n                                      Height=\"10\"\r\n                                      Margin=\"0,0,4,-1\"\r\n                                      HorizontalAlignment=\"Right\"\r\n                                      VerticalAlignment=\"Center\"\r\n                                      SnapsToDevicePixels=\"False\">\r\n                                    <Grid.RowDefinitions>\r\n                                        <RowDefinition />\r\n                                        <RowDefinition />\r\n                                        <RowDefinition />\r\n                                        <RowDefinition />\r\n                                    </Grid.RowDefinitions>\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition />\r\n                                        <ColumnDefinition />\r\n                                    </Grid.ColumnDefinitions>\r\n                                    <Rectangle Width=\"1\"\r\n                                               Height=\"1\"\r\n                                               Fill=\"{DynamicResource Text_light_}\" />\r\n                                    <Rectangle Grid.Row=\"1\"\r\n                                               Width=\"1\"\r\n                                               Height=\"1\"\r\n                                               Fill=\"{DynamicResource Text_light_}\" />\r\n                                    <Rectangle Grid.Column=\"1\"\r\n                                               Width=\"1\"\r\n                                               Height=\"1\"\r\n                                               Fill=\"{DynamicResource Text_light_}\" />\r\n                                    <Rectangle Grid.Row=\"2\"\r\n                                               Width=\"1\"\r\n                                               Height=\"1\"\r\n                                               Fill=\"{DynamicResource Text_light_}\" />\r\n                                    <Rectangle Grid.Row=\"1\"\r\n                                               Grid.Column=\"1\"\r\n                                               Width=\"1\"\r\n                                               Height=\"1\"\r\n                                               Fill=\"{DynamicResource Text_light_}\" />\r\n                                    <Rectangle Grid.Row=\"3\"\r\n                                               Width=\"1\"\r\n                                               Height=\"1\"\r\n                                               Fill=\"{DynamicResource Text_light_}\" />\r\n                                    <Rectangle Grid.Row=\"2\"\r\n                                               Grid.Column=\"1\"\r\n                                               Width=\"1\"\r\n                                               Height=\"1\"\r\n                                               Fill=\"{DynamicResource Text_light_}\" />\r\n                                    <Rectangle Grid.Row=\"3\"\r\n                                               Grid.Column=\"1\"\r\n                                               Width=\"1\"\r\n                                               Height=\"1\"\r\n                                               Fill=\"{DynamicResource Text_light_}\" />\r\n                                </Grid>\r\n                                <Grid Width=\"7\"\r\n                                      Height=\"10\"\r\n                                      Margin=\"0,0,4,0\"\r\n                                      HorizontalAlignment=\"Right\"\r\n                                      VerticalAlignment=\"Center\"\r\n                                      SnapsToDevicePixels=\"False\">\r\n                                    <Grid.RowDefinitions>\r\n                                        <RowDefinition />\r\n                                        <RowDefinition />\r\n                                        <RowDefinition />\r\n                                        <RowDefinition />\r\n                                    </Grid.RowDefinitions>\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition />\r\n                                        <ColumnDefinition />\r\n                                    </Grid.ColumnDefinitions>\r\n                                    <Rectangle Width=\"1\"\r\n                                               Height=\"1\"\r\n                                               Fill=\"{DynamicResource Text_dark_}\" />\r\n                                    <Rectangle Grid.Row=\"1\"\r\n                                               Width=\"1\"\r\n                                               Height=\"1\"\r\n                                               Fill=\"{DynamicResource Text_dark_}\" />\r\n                                    <Rectangle Grid.Column=\"1\"\r\n                                               Width=\"1\"\r\n                                               Height=\"1\"\r\n                                               Fill=\"{DynamicResource Text_dark_}\" />\r\n                                    <Rectangle Grid.Row=\"2\"\r\n                                               Width=\"1\"\r\n                                               Height=\"1\"\r\n                                               Fill=\"{DynamicResource Text_dark_}\" />\r\n                                    <Rectangle Grid.Row=\"1\"\r\n                                               Grid.Column=\"1\"\r\n                                               Width=\"1\"\r\n                                               Height=\"1\"\r\n                                               Fill=\"{DynamicResource Text_dark_}\" />\r\n                                    <Rectangle Grid.Row=\"3\"\r\n                                               Width=\"1\"\r\n                                               Height=\"1\"\r\n                                               Fill=\"{DynamicResource Text_dark_}\" />\r\n                                    <Rectangle Grid.Row=\"2\"\r\n                                               Grid.Column=\"1\"\r\n                                               Width=\"1\"\r\n                                               Height=\"1\"\r\n                                               Fill=\"{DynamicResource Text_dark_}\" />\r\n                                    <Rectangle Grid.Row=\"3\"\r\n                                               Grid.Column=\"1\"\r\n                                               Width=\"1\"\r\n                                               Height=\"1\"\r\n                                               Fill=\"{DynamicResource Text_dark_}\" />\r\n                                </Grid>\r\n                            </Grid>\r\n                        </Grid>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter TargetName=\"ChTglMainText\" Property=\"Foreground\" Value=\"#80000000\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type ListBoxItem}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListBoxItem}\">\r\n                    <Grid>\r\n                        <Rectangle x:Name=\"Backgrd\" />\r\n                        <Border x:Name=\"IconBorder\"\r\n                                Background=\"Transparent\"\r\n                                BorderThickness=\"2\"\r\n                                CornerRadius=\"2\"\r\n                                Padding=\"2,4\">\r\n                            <ContentPresenter x:Name=\"TextData\" />\r\n                        </Border>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsSelected\" Value=\"true\">\r\n                            <Setter TargetName=\"Backgrd\" Property=\"Fill\" Value=\"{DynamicResource ActiveBrush}\" />\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource Text_light_}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type ComboBoxItem}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListBoxItem}\">\r\n                    <Grid>\r\n                        <Rectangle x:Name=\"Backgrd\" />\r\n                        <Border x:Name=\"IconBorder\"\r\n                                Background=\"Transparent\"\r\n                                BorderThickness=\"2\"\r\n                                CornerRadius=\"2\"\r\n                                Padding=\"2,4\">\r\n                            <ContentPresenter x:Name=\"TextData\" />\r\n                        </Border>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsSelected\" Value=\"true\">\r\n                            <Setter TargetName=\"Backgrd\" Property=\"Fill\" Value=\"{DynamicResource ActiveBrush}\" />\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource Text_light_}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsSelected\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource Text_dark_}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <LinearGradientBrush x:Key=\"ActiveBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n        <GradientStop Offset=\"0.31\" Color=\"{StaticResource Fill_active_top}\" />\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Fill_active_bottom}\" />\r\n    </LinearGradientBrush>\r\n\r\n</ResourceDictionary>\r\n"
  },
  {
    "path": "WpfToolkit/WPF.Themes/Office2010Blue/Office2010Blue.MSControls.Toolkit.Implicit.xaml",
    "content": "﻿<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" \r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" \r\n                    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\" \r\n                    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" \r\n                    xmlns:sys=\"clr-namespace:System;assembly=mscorlib\" \r\n                    xmlns:inputToolkit=\"clr-namespace:System.Windows.Controls;assembly=DotNetProjects.Input.Toolkit\" \r\n                    xmlns:inputToolkitPrimitives=\"clr-namespace:System.Windows.Controls.Primitives;assembly=DotNetProjects.Input.Toolkit\" \r\n                    xmlns:layoutToolkitPrimitives=\"clr-namespace:System.Windows.Controls.Primitives;assembly=DotNetProjects.Layout.Toolkit\" \r\n                    xmlns:layoutToolkit=\"clr-namespace:System.Windows.Controls;assembly=DotNetProjects.Layout.Toolkit\" \r\n                    mc:Ignorable=\"d\">\r\n\r\n\t<!-- *********************************  RESOURCES  ********************************* -->\r\n\t<ResourceDictionary.MergedDictionaries>\r\n\t\t<ResourceDictionary Source=\"Styles.WPF.xaml\" />\r\n\t</ResourceDictionary.MergedDictionaries>\r\n\r\n\t<!-- *********************************  BRUSHES  ********************************* -->\r\n\t<!-- Rating Brushes -->\r\n\t<SolidColorBrush x:Key=\"RatingReadOnlyBackgroundBrush\" Color=\"{StaticResource Color_0331}\" />\r\n\t<SolidColorBrush x:Key=\"RatingReadOnlyBorderBrush\" Color=\"{StaticResource Color_0331}\" />\r\n\t<SolidColorBrush x:Key=\"RatingDisabledBackgroundBrush\" Color=\"{StaticResource Color_004}\" />\r\n\t<SolidColorBrush x:Key=\"RatingDisabledBorderBrush\" Color=\"{StaticResource Color_0331}\" />\r\n\r\n\t<!-- RatingItem Brushes -->\r\n\t<LinearGradientBrush x:Key=\"RatingItemBackgroundBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n\t\t<GradientStop Color=\"{StaticResource Color_030}\" Offset=\"1\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_032}\" />\r\n\t</LinearGradientBrush>\r\n\t<SolidColorBrush x:Key=\"RatingItemBorderBrush\" Color=\"{StaticResource Color_027}\" />\r\n\t<LinearGradientBrush x:Key=\"RatingItemHoverBackgroundBrush\" StartPoint=\"0,0\" EndPoint=\"0,1\">\r\n\t\t<GradientStop Offset=\"0\" Color=\"{StaticResource Color_018}\" />\r\n\t\t<GradientStop Offset=\"0.23\" Color=\"{StaticResource Color_017}\" />\r\n\t\t<GradientStop Offset=\"0.75\" Color=\"{StaticResource Color_017}\" />\r\n\t\t<GradientStop Offset=\"1\" Color=\"{StaticResource Color_019}\" />\r\n\t</LinearGradientBrush>\r\n\t<LinearGradientBrush x:Key=\"RatingItemHoverBorderBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n\t\t<GradientStop Offset=\"1\" Color=\"{StaticResource Color_013}\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_014}\" />\r\n\t</LinearGradientBrush>\r\n\t<SolidColorBrush x:Key=\"RatingItemHoverHiglightBorderBrush\" Color=\"{StaticResource Color_005}\" />\r\n\t<LinearGradientBrush x:Key=\"RatingItemActiveBackgroundBrush\" StartPoint=\"0,0 \" EndPoint=\"0,1 \">\r\n\t\t<GradientStop Offset=\"1\" Color=\"{StaticResource Color_017}\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_016}\" />\r\n\t</LinearGradientBrush>\r\n\t<LinearGradientBrush x:Key=\"RatingItemActiveBorderBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n\t\t<GradientStop Offset=\"0\" Color=\"{StaticResource Color_012}\" />\r\n\t\t<GradientStop Offset=\"1\" Color=\"{StaticResource Color_013}\" />\r\n\t</LinearGradientBrush>\r\n\t<LinearGradientBrush x:Key=\"RatingItemReadOnlyBackgroundBrush\" StartPoint=\"0,0 \" EndPoint=\"0,1 \">\r\n\t\t<GradientStop Offset=\"1\" Color=\"{StaticResource Color_017}\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_016}\" />\r\n\t</LinearGradientBrush>\r\n\t<LinearGradientBrush x:Key=\"RatingItemReadOnlyBorderBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n\t\t<GradientStop Offset=\"1\" Color=\"{StaticResource Color_013}\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_014}\" />\r\n\t</LinearGradientBrush>\r\n\t<SolidColorBrush x:Key=\"RatingItemDisabledBackgroundBrush\" Color=\"{StaticResource Color_032}\" />\r\n\t<SolidColorBrush x:Key=\"RatingItemDisabledBorderBrush\" Color=\"{StaticResource Color_030}\" />\r\n\r\n\t<!-- Accordion Brushes -->\r\n\t<LinearGradientBrush x:Key=\"AccordionBorderBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n\t\t<GradientStop Color=\"{StaticResource Color_029}\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_027}\" Offset=\"1\" />\r\n\t</LinearGradientBrush>\r\n\t<SolidColorBrush x:Key=\"AccordionBackgroundBrush\" Color=\"{StaticResource Color_032}\" />\r\n\t<LinearGradientBrush x:Key=\"AccordionButtonBackgroundBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n\t\t<GradientStop Color=\"{StaticResource Color_030}\" Offset=\"1\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_032}\" />\r\n\t</LinearGradientBrush>\r\n\t<LinearGradientBrush x:Key=\"AccordionButtonBorderBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n\t\t<GradientStop Color=\"{StaticResource Color_029}\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_027}\" Offset=\"1\" />\r\n\t</LinearGradientBrush>\r\n\t<LinearGradientBrush x:Key=\"AccordionButtonHoverBackgroundBrush\" StartPoint=\"0,0\" EndPoint=\"0,1\">\r\n\t\t<GradientStop Offset=\"0\" Color=\"{StaticResource Color_018}\" />\r\n\t\t<GradientStop Offset=\"0.23\" Color=\"{StaticResource Color_017}\" />\r\n\t\t<GradientStop Offset=\"0.75\" Color=\"{StaticResource Color_017}\" />\r\n\t\t<GradientStop Offset=\"1\" Color=\"{StaticResource Color_019}\" />\r\n\t</LinearGradientBrush>\r\n\t<LinearGradientBrush x:Key=\"AccordionButtonHoverBorderBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n\t\t<GradientStop Offset=\"1\" Color=\"{StaticResource Color_013}\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_014}\" />\r\n\t</LinearGradientBrush>\r\n\t<SolidColorBrush x:Key=\"AccordionButtonHoverHiglightBorderBrush\" Color=\"{StaticResource Color_019}\" />\r\n\t<LinearGradientBrush x:Key=\"AccordionButtonPressedBackgroundBrush\" StartPoint=\"0,0 \" EndPoint=\"0,1 \">\r\n\t\t<GradientStop Offset=\"1\" Color=\"{StaticResource Color_017}\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_016}\" />\r\n\t</LinearGradientBrush>\r\n\t<LinearGradientBrush x:Key=\"AccordionButtonPressedBorderBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n\t\t<GradientStop Offset=\"0\" Color=\"{StaticResource Color_012}\" />\r\n\t\t<GradientStop Offset=\"1\" Color=\"{StaticResource Color_013}\" />\r\n\t</LinearGradientBrush>\r\n\t<LinearGradientBrush x:Key=\"AccordionButtonExpandedBackgroundBrush\" StartPoint=\"0,0 \" EndPoint=\"0,1 \">\r\n\t\t<GradientStop Offset=\"1\" Color=\"{StaticResource Color_017}\" />\r\n\t\t<GradientStop Color=\"{StaticResource Color_016}\" />\r\n\t</LinearGradientBrush>\r\n\t<LinearGradientBrush x:Key=\"AccordionButtonExpandedBorderBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n\t\t<GradientStop Offset=\"0\" Color=\"{StaticResource Color_012}\" />\r\n\t\t<GradientStop Offset=\"1\" Color=\"{StaticResource Color_013}\" />\r\n\t</LinearGradientBrush>\r\n\t<SolidColorBrush x:Key=\"AccordionArrowBackgroundBrush\" Color=\"{StaticResource Color_025}\" />\r\n\r\n\t<!--********************************** RatingItem Style **********************************-->\r\n\t<Style x:Key=\"RatingItemStyle\" TargetType=\"{x:Type inputToolkit:RatingItem}\">\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type inputToolkit:RatingItem}\">\r\n\t\t\t\t\t<Grid Background=\"{TemplateBinding Background}\" Width=\"20\" Margin=\"2 0\">\r\n\t\t\t\t\t\t<Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t<RowDefinition Height=\"20\" />\r\n\t\t\t\t\t\t\t<RowDefinition Height=\"Auto\" />\r\n\t\t\t\t\t\t</Grid.RowDefinitions>\r\n\t\t\t\t\t\t<Border BorderThickness=\"0\" Background=\"{StaticResource TransparentBrush}\" />\r\n\t\t\t\t\t\t<Rectangle Fill=\"{StaticResource TransparentBrush}\" Margin=\"-2 0\" />\r\n\t\t\t\t\t\t<Path x:Name=\"DefaultRatingItem\" Data=\"M 26.8,10.8 C26.7,10.5 26.4,10.2 26.1,10.2 26.1,10.2 18.2,9.0 18.2,9.0 18.2,9.0 14.7,1.5 14.7,1.5 14.6,1.2 14.3,1 13.9,1 13.6,1 13.2,1.2 13.1,1.5 13.1,1.5 9.6,9.0 9.6,9.0 9.6,9.0 1.7,10.2 1.7,10.2 1.4,10.2 1.1,10.5 1.0,10.8 0.9,11.2 1.0,11.5 1.2,11.8 1.2,11.8 6.9,17.6 6.9,17.6 6.9,17.6 5.6,25.8 5.6,25.8 5.5,26.2 5.6,26.6 5.9,26.8 6.2,27.0 6.6,27.0 6.9,26.8 6.9,26.8 13.9,23.0 13.9,23.0 13.9,23.0 20.9,26.8 20.9,26.8 21.1,26.9 21.2,26.9 21.4,26.9 21.5,26.9 21.7,26.9 21.9,26.8 22.2,26.6 22.3,26.2 22.3,25.8 22.3,25.8 20.9,17.6 20.9,17.6 20.9,17.6 26.6,11.8 26.6,11.8 26.8,11.5 26.9,11.2 26.8,10.8 z\" Opacity=\"1\" Stretch=\"Fill\" Fill=\"{StaticResource RatingItemBackgroundBrush}\" Stroke=\"{StaticResource RatingItemBorderBrush}\" StrokeThickness=\"0.4\" StrokeLineJoin=\"Round\" UseLayoutRounding=\"False\" VerticalAlignment=\"Stretch\" />\r\n\r\n\t\t\t\t\t\t<inputToolkitPrimitives:LinearClipper ExpandDirection=\"Right\" RatioVisible=\"{TemplateBinding DisplayValue}\">\r\n\t\t\t\t\t\t\t<Path Data=\"M 26.8,10.8 C26.7,10.5 26.4,10.2 26.1,10.2 26.1,10.2 18.2,9.0 18.2,9.0 18.2,9.0 14.7,1.5 14.7,1.5 14.6,1.2 14.3,1 13.9,1 13.6,1 13.2,1.2 13.1,1.5 13.1,1.5 9.6,9.0 9.6,9.0 9.6,9.0 1.7,10.2 1.7,10.2 1.4,10.2 1.1,10.5 1.0,10.8 0.9,11.2 1.0,11.5 1.2,11.8 1.2,11.8 6.9,17.6 6.9,17.6 6.9,17.6 5.6,25.8 5.6,25.8 5.5,26.2 5.6,26.6 5.9,26.8 6.2,27.0 6.6,27.0 6.9,26.8 6.9,26.8 13.9,23.0 13.9,23.0 13.9,23.0 20.9,26.8 20.9,26.8 21.1,26.9 21.2,26.9 21.4,26.9 21.5,26.9 21.7,26.9 21.9,26.8 22.2,26.6 22.3,26.2 22.3,25.8 22.3,25.8 20.9,17.6 20.9,17.6 20.9,17.6 26.6,11.8 26.6,11.8 26.8,11.5 26.9,11.2 26.8,10.8 z\" Fill=\"{TemplateBinding Foreground}\" Opacity=\"1\" Stretch=\"Fill\" Stroke=\"{StaticResource RatingItemActiveBorderBrush}\" StrokeThickness=\"0.4\" StrokeLineJoin=\"Round\" UseLayoutRounding=\"False\" VerticalAlignment=\"Stretch\" />\r\n\t\t\t\t\t\t</inputToolkitPrimitives:LinearClipper>\r\n\r\n\t\t\t\t\t\t<Path x:Name=\"MouseOverRatingItem\" Data=\"M 26.8,10.8 C26.7,10.5 26.4,10.2 26.1,10.2 26.1,10.2 18.2,9.0 18.2,9.0 18.2,9.0 14.7,1.5 14.7,1.5 14.6,1.2 14.3,1 13.9,1 13.6,1 13.2,1.2 13.1,1.5 13.1,1.5 9.6,9.0 9.6,9.0 9.6,9.0 1.7,10.2 1.7,10.2 1.4,10.2 1.1,10.5 1.0,10.8 0.9,11.2 1.0,11.5 1.2,11.8 1.2,11.8 6.9,17.6 6.9,17.6 6.9,17.6 5.6,25.8 5.6,25.8 5.5,26.2 5.6,26.6 5.9,26.8 6.2,27.0 6.6,27.0 6.9,26.8 6.9,26.8 13.9,23.0 13.9,23.0 13.9,23.0 20.9,26.8 20.9,26.8 21.1,26.9 21.2,26.9 21.4,26.9 21.5,26.9 21.7,26.9 21.9,26.8 22.2,26.6 22.3,26.2 22.3,25.8 22.3,25.8 20.9,17.6 20.9,17.6 20.9,17.6 26.6,11.8 26.6,11.8 26.8,11.5 26.9,11.2 26.8,10.8 z\" Fill=\"{StaticResource RatingItemHoverBackgroundBrush}\" Opacity=\"0\" Stretch=\"Fill\" Stroke=\"{StaticResource RatingItemHoverBorderBrush}\" StrokeThickness=\"0.4\" StrokeLineJoin=\"Round\" UseLayoutRounding=\"False\" VerticalAlignment=\"Stretch\" />\r\n\r\n\t\t\t\t\t\t<Path x:Name=\"MouseOverHighlight\" Data=\"M 26.8,10.8 C26.7,10.5 26.4,10.2 26.1,10.2 26.1,10.2 18.2,9.0 18.2,9.0 18.2,9.0 14.7,1.5 14.7,1.5 14.6,1.2 14.3,1 13.9,1 13.6,1 13.2,1.2 13.1,1.5 13.1,1.5 9.6,9.0 9.6,9.0 9.6,9.0 1.7,10.2 1.7,10.2 1.4,10.2 1.1,10.5 1.0,10.8 0.9,11.2 1.0,11.5 1.2,11.8 1.2,11.8 6.9,17.6 6.9,17.6 6.9,17.6 5.6,25.8 5.6,25.8 5.5,26.2 5.6,26.6 5.9,26.8 6.2,27.0 6.6,27.0 6.9,26.8 6.9,26.8 13.9,23.0 13.9,23.0 13.9,23.0 20.9,26.8 20.9,26.8 21.1,26.9 21.2,26.9 21.4,26.9 21.5,26.9 21.7,26.9 21.9,26.8 22.2,26.6 22.3,26.2 22.3,25.8 22.3,25.8 20.9,17.6 20.9,17.6 20.9,17.6 26.6,11.8 26.6,11.8 26.8,11.5 26.9,11.2 26.8,10.8 z\" Fill=\"{StaticResource TransparentBrush}\" Opacity=\"0\" Stretch=\"Fill\" Stroke=\"{StaticResource RatingItemHoverHiglightBorderBrush}\" StrokeThickness=\"0.4\" StrokeLineJoin=\"Round\" UseLayoutRounding=\"False\" VerticalAlignment=\"Stretch\" Margin=\"1\" />\r\n\r\n\t\t\t\t\t\t<Path x:Name=\"PressedRatingItem\" Data=\"M 26.8,10.8 C26.7,10.5 26.4,10.2 26.1,10.2 26.1,10.2 18.2,9.0 18.2,9.0 18.2,9.0 14.7,1.5 14.7,1.5 14.6,1.2 14.3,1 13.9,1 13.6,1 13.2,1.2 13.1,1.5 13.1,1.5 9.6,9.0 9.6,9.0 9.6,9.0 1.7,10.2 1.7,10.2 1.4,10.2 1.1,10.5 1.0,10.8 0.9,11.2 1.0,11.5 1.2,11.8 1.2,11.8 6.9,17.6 6.9,17.6 6.9,17.6 5.6,25.8 5.6,25.8 5.5,26.2 5.6,26.6 5.9,26.8 6.2,27.0 6.6,27.0 6.9,26.8 6.9,26.8 13.9,23.0 13.9,23.0 13.9,23.0 20.9,26.8 20.9,26.8 21.1,26.9 21.2,26.9 21.4,26.9 21.5,26.9 21.7,26.9 21.9,26.8 22.2,26.6 22.3,26.2 22.3,25.8 22.3,25.8 20.9,17.6 20.9,17.6 20.9,17.6 26.6,11.8 26.6,11.8 26.8,11.5 26.9,11.2 26.8,10.8 z\" Fill=\"{StaticResource RatingItemActiveBackgroundBrush}\" Opacity=\"0\" Stretch=\"Fill\" Stroke=\"{StaticResource RatingItemActiveBorderBrush}\" StrokeThickness=\"0.4\" StrokeLineJoin=\"Round\" UseLayoutRounding=\"False\" VerticalAlignment=\"Stretch\" />\r\n\r\n\t\t\t\t\t\t<Path x:Name=\"ReadOnlyRatingItem\" Data=\"M 26.8,10.8 C26.7,10.5 26.4,10.2 26.1,10.2 26.1,10.2 18.2,9.0 18.2,9.0 18.2,9.0 14.7,1.5 14.7,1.5 14.6,1.2 14.3,1 13.9,1 13.6,1 13.2,1.2 13.1,1.5 13.1,1.5 9.6,9.0 9.6,9.0 9.6,9.0 1.7,10.2 1.7,10.2 1.4,10.2 1.1,10.5 1.0,10.8 0.9,11.2 1.0,11.5 1.2,11.8 1.2,11.8 6.9,17.6 6.9,17.6 6.9,17.6 5.6,25.8 5.6,25.8 5.5,26.2 5.6,26.6 5.9,26.8 6.2,27.0 6.6,27.0 6.9,26.8 6.9,26.8 13.9,23.0 13.9,23.0 13.9,23.0 20.9,26.8 20.9,26.8 21.1,26.9 21.2,26.9 21.4,26.9 21.5,26.9 21.7,26.9 21.9,26.8 22.2,26.6 22.3,26.2 22.3,25.8 22.3,25.8 20.9,17.6 20.9,17.6 20.9,17.6 26.6,11.8 26.6,11.8 26.8,11.5 26.9,11.2 26.8,10.8 z\" Fill=\"{StaticResource RatingItemReadOnlyBackgroundBrush}\" IsHitTestVisible=\"False\" Opacity=\"0\" Stretch=\"Fill\" Stroke=\"{StaticResource RatingItemReadOnlyBorderBrush}\" StrokeThickness=\"0.4\" StrokeLineJoin=\"Round\" UseLayoutRounding=\"False\" VerticalAlignment=\"Stretch\" />\r\n\r\n\t\t\t\t\t\t<Path x:Name=\"DisabledRatingItemBackground\" Data=\"M 26.8,10.8 C26.7,10.5 26.4,10.2 26.1,10.2 26.1,10.2 18.2,9.0 18.2,9.0 18.2,9.0 14.7,1.5 14.7,1.5 14.6,1.2 14.3,1 13.9,1 13.6,1 13.2,1.2 13.1,1.5 13.1,1.5 9.6,9.0 9.6,9.0 9.6,9.0 1.7,10.2 1.7,10.2 1.4,10.2 1.1,10.5 1.0,10.8 0.9,11.2 1.0,11.5 1.2,11.8 1.2,11.8 6.9,17.6 6.9,17.6 6.9,17.6 5.6,25.8 5.6,25.8 5.5,26.2 5.6,26.6 5.9,26.8 6.2,27.0 6.6,27.0 6.9,26.8 6.9,26.8 13.9,23.0 13.9,23.0 13.9,23.0 20.9,26.8 20.9,26.8 21.1,26.9 21.2,26.9 21.4,26.9 21.5,26.9 21.7,26.9 21.9,26.8 22.2,26.6 22.3,26.2 22.3,25.8 22.3,25.8 20.9,17.6 20.9,17.6 20.9,17.6 26.6,11.8 26.6,11.8 26.8,11.5 26.9,11.2 26.8,10.8 z\" Fill=\"{StaticResource RatingItemDisabledBackgroundBrush}\" Opacity=\"0\" Stretch=\"Fill\" Stroke=\"{StaticResource RatingItemDisabledBorderBrush}\" StrokeLineJoin=\"Round\" UseLayoutRounding=\"False\" VerticalAlignment=\"Stretch\" />\r\n\r\n\t\t\t\t\t\t<inputToolkitPrimitives:LinearClipper x:Name=\"DisabledRatingItem\" ExpandDirection=\"Right\" Opacity=\"0\" RatioVisible=\"{TemplateBinding DisplayValue}\">\r\n\t\t\t\t\t\t\t<Path Data=\"M 26.8,10.8 C26.7,10.5 26.4,10.2 26.1,10.2 26.1,10.2 18.2,9.0 18.2,9.0 18.2,9.0 14.7,1.5 14.7,1.5 14.6,1.2 14.3,1 13.9,1 13.6,1 13.2,1.2 13.1,1.5 13.1,1.5 9.6,9.0 9.6,9.0 9.6,9.0 1.7,10.2 1.7,10.2 1.4,10.2 1.1,10.5 1.0,10.8 0.9,11.2 1.0,11.5 1.2,11.8 1.2,11.8 6.9,17.6 6.9,17.6 6.9,17.6 5.6,25.8 5.6,25.8 5.5,26.2 5.6,26.6 5.9,26.8 6.2,27.0 6.6,27.0 6.9,26.8 6.9,26.8 13.9,23.0 13.9,23.0 13.9,23.0 20.9,26.8 20.9,26.8 21.1,26.9 21.2,26.9 21.4,26.9 21.5,26.9 21.7,26.9 21.9,26.8 22.2,26.6 22.3,26.2 22.3,25.8 22.3,25.8 20.9,17.6 20.9,17.6 20.9,17.6 26.6,11.8 26.6,11.8 26.8,11.5 26.9,11.2 26.8,10.8 z\" Fill=\"{StaticResource RatingItemDisabledBackgroundBrush}\" Opacity=\"1\" Stretch=\"Fill\" Stroke=\"{StaticResource RatingItemDisabledBorderBrush}\" StrokeLineJoin=\"Round\" UseLayoutRounding=\"False\" VerticalAlignment=\"Stretch\" />\r\n\t\t\t\t\t\t</inputToolkitPrimitives:LinearClipper>\r\n\t\t\t\t\t\t<ContentPresenter x:Name=\"Content\" Cursor=\"{TemplateBinding Cursor}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" HorizontalAlignment=\"Left\" Margin=\"{TemplateBinding Padding}\" Grid.Row=\"1\" Grid.RowSpan=\"2\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Opacity\" Value=\"1\" TargetName=\"MouseOverRatingItem\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Opacity\" Value=\"0.4\" TargetName=\"MouseOverHighlight\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsPressed\" Value=\"True\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Opacity\" Value=\"1\" TargetName=\"PressedRatingItem\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsEnabled\" Value=\"False\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Opacity\" Value=\"1\" TargetName=\"DisabledRatingItem\" />\r\n\t\t\t\t\t\t\t<Setter Property=\"Opacity\" Value=\"1\" TargetName=\"DisabledRatingItemBackground\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t\t<Trigger Property=\"IsReadOnly\" Value=\"True\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Opacity\" Value=\"0.7\" TargetName=\"ReadOnlyRatingItem\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- ********************************** Rating Style **********************************-->\r\n\t<Style x:Key=\"RatingStyle\" TargetType=\"{x:Type inputToolkit:Rating}\">\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource RatingItemActiveBackgroundBrush}\" />\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource TransparentBrush}\" />\r\n\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource TransparentBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"0\" />\r\n\t\t<Setter Property=\"ItemContainerStyle\" Value=\"{StaticResource RatingItemStyle}\" />\r\n\t\t<Setter Property=\"ItemsPanel\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ItemsPanelTemplate>\r\n\t\t\t\t\t<StackPanel IsItemsHost=\"True\" Orientation=\"Horizontal\" />\r\n\t\t\t\t</ItemsPanelTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type inputToolkit:Rating}\">\r\n\t\t\t\t\t<Grid x:Name=\"Root\">\r\n\t\t\t\t\t\t<Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\">\r\n\t\t\t\t\t\t\t<ItemsPresenter />\r\n\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t\t<Border x:Name=\"ReadOnlyVisualElement\" BorderBrush=\"{StaticResource RatingReadOnlyBorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{StaticResource RatingReadOnlyBackgroundBrush}\" IsHitTestVisible=\"False\" Opacity=\"0\" />\r\n\t\t\t\t\t\t<Border x:Name=\"DisabledVisualElement\" BorderBrush=\"{StaticResource RatingDisabledBorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{StaticResource RatingDisabledBackgroundBrush}\" IsHitTestVisible=\"False\" Opacity=\"0\" />\r\n\t\t\t\t\t\t<Rectangle x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" RadiusY=\"1\" RadiusX=\"1\" StrokeThickness=\"1\" Visibility=\"Collapsed\" />\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t\t<ControlTemplate.Triggers>\r\n\t\t\t\t\t\t<Trigger Property=\"IsReadOnly\" Value=\"True\">\r\n\t\t\t\t\t\t\t<Setter Property=\"Opacity\" Value=\"0.03\" TargetName=\"ReadOnlyVisualElement\" />\r\n\t\t\t\t\t\t</Trigger>\r\n\t\t\t\t\t</ControlTemplate.Triggers>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  AccordionButton Style  ********************************* -->\r\n\t<Style x:Key=\"AccordionButtonStyle\" TargetType=\"layoutToolkitPrimitives:AccordionButton\">\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource AccordionButtonBackgroundBrush}\" />\r\n\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource AccordionButtonBorderBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"HorizontalAlignment\" Value=\"Stretch\" />\r\n\t\t<Setter Property=\"VerticalAlignment\" Value=\"Stretch\" />\r\n\t\t<Setter Property=\"HorizontalContentAlignment\" Value=\"Center\" />\r\n\t\t<Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n\t\t<Setter Property=\"IsTabStop\" Value=\"True\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"layoutToolkitPrimitives:AccordionButton\">\r\n\t\t\t\t\t<Grid Background=\"{StaticResource TransparentBrush}\" Margin=\"{TemplateBinding Padding}\">\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"ExpandDirectionStates\">\r\n\t\t\t\t\t\t\t\t<VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0\" />\r\n\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"ExpandDown\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"icon\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>0</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"icon\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>0</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>0</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>Auto</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"cd1\" Storyboard.TargetProperty=\"Width\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>*</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation BeginTime=\"00:00:00\" Duration=\"00:00:00\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)\" To=\"-90\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"ExpandUp\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"icon\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"icon\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>0</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>*</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"cd1\" Storyboard.TargetProperty=\"Width\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>Auto</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation BeginTime=\"00:00:00\" Duration=\"00:00:00\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)\" To=\"90\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"ExpandLeft\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"icon\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"icon\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>0</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>Auto</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"rd1\" Storyboard.TargetProperty=\"Height\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>*</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"LayoutTransform\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<RotateTransform Angle=\"90\" />\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation BeginTime=\"00:00:00\" Duration=\"00:00:00\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)\" To=\"0\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"ExpandRight\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"icon\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>0</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"icon\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>0</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>0</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>*</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"rd1\" Storyboard.TargetProperty=\"Height\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>Auto</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"header\" Storyboard.TargetProperty=\"LayoutTransform\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<RotateTransform Angle=\"-90\" />\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation BeginTime=\"00:00:00\" Duration=\"00:00:00\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)\" To=\"180\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"ExpansionStates\">\r\n\t\t\t\t\t\t\t\t<VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0\" />\r\n\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Collapsed\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation BeginTime=\"00:00:00\" Duration=\"00:00:00.3\" To=\"0\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)\" Storyboard.TargetName=\"icon\" />\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Expanded\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimation BeginTime=\"00:00:00\" Duration=\"00:00:00.3\" To=\"90\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)\" Storyboard.TargetName=\"icon\" />\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"ExpandedBackground\">\r\n\t\t\t\t\t\t\t\t\t\t\t<SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CheckStates\">\r\n\t\t\t\t\t\t\t\t<VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"00:00:00\" />\r\n\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Checked\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unchecked\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0\" />\r\n\t\t\t\t\t\t\t\t\t<VisualTransition From=\"MouseOver\" GeneratedDuration=\"00:00:00.1\" To=\"Normal\" />\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\" />\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\" />\r\n\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"MouseOverBackground\">\r\n\t\t\t\t\t\t\t\t\t\t\t<SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"MouseOverHiglightBackground\">\r\n\t\t\t\t\t\t\t\t\t\t\t<SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Pressed\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"PressedBackground\">\r\n\t\t\t\t\t\t\t\t\t\t\t<SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\" />\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard />\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"FocusStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Focused\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unfocused\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Border>\r\n\t\t\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t\t\t<Border x:Name=\"Background\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Height=\"Auto\" Margin=\"0\" VerticalAlignment=\"Stretch\" />\r\n\t\t\t\t\t\t\t\t<Border x:Name=\"ExpandedBackground\" BorderBrush=\"{StaticResource AccordionButtonExpandedBorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{StaticResource AccordionButtonExpandedBackgroundBrush}\" Height=\"Auto\" Margin=\"0\" Opacity=\"0\" VerticalAlignment=\"Stretch\" />\r\n\t\t\t\t\t\t\t\t<Border x:Name=\"MouseOverBackground\" BorderBrush=\"{StaticResource AccordionButtonHoverBorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{StaticResource AccordionButtonHoverBackgroundBrush}\" Height=\"Auto\" Margin=\"0\" Opacity=\"0\" VerticalAlignment=\"Stretch\" />\r\n\t\t\t\t\t\t\t\t<Border x:Name=\"MouseOverHiglightBackground\" BorderBrush=\"{StaticResource AccordionButtonHoverHiglightBorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Height=\"Auto\" Margin=\"1\" Opacity=\"0\" VerticalAlignment=\"Stretch\" />\r\n\t\t\t\t\t\t\t\t<Border x:Name=\"PressedBackground\" BorderBrush=\"{StaticResource AccordionButtonPressedBorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{StaticResource AccordionButtonPressedBackgroundBrush}\" Height=\"Auto\" Margin=\"0\" Opacity=\"0\" VerticalAlignment=\"Stretch\" />\r\n\t\t\t\t\t\t\t\t<Grid Background=\"{StaticResource TransparentBrush}\">\r\n\t\t\t\t\t\t\t\t\t<Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"Auto\" x:Name=\"cd0\" />\r\n\t\t\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"Auto\" x:Name=\"cd1\" />\r\n\t\t\t\t\t\t\t\t\t</Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t\t\t<Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t\t\t\t<RowDefinition Height=\"Auto\" x:Name=\"rd0\" />\r\n\t\t\t\t\t\t\t\t\t\t<RowDefinition Height=\"Auto\" x:Name=\"rd1\" />\r\n\t\t\t\t\t\t\t\t\t</Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t\t\t<Grid x:Name=\"icon\" Grid.Column=\"0\" HorizontalAlignment=\"Center\" Height=\"19\" Grid.Row=\"0\" RenderTransformOrigin=\"0.5,0.5\" VerticalAlignment=\"Center\" Width=\"19\">\r\n\t\t\t\t\t\t\t\t\t\t<Grid.RenderTransform>\r\n\t\t\t\t\t\t\t\t\t\t\t<TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<ScaleTransform />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<SkewTransform />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<RotateTransform Angle=\"-90\" />\r\n\t\t\t\t\t\t\t\t\t\t\t\t<TranslateTransform />\r\n\t\t\t\t\t\t\t\t\t\t\t</TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t</Grid.RenderTransform>\r\n\t\t\t\t\t\t\t\t\t\t<Path x:Name=\"arrow\" Data=\"F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z\" Stretch=\"Uniform\" Height=\"4\" HorizontalAlignment=\"Center\" Margin=\"0,0,0,0\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"{StaticResource AccordionArrowBackgroundBrush}\" VerticalAlignment=\"Center\" Width=\"Auto\">\r\n\t\t\t\t\t\t\t\t\t\t\t<Path.RenderTransform>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ScaleTransform />\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<SkewTransform />\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<RotateTransform />\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TranslateTransform />\r\n\t\t\t\t\t\t\t\t\t\t\t\t</TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t\t</Path.RenderTransform>\r\n\t\t\t\t\t\t\t\t\t\t</Path>\r\n\t\t\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t\t\t\t<ContentControl x:Name=\"contentControl\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"6 4\" Grid.Column=\"1\" Grid.Row=\"0\" Grid.RowSpan=\"1\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\">\r\n\t\t\t\t\t\t\t\t\t\t<ContentPresenter x:Name=\"header\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" />\r\n\t\t\t\t\t\t\t\t\t</ContentControl>\r\n\t\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  ExpandableContentControl Style  ********************************* -->\r\n\t<Style x:Key=\"ExpandableContentControlStyle\" TargetType=\"layoutToolkitPrimitives:ExpandableContentControl\">\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"0\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"6\" />\r\n\t\t<Setter Property=\"IsEnabled\" Value=\"true\" />\r\n\t\t<Setter Property=\"Cursor\" Value=\"Arrow\" />\r\n\t\t<Setter Property=\"IsTabStop\" Value=\"False\" />\r\n\t\t<Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n\t\t<Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"layoutToolkitPrimitives:ExpandableContentControl\">\r\n\t\t\t\t\t<ContentPresenter x:Name=\"ContentSite\" Cursor=\"{TemplateBinding Cursor}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" />\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  AccordionItem Style  ********************************* -->\r\n\t<Style x:Key=\"AccordionItemStyle\" TargetType=\"layoutToolkit:AccordionItem\">\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource AccordionBackgroundBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"0\" />\r\n\t\t<Setter Property=\"Margin\" Value=\"0\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"0\" />\r\n\t\t<Setter Property=\"AccordionButtonStyle\" Value=\"{StaticResource AccordionButtonStyle}\" />\r\n\t\t<Setter Property=\"HorizontalAlignment\" Value=\"Stretch\" />\r\n\t\t<Setter Property=\"VerticalAlignment\" Value=\"Stretch\" />\r\n\t\t<Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n\t\t<Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n\t\t<Setter Property=\"IsTabStop\" Value=\"False\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"layoutToolkit:AccordionItem\">\r\n\t\t\t\t\t<Grid Background=\"{TemplateBinding Background}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\">\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0\" />\r\n\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Pressed\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"FocusStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Focused\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unfocused\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"ExpansionStates\">\r\n\t\t\t\t\t\t\t\t<VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0\" />\r\n\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Collapsed\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard x:Name=\"AccordionItemCollapsedStoryboard\">\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(layoutToolkitPrimitives:ExpandableContentControl.Percentage)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<SplineDoubleKeyFrame KeyTime=\"00:00:00.3\" KeySpline=\"0.2,0,0,1\" Value=\"0\" />\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00.3\" Duration=\"00:00:00\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Visibility>Collapsed</Visibility>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Expanded\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard x:Name=\"AccordionItemExpandedStoryboard\">\r\n\t\t\t\t\t\t\t\t\t\t<DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(layoutToolkitPrimitives:ExpandableContentControl.Percentage)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<SplineDoubleKeyFrame KeyTime=\"00:00:00.3\" KeySpline=\"0.2,0,0,1\" Value=\"1\" />\r\n\t\t\t\t\t\t\t\t\t\t</DoubleAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"LockedStates\">\r\n\t\t\t\t\t\t\t\t<VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0\" />\r\n\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Locked\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"IsEnabled\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Boolean>False</sys:Boolean>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unlocked\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"IsEnabled\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Boolean>True</sys:Boolean>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"ExpandDirectionStates\">\r\n\t\t\t\t\t\t\t\t<VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t\t<VisualTransition GeneratedDuration=\"0\" />\r\n\t\t\t\t\t\t\t\t</VisualStateGroup.Transitions>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"ExpandDown\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd1\" Storyboard.TargetProperty=\"Height\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>*</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>*</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"ExpandUp\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>0</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>*</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>*</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"ExpandLeft\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.ColumnSpan)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.ColumnSpan)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.RowSpan)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>2</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.RowSpan)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>2</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>0</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>*</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>*</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"ExpandRight\">\r\n\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.ColumnSpan)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.ColumnSpan)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.RowSpan)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>2</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.RowSpan)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>2</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>0</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Int32>1</sys:Int32>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>*</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd1\" Storyboard.TargetProperty=\"Width\">\r\n\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<GridLength>*</GridLength>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t</VisualState>\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Border x:Name=\"Background\" Padding=\"{TemplateBinding Padding}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\">\r\n\t\t\t\t\t\t\t<Grid>\r\n\t\t\t\t\t\t\t\t<Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t\t\t<RowDefinition Height=\"Auto\" x:Name=\"rd0\" />\r\n\t\t\t\t\t\t\t\t\t<RowDefinition Height=\"Auto\" x:Name=\"rd1\" />\r\n\t\t\t\t\t\t\t\t</Grid.RowDefinitions>\r\n\t\t\t\t\t\t\t\t<Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"Auto\" x:Name=\"cd0\" />\r\n\t\t\t\t\t\t\t\t\t<ColumnDefinition Width=\"Auto\" x:Name=\"cd1\" />\r\n\t\t\t\t\t\t\t\t</Grid.ColumnDefinitions>\r\n\t\t\t\t\t\t\t\t<layoutToolkitPrimitives:AccordionButton Name=\"ExpanderButton\" Content=\"{TemplateBinding Header}\" ContentTemplate=\"{TemplateBinding HeaderTemplate}\" IsChecked=\"{TemplateBinding IsSelected}\" IsTabStop=\"True\" Grid.Row=\"0\" Padding=\"0,0,0,0\" Margin=\"0,0,0,0\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\" />\r\n\t\t\t\t\t\t\t\t<layoutToolkitPrimitives:ExpandableContentControl Name=\"ExpandSite\" Grid.Row=\"1\" IsTabStop=\"False\" Percentage=\"0\" RevealMode=\"{TemplateBinding ExpandDirection}\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Margin=\"0,0,0,0\" FontFamily=\"{TemplateBinding FontFamily}\" FontSize=\"{TemplateBinding FontSize}\" FontStretch=\"{TemplateBinding FontStretch}\" FontStyle=\"{TemplateBinding FontStyle}\" FontWeight=\"{TemplateBinding FontWeight}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\" Style=\"{StaticResource ExpandableContentControlStyle}\" />\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  Accordion Style  ********************************* -->\r\n\t<Style x:Key=\"AccordionStyle\" TargetType=\"layoutToolkit:Accordion\">\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource AccordionBorderBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"0\" />\r\n\t\t<Setter Property=\"Margin\" Value=\"0\" />\r\n\t\t<Setter Property=\"HorizontalAlignment\" Value=\"Left\" />\r\n\t\t<Setter Property=\"VerticalAlignment\" Value=\"Top\" />\r\n\t\t<Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n\t\t<Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n\t\t<Setter Property=\"Cursor\" Value=\"Arrow\" />\r\n\t\t<Setter Property=\"IsTabStop\" Value=\"False\" />\r\n\t\t<Setter Property=\"ItemsPanel\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ItemsPanelTemplate>\r\n\t\t\t\t\t<StackPanel VerticalAlignment=\"Top\" />\r\n\t\t\t\t</ItemsPanelTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"layoutToolkit:Accordion\">\r\n\t\t\t\t\t<Grid x:Name=\"Root\">\r\n\t\t\t\t\t\t<VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"CommonStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Normal\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Pressed\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"MouseOver\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Disabled\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t\t<VisualStateGroup x:Name=\"FocusStates\">\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Focused\" />\r\n\t\t\t\t\t\t\t\t<VisualState x:Name=\"Unfocused\" />\r\n\t\t\t\t\t\t\t</VisualStateGroup>\r\n\t\t\t\t\t\t</VisualStateManager.VisualStateGroups>\r\n\t\t\t\t\t\t<Border x:Name=\"Border\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Padding=\"{TemplateBinding Padding}\">\r\n\t\t\t\t\t\t\t<ScrollViewer BorderBrush=\"{StaticResource TransparentBrush}\" BorderThickness=\"0\" Background=\"{x:Null}\" HorizontalScrollBarVisibility=\"Disabled\" IsTabStop=\"False\" Margin=\"0\" Padding=\"0\" VerticalScrollBarVisibility=\"Disabled\">\r\n\t\t\t\t\t\t\t\t<ItemsPresenter />\r\n\t\t\t\t\t\t\t</ScrollViewer>\r\n\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n\t<!-- *********************************  AutoCompleteBox Style  ********************************* -->\r\n\t<Style x:Key=\"AutoCompleteBoxStyle\" TargetType=\"{x:Type inputToolkit:AutoCompleteBox}\">\r\n\t\t<Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n\t\t<Setter Property=\"Background\" Value=\"{StaticResource LightForegroundBrush}\" />\r\n\t\t<Setter Property=\"BorderBrush\" Value=\"{StaticResource TextBoxBorderBrush}\" />\r\n\t\t<Setter Property=\"BorderThickness\" Value=\"1\" />\r\n\t\t<Setter Property=\"Padding\" Value=\"2\" />\r\n\t\t<Setter Property=\"MinHeight\" Value=\"20\" />\r\n\t\t<Setter Property=\"MinWidth\" Value=\"45\" />\r\n\t\t<Setter Property=\"TextBoxStyle\" Value=\"{StaticResource TextBoxStyle}\" />\r\n\t\t<Setter Property=\"IsTabStop\" Value=\"False\" />\r\n\t\t<Setter Property=\"Template\">\r\n\t\t\t<Setter.Value>\r\n\t\t\t\t<ControlTemplate TargetType=\"{x:Type inputToolkit:AutoCompleteBox}\">\r\n\t\t\t\t\t<Grid Opacity=\"{TemplateBinding Opacity}\">\r\n\t\t\t\t\t\t<TextBox x:Name=\"Text\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Foreground=\"{TemplateBinding Foreground}\" IsTabStop=\"True\" Margin=\"0\" Padding=\"{TemplateBinding Padding}\" Style=\"{TemplateBinding TextBoxStyle}\" />\r\n\t\t\t\t\t\t<Border x:Name=\"ValidationErrorElement\" BorderBrush=\"{StaticResource ValidationErrorBrush}\" BorderThickness=\"1\" CornerRadius=\"1\" Visibility=\"Collapsed\">\r\n\t\t\t\t\t\t\t<Border.ToolTip>\r\n\t\t\t\t\t\t\t\t<ToolTip x:Name=\"validationTooltip\" Placement=\"Right\" Template=\"{StaticResource ValidationToolTipTemplate}\">\r\n\t\t\t\t\t\t\t\t\t<ToolTip.Triggers>\r\n\t\t\t\t\t\t\t\t\t\t<EventTrigger RoutedEvent=\"FrameworkElement.Loaded\">\r\n\t\t\t\t\t\t\t\t\t\t\t<BeginStoryboard>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"IsHitTestVisible\" Storyboard.TargetName=\"validationTooltip\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame KeyTime=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<sys:Boolean>True</sys:Boolean>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame.Value>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</DiscreteObjectKeyFrame>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</ObjectAnimationUsingKeyFrames>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</Storyboard>\r\n\t\t\t\t\t\t\t\t\t\t\t</BeginStoryboard>\r\n\t\t\t\t\t\t\t\t\t\t</EventTrigger>\r\n\t\t\t\t\t\t\t\t\t</ToolTip.Triggers>\r\n\t\t\t\t\t\t\t\t\t<!--TODO: Include ValidationTooltipTemplate-->\r\n\t\t\t\t\t\t\t\t\t<!--<ToolTip.Template>\r\n                                    <ControlTemplate TargetType=\"{x:Type ToolTip}\">\r\n                                        <Grid x:Name=\"Root\" Margin=\"5,0\" Opacity=\"0\" RenderTransformOrigin=\"0,0\">\r\n                                            <Grid.RenderTransform>\r\n                                                <TranslateTransform X=\"-25\"/>\r\n                                            </Grid.RenderTransform>\r\n                                            <Border Background=\"#052A2E31\" CornerRadius=\"5\" Margin=\"4,4,-4,-4\"/>\r\n                                            <Border Background=\"#152A2E31\" CornerRadius=\"4\" Margin=\"3,3,-3,-3\"/>\r\n                                            <Border Background=\"#252A2E31\" CornerRadius=\"3\" Margin=\"2,2,-2,-2\"/>\r\n                                            <Border Background=\"#352A2E31\" CornerRadius=\"2\" Margin=\"1,1,-1,-1\"/>\r\n                                            <Border Background=\"#FFDC000C\" CornerRadius=\"2\">\r\n                                                <TextBlock Foreground=\"White\" MaxWidth=\"250\" Margin=\"8,4\" TextWrapping=\"Wrap\" Text=\"{Binding (Validation.Errors)[0].ErrorContent}\"/>\r\n                                            </Border>\r\n                                        </Grid>\r\n                                    </ControlTemplate>\r\n                                </ToolTip.Template>-->\r\n\t\t\t\t\t\t\t\t</ToolTip>\r\n\t\t\t\t\t\t\t</Border.ToolTip>\r\n\t\t\t\t\t\t\t<Grid Background=\"Transparent\" HorizontalAlignment=\"Right\" Height=\"12\" Margin=\"1,-4,-4,0\" VerticalAlignment=\"Top\" Width=\"12\">\r\n\t\t\t\t\t\t\t\t<Path Data=\"M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z\" Fill=\"{StaticResource ValidationErrorBrush}\" Margin=\"1,3,0,0\" />\r\n\t\t\t\t\t\t\t\t<Path Data=\"M 0,0 L2,0 L 8,6 L8,8\" Fill=\"{StaticResource LightForegroundBrush}\" Margin=\"1,3,0,0\" />\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t\t<Popup x:Name=\"Popup\" AllowsTransparency=\"True\">\r\n\t\t\t\t\t\t\t<Grid Opacity=\"{TemplateBinding Opacity}\">\r\n\t\t\t\t\t\t\t\t<Border x:Name=\"PopupBorder\" BorderThickness=\"0\" HorizontalAlignment=\"Stretch\">\r\n\t\t\t\t\t\t\t\t\t<Border.RenderTransform>\r\n\t\t\t\t\t\t\t\t\t\t<TranslateTransform X=\"1\" Y=\"1\" />\r\n\t\t\t\t\t\t\t\t\t</Border.RenderTransform>\r\n\t\t\t\t\t\t\t\t\t<Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"0\" HorizontalAlignment=\"Stretch\" Opacity=\"1.0\" Padding=\"0\">\r\n\t\t\t\t\t\t\t\t\t\t<Border.RenderTransform>\r\n\t\t\t\t\t\t\t\t\t\t\t<TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<TranslateTransform X=\"-1\" Y=\"-1\" />\r\n\t\t\t\t\t\t\t\t\t\t\t</TransformGroup>\r\n\t\t\t\t\t\t\t\t\t\t</Border.RenderTransform>\r\n\t\t\t\t\t\t\t\t\t\t<ListBox x:Name=\"Selector\" BorderThickness=\"0\" Background=\"{TemplateBinding Background}\" Foreground=\"{TemplateBinding Foreground}\" ScrollViewer.HorizontalScrollBarVisibility=\"Auto\" ItemTemplate=\"{TemplateBinding ItemTemplate}\" ItemContainerStyle=\"{TemplateBinding ItemContainerStyle}\" ScrollViewer.VerticalScrollBarVisibility=\"Auto\" />\r\n\t\t\t\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t\t\t\t</Border>\r\n\t\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t</Popup>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</ControlTemplate>\r\n\t\t\t</Setter.Value>\r\n\t\t</Setter>\r\n\t</Style>\r\n\r\n    <!--********************** Implicit Styles *********************** -->\r\n    <Style BasedOn=\"{StaticResource RatingItemStyle}\" TargetType=\"{x:Type inputToolkit:RatingItem}\" />\r\n    <Style BasedOn=\"{StaticResource RatingStyle}\" TargetType=\"{x:Type inputToolkit:Rating}\" />\r\n    <Style BasedOn=\"{StaticResource AccordionButtonStyle}\" TargetType=\"layoutToolkitPrimitives:AccordionButton\" />\r\n    <Style BasedOn=\"{StaticResource AccordionItemStyle}\" TargetType=\"layoutToolkit:AccordionItem\" />\r\n    <Style BasedOn=\"{StaticResource AccordionStyle}\" TargetType=\"layoutToolkit:Accordion\" />\r\n    <Style BasedOn=\"{StaticResource AutoCompleteBoxStyle}\" TargetType=\"{x:Type inputToolkit:AutoCompleteBox}\" />\r\n\t\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/Office2010Blue/Styles.Shared.xaml",
    "content": "﻿<ResourceDictionary\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:System=\"clr-namespace:System;assembly=mscorlib\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" mc:Ignorable=\"d\">\r\n\r\n    <!-- *********************************  RESOURCES  ********************************* -->\r\n    <ResourceDictionary.MergedDictionaries>\r\n        <ResourceDictionary Source=\"Theme.Colors.xaml\" />\r\n    </ResourceDictionary.MergedDictionaries>\r\n\r\n    <!-- ********************************** BRUSHES **********************************-->\r\n    <SolidColorBrush x:Key=\"ForegroundBrush\" Color=\"{StaticResource Color_001}\"/>\r\n    <SolidColorBrush x:Key=\"LightForegroundBrush\" Color=\"{StaticResource Color_005}\"/>\r\n    <SolidColorBrush x:Key=\"ThemeForegroundBrush\" Color=\"{StaticResource Color_023}\"/>\r\n    <SolidColorBrush x:Key=\"ForegroundDisabledBrush\" Color=\"{StaticResource Color_003}\"/>\r\n    <SolidColorBrush x:Key=\"HyperlinkForegroundBrush\" Color=\"{StaticResource Color_026}\"/>\r\n    <SolidColorBrush x:Key=\"GridBackgroundBrush\" Color=\"{StaticResource Color_005}\"/>\r\n    <SolidColorBrush x:Key=\"GridBorderBrush\" Color=\"{StaticResource Color_027}\"/>\r\n\r\n    <LinearGradientBrush x:Key=\"LightGradientBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource Color_031}\" Offset=\"1\"/>\r\n        <GradientStop Color=\"{StaticResource Color_032}\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"PopupBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource Color_032}\"/>\r\n        <GradientStop Color=\"{StaticResource Color_031}\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"PopupBorderBrush\" StartPoint=\"0,0\" EndPoint=\"0,1\">\r\n        <GradientStop Offset=\"0\" Color=\"{StaticResource Color_028}\"/>\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_027}\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"TooltipBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\" Opacity=\"0.9\">\r\n        <GradientStop Color=\"{StaticResource Color_030}\" Offset=\"1\"/>\r\n        <GradientStop Color=\"{StaticResource Color_005}\"/>\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"TooltipBorderBrush\" Color=\"{StaticResource Color_027}\" Opacity=\"0.9\"/>\r\n\r\n    <SolidColorBrush x:Key=\"SeparatorBrush\" Color=\"{StaticResource Color_027}\"/>\r\n    <SolidColorBrush x:Key=\"ReadOnlyBgBrush\" Color=\"{StaticResource Color_003}\"/>\r\n    <SolidColorBrush x:Key=\"DisabledBackgroundBrush\" Color=\"{StaticResource Color_005}\"/>\r\n    <SolidColorBrush x:Key=\"TransparentBrush\" Color=\"{StaticResource Color_033}\"/>\r\n    <SolidColorBrush x:Key=\"ValidationErrorBrush\" Color=\"{StaticResource Color_007}\" />\r\n    <SolidColorBrush x:Key=\"ShadowBackgroundBrush\" Color=\"{StaticResource Color_001}\"/>\r\n\r\n    <!--  Button Brushes -->\r\n    <LinearGradientBrush x:Key=\"ButtonBackgroundBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n        <GradientStop Color=\"{StaticResource Color_030}\" Offset=\"1\"/>\r\n        <GradientStop Color=\"{StaticResource Color_032}\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <SolidColorBrush x:Key=\"ButtonBorderBrush\" Color=\"{StaticResource Color_027}\"/>\r\n\r\n    <LinearGradientBrush x:Key=\"ButtonHoverBackgroundBrush\" StartPoint=\"0,0\" EndPoint=\"0,1\">\r\n        <GradientStop Offset=\"0\" Color=\"{StaticResource Color_018}\"/>\r\n        <GradientStop Offset=\"0.23\" Color=\"{StaticResource Color_017}\"/>\r\n        <GradientStop Offset=\"0.75\" Color=\"{StaticResource Color_017}\"/>\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_019}\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <SolidColorBrush x:Key=\"ButtonHoverHighlightBorderBrush\" Color=\"{StaticResource Color_019}\"/>\r\n\r\n    <LinearGradientBrush x:Key=\"ButtonHoverBorderBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_013}\"/>\r\n        <GradientStop Color=\"{StaticResource Color_014}\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ButtonPressedBackgroundBrush\" StartPoint=\"0,0 \" EndPoint=\"0,1 \">\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_017}\"/>\r\n        <GradientStop Color=\"{StaticResource Color_016}\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ButtonPressedBorderBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n        <GradientStop Offset=\"0\" Color=\"{StaticResource Color_012}\"/>\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_013}\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <SolidColorBrush x:Key=\"ButtonFocusedBorderBrush\" Color=\"{StaticResource Color_013}\"/>\r\n\r\n    <!--  ToggleButton Brushes -->\r\n    <LinearGradientBrush x:Key=\"ToggleButtonBackgroundBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n        <GradientStop Color=\"{StaticResource Color_030}\" Offset=\"1\"/>\r\n        <GradientStop Color=\"{StaticResource Color_032}\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ToggleButtonBorderBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n        <GradientStop Color=\"{StaticResource Color_029}\"/>\r\n        <GradientStop Color=\"{StaticResource Color_027}\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ToggleButtonHoverBackgroundBrush\" StartPoint=\"0,0\" EndPoint=\"0,1\">\r\n        <GradientStop Offset=\"0\" Color=\"{StaticResource Color_018}\"/>\r\n        <GradientStop Offset=\"0.23\" Color=\"{StaticResource Color_017}\"/>\r\n        <GradientStop Offset=\"0.75\" Color=\"{StaticResource Color_017}\"/>\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_019}\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <SolidColorBrush x:Key=\"ToggleButtonHoverHighlightBorderBrush\" Color=\"{StaticResource Color_019}\"/>\r\n\r\n    <LinearGradientBrush x:Key=\"ToggleButtonHoverBorderBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_013}\"/>\r\n        <GradientStop Color=\"{StaticResource Color_014}\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ToggleButtonPressedBackgroundBrush\" StartPoint=\"0,0 \" EndPoint=\"0,1 \">\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_017}\"/>\r\n        <GradientStop Color=\"{StaticResource Color_016}\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ToggleButtonPressedBorderBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n        <GradientStop Offset=\"0\" Color=\"{StaticResource Color_012}\"/>\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_013}\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <SolidColorBrush x:Key=\"ToggleButtonFocusedBorderBrush\" Color=\"{StaticResource Color_013}\"/>\r\n\r\n    <!--  CheckBox Brushes -->\r\n    <SolidColorBrush x:Key=\"CheckBoxBackgroundBrush\" Color=\"{StaticResource Color_005}\"/>\r\n    <SolidColorBrush x:Key=\"CheckBoxBorderBrush\" Color=\"{StaticResource Color_027}\"/>\r\n    <LinearGradientBrush x:Key=\"CheckBoxInnerBackgroundBrush\"  EndPoint=\"0.639999985694885,0.879999995231628\" StartPoint=\"0.620000004768372,0.150000005960464\">\r\n        <GradientStop Color=\"{StaticResource Color_004}\" Offset=\"0.013\"/>\r\n        <GradientStop Color=\"{StaticResource Color_005}\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"CheckBoxInnerBorderBrush\" EndPoint=\".5,1\" StartPoint=\".5,0\">\r\n        <GradientStop Color=\"{StaticResource Color_030}\" Offset=\"1\"/>\r\n        <GradientStop Color=\"{StaticResource Color_027}\"/>\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"CheckBoxHoverBorderBrush\" Color=\"{StaticResource Color_012}\"/>\r\n    <SolidColorBrush x:Key=\"CheckBoxHoverBackgroundBrush\" Color=\"{StaticResource Color_018}\"/>\r\n    <SolidColorBrush x:Key=\"CheckBoxPressedBorderBrush\" Color=\"{StaticResource Color_012}\"/>\r\n    <SolidColorBrush x:Key=\"CheckBoxPressedBackgroundBrush\" Color=\"{StaticResource Color_018}\"/>\r\n    <LinearGradientBrush x:Key=\"CheckBoxInnerHoverBackgroundBrush\" EndPoint=\"0.64,0.88\" StartPoint=\"0.62,0.15\">\r\n        <GradientStop Color=\"{StaticResource Color_018}\" Offset=\"0.013\"/>\r\n        <GradientStop Color=\"{StaticResource Color_019}\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"CheckBoxInnerHoverBorderBrush\" EndPoint=\".5,1\" StartPoint=\".5,0\">\r\n        <GradientStop Color=\"{StaticResource Color_016}\" Offset=\"1\"/>\r\n        <GradientStop Color=\"{StaticResource Color_012}\"/>\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"CheckBoxPressedInnerBackgroundBrush\" EndPoint=\"0.64,0.88\" StartPoint=\"0.62,0.15\">\r\n        <GradientStop Color=\"{StaticResource Color_018}\" Offset=\"0.013\"/>\r\n        <GradientStop Color=\"{StaticResource Color_019}\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"CheckBoxPressedInnerBorderBrush\" EndPoint=\".5,1\" StartPoint=\".5,0\">\r\n        <GradientStop Color=\"{StaticResource Color_012}\"/>\r\n        <GradientStop Color=\"{StaticResource Color_016}\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"CheckBoxCheckIconBackgroundBrush\" Color=\"{StaticResource Color_025}\"/>\r\n    <SolidColorBrush x:Key=\"CheckBoxIndeterminateIconBackgroundBrush\" Color=\"{StaticResource Color_025}\"/>\r\n\r\n    <SolidColorBrush x:Key=\"CheckBoxFocusedBorderBrush\" Color=\"{StaticResource Color_013}\"/>\r\n\r\n\r\n    <!--  RadioButton Brushes -->\r\n    <SolidColorBrush x:Key=\"RadioButtonBackgroundBrush\" Color=\"{StaticResource Color_005}\"/>\r\n    <SolidColorBrush x:Key=\"RadioButtonBorderBrush\" Color=\"{StaticResource Color_027}\"/>\r\n    <LinearGradientBrush x:Key=\"RadioButtonInnerBackgroundBrush\"  EndPoint=\"0.639999985694885,0.879999995231628\" StartPoint=\"0.620000004768372,0.150000005960464\">\r\n        <GradientStop Color=\"{StaticResource Color_004}\" Offset=\"0.013\"/>\r\n        <GradientStop Color=\"{StaticResource Color_005}\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"RadioButtonInnerBorderBrush\" EndPoint=\".5,1\" StartPoint=\".5,0\">\r\n        <GradientStop Color=\"{StaticResource Color_030}\" Offset=\"1\"/>\r\n        <GradientStop Color=\"{StaticResource Color_027}\"/>\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"RadioButtonHoverBorderBrush\" Color=\"{StaticResource Color_012}\"/>\r\n    <SolidColorBrush x:Key=\"RadioButtonHoverBackgroundBrush\" Color=\"{StaticResource Color_018}\"/>\r\n    <SolidColorBrush x:Key=\"RadioButtonPressedBorderBrush\" Color=\"{StaticResource Color_012}\"/>\r\n    <SolidColorBrush x:Key=\"RadioButtonPressedBackgroundBrush\" Color=\"{StaticResource Color_018}\"/>\r\n    <LinearGradientBrush x:Key=\"RadioButtonInnerHoverBackgroundBrush\" EndPoint=\"0.64,0.88\" StartPoint=\"0.62,0.15\">\r\n        <GradientStop Color=\"{StaticResource Color_018}\" Offset=\"0.013\"/>\r\n        <GradientStop Color=\"{StaticResource Color_019}\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"RadioButtonInnerHoverBorderBrush\" EndPoint=\".5,1\" StartPoint=\".5,0\">\r\n        <GradientStop Color=\"{StaticResource Color_016}\" Offset=\"1\"/>\r\n        <GradientStop Color=\"{StaticResource Color_012}\"/>\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"RadioButtonPressedInnerBackgroundBrush\" EndPoint=\"0.64,0.88\" StartPoint=\"0.62,0.15\">\r\n        <GradientStop Color=\"{StaticResource Color_018}\" Offset=\"0.013\"/>\r\n        <GradientStop Color=\"{StaticResource Color_019}\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"RadioButtonPressedInnerBorderBrush\" EndPoint=\".5,1\" StartPoint=\".5,0\">\r\n        <GradientStop Color=\"{StaticResource Color_012}\"/>\r\n        <GradientStop Color=\"{StaticResource Color_016}\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"RadioButtonCheckIconBorderBrush\" Color=\"{StaticResource Color_024}\"/>\r\n    <LinearGradientBrush x:Key=\"RadioButtonCheckIconBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource Color_025}\" Offset=\"0.008\"/>\r\n        <GradientStop Color=\"{StaticResource Color_024}\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"RadioButtonIndeterminateIconBackgroundBrush\" Color=\"{StaticResource Color_025}\"/>\r\n\r\n    <SolidColorBrush x:Key=\"RadioButtonFocusedBorderBrush\" Color=\"{StaticResource Color_013}\"/>\r\n\r\n    <!--  Scrollbars / Scrollviewer Brushes -->\r\n    <SolidColorBrush x:Key=\"ScrollViewerCornerBackgroundBrush\" Color=\"{StaticResource Color_029}\"/>\r\n    <SolidColorBrush x:Key=\"ScrollViewerCornerBorderBrush\" Color=\"{StaticResource Color_027}\"/>\r\n    <SolidColorBrush x:Key=\"ScrollBarTrackBorderBrush\" Color=\"{StaticResource Color_027}\" />\r\n\r\n    <LinearGradientBrush x:Key=\"HScrollBarTrackBackgroundBrush\" StartPoint=\"0,0\" EndPoint=\"0,1\">\r\n        <GradientStop Offset=\"0\" Color=\"{StaticResource Color_028}\" />\r\n        <GradientStop Offset=\"0.40\" Color=\"{StaticResource Color_029}\" />\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_029}\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"VScrollBarTrackBackgroundBrush\" StartPoint=\"0.062,0.096\" EndPoint=\"0.98,0.096\">\r\n        <GradientStop Offset=\"0\" Color=\"{StaticResource Color_028}\" />\r\n        <GradientStop Offset=\"0.40\" Color=\"{StaticResource Color_029}\" />\r\n    </LinearGradientBrush>\r\n\r\n    <SolidColorBrush x:Key=\"ScrollBarButtonlBorderBrush\" Color=\"{StaticResource Color_026}\"/>\r\n    <SolidColorBrush x:Key=\"ScrollBarButtonlHighlightBackgroundBrush\" Color=\"{StaticResource Color_029}\"/>\r\n\r\n    <LinearGradientBrush x:Key=\"HScrollBarButtonlBackgroundBrush\" StartPoint=\"0,0\" EndPoint=\"0,1\">\r\n        <GradientStop Offset=\"0.15\" Color=\"{StaticResource Color_029}\"/>\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_027}\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"HScrollBarButtonlHoverBackgroundBrush\" StartPoint=\"0,0\" EndPoint=\"0,1\">\r\n        <GradientStop Offset=\"0.15\" Color=\"{StaticResource Color_029}\"/>\r\n        <GradientStop Offset=\"0.89\" Color=\"{StaticResource Color_028}\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"HScrollBarButtonlPressedBackgroundBrush\" StartPoint=\"0,0\" EndPoint=\"0,1\">\r\n        <GradientStop Offset=\"0.15\" Color=\"{StaticResource Color_028}\"/>\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_027}\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"VScrollBarButtonlBackgroundBrush\" StartPoint=\"0.062,0.096\" EndPoint=\"0.98,0.096\">\r\n        <GradientStop Offset=\"0.15\" Color=\"{StaticResource Color_029}\"/>\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_027}\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"VScrollBarButtonlHoverBackgroundBrush\" StartPoint=\"0,0\" EndPoint=\"1,0\">\r\n        <GradientStop Offset=\"0.15\" Color=\"{StaticResource Color_029}\"/>\r\n        <GradientStop Offset=\"0.89\" Color=\"{StaticResource Color_028}\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"VScrollBarButtonlPressedBackgroundBrush\" StartPoint=\"0.062,0.096\" EndPoint=\"0.98,0.096\">\r\n        <GradientStop Color=\"{StaticResource Color_029}\" />\r\n        <GradientStop Color=\"{StaticResource Color_027}\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"HScrollBarGlyphBackgroundBrush\" StartPoint=\"0,0\" EndPoint=\"1,0\">\r\n        <GradientStop Offset=\"0\" Color=\"{StaticResource Color_026}\"/>\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_025}\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"VScrollBarGlyphBackgroundBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n        <GradientStop Offset=\"0\" Color=\"{StaticResource Color_026}\"/>\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_025}\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <SolidColorBrush x:Key=\"ScrollBarThumbGlyphBackgroundBrush\" Color=\"{StaticResource Color_025}\"/>\r\n\r\n    <!--  Scrollbars / Scrollviewer WPF ONLY Brushes -->\r\n    <LinearGradientBrush x:Key=\"HThumbGlyphBackgroundBrush\" StartPoint=\"0,0\" EndPoint=\"2,0\" SpreadMethod=\"Repeat\" MappingMode=\"Absolute\">\r\n        <GradientStop Color=\"{StaticResource Color_025}\" />\r\n        <GradientStop Color=\"{StaticResource Color_025}\" Offset=\"0.60\" />\r\n        <GradientStop Color=\"{StaticResource Color_037}\" Offset=\"0.60\" />\r\n        <GradientStop Color=\"{StaticResource Color_037}\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"VThumbGlyphBackgroundBrush\" StartPoint=\"1,-1\" SpreadMethod=\"Repeat\" MappingMode=\"Absolute\">\r\n        <LinearGradientBrush.RelativeTransform>\r\n            <TransformGroup>\r\n                <ScaleTransform CenterY=\"0.5\" CenterX=\"0.5\" />\r\n                <SkewTransform CenterY=\"0.5\" CenterX=\"0.5\" />\r\n                <RotateTransform CenterY=\"0.5\" CenterX=\"0.5\" />\r\n                <TranslateTransform X=\"0.001\" Y=\"0.111\" />\r\n            </TransformGroup>\r\n        </LinearGradientBrush.RelativeTransform>\r\n        <GradientStop Color=\"{StaticResource Color_025}\" />\r\n        <GradientStop Color=\"{StaticResource Color_025}\" Offset=\"0.60\" />\r\n        <GradientStop Color=\"{StaticResource Color_037}\" Offset=\"0.60\" />\r\n        <GradientStop Color=\"{StaticResource Color_037}\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"HScrollBarDisabledBackgroundBrush\" StartPoint=\"0,0\" EndPoint=\"0,1\">\r\n        <GradientStop Color=\"{StaticResource Color_029}\" Offset=\"0.016\" />\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_030}\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"VScrollBarDisabledBackgroundBrush\" StartPoint=\"0.062,0.096\" EndPoint=\"0.98,0.096\">\r\n        <GradientStop Offset=\"0\" Color=\"{StaticResource Color_029}\" />\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_030}\" />\r\n    </LinearGradientBrush>\r\n\r\n    <!--  ComboBoxItem Brushes -->\r\n    <LinearGradientBrush x:Key=\"ComboBoxItemHoverBorderBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_013}\"/>\r\n        <GradientStop Color=\"{StaticResource Color_014}\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ComboBoxItemHoverBackgroundBrush\" StartPoint=\"0,0\" EndPoint=\"0,1\">\r\n        <GradientStop Offset=\"0\" Color=\"{StaticResource Color_018}\"/>\r\n        <GradientStop Offset=\"0.23\" Color=\"{StaticResource Color_017}\"/>\r\n        <GradientStop Offset=\"0.75\" Color=\"{StaticResource Color_017}\"/>\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_019}\"/>\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"ComboBoxItemHoverHighlightBorderBrush\" Color=\"{StaticResource Color_019}\"/>\r\n\r\n    <LinearGradientBrush x:Key=\"ComboBoxItemPressedBackgroundBrush\" StartPoint=\"0,0 \" EndPoint=\"0,1 \">\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_017}\"/>\r\n        <GradientStop Color=\"{StaticResource Color_016}\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ComboBoxItemPressedBorderBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n        <GradientStop Offset=\"0\" Color=\"{StaticResource Color_012}\"/>\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_013}\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ComboBoxItemSelectedBackgroundBrush\" StartPoint=\"0,0 \" EndPoint=\"0,1 \">\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_015}\"/>\r\n        <GradientStop Color=\"{StaticResource Color_014}\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ComboBoxItemSelectedBorderBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n        <GradientStop Offset=\"0\" Color=\"{StaticResource Color_012}\"/>\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_013}\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <SolidColorBrush x:Key=\"ComboBoxItemFocusedBorderBrush\" Color=\"{StaticResource Color_013}\"/>\r\n\r\n    <!--  ListBox Brushes -->\r\n    <SolidColorBrush x:Key=\"ListBoxBackgroundBrush\" Color=\"{StaticResource Color_032}\"/>    \r\n    <SolidColorBrush x:Key=\"ListBoxBorderBrush\" Color=\"{StaticResource Color_027}\"/>\r\n    <SolidColorBrush x:Key=\"ListBoxItemBackgroundBrush\"  Color=\"{StaticResource Color_033}\"/>\r\n    <SolidColorBrush x:Key=\"ListBoxItemBorderBrush\"  Color=\"{StaticResource Color_033}\"/>\r\n\r\n    <LinearGradientBrush x:Key=\"ListBoxItemHoverBorderBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_013}\"/>\r\n        <GradientStop Color=\"{StaticResource Color_014}\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ListBoxItemHoverBackgroundBrush\" StartPoint=\"0,0\" EndPoint=\"0,1\">\r\n        <GradientStop Offset=\"0\" Color=\"{StaticResource Color_018}\"/>\r\n        <GradientStop Offset=\"0.23\" Color=\"{StaticResource Color_017}\"/>\r\n        <GradientStop Offset=\"0.75\" Color=\"{StaticResource Color_017}\"/>\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_019}\"/>\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"ListBoxItemHoverHighlightBorderBrush\" Color=\"{StaticResource Color_019}\"/>\r\n\r\n    <LinearGradientBrush x:Key=\"ListBoxItemPressedBackgroundBrush\" StartPoint=\"0,0 \" EndPoint=\"0,1 \">\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_017}\"/>\r\n        <GradientStop Color=\"{StaticResource Color_016}\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ListBoxItemPressedBorderBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n        <GradientStop Offset=\"0\" Color=\"{StaticResource Color_012}\"/>\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_013}\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ListBoxItemSelectedBackgroundBrush\" StartPoint=\"0,0 \" EndPoint=\"0,1 \">\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_015}\"/>\r\n        <GradientStop Color=\"{StaticResource Color_014}\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ListBoxItemSelectedBorderBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n        <GradientStop Offset=\"0\" Color=\"{StaticResource Color_012}\"/>\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_013}\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <SolidColorBrush x:Key=\"ListBoxItemFocusedBorderBrush\" Color=\"{StaticResource Color_013}\"/>\r\n\r\n    <!--  TextBox / Editors Brushes -->\r\n    <SolidColorBrush x:Key=\"TextBoxBackgroundBrush\" Color=\"{StaticResource Color_005}\"/>\r\n    <SolidColorBrush x:Key=\"TextBoxBorderBrush\" Color=\"{StaticResource Color_027}\"/>\r\n    <SolidColorBrush x:Key=\"TextBoxHoverBorderBrush\" Color=\"{StaticResource Color_014}\"/>\r\n    <SolidColorBrush x:Key=\"TextBoxFocusedBrush\" Color=\"{StaticResource Color_013}\"/>\r\n    <SolidColorBrush x:Key=\"TextBoxEditableBorderBrush\" Color=\"{StaticResource Color_027}\"/>\r\n    <SolidColorBrush x:Key=\"TextBoxSelectionBackgroundBrush\" Color=\"{StaticResource Color_026}\"/>\r\n    <SolidColorBrush x:Key=\"TextBoxReadOnlyBackgroundBrush\" Color=\"{StaticResource Color_032}\"/>\r\n    <SolidColorBrush x:Key=\"TextBoxReadOnlyBorderBrush\" Color=\"{StaticResource Color_029}\"/>\r\n    <SolidColorBrush x:Key=\"TextBoxDisabledBorderBrush\" Color=\"{StaticResource Color_030}\"/>\r\n\r\n    <!--  Glyph Brushes -->\r\n    <SolidColorBrush x:Key=\"GlyphBackgroundBrush\" Color=\"{StaticResource Color_005}\"/>\r\n    <SolidColorBrush x:Key=\"GlyphBorderBrush\" Color=\"{StaticResource Color_025}\"/>\r\n    <SolidColorBrush x:Key=\"GlyphFocusedBackgroundBrush\" Color=\"{StaticResource Color_024}\"/>\r\n    <LinearGradientBrush x:Key=\"ArrowBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_026}\" />\r\n        <GradientStop Color=\"{StaticResource Color_025}\" />\r\n    </LinearGradientBrush>\r\n\r\n    <!-- ******************************************************** SL-WPF INLINE-CONTROLS SHARED RESOURCES ***********************************************************\r\n*********************************************************************************************************************************************************************    -->\r\n\r\n    <!-- *********************************  Base Button Style  ********************************* -->\r\n    <Style x:Key=\"BaseButtonStyle\" TargetType=\"Button\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource ButtonBackgroundBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource ButtonBorderBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\"/>\r\n        <Setter Property=\"Padding\" Value=\"3\"/>\r\n        <Setter Property=\"Cursor\" Value=\"Hand\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n    </Style>\r\n\r\n    <!-- *********************************  Button Style  ********************************* -->\r\n    <Style x:Key=\"ButtonStyle\" BasedOn=\"{StaticResource BaseButtonStyle}\" TargetType=\"Button\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Button\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"BaseShape\" Storyboard.TargetProperty=\"Background\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonHoverBackgroundBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"BaseShape\" Storyboard.TargetProperty=\"BorderBrush\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonHoverBorderBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ButtonHighlight\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"BaseShape\" Storyboard.TargetProperty=\"Background\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonPressedBackgroundBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"BaseShape\" Storyboard.TargetProperty=\"BorderBrush\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonPressedBorderBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.6\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"FocusedVisualElement\" d:IsOptimized=\"True\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"BaseShape\" CornerRadius=\"3\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" />\r\n                        <Rectangle x:Name=\"ButtonHighlight\" Margin=\"1\" RadiusX=\"2\" RadiusY=\"2\" Stroke=\"{StaticResource ButtonHoverHighlightBorderBrush}\" StrokeThickness=\"1\" Grid.ColumnSpan=\"2\" Opacity=\"0\"/>\r\n                        <ContentPresenter x:Name=\"contentPresenter\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                        <Rectangle x:Name=\"FocusedVisualElement\" Stroke=\"{StaticResource ButtonFocusedBorderBrush}\" StrokeThickness=\"1\"  RadiusX=\"3\" RadiusY=\"3\" Opacity=\"0\"/>\r\n                        <Rectangle x:Name=\"DisabledVisualElement\" Fill=\"{StaticResource DisabledBackgroundBrush}\" IsHitTestVisible=\"false\" RadiusX=\"3\" RadiusY=\"3\" Opacity=\"0\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- *********************************  CheckBox Style  ********************************* -->\r\n    <Style x:Key=\"CheckBoxStyle\" TargetType=\"CheckBox\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource CheckBoxBackgroundBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Padding\" Value=\"4,1,0,0\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource CheckBoxBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"CheckBox\">\r\n                    <Grid >\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"16\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"hover\" d:IsOptimized=\"True\"/>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0.6\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"hoverBoxMiddle\" d:IsOptimized=\"True\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"pressed\" d:IsOptimized=\"True\"/>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0.6\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"pressedBoxMiddle\" d:IsOptimized=\"True\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\".55\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"contentPresenter\"/>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0.6\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"DisabledVisualElement\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"CheckIcon\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\"/>\r\n                                <VisualState x:Name=\"Indeterminate\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"IndeterminateIcon\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"Opacity\" Storyboard.TargetName=\"ContentFocusVisualElement\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"ValidationStates\">\r\n                                <VisualState x:Name=\"Valid\"/>\r\n                                <VisualState x:Name=\"InvalidUnfocused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ValidationErrorElement\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"InvalidFocused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"Visibility\" Storyboard.TargetName=\"ValidationErrorElement\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"IsOpen\" Storyboard.TargetName=\"validationTooltip\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <System:Boolean>True</System:Boolean>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\">\r\n                            <Rectangle x:Name=\"normal\" Fill=\"{TemplateBinding Background}\" Height=\"14\" Margin=\"1\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" Width=\"14\"/>\r\n                            <Rectangle x:Name=\"normalBoxMiddle\" Opacity=\"0.9\" Height=\"10\" StrokeThickness=\"1\" Width=\"10\" Fill=\"{StaticResource CheckBoxInnerBackgroundBrush}\" Stroke=\"{StaticResource CheckBoxInnerBorderBrush}\"/>\r\n                            <Rectangle x:Name=\"hover\" Fill=\"{StaticResource CheckBoxHoverBackgroundBrush}\" Height=\"14\" Margin=\"1\" StrokeThickness=\"{TemplateBinding BorderThickness}\" Width=\"14\" Stroke=\"{StaticResource CheckBoxHoverBorderBrush}\" Opacity=\"0\"/>\r\n                            <Rectangle x:Name=\"hoverBoxMiddle\" Height=\"10\" StrokeThickness=\"1\" Width=\"10\" Opacity=\"0\" Fill=\"{StaticResource CheckBoxInnerHoverBackgroundBrush}\" Stroke=\"{StaticResource CheckBoxInnerHoverBorderBrush}\"/>\r\n                            <Rectangle x:Name=\"pressed\" Fill=\"{StaticResource CheckBoxPressedBackgroundBrush}\" Height=\"14\" Margin=\"1\" StrokeThickness=\"{TemplateBinding BorderThickness}\" Width=\"14\" Stroke=\"{StaticResource CheckBoxPressedBorderBrush}\" Opacity=\"0\"/>\r\n                            <Rectangle x:Name=\"pressedBoxMiddle\" Height=\"10\" StrokeThickness=\"1\" Width=\"10\" Opacity=\"0\" Fill=\"{StaticResource CheckBoxPressedInnerBackgroundBrush}\" Stroke=\"{StaticResource CheckBoxPressedInnerBorderBrush}\"/>\r\n                            <Path x:Name=\"CheckIcon\" Data=\"M103.10625,598.38019 C103.10625,598.38019 104.35281,597.37262 104.35281,597.37262 C104.35281,597.37262 106.69083,599.42383 106.69083,599.42383 C106.69083,599.42383 110.9969,593.85394 110.9969,593.85394 C110.9969,593.85394 112.8087,593.86188 112.8087,593.86188 C112.8087,593.86188 107.73771,601.85333 107.73771,601.85333 C107.73771,601.85333 106.1218,601.8479 106.1218,601.8479 C106.1218,601.8479 103.10625,598.38019 103.10625,598.38019 z\" Fill=\"{StaticResource CheckBoxCheckIconBackgroundBrush}\" FlowDirection=\"LeftToRight\" Opacity=\"0\" Stretch=\"Fill\" UseLayoutRounding=\"False\" Width=\"8\" Height=\"8\"/>\r\n                            <Rectangle x:Name=\"IndeterminateIcon\" Fill=\"{StaticResource CheckBoxIndeterminateIconBackgroundBrush}\" Height=\"2\" Opacity=\"0\" Width=\"6\"/>\r\n                            <Rectangle x:Name=\"ContentFocusVisualElement\" Height=\"14\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource CheckBoxFocusedBorderBrush}\" StrokeThickness=\"1\" Width=\"14\"/>\r\n                            <Border x:Name=\"ValidationErrorElement\" Height=\"16\" BorderBrush=\"{StaticResource ValidationErrorBrush}\" BorderThickness=\"1\" ToolTipService.PlacementTarget=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\" Visibility=\"Collapsed\">\r\n                                <ToolTipService.ToolTip>\r\n                                    <ToolTip x:Name=\"validationTooltip\" DataContext=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Right\" PlacementTarget=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\" >\r\n                                        <ToolTip.Triggers>\r\n                                            <EventTrigger RoutedEvent=\"Canvas.Loaded\">\r\n                                                <BeginStoryboard>\r\n                                                    <Storyboard>\r\n                                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"IsHitTestVisible\" Storyboard.TargetName=\"validationTooltip\">\r\n                                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                                <DiscreteObjectKeyFrame.Value>\r\n                                                                    <System:Boolean>true</System:Boolean>\r\n                                                                </DiscreteObjectKeyFrame.Value>\r\n                                                            </DiscreteObjectKeyFrame>\r\n                                                        </ObjectAnimationUsingKeyFrames>\r\n                                                    </Storyboard>\r\n                                                </BeginStoryboard>\r\n                                            </EventTrigger>\r\n                                        </ToolTip.Triggers>\r\n                                    </ToolTip>\r\n                                </ToolTipService.ToolTip>\r\n                                <Grid Background=\"{StaticResource TransparentBrush}\" HorizontalAlignment=\"Right\" Height=\"10\" Margin=\"0,-4,-4,0\" VerticalAlignment=\"Top\" Width=\"10\">\r\n                                    <Path Data=\"M 1,0 L5,0 A 2,2 90 0 1 7,2 L7,6 z\" Fill=\"{StaticResource ValidationErrorBrush}\" Margin=\"0,3,0,0\"/>\r\n                                </Grid>\r\n                            </Border>\r\n                            <Rectangle x:Name=\"DisabledVisualElement\" Fill=\"{StaticResource DisabledBackgroundBrush}\" Height=\"14\" Opacity=\"0\" Width=\"14\"/>\r\n                        </Grid>\r\n                        <ContentPresenter x:Name=\"contentPresenter\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Grid.Column=\"1\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- ********************************** RadioButton Style **********************************-->\r\n    <Style x:Key=\"RadioButtonStyle\" TargetType=\"RadioButton\">\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\"/>\r\n        <Setter Property=\"Background\" Value=\"{StaticResource RadioButtonBackgroundBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource RadioButtonBorderBrush}\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\"/>\r\n        <Setter Property=\"Padding\" Value=\"4,1,0,0\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"RadioButton\">\r\n                    <Grid >\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"16\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"hoverBd\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible\r\n                                                    </Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"hoverBd\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible\r\n                                                    </Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\".55\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"contentPresenter\"/>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0.6\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"DisabledVisualElement\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"check\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible\r\n                                                    </Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\"/>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"ContentFocusVisualElement\" d:IsOptimized=\"True\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"ValidationStates\">\r\n                                <VisualState x:Name=\"Valid\"/>\r\n                                <VisualState x:Name=\"InvalidUnfocused\"/>\r\n                                <VisualState x:Name=\"InvalidFocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid x:Name=\"Bd\">\r\n                            <Ellipse Width=\"13\" Height=\"13\" Fill=\"{TemplateBinding Background}\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\"/>\r\n                            <Ellipse Width=\"9\" Height=\"9\" Fill=\"{StaticResource RadioButtonInnerBackgroundBrush}\" Stroke=\"{StaticResource RadioButtonInnerBorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"hoverBd\" Visibility=\"Collapsed\">\r\n                            <Ellipse Width=\"13\" Height=\"13\" Fill=\"{StaticResource RadioButtonHoverBackgroundBrush}\" Stroke=\"{StaticResource RadioButtonHoverBorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\"/>\r\n                            <Ellipse Width=\"9\" Height=\"9\" Fill=\"{StaticResource RadioButtonInnerHoverBackgroundBrush}\" Stroke=\"{StaticResource RadioButtonInnerHoverBorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"pressedBd\" Visibility=\"Collapsed\">\r\n                            <Ellipse Width=\"13\" Height=\"13\" Fill=\"{StaticResource RadioButtonPressedBackgroundBrush}\"  Stroke=\"{StaticResource RadioButtonPressedBorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\"/>\r\n                            <Ellipse Width=\"9\" Height=\"9\" Fill=\"{StaticResource RadioButtonPressedInnerBackgroundBrush}\" Stroke=\"{StaticResource RadioButtonPressedInnerBorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"check\" Visibility=\"Collapsed\">\r\n                            <Ellipse Width=\"9\" Height=\"9\" Stroke=\"{StaticResource RadioButtonCheckIconBorderBrush}\" StrokeThickness=\"1\" Fill=\"{StaticResource RadioButtonCheckIconBackgroundBrush}\" />\r\n                        </Grid>\r\n                        <ContentPresenter x:Name=\"contentPresenter\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Grid.Column=\"1\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                        <Ellipse x:Name=\"ContentFocusVisualElement\" Height=\"13\" Width=\"13\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource RadioButtonFocusedBorderBrush}\" StrokeThickness=\"1\"/>\r\n                        <Ellipse x:Name=\"DisabledVisualElement\" Fill=\"{StaticResource DisabledBackgroundBrush}\" Height=\"13\" Width=\"13\" Opacity=\"0\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- ********************************** ComboBoxItem Style **********************************-->\r\n    <Style x:Key=\"ComboBoxItemStyle\" TargetType=\"ComboBoxItem\">\r\n        <Setter Property=\"Padding\" Value=\"5,3,5,3\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\"/>\r\n        <Setter Property=\"Background\" Value=\"{StaticResource TransparentBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ComboBoxItem\">\r\n                    <Grid Background=\"{TemplateBinding Background}\" >\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"hoverBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible\r\n                                                    </Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0.5\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"contentPresenter\" d:IsOptimized=\"True\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualState x:Name=\"Unselected\"/>\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"SelectedBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible\r\n                                                    </Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"SelectedUnfocused\"/>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"FocusVisualElement\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"LayoutStates\">\r\n                                <VisualState x:Name=\"AfterLoaded\"/>\r\n                                <VisualState x:Name=\"BeforeLoaded\"/>\r\n                                <VisualState x:Name=\"BeforeUnloaded\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"hoverBorder\" Background=\"{StaticResource ComboBoxItemHoverBackgroundBrush}\" BorderBrush=\"{StaticResource ComboBoxItemHoverBorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Visibility=\"Collapsed\" CornerRadius=\"2\">\r\n                            <Rectangle Stroke=\"{StaticResource ComboBoxItemHoverHighlightBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                        </Border>\r\n                        <Border x:Name=\"SelectedBorder\" Background=\"{StaticResource ComboBoxItemSelectedBackgroundBrush}\" BorderBrush=\"{StaticResource ComboBoxItemSelectedBorderBrush}\" CornerRadius=\"2\" BorderThickness=\"{TemplateBinding BorderThickness}\" Visibility=\"Collapsed\" IsHitTestVisible=\"False\"/>\r\n                        <Rectangle x:Name=\"FocusVisualElement\" Stroke=\"{StaticResource ComboBoxItemFocusedBorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" Visibility=\"Collapsed\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                        <ContentPresenter x:Name=\"contentPresenter\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- ********************************** ComboBoxToggleButton Style **********************************-->\r\n    <Style x:Key=\"ComboBoxToggleButtonStyle\" TargetType=\"ToggleButton\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource ButtonBackgroundBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource ButtonBorderBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"Padding\" Value=\"2\"/>\r\n        <Setter Property=\"Cursor\" Value=\"Hand\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ToggleButton\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Background\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonHoverBackgroundBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"BorderBrush\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonHoverBorderBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ButtonHighlight\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Background\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonPressedBackgroundBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"BorderBrush\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonPressedBorderBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.6\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"checkedBd\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\"/>\r\n                                <VisualState x:Name=\"Indeterminate\"/>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"FocusedVisualElement\" d:IsOptimized=\"True\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                            <ColumnDefinition Width=\"14\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Rectangle x:Name=\"Bd\" Fill=\"{StaticResource TransparentBrush}\" Grid.ColumnSpan=\"2\" />\r\n                        <Grid Grid.Column=\"1\">\r\n                            <Border x:Name=\"Background\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" />\r\n                            <Rectangle x:Name=\"ButtonHighlight\" Margin=\"1\" Stroke=\"{StaticResource ButtonHoverHighlightBorderBrush}\" StrokeThickness=\"1\" Grid.ColumnSpan=\"2\" Opacity=\"0\"/>\r\n                            <Border x:Name=\"checkedBd\" BorderBrush=\"{StaticResource ButtonPressedBorderBrush}\" BorderThickness=\"1\" Background=\"{StaticResource ButtonPressedBackgroundBrush}\" Visibility=\"Collapsed\"/>\r\n                            <ContentPresenter x:Name=\"contentPresenter\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                            <Rectangle x:Name=\"FocusedVisualElement\" Stroke=\"{StaticResource ButtonFocusedBorderBrush}\" StrokeThickness=\"1\" Opacity=\"0\"/>\r\n                            <Rectangle x:Name=\"DisabledVisualElement\" Fill=\"{StaticResource DisabledBackgroundBrush}\" IsHitTestVisible=\"false\" Opacity=\"0\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- *********************************  ListBoxItem Style  ********************************* -->\r\n    <Style x:Key=\"ListBoxItemStyle\" TargetType=\"ListBoxItem\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource ListBoxItemBackgroundBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource ListBoxItemBorderBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\"/>\r\n        <Setter Property=\"Padding\" Value=\"3\"/>\r\n        <Setter Property=\"Margin\" Value=\"0\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ListBoxItem\">\r\n                    <Grid >\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"BaseShape\" Storyboard.TargetProperty=\"Background\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ListBoxItemHoverBackgroundBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"BaseShape\" Storyboard.TargetProperty=\"BorderBrush\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ListBoxItemHoverBorderBrush}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"Highlight\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" To=\"0.5\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"contentPresenter\" d:IsOptimized=\"True\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualState x:Name=\"Unselected\"/>\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"SelectedBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"SelectedUnfocused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"SelectedBorder\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"FocusedVisualElement\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"BaseShape\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\">\r\n                            <Rectangle x:Name=\"Highlight\" Stroke=\"{StaticResource ListBoxItemHoverHighlightBorderBrush}\" StrokeThickness=\"1\" Visibility=\"Collapsed\"/>\r\n                        </Border>\r\n                        <Rectangle x:Name=\"SelectedBorder\" Fill=\"{StaticResource ListBoxItemSelectedBackgroundBrush}\" Stroke=\"{StaticResource ListBoxItemSelectedBorderBrush}\" Visibility=\"Collapsed\"/>\r\n                        <ContentPresenter x:Name=\"contentPresenter\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"/>\r\n                        <Rectangle x:Name=\"FocusedVisualElement\" IsHitTestVisible=\"False\" Visibility=\"Collapsed\" Stroke=\"{StaticResource ListBoxItemFocusedBorderBrush}\" StrokeThickness=\"1\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/Office2010Blue/Styles.WPF.xaml",
    "content": "﻿<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" \r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" \r\n                    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\" \r\n                    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" \r\n                    mc:Ignorable=\"d\">\r\n\r\n  <!-- *********************************  RESOURCES  ********************************* -->\r\n  <ResourceDictionary.MergedDictionaries>\r\n    <ResourceDictionary Source=\"Theme.Colors.xaml\" />\r\n    <ResourceDictionary Source=\"Styles.Shared.xaml\" />\r\n  </ResourceDictionary.MergedDictionaries>\r\n\r\n  <!-- ******************************************************** WPF SPECIFIC INLINE-CONTROLS RESOURCES **********************************************************\r\n      *************************************************************************************************************************************************************    -->\r\n\r\n  <!-- *********************************  Vertical Scrollbar Page Button Style  ********************************* -->\r\n  <Style x:Key=\"VScrollBarPageButton\" TargetType=\"{x:Type RepeatButton}\">\r\n    <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n    <Setter Property=\"Background\" Value=\"Transparent\" />\r\n    <Setter Property=\"Focusable\" Value=\"false\" />\r\n    <Setter Property=\"IsTabStop\" Value=\"false\" />\r\n    <Setter Property=\"Template\">\r\n      <Setter.Value>\r\n        <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n          <Rectangle Fill=\"{TemplateBinding Background}\" Height=\"{TemplateBinding Height}\" Width=\"{TemplateBinding Width}\">\r\n            <VisualStateManager.VisualStateGroups>\r\n              <VisualStateGroup x:Name=\"CommonStates\">\r\n                <VisualState x:Name=\"Normal\" />\r\n                <VisualState x:Name=\"MouseOver\" />\r\n                <VisualState x:Name=\"Pressed\" />\r\n                <VisualState x:Name=\"Disabled\" />\r\n              </VisualStateGroup>\r\n            </VisualStateManager.VisualStateGroups>\r\n          </Rectangle>\r\n        </ControlTemplate>\r\n      </Setter.Value>\r\n    </Setter>\r\n  </Style>\r\n\r\n  <!-- *********************************  Horizontal Scrollbar THumb Style  ********************************* -->\r\n  <Style x:Key=\"HScrollBarThumb\" TargetType=\"{x:Type Thumb}\">\r\n    <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n    <Setter Property=\"IsTabStop\" Value=\"false\" />\r\n    <Setter Property=\"Template\">\r\n      <Setter.Value>\r\n        <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n          <Grid Margin=\"0\" >\r\n            <VisualStateManager.VisualStateGroups>\r\n              <VisualStateGroup x:Name=\"CommonStates\">\r\n                <VisualState x:Name=\"Normal\" />\r\n                <VisualState x:Name=\"MouseOver\">\r\n                  <Storyboard>\r\n                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"highlight\">\r\n                      <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                    </ObjectAnimationUsingKeyFrames>\r\n                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Bd\" Storyboard.TargetProperty=\"Background\">\r\n                      <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource HScrollBarButtonlHoverBackgroundBrush}\" />\r\n                    </ObjectAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Pressed\">\r\n                  <Storyboard>\r\n                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"Bd\">\r\n                      <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource HScrollBarButtonlPressedBackgroundBrush}\" />\r\n                    </ObjectAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Disabled\" />\r\n              </VisualStateGroup>\r\n            </VisualStateManager.VisualStateGroups>\r\n            <Border x:Name=\"Bd\" Background=\"{StaticResource HScrollBarButtonlBackgroundBrush}\" BorderBrush=\"{StaticResource ScrollBarButtonlBorderBrush}\" BorderThickness=\"1\" CornerRadius=\"1\">\r\n              <Rectangle x:Name=\"highlight\" Stroke=\"{StaticResource ScrollBarButtonlHighlightBackgroundBrush}\" Visibility=\"Collapsed\" />\r\n            </Border>\r\n            <Rectangle Fill=\"{StaticResource HThumbGlyphBackgroundBrush}\" Margin=\"2.4,0\" Height=\"7\" MinWidth=\"3\" MaxWidth=\"7\" />\r\n          </Grid>\r\n        </ControlTemplate>\r\n      </Setter.Value>\r\n    </Setter>\r\n  </Style>\r\n\r\n  <!-- *********************************  Vertical Scrollbar THumb Style  ********************************* -->\r\n  <Style x:Key=\"VScrollBarThumb\" TargetType=\"{x:Type Thumb}\">\r\n    <Setter Property=\"Stylus.IsPressAndHoldEnabled\" Value=\"false\" />\r\n    <Setter Property=\"Template\">\r\n      <Setter.Value>\r\n        <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n          <Grid x:Name=\"grid\" Height=\"Auto\" Width=\"Auto\" >\r\n            <VisualStateManager.VisualStateGroups>\r\n              <VisualStateGroup x:Name=\"CommonStates\">\r\n                <VisualState x:Name=\"Normal\" />\r\n                <VisualState x:Name=\"MouseOver\">\r\n                  <Storyboard>\r\n                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Visibility)\" Storyboard.TargetName=\"highlight\">\r\n                      <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                    </ObjectAnimationUsingKeyFrames>\r\n                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Bd\" Storyboard.TargetProperty=\"Background\">\r\n                      <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource VScrollBarButtonlHoverBackgroundBrush}\" />\r\n                    </ObjectAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Pressed\">\r\n                  <Storyboard>\r\n                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetProperty=\"Background\" Storyboard.TargetName=\"Bd\">\r\n                      <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource VScrollBarButtonlPressedBackgroundBrush}\" />\r\n                    </ObjectAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Disabled\" />\r\n              </VisualStateGroup>\r\n            </VisualStateManager.VisualStateGroups>\r\n            <Border x:Name=\"Bd\" Background=\"{StaticResource VScrollBarButtonlBackgroundBrush}\" BorderBrush=\"{StaticResource ScrollBarButtonlBorderBrush}\" BorderThickness=\"1\" CornerRadius=\"1\">\r\n              <Rectangle x:Name=\"highlight\" Stroke=\"{StaticResource ScrollBarButtonlHighlightBackgroundBrush}\" Visibility=\"Collapsed\" />\r\n            </Border>\r\n            <Rectangle Fill=\"{StaticResource VThumbGlyphBackgroundBrush}\" Margin=\"2.4,0\" Height=\"7\" MinWidth=\"3\" MaxWidth=\"7\" />\r\n          </Grid>\r\n        </ControlTemplate>\r\n      </Setter.Value>\r\n    </Setter>\r\n  </Style>\r\n\r\n  <!-- *********************************  Scrollbar Page Button Style  ********************************* -->\r\n  <Style x:Key=\"ScrollBarPageButtonStyle\" TargetType=\"{x:Type RepeatButton}\">\r\n    <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n    <Setter Property=\"Background\" Value=\"Transparent\" />\r\n    <Setter Property=\"Focusable\" Value=\"false\" />\r\n    <Setter Property=\"IsTabStop\" Value=\"false\" />\r\n    <Setter Property=\"Template\">\r\n      <Setter.Value>\r\n        <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n          <Rectangle Fill=\"{TemplateBinding Background}\" Height=\"{TemplateBinding Height}\" Width=\"{TemplateBinding Width}\" />\r\n        </ControlTemplate>\r\n      </Setter.Value>\r\n    </Setter>\r\n  </Style>\r\n\r\n  <!-- *********************************  ScrollBarRepeatBtn Style  ********************************* -->\r\n  <Style x:Key=\"ScrollBarButtonStyle\" TargetType=\"{x:Type RepeatButton}\">\r\n    <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n    <Setter Property=\"Focusable\" Value=\"false\" />\r\n    <Setter Property=\"IsTabStop\" Value=\"false\" />\r\n    <Setter Property=\"Template\">\r\n      <Setter.Value>\r\n        <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n          <Grid x:Name=\"grid1\" >\r\n            <VisualStateManager.VisualStateGroups>\r\n              <VisualStateGroup x:Name=\"CommonStates\">\r\n                <VisualState x:Name=\"Normal\" />\r\n                <VisualState x:Name=\"MouseOver\" />\r\n                <VisualState x:Name=\"Pressed\">\r\n                  <Storyboard>\r\n                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Bd\" Storyboard.TargetProperty=\"Background\">\r\n                      <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource HScrollBarButtonlPressedBackgroundBrush}\" />\r\n                    </ObjectAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Disabled\" />\r\n              </VisualStateGroup>\r\n            </VisualStateManager.VisualStateGroups>\r\n            <Border x:Name=\"Bd\" Background=\"{StaticResource HScrollBarButtonlBackgroundBrush}\" BorderBrush=\"{StaticResource ScrollBarButtonlBorderBrush}\" BorderThickness=\"1\" CornerRadius=\"1\" Margin=\"0\">\r\n              <Rectangle x:Name=\"highlight\" Stroke=\"{StaticResource ScrollBarButtonlHighlightBackgroundBrush}\" Visibility=\"Collapsed\" />\r\n            </Border>\r\n            <ContentPresenter x:Name=\"contentPresenter\" Margin=\"0\" />\r\n          </Grid>\r\n        </ControlTemplate>\r\n      </Setter.Value>\r\n    </Setter>\r\n  </Style>\r\n\r\n  <!-- *********************************  Scrollbar Style  ********************************* -->\r\n  <Style x:Key=\"ScrollBarStyle\" TargetType=\"{x:Type ScrollBar}\">\r\n    <Setter Property=\"Background\" Value=\"{StaticResource VScrollBarTrackBackgroundBrush}\" />\r\n    <Setter Property=\"BorderBrush\" Value=\"{StaticResource ScrollBarTrackBorderBrush}\" />\r\n    <Setter Property=\"Stylus.IsPressAndHoldEnabled\" Value=\"false\" />\r\n    <Setter Property=\"Stylus.IsFlicksEnabled\" Value=\"false\" />\r\n    <Setter Property=\"Width\" Value=\"{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}\" />\r\n    <Setter Property=\"MinWidth\" Value=\"{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}\" />\r\n    <Setter Property=\"Template\">\r\n      <Setter.Value>\r\n        <ControlTemplate TargetType=\"{x:Type ScrollBar}\">\r\n          <Grid x:Name=\"Bg\" >\r\n            <Grid.RowDefinitions>\r\n              <RowDefinition MaxHeight=\"{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}\" />\r\n              <RowDefinition Height=\"0.00001*\" />\r\n              <RowDefinition MaxHeight=\"{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}\" />\r\n            </Grid.RowDefinitions>\r\n            <VisualStateManager.VisualStateGroups>\r\n              <VisualStateGroup x:Name=\"CommonStates\">\r\n                <VisualStateGroup.Transitions>\r\n                  <VisualTransition GeneratedDuration=\"0:0:0.3\" />\r\n                </VisualStateGroup.Transitions>\r\n                <VisualState x:Name=\"Normal\" />\r\n                <VisualState x:Name=\"MouseOver\">\r\n                  <Storyboard>\r\n                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"repeatButton\">\r\n                      <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                    </DoubleAnimationUsingKeyFrames>\r\n                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"repeatButton1\">\r\n                      <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                    </DoubleAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Disabled\">\r\n                  <Storyboard>\r\n                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"repeatButton\">\r\n                      <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0.6\" />\r\n                    </DoubleAnimationUsingKeyFrames>\r\n                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"repeatButton1\">\r\n                      <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0.6\" />\r\n                    </DoubleAnimationUsingKeyFrames>\r\n                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"thumb\">\r\n                      <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0\" />\r\n                    </DoubleAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n              </VisualStateGroup>\r\n            </VisualStateManager.VisualStateGroups>\r\n            <Border Grid.RowSpan=\"3\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"0,1\" CornerRadius=\"0\" Height=\"Auto\" Margin=\"0\" Grid.Row=\"0\" VerticalAlignment=\"Stretch\" />\r\n            <RepeatButton x:Name=\"repeatButton\" Margin=\"1,1,1,0\" Command=\"{x:Static ScrollBar.LineUpCommand}\" IsEnabled=\"{TemplateBinding IsMouseOver}\" Style=\"{StaticResource ScrollBarButtonStyle}\" Opacity=\"0\" />\r\n            <Path x:Name=\"smallDecreaseGlyph\" Width=\"9\" Height=\"5\" Fill=\"{StaticResource VScrollBarGlyphBackgroundBrush}\" IsHitTestVisible=\"False\" Data=\"M 4,0 C4,0 4,1 4,1 4,1 3,1 3,1 3,1 3,2 3,2 3,2 2,2 2,2 2,2 2,3 2,3 2,3 1,3 1,3 1,3 1,4 1,4 1,4 0,4 0,4 0,4 0,5 0,5 0,5 9,5 9,5 9,5 9,4 9,4 9,4 8,4 8,4 8,4 8,3 8,3 8,3 7,3 7,3 7,3 7,2 7,2 7,2 6,2 6,2 6,2 6,1 6,1 6,1 5,1 5,1 5,1 5,0 5,0 5,0 4,0 4,0 z\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" />\r\n            <Track x:Name=\"PART_Track\" IsDirectionReversed=\"true\" IsEnabled=\"{TemplateBinding IsMouseOver}\" Grid.Row=\"1\">\r\n              <Track.DecreaseRepeatButton>\r\n                <RepeatButton Command=\"{x:Static ScrollBar.PageUpCommand}\" Style=\"{StaticResource ScrollBarPageButtonStyle}\" />\r\n              </Track.DecreaseRepeatButton>\r\n              <Track.IncreaseRepeatButton>\r\n                <RepeatButton Command=\"{x:Static ScrollBar.PageDownCommand}\" Style=\"{StaticResource ScrollBarPageButtonStyle}\" />\r\n              </Track.IncreaseRepeatButton>\r\n              <Track.Thumb>\r\n                <Thumb x:Name=\"thumb\" Margin=\"1,0\" Style=\"{StaticResource VScrollBarThumb}\" />\r\n              </Track.Thumb>\r\n            </Track>\r\n            <RepeatButton x:Name=\"repeatButton1\" Command=\"{x:Static ScrollBar.LineDownCommand}\" IsEnabled=\"{TemplateBinding IsMouseOver}\" Grid.Row=\"2\" Style=\"{StaticResource ScrollBarButtonStyle}\" Margin=\"1,0,1,1\" Opacity=\"0\" />\r\n            <Path x:Name=\"smallIncreaseGlyph\" Width=\"9\" Height=\"5\" IsHitTestVisible=\"False\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Data=\"M 4,5 C4,5 4,4 4,4 4,4 3,4 3,4 3,4 3,3 3,3 3,3 2,3 2,3 2,3 2,2 2,2 2,2 1,2 1,2 1,2 1,1 1,1 1,1 0,1 0,1 0,1 0,0 0,0 0,0 9,0 9,0 9,0 9,1 9,1 9,1 8,1 8,1 8,1 8,2 8,2 8,2 7,2 7,2 7,2 7,3 7,3 7,3 6,3 6,3 6,3 6,4 6,4 6,4 5,4 5,4 5,4 5,5 5,5 5,5 4,5 4,5 z\" Grid.Row=\"2\" Fill=\"{StaticResource VScrollBarGlyphBackgroundBrush}\" />\r\n          </Grid>\r\n          <ControlTemplate.Triggers>\r\n            <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n              <Setter Property=\"Background\" TargetName=\"Bg\" Value=\"{StaticResource DisabledBackgroundBrush}\" />\r\n            </Trigger>\r\n          </ControlTemplate.Triggers>\r\n        </ControlTemplate>\r\n      </Setter.Value>\r\n    </Setter>\r\n    <Style.Triggers>\r\n      <Trigger Property=\"Orientation\" Value=\"Horizontal\">\r\n        <Setter Property=\"Width\" Value=\"Auto\" />\r\n        <Setter Property=\"MinWidth\" Value=\"0\" />\r\n        <Setter Property=\"Height\" Value=\"{DynamicResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}}\" />\r\n        <Setter Property=\"MinHeight\" Value=\"{DynamicResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}}\" />\r\n        <Setter Property=\"Background\" Value=\"{StaticResource HScrollBarTrackBackgroundBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource ScrollBarTrackBorderBrush}\" />\r\n        <Setter Property=\"Template\">\r\n          <Setter.Value>\r\n            <ControlTemplate TargetType=\"{x:Type ScrollBar}\">\r\n              <Grid x:Name=\"Bg\" Background=\"{TemplateBinding Background}\" >\r\n                <Grid.ColumnDefinitions>\r\n                  <ColumnDefinition MaxWidth=\"{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}\" />\r\n                  <ColumnDefinition Width=\"0.00001*\" />\r\n                  <ColumnDefinition MaxWidth=\"{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}\" />\r\n                </Grid.ColumnDefinitions>\r\n                <VisualStateManager.VisualStateGroups>\r\n                  <VisualStateGroup x:Name=\"CommonStates\">\r\n                    <VisualStateGroup.Transitions>\r\n                      <VisualTransition GeneratedDuration=\"0:0:0.3\" />\r\n                    </VisualStateGroup.Transitions>\r\n                    <VisualState x:Name=\"Normal\" />\r\n                    <VisualState x:Name=\"MouseOver\">\r\n                      <Storyboard>\r\n                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"repeatButton\">\r\n                          <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                        </DoubleAnimationUsingKeyFrames>\r\n                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"repeatButton1\">\r\n                          <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                        </DoubleAnimationUsingKeyFrames>\r\n                      </Storyboard>\r\n                    </VisualState>\r\n                    <VisualState x:Name=\"Disabled\" />\r\n                  </VisualStateGroup>\r\n                </VisualStateManager.VisualStateGroups>\r\n                <Border Grid.ColumnSpan=\"3\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1,0\" Margin=\"0\" />\r\n                <RepeatButton x:Name=\"repeatButton\" Command=\"{x:Static ScrollBar.LineLeftCommand}\" IsEnabled=\"{TemplateBinding IsMouseOver}\" Style=\"{StaticResource ScrollBarButtonStyle}\" Opacity=\"0\" Margin=\"1,1,0,1\" />\r\n                <Path x:Name=\"horizontalSmallDecreaseGlyph\" Width=\"5\" Height=\"9\" Fill=\"{StaticResource HScrollBarGlyphBackgroundBrush}\" IsHitTestVisible=\"False\" Data=\"M 0,4 C0,4 1,4 1,4 1,4 1,3 1,3 1,3 2,3 2,3 2,3 2,2 2,2 2,2 3,2 3,2 3,2 3,1 3,1 3,1 4,1 4,1 4,1 4,0 4,0 4,0 5,0 5,0 5,0 5,9 5,9 5,9 4,9 4,9 4,9 4,8 4,8 4,8 3,8 3,8 3,8 3,7 3,7 3,7 2,7 2,7 2,7 2,6 2,6 2,6 1,6 1,6 1,6 1,5 1,5 1,5 0,5 0,5 0,5 0,4 0,4 z\" HorizontalAlignment=\"Center\" Margin=\"0\" VerticalAlignment=\"Center\" />\r\n                <Track x:Name=\"PART_Track\" Grid.Column=\"1\" IsEnabled=\"{TemplateBinding IsMouseOver}\">\r\n                  <Track.DecreaseRepeatButton>\r\n                    <RepeatButton Command=\"{x:Static ScrollBar.PageLeftCommand}\" Style=\"{StaticResource ScrollBarPageButtonStyle}\" />\r\n                  </Track.DecreaseRepeatButton>\r\n                  <Track.IncreaseRepeatButton>\r\n                    <RepeatButton Command=\"{x:Static ScrollBar.PageRightCommand}\" Style=\"{StaticResource ScrollBarPageButtonStyle}\" />\r\n                  </Track.IncreaseRepeatButton>\r\n                  <Track.Thumb>\r\n                    <Thumb Style=\"{StaticResource HScrollBarThumb}\" Margin=\"0,1\" />\r\n                  </Track.Thumb>\r\n                </Track>\r\n                <RepeatButton x:Name=\"repeatButton1\" Grid.Column=\"2\" Command=\"{x:Static ScrollBar.LineRightCommand}\" IsEnabled=\"{TemplateBinding IsMouseOver}\" Style=\"{StaticResource ScrollBarButtonStyle}\" Opacity=\"0\" Margin=\"0,1,1,1\" />\r\n                <Path x:Name=\"horizontalSmallIncreaseGlyph\" Width=\"5\" Height=\"9\" Fill=\"{StaticResource HScrollBarGlyphBackgroundBrush}\" IsHitTestVisible=\"False\" HorizontalAlignment=\"Center\" Data=\"M 5,4 C5,4 4,4 4,4 4,4 4,3 4,3 4,3 3,3 3,3 3,3 3,2 3,2 3,2 2,2 2,2 2,2 2,1 2,1 2,1 1,1 1,1 1,1 1,0 1,0 1,0 0,0 0,0 0,0 0,9 0,9 0,9 1,9 1,9 1,9 1,8 1,8 1,8 2,8 2,8 2,8 2,7 2,7 2,7 3,7 3,7 3,7 3,6 3,6 3,6 4,6 4,6 4,6 4,5 4,5 4,5 5,5 5,5 5,5 5,4 5,4 z\" Margin=\"0\" VerticalAlignment=\"Center\" Grid.Column=\"2\" />\r\n              </Grid>\r\n              <ControlTemplate.Triggers>\r\n                <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                  <Setter Property=\"Background\" TargetName=\"Bg\" Value=\"{StaticResource DisabledBackgroundBrush}\" />\r\n                </Trigger>\r\n              </ControlTemplate.Triggers>\r\n            </ControlTemplate>\r\n          </Setter.Value>\r\n        </Setter>\r\n      </Trigger>\r\n    </Style.Triggers>\r\n  </Style>\r\n\r\n  <!-- *********************************  ScrollViewer Style ********************************* -->\r\n  <Style x:Key=\"ScrollViewerStyle\" TargetType=\"{x:Type ScrollViewer}\">\r\n    <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n    <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n    <Setter Property=\"VerticalScrollBarVisibility\" Value=\"Auto\" />\r\n    <Setter Property=\"Padding\" Value=\"0\" />\r\n    <Setter Property=\"Template\">\r\n      <Setter.Value>\r\n        <ControlTemplate TargetType=\"{x:Type ScrollViewer}\">\r\n          <Border>\r\n            <Grid Background=\"{TemplateBinding Background}\">\r\n              <Grid.ColumnDefinitions>\r\n                <ColumnDefinition Width=\"*\" />\r\n                <ColumnDefinition Width=\"Auto\" />\r\n              </Grid.ColumnDefinitions>\r\n              <Grid.RowDefinitions>\r\n                <RowDefinition Height=\"*\" />\r\n                <RowDefinition Height=\"Auto\" />\r\n              </Grid.RowDefinitions>\r\n              <ScrollContentPresenter x:Name=\"PART_ScrollContentPresenter\" CanContentScroll=\"{TemplateBinding CanContentScroll}\" CanHorizontallyScroll=\"False\" CanVerticallyScroll=\"False\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" Content=\"{TemplateBinding Content}\" Grid.Column=\"0\" Margin=\"{TemplateBinding Padding}\" Grid.Row=\"0\" />\r\n              <Rectangle Grid.Column=\"1\" Fill=\"{StaticResource ScrollViewerCornerBackgroundBrush}\" Grid.Row=\"1\" />\r\n              <ScrollBar x:Name=\"PART_VerticalScrollBar\" AutomationProperties.AutomationId=\"VerticalScrollBar\" Cursor=\"Arrow\" Grid.Column=\"1\" Maximum=\"{TemplateBinding ScrollableHeight}\" Minimum=\"0\" Grid.Row=\"0\" Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Value=\"{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" ViewportSize=\"{TemplateBinding ViewportHeight}\" Width=\"16\" Style=\"{StaticResource ScrollBarStyle}\" />\r\n              <ScrollBar x:Name=\"PART_HorizontalScrollBar\" AutomationProperties.AutomationId=\"HorizontalScrollBar\" Cursor=\"Arrow\" Grid.Column=\"0\" Maximum=\"{TemplateBinding ScrollableWidth}\" Minimum=\"0\" Orientation=\"Horizontal\" Grid.Row=\"1\" Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Value=\"{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" ViewportSize=\"{TemplateBinding ViewportWidth}\" Height=\"16\" Style=\"{StaticResource ScrollBarStyle}\" />\r\n            </Grid>\r\n          </Border>\r\n        </ControlTemplate>\r\n      </Setter.Value>\r\n    </Setter>\r\n  </Style>\r\n\r\n  <!-- *********************************  ValidationToolTipTemplate  ********************************* -->\r\n  <ControlTemplate x:Key=\"ValidationToolTipTemplate\">\r\n    <Grid x:Name=\"Root\" Margin=\"5,0\" RenderTransformOrigin=\"0,0\" Opacity=\"0\">\r\n      <Grid.RenderTransform>\r\n        <TranslateTransform x:Name=\"xform\" X=\"-25\" />\r\n      </Grid.RenderTransform>\r\n      <VisualStateManager.VisualStateGroups>\r\n        <VisualStateGroup x:Name=\"OpenStates\">\r\n          <VisualStateGroup.Transitions>\r\n            <VisualTransition GeneratedDuration=\"0\" />\r\n            <VisualTransition GeneratedDuration=\"0:0:0.2\" To=\"Open\">\r\n              <Storyboard>\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"xform\" Storyboard.TargetProperty=\"X\">\r\n                  <SplineDoubleKeyFrame KeyTime=\"0:0:0.2\" Value=\"0\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Root\" Storyboard.TargetProperty=\"Opacity\">\r\n                  <SplineDoubleKeyFrame KeyTime=\"0:0:0.2\" Value=\"1\" />\r\n                </DoubleAnimationUsingKeyFrames>\r\n              </Storyboard>\r\n            </VisualTransition>\r\n          </VisualStateGroup.Transitions>\r\n          <VisualState x:Name=\"Closed\">\r\n            <Storyboard>\r\n              <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Root\" Storyboard.TargetProperty=\"Opacity\">\r\n                <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0\" />\r\n              </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n          </VisualState>\r\n          <VisualState x:Name=\"Open\">\r\n            <Storyboard>\r\n              <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"xform\" Storyboard.TargetProperty=\"X\">\r\n                <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0\" />\r\n              </DoubleAnimationUsingKeyFrames>\r\n              <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Root\" Storyboard.TargetProperty=\"Opacity\">\r\n                <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n              </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n          </VisualState>\r\n        </VisualStateGroup>\r\n        <VisualStateGroup x:Name=\"ValidationStates\">\r\n          <VisualState x:Name=\"Valid\" />\r\n          <VisualState x:Name=\"InvalidFocused\" />\r\n          <VisualState x:Name=\"InvalidUnfocused\" />\r\n        </VisualStateGroup>\r\n      </VisualStateManager.VisualStateGroups>\r\n      <Border Background=\"{StaticResource ShadowBackgroundBrush}\" CornerRadius=\"5\" Margin=\"4,4,-4,-4\" Opacity=\"0.01\" />\r\n      <Border Background=\"{StaticResource ShadowBackgroundBrush}\" CornerRadius=\"4\" Margin=\"3,3,-3,-3\" Opacity=\"0.04\" />\r\n      <Border Background=\"{StaticResource ShadowBackgroundBrush}\" CornerRadius=\"3\" Margin=\"2,2,-2,-2\" Opacity=\"0.10\" />\r\n      <Border Background=\"{StaticResource ShadowBackgroundBrush}\" CornerRadius=\"2\" Margin=\"1,1,-1,-1\" Opacity=\"0.15\" />\r\n      <Border Background=\"{StaticResource ValidationErrorBrush}\">\r\n        <TextBlock UseLayoutRounding=\"false\" Foreground=\"{StaticResource LightForegroundBrush}\" Margin=\"8,4,8,4\" MaxWidth=\"250\" TextWrapping=\"Wrap\" Text=\"{Binding Path=(Validation.Errors)[0].ErrorContent}\" />\r\n      </Border>\r\n    </Grid>\r\n  </ControlTemplate>\r\n\r\n  <!-- ********************************** TextBox Style **********************************-->\r\n  <Style x:Key=\"TextBoxStyle\" TargetType=\"{x:Type TextBox}\">\r\n    <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n    <Setter Property=\"BorderBrush\" Value=\"{StaticResource TextBoxBorderBrush}\" />\r\n    <Setter Property=\"Background\" Value=\"{StaticResource TextBoxBackgroundBrush}\" />\r\n    <Setter Property=\"SelectionBrush\" Value=\"{StaticResource TextBoxSelectionBackgroundBrush}\" />\r\n    <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n    <Setter Property=\"Padding\" Value=\"4,2\" />\r\n    <Setter Property=\"MinHeight\" Value=\"20\" />\r\n    <Setter Property=\"AllowDrop\" Value=\"true\" />\r\n    <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\" />\r\n    <Setter Property=\"ScrollViewer.PanningMode\" Value=\"VerticalFirst\" />\r\n    <Setter Property=\"Stylus.IsFlicksEnabled\" Value=\"False\" />\r\n    <Setter Property=\"FlowDirection\" Value=\"LeftToRight\" />\r\n    <Setter Property=\"Template\">\r\n      <Setter.Value>\r\n        <ControlTemplate>\r\n          <Border Background=\"{TemplateBinding Background}\" x:Name=\"Bd\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\">\r\n            <ScrollViewer x:Name=\"PART_ContentHost\" />\r\n          </Border>\r\n          <ControlTemplate.Triggers>\r\n            <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n              <Setter Property=\"BorderBrush\" Value=\"{StaticResource TextBoxDisabledBorderBrush}\" TargetName=\"Bd\" />\r\n              <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundDisabledBrush}\" />\r\n            </Trigger>\r\n            <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n              <Setter Property=\"BorderBrush\" Value=\"{StaticResource TextBoxHoverBorderBrush}\" TargetName=\"Bd\" />\r\n            </Trigger>\r\n            <Trigger Property=\"IsFocused\" Value=\"True\">\r\n              <Setter Property=\"BorderBrush\" Value=\"{StaticResource TextBoxFocusedBrush}\" TargetName=\"Bd\" />\r\n            </Trigger>\r\n            <MultiDataTrigger>\r\n              <MultiDataTrigger.Conditions>\r\n                <Condition Binding=\"{Binding IsReadOnly, RelativeSource={RelativeSource Self}}\" Value=\"True\" />\r\n                <Condition Binding=\"{Binding IsEnabled, RelativeSource={RelativeSource Self}}\" Value=\"True\" />\r\n              </MultiDataTrigger.Conditions>\r\n              <Setter Property=\"Background\" Value=\"{StaticResource TextBoxReadOnlyBackgroundBrush}\" />\r\n              <Setter Property=\"BorderBrush\" Value=\"{StaticResource TextBoxReadOnlyBorderBrush}\" />\r\n            </MultiDataTrigger>\r\n          </ControlTemplate.Triggers>\r\n        </ControlTemplate>\r\n      </Setter.Value>\r\n    </Setter>\r\n    <Style.Triggers>\r\n      <Trigger Property=\"Validation.HasError\" Value=\"True\">\r\n        <Setter Property=\"ToolTip\" Value=\"{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}\" />\r\n      </Trigger>\r\n    </Style.Triggers>\r\n  </Style>\r\n\r\n  <!-- *********************************  ComboBoxEditableTextBox Style  ********************************* -->\r\n  <Style x:Key=\"ComboBoxEditableTextBoxStyle\" TargetType=\"{x:Type TextBox}\">\r\n    <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n    <Setter Property=\"AllowDrop\" Value=\"true\" />\r\n    <Setter Property=\"MinHeight\" Value=\"24\" />\r\n    <Setter Property=\"Padding\" Value=\"3,3,3,1\" />\r\n    <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\" />\r\n    <Setter Property=\"Template\">\r\n      <Setter.Value>\r\n        <ControlTemplate TargetType=\"{x:Type TextBox}\">\r\n          <ScrollViewer Style=\"{StaticResource ScrollViewerStyle}\" x:Name=\"PART_ContentHost\" Background=\"Transparent\" Focusable=\"false\" HorizontalScrollBarVisibility=\"Hidden\" VerticalScrollBarVisibility=\"Hidden\">\r\n            <VisualStateManager.VisualStateGroups>\r\n              <VisualStateGroup x:Name=\"CommonStates\">\r\n                <VisualState x:Name=\"Normal\" />\r\n                <VisualState x:Name=\"Disabled\">\r\n                  <Storyboard>\r\n                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"PART_ContentHost\">\r\n                      <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0.3\" />\r\n                    </DoubleAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"ReadOnly\" />\r\n                <VisualState x:Name=\"MouseOver\" />\r\n              </VisualStateGroup>\r\n            </VisualStateManager.VisualStateGroups>\r\n          </ScrollViewer>\r\n        </ControlTemplate>\r\n      </Setter.Value>\r\n    </Setter>\r\n  </Style>\r\n\r\n  <!-- *********************************  ComboBoxEditable Template  ********************************* -->\r\n  <ControlTemplate x:Key=\"ComboBoxEditableTemplate\" TargetType=\"{x:Type ComboBox}\">\r\n    <Grid x:Name=\"MainGrid\" >\r\n      <VisualStateManager.VisualStateGroups>\r\n        <VisualStateGroup x:Name=\"CommonStates\">\r\n          <VisualState x:Name=\"Normal\" />\r\n          <VisualState x:Name=\"MouseOver\">\r\n            <Storyboard>\r\n              <ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"ContentPresenterBorder\" Storyboard.TargetProperty=\"(Border.BorderBrush)\">\r\n                <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TextBoxHoverBorderBrush}\" />\r\n              </ObjectAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n          </VisualState>\r\n          <VisualState x:Name=\"Disabled\">\r\n            <Storyboard>\r\n              <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"DisabledVisualElement\">\r\n                <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0.6\" />\r\n              </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n          </VisualState>\r\n        </VisualStateGroup>\r\n        <VisualStateGroup x:Name=\"FocusStates\">\r\n          <VisualState x:Name=\"Unfocused\" />\r\n          <VisualState x:Name=\"Focused\" />\r\n          <VisualState x:Name=\"FocusedDropDown\">\r\n            <Storyboard>\r\n              <ObjectAnimationUsingKeyFrames Duration=\"00:00:00\" Storyboard.TargetName=\"DropDownBorder\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                  <DiscreteObjectKeyFrame.Value>\r\n                    <Visibility>\r\n                      Visible\r\n                    </Visibility>\r\n                  </DiscreteObjectKeyFrame.Value>\r\n                </DiscreteObjectKeyFrame>\r\n              </ObjectAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n          </VisualState>\r\n        </VisualStateGroup>\r\n        <VisualStateGroup x:Name=\"EditStates\">\r\n          <VisualState x:Name=\"Editable\" />\r\n          <VisualState x:Name=\"Uneditable\" />\r\n        </VisualStateGroup>\r\n        <VisualStateGroup x:Name=\"ValidationStates\">\r\n          <VisualState x:Name=\"Valid\" />\r\n          <VisualState x:Name=\"InvalidFocused\" />\r\n          <VisualState x:Name=\"InvalidUnfocused\" />\r\n        </VisualStateGroup>\r\n      </VisualStateManager.VisualStateGroups>\r\n      <Border x:Name=\"ContentPresenterBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" Background=\"{TemplateBinding Background}\" BorderThickness=\"{TemplateBinding BorderThickness}\" />\r\n      <Grid>\r\n        <Grid.ColumnDefinitions>\r\n          <ColumnDefinition Width=\"*\" />\r\n          <ColumnDefinition Width=\"15\" />\r\n        </Grid.ColumnDefinitions>\r\n        <ToggleButton x:Name=\"DropDownToggle\" Height=\"{TemplateBinding Height}\" Grid.Column=\"1\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" IsChecked=\"{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" Style=\"{StaticResource ComboBoxToggleButtonStyle}\">\r\n          <Path x:Name=\"BtnArrow\" Data=\"M0,0 L8,0 L4,4 z\" Width=\"6\" Height=\"4\" Fill=\"{StaticResource GlyphBorderBrush}\" Stretch=\"Fill\" />\r\n        </ToggleButton>\r\n        <TextBox x:Name=\"PART_EditableTextBox\" Grid.Column=\"0\" HorizontalContentAlignment=\"Left\" IsReadOnly=\"{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}\" Style=\"{StaticResource ComboBoxEditableTextBoxStyle}\" />\r\n        <TextBlock IsHitTestVisible=\"False\" Text=\" \" Margin=\"5,2,5,0\" Visibility=\"Collapsed\" />\r\n      </Grid>\r\n      <Popup x:Name=\"PART_Popup\" Margin=\"1\" AllowsTransparency=\"true\" IsOpen=\"{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Bottom\" PopupAnimation=\"{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}\" Grid.ColumnSpan=\"2\">\r\n        <Border x:Name=\"DropDownBorder\" HorizontalAlignment=\"Stretch\" Background=\"{StaticResource PopupBackgroundBrush}\" BorderBrush=\"{StaticResource PopupBorderBrush}\" BorderThickness=\"1\" MaxHeight=\"{TemplateBinding MaxDropDownHeight}\" MinWidth=\"{Binding ActualWidth, ElementName=MainGrid}\">\r\n          <ScrollViewer CanContentScroll=\"true\" BorderThickness=\"0\" Padding=\"1\" Style=\"{StaticResource ScrollViewerStyle}\" Margin=\"0\">\r\n            <ItemsPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" KeyboardNavigation.DirectionalNavigation=\"Contained\" />\r\n          </ScrollViewer>\r\n        </Border>\r\n      </Popup>\r\n      <Rectangle x:Name=\"DisabledVisualElement\" Fill=\"{StaticResource DisabledBackgroundBrush}\" IsHitTestVisible=\"false\" Opacity=\"0\" Grid.ColumnSpan=\"2\" />\r\n    </Grid>\r\n  </ControlTemplate>\r\n\r\n  <!-- *********************************  ComboBox Style  ********************************* -->\r\n  <Style x:Key=\"ComboBoxStyle\" TargetType=\"{x:Type ComboBox}\">\r\n    <Setter Property=\"ItemContainerStyle\" Value=\"{StaticResource ComboBoxItemStyle}\" />\r\n    <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n    <Setter Property=\"Background\" Value=\"{StaticResource TextBoxBackgroundBrush}\" />\r\n    <Setter Property=\"BorderBrush\" Value=\"{StaticResource TextBoxBorderBrush}\" />\r\n    <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n    <Setter Property=\"Padding\" Value=\"5,3,20,3\" />\r\n    <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n    <Setter Property=\"MinHeight\" Value=\"24\" />\r\n    <Setter Property=\"Cursor\" Value=\"Hand\" />\r\n    <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\" />\r\n    <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\" />\r\n    <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"true\" />\r\n    <Setter Property=\"ScrollViewer.PanningMode\" Value=\"Both\" />\r\n    <Setter Property=\"Stylus.IsFlicksEnabled\" Value=\"False\" />\r\n    <Setter Property=\"Template\">\r\n      <Setter.Value>\r\n        <ControlTemplate TargetType=\"{x:Type ComboBox}\">\r\n          <Grid x:Name=\"MainGrid\" >\r\n            <VisualStateManager.VisualStateGroups>\r\n              <VisualStateGroup x:Name=\"CommonStates\">\r\n                <VisualState x:Name=\"Normal\" />\r\n                <VisualState x:Name=\"MouseOver\">\r\n                  <Storyboard>\r\n                    <ObjectAnimationUsingKeyFrames BeginTime=\"0\" Duration=\"0\" Storyboard.TargetName=\"ContentPresenterBorder\" Storyboard.TargetProperty=\"(Border.BorderBrush)\">\r\n                      <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource TextBoxHoverBorderBrush}\" />\r\n                    </ObjectAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n                <VisualState x:Name=\"Disabled\">\r\n                  <Storyboard>\r\n                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=\"(UIElement.Opacity)\" Storyboard.TargetName=\"DisabledVisualElement\">\r\n                      <EasingDoubleKeyFrame KeyTime=\"0\" Value=\"0.6\" />\r\n                    </DoubleAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n              </VisualStateGroup>\r\n              <VisualStateGroup x:Name=\"FocusStates\">\r\n                <VisualState x:Name=\"Unfocused\" />\r\n                <VisualState x:Name=\"Focused\" />\r\n                <VisualState x:Name=\"FocusedDropDown\">\r\n                  <Storyboard>\r\n                    <ObjectAnimationUsingKeyFrames Duration=\"00:00:00\" Storyboard.TargetName=\"DropDownBorder\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                      <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                        <DiscreteObjectKeyFrame.Value>\r\n                          <Visibility>\r\n                            Visible\r\n                          </Visibility>\r\n                        </DiscreteObjectKeyFrame.Value>\r\n                      </DiscreteObjectKeyFrame>\r\n                    </ObjectAnimationUsingKeyFrames>\r\n                  </Storyboard>\r\n                </VisualState>\r\n              </VisualStateGroup>\r\n              <VisualStateGroup x:Name=\"EditStates\">\r\n                <VisualState x:Name=\"Editable\" />\r\n                <VisualState x:Name=\"Uneditable\" />\r\n              </VisualStateGroup>\r\n              <VisualStateGroup x:Name=\"ValidationStates\">\r\n                <VisualState x:Name=\"Valid\" />\r\n                <VisualState x:Name=\"InvalidFocused\" />\r\n                <VisualState x:Name=\"InvalidUnfocused\" />\r\n              </VisualStateGroup>\r\n            </VisualStateManager.VisualStateGroups>\r\n            <Border x:Name=\"ContentPresenterBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" Background=\"{TemplateBinding Background}\" BorderThickness=\"{TemplateBinding BorderThickness}\" />\r\n            <Grid>\r\n              <ToggleButton IsChecked=\"{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" Style=\"{StaticResource ComboBoxToggleButtonStyle}\">\r\n                <Path x:Name=\"BtnArrow\" Data=\"M0,0 L8,0 L4,4 z\" Width=\"6\" Height=\"4\" Fill=\"{StaticResource GlyphBorderBrush}\" Stretch=\"Fill\" />\r\n              </ToggleButton>\r\n              <ContentPresenter x:Name=\"ContentPresenter\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" IsHitTestVisible=\"false\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Content=\"{TemplateBinding SelectionBoxItem}\" ContentTemplate=\"{TemplateBinding SelectionBoxItemTemplate}\" ContentStringFormat=\"{TemplateBinding SelectionBoxItemStringFormat}\" ContentTemplateSelector=\"{TemplateBinding ItemTemplateSelector}\" />\r\n              <TextBlock IsHitTestVisible=\"False\" Text=\" \" Margin=\"5,2,5,0\" Visibility=\"Collapsed\" />\r\n            </Grid>\r\n            <Popup x:Name=\"PART_Popup\" Margin=\"1\" AllowsTransparency=\"true\" IsOpen=\"{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Bottom\" PopupAnimation=\"{StaticResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}\" Grid.ColumnSpan=\"2\">\r\n              <Border x:Name=\"DropDownBorder\" HorizontalAlignment=\"Stretch\" Background=\"{StaticResource PopupBackgroundBrush}\" BorderBrush=\"{StaticResource PopupBorderBrush}\" BorderThickness=\"1\" MaxHeight=\"{TemplateBinding MaxDropDownHeight}\" MinWidth=\"{Binding ActualWidth, ElementName=MainGrid}\">\r\n                <ScrollViewer CanContentScroll=\"true\" BorderThickness=\"0\" Padding=\"1\" Style=\"{StaticResource ScrollViewerStyle}\" Margin=\"0\">\r\n                  <ItemsPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" KeyboardNavigation.DirectionalNavigation=\"Contained\" />\r\n                </ScrollViewer>\r\n              </Border>\r\n            </Popup>\r\n            <Rectangle x:Name=\"DisabledVisualElement\" Fill=\"{StaticResource DisabledBackgroundBrush}\" IsHitTestVisible=\"false\" Opacity=\"0\" Grid.ColumnSpan=\"2\" />\r\n          </Grid>\r\n        </ControlTemplate>\r\n      </Setter.Value>\r\n    </Setter>\r\n    <Style.Triggers>\r\n      <Trigger Property=\"IsEditable\" Value=\"true\">\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ThemeForegroundBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"{StaticResource TextBoxBackgroundBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource TextBoxBorderBrush}\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"false\" />\r\n        <Setter Property=\"Template\" Value=\"{StaticResource ComboBoxEditableTemplate}\" />\r\n      </Trigger>\r\n    </Style.Triggers>\r\n  </Style>\r\n\r\n  <!-- ********************************** ListBoxStyle **********************************-->\r\n  <Style x:Key=\"ListBoxStyle\" TargetType=\"{x:Type ListBox}\">\r\n    <Setter Property=\"ItemContainerStyle\" Value=\"{StaticResource ListBoxItemStyle}\" />\r\n    <Setter Property=\"Background\" Value=\"{StaticResource ListBoxBackgroundBrush}\" />\r\n    <Setter Property=\"BorderBrush\" Value=\"{StaticResource ListBoxBorderBrush}\" />\r\n    <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n    <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n    <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\" />\r\n    <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\" />\r\n    <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"true\" />\r\n    <Setter Property=\"ScrollViewer.PanningMode\" Value=\"Both\" />\r\n    <Setter Property=\"Stylus.IsFlicksEnabled\" Value=\"False\" />\r\n    <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n    <Setter Property=\"Template\">\r\n      <Setter.Value>\r\n        <ControlTemplate TargetType=\"{x:Type ListBox}\">\r\n          <Border x:Name=\"Bd\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"{TemplateBinding Background}\" Padding=\"1\" >\r\n            <ScrollViewer Focusable=\"false\" Style=\"{StaticResource ScrollViewerStyle}\" Margin=\"-1\">\r\n              <ItemsPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" />\r\n            </ScrollViewer>\r\n          </Border>\r\n          <ControlTemplate.Triggers>\r\n            <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n              <Setter Property=\"Opacity\" TargetName=\"Bd\" Value=\"0.5\" />\r\n            </Trigger>\r\n            <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n              <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\" />\r\n            </Trigger>\r\n          </ControlTemplate.Triggers>\r\n        </ControlTemplate>\r\n      </Setter.Value>\r\n    </Setter>\r\n  </Style>\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/Office2010Blue/Theme.Colors.xaml",
    "content": "﻿<ResourceDictionary\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" mc:Ignorable=\"d\">\r\n\r\n    <!-- ********************************** THEME BRUSHES - For Color Tuner **********************************-->\r\n    <SolidColorBrush x:Key=\"Brush01\" Color=\"#FFb9cee6\"/>\r\n    <SolidColorBrush x:Key=\"Brush02\" Color=\"#FF87AAD0\"/>\r\n    <SolidColorBrush x:Key=\"Brush03\" Color=\"#FF516189\"/>\r\n    <SolidColorBrush x:Key=\"Brush04\" Color=\"#FFEDDD39\"/>\r\n    <SolidColorBrush x:Key=\"Brush05\" Color=\"#FFFFA500\"/>\r\n\r\n    <!-- ********************************** THEME COLORS **********************************-->\r\n    <Color x:Key=\"Color_001\">#FF181818</Color>\r\n    <Color x:Key=\"Color_002\">#FF8B8B8B</Color>\r\n    <Color x:Key=\"Color_003\">#FFC0C0C0</Color>\r\n    <Color x:Key=\"Color_004\">#FFDADCDD</Color>\r\n    <Color x:Key=\"Color_005\">#FFFFFFFF</Color>\r\n    <Color x:Key=\"Color_006\">#FF7C2320</Color>\r\n    <Color x:Key=\"Color_007\">#FFAB322E</Color>\r\n    <Color x:Key=\"Color_008\">#FF9B3D3D</Color>\r\n    <Color x:Key=\"Color_009\">#FFda6163</Color>\r\n    <Color x:Key=\"Color_010\">#FFf27776</Color>\r\n    <Color x:Key=\"Color_011\">#FFff8482</Color>\r\n    <Color x:Key=\"Color_012\">#FFC26D1D</Color>\r\n    <Color x:Key=\"Color_013\">#FFDEA414</Color>\r\n    <Color x:Key=\"Color_014\">#FFF2BF3A</Color>\r\n    <Color x:Key=\"Color_015\">#FFF7D14C</Color>\r\n    <Color x:Key=\"Color_016\">#FFF8D25F</Color>\r\n    <Color x:Key=\"Color_017\">#FFFBDC6E</Color>\r\n    <Color x:Key=\"Color_018\">#FFffeea8</Color>\r\n    <Color x:Key=\"Color_019\">#FFfffce0</Color>\r\n    <Color x:Key=\"Color_020\">#FF527211</Color>\r\n    <Color x:Key=\"Color_021\">#FF739F19</Color>\r\n    <Color x:Key=\"Color_022\">#FFABD652</Color>\r\n    <Color x:Key=\"Color_023\">#FF152A43</Color>\r\n    <Color x:Key=\"Color_024\">#FF233E60</Color>\r\n    <Color x:Key=\"Color_025\">#FF345176</Color>\r\n    <Color x:Key=\"Color_026\">#FF547297</Color>\r\n    <Color x:Key=\"Color_0261\">#FF708BAD</Color>\r\n    <Color x:Key=\"Color_027\">#FF8CA6C9</Color>\r\n    <Color x:Key=\"Color_028\">#FFA6BBD7</Color>\r\n    <Color x:Key=\"Color_029\">#FFC1D4EC</Color>\r\n    <Color x:Key=\"Color_030\">#FFCBDBEF</Color>\r\n    <Color x:Key=\"Color_031\">#FFDBE6F3</Color>\r\n    <Color x:Key=\"Color_032\">#FFE9F0F7</Color>\r\n    <Color x:Key=\"Color_033\">#00FFFFFF</Color>\r\n    <Color x:Key=\"Color_0331\">#7FFFFFFF</Color>\r\n    <Color x:Key=\"Color_034\">#00000000</Color>\r\n    <Color x:Key=\"Color_035\">#0C000000</Color>\r\n    <Color x:Key=\"Color_036\">#26000000</Color>\r\n    <Color x:Key=\"Color_037\">#4CA0B0C7</Color>\r\n    <Color x:Key=\"Color_038\">#00A5BBD3</Color>\r\n    <Color x:Key=\"Color_039\">#00f27776</Color>\r\n\r\n    <!-- ********************************** CHART COLORS **********************************-->\r\n    <Color x:Key=\"Color_1000\">#FF17447C</Color>\r\n    <Color x:Key=\"Color_1001\">#FF3969A5</Color>\r\n    <Color x:Key=\"Color_1002\">#FF4681CA</Color>\r\n    <Color x:Key=\"Color_1003\">#FFAB322E</Color>\r\n    <Color x:Key=\"Color_1004\">#FFD05C53</Color>\r\n    <Color x:Key=\"Color_1005\">#FFE79089</Color>\r\n    <Color x:Key=\"Color_1006\">#FF3B7E32</Color>\r\n    <Color x:Key=\"Color_1007\">#FF739F19</Color>\r\n    <Color x:Key=\"Color_1008\">#FF99C838</Color>\r\n    <Color x:Key=\"Color_1009\">#FFBCDC7B</Color>\r\n    <Color x:Key=\"Color_1010\">#FF218F8F</Color>\r\n    <Color x:Key=\"Color_1011\">#FF53C4C4</Color>\r\n    <Color x:Key=\"Color_1012\">#FF80E4E4</Color>\r\n    <Color x:Key=\"Color_1013\">#FF694691</Color>\r\n    <Color x:Key=\"Color_1014\">#FF916CBE</Color>\r\n    <Color x:Key=\"Color_1015\">#FFB99EDA</Color>\r\n    <Color x:Key=\"Color_1016\">#FFD2660D</Color>\r\n    <Color x:Key=\"Color_1017\">#FFF18B36</Color>\r\n    <Color x:Key=\"Color_1018\">#FFF99544</Color>\r\n    <Color x:Key=\"Color_1020\">#FFFDB881</Color>\r\n    <Color x:Key=\"Color_1021\">#FF616161</Color>\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/Office2010Blue/Theme.xaml",
    "content": "﻿<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n                    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n                    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n                    mc:Ignorable=\"d\">\r\n\r\n    <!--  *********************************  RESOURCES  *********************************  -->\r\n    <ResourceDictionary.MergedDictionaries>\r\n        <ResourceDictionary Source=\"Styles.WPF.xaml\" />\r\n        <ResourceDictionary Source=\"Office2010Blue.MSControls.Toolkit.Implicit.xaml\" />\r\n    </ResourceDictionary.MergedDictionaries>\r\n\r\n    <!--  *********************************  BRUSHES  *********************************  -->\r\n    <!--  Slider Brushes  -->\r\n    <LinearGradientBrush x:Key=\"SliderThumbBackgroundBrush\" StartPoint=\"0.56,0.01\" EndPoint=\"0.56,0.99\">\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_029}\" />\r\n        <GradientStop Color=\"{StaticResource Color_032}\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"SliderThumbBorderBrush\" Color=\"{StaticResource Color_027}\" />\r\n    <LinearGradientBrush x:Key=\"SliderThumbHoverBackgroundBrush\" StartPoint=\"0,0\" EndPoint=\"0,1\">\r\n        <GradientStop Offset=\"0\" Color=\"{StaticResource Color_018}\" />\r\n        <GradientStop Offset=\"0.23\" Color=\"{StaticResource Color_017}\" />\r\n        <GradientStop Offset=\"0.75\" Color=\"{StaticResource Color_017}\" />\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_019}\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"SliderThumbHoverBorderBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_013}\" />\r\n        <GradientStop Offset=\"0.05\" Color=\"{StaticResource Color_014}\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"SliderThumbHoverInnerBorderBrush\" Color=\"{StaticResource Color_019}\" />\r\n    <LinearGradientBrush x:Key=\"SliderThumbPressedBackgroundBrush\" StartPoint=\"0,0 \" EndPoint=\"0,1 \">\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_017}\" />\r\n        <GradientStop Color=\"{StaticResource Color_016}\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"SliderThumbPressedBorderBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n        <GradientStop Offset=\"0\" Color=\"{StaticResource Color_012}\" />\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_013}\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"HSliderTrackBackgroundBrush\" StartPoint=\"0.82,1\" EndPoint=\"0.82,0.25\">\r\n        <GradientStop Offset=\"0.631\" Color=\"{StaticResource Color_026}\" />\r\n        <GradientStop Offset=\"0.63\" Color=\"{StaticResource Color_032}\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"VSliderTrackBackgroundBrush\" StartPoint=\"0.322,0.5\" EndPoint=\"0.678,0.5\">\r\n        <GradientStop Offset=\"0.501\" Color=\"{StaticResource Color_026}\" />\r\n        <GradientStop Offset=\"0.50\" Color=\"{StaticResource Color_032}\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"SliderThumbFocusedBorderBrush\" Color=\"{StaticResource Color_013}\" />\r\n    <LinearGradientBrush x:Key=\"SliderSelectionRangeBackgroundBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_013}\" />\r\n        <GradientStop Offset=\"0.05\" Color=\"{StaticResource Color_014}\" />\r\n    </LinearGradientBrush>\r\n\r\n    <!--  GridSplitter Brushes  -->\r\n    <SolidColorBrush x:Key=\"GridSplitterBackgroundBrush\" Color=\"{StaticResource Color_030}\" />\r\n    <SolidColorBrush x:Key=\"GridSplitterBorderBrush\" Color=\"{StaticResource Color_027}\" />\r\n    <SolidColorBrush x:Key=\"GridSplitterHoverBackgroundBrush\" Color=\"{StaticResource Color_018}\" />\r\n    <SolidColorBrush x:Key=\"GridSplitterHoverBorderBrush\" Color=\"{StaticResource Color_013}\" />\r\n    <SolidColorBrush x:Key=\"GridSplitterPressedBackgroundBrush\" Color=\"{StaticResource Color_017}\" />\r\n    <SolidColorBrush x:Key=\"GridSplitterPressedBorderBrush\" Color=\"{StaticResource Color_013}\" />\r\n    <SolidColorBrush x:Key=\"GridSplitterFocusedBorderBrush\" Color=\"{StaticResource Color_013}\" />\r\n\r\n    <!--  ProgressBar Brushes  -->\r\n    <SolidColorBrush x:Key=\"ProgressBarBackgroundBrush\" Color=\"{StaticResource Color_005}\" />\r\n    <SolidColorBrush x:Key=\"ProgressBarBorderBrush\" Color=\"{StaticResource Color_027}\" />\r\n    <LinearGradientBrush x:Key=\"ProgressBarForegroundBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n        <GradientStop Offset=\"0\" Color=\"{StaticResource Color_018}\" />\r\n        <GradientStop Offset=\"0.23\" Color=\"{StaticResource Color_017}\" />\r\n        <GradientStop Offset=\"0.75\" Color=\"{StaticResource Color_017}\" />\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_019}\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"ProgressBarDeterminateBorderBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_014}\" />\r\n        <GradientStop Color=\"{StaticResource Color_015}\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"ProgressBarIndeterminateBorderBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_014}\" />\r\n        <GradientStop Color=\"{StaticResource Color_015}\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"ProgressBarIndeterminateBackgroundBrush\" MappingMode=\"Absolute\" Opacity=\"0.6\" SpreadMethod=\"Repeat\" StartPoint=\"20,1\" EndPoint=\"0,1\">\r\n        <LinearGradientBrush.Transform>\r\n            <TransformGroup>\r\n                <TranslateTransform X=\"0\" />\r\n                <SkewTransform AngleX=\"-30\" />\r\n            </TransformGroup>\r\n        </LinearGradientBrush.Transform>\r\n        <GradientStop Offset=\"0.249\" Color=\"{StaticResource Color_005}\" />\r\n        <GradientStop Offset=\".25\" Color=\"{StaticResource Color_033}\" />\r\n        <GradientStop Offset=\"0.75\" Color=\"{StaticResource Color_033}\" />\r\n        <GradientStop Offset=\"0.751\" Color=\"{StaticResource Color_005}\" />\r\n    </LinearGradientBrush>\r\n\r\n    <!--  Tooltip Brushes  -->\r\n    <LinearGradientBrush x:Key=\"TooltipBackgroundBrush\" Opacity=\"0.9\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_030}\" />\r\n        <GradientStop Color=\"{StaticResource Color_005}\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"TooltipBorderBrush\"\r\n                     Opacity=\"0.9\"\r\n                     Color=\"{StaticResource Color_027}\" />\r\n    <SolidColorBrush x:Key=\"TooltipShadowBackgroundBrush\" Color=\"{StaticResource Color_001}\" />\r\n\r\n    <!--  Expander Brushes  -->\r\n    <LinearGradientBrush x:Key=\"ExpanderButtonBackgroundBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_030}\" />\r\n        <GradientStop Color=\"{StaticResource Color_032}\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"ExpanderButtonBorderBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n        <GradientStop Color=\"{StaticResource Color_029}\" />\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_027}\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"ExpanderButtonHoverBackgroundBrush\" StartPoint=\"0,0\" EndPoint=\"0,1\">\r\n        <GradientStop Offset=\"0\" Color=\"{StaticResource Color_018}\" />\r\n        <GradientStop Offset=\"0.23\" Color=\"{StaticResource Color_017}\" />\r\n        <GradientStop Offset=\"0.75\" Color=\"{StaticResource Color_017}\" />\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_019}\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"ExpanderButtonHoverBorderBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_013}\" />\r\n        <GradientStop Color=\"{StaticResource Color_014}\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"ExpanderButtonHoverHiglightBorderBrush\" Color=\"{StaticResource Color_019}\" />\r\n    <LinearGradientBrush x:Key=\"ExpanderButtonPressedBackgroundBrush\" StartPoint=\"0,0 \" EndPoint=\"0,1 \">\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_017}\" />\r\n        <GradientStop Color=\"{StaticResource Color_016}\" />\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"ExpanderButtonPressedBorderBrush\" StartPoint=\"0.5,0\" EndPoint=\"0.5,1\">\r\n        <GradientStop Offset=\"0\" Color=\"{StaticResource Color_012}\" />\r\n        <GradientStop Offset=\"1\" Color=\"{StaticResource Color_013}\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"ExpanderDisabledForegroundBrush\"\r\n                     Opacity=\"0.5\"\r\n                     Color=\"{StaticResource Color_024}\" />\r\n    <SolidColorBrush x:Key=\"ExpanderDisabledBackgroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\r\n    <!--  GroupBox Brushes  -->\r\n    <SolidColorBrush x:Key=\"GroupBoxBorderBrush\" Color=\"{StaticResource Color_027}\" />\r\n\r\n    <!--  PassWordBox Brushes  -->\r\n    <SolidColorBrush x:Key=\"PasswordBoxForegroundBrush\" Color=\"{StaticResource Color_024}\" />\r\n\r\n    <!--  *********************************  SliderRepeatButton Style  *********************************  -->\r\n    <Style x:Key=\"SliderRepeatButtonStyle\" TargetType=\"{x:Type RepeatButton}\">\r\n        <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n        <Setter Property=\"Focusable\" Value=\"false\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"false\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n                    <Rectangle Fill=\"{StaticResource TransparentBrush}\" />\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  *********************************  Slider Horizontal Thumb Style  *********************************  -->\r\n    <Style x:Key=\"HSliderThumbStyle\" TargetType=\"{x:Type Thumb}\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource SliderThumbBackgroundBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource SliderThumbBorderBrush}\" />\r\n        <Setter Property=\"Height\" Value=\"22\" />\r\n        <Setter Property=\"Width\" Value=\"9\" />\r\n        <Setter Property=\"Focusable\" Value=\"false\" />\r\n        <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <Grid SnapsToDevicePixels=\"True\">\r\n                        <Grid x:Name=\"HorizontalThumbContent\"\r\n                              Width=\"9\"\r\n                              Height=\"13\">\r\n                            <Path x:Name=\"ThumbBackground\"\r\n                                  Width=\"9\"\r\n                                  Height=\"13\"\r\n                                  Data=\"M0.5,0.5 L8.5,0.5 L8.5,9.9374847 L4.5208335,13.31249 L0.5,9.9374847 z\"\r\n                                  Fill=\"{TemplateBinding Background}\"\r\n                                  Stretch=\"Fill\"\r\n                                  Stroke=\"{TemplateBinding BorderBrush}\"\r\n                                  UseLayoutRounding=\"False\" />\r\n                            <Path x:Name=\"ThumbInnerStroke\"\r\n                                  Width=\"7\"\r\n                                  Height=\"11\"\r\n                                  Data=\"M0.5,0.5 L8.5,0.5 L8.5,9.9374847 L4.5208335,12.972734 L0.5,9.9374847 z\"\r\n                                  Opacity=\"0\"\r\n                                  Stretch=\"Fill\"\r\n                                  Stroke=\"{StaticResource SliderThumbHoverInnerBorderBrush}\"\r\n                                  UseLayoutRounding=\"False\" />\r\n                            <Path x:Name=\"ThumbFocused\"\r\n                                  Width=\"9\"\r\n                                  Height=\"13\"\r\n                                  Data=\"M0.5,0.5 L8.5,0.5 L8.5,9.9374847 L4.5208335,13.31249 L0.5,9.9374847 z\"\r\n                                  Fill=\"{StaticResource SliderThumbPressedBackgroundBrush}\"\r\n                                  Stretch=\"Fill\"\r\n                                  Stroke=\"{StaticResource SliderThumbPressedBorderBrush}\"\r\n                                  UseLayoutRounding=\"False\"\r\n                                  Visibility=\"Collapsed\" />\r\n                            <Path x:Name=\"ThumbDisabled\"\r\n                                  Width=\"9\"\r\n                                  Height=\"13\"\r\n                                  Data=\"M0.5,0.5 L8.5,0.5 L8.5,9.9374847 L4.5208335,13.31249 L0.5,9.9374847 z\"\r\n                                  Fill=\"{StaticResource DisabledBackgroundBrush}\"\r\n                                  Opacity=\"0\"\r\n                                  Stretch=\"Fill\"\r\n                                  UseLayoutRounding=\"False\" />\r\n                        </Grid>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Setter TargetName=\"ThumbInnerStroke\" Property=\"Opacity\" Value=\"0.6\" />\r\n                            <Setter TargetName=\"ThumbBackground\" Property=\"Fill\" Value=\"{StaticResource SliderThumbHoverBackgroundBrush}\" />\r\n                            <Setter TargetName=\"ThumbBackground\" Property=\"Stroke\" Value=\"{StaticResource SliderThumbHoverBorderBrush}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseCaptured\" Value=\"True\">\r\n                            <Setter TargetName=\"ThumbBackground\" Property=\"Fill\" Value=\"{StaticResource SliderThumbPressedBackgroundBrush}\" />\r\n                            <Setter TargetName=\"ThumbBackground\" Property=\"Stroke\" Value=\"{StaticResource SliderThumbPressedBorderBrush}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter TargetName=\"ThumbDisabled\" Property=\"Opacity\" Value=\"0.55\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  *********************************  Slider Horizontal Thumb Up Style  *********************************  -->\r\n    <Style x:Key=\"HSliderUpThumbStyle\"\r\n           BasedOn=\"{StaticResource HSliderThumbStyle}\"\r\n           TargetType=\"{x:Type Thumb}\">\r\n        <Setter Property=\"RenderTransform\">\r\n            <Setter.Value>\r\n                <TransformGroup>\r\n                    <ScaleTransform ScaleX=\"1\" ScaleY=\"-1\" />\r\n                    <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                    <RotateTransform Angle=\"0\" />\r\n                    <TranslateTransform />\r\n                </TransformGroup>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"RenderTransformOrigin\" Value=\"0.5,0.5\" />\r\n    </Style>\r\n\r\n    <!--  *********************************  Slider Horizontal Thumb Down Style  *********************************  -->\r\n    <Style x:Key=\"HSliderDownThumbStyle\"\r\n           BasedOn=\"{StaticResource HSliderThumbStyle}\"\r\n           TargetType=\"{x:Type Thumb}\" />\r\n\r\n    <!--  *********************************  Slider Vertical Thumb Style  *********************************  -->\r\n    <Style x:Key=\"VSliderThumbStyle\" TargetType=\"{x:Type Thumb}\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource SliderThumbBackgroundBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource SliderThumbBorderBrush}\" />\r\n        <Setter Property=\"Height\" Value=\"9\" />\r\n        <Setter Property=\"Width\" Value=\"22\" />\r\n        <Setter Property=\"Focusable\" Value=\"false\" />\r\n        <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <Grid SnapsToDevicePixels=\"True\">\r\n                        <Grid Width=\"13\" Height=\"9\">\r\n                            <Path x:Name=\"VThumbBackground\"\r\n                                  Width=\"13\"\r\n                                  Height=\"9\"\r\n                                  Data=\"M0.5,0.5 L8.625,0.5 L11.5,4 L8.625,7.5 L0.5,7.5 z\"\r\n                                  Fill=\"{TemplateBinding Background}\"\r\n                                  Stretch=\"Fill\"\r\n                                  Stroke=\"{TemplateBinding BorderBrush}\"\r\n                                  UseLayoutRounding=\"False\" />\r\n                            <Path x:Name=\"VThumbInnerStroke\"\r\n                                  Width=\"11\"\r\n                                  Height=\"7\"\r\n                                  Data=\"M0.5,0.5 L8.625,0.5 L11.5,4 L8.625,7.5 L0.5,7.5 z\"\r\n                                  Opacity=\"0\"\r\n                                  Stretch=\"Fill\"\r\n                                  Stroke=\"{StaticResource SliderThumbHoverInnerBorderBrush}\"\r\n                                  UseLayoutRounding=\"False\" />\r\n                            <Path x:Name=\"VThumbFocused\"\r\n                                  Width=\"13\"\r\n                                  Height=\"9\"\r\n                                  Data=\"M0.5,0.5 L8.625,0.5 L11.5,4 L8.625,7.5 L0.5,7.5 z\"\r\n                                  Fill=\"{StaticResource SliderThumbPressedBackgroundBrush}\"\r\n                                  Stretch=\"Fill\"\r\n                                  Stroke=\"{StaticResource SliderThumbPressedBorderBrush}\"\r\n                                  UseLayoutRounding=\"False\"\r\n                                  Visibility=\"Collapsed\" />\r\n                            <Path x:Name=\"VThumbDisabled\"\r\n                                  Width=\"13\"\r\n                                  Height=\"9\"\r\n                                  Data=\"M0.5,0.5 L8.625,0.5 L11.5,4 L8.625,7.5 L0.5,7.5 z\"\r\n                                  Fill=\"{StaticResource DisabledBackgroundBrush}\"\r\n                                  Opacity=\"0\"\r\n                                  Stretch=\"Fill\"\r\n                                  UseLayoutRounding=\"False\" />\r\n                        </Grid>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Setter TargetName=\"VThumbInnerStroke\" Property=\"Opacity\" Value=\"0.6\" />\r\n                            <Setter TargetName=\"VThumbBackground\" Property=\"Fill\" Value=\"{StaticResource SliderThumbHoverBackgroundBrush}\" />\r\n                            <Setter TargetName=\"VThumbBackground\" Property=\"Stroke\" Value=\"{StaticResource SliderThumbHoverBorderBrush}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseCaptured\" Value=\"True\">\r\n                            <Setter TargetName=\"VThumbBackground\" Property=\"Fill\" Value=\"{StaticResource SliderThumbPressedBackgroundBrush}\" />\r\n                            <Setter TargetName=\"VThumbBackground\" Property=\"Stroke\" Value=\"{StaticResource SliderThumbPressedBorderBrush}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter TargetName=\"VThumbDisabled\" Property=\"Opacity\" Value=\"0.55\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  *********************************  Slider Thumb Left Style  *********************************  -->\r\n    <Style x:Key=\"VSliderLeftThumbStyle\"\r\n           BasedOn=\"{StaticResource VSliderThumbStyle}\"\r\n           TargetType=\"{x:Type Thumb}\">\r\n        <Setter Property=\"RenderTransformOrigin\" Value=\"0.5,0.5\" />\r\n        <Setter Property=\"RenderTransform\">\r\n            <Setter.Value>\r\n                <TransformGroup>\r\n                    <ScaleTransform ScaleX=\"-1\" ScaleY=\"1\" />\r\n                    <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                    <RotateTransform Angle=\"0\" />\r\n                    <TranslateTransform />\r\n                </TransformGroup>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  *********************************  Slider Thumb Right Style  *********************************  -->\r\n    <Style x:Key=\"VSliderRightThumbStyle\"\r\n           BasedOn=\"{StaticResource VSliderThumbStyle}\"\r\n           TargetType=\"{x:Type Thumb}\" />\r\n\r\n    <!--  *********************************  Slider Style  *********************************  -->\r\n    <Style x:Key=\"SliderStyle\" TargetType=\"{x:Type Slider}\">\r\n        <Setter Property=\"Stylus.IsPressAndHoldEnabled\" Value=\"false\" />\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Slider}\">\r\n                    <Border Background=\"{TemplateBinding Background}\"\r\n                            BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                            BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                            SnapsToDevicePixels=\"True\">\r\n                        <Grid>\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\" />\r\n                                <RowDefinition Height=\"Auto\" MinHeight=\"{TemplateBinding MinHeight}\" />\r\n                                <RowDefinition Height=\"Auto\" />\r\n                            </Grid.RowDefinitions>\r\n                            <TickBar x:Name=\"TopTick\"\r\n                                     Grid.Row=\"0\"\r\n                                     Height=\"4\"\r\n                                     Fill=\"{TemplateBinding Foreground}\"\r\n                                     Placement=\"Top\"\r\n                                     Visibility=\"Collapsed\" />\r\n                            <TickBar x:Name=\"BottomTick\"\r\n                                     Grid.Row=\"2\"\r\n                                     Height=\"4\"\r\n                                     Fill=\"{TemplateBinding Foreground}\"\r\n                                     Placement=\"Bottom\"\r\n                                     Visibility=\"Collapsed\" />\r\n                            <Border x:Name=\"TrackBackground\"\r\n                                    Grid.Row=\"1\"\r\n                                    Height=\"2\"\r\n                                    VerticalAlignment=\"center\"\r\n                                    Background=\"{StaticResource HSliderTrackBackgroundBrush}\">\r\n                                <Canvas Margin=\"-6,0\">\r\n                                    <Rectangle x:Name=\"PART_SelectionRange\"\r\n                                               Height=\"2\"\r\n                                               Fill=\"{StaticResource SliderSelectionRangeBackgroundBrush}\"\r\n                                               Visibility=\"Hidden\" />\r\n                                </Canvas>\r\n                            </Border>\r\n                            <Track x:Name=\"PART_Track\" Grid.Row=\"1\">\r\n                                <Track.DecreaseRepeatButton>\r\n                                    <RepeatButton Command=\"{x:Static Slider.DecreaseLarge}\" Style=\"{StaticResource SliderRepeatButtonStyle}\" />\r\n                                </Track.DecreaseRepeatButton>\r\n                                <Track.IncreaseRepeatButton>\r\n                                    <RepeatButton Command=\"{x:Static Slider.IncreaseLarge}\" Style=\"{StaticResource SliderRepeatButtonStyle}\" />\r\n                                </Track.IncreaseRepeatButton>\r\n                                <Track.Thumb>\r\n                                    <Thumb x:Name=\"Thumb\" Style=\"{StaticResource HSliderThumbStyle}\" />\r\n                                </Track.Thumb>\r\n                            </Track>\r\n                        </Grid>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"TickPlacement\" Value=\"TopLeft\">\r\n                            <Setter TargetName=\"TopTick\" Property=\"Visibility\" Value=\"Visible\" />\r\n                            <Setter TargetName=\"Thumb\" Property=\"Style\" Value=\"{StaticResource HSliderUpThumbStyle}\" />\r\n                            <Setter TargetName=\"TrackBackground\" Property=\"Margin\" Value=\"5,2,5,0\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"TickPlacement\" Value=\"BottomRight\">\r\n                            <Setter TargetName=\"BottomTick\" Property=\"Visibility\" Value=\"Visible\" />\r\n                            <Setter TargetName=\"Thumb\" Property=\"Style\" Value=\"{StaticResource HSliderDownThumbStyle}\" />\r\n                            <Setter TargetName=\"TrackBackground\" Property=\"Margin\" Value=\"5,0,5,2\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"TickPlacement\" Value=\"Both\">\r\n                            <Setter TargetName=\"TopTick\" Property=\"Visibility\" Value=\"Visible\" />\r\n                            <Setter TargetName=\"BottomTick\" Property=\"Visibility\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsSelectionRangeEnabled\" Value=\"true\">\r\n                            <Setter TargetName=\"PART_SelectionRange\" Property=\"Visibility\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                            <Setter TargetName=\"Thumb\" Property=\"Foreground\" Value=\"{StaticResource SliderThumbFocusedBorderBrush}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Style.Triggers>\r\n            <Trigger Property=\"Orientation\" Value=\"Vertical\">\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"{x:Type Slider}\">\r\n                            <Border Background=\"{TemplateBinding Background}\"\r\n                                    BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                                    BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                                    SnapsToDevicePixels=\"True\">\r\n                                <Grid>\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition Width=\"Auto\" />\r\n                                        <ColumnDefinition Width=\"Auto\" MinWidth=\"{TemplateBinding MinWidth}\" />\r\n                                        <ColumnDefinition Width=\"Auto\" />\r\n                                    </Grid.ColumnDefinitions>\r\n                                    <TickBar x:Name=\"TopTick\"\r\n                                             Grid.Column=\"0\"\r\n                                             Width=\"4\"\r\n                                             Fill=\"{TemplateBinding Foreground}\"\r\n                                             Placement=\"Left\"\r\n                                             Visibility=\"Collapsed\" />\r\n                                    <TickBar x:Name=\"BottomTick\"\r\n                                             Grid.Column=\"2\"\r\n                                             Width=\"4\"\r\n                                             Fill=\"{TemplateBinding Foreground}\"\r\n                                             Placement=\"Right\"\r\n                                             Visibility=\"Collapsed\" />\r\n                                    <Border x:Name=\"TrackBackground\"\r\n                                            Grid.Column=\"1\"\r\n                                            Width=\"2\"\r\n                                            HorizontalAlignment=\"center\"\r\n                                            Background=\"{StaticResource VSliderTrackBackgroundBrush}\">\r\n                                        <Canvas Margin=\"-1,-6\">\r\n                                            <Rectangle x:Name=\"PART_SelectionRange\"\r\n                                                       Width=\"2\"\r\n                                                       Fill=\"{StaticResource SliderSelectionRangeBackgroundBrush}\"\r\n                                                       Visibility=\"Hidden\" />\r\n                                        </Canvas>\r\n                                    </Border>\r\n                                    <Track x:Name=\"PART_Track\" Grid.Column=\"1\">\r\n                                        <Track.DecreaseRepeatButton>\r\n                                            <RepeatButton Command=\"{x:Static Slider.DecreaseLarge}\" Style=\"{StaticResource SliderRepeatButtonStyle}\" />\r\n                                        </Track.DecreaseRepeatButton>\r\n                                        <Track.IncreaseRepeatButton>\r\n                                            <RepeatButton Command=\"{x:Static Slider.IncreaseLarge}\" Style=\"{StaticResource SliderRepeatButtonStyle}\" />\r\n                                        </Track.IncreaseRepeatButton>\r\n                                        <Track.Thumb>\r\n                                            <Thumb x:Name=\"Thumb\" Style=\"{StaticResource VSliderThumbStyle}\" />\r\n                                        </Track.Thumb>\r\n                                    </Track>\r\n                                </Grid>\r\n                            </Border>\r\n                            <ControlTemplate.Triggers>\r\n                                <Trigger Property=\"TickPlacement\" Value=\"TopLeft\">\r\n                                    <Setter TargetName=\"TopTick\" Property=\"Visibility\" Value=\"Visible\" />\r\n                                    <Setter TargetName=\"Thumb\" Property=\"Style\" Value=\"{StaticResource VSliderLeftThumbStyle}\" />\r\n                                    <Setter TargetName=\"TrackBackground\" Property=\"Margin\" Value=\"2,5,0,5\" />\r\n                                </Trigger>\r\n                                <Trigger Property=\"TickPlacement\" Value=\"BottomRight\">\r\n                                    <Setter TargetName=\"BottomTick\" Property=\"Visibility\" Value=\"Visible\" />\r\n                                    <Setter TargetName=\"Thumb\" Property=\"Style\" Value=\"{StaticResource VSliderRightThumbStyle}\" />\r\n                                    <Setter TargetName=\"TrackBackground\" Property=\"Margin\" Value=\"0,5,2,5\" />\r\n                                </Trigger>\r\n                                <Trigger Property=\"TickPlacement\" Value=\"Both\">\r\n                                    <Setter TargetName=\"TopTick\" Property=\"Visibility\" Value=\"Visible\" />\r\n                                    <Setter TargetName=\"BottomTick\" Property=\"Visibility\" Value=\"Visible\" />\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsSelectionRangeEnabled\" Value=\"true\">\r\n                                    <Setter TargetName=\"PART_SelectionRange\" Property=\"Visibility\" Value=\"Visible\" />\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                                    <Setter TargetName=\"Thumb\" Property=\"Foreground\" Value=\"{StaticResource SliderThumbFocusedBorderBrush}\" />\r\n                                </Trigger>\r\n                            </ControlTemplate.Triggers>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Trigger>\r\n        </Style.Triggers>\r\n    </Style>\r\n\r\n    <!--  *********************************  RepeatButton Style  *********************************  -->\r\n    <Style x:Key=\"RepeatButtonStyle\" TargetType=\"{x:Type RepeatButton}\">\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"{StaticResource ButtonBackgroundBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource ButtonBorderBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Padding\" Value=\"3\" />\r\n        <Setter Property=\"Cursor\" Value=\"Hand\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n                    <Grid SnapsToDevicePixels=\"True\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"BaseShape\" Storyboard.TargetProperty=\"Background\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonHoverBackgroundBrush}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"BaseShape\" Storyboard.TargetProperty=\"BorderBrush\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonHoverBorderBrush}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ButtonHighlight\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"BaseShape\" Storyboard.TargetProperty=\"Background\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonPressedBackgroundBrush}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"BaseShape\" Storyboard.TargetProperty=\"BorderBrush\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonPressedBorderBrush}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.6\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\"\r\n                                                         Storyboard.TargetName=\"FocusedVisualElement\"\r\n                                                         Storyboard.TargetProperty=\"(UIElement.Opacity)\"\r\n                                                         To=\"1\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"BaseShape\"\r\n                                Background=\"{TemplateBinding Background}\"\r\n                                BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                                BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                                CornerRadius=\"3\" />\r\n                        <Rectangle x:Name=\"ButtonHighlight\"\r\n                                   Grid.ColumnSpan=\"2\"\r\n                                   Margin=\"1\"\r\n                                   Opacity=\"0\"\r\n                                   RadiusX=\"2\"\r\n                                   RadiusY=\"2\"\r\n                                   Stroke=\"{StaticResource ButtonHoverHighlightBorderBrush}\"\r\n                                   StrokeThickness=\"1\" />\r\n                        <ContentPresenter x:Name=\"contentPresenter\"\r\n                                          Margin=\"{TemplateBinding Padding}\"\r\n                                          HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                                          VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                                          Content=\"{TemplateBinding Content}\"\r\n                                          ContentTemplate=\"{TemplateBinding ContentTemplate}\" />\r\n                        <Rectangle x:Name=\"FocusedVisualElement\"\r\n                                   Opacity=\"0\"\r\n                                   RadiusX=\"3\"\r\n                                   RadiusY=\"3\"\r\n                                   Stroke=\"{StaticResource ButtonFocusedBorderBrush}\"\r\n                                   StrokeThickness=\"1\" />\r\n                        <Rectangle x:Name=\"DisabledVisualElement\"\r\n                                   Fill=\"{StaticResource DisabledBackgroundBrush}\"\r\n                                   IsHitTestVisible=\"false\"\r\n                                   Opacity=\"0\"\r\n                                   RadiusX=\"3\"\r\n                                   RadiusY=\"3\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  ********************************** GridSplitter Style **********************************  -->\r\n    <Style x:Key=\"GridSplitterStyle\" TargetType=\"{x:Type GridSplitter}\">\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"{StaticResource GridSplitterBackgroundBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource GridSplitterBorderBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"True\" />\r\n        <Setter Property=\"PreviewStyle\">\r\n            <Setter.Value>\r\n                <Style TargetType=\"Control\">\r\n                    <Setter Property=\"Control.Template\">\r\n                        <Setter.Value>\r\n                            <ControlTemplate>\r\n                                <Rectangle Fill=\"{StaticResource GridSplitterPressedBackgroundBrush}\"\r\n                                           Opacity=\"0.8\"\r\n                                           RadiusX=\"3\"\r\n                                           RadiusY=\"3\" />\r\n                            </ControlTemplate>\r\n                        </Setter.Value>\r\n                    </Setter>\r\n                </Style>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Grid>\r\n                        <Border x:Name=\"border\"\r\n                                Background=\"{TemplateBinding Background}\"\r\n                                BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                                BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                                CornerRadius=\"3\">\r\n                            <Grid>\r\n                                <StackPanel x:Name=\"HGrip\"\r\n                                            Height=\"5\"\r\n                                            HorizontalAlignment=\"Center\"\r\n                                            VerticalAlignment=\"Center\"\r\n                                            Orientation=\"Vertical\">\r\n                                    <Rectangle Width=\"15\"\r\n                                               Height=\"1\"\r\n                                               Margin=\"1\"\r\n                                               Fill=\"{StaticResource ForegroundBrush}\"\r\n                                               StrokeThickness=\"0\" />\r\n                                    <Rectangle Width=\"15\"\r\n                                               Height=\"1\"\r\n                                               Margin=\"0\"\r\n                                               Fill=\"{StaticResource ForegroundBrush}\"\r\n                                               StrokeThickness=\"0\" />\r\n                                </StackPanel>\r\n                                <StackPanel x:Name=\"VGrip\"\r\n                                            Width=\"5\"\r\n                                            HorizontalAlignment=\"Center\"\r\n                                            VerticalAlignment=\"Center\"\r\n                                            Orientation=\"Horizontal\"\r\n                                            Visibility=\"Collapsed\">\r\n                                    <Rectangle Width=\"1\"\r\n                                               Height=\"15\"\r\n                                               Margin=\"1\"\r\n                                               Fill=\"{StaticResource ForegroundBrush}\"\r\n                                               StrokeThickness=\"0\" />\r\n                                    <Rectangle Width=\"1\"\r\n                                               Height=\"15\"\r\n                                               Margin=\"0\"\r\n                                               Fill=\"{StaticResource ForegroundBrush}\"\r\n                                               StrokeThickness=\"0\" />\r\n                                </StackPanel>\r\n                            </Grid>\r\n                        </Border>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"HorizontalAlignment\" Value=\"Stretch\">\r\n                            <Setter TargetName=\"HGrip\" Property=\"Visibility\" Value=\"Visible\" />\r\n                            <Setter TargetName=\"VGrip\" Property=\"Visibility\" Value=\"Collapsed\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"VerticalAlignment\" Value=\"Stretch\">\r\n                            <Setter TargetName=\"VGrip\" Property=\"Visibility\" Value=\"Visible\" />\r\n                            <Setter TargetName=\"HGrip\" Property=\"Visibility\" Value=\"Collapsed\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Setter TargetName=\"border\" Property=\"Background\" Value=\"{StaticResource GridSplitterHoverBackgroundBrush}\" />\r\n                            <Setter TargetName=\"border\" Property=\"BorderBrush\" Value=\"{StaticResource GridSplitterHoverBorderBrush}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Setter TargetName=\"border\" Property=\"BorderBrush\" Value=\"{StaticResource GridSplitterFocusedBorderBrush}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  ********************************** ProgressBar Style **********************************  -->\r\n    <Style x:Key=\"ProgressBarStyle\" TargetType=\"{x:Type ProgressBar}\">\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ProgressBarForegroundBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"{StaticResource ProgressBarBackgroundBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource ProgressBarBorderBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ProgressBar}\">\r\n                    <Grid x:Name=\"TemplateRoot\" SnapsToDevicePixels=\"true\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Determinate\" />\r\n                                <VisualState x:Name=\"Indeterminate\">\r\n                                    <Storyboard RepeatBehavior=\"Forever\">\r\n                                        <DoubleAnimation Duration=\"00:00:.5\"\r\n                                                         From=\"0\"\r\n                                                         Storyboard.TargetName=\"IndeterminateGradientFill\"\r\n                                                         Storyboard.TargetProperty=\"(Shape.Fill).(LinearGradientBrush.Transform).(TransformGroup.Children)[0].X\"\r\n                                                         To=\"20\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"ProgressBarTrack\"\r\n                                Background=\"{TemplateBinding Background}\"\r\n                                BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                                BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                                CornerRadius=\"3\" />\r\n                        <Rectangle x:Name=\"PART_Track\"\r\n                                   Margin=\"1\"\r\n                                   RadiusX=\"2\"\r\n                                   RadiusY=\"2\" />\r\n                        <Decorator x:Name=\"PART_Indicator\" HorizontalAlignment=\"Left\">\r\n                            <Grid x:Name=\"Foreground\">\r\n                                <Rectangle x:Name=\"Indicator\"\r\n                                           Margin=\"2\"\r\n                                           Fill=\"{TemplateBinding Foreground}\"\r\n                                           RadiusX=\"2\"\r\n                                           RadiusY=\"2\"\r\n                                           Stroke=\"{StaticResource ProgressBarDeterminateBorderBrush}\"\r\n                                           StrokeThickness=\"{TemplateBinding BorderThickness}\" />\r\n                            </Grid>\r\n                        </Decorator>\r\n                        <Grid x:Name=\"IndeterminateRoot\"\r\n                              Margin=\"1\"\r\n                              Visibility=\"Collapsed\">\r\n                            <Rectangle x:Name=\"IndeterminateSolidFill\"\r\n                                       Margin=\"{TemplateBinding BorderThickness}\"\r\n                                       Fill=\"{TemplateBinding Foreground}\"\r\n                                       Opacity=\"1\"\r\n                                       RadiusX=\"2\"\r\n                                       RadiusY=\"2\"\r\n                                       RenderTransformOrigin=\"0.5,0.5\"\r\n                                       Stroke=\"{StaticResource ProgressBarIndeterminateBorderBrush}\" />\r\n                            <Rectangle x:Name=\"IndeterminateGradientFill\"\r\n                                       Margin=\"{TemplateBinding BorderThickness}\"\r\n                                       Fill=\"{StaticResource ProgressBarIndeterminateBackgroundBrush}\"\r\n                                       RadiusX=\"2\"\r\n                                       RadiusY=\"2\"\r\n                                       StrokeThickness=\"1\" />\r\n                        </Grid>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"Orientation\" Value=\"Vertical\">\r\n                            <Setter TargetName=\"TemplateRoot\" Property=\"LayoutTransform\">\r\n                                <Setter.Value>\r\n                                    <RotateTransform Angle=\"-90\" />\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsIndeterminate\" Value=\"true\">\r\n                            <Setter TargetName=\"Indicator\" Property=\"Visibility\" Value=\"Collapsed\" />\r\n                            <Setter TargetName=\"IndeterminateRoot\" Property=\"Visibility\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsIndeterminate\" Value=\"false\" />\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  ********************************** PasswordBox Style **********************************  -->\r\n    <Style x:Key=\"PasswordBoxStyle\" TargetType=\"{x:Type PasswordBox}\">\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource PasswordBoxForegroundBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource TextBoxBorderBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"{StaticResource TextBoxBackgroundBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Padding\" Value=\"4,2\" />\r\n        <Setter Property=\"MinHeight\" Value=\"24\" />\r\n        <Setter Property=\"PasswordChar\" Value=\"●\" />\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\" />\r\n        <Setter Property=\"SelectionBrush\" Value=\"{StaticResource TextBoxSelectionBackgroundBrush}\" />\r\n        <Setter Property=\"AllowDrop\" Value=\"true\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\" />\r\n        <Setter Property=\"ScrollViewer.PanningMode\" Value=\"VerticalFirst\" />\r\n        <Setter Property=\"Stylus.IsFlicksEnabled\" Value=\"False\" />\r\n        <Setter Property=\"FlowDirection\" Value=\"LeftToRight\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type PasswordBox}\">\r\n                    <Border x:Name=\"Bd\"\r\n                            Background=\"{TemplateBinding Background}\"\r\n                            BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                            BorderThickness=\"{TemplateBinding BorderThickness}\">\r\n                        <ScrollViewer x:Name=\"PART_ContentHost\" />\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter TargetName=\"Bd\" Property=\"BorderBrush\" Value=\"{StaticResource TextBoxDisabledBorderBrush}\" />\r\n                            <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundDisabledBrush}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Setter TargetName=\"Bd\" Property=\"BorderBrush\" Value=\"{StaticResource TextBoxHoverBorderBrush}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Setter TargetName=\"Bd\" Property=\"BorderBrush\" Value=\"{StaticResource TextBoxFocusedBrush}\" />\r\n                        </Trigger>\r\n                        <MultiDataTrigger>\r\n                            <MultiDataTrigger.Conditions>\r\n                                <Condition Binding=\"{Binding IsReadOnly, RelativeSource={RelativeSource Self}}\" Value=\"True\" />\r\n                                <Condition Binding=\"{Binding IsEnabled, RelativeSource={RelativeSource Self}}\" Value=\"True\" />\r\n                            </MultiDataTrigger.Conditions>\r\n                            <Setter Property=\"Background\" Value=\"{StaticResource TextBoxReadOnlyBackgroundBrush}\" />\r\n                            <Setter Property=\"BorderBrush\" Value=\"{StaticResource TextBoxReadOnlyBorderBrush}\" />\r\n                        </MultiDataTrigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  *********************************  Tooltip Style  *********************************  -->\r\n    <Style x:Key=\"{x:Type ToolTip}\" TargetType=\"ToolTip\">\r\n        <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"{StaticResource TooltipBackgroundBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource TooltipBorderBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Padding\" Value=\"5\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ToolTip\">\r\n                    <Grid>\r\n                        <Grid>\r\n                            <Rectangle Margin=\"0,0,-1,-1\"\r\n                                       Fill=\"{StaticResource TooltipShadowBackgroundBrush}\"\r\n                                       Opacity=\"0.1\"\r\n                                       RadiusX=\"1\"\r\n                                       RadiusY=\"1\" />\r\n                            <Rectangle Margin=\"0,0,-2,-2\"\r\n                                       Fill=\"{StaticResource TooltipShadowBackgroundBrush}\"\r\n                                       Opacity=\"0.08\"\r\n                                       RadiusX=\"2\"\r\n                                       RadiusY=\"2\" />\r\n                            <Rectangle Margin=\"0,0,-3,-3\"\r\n                                       Fill=\"{StaticResource TooltipShadowBackgroundBrush}\"\r\n                                       Opacity=\"0.06\"\r\n                                       RadiusX=\"3\"\r\n                                       RadiusY=\"3\" />\r\n                            <Rectangle Margin=\"0,0,-4,-4\"\r\n                                       Fill=\"{StaticResource TooltipShadowBackgroundBrush}\"\r\n                                       Opacity=\"0.04\"\r\n                                       RadiusX=\"4\"\r\n                                       RadiusY=\"4\" />\r\n                        </Grid>\r\n                        <Rectangle Margin=\"0\"\r\n                                   Fill=\"{TemplateBinding Background}\"\r\n                                   Stroke=\"{TemplateBinding BorderBrush}\"\r\n                                   StrokeThickness=\"{TemplateBinding BorderThickness}\" />\r\n                        <StackPanel Orientation=\"Horizontal\">\r\n                            <ContentPresenter Margin=\"{TemplateBinding Padding}\" Content=\"{TemplateBinding Content}\" />\r\n                        </StackPanel>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  *********************************  Expander Right Style  *********************************  -->\r\n    <Style x:Key=\"ExpanderRightHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <Border Padding=\"{TemplateBinding Padding}\">\r\n                        <Grid Background=\"{StaticResource TransparentBrush}\" SnapsToDevicePixels=\"False\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"19\" />\r\n                                <RowDefinition Height=\"*\" />\r\n                            </Grid.RowDefinitions>\r\n                            <Grid>\r\n                                <Grid.LayoutTransform>\r\n                                    <TransformGroup>\r\n                                        <TransformGroup.Children>\r\n                                            <TransformCollection>\r\n                                                <RotateTransform Angle=\"-90\" />\r\n                                            </TransformCollection>\r\n                                        </TransformGroup.Children>\r\n                                    </TransformGroup>\r\n                                </Grid.LayoutTransform>\r\n                                <Rectangle x:Name=\"rectangle\"\r\n                                           Width=\"19\"\r\n                                           Height=\"19\"\r\n                                           HorizontalAlignment=\"Center\"\r\n                                           VerticalAlignment=\"Center\"\r\n                                           Fill=\"{StaticResource ExpanderButtonBackgroundBrush}\"\r\n                                           Stroke=\"{StaticResource ExpanderButtonBorderBrush}\" />\r\n                                <Rectangle x:Name=\"rectanglehighlight\"\r\n                                           Width=\"17\"\r\n                                           Height=\"17\"\r\n                                           Margin=\"1\"\r\n                                           Opacity=\"0\"\r\n                                           Stroke=\"{StaticResource ExpanderButtonHoverHiglightBorderBrush}\"\r\n                                           StrokeThickness=\"1\" />\r\n                                <Path x:Name=\"arrow\"\r\n                                      Width=\"6\"\r\n                                      Height=\"4\"\r\n                                      HorizontalAlignment=\"Center\"\r\n                                      VerticalAlignment=\"Center\"\r\n                                      Data=\"M0,0 L8,0 L4,4 z\"\r\n                                      Fill=\"{StaticResource GlyphBorderBrush}\"\r\n                                      Stretch=\"Fill\" />\r\n                            </Grid>\r\n                            <ContentPresenter Grid.Row=\"1\"\r\n                                              Margin=\"0,4,0,0\"\r\n                                              HorizontalAlignment=\"Center\"\r\n                                              VerticalAlignment=\"Stretch\"\r\n                                              RecognizesAccessKey=\"True\"\r\n                                              SnapsToDevicePixels=\"True\" />\r\n                        </Grid>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Setter TargetName=\"arrow\" Property=\"Data\" Value=\"M3.4,-4.4 L6.8,3.9 3.9566912E-07,3.9 z\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Setter TargetName=\"rectangle\" Property=\"Fill\" Value=\"{StaticResource ExpanderButtonHoverBackgroundBrush}\" />\r\n                            <Setter TargetName=\"rectangle\" Property=\"Stroke\" Value=\"{StaticResource ExpanderButtonHoverBorderBrush}\" />\r\n                            <Setter TargetName=\"rectanglehighlight\" Property=\"Opacity\" Value=\"1\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Setter TargetName=\"rectangle\" Property=\"Fill\" Value=\"{StaticResource ExpanderButtonPressedBackgroundBrush}\" />\r\n                            <Setter TargetName=\"rectangle\" Property=\"Stroke\" Value=\"{StaticResource ExpanderButtonPressedBorderBrush}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  *********************************  Expander Up Style  *********************************  -->\r\n    <Style x:Key=\"ExpanderUpHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <Border Padding=\"{TemplateBinding Padding}\">\r\n                        <Grid Background=\"{StaticResource TransparentBrush}\" SnapsToDevicePixels=\"False\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"19\" />\r\n                                <ColumnDefinition Width=\"*\" />\r\n                            </Grid.ColumnDefinitions>\r\n                            <Grid>\r\n                                <Grid.LayoutTransform>\r\n                                    <TransformGroup>\r\n                                        <TransformGroup.Children>\r\n                                            <TransformCollection>\r\n                                                <RotateTransform Angle=\"180\" />\r\n                                            </TransformCollection>\r\n                                        </TransformGroup.Children>\r\n                                    </TransformGroup>\r\n                                </Grid.LayoutTransform>\r\n                                <Rectangle x:Name=\"rectangle\"\r\n                                           Width=\"19\"\r\n                                           Height=\"19\"\r\n                                           HorizontalAlignment=\"Center\"\r\n                                           VerticalAlignment=\"Center\"\r\n                                           Fill=\"{StaticResource ExpanderButtonBackgroundBrush}\"\r\n                                           Stroke=\"{StaticResource ExpanderButtonBorderBrush}\" />\r\n                                <Rectangle x:Name=\"rectanglehighlight\"\r\n                                           Width=\"17\"\r\n                                           Height=\"17\"\r\n                                           Margin=\"1\"\r\n                                           Opacity=\"0\"\r\n                                           Stroke=\"{StaticResource ExpanderButtonHoverHiglightBorderBrush}\"\r\n                                           StrokeThickness=\"1\" />\r\n                                <Path x:Name=\"arrow\"\r\n                                      Width=\"6\"\r\n                                      Height=\"4\"\r\n                                      HorizontalAlignment=\"Center\"\r\n                                      VerticalAlignment=\"Center\"\r\n                                      Data=\"M0,0 L8,0 L4,4 z\"\r\n                                      Fill=\"{StaticResource GlyphBorderBrush}\"\r\n                                      Stretch=\"Fill\" />\r\n                            </Grid>\r\n                            <ContentPresenter Grid.Column=\"1\"\r\n                                              Margin=\"4,0,0,0\"\r\n                                              HorizontalAlignment=\"Stretch\"\r\n                                              VerticalAlignment=\"Center\"\r\n                                              RecognizesAccessKey=\"True\"\r\n                                              SnapsToDevicePixels=\"True\" />\r\n                        </Grid>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Setter TargetName=\"arrow\" Property=\"Data\" Value=\"M3.4,-4.4 L6.8,3.9 3.9566912E-07,3.9 z\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Setter TargetName=\"rectangle\" Property=\"Fill\" Value=\"{StaticResource ExpanderButtonHoverBackgroundBrush}\" />\r\n                            <Setter TargetName=\"rectangle\" Property=\"Stroke\" Value=\"{StaticResource ExpanderButtonHoverBorderBrush}\" />\r\n                            <Setter TargetName=\"rectanglehighlight\" Property=\"Opacity\" Value=\"1\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Setter TargetName=\"rectangle\" Property=\"Fill\" Value=\"{StaticResource ExpanderButtonPressedBackgroundBrush}\" />\r\n                            <Setter TargetName=\"rectangle\" Property=\"Stroke\" Value=\"{StaticResource ExpanderButtonPressedBorderBrush}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  *********************************  Expander Left Style  *********************************  -->\r\n    <Style x:Key=\"ExpanderLeftHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <Border Padding=\"{TemplateBinding Padding}\">\r\n                        <Grid Background=\"{StaticResource TransparentBrush}\" SnapsToDevicePixels=\"False\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"19\" />\r\n                                <RowDefinition Height=\"*\" />\r\n                            </Grid.RowDefinitions>\r\n                            <Grid>\r\n                                <Grid.LayoutTransform>\r\n                                    <TransformGroup>\r\n                                        <TransformGroup.Children>\r\n                                            <TransformCollection>\r\n                                                <RotateTransform Angle=\"90\" />\r\n                                            </TransformCollection>\r\n                                        </TransformGroup.Children>\r\n                                    </TransformGroup>\r\n                                </Grid.LayoutTransform>\r\n                                <Rectangle x:Name=\"rectangle\"\r\n                                           Width=\"19\"\r\n                                           Height=\"19\"\r\n                                           HorizontalAlignment=\"Center\"\r\n                                           VerticalAlignment=\"Center\"\r\n                                           Fill=\"{StaticResource ExpanderButtonBackgroundBrush}\"\r\n                                           Stroke=\"{StaticResource ExpanderButtonBorderBrush}\" />\r\n                                <Rectangle x:Name=\"rectanglehighlight\"\r\n                                           Width=\"17\"\r\n                                           Height=\"17\"\r\n                                           Margin=\"1\"\r\n                                           Opacity=\"0\"\r\n                                           Stroke=\"{StaticResource ExpanderButtonHoverHiglightBorderBrush}\"\r\n                                           StrokeThickness=\"1\" />\r\n                                <Path x:Name=\"arrow\"\r\n                                      Width=\"6\"\r\n                                      Height=\"4\"\r\n                                      HorizontalAlignment=\"Center\"\r\n                                      VerticalAlignment=\"Center\"\r\n                                      Data=\"M0,0 L8,0 L4,4 z\"\r\n                                      Fill=\"{StaticResource GlyphBorderBrush}\"\r\n                                      Stretch=\"Fill\" />\r\n                            </Grid>\r\n                            <ContentPresenter Grid.Row=\"1\"\r\n                                              Margin=\"0,4,0,0\"\r\n                                              HorizontalAlignment=\"Center\"\r\n                                              VerticalAlignment=\"Stretch\"\r\n                                              RecognizesAccessKey=\"True\"\r\n                                              SnapsToDevicePixels=\"True\" />\r\n                        </Grid>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Setter TargetName=\"arrow\" Property=\"Data\" Value=\"M3.4,-4.4 L6.8,3.9 3.9566912E-07,3.9 z\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Setter TargetName=\"rectangle\" Property=\"Fill\" Value=\"{StaticResource ExpanderButtonHoverBackgroundBrush}\" />\r\n                            <Setter TargetName=\"rectangle\" Property=\"Stroke\" Value=\"{StaticResource ExpanderButtonHoverBorderBrush}\" />\r\n                            <Setter TargetName=\"rectanglehighlight\" Property=\"Opacity\" Value=\"1\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Setter TargetName=\"rectangle\" Property=\"Fill\" Value=\"{StaticResource ExpanderButtonPressedBackgroundBrush}\" />\r\n                            <Setter TargetName=\"rectangle\" Property=\"Stroke\" Value=\"{StaticResource ExpanderButtonPressedBorderBrush}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  *********************************  Expander Down Style  *********************************  -->\r\n    <Style x:Key=\"ExpanderDownHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <Border Padding=\"{TemplateBinding Padding}\">\r\n                        <Grid Background=\"{StaticResource TransparentBrush}\" SnapsToDevicePixels=\"False\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"19\" />\r\n                                <ColumnDefinition Width=\"*\" />\r\n                            </Grid.ColumnDefinitions>\r\n                            <Rectangle x:Name=\"rectangle\"\r\n                                       Width=\"19\"\r\n                                       Height=\"19\"\r\n                                       HorizontalAlignment=\"Center\"\r\n                                       VerticalAlignment=\"Center\"\r\n                                       Fill=\"{StaticResource ExpanderButtonBackgroundBrush}\"\r\n                                       Stroke=\"{StaticResource ExpanderButtonBorderBrush}\" />\r\n                            <Rectangle x:Name=\"rectanglehighlight\"\r\n                                       Width=\"17\"\r\n                                       Height=\"17\"\r\n                                       Margin=\"1\"\r\n                                       Opacity=\"0\"\r\n                                       Stroke=\"{StaticResource ExpanderButtonHoverHiglightBorderBrush}\"\r\n                                       StrokeThickness=\"1\" />\r\n                            <Path x:Name=\"arrow\"\r\n                                  Width=\"6\"\r\n                                  Height=\"4\"\r\n                                  HorizontalAlignment=\"Center\"\r\n                                  VerticalAlignment=\"Center\"\r\n                                  Data=\"M0,0 L8,0 L4,4 z\"\r\n                                  Fill=\"{StaticResource GlyphBorderBrush}\"\r\n                                  Stretch=\"Fill\" />\r\n                            <ContentPresenter Grid.Column=\"1\"\r\n                                              Margin=\"4,0,0,0\"\r\n                                              HorizontalAlignment=\"Stretch\"\r\n                                              VerticalAlignment=\"Center\"\r\n                                              RecognizesAccessKey=\"True\"\r\n                                              SnapsToDevicePixels=\"True\" />\r\n                        </Grid>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Setter TargetName=\"arrow\" Property=\"Data\" Value=\"M3.4,-4.4 L6.8,3.9 3.9566912E-07,3.9 z\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Setter TargetName=\"rectangle\" Property=\"Fill\" Value=\"{StaticResource ExpanderButtonHoverBackgroundBrush}\" />\r\n                            <Setter TargetName=\"rectangle\" Property=\"Stroke\" Value=\"{StaticResource ExpanderButtonHoverBorderBrush}\" />\r\n                            <Setter TargetName=\"rectanglehighlight\" Property=\"Opacity\" Value=\"1\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Setter TargetName=\"rectangle\" Property=\"Fill\" Value=\"{StaticResource ExpanderButtonPressedBackgroundBrush}\" />\r\n                            <Setter TargetName=\"rectangle\" Property=\"Stroke\" Value=\"{StaticResource ExpanderButtonPressedBorderBrush}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  *********************************  Expander Style  *********************************  -->\r\n    <Style x:Key=\"ExpanderStyle\" TargetType=\"{x:Type Expander}\">\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Expander}\">\r\n                    <Border Background=\"{TemplateBinding Background}\"\r\n                            BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                            BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                            CornerRadius=\"3\"\r\n                            SnapsToDevicePixels=\"true\">\r\n                        <DockPanel>\r\n                            <ToggleButton x:Name=\"HeaderSite\"\r\n                                          MinWidth=\"0\"\r\n                                          MinHeight=\"0\"\r\n                                          Margin=\"1\"\r\n                                          HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                                          VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                                          Content=\"{TemplateBinding Header}\"\r\n                                          ContentTemplate=\"{TemplateBinding HeaderTemplate}\"\r\n                                          ContentTemplateSelector=\"{TemplateBinding HeaderTemplateSelector}\"\r\n                                          DockPanel.Dock=\"Top\"\r\n                                          FontFamily=\"{TemplateBinding FontFamily}\"\r\n                                          FontSize=\"{TemplateBinding FontSize}\"\r\n                                          FontStretch=\"{TemplateBinding FontStretch}\"\r\n                                          FontStyle=\"{TemplateBinding FontStyle}\"\r\n                                          FontWeight=\"{TemplateBinding FontWeight}\"\r\n                                          Foreground=\"{TemplateBinding Foreground}\"\r\n                                          IsChecked=\"{Binding IsExpanded,\r\n                                                              Mode=TwoWay,\r\n                                                              RelativeSource={RelativeSource TemplatedParent}}\"\r\n                                          Padding=\"{TemplateBinding Padding}\"\r\n                                          Style=\"{StaticResource ExpanderDownHeaderStyle}\" />\r\n                            <ContentPresenter x:Name=\"ExpandSite\"\r\n                                              Margin=\"{TemplateBinding Padding}\"\r\n                                              HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                                              VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                                              DockPanel.Dock=\"Bottom\"\r\n                                              Focusable=\"false\"\r\n                                              Visibility=\"Collapsed\" />\r\n                        </DockPanel>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsExpanded\" Value=\"true\">\r\n                            <Setter TargetName=\"ExpandSite\" Property=\"Visibility\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Right\">\r\n                            <Setter TargetName=\"ExpandSite\" Property=\"DockPanel.Dock\" Value=\"Right\" />\r\n                            <Setter TargetName=\"HeaderSite\" Property=\"DockPanel.Dock\" Value=\"Left\" />\r\n                            <Setter TargetName=\"HeaderSite\" Property=\"Style\" Value=\"{StaticResource ExpanderRightHeaderStyle}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Up\">\r\n                            <Setter TargetName=\"ExpandSite\" Property=\"DockPanel.Dock\" Value=\"Top\" />\r\n                            <Setter TargetName=\"HeaderSite\" Property=\"DockPanel.Dock\" Value=\"Bottom\" />\r\n                            <Setter TargetName=\"HeaderSite\" Property=\"Style\" Value=\"{StaticResource ExpanderUpHeaderStyle}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Left\">\r\n                            <Setter TargetName=\"ExpandSite\" Property=\"DockPanel.Dock\" Value=\"Left\" />\r\n                            <Setter TargetName=\"HeaderSite\" Property=\"DockPanel.Dock\" Value=\"Right\" />\r\n                            <Setter TargetName=\"HeaderSite\" Property=\"Style\" Value=\"{StaticResource ExpanderLeftHeaderStyle}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{StaticResource ExpanderDisabledForegroundBrush}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  *********************************  ToggleButton Style  *********************************  -->\r\n    <Style x:Key=\"ToggleButtonStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"{StaticResource ButtonBackgroundBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource ButtonBorderBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Padding\" Value=\"2\" />\r\n        <Setter Property=\"Cursor\" Value=\"Hand\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Background\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonHoverBackgroundBrush}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"BorderBrush\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonHoverBorderBrush}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ButtonHighlight\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Background\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonPressedBackgroundBrush}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"BorderBrush\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ButtonPressedBorderBrush}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.6\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"checkedBd\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\" />\r\n                                <VisualState x:Name=\"Indeterminate\" />\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\"\r\n                                                         Storyboard.TargetName=\"FocusedVisualElement\"\r\n                                                         Storyboard.TargetProperty=\"(UIElement.Opacity)\"\r\n                                                         To=\"1\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Rectangle x:Name=\"Bd\" Fill=\"{StaticResource TransparentBrush}\" />\r\n                        <Grid>\r\n                            <Border x:Name=\"Background\"\r\n                                    Background=\"{TemplateBinding Background}\"\r\n                                    BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                                    BorderThickness=\"{TemplateBinding BorderThickness}\" />\r\n                            <Rectangle x:Name=\"ButtonHighlight\"\r\n                                       Grid.ColumnSpan=\"2\"\r\n                                       Margin=\"1\"\r\n                                       Opacity=\"0\"\r\n                                       Stroke=\"{StaticResource ButtonHoverHighlightBorderBrush}\"\r\n                                       StrokeThickness=\"1\" />\r\n                            <Border x:Name=\"checkedBd\"\r\n                                    Background=\"{StaticResource ButtonPressedBackgroundBrush}\"\r\n                                    BorderBrush=\"{StaticResource ButtonPressedBorderBrush}\"\r\n                                    BorderThickness=\"1\"\r\n                                    Visibility=\"Collapsed\" />\r\n                            <ContentPresenter x:Name=\"contentPresenter\"\r\n                                              Margin=\"{TemplateBinding Padding}\"\r\n                                              HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                                              VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                                              Content=\"{TemplateBinding Content}\"\r\n                                              ContentTemplate=\"{TemplateBinding ContentTemplate}\" />\r\n                            <Rectangle x:Name=\"FocusedVisualElement\"\r\n                                       Opacity=\"0\"\r\n                                       Stroke=\"{StaticResource ButtonFocusedBorderBrush}\"\r\n                                       StrokeThickness=\"1\" />\r\n                            <Rectangle x:Name=\"DisabledVisualElement\"\r\n                                       Fill=\"{StaticResource DisabledBackgroundBrush}\"\r\n                                       IsHitTestVisible=\"false\"\r\n                                       Opacity=\"0\" />\r\n                        </Grid>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  *********************************  GroupBox Style  *********************************  -->\r\n    <BorderGapMaskConverter x:Key=\"BorderGapMaskConverter\" />\r\n    <Style x:Key=\"GroupBoxStyle\" TargetType=\"{x:Type GroupBox}\">\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource GroupBoxBorderBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type GroupBox}\">\r\n                    <Grid SnapsToDevicePixels=\"true\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"6\" />\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"*\" />\r\n                            <ColumnDefinition Width=\"6\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\" />\r\n                            <RowDefinition Height=\"Auto\" />\r\n                            <RowDefinition Height=\"*\" />\r\n                            <RowDefinition Height=\"6\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Border Grid.Row=\"1\"\r\n                                Grid.RowSpan=\"3\"\r\n                                Grid.Column=\"0\"\r\n                                Grid.ColumnSpan=\"4\"\r\n                                Background=\"{TemplateBinding Background}\"\r\n                                BorderBrush=\"{StaticResource TransparentBrush}\"\r\n                                BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                                CornerRadius=\"4\" />\r\n                        <Border x:Name=\"Header\"\r\n                                Grid.Row=\"0\"\r\n                                Grid.RowSpan=\"2\"\r\n                                Grid.Column=\"1\"\r\n                                Padding=\"3,1,3,0\">\r\n                            <ContentPresenter ContentSource=\"Header\"\r\n                                              RecognizesAccessKey=\"True\"\r\n                                              SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" />\r\n                        </Border>\r\n                        <ContentPresenter Grid.Row=\"2\"\r\n                                          Grid.Column=\"1\"\r\n                                          Grid.ColumnSpan=\"2\"\r\n                                          Margin=\"{TemplateBinding Padding}\"\r\n                                          SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" />\r\n                        <Border Grid.Row=\"1\"\r\n                                Grid.RowSpan=\"3\"\r\n                                Grid.ColumnSpan=\"4\"\r\n                                CornerRadius=\"4\">\r\n                            <Border.OpacityMask>\r\n                                <MultiBinding Converter=\"{StaticResource BorderGapMaskConverter}\" ConverterParameter=\"7\">\r\n                                    <Binding ElementName=\"Header\" Path=\"ActualWidth\" />\r\n                                    <Binding Path=\"ActualWidth\" RelativeSource=\"{RelativeSource Self}\" />\r\n                                    <Binding Path=\"ActualHeight\" RelativeSource=\"{RelativeSource Self}\" />\r\n                                </MultiBinding>\r\n                            </Border.OpacityMask>\r\n                            <Border BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                                    BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                                    CornerRadius=\"3\" />\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--  ********************** Implicit Styles ***********************  -->\r\n    <Style BasedOn=\"{StaticResource ButtonStyle}\" TargetType=\"{x:Type Button}\" />\r\n    <Style BasedOn=\"{StaticResource ScrollBarStyle}\" TargetType=\"{x:Type ScrollBar}\" />\r\n    <Style BasedOn=\"{StaticResource ScrollViewerStyle}\" TargetType=\"{x:Type ScrollViewer}\" />\r\n    <Style BasedOn=\"{StaticResource ComboBoxStyle}\" TargetType=\"{x:Type ComboBox}\" />\r\n    <Style BasedOn=\"{StaticResource ComboBoxItemStyle}\" TargetType=\"{x:Type ComboBoxItem}\" />\r\n    <Style BasedOn=\"{StaticResource TextBoxStyle}\" TargetType=\"{x:Type TextBox}\" />\r\n    <Style BasedOn=\"{StaticResource ListBoxStyle}\" TargetType=\"{x:Type ListBox}\" />\r\n    <Style BasedOn=\"{StaticResource ListBoxItemStyle}\" TargetType=\"{x:Type ListBoxItem}\" />\r\n    <Style BasedOn=\"{StaticResource CheckBoxStyle}\" TargetType=\"{x:Type CheckBox}\" />\r\n    <Style BasedOn=\"{StaticResource RadioButtonStyle}\" TargetType=\"{x:Type RadioButton}\" />\r\n    <Style BasedOn=\"{StaticResource SliderStyle}\" TargetType=\"{x:Type Slider}\" />\r\n    <Style BasedOn=\"{StaticResource RepeatButtonStyle}\" TargetType=\"{x:Type RepeatButton}\" />\r\n    <Style BasedOn=\"{StaticResource GridSplitterStyle}\" TargetType=\"{x:Type GridSplitter}\" />\r\n    <Style BasedOn=\"{StaticResource ProgressBarStyle}\" TargetType=\"{x:Type ProgressBar}\" />\r\n    <Style BasedOn=\"{StaticResource PasswordBoxStyle}\" TargetType=\"{x:Type PasswordBox}\" />\r\n    <Style BasedOn=\"{StaticResource ExpanderStyle}\" TargetType=\"{x:Type Expander}\" />\r\n    <Style BasedOn=\"{StaticResource ToggleButtonStyle}\" TargetType=\"{x:Type ToggleButton}\" />\r\n    <Style BasedOn=\"{StaticResource GroupBoxStyle}\" TargetType=\"{x:Type GroupBox}\" />\r\n\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Windows;\r\nusing System.Windows.Markup;\r\n\r\n[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]\r\n[assembly: XmlnsDefinition(\"http://schemas.rudigrobler.net/wpfthemes\", \"WPF.Themes\")]\r\n"
  },
  {
    "path": "WpfToolkit/WPF.Themes/Properties/Resources.Designer.cs",
    "content": "﻿//------------------------------------------------------------------------------\r\n// <auto-generated>\r\n//     This code was generated by a tool.\r\n//     Runtime Version:4.0.30319.1\r\n//\r\n//     Changes to this file may cause incorrect behavior and will be lost if\r\n//     the code is regenerated.\r\n// </auto-generated>\r\n//------------------------------------------------------------------------------\r\n\r\nnamespace WPF.Themes.Properties {\r\n    using System;\r\n    \r\n    \r\n    /// <summary>\r\n    ///   A strongly-typed resource class, for looking up localized strings, etc.\r\n    /// </summary>\r\n    // This class was auto-generated by the StronglyTypedResourceBuilder\r\n    // class via a tool like ResGen or Visual Studio.\r\n    // To add or remove a member, edit your .ResX file then rerun ResGen\r\n    // with the /str option, or rebuild your VS project.\r\n    [global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Resources.Tools.StronglyTypedResourceBuilder\", \"4.0.0.0\")]\r\n    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r\n    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\r\n    internal class Resources {\r\n        \r\n        private static global::System.Resources.ResourceManager resourceMan;\r\n        \r\n        private static global::System.Globalization.CultureInfo resourceCulture;\r\n        \r\n        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\")]\r\n        internal Resources() {\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Returns the cached ResourceManager instance used by this class.\r\n        /// </summary>\r\n        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\r\n        internal static global::System.Resources.ResourceManager ResourceManager {\r\n            get {\r\n                if (object.ReferenceEquals(resourceMan, null)) {\r\n                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager(\"WPF.Themes.Properties.Resources\", typeof(Resources).Assembly);\r\n                    resourceMan = temp;\r\n                }\r\n                return resourceMan;\r\n            }\r\n        }\r\n        \r\n        /// <summary>\r\n        ///   Overrides the current thread's CurrentUICulture property for all\r\n        ///   resource lookups using this strongly typed resource class.\r\n        /// </summary>\r\n        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\r\n        internal static global::System.Globalization.CultureInfo Culture {\r\n            get {\r\n                return resourceCulture;\r\n            }\r\n            set {\r\n                resourceCulture = value;\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/WPF.Themes/Properties/Resources.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n  <!-- \r\n    Microsoft ResX Schema \r\n    \r\n    Version 2.0\r\n    \r\n    The primary goals of this format is to allow a simple XML format \r\n    that is mostly human readable. The generation and parsing of the \r\n    various data types are done through the TypeConverter classes \r\n    associated with the data types.\r\n    \r\n    Example:\r\n    \r\n    ... ado.net/XML headers & schema ...\r\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\r\n    <resheader name=\"version\">2.0</resheader>\r\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\r\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\r\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\r\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\r\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\r\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\r\n    </data>\r\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\r\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\r\n        <comment>This is a comment</comment>\r\n    </data>\r\n                \r\n    There are any number of \"resheader\" rows that contain simple \r\n    name/value pairs.\r\n    \r\n    Each data row contains a name, and value. The row also contains a \r\n    type or mimetype. Type corresponds to a .NET class that support \r\n    text/value conversion through the TypeConverter architecture. \r\n    Classes that don't support this are serialized and stored with the \r\n    mimetype set.\r\n    \r\n    The mimetype is used for serialized objects, and tells the \r\n    ResXResourceReader how to depersist the object. This is currently not \r\n    extensible. For a given mimetype the value must be set accordingly:\r\n    \r\n    Note - application/x-microsoft.net.object.binary.base64 is the format \r\n    that the ResXResourceWriter will generate, however the reader can \r\n    read any of the formats listed below.\r\n    \r\n    mimetype: application/x-microsoft.net.object.binary.base64\r\n    value   : The object must be serialized with \r\n            : System.Serialization.Formatters.Binary.BinaryFormatter\r\n            : and then encoded with base64 encoding.\r\n    \r\n    mimetype: application/x-microsoft.net.object.soap.base64\r\n    value   : The object must be serialized with \r\n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\r\n            : and then encoded with base64 encoding.\r\n\r\n    mimetype: application/x-microsoft.net.object.bytearray.base64\r\n    value   : The object must be serialized into a byte array \r\n            : using a System.ComponentModel.TypeConverter\r\n            : and then encoded with base64 encoding.\r\n    -->\r\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\r\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\r\n      <xsd:complexType>\r\n        <xsd:choice maxOccurs=\"unbounded\">\r\n          <xsd:element name=\"metadata\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"assembly\">\r\n            <xsd:complexType>\r\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"data\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" msdata:Ordinal=\"1\" />\r\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\r\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n          <xsd:element name=\"resheader\">\r\n            <xsd:complexType>\r\n              <xsd:sequence>\r\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\r\n              </xsd:sequence>\r\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\r\n            </xsd:complexType>\r\n          </xsd:element>\r\n        </xsd:choice>\r\n      </xsd:complexType>\r\n    </xsd:element>\r\n  </xsd:schema>\r\n  <resheader name=\"resmimetype\">\r\n    <value>text/microsoft-resx</value>\r\n  </resheader>\r\n  <resheader name=\"version\">\r\n    <value>2.0</value>\r\n  </resheader>\r\n  <resheader name=\"reader\">\r\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n  <resheader name=\"writer\">\r\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r\n  </resheader>\r\n</root>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/Properties/Settings.Designer.cs",
    "content": "﻿//------------------------------------------------------------------------------\r\n// <auto-generated>\r\n//     This code was generated by a tool.\r\n//     Runtime Version:4.0.30319.1\r\n//\r\n//     Changes to this file may cause incorrect behavior and will be lost if\r\n//     the code is regenerated.\r\n// </auto-generated>\r\n//------------------------------------------------------------------------------\r\n\r\nnamespace WPF.Themes.Properties {\r\n    \r\n    \r\n    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\r\n    [global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator\", \"10.0.0.0\")]\r\n    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {\r\n        \r\n        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));\r\n        \r\n        public static Settings Default {\r\n            get {\r\n                return defaultInstance;\r\n            }\r\n        }\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/WPF.Themes/Properties/Settings.settings",
    "content": "﻿<?xml version='1.0' encoding='utf-8'?>\r\n<SettingsFile xmlns=\"uri:settings\" CurrentProfile=\"(Default)\">\r\n  <Profiles>\r\n    <Profile Name=\"(Default)\" />\r\n  </Profiles>\r\n  <Settings />\r\n</SettingsFile>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/RainierOrange/Theme.xaml",
    "content": "﻿<!--\r\n// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n-->\r\n\r\n<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n                    xmlns:basic=\"clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit\"\r\n                    xmlns:primitives=\"clr-namespace:Microsoft.Windows.Controls.Primitives;assembly=WPFToolkit\"\r\n                    xmlns:vsm=\"clr-namespace:System.Windows;assembly=WPFToolkit\">\r\n\r\n    <!-- Default Enhanced -->\r\n\r\n    <Color x:Key=\"MainColor\">#FFFFBA00</Color>\r\n    <Color x:Key=\"AlternateColor\">#FF644014</Color>\r\n    <Color x:Key=\"LightColor\">#FFFFF195</Color>\r\n\r\n    <LinearGradientBrush x:Key=\"NormalBorderBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFFFD200\"/>\r\n        <GradientStop Color=\"#FFD08F00\" Offset=\"0.375\"/>\r\n        <GradientStop Color=\"#FFA18500\" Offset=\"0.384\"/>\r\n        <GradientStop Color=\"#FF824E00\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"NormalBrush\" EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n        <GradientStop Color=\"#FFFFEDAC\" Offset=\"0\"/>\r\n        <GradientStop Color=\"#F9F9C200\" Offset=\"0.375\"/>\r\n        <GradientStop Color=\"#E5FFC600\" Offset=\"0.625\"/>\r\n        <GradientStop Color=\"#C6C29700\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"HighlightBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFFFD300\"/>\r\n        <GradientStop Color=\"#FFD08F00\" Offset=\"0.531\"/>\r\n        <GradientStop Color=\"#FFFFD300\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"MouseOverBrush\" EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n        <GradientStop Color=\"#F9FFE851\" Offset=\"0.495\"/>\r\n        <GradientStop Color=\"#FFFFC600\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"SelectedBackgroundBrush\" EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n        <GradientStop Color=\"#FFFFEDAC\" Offset=\"0\"/>\r\n        <GradientStop Color=\"#FFF9C200\" Offset=\"0.305\"/>\r\n        <GradientStop Color=\"#FFC29100\" Offset=\"1\"/>\r\n        <GradientStop Color=\"#FFFBD346\" Offset=\"0.29800000786781311\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"WindowBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFFFFFFF\"/>\r\n        <GradientStop Color=\"#FFFEFAE3\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <!-- ScrollBar -->\r\n    <Style TargetType=\"ScrollBar\">\r\n        <Setter Property=\"MinWidth\" Value=\"17\"/>\r\n        <Setter Property=\"MinHeight\" Value=\"17\"/>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ScrollBar\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <Grid.Resources>\r\n                            <ControlTemplate x:Key=\"RepeatButtonTemplate\" TargetType=\"RepeatButton\">\r\n                                <Grid x:Name=\"Root\" Background=\"Transparent\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"HorizontalIncrementTemplate\" TargetType=\"RepeatButton\">\r\n                                <Grid x:Name=\"Root\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundAnimation\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#7FFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#CCFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F2FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundAnimation\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#6BFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#C6FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#EAFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F4FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\".7\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Rectangle x:Name=\"Background\" Opacity=\"0\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" Stroke=\"{StaticResource NormalBorderBrush}\">\r\n                                        <Rectangle.Fill>\r\n                                            <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n                                        </Rectangle.Fill>\r\n                                    </Rectangle>\r\n                                    <Rectangle x:Name=\"BackgroundAnimation\" Opacity=\"0\" Fill=\"{StaticResource MouseOverBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                    <Rectangle Margin=\"1\" x:Name=\"BackgroundGradient\" Opacity=\"0\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\">\r\n                                        <Rectangle.Fill>\r\n                                            <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                                <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.013\"/>\r\n                                                <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                                <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.603\"/>\r\n                                                <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Rectangle.Fill>\r\n                                    </Rectangle>\r\n                                    <Rectangle Margin=\"1\" x:Name=\"Highlight\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                                    <Path Height=\"8\" Width=\"4\" Stretch=\"Uniform\" Data=\"F1 M 511.047,352.682L 511.047,342.252L 517.145,347.467L 511.047,352.682 Z \">\r\n                                        <Path.Fill>\r\n                                            <SolidColorBrush Color=\"#FF333333\" x:Name=\"ButtonColor\"/>\r\n                                        </Path.Fill>\r\n                                    </Path>\r\n                                    <Rectangle x:Name=\"DisabledElement\" Opacity=\"0\" Fill=\"#FFFFFFFF\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"HorizontalDecrementTemplate\" TargetType=\"RepeatButton\">\r\n                                <Grid x:Name=\"Root\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundMouseOver\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#7FFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#CCFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F2FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#6BFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#C6FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#EAFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F4FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\".7\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Rectangle x:Name=\"Background\" Opacity=\"0\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\">\r\n                                        <Rectangle.Fill>\r\n                                            <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n                                        </Rectangle.Fill>\r\n                                        <Rectangle.Stroke>\r\n                                            <LinearGradientBrush EndPoint=\".5,1\" StartPoint=\".5,0\">\r\n                                                <GradientStop Color=\"#FF647480\" Offset=\"1\"/>\r\n                                                <GradientStop Color=\"#FFAEB7BF\" Offset=\"0\"/>\r\n                                                <GradientStop Color=\"#FF919EA7\" Offset=\"0.35\"/>\r\n                                                <GradientStop Color=\"#FF7A8A99\" Offset=\"0.35\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Rectangle.Stroke>\r\n                                    </Rectangle>\r\n                                    <Rectangle x:Name=\"BackgroundMouseOver\" Opacity=\"0\" Fill=\"{StaticResource MouseOverBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                    <Rectangle x:Name=\"BackgroundPressed\" Opacity=\"0\" Fill=\"{StaticResource NormalBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                    <Rectangle Margin=\"1\" x:Name=\"BackgroundGradient\" Opacity=\"0\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\">\r\n                                        <Rectangle.Fill>\r\n                                            <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                                <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.013\"/>\r\n                                                <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                                <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.603\"/>\r\n                                                <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Rectangle.Fill>\r\n                                    </Rectangle>\r\n                                    <Rectangle Margin=\"1\" x:Name=\"Highlight\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                                    <Path Height=\"8\" Width=\"4\" Stretch=\"Uniform\" Data=\"F1 M 110.692,342.252L 110.692,352.682L 104.594,347.467L 110.692,342.252 Z \">\r\n                                        <Path.Fill>\r\n                                            <SolidColorBrush Color=\"#FF333333\" x:Name=\"ButtonColor\"/>\r\n                                        </Path.Fill>\r\n                                    </Path>\r\n                                    <Rectangle x:Name=\"DisabledElement\" Opacity=\"0\" Fill=\"#FFFFFFFF\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"VerticalIncrementTemplate\" TargetType=\"RepeatButton\">\r\n                                <Grid x:Name=\"Root\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundMouseOver\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#7FFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#CCFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F2FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#6BFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#C6FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#EAFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F4FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\".7\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Rectangle x:Name=\"Background\" Opacity=\"0\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\">\r\n                                        <Rectangle.Fill>\r\n                                            <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n                                        </Rectangle.Fill>\r\n                                        <Rectangle.Stroke>\r\n                                            <LinearGradientBrush EndPoint=\"1,.5\" StartPoint=\"0,.5\">\r\n                                                <GradientStop Color=\"#FF647480\" Offset=\"1\"/>\r\n                                                <GradientStop Color=\"#FFAEB7BF\" Offset=\"0\"/>\r\n                                                <GradientStop Color=\"#FF919EA7\" Offset=\"0.35\"/>\r\n                                                <GradientStop Color=\"#FF7A8A99\" Offset=\"0.35\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Rectangle.Stroke>\r\n                                    </Rectangle>\r\n                                    <Rectangle x:Name=\"BackgroundMouseOver\" Opacity=\"0\" Fill=\"{StaticResource MouseOverBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                    <Rectangle x:Name=\"BackgroundPressed\" Opacity=\"0\" Fill=\"{StaticResource NormalBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                    <Rectangle Margin=\"1\" x:Name=\"BackgroundGradient\" Opacity=\"0\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\">\r\n                                        <Rectangle.Fill>\r\n                                            <LinearGradientBrush EndPoint=\"1,.7\" StartPoint=\"0,.7\">\r\n                                                <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.013\"/>\r\n                                                <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                                <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.603\"/>\r\n                                                <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Rectangle.Fill>\r\n                                    </Rectangle>\r\n                                    <Rectangle Margin=\"1\" x:Name=\"Highlight\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                                    <Path Height=\"4\" Width=\"8\" Stretch=\"Uniform\" Data=\"F1 M 531.107,321.943L 541.537,321.943L 536.322,328.042L 531.107,321.943 Z \">\r\n                                        <Path.Fill>\r\n                                            <SolidColorBrush Color=\"#FF333333\" x:Name=\"ButtonColor\"/>\r\n                                        </Path.Fill>\r\n                                    </Path>\r\n                                    <Rectangle x:Name=\"DisabledElement\" Opacity=\"0\" Fill=\"#FFFFFFFF\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"VerticalDecrementTemplate\" TargetType=\"RepeatButton\">\r\n                                <Grid x:Name=\"Root\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundMouseOver\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#7FFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#CCFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F2FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#6BFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#C6FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#EAFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F4FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\".7\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Rectangle x:Name=\"Background\" Opacity=\"0\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" Stroke=\"{StaticResource NormalBorderBrush}\">\r\n                                        <Rectangle.Fill>\r\n                                            <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n                                        </Rectangle.Fill>\r\n                                    </Rectangle>\r\n                                    <Rectangle x:Name=\"BackgroundMouseOver\" Opacity=\"0\" Fill=\"{StaticResource MouseOverBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                    <Rectangle x:Name=\"BackgroundPressed\" Opacity=\"0\" Fill=\"{StaticResource NormalBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                    <Rectangle Margin=\"1\" x:Name=\"BackgroundGradient\" Opacity=\"0\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\">\r\n                                        <Rectangle.Fill>\r\n                                            <LinearGradientBrush EndPoint=\"1,.7\" StartPoint=\"0,.7\">\r\n                                                <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.013\"/>\r\n                                                <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                                <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.603\"/>\r\n                                                <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Rectangle.Fill>\r\n                                    </Rectangle>\r\n                                    <Rectangle Margin=\"1\" x:Name=\"Highlight\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                                    <Path Height=\"4\" Width=\"8\" Stretch=\"Uniform\" Data=\"F1 M 541.537,173.589L 531.107,173.589L 536.322,167.49L 541.537,173.589 Z \">\r\n                                        <Path.Fill>\r\n                                            <SolidColorBrush Color=\"#FF333333\" x:Name=\"ButtonColor\"/>\r\n                                        </Path.Fill>\r\n                                    </Path>\r\n                                    <Rectangle x:Name=\"DisabledElement\" Opacity=\"0\" Fill=\"#FFFFFFFF\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"VerticalThumbTemplate\" TargetType=\"Thumb\">\r\n                                <Grid>\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundMouseOver\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#7FFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#CCFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F2FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#6BFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#C6FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#EAFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F4FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ThumbVisual\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"0\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Grid Margin=\"1,0,1,0\" x:Name=\"ThumbVisual\">\r\n                                        <Rectangle x:Name=\"Background\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" Stroke=\"{StaticResource NormalBorderBrush}\">\r\n                                            <Rectangle.Fill>\r\n                                                <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n                                            </Rectangle.Fill>\r\n                                        </Rectangle>\r\n                                        <Rectangle x:Name=\"BackgroundMouseOver\" Opacity=\"0\" Fill=\"{StaticResource MouseOverBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                        <Rectangle x:Name=\"BackgroundPressed\" Opacity=\"0\" Fill=\"{StaticResource NormalBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                        <Rectangle Margin=\"1\" x:Name=\"BackgroundGradient\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\">\r\n                                            <Rectangle.Fill>\r\n                                                <LinearGradientBrush EndPoint=\"1,.7\" StartPoint=\"0,.7\">\r\n                                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                                    <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                                    <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.6\"/>\r\n                                                    <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                                </LinearGradientBrush>\r\n                                            </Rectangle.Fill>\r\n                                        </Rectangle>\r\n                                        <Rectangle Margin=\"1\" x:Name=\"Highlight\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                                    </Grid>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"HorizontalThumbTemplate\" TargetType=\"Thumb\">\r\n                                <Grid>\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundMouseOver\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#7FFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#CCFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F2FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#6BFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#C6FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#EAFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F4FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ThumbVisual\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"0\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Grid Margin=\"0,1,0,1\" x:Name=\"ThumbVisual\">\r\n                                        <Rectangle x:Name=\"Background\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" Stroke=\"{StaticResource NormalBorderBrush}\">\r\n                                            <Rectangle.Fill>\r\n                                                <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n                                            </Rectangle.Fill>\r\n                                        </Rectangle>\r\n                                        <Rectangle x:Name=\"BackgroundMouseOver\" Opacity=\"0\" Fill=\"{StaticResource MouseOverBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                        <Rectangle x:Name=\"BackgroundPressed\" Opacity=\"0\" Fill=\"{StaticResource NormalBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                        <Rectangle Margin=\"1\" x:Name=\"BackgroundGradient\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\">\r\n                                            <Rectangle.Fill>\r\n                                                <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.013\"/>\r\n                                                    <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                                    <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.603\"/>\r\n                                                    <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                                </LinearGradientBrush>\r\n                                            </Rectangle.Fill>\r\n                                        </Rectangle>\r\n                                        <Rectangle Margin=\"1\" x:Name=\"Highlight\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                                    </Grid>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Root\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid x:Name=\"HorizontalRoot\" Visibility=\"Collapsed\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <Rectangle Grid.ColumnSpan=\"5\" Stroke=\"{StaticResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\">\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,0\" StartPoint=\"0.5,1\">\r\n                                        <GradientStop Color=\"#FFF4F6F7\" Offset=\"0\"/>\r\n                                        <GradientStop Color=\"#FFF0F4F7\" Offset=\"0.344\"/>\r\n                                        <GradientStop Color=\"#FFDFE3E6\" Offset=\"1\"/>\r\n                                        <GradientStop Color=\"#FFE9EEF4\" Offset=\"0.527\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                            <Rectangle Grid.ColumnSpan=\"5\" Fill=\"{TemplateBinding Background}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                            <Rectangle Opacity=\".375\" Grid.ColumnSpan=\"5\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\">\r\n                                <Rectangle.Stroke>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                        <GradientStop Color=\"#FFA3AEB9\" Offset=\"0\"/>\r\n                                        <GradientStop Color=\"#FF8399A9\" Offset=\"0.375\"/>\r\n                                        <GradientStop Color=\"#FF718597\" Offset=\"0.375\"/>\r\n                                        <GradientStop Color=\"#FF617584\" Offset=\"1\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Stroke>\r\n                            </Rectangle>\r\n                            <Rectangle Margin=\"1\" Grid.ColumnSpan=\"5\" RadiusX=\"1\" RadiusY=\"1\">\r\n                                <Rectangle.Stroke>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,.125\" StartPoint=\".5,.875\">\r\n                                        <GradientStop Color=\"#33FFFFFF\"/>\r\n                                        <GradientStop Color=\"#99FFFFFF\" Offset=\"1\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Stroke>\r\n                            </Rectangle>\r\n                            <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource HorizontalDecrementTemplate}\" Margin=\"1\" x:Name=\"HorizontalSmallDecrease\" Width=\"16\" Grid.Column=\"0\" Interval=\"50\"/>\r\n              \r\n                            <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" x:Name=\"HorizontalLargeDecrease\" Width=\"0\" Grid.Column=\"1\" Interval=\"50\"/>\r\n                            <Thumb Background=\"{TemplateBinding Background}\" Template=\"{StaticResource HorizontalThumbTemplate}\" MinWidth=\"18\" x:Name=\"HorizontalThumb\" Width=\"18\" Grid.Column=\"2\"/>\r\n                            <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" x:Name=\"HorizontalLargeIncrease\" Grid.Column=\"3\" Interval=\"50\"/>\r\n                            \r\n                            <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource HorizontalIncrementTemplate}\" Margin=\"1\" x:Name=\"HorizontalSmallIncrease\" Width=\"16\" Grid.Column=\"4\" Interval=\"50\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"VerticalRoot\" Visibility=\"Visible\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"*\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <Rectangle Grid.RowSpan=\"3\" Stroke=\"{StaticResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\">\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush EndPoint=\"0,0.5\" StartPoint=\"1,0.5\">\r\n                                        <GradientStop Color=\"#FFF4F6F7\" Offset=\"0\"/>\r\n                                        <GradientStop Color=\"#FFF0F4F7\" Offset=\"0.344\"/>\r\n                                        <GradientStop Color=\"#FFDFE3E6\" Offset=\"1\"/>\r\n                                        <GradientStop Color=\"#FFE9EEF4\" Offset=\"0.527\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                            <Rectangle Opacity=\".375\" Grid.RowSpan=\"3\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Stroke=\"{StaticResource NormalBorderBrush}\"/>\r\n                            <Rectangle Margin=\"1\" Grid.RowSpan=\"3\" RadiusX=\"1\" RadiusY=\"1\">\r\n                                <Rectangle.Stroke>\r\n                                    <LinearGradientBrush EndPoint=\"0.125,0.5\" StartPoint=\"0.875,0.5\">\r\n                                        <GradientStop Color=\"#33FFFFFF\"/>\r\n                                        <GradientStop Color=\"#99FFFFFF\" Offset=\"1\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Stroke>\r\n                            </Rectangle>\r\n                            \r\n                            <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource VerticalDecrementTemplate}\" Height=\"16\" Margin=\"1\" x:Name=\"VerticalSmallDecrease\" Grid.Row=\"0\" Interval=\"50\" Command=\"ScrollBar.LineUpCommand\" />\r\n\r\n                            <Track Grid.Row=\"1\" x:Name=\"PART_Track\" Orientation=\"Vertical\" IsDirectionReversed=\"true\">\r\n                                <Track.Thumb>\r\n                                    <Thumb MinHeight=\"18\" x:Name=\"VerticalThumb\" Template=\"{StaticResource VerticalThumbTemplate}\" />\r\n                                </Track.Thumb>\r\n                                <Track.IncreaseRepeatButton>\r\n                                    <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Command=\"ScrollBar.PageDownCommand\" Interval=\"50\" />\r\n                                </Track.IncreaseRepeatButton>\r\n                                <Track.DecreaseRepeatButton>\r\n                                    <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Command=\"ScrollBar.PageUpCommand\" Interval=\"50\" />\r\n                                </Track.DecreaseRepeatButton>\r\n                            </Track>\r\n                            \r\n                            <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource VerticalIncrementTemplate}\" Height=\"16\" Margin=\"1\" x:Name=\"VerticalSmallIncrease\" Grid.Row=\"4\" Interval=\"50\" Command=\"ScrollBar.LineDownCommand\" />\r\n                            \r\n                        </Grid>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"Orientation\" Value=\"Horizontal\">\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"Root\">\r\n                                <Setter.Value>\r\n                                    <RotateTransform Angle=\"-90\"/>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"ScrollViewer\">\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Padding\" Value=\"4\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ScrollViewer\">\r\n                    <Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\">\r\n                        <Grid Background=\"{TemplateBinding Background}\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"*\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <ScrollContentPresenter Cursor=\"{TemplateBinding Cursor}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"ScrollContentPresenter\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                            <Rectangle Grid.Column=\"1\" Grid.Row=\"1\" Fill=\"#FFE9EEF4\"/>\r\n                            <ScrollBar IsTabStop=\"False\" Margin=\"0,-1,-1,-1\" x:Name=\"PART_VerticalScrollBar\" Width=\"18\" Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Grid.Column=\"1\" Grid.Row=\"0\" Orientation=\"Vertical\" ViewportSize=\"{TemplateBinding ViewportHeight}\" Maximum=\"{TemplateBinding ScrollableHeight}\" Minimum=\"0\" Value=\"{TemplateBinding VerticalOffset}\" />\r\n                            <ScrollBar IsTabStop=\"False\" Height=\"18\" Margin=\"-1,0,-1,-1\" x:Name=\"PART_HorizontalScrollBar\" Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Grid.Column=\"0\" Grid.Row=\"1\" Orientation=\"Horizontal\" ViewportSize=\"{TemplateBinding ViewportWidth}\" Maximum=\"{TemplateBinding ScrollableWidth}\" Minimum=\"0\" Value=\"{TemplateBinding HorizontalOffset}\" />\r\n                        </Grid>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- Button -->\r\n    <Style TargetType=\"Button\">\r\n        <Setter Property=\"Background\">\r\n            <Setter.Value>\r\n                <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\"/>\r\n        <Setter Property=\"Padding\" Value=\"3\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Button\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"grid\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\".55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"Background\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" Background=\"{x:Null}\">\r\n                            <Grid Margin=\"1\" Background=\"{TemplateBinding Background}\" x:Name=\"grid\">\r\n                                <Border x:Name=\"BackgroundAnimation\" Background=\"{StaticResource NormalBrush}\" BorderBrush=\"#FFFFFFFF\"/>\r\n                                <Rectangle x:Name=\"BackgroundGradient\" Fill=\"{StaticResource MouseOverBrush}\" Stroke=\"{x:Null}\" Opacity=\"0\"/>\r\n                            </Grid>\r\n                        </Border>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"contentPresenter\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                        <Rectangle x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"false\" Opacity=\"0\" Fill=\"#FFFFFFFF\" RadiusX=\"3\" RadiusY=\"3\"/>\r\n                        <Rectangle Margin=\"1\" x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- TextBox -->\r\n    <Style TargetType=\"TextBox\">\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"Background\" Value=\"#FFFFFFFF\"/>\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\"/>\r\n        <Setter Property=\"Padding\" Value=\"2\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TextBox\">\r\n                    <Grid x:Name=\"RootElement\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"MouseOverBorder\" Storyboard.TargetProperty=\"(Border.BorderBrush).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"{StaticResource MainColor}\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ReadOnly\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ReadOnlyVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"Border\" Opacity=\"1\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"1\">\r\n                            <Grid>\r\n                                <Border x:Name=\"ReadOnlyVisualElement\" Opacity=\"0\" Background=\"#72F7F7F7\"/>\r\n                                <Border x:Name=\"MouseOverBorder\" BorderBrush=\"Transparent\" BorderThickness=\"1\">\r\n                                    <ScrollViewer BorderThickness=\"0\" IsTabStop=\"False\" Padding=\"{TemplateBinding Padding}\" x:Name=\"PART_ContentHost\"/>\r\n                                </Border>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Border x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"False\" Opacity=\"0\" Background=\"#A5F7F7F7\" BorderBrush=\"#A5F7F7F7\" BorderThickness=\"{TemplateBinding BorderThickness}\"/>\r\n                        <Border Margin=\"1\" x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Opacity=\"0\" BorderBrush=\"{StaticResource HighlightBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- ComboBoxItem -->\r\n    <Style TargetType=\"ComboBoxItem\">\r\n        <Setter Property=\"Padding\" Value=\"3\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"Local\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ComboBoxItem\">\r\n                    <Grid Background=\"{TemplateBinding Background}\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"fillColor\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.75\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\".55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualState x:Name=\"Unselected\"/>\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"fillColor2\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\".75\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Rectangle x:Name=\"fillColor\" IsHitTestVisible=\"False\" Opacity=\"0\" Fill=\"{StaticResource MouseOverBrush}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                        <Rectangle x:Name=\"fillColor2\" IsHitTestVisible=\"False\" Opacity=\"0\" Fill=\"{StaticResource SelectedBackgroundBrush}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" />\r\n                        <Rectangle x:Name=\"FocusVisualElement\" Visibility=\"Collapsed\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- ComboBox -->\r\n    <Style TargetType=\"ComboBox\">\r\n        <Setter Property=\"Padding\" Value=\"6,2,25,2\"/>\r\n        <Setter Property=\"Background\" Value=\"#FF1F3B53\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"Once\"/>\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"#FFA3AEB9\" Offset=\"0\"/>\r\n                    <GradientStop Color=\"#FF8399A9\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF718597\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF617584\" Offset=\"1\"/>\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ComboBox\">\r\n                    <Grid>\r\n                        <Grid.Resources>\r\n                            <Style TargetType=\"ToggleButton\" x:Name=\"comboToggleStyle\">\r\n                                <Setter Property=\"Foreground\" Value=\"#FF333333\"/>\r\n                                <Setter Property=\"Background\">\r\n                                    <Setter.Value>\r\n                                        <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n                                    </Setter.Value>\r\n                                </Setter>\r\n                                <Setter Value=\"{StaticResource NormalBorderBrush}\" Property=\"BorderBrush\"/>\r\n                                <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n                                <Setter Property=\"Padding\" Value=\"3\"/>\r\n                                <Setter Property=\"Template\">\r\n                                    <Setter.Value>\r\n                                        <ControlTemplate TargetType=\"ToggleButton\">\r\n                                            <Grid>\r\n                                                <VisualStateManager.VisualStateGroups>\r\n                                                    <VisualStateGroup x:Name=\"CommonStates\">\r\n                                                        <VisualState x:Name=\"Normal\"/>\r\n                                                        <VisualState x:Name=\"MouseOver\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BackgroundOverlay2\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Pressed\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.6\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n\r\n\r\n\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Disabled\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledVisual\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                    </VisualStateGroup>\r\n                                                    <VisualStateGroup x:Name=\"CheckStates\">\r\n                                                        <VisualState x:Name=\"Checked\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BackgroundOverlay3\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Unchecked\"/>\r\n                                                    </VisualStateGroup>\r\n                                                    <VisualStateGroup x:Name=\"FocusStates\">\r\n                                                        <VisualState x:Name=\"Focused\">\r\n                                                            <Storyboard>                                                                \r\n                                                                <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Visibility\">\r\n                                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                                                </ObjectAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Unfocused\"/>\r\n                                                    </VisualStateGroup>\r\n                                                </VisualStateManager.VisualStateGroups>\r\n                                                <Rectangle x:Name=\"Background\" Fill=\"{TemplateBinding Background}\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" RadiusX=\"3\" RadiusY=\"3\"/>\r\n                                                <Rectangle x:Name=\"BackgroundOverlay\" StrokeThickness=\"{TemplateBinding BorderThickness}\" RadiusX=\"3\" RadiusY=\"3\" Fill=\"{StaticResource NormalBrush}\" Margin=\"1,1,1,1\">\r\n                                                    <Rectangle.Stroke>\r\n                                                        <SolidColorBrush Color=\"#FFFFFFFF\"/>\r\n                                                    </Rectangle.Stroke>\r\n                                                </Rectangle>\r\n                                                <Rectangle x:Name=\"BackgroundOverlay2\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"{TemplateBinding BorderThickness}\" RadiusX=\"3\" RadiusY=\"3\" Fill=\"{StaticResource MouseOverBrush}\" Opacity=\"0\" Margin=\"1,1,1,1\"/>\r\n                                                <Rectangle x:Name=\"BackgroundOverlay3\" Stroke=\"{x:Null}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" RadiusX=\"3\" RadiusY=\"3\" Opacity=\"0\" Margin=\"1,1,1,1\" Fill=\"#7FFFFFFF\"/>\r\n                                                <Rectangle Margin=\"{TemplateBinding BorderThickness}\" x:Name=\"Highlight\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                                <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"contentPresenter\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                                                <Rectangle Margin=\"1\" x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"3.5\" RadiusY=\"3.5\"/>\r\n                                                <Rectangle Fill=\"#99F4F4F4\" x:Name=\"DisabledVisual\" Opacity=\"0\" Stroke=\"{x:Null}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                            </Grid>\r\n                                        </ControlTemplate>\r\n                                    </Setter.Value>\r\n                                </Setter>\r\n                            </Style>\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\".55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                                <VisualState x:Name=\"FocusedDropDown\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00\" Storyboard.TargetName=\"PopupBorder\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"ContentPresenterBorder\">\r\n                            <Grid>\r\n                                <ToggleButton BorderThickness=\"{TemplateBinding BorderThickness}\" HorizontalContentAlignment=\"Right\" HorizontalAlignment=\"Stretch\" Margin=\"0\" x:Name=\"DropDownToggle\" Style=\"{DynamicResource comboToggleStyle}\" VerticalAlignment=\"Stretch\" IsChecked=\"{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\">\r\n                                    <Path Height=\"4\" HorizontalAlignment=\"Right\" Margin=\"0,0,6,0\" x:Name=\"BtnArrow\" Width=\"8\" Stretch=\"Uniform\" Data=\"F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z \">\r\n                                        <Path.Fill>\r\n                                            <SolidColorBrush Color=\"#FF333333\" x:Name=\"BtnArrowColor\"/>\r\n                                        </Path.Fill>\r\n                                    </Path>\r\n                                </ToggleButton>\r\n                                <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"ContentPresenter\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Content=\"{TemplateBinding SelectionBoxItem}\" ContentTemplate=\"{TemplateBinding SelectionBoxItemTemplate}\" ContentTemplateSelector=\"{TemplateBinding ItemTemplateSelector}\" IsHitTestVisible=\"False\"/>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Rectangle x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"false\" Opacity=\"0\" Fill=\"White\" RadiusX=\"3\" RadiusY=\"3\"/>\r\n                        <Rectangle Margin=\"1\" x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                        <Popup x:Name=\"Popup\" IsOpen=\"{TemplateBinding IsDropDownOpen}\">\r\n                            <Grid MaxHeight=\"{TemplateBinding MaxDropDownHeight}\" MinWidth=\"{TemplateBinding ActualWidth}\" x:Name=\"DropDown\" SnapsToDevicePixels=\"True\">\r\n\r\n                                <Border Height=\"Auto\" HorizontalAlignment=\"Stretch\" x:Name=\"PopupBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\">\r\n                                    <Border.Background>\r\n                                        <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#FFFEFEFE\" Offset=\"1\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Border.Background>\r\n                                    <ScrollViewer BorderThickness=\"0\" Padding=\"1\" SnapsToDevicePixels=\"True\" HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Auto\" CanContentScroll=\"True\">\r\n                                        <ItemsPresenter/>\r\n                                    </ScrollViewer>\r\n                                </Border>\r\n\r\n                            </Grid>\r\n                        </Popup>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- ListBoxItem -->\r\n    <Style TargetType=\"ListBoxItem\">\r\n        <Setter Property=\"Padding\" Value=\"3\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"Local\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ListBoxItem\">\r\n                    <Grid Background=\"{TemplateBinding Background}\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"fillColor\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.75\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\".55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualState x:Name=\"Unselected\"/>\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"fillColor2\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\".75\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Rectangle x:Name=\"fillColor\" IsHitTestVisible=\"False\" Opacity=\"0\" Fill=\"{StaticResource MouseOverBrush}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                        <Rectangle x:Name=\"fillColor2\" IsHitTestVisible=\"False\" Opacity=\"0\" Fill=\"{StaticResource SelectedBackgroundBrush}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" />\r\n                        <Rectangle x:Name=\"FocusVisualElement\" Visibility=\"Collapsed\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- ListBox -->\r\n    <Style TargetType=\"ListBox\">\r\n        <Setter Property=\"Padding\" Value=\"1\"/>\r\n        <Setter Property=\"Background\" Value=\"#FFFFFFFF\"/>\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"Once\"/>\r\n        <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\"/>\r\n        <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\"/>\r\n        <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"True\"/>\r\n        <Setter Value=\"{StaticResource NormalBorderBrush}\" Property=\"BorderBrush\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ListBox\">\r\n                    <Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\">\r\n                        <ScrollViewer Background=\"{TemplateBinding Background}\" BorderBrush=\"Transparent\" BorderThickness=\"0\" Padding=\"{TemplateBinding Padding}\" x:Name=\"ScrollViewer\" >\r\n                            <ItemsPresenter/>\r\n                        </ScrollViewer>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- Expander -->\r\n    <Style TargetType=\"Expander\">\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Expander\">\r\n                    <Grid Background=\"Transparent\">\r\n                        <Grid.Resources>\r\n                            <LinearGradientBrush x:Key=\"ExpanderArrowFill\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n                                <GradientStop Color=\"White\" Offset=\"0\"/>\r\n                                <GradientStop Color=\"#FFBFBFBF\" Offset=\"0.5\"/>\r\n                                <GradientStop Color=\"#FF878787\" Offset=\"1\"/>\r\n                            </LinearGradientBrush>\r\n                            <LinearGradientBrush x:Key=\"ExpanderArrowHoverFill\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n                                <GradientStop Color=\"#FFF0F8FE\" Offset=\"0\"/>\r\n                                <GradientStop Color=\"#FFE0F3FE\" Offset=\"0.3\"/>\r\n                                <GradientStop Color=\"#FF6FA7C5\" Offset=\"1\"/>\r\n                            </LinearGradientBrush>\r\n                            <LinearGradientBrush x:Key=\"ExpanderArrowPressedFill\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n                                <GradientStop Color=\"#FFDCF0FA\" Offset=\"0\"/>\r\n                                <GradientStop Color=\"#FFC5E6F7\" Offset=\"0.2\"/>\r\n                                <GradientStop Color=\"#FF5690D0\" Offset=\"1\"/>\r\n                            </LinearGradientBrush>\r\n                            <ControlTemplate x:Key=\"ExpanderDownHeaderTemplate\" TargetType=\"ToggleButton\">\r\n                                <Grid Background=\"Transparent\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CheckStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Checked\">\r\n<!--                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"Data\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"M 1,4.5 L 4.5,1 L 8,4.5\"/>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>-->\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Unchecked\"/>\r\n                                        </VisualStateGroup>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <ColorAnimation BeginTime=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(Path.Stroke).(SolidColorBrush.Color)\" To=\"#222\"/>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"circle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.8\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <ColorAnimation BeginTime=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(Path.Stroke).(SolidColorBrush.Color)\" To=\"#FF003366\"/>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"circle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.7\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                        <VisualStateGroup x:Name=\"FocusStates\">\r\n                                            <VisualState x:Name=\"Focused\">\r\n                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Visibility\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Unfocused\"/>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Border Padding=\"{TemplateBinding Padding}\">\r\n                                        <Grid Background=\"Transparent\">\r\n                                            <Grid.ColumnDefinitions>\r\n                                                <ColumnDefinition Width=\"19\"/>\r\n                                                <ColumnDefinition Width=\"*\"/>\r\n                                            </Grid.ColumnDefinitions>\r\n                                            <Grid HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\">\r\n                                                <Ellipse Height=\"19\" HorizontalAlignment=\"Center\" x:Name=\"circle\" VerticalAlignment=\"Center\" Width=\"19\" Fill=\"{StaticResource MouseOverBrush}\" Stroke=\"{StaticResource NormalBorderBrush}\"/>\r\n                                                <Path HorizontalAlignment=\"Center\" x:Name=\"arrow\" VerticalAlignment=\"Center\" Stroke=\"#666\" StrokeThickness=\"2\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\"/>\r\n                                            </Grid>\r\n                                            <ContentPresenter HorizontalAlignment=\"Left\" Margin=\"4,0,0,0\" x:Name=\"header\" VerticalAlignment=\"Center\" Grid.Column=\"1\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                                        </Grid>\r\n                                    </Border>\r\n                                    <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HighlightBrush}\" BorderThickness=\"1\" CornerRadius=\"3\"/>\r\n                                </Grid>\r\n                                <ControlTemplate.Triggers>\r\n                                    <Trigger Property=\"IsChecked\" Value=\"True\">\r\n                                        <Setter Property=\"Data\" TargetName=\"arrow\" Value=\"M 1,4.5 L 4.5,1 L 8,4.5\" />\r\n                                    </Trigger>\r\n                                </ControlTemplate.Triggers>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"ExpanderUpHeaderTemplate\" TargetType=\"ToggleButton\">\r\n                                <Grid Background=\"Transparent\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CheckStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Checked\">\r\n                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"Data\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"M 1,4.5 L 4.5,1 L 8,4.5\"/>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Unchecked\"/>\r\n                                        </VisualStateGroup>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <ColorAnimation BeginTime=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(Path.Stroke).(SolidColorBrush.Color)\" To=\"#222\"/>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"circle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.8\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <ColorAnimation BeginTime=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(Path.Stroke).(SolidColorBrush.Color)\" To=\"#FF003366\"/>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"circle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.7\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                        <VisualStateGroup x:Name=\"FocusStates\">\r\n                                            <VisualState x:Name=\"Focused\">\r\n                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Visibility\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Unfocused\"/>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Border Padding=\"{TemplateBinding Padding}\">\r\n                                        <Grid Background=\"Transparent\">\r\n                                            <Grid.ColumnDefinitions>\r\n                                                <ColumnDefinition Width=\"19\"/>\r\n                                                <ColumnDefinition Width=\"*\"/>\r\n                                            </Grid.ColumnDefinitions>\r\n                                            <Grid HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\">\r\n                                                <Grid.RenderTransform>\r\n                                                    <TransformGroup>\r\n                                                        <TransformGroup.Children>\r\n                                                            <TransformCollection>\r\n                                                                <RotateTransform Angle=\"180\" CenterX=\"9.5\" CenterY=\"9.5\"/>\r\n                                                            </TransformCollection>\r\n                                                        </TransformGroup.Children>\r\n                                                    </TransformGroup>\r\n                                                </Grid.RenderTransform>\r\n                                                <Ellipse Height=\"19\" HorizontalAlignment=\"Center\" x:Name=\"circle\" VerticalAlignment=\"Center\" Width=\"19\" Fill=\"{StaticResource MouseOverBrush}\" Stroke=\"{StaticResource NormalBorderBrush}\"/>\r\n                                                <Path HorizontalAlignment=\"Center\" x:Name=\"arrow\" VerticalAlignment=\"Center\" Stroke=\"#666\" StrokeThickness=\"2\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\"/>\r\n                                            </Grid>\r\n                                            <ContentPresenter HorizontalAlignment=\"Left\" Margin=\"4,0,0,0\" x:Name=\"header\" VerticalAlignment=\"Center\" Grid.Column=\"1\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                                        </Grid>\r\n                                    </Border>\r\n                                    <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HighlightBrush}\" BorderThickness=\"1\" CornerRadius=\"3\"/>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"ExpanderLeftHeaderTemplate\" TargetType=\"ToggleButton\">\r\n                                <Grid Background=\"Transparent\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CheckStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Checked\">\r\n                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"Data\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"M 1,4.5 L 4.5,1 L 8,4.5\"/>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Unchecked\"/>\r\n                                        </VisualStateGroup>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <ColorAnimation BeginTime=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(Path.Stroke).(SolidColorBrush.Color)\" To=\"#222\"/>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"circle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.8\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <ColorAnimation BeginTime=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(Path.Stroke).(SolidColorBrush.Color)\" To=\"#FF003366\"/>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"circle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.7\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                        <VisualStateGroup x:Name=\"FocusStates\">\r\n                                            <VisualState x:Name=\"Focused\">\r\n                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Visibility\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                            <DiscreteObjectKeyFrame.Value>\r\n                                                                <Visibility>Visible</Visibility>\r\n                                                            </DiscreteObjectKeyFrame.Value>\r\n                                                        </DiscreteObjectKeyFrame>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Unfocused\"/>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Border Padding=\"{TemplateBinding Padding}\">\r\n                                        <Grid Background=\"Transparent\">\r\n                                            <Grid.RowDefinitions>\r\n                                                <RowDefinition Height=\"19\"/>\r\n                                                <RowDefinition Height=\"*\"/>\r\n                                            </Grid.RowDefinitions>\r\n                                            <Grid HorizontalAlignment=\"Center\" VerticalAlignment=\"Top\">\r\n                                                <Grid.RenderTransform>\r\n                                                    <TransformGroup>\r\n                                                        <TransformGroup.Children>\r\n                                                            <TransformCollection>\r\n                                                                <RotateTransform Angle=\"90\" CenterX=\"9.5\" CenterY=\"9.5\"/>\r\n                                                            </TransformCollection>\r\n                                                        </TransformGroup.Children>\r\n                                                    </TransformGroup>\r\n                                                </Grid.RenderTransform>\r\n                                                <Ellipse Height=\"19\" HorizontalAlignment=\"Center\" x:Name=\"circle\" VerticalAlignment=\"Center\" Width=\"19\" Fill=\"{StaticResource MouseOverBrush}\" Stroke=\"{StaticResource NormalBorderBrush}\"/>\r\n                                                <Path HorizontalAlignment=\"Center\" x:Name=\"arrow\" VerticalAlignment=\"Center\" Stroke=\"#666\" StrokeThickness=\"2\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\"/>\r\n                                            </Grid>\r\n                                            <ContentPresenter HorizontalAlignment=\"Center\" Margin=\"0,4,0,0\" x:Name=\"header\" VerticalAlignment=\"Top\" Grid.Row=\"1\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                                        </Grid>\r\n                                    </Border>\r\n                                    <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HighlightBrush}\" BorderThickness=\"1\" CornerRadius=\"3\"/>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"ExpanderRightHeaderTemplate\" TargetType=\"ToggleButton\">\r\n                                <Grid Background=\"Transparent\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CheckStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Checked\">\r\n                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"Data\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"M 1,4.5 L 4.5,1 L 8,4.5\"/>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Unchecked\"/>\r\n                                        </VisualStateGroup>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <ColorAnimation BeginTime=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(Path.Stroke).(SolidColorBrush.Color)\" To=\"#222\"/>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"circle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.8\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <ColorAnimation BeginTime=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(Path.Stroke).(SolidColorBrush.Color)\" To=\"#FF003366\"/>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"circle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.7\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                        <VisualStateGroup x:Name=\"FocusStates\">\r\n                                            <VisualState x:Name=\"Focused\">\r\n                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Visibility\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                            <DiscreteObjectKeyFrame.Value>\r\n                                                                <Visibility>Visible</Visibility>\r\n                                                            </DiscreteObjectKeyFrame.Value>\r\n                                                        </DiscreteObjectKeyFrame>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Unfocused\"/>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Border Padding=\"{TemplateBinding Padding}\">\r\n                                        <Grid Background=\"Transparent\">\r\n                                            <Grid.RowDefinitions>\r\n                                                <RowDefinition Height=\"19\"/>\r\n                                                <RowDefinition Height=\"*\"/>\r\n                                            </Grid.RowDefinitions>\r\n                                            <Grid HorizontalAlignment=\"Center\" VerticalAlignment=\"Top\">\r\n                                                <Grid.RenderTransform>\r\n                                                    <TransformGroup>\r\n                                                        <TransformGroup.Children>\r\n                                                            <TransformCollection>\r\n                                                                <RotateTransform Angle=\"-90\" CenterX=\"9.5\" CenterY=\"9.5\"/>\r\n                                                            </TransformCollection>\r\n                                                        </TransformGroup.Children>\r\n                                                    </TransformGroup>\r\n                                                </Grid.RenderTransform>\r\n                                                <Ellipse Height=\"19\" HorizontalAlignment=\"Center\" x:Name=\"circle\" VerticalAlignment=\"Center\" Width=\"19\" Fill=\"{StaticResource MouseOverBrush}\" Stroke=\"{StaticResource NormalBorderBrush}\"/>\r\n                                                <Path HorizontalAlignment=\"Center\" x:Name=\"arrow\" VerticalAlignment=\"Center\" Stroke=\"#666\" StrokeThickness=\"2\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\"/>\r\n                                            </Grid>\r\n                                            <ContentPresenter HorizontalAlignment=\"Center\" Margin=\"0,4,0,0\" x:Name=\"header\" VerticalAlignment=\"Top\" Grid.Row=\"1\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                                        </Grid>\r\n                                    </Border>\r\n                                    <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HighlightBrush}\" BorderThickness=\"1\" CornerRadius=\"3\"/>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" To=\"1\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"ExpansionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Collapsed\"/>\r\n                                <VisualState x:Name=\"Expanded\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"ExpandDirectionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"ExpandDown\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd1\" Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static GridLength.Auto}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static GridLength.Auto}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ExpandUp\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"Template\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ExpanderUpHeaderTemplate}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static GridLength.Auto}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static GridLength.Auto}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ExpandLeft\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"Template\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ExpanderLeftHeaderTemplate}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static GridLength.Auto}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static GridLength.Auto}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ExpandRight\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"Template\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ExpanderRightHeaderTemplate}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"1\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static GridLength.Auto}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd1\" Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static GridLength.Auto}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"Background\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" Padding=\"{TemplateBinding Padding}\">\r\n                            <Grid>\r\n                                <Grid.RowDefinitions>\r\n                                    <RowDefinition Height=\"Auto\" x:Name=\"rd0\"/>\r\n                                    <RowDefinition Height=\"*\" x:Name=\"rd1\"/>\r\n                                </Grid.RowDefinitions>\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\" x:Name=\"cd0\"/>\r\n                                    <ColumnDefinition Width=\"*\" x:Name=\"cd1\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <ToggleButton FontFamily=\"{TemplateBinding FontFamily}\" FontSize=\"{TemplateBinding FontSize}\" FontStretch=\"{TemplateBinding FontStretch}\" FontStyle=\"{TemplateBinding FontStyle}\" FontWeight=\"{TemplateBinding FontWeight}\" Foreground=\"{TemplateBinding Foreground}\" Template=\"{StaticResource ExpanderDownHeaderTemplate}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"1\" MinHeight=\"0\" MinWidth=\"0\" x:Name=\"ExpanderButton\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Grid.Column=\"0\" Grid.Row=\"0\" Content=\"{TemplateBinding Header}\" ContentTemplate=\"{TemplateBinding HeaderTemplate}\" BorderBrush=\"{StaticResource NormalBorderBrush}\" IsChecked=\"{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" Grid.ColumnSpan=\"2\">\r\n                                    <ToggleButton.Background>\r\n                                        <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n                                    </ToggleButton.Background>\r\n                                </ToggleButton>\r\n                                \r\n                                <ContentPresenter \r\n                                    HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" \r\n                                    Margin=\"1\" \r\n                                    MinHeight=\"0\" MinWidth=\"0\" x:Name=\"ExpandSite\" \r\n                                    VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" \r\n                                    Visibility=\"Collapsed\" Grid.Column=\"0\" Grid.Row=\"1\" Grid.ColumnSpan=\"2\"\r\n                                    />\r\n                                \r\n                                <!--\r\n                                Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                                \r\n                                    FontFamily=\"{TemplateBinding FontFamily}\" \r\n                                    FontSize=\"{TemplateBinding FontSize}\" \r\n                                    FontStretch=\"{TemplateBinding FontStretch}\" \r\n                                    FontStyle=\"{TemplateBinding FontStyle}\" \r\n                                    FontWeight=\"{TemplateBinding FontWeight}\" \r\n                                    Foreground=\"{TemplateBinding Foreground}\" \r\n                                -->\r\n                            </Grid>\r\n                        </Border>\r\n                        <Border x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"#A5FFFFFF\" CornerRadius=\"3\"/>\r\n                        <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HighlightBrush}\" BorderThickness=\"1\" CornerRadius=\"3\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsExpanded\" Value=\"True\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"ExpandSite\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- ProgressBar-->\r\n    <Style TargetType=\"ProgressBar\">\r\n        <Setter Property=\"Foreground\">\r\n            <Setter.Value>\r\n                <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Background\" Value=\"#FFD8D7D2\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"Maximum\" Value=\"100\"/>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ProgressBar\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Determinate\"/>\r\n                                <VisualState x:Name=\"Indeterminate\">\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"PART_Track\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\"/>\r\n                        <Grid x:Name=\"ProgressBarRootGrid\">\r\n                            <Rectangle Margin=\"{TemplateBinding BorderThickness}\" x:Name=\"ProgressBarRootGradient\" Canvas.ZIndex=\"1\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\" RadiusX=\"1.5\" RadiusY=\"1.5\">\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                        <GradientStop Color=\"#D8FFFFFF\" Offset=\"0\"/>\r\n                                        <GradientStop Color=\"#7FFFFFFF\" Offset=\"0.316\"/>\r\n                                        <GradientStop Color=\"#00FFFFFF\" Offset=\"0.444\"/>\r\n                                        <GradientStop Color=\"#33FFFFFF\" Offset=\"1\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                            <Grid x:Name=\"IndeterminateRoot\" Visibility=\"Collapsed\">\r\n                                <Rectangle Margin=\"{TemplateBinding BorderThickness}\" x:Name=\"IndeterminateSolidFill\" Opacity=\"1\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"{TemplateBinding Foreground}\" StrokeThickness=\"0\" RadiusX=\"2\" RadiusY=\"2\">\r\n                                    <Rectangle.Stroke>\r\n                                        <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n                                    </Rectangle.Stroke>\r\n                                </Rectangle>\r\n                                <Rectangle Margin=\"{TemplateBinding BorderThickness}\" x:Name=\"IndeterminateGradientFill\" Opacity=\"0.7\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\">\r\n                                    <Rectangle.Fill>\r\n                                        <LinearGradientBrush EndPoint=\"0,1\" StartPoint=\"20,1\" MappingMode=\"Absolute\" SpreadMethod=\"Repeat\">\r\n                                            <LinearGradientBrush.Transform>\r\n                                                <TransformGroup>\r\n                                                    <TranslateTransform X=\"0\"/>\r\n                                                    <SkewTransform AngleX=\"-30\"/>\r\n                                                </TransformGroup>\r\n                                            </LinearGradientBrush.Transform>\r\n                                            <GradientStop Color=\"#FF785F06\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#00FFBA00\" Offset=\".25\"/>\r\n                                            <GradientStop Color=\"{StaticResource AlternateColor}\" Offset=\"0.85\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Rectangle.Fill>\r\n                                </Rectangle>\r\n                            </Grid>\r\n                            <Grid Margin=\"1\" x:Name=\"DeterminateRoot\">\r\n                                <Rectangle HorizontalAlignment=\"Left\" Margin=\"{TemplateBinding BorderThickness}\" x:Name=\"PART_Indicator\" Fill=\"{TemplateBinding Foreground}\" StrokeThickness=\"0.5\" RadiusX=\"1.5\" RadiusY=\"1.5\"/>\r\n                            </Grid>\r\n                        </Grid>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsIndeterminate\" Value=\"True\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard>\r\n                                    <Storyboard RepeatBehavior=\"Forever\">\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00\" Storyboard.TargetName=\"IndeterminateRoot\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00\" Storyboard.TargetName=\"DeterminateRoot\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"IndeterminateGradientFill\" Storyboard.TargetProperty=\"(Shape.Fill).(LinearGradientBrush.Transform).(TransformGroup.Children)[0].X\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:.5\" Value=\"20\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </BeginStoryboard>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- CheckBox -->\r\n    <Style TargetType=\"CheckBox\">\r\n        <Setter Property=\"Background\">\r\n            <Setter.Value>\r\n                <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Padding\" Value=\"4,1,0,0\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"CheckBox\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundOverlay\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddleBackground\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#7FFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#CCFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F2FFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundOverlay\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddleBackground\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#6BFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#C6FFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#EAFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F4FFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"grid\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\".55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\"/>\r\n                                <VisualState x:Name=\"Indeterminate\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"IndeterminateIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ContentFocusVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"16\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" x:Name=\"grid\">\r\n                            <Rectangle Height=\"14\" Margin=\"1\" x:Name=\"Background\" Width=\"14\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" RadiusX=\"1\" RadiusY=\"1\" Fill=\"{x:Null}\"/>\r\n                            <Rectangle Height=\"14\" Margin=\"1\" x:Name=\"BackgroundOverlay\" Width=\"14\" Opacity=\"0\" Fill=\"{StaticResource NormalBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                            <Rectangle Height=\"10\" x:Name=\"BoxMiddleBackground\" Width=\"10\" Fill=\"{TemplateBinding Background}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                            <Rectangle Height=\"10\" x:Name=\"BoxMiddle\" Width=\"10\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Stroke=\"{x:Null}\">\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush EndPoint=\"0.64,0.88\" StartPoint=\"0.62,0.15\">\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.013\"/>\r\n                                        <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                        <GradientStop Color=\"#EAFFFFFF\" Offset=\"0.603\"/>\r\n                                        <GradientStop Color=\"#D8FFFFFF\" Offset=\"1\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                            <Rectangle Height=\"10\" x:Name=\"BoxMiddleLine\" Width=\"10\" Opacity=\".2\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                            <Path Height=\"10\" Margin=\"1,1,0,1.5\" x:Name=\"CheckIcon\" Width=\"10.5\" Opacity=\"0\" Fill=\"#FF333333\" Stretch=\"Fill\" Data=\"M102.03442,598.79645 L105.22962,597.78918 L106.78825,600.42358 C106.78825,600.42358 108.51028,595.74304 110.21724,593.60419 C112.00967,591.35822 114.89314,591.42316 114.89314,591.42316 C114.89314,591.42316 112.67844,593.42645 111.93174,594.44464 C110.7449,596.06293 107.15683,604.13837 107.15683,604.13837 z\"/>\r\n                            <Rectangle Height=\"2\" x:Name=\"IndeterminateIcon\" Width=\"6\" Opacity=\"0\" Fill=\"#FF333333\"/>\r\n                            <Rectangle Height=\"14\" x:Name=\"DisabledVisualElement\" Width=\"14\" Opacity=\"0\" Fill=\"#FFFFFFFF\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                            <Rectangle Height=\"16\" x:Name=\"ContentFocusVisualElement\" Width=\"16\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                        </Grid>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"contentPresenter\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Grid.Column=\"1\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- RadioButton -->\r\n    <Style TargetType=\"RadioButton\">\r\n        <Setter Property=\"Background\">\r\n            <Setter.Value>\r\n                <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Padding\" Value=\"4,1,0,0\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"RadioButton\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundOverlay\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddleBackground\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#7FFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#CCFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F2FFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundOverlay\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddleBackground\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#6BFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#C6FFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#EAFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F4FFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"grid\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\".55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\"/>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ContentFocusVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"16\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" x:Name=\"grid\">\r\n                            <Ellipse Height=\"14\" Margin=\"1\" x:Name=\"Background\" Width=\"14\" Fill=\"#FFFFFFFF\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\"/>\r\n                            <Ellipse Height=\"14\" Margin=\"1\" x:Name=\"BackgroundOverlay\" Width=\"14\" Opacity=\"0\" Fill=\"{StaticResource NormalBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\"/>\r\n                            <Ellipse Height=\"10\" x:Name=\"BoxMiddleBackground\" Width=\"10\" Fill=\"{TemplateBinding Background}\" Stroke=\"#00000000\" StrokeThickness=\"1\"/>\r\n                            <Ellipse Height=\"10\" x:Name=\"BoxMiddle\" Width=\"10\" StrokeThickness=\"1\" Stroke=\"{x:Null}\">\r\n                                <Ellipse.Fill>\r\n                                    <LinearGradientBrush EndPoint=\"0.64,0.88\" StartPoint=\"0.62,0.15\">\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.013\"/>\r\n                                        <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                        <GradientStop Color=\"#EAFFFFFF\" Offset=\"0.603\"/>\r\n                                        <GradientStop Color=\"#D8FFFFFF\" Offset=\"1\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Ellipse.Fill>\r\n                            </Ellipse>\r\n                            <Ellipse Height=\"10\" x:Name=\"BoxMiddleLine\" Width=\"10\" Opacity=\".2\" Stroke=\"#FF333333\" StrokeThickness=\"1\"/>\r\n                            <Ellipse Height=\"4\" x:Name=\"CheckIcon\" Width=\"4\" Opacity=\"0\" Fill=\"#FF333333\"/>\r\n                            <Ellipse Height=\"14\" x:Name=\"DisabledVisualElement\" Width=\"14\" Opacity=\"0\" Fill=\"#FFFFFFFF\"/>\r\n                            <Ellipse Height=\"16\" x:Name=\"ContentFocusVisualElement\" Width=\"16\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\"/>\r\n                        </Grid>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"contentPresenter\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Grid.Column=\"1\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- Thumb -->\r\n    <Style TargetType=\"Thumb\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Thumb\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"grid\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.7\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\".55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"Background\" Background=\"White\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\">\r\n                            <Grid Margin=\"1\" Background=\"{TemplateBinding Background}\" x:Name=\"grid\">\r\n                                <Border x:Name=\"BackgroundAnimation\" Background=\"{StaticResource NormalBrush}\"/>\r\n                                <Rectangle x:Name=\"BackgroundGradient\" Fill=\"{StaticResource MouseOverBrush}\" Opacity=\"0\"/>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Rectangle x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"false\" Opacity=\"0\" Fill=\"#FFFFFFFF\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                        <Rectangle Margin=\"1\" x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- Slider -->\r\n    <Style TargetType=\"Slider\">\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"Maximum\" Value=\"10\"/>\r\n        <Setter Property=\"Minimum\" Value=\"0\"/>\r\n        <Setter Property=\"Value\" Value=\"0\"/>\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"#FFA3AEB9\" Offset=\"0\"/>\r\n                    <GradientStop Color=\"#FF8399A9\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF718597\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF617584\" Offset=\"1\"/>\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Slider\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <Grid.Resources>\r\n                            <ControlTemplate x:Key=\"RepeatButtonTemplate\">\r\n                                <Grid x:Name=\"Root\" Opacity=\"0\" Background=\"Transparent\"/>\r\n                            </ControlTemplate>\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"HorizontalTrackRectangleDisabledOverlay\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ThumbDisabledOverlay\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"VerticalTrackRectangleDisabledOverlay\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid x:Name=\"HorizontalTemplate\" Background=\"{TemplateBinding Background}\">\r\n\r\n                            <Rectangle Height=\"3\" Margin=\"5,0,5,0\" x:Name=\"TrackRectangle\" Grid.Column=\"0\" Grid.ColumnSpan=\"3\" Fill=\"#FFFFFFFF\" Stroke=\"{StaticResource NormalBorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                            <Rectangle Height=\"3\" Margin=\"5,0,5,0\" x:Name=\"HorizontalTrackRectangleDisabledOverlay\" Opacity=\".55\" Visibility=\"Collapsed\" Grid.Column=\"0\" Grid.ColumnSpan=\"3\" Fill=\"White\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n\r\n\r\n                            <Track x:Name=\"PART_Track\">\r\n                                <Track.Thumb>\r\n                                    <Thumb Height=\"18\" x:Name=\"HorizontalThumb\" Width=\"11\" IsTabStop=\"True\" />\r\n                                </Track.Thumb>\r\n                                <Track.IncreaseRepeatButton>\r\n                                    <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Command=\"Slider.IncreaseLarge\" />\r\n                                </Track.IncreaseRepeatButton>\r\n                                <Track.DecreaseRepeatButton>\r\n                                    <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Command=\"Slider.DecreaseLarge\" />\r\n                                </Track.DecreaseRepeatButton>\r\n                            </Track>\r\n\r\n                            \r\n                            \r\n                            <!--<Rectangle x:Name=\"ThumbDisabledOverlay\" Width=\"11\" Opacity=\".55\" Visibility=\"Collapsed\" Grid.Column=\"1\" Fill=\"White\" RadiusX=\"2\" RadiusY=\"2\"/>-->\r\n                        </Grid>\r\n                        <Grid x:Name=\"VerticalTemplate\" Visibility=\"Collapsed\" Background=\"{TemplateBinding Background}\">\r\n                            \r\n                            <Rectangle Margin=\"0,5,0,5\" Width=\"3\" Fill=\"#FFFFFFFF\" Stroke=\"{StaticResource NormalBorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                            <Rectangle Margin=\"0,5,0,5\" x:Name=\"VerticalTrackRectangleDisabledOverlay\" Width=\"3\" Opacity=\".55\" Visibility=\"Collapsed\" Fill=\"White\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                            \r\n                            <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" x:Name=\"VerticalTrackLargeChangeDecreaseRepeatButton\" Grid.Row=\"2\"/>\r\n                            <Thumb IsTabStop=\"True\" Height=\"11\" x:Name=\"VerticalThumb\" Width=\"18\" Grid.Row=\"1\" />\r\n                            <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" x:Name=\"VerticalTrackLargeChangeIncreaseRepeatButton\" Grid.Row=\"0\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- TabControl -->\r\n    <Style TargetType=\"TabControl\">\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"Background\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                    <GradientStop Color=\"#FFFEFEFE\" Offset=\"1\"/>\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"Padding\" Value=\"5\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TabControl\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualTop\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualBottom\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualLeft\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualRight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid x:Name=\"TemplateTop\" Visibility=\"Visible\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"*\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <TabPanel Margin=\"2,2,2,-1\" x:Name=\"TabPanelTop\" Canvas.ZIndex=\"1\" IsItemsHost=\"True\"/>\r\n                            <Border MinHeight=\"10\" MinWidth=\"10\" Grid.Row=\"1\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"0,0,3,3\">\r\n                                <ContentPresenter Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"PART_SelectedContentHost\" ContentSource=\"SelectedContent\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"/>\r\n                            </Border>\r\n                            <Border x:Name=\"DisabledVisualTop\" IsHitTestVisible=\"False\" Opacity=\"0\" Grid.Row=\"1\" Grid.RowSpan=\"2\" Canvas.ZIndex=\"1\" Background=\"#8CFFFFFF\" CornerRadius=\"0,0,3,3\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateBottom\" Visibility=\"Collapsed\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"*\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <TabPanel Margin=\"2,-1,2,2\" x:Name=\"TabPanelBottom\" Grid.Row=\"1\" Canvas.ZIndex=\"1\"/>\r\n                            <Border MinHeight=\"10\" MinWidth=\"10\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3,3,0,0\">\r\n                                <ContentPresenter Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"ContentBottom\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"/>\r\n                            </Border>\r\n                            <Border x:Name=\"DisabledVisualBottom\" IsHitTestVisible=\"False\" Opacity=\"0\" Canvas.ZIndex=\"1\" Background=\"#8CFFFFFF\" CornerRadius=\"3,3,0,0\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateLeft\" Visibility=\"Collapsed\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <TabPanel Margin=\"2,2,-1,2\" x:Name=\"TabPanelLeft\" Canvas.ZIndex=\"1\"/>\r\n                            <Border MinHeight=\"10\" MinWidth=\"10\" Grid.Column=\"1\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"0,3,3,0\">\r\n                                <ContentPresenter Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"ContentLeft\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"/>\r\n                            </Border>\r\n                            <Border x:Name=\"DisabledVisualLeft\" IsHitTestVisible=\"False\" Opacity=\"0\" Grid.Column=\"1\" Canvas.ZIndex=\"1\" Background=\"#8CFFFFFF\" CornerRadius=\"0,3,3,0\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateRight\" Visibility=\"Collapsed\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <TabPanel Margin=\"-1,2,2,2\" x:Name=\"TabPanelRight\" Grid.Column=\"1\" Canvas.ZIndex=\"1\"/>\r\n                            <Border MinHeight=\"10\" MinWidth=\"10\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3,0,0,3\">\r\n                                <ContentPresenter Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"ContentRight\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"/>\r\n                            </Border>\r\n                            <Border Margin=\"0\" x:Name=\"DisabledVisualRight\" IsHitTestVisible=\"False\" Opacity=\"0\" Canvas.ZIndex=\"1\" Background=\"#8CFFFFFF\" CornerRadius=\"3,0,0,3\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- TabItem -->\r\n\r\n    <Style TargetType=\"TabItem\">\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"Background\">\r\n            <Setter.Value>\r\n                <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"Padding\" Value=\"6,2,6,2\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"MinWidth\" Value=\"5\"/>\r\n        <Setter Property=\"MinHeight\" Value=\"5\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TabItem\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\"/>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"MouseOver\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"TopUnSelectedMouseOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BottomUnSelectedMouseOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"LeftUnSelectedMouseOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"RightUnSelectedMouseOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.6\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"rectangle1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.6\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"rectangle2\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.6\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"rectangle3\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.6\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualTopSelected\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualTopUnSelected\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualBottomSelected\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualBottomUnSelected\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualLeftSelected\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualLeftUnSelected\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualRightSelected\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualRightUnSelected\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualState x:Name=\"Unselected\"/>\r\n                                <VisualState x:Name=\"Selected\"/>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualTop\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualBottom\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualLeft\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualRight\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Collapsed}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid x:Name=\"TemplateTopSelected\" Visibility=\"Visible\" Canvas.ZIndex=\"1\">\r\n                            <Border Margin=\"-2,-2,-2,0\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1,1,1,0\" CornerRadius=\"3,3,0,0\">\r\n                                <Border BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1\" CornerRadius=\"1,1,0,0\">\r\n                                    <Border.Background>\r\n                                        <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                            <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.625\"/>\r\n                                            <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Border.Background>\r\n                                    <Grid>\r\n                                        <Rectangle Margin=\"0,0,0,-2\" Fill=\"{StaticResource SelectedBackgroundBrush}\" x:Name=\"rectangle\"/>\r\n                                        <ContentPresenter HorizontalAlignment=\"Center\" Margin=\"12,2,12,2\" x:Name=\"ContentSite\" VerticalAlignment=\"Center\" RecognizesAccessKey=\"True\" ContentSource=\"Header\"/>\r\n                                        <!--<ContentControl FontSize=\"{TemplateBinding FontSize}\" Foreground=\"{TemplateBinding Foreground}\" IsTabStop=\"False\" Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"HeaderTopSelected\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"/>-->\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border Margin=\"-2,-2,-2,0\" x:Name=\"FocusVisualTop\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HighlightBrush}\" BorderThickness=\"1,1,1,0\" CornerRadius=\"3,3,0,0\"/>\r\n                            <Border Margin=\"-2,-2,-2,0\" x:Name=\"DisabledVisualTopSelected\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"#8CFFFFFF\" CornerRadius=\"3,3,0,0\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateTopUnselected\" Visibility=\"Collapsed\">\r\n                            <Border x:Name=\"BorderTop\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1\" CornerRadius=\"3,3,0,0\">\r\n                                <Border x:Name=\"GradientTop\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1\" CornerRadius=\"1,1,0,0\">\r\n                                    <Border.Background>\r\n                                        <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                            <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.625\"/>\r\n                                            <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Border.Background>\r\n                                    <Grid>\r\n                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\" Foreground=\"{TemplateBinding Foreground}\" IsTabStop=\"False\" Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"HeaderTopUnselected\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"/>\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border x:Name=\"TopUnSelectedMouseOver\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"{StaticResource MouseOverBrush}\" CornerRadius=\"3,3,0,0\" Margin=\"1,1,1,1\" />\r\n                            <Border x:Name=\"DisabledVisualTopUnSelected\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"#8CFFFFFF\" CornerRadius=\"3,3,0,0\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateBottomSelected\" Visibility=\"Collapsed\" Canvas.ZIndex=\"1\">\r\n                            <Border Margin=\"-2,0,-2,-2\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1,0,1,1\" CornerRadius=\"0,0,3,3\">\r\n                                <Border BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1\" CornerRadius=\"0,0,1,1\">\r\n                                    <Border.Background>\r\n                                        <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                            <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.625\"/>\r\n                                            <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Border.Background>\r\n                                    <Grid>\r\n                                        <Rectangle Margin=\"0,-2,0,0\" Fill=\"{StaticResource SelectedBackgroundBrush}\" x:Name=\"rectangle1\"/>\r\n                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\" Foreground=\"{TemplateBinding Foreground}\" IsTabStop=\"False\" Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"HeaderBottomSelected\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"/>\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border Margin=\"-2,0,-2,-2\" x:Name=\"FocusVisualBottom\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HighlightBrush}\" BorderThickness=\"1,0,1,1\" CornerRadius=\"0,0,3,3\"/>\r\n                            <Border Margin=\"-2,0,-2,-2\" x:Name=\"DisabledVisualBottomSelected\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"#8CFFFFFF\" CornerRadius=\"0,0,3,3\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateBottomUnselected\" Visibility=\"Collapsed\">\r\n                            <Border x:Name=\"BorderBottom\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1\" CornerRadius=\"0,0,3,3\">\r\n                                <Border x:Name=\"GradientBottom\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1\" CornerRadius=\"0,0,1,1\">\r\n                                    <Border.Background>\r\n                                        <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                            <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.625\"/>\r\n                                            <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Border.Background>\r\n                                    <Grid>\r\n                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\" Foreground=\"{TemplateBinding Foreground}\" IsTabStop=\"False\" Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"HeaderBottomUnselected\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"/>\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border x:Name=\"BottomUnSelectedMouseOver\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"{StaticResource MouseOverBrush}\" CornerRadius=\"3,3,0,0\" Margin=\"1,1,0,0\" />\r\n                            <Border x:Name=\"DisabledVisualBottomUnSelected\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"#8CFFFFFF\" CornerRadius=\"0,0,3,3\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateLeftSelected\" Visibility=\"Collapsed\" Canvas.ZIndex=\"1\">\r\n                            <Border Margin=\"-2,-2,0,-2\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1,1,0,1\" CornerRadius=\"3,0,0,3\">\r\n                                <Border BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1\" CornerRadius=\"1,0,0,1\">\r\n                                    <Border.Background>\r\n                                        <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                            <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.625\"/>\r\n                                            <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Border.Background>\r\n                                    <Grid>\r\n                                        <Rectangle Margin=\"0,0,-2,0\" Fill=\"{StaticResource SelectedBackgroundBrush}\" x:Name=\"rectangle2\"/>\r\n                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\" Foreground=\"{TemplateBinding Foreground}\" IsTabStop=\"False\" Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"HeaderLeftSelected\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"/>\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border Margin=\"-2,-2,0,-2\" x:Name=\"FocusVisualLeft\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HighlightBrush}\" BorderThickness=\"1,1,0,1\" CornerRadius=\"3,0,0,3\"/>\r\n                            <Border Margin=\"-2,-2,0,-2\" x:Name=\"DisabledVisualLeftSelected\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"#8CFFFFFF\" CornerRadius=\"3,0,0,3\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateLeftUnselected\" Visibility=\"Collapsed\">\r\n                            <Border x:Name=\"BorderLeft\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3,0,0,3\">\r\n                                <Border x:Name=\"GradientLeft\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1\" CornerRadius=\"1,0,0,1\">\r\n                                    <Border.Background>\r\n                                        <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                            <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.625\"/>\r\n                                            <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Border.Background>\r\n                                    <Grid>\r\n                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\" Foreground=\"{TemplateBinding Foreground}\" IsTabStop=\"False\" Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"HeaderLeftUnselected\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"/>\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border x:Name=\"LeftUnSelectedMouseOver\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"{StaticResource MouseOverBrush}\" CornerRadius=\"3,3,0,0\" Margin=\"1,1,0,0\" />\r\n                            <Border x:Name=\"DisabledVisualLeftUnSelected\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"#8CFFFFFF\" CornerRadius=\"3,0,0,3\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateRightSelected\" Visibility=\"Collapsed\" Canvas.ZIndex=\"1\">\r\n                            <Border Margin=\"0,-2,-2,-2\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"0,1,1,1\" CornerRadius=\"0,3,3,0\">\r\n                                <Border BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1\" CornerRadius=\"0,1,1,0\">\r\n                                    <Border.Background>\r\n                                        <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                            <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.625\"/>\r\n                                            <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Border.Background>\r\n                                    <Grid>\r\n                                        <Rectangle Margin=\"-2,0,0,0\" Fill=\"{StaticResource SelectedBackgroundBrush}\" x:Name=\"rectangle3\"/>\r\n                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\" Foreground=\"{TemplateBinding Foreground}\" IsTabStop=\"False\" Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"HeaderRightSelected\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"/>\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border Margin=\"0,-2,-2,-2\" x:Name=\"FocusVisualRight\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HighlightBrush}\" BorderThickness=\"0,1,1,1\" CornerRadius=\"0,3,3,0\"/>\r\n                            <Border Margin=\"0,-2,-2,-2\" x:Name=\"DisabledVisualRightSelected\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"#8CFFFFFF\" CornerRadius=\"0,3,3,0\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateRightUnselected\" Visibility=\"Collapsed\">\r\n                            <Border x:Name=\"BorderRight\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1\" CornerRadius=\"0,3,3,0\">\r\n                                <Border x:Name=\"GradientRight\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1\" CornerRadius=\"0,1,1,0\">\r\n                                    <Border.Background>\r\n                                        <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                            <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.625\"/>\r\n                                            <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Border.Background>\r\n                                    <Grid>\r\n                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\" Foreground=\"{TemplateBinding Foreground}\" IsTabStop=\"False\" Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"HeaderRightUnselected\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"/>\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border x:Name=\"RightUnSelectedMouseOver\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"{StaticResource MouseOverBrush}\" CornerRadius=\"3,3,0,0\" Margin=\"1,1,0,0\" />\r\n                            <Border x:Name=\"DisabledVisualRightUnSelected\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"#8CFFFFFF\" CornerRadius=\"0,3,3,0\"/>\r\n                        </Grid>\r\n                        <Border Margin=\"-1\" x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HighlightBrush}\" BorderThickness=\"1\" CornerRadius=\"3,3,0,0\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- ToggleButton -->\r\n\r\n    <Style TargetType=\"ToggleButton\">\r\n        <Setter Property=\"Background\">\r\n            <Setter.Value>\r\n                <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\"/>\r\n        <Setter Property=\"Padding\" Value=\"3\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ToggleButton\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Border.Background).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"{StaticResource MainColor}\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundAnimation\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.7\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"grid\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\"/>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"Background\" Background=\"White\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\">\r\n                            <Grid Margin=\"1\" Background=\"{TemplateBinding Background}\" Opacity=\"0.5\" x:Name=\"grid\">\r\n                                <Border x:Name=\"BackgroundAnimation\" Background=\"{StaticResource NormalBrush}\"/>\r\n                                <Rectangle x:Name=\"BackgroundGradient\" Fill=\"{StaticResource MouseOverBrush}\" Opacity=\"0\"/>\r\n                            </Grid>\r\n                        </Border>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"contentPresenter\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                        <Rectangle x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"false\" Opacity=\"0\" Fill=\"#FFFFFFFF\" RadiusX=\"3\" RadiusY=\"3\"/>\r\n                        <Rectangle Margin=\"1\" x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- TreeViewItem -->\r\n\r\n    <Style TargetType=\"TreeViewItem\">\r\n\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TreeViewItem\">\r\n                    <Grid Background=\"{TemplateBinding Background}\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Header\" Storyboard.TargetProperty=\"Foreground\" Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <SolidColorBrush Color=\"#FF999999\" />\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualState x:Name=\"Unselected\" />\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"select\" Storyboard.TargetProperty=\"Opacity\" Duration=\"0\" To=\".75\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"SelectedInactive\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"inactive\" Storyboard.TargetProperty=\"Opacity\" Duration=\"0\" To=\".2\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"HasItemsStates\">\r\n                                <VisualState x:Name=\"HasItems\" />\r\n                                <VisualState x:Name=\"NoItems\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"Visibility\" Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Collapsed}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"ExpansionStates\">\r\n                                <VisualState x:Name=\"Collapsed\" />\r\n                                <VisualState x:Name=\"Expanded\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"ItemsHost\" Storyboard.TargetProperty=\"Visibility\" Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\" />\r\n                            <RowDefinition Height=\"*\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"15\" />\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"*\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <ToggleButton x:Name=\"Expander\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" BorderBrush=\"{StaticResource NormalBorderBrush}\" IsChecked=\"{Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}\">\r\n                            <ToggleButton.Background>\r\n                                <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n                            </ToggleButton.Background>\r\n                            <ToggleButton.Template>\r\n                                <ControlTemplate TargetType=\"ToggleButton\">\r\n                                    <Grid x:Name=\"Root\" Background=\"Transparent\">\r\n                                        <VisualStateManager.VisualStateGroups>\r\n                                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                                <VisualState x:Name=\"Normal\" />\r\n                                                <VisualState x:Name=\"MouseOver\">\r\n                                                    <Storyboard>\r\n                                                        <ColorAnimation Storyboard.TargetName=\"UncheckedBrush\" Storyboard.TargetProperty=\"Color\" To=\"{StaticResource MainColor}\" Duration=\"0\" />\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                                <VisualState x:Name=\"Disabled\">\r\n                                                    <Storyboard>\r\n                                                        <DoubleAnimation Storyboard.TargetName=\"Root\" Storyboard.TargetProperty=\"Opacity\" To=\".7\" Duration=\"0\" />\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                            </VisualStateGroup>\r\n                                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                                <VisualState x:Name=\"Unchecked\" />\r\n                                                <VisualState x:Name=\"Checked\">\r\n                                                    <Storyboard>\r\n                                                        <DoubleAnimation Storyboard.TargetName=\"UncheckedVisual\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" Duration=\"0\" />\r\n                                                        <DoubleAnimation Storyboard.TargetName=\"CheckedVisual\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" Duration=\"0\" />\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                            </VisualStateGroup>\r\n                                        </VisualStateManager.VisualStateGroups>\r\n                                        <Grid HorizontalAlignment=\"Right\" Margin=\"2 2 5 2\">\r\n                                            <Path x:Name=\"UncheckedVisual\" Width=\"6\" Height=\"9\" Fill=\"#FFFFFFFF\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Right\" Data=\"M 0,0 L 0,9 L 5,4.5 Z\" StrokeThickness=\"1\" StrokeLineJoin=\"Miter\">\r\n                                                <Path.Stroke>\r\n                                                    <SolidColorBrush x:Name=\"UncheckedBrush\" Color=\"#FF989898\" />\r\n                                                </Path.Stroke>\r\n                                            </Path>\r\n                                            <Path x:Name=\"CheckedVisual\" Opacity=\"0\" Width=\"6\" Height=\"6\" Fill=\"#FF262626\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Data=\"M 6,0 L 6,6 L 0,6 Z\" StrokeLineJoin=\"Miter\" />\r\n                                        </Grid>\r\n                                    </Grid>\r\n                                </ControlTemplate>\r\n                            </ToggleButton.Template>\r\n                        </ToggleButton>\r\n                        <Rectangle x:Name=\"select\" Grid.Column=\"1\" Opacity=\"0\" Fill=\"{StaticResource SelectedBackgroundBrush}\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" IsHitTestVisible=\"False\" RadiusX=\"2\" RadiusY=\"2\" />\r\n                        <Rectangle x:Name=\"inactive\" Grid.Column=\"1\" Opacity=\"0\" Fill=\"#FF999999\" Stroke=\"#FF333333\" StrokeThickness=\"1\" IsHitTestVisible=\"False\" RadiusX=\"2\" RadiusY=\"2\" />\r\n                        <Button x:Name=\"PART_Header\" Grid.Column=\"1\" ClickMode=\"Hover\" Content=\"{TemplateBinding Header}\" ContentTemplate=\"{TemplateBinding HeaderTemplate}\" Background=\"{TemplateBinding Background}\" Foreground=\"{TemplateBinding Foreground}\" Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" BorderBrush=\"{StaticResource NormalBorderBrush}\">\r\n                            <Button.Template>\r\n                                <ControlTemplate TargetType=\"Button\">\r\n                                    <Grid Background=\"{TemplateBinding Background}\">\r\n                                        <VisualStateManager.VisualStateGroups>\r\n                                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                                <VisualState x:Name=\"Normal\" />\r\n                                                <VisualState x:Name=\"Pressed\">\r\n                                                    <Storyboard>\r\n                                                        <DoubleAnimation Storyboard.TargetName=\"hover\" Storyboard.TargetProperty=\"Opacity\" Duration=\"0\" To=\".5\" />\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                                <VisualState x:Name=\"Disabled\">\r\n                                                    <Storyboard>\r\n                                                        <DoubleAnimation Storyboard.TargetName=\"content\" Storyboard.TargetProperty=\"Opacity\" Duration=\"0\" To=\".55\" />\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                            </VisualStateGroup>\r\n                                        </VisualStateManager.VisualStateGroups>\r\n                                        <Rectangle x:Name=\"hover\" Opacity=\"0\" Fill=\"{StaticResource SelectedBackgroundBrush}\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" IsHitTestVisible=\"False\" RadiusX=\"2\" RadiusY=\"2\" />\r\n                                        <ContentPresenter x:Name=\"content\" Cursor=\"{TemplateBinding Cursor}\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" HorizontalAlignment=\"Left\" Margin=\"{TemplateBinding Padding}\" />\r\n                                    </Grid>\r\n                                </ControlTemplate>\r\n                            </Button.Template>\r\n                        </Button>\r\n                        <ItemsPresenter x:Name=\"ItemsHost\" Grid.Row=\"1\" Grid.Column=\"1\" Grid.ColumnSpan=\"2\" Visibility=\"Visible\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsExpanded\" Value=\"false\">\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ItemsHost\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"HasItems\" Value=\"false\">\r\n                            <Setter Property=\"Visibility\" Value=\"Hidden\" TargetName=\"Expander\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"TreeView\">\r\n        <Setter Property=\"IsTabStop\" Value=\"True\"/>\r\n        <Setter Property=\"Background\" Value=\"#FFFFFFFF\"/>\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Cursor\" Value=\"Arrow\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"Padding\" Value=\"1\"/>\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"#FFA3AEB9\" Offset=\"0\"/>\r\n                    <GradientStop Color=\"#FF8399A9\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF718597\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF617584\" Offset=\"1\"/>\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TreeView\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <Border x:Name=\"Border\" BorderBrush=\"{StaticResource NormalBorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\">\r\n                            <ScrollViewer Background=\"{TemplateBinding Background}\" BorderBrush=\"Transparent\" BorderThickness=\"0\" Padding=\"{TemplateBinding Padding}\" Margin=\"1\" x:Name=\"ScrollViewer\" HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Auto\" >\r\n                                <ItemsPresenter Margin=\"5\" x:Name=\"TreeItems\"/>\r\n                            </ScrollViewer>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/RainierPurple/Theme.xaml",
    "content": "﻿<!--\r\n// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n-->\r\n\r\n<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n                    xmlns:basic=\"clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit\"\r\n                    xmlns:primitives=\"clr-namespace:Microsoft.Windows.Controls.Primitives;assembly=WPFToolkit\"\r\n                    xmlns:vsm=\"clr-namespace:System.Windows;assembly=WPFToolkit\">\r\n\r\n    <!-- Default Enhanced -->\r\n\r\n    <Color x:Key=\"MainColor\">#FF895F97</Color>\r\n    <Color x:Key=\"AlternateColor\">#FF9C82A9</Color>\r\n    <Color x:Key=\"LightColor\">#FFDCC4E5</Color>\r\n\r\n    <LinearGradientBrush x:Key=\"NormalBorderBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FF896A95\"/>\r\n        <GradientStop Color=\"#FFA392AF\" Offset=\"0.375\"/>\r\n        <GradientStop Color=\"#FF997CAF\" Offset=\"0.384\"/>\r\n        <GradientStop Color=\"#FF725F81\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"NormalBrush\" EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n        <GradientStop Color=\"#FFBD9FD8\" Offset=\"0.15\"/>\r\n        <GradientStop Color=\"#FF9467B1\" Offset=\"0.495\"/>\r\n        <GradientStop Color=\"#FF875CA3\" Offset=\"0.825\"/>\r\n        <GradientStop Color=\"#FF6F418B\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"HighlightBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFAB82CA\"/>\r\n        <GradientStop Color=\"#FF5E3478\" Offset=\"0.531\"/>\r\n        <GradientStop Color=\"#FFAB82CA\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"MouseOverBrush\" EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n        <GradientStop Color=\"#F9B782C4\" Offset=\"0.495\"/>\r\n        <GradientStop Color=\"#FF705A81\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"SelectedBackgroundBrush\" EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n        <GradientStop Color=\"#FFECDBF9\" Offset=\"0\"/>\r\n        <GradientStop Color=\"#FF866E99\" Offset=\"0.305\"/>\r\n        <GradientStop Color=\"#FF806395\" Offset=\"1\"/>\r\n        <GradientStop Color=\"#FFBD97DA\" Offset=\"0.295\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"WindowBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFFFFFFF\"/>\r\n        <GradientStop Color=\"#FFD4B6E8\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <!-- ScrollBar -->\r\n    <Style TargetType=\"ScrollBar\">\r\n        <Setter Property=\"MinWidth\" Value=\"17\"/>\r\n        <Setter Property=\"MinHeight\" Value=\"17\"/>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ScrollBar\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <Grid.Resources>\r\n                            <ControlTemplate x:Key=\"RepeatButtonTemplate\" TargetType=\"RepeatButton\">\r\n                                <Grid x:Name=\"Root\" Background=\"Transparent\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"HorizontalIncrementTemplate\" TargetType=\"RepeatButton\">\r\n                                <Grid x:Name=\"Root\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundAnimation\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#7FFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#CCFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F2FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundAnimation\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#6BFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#C6FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#EAFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F4FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\".7\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Rectangle x:Name=\"Background\" Opacity=\"0\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" Stroke=\"{StaticResource NormalBorderBrush}\">\r\n                                        <Rectangle.Fill>\r\n                                            <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n                                        </Rectangle.Fill>\r\n                                    </Rectangle>\r\n                                    <Rectangle x:Name=\"BackgroundAnimation\" Opacity=\"0\" Fill=\"{StaticResource MouseOverBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                    <Rectangle Margin=\"1\" x:Name=\"BackgroundGradient\" Opacity=\"0\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\">\r\n                                        <Rectangle.Fill>\r\n                                            <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                                <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.013\"/>\r\n                                                <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                                <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.603\"/>\r\n                                                <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Rectangle.Fill>\r\n                                    </Rectangle>\r\n                                    <Rectangle Margin=\"1\" x:Name=\"Highlight\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                                    <Path Height=\"8\" Width=\"4\" Stretch=\"Uniform\" Data=\"F1 M 511.047,352.682L 511.047,342.252L 517.145,347.467L 511.047,352.682 Z \">\r\n                                        <Path.Fill>\r\n                                            <SolidColorBrush Color=\"#FF333333\" x:Name=\"ButtonColor\"/>\r\n                                        </Path.Fill>\r\n                                    </Path>\r\n                                    <Rectangle x:Name=\"DisabledElement\" Opacity=\"0\" Fill=\"#FFFFFFFF\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"HorizontalDecrementTemplate\" TargetType=\"RepeatButton\">\r\n                                <Grid x:Name=\"Root\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundMouseOver\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#7FFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#CCFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F2FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#6BFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#C6FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#EAFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F4FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\".7\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Rectangle x:Name=\"Background\" Opacity=\"0\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\">\r\n                                        <Rectangle.Fill>\r\n                                            <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n                                        </Rectangle.Fill>\r\n                                        <Rectangle.Stroke>\r\n                                            <LinearGradientBrush EndPoint=\".5,1\" StartPoint=\".5,0\">\r\n                                                <GradientStop Color=\"#FF647480\" Offset=\"1\"/>\r\n                                                <GradientStop Color=\"#FFAEB7BF\" Offset=\"0\"/>\r\n                                                <GradientStop Color=\"#FF919EA7\" Offset=\"0.35\"/>\r\n                                                <GradientStop Color=\"#FF7A8A99\" Offset=\"0.35\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Rectangle.Stroke>\r\n                                    </Rectangle>\r\n                                    <Rectangle x:Name=\"BackgroundMouseOver\" Opacity=\"0\" Fill=\"{StaticResource MouseOverBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                    <Rectangle x:Name=\"BackgroundPressed\" Opacity=\"0\" Fill=\"{StaticResource NormalBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                    <Rectangle Margin=\"1\" x:Name=\"BackgroundGradient\" Opacity=\"0\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\">\r\n                                        <Rectangle.Fill>\r\n                                            <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                                <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.013\"/>\r\n                                                <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                                <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.603\"/>\r\n                                                <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Rectangle.Fill>\r\n                                    </Rectangle>\r\n                                    <Rectangle Margin=\"1\" x:Name=\"Highlight\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                                    <Path Height=\"8\" Width=\"4\" Stretch=\"Uniform\" Data=\"F1 M 110.692,342.252L 110.692,352.682L 104.594,347.467L 110.692,342.252 Z \">\r\n                                        <Path.Fill>\r\n                                            <SolidColorBrush Color=\"#FF333333\" x:Name=\"ButtonColor\"/>\r\n                                        </Path.Fill>\r\n                                    </Path>\r\n                                    <Rectangle x:Name=\"DisabledElement\" Opacity=\"0\" Fill=\"#FFFFFFFF\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"VerticalIncrementTemplate\" TargetType=\"RepeatButton\">\r\n                                <Grid x:Name=\"Root\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundMouseOver\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#7FFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#CCFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F2FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#6BFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#C6FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#EAFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F4FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\".7\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Rectangle x:Name=\"Background\" Opacity=\"0\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\">\r\n                                        <Rectangle.Fill>\r\n                                            <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n                                        </Rectangle.Fill>\r\n                                        <Rectangle.Stroke>\r\n                                            <LinearGradientBrush EndPoint=\"1,.5\" StartPoint=\"0,.5\">\r\n                                                <GradientStop Color=\"#FF647480\" Offset=\"1\"/>\r\n                                                <GradientStop Color=\"#FFAEB7BF\" Offset=\"0\"/>\r\n                                                <GradientStop Color=\"#FF919EA7\" Offset=\"0.35\"/>\r\n                                                <GradientStop Color=\"#FF7A8A99\" Offset=\"0.35\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Rectangle.Stroke>\r\n                                    </Rectangle>\r\n                                    <Rectangle x:Name=\"BackgroundMouseOver\" Opacity=\"0\" Fill=\"{StaticResource MouseOverBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                    <Rectangle x:Name=\"BackgroundPressed\" Opacity=\"0\" Fill=\"{StaticResource NormalBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                    <Rectangle Margin=\"1\" x:Name=\"BackgroundGradient\" Opacity=\"0\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\">\r\n                                        <Rectangle.Fill>\r\n                                            <LinearGradientBrush EndPoint=\"1,.7\" StartPoint=\"0,.7\">\r\n                                                <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.013\"/>\r\n                                                <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                                <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.603\"/>\r\n                                                <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Rectangle.Fill>\r\n                                    </Rectangle>\r\n                                    <Rectangle Margin=\"1\" x:Name=\"Highlight\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                                    <Path Height=\"4\" Width=\"8\" Stretch=\"Uniform\" Data=\"F1 M 531.107,321.943L 541.537,321.943L 536.322,328.042L 531.107,321.943 Z \">\r\n                                        <Path.Fill>\r\n                                            <SolidColorBrush Color=\"#FF333333\" x:Name=\"ButtonColor\"/>\r\n                                        </Path.Fill>\r\n                                    </Path>\r\n                                    <Rectangle x:Name=\"DisabledElement\" Opacity=\"0\" Fill=\"#FFFFFFFF\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"VerticalDecrementTemplate\" TargetType=\"RepeatButton\">\r\n                                <Grid x:Name=\"Root\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundMouseOver\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#7FFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#CCFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F2FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#6BFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#C6FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#EAFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F4FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\".7\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Rectangle x:Name=\"Background\" Opacity=\"0\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" Stroke=\"{StaticResource NormalBorderBrush}\">\r\n                                        <Rectangle.Fill>\r\n                                            <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n                                        </Rectangle.Fill>\r\n                                    </Rectangle>\r\n                                    <Rectangle x:Name=\"BackgroundMouseOver\" Opacity=\"0\" Fill=\"{StaticResource MouseOverBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                    <Rectangle x:Name=\"BackgroundPressed\" Opacity=\"0\" Fill=\"{StaticResource NormalBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                    <Rectangle Margin=\"1\" x:Name=\"BackgroundGradient\" Opacity=\"0\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\">\r\n                                        <Rectangle.Fill>\r\n                                            <LinearGradientBrush EndPoint=\"1,.7\" StartPoint=\"0,.7\">\r\n                                                <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.013\"/>\r\n                                                <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                                <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.603\"/>\r\n                                                <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Rectangle.Fill>\r\n                                    </Rectangle>\r\n                                    <Rectangle Margin=\"1\" x:Name=\"Highlight\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                                    <Path Height=\"4\" Width=\"8\" Stretch=\"Uniform\" Data=\"F1 M 541.537,173.589L 531.107,173.589L 536.322,167.49L 541.537,173.589 Z \">\r\n                                        <Path.Fill>\r\n                                            <SolidColorBrush Color=\"#FF333333\" x:Name=\"ButtonColor\"/>\r\n                                        </Path.Fill>\r\n                                    </Path>\r\n                                    <Rectangle x:Name=\"DisabledElement\" Opacity=\"0\" Fill=\"#FFFFFFFF\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"VerticalThumbTemplate\" TargetType=\"Thumb\">\r\n                                <Grid>\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundMouseOver\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#7FFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#CCFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F2FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#6BFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#C6FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#EAFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F4FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ThumbVisual\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"0\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Grid Margin=\"1,0,1,0\" x:Name=\"ThumbVisual\">\r\n                                        <Rectangle x:Name=\"Background\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" Stroke=\"{StaticResource NormalBorderBrush}\">\r\n                                            <Rectangle.Fill>\r\n                                                <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n                                            </Rectangle.Fill>\r\n                                        </Rectangle>\r\n                                        <Rectangle x:Name=\"BackgroundMouseOver\" Opacity=\"0\" Fill=\"{StaticResource MouseOverBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                        <Rectangle x:Name=\"BackgroundPressed\" Opacity=\"0\" Fill=\"{StaticResource NormalBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                        <Rectangle Margin=\"1\" x:Name=\"BackgroundGradient\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\">\r\n                                            <Rectangle.Fill>\r\n                                                <LinearGradientBrush EndPoint=\"1,.7\" StartPoint=\"0,.7\">\r\n                                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                                    <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                                    <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.6\"/>\r\n                                                    <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                                </LinearGradientBrush>\r\n                                            </Rectangle.Fill>\r\n                                        </Rectangle>\r\n                                        <Rectangle Margin=\"1\" x:Name=\"Highlight\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                                    </Grid>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"HorizontalThumbTemplate\" TargetType=\"Thumb\">\r\n                                <Grid>\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundMouseOver\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#7FFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#CCFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F2FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#6BFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#C6FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#EAFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F4FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ThumbVisual\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"0\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Grid Margin=\"0,1,0,1\" x:Name=\"ThumbVisual\">\r\n                                        <Rectangle x:Name=\"Background\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" Stroke=\"{StaticResource NormalBorderBrush}\">\r\n                                            <Rectangle.Fill>\r\n                                                <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n                                            </Rectangle.Fill>\r\n                                        </Rectangle>\r\n                                        <Rectangle x:Name=\"BackgroundMouseOver\" Opacity=\"0\" Fill=\"{StaticResource MouseOverBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                        <Rectangle x:Name=\"BackgroundPressed\" Opacity=\"0\" Fill=\"{StaticResource NormalBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                        <Rectangle Margin=\"1\" x:Name=\"BackgroundGradient\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\">\r\n                                            <Rectangle.Fill>\r\n                                                <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.013\"/>\r\n                                                    <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                                    <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.603\"/>\r\n                                                    <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                                </LinearGradientBrush>\r\n                                            </Rectangle.Fill>\r\n                                        </Rectangle>\r\n                                        <Rectangle Margin=\"1\" x:Name=\"Highlight\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                                    </Grid>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Root\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid x:Name=\"HorizontalRoot\" Visibility=\"Collapsed\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <Rectangle Grid.ColumnSpan=\"5\" Stroke=\"{StaticResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\">\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,0\" StartPoint=\"0.5,1\">\r\n                                        <GradientStop Color=\"#FFF4F6F7\" Offset=\"0\"/>\r\n                                        <GradientStop Color=\"#FFF0F4F7\" Offset=\"0.344\"/>\r\n                                        <GradientStop Color=\"#FFDFE3E6\" Offset=\"1\"/>\r\n                                        <GradientStop Color=\"#FFE9EEF4\" Offset=\"0.527\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                            <Rectangle Grid.ColumnSpan=\"5\" Fill=\"{TemplateBinding Background}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                            <Rectangle Opacity=\".375\" Grid.ColumnSpan=\"5\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\">\r\n                                <Rectangle.Stroke>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                        <GradientStop Color=\"#FFA3AEB9\" Offset=\"0\"/>\r\n                                        <GradientStop Color=\"#FF8399A9\" Offset=\"0.375\"/>\r\n                                        <GradientStop Color=\"#FF718597\" Offset=\"0.375\"/>\r\n                                        <GradientStop Color=\"#FF617584\" Offset=\"1\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Stroke>\r\n                            </Rectangle>\r\n                            <Rectangle Margin=\"1\" Grid.ColumnSpan=\"5\" RadiusX=\"1\" RadiusY=\"1\">\r\n                                <Rectangle.Stroke>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,.125\" StartPoint=\".5,.875\">\r\n                                        <GradientStop Color=\"#33FFFFFF\"/>\r\n                                        <GradientStop Color=\"#99FFFFFF\" Offset=\"1\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Stroke>\r\n                            </Rectangle>\r\n                            <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource HorizontalDecrementTemplate}\" Margin=\"1\" x:Name=\"HorizontalSmallDecrease\" Width=\"16\" Grid.Column=\"0\" Interval=\"50\"/>\r\n\r\n                            <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" x:Name=\"HorizontalLargeDecrease\" Width=\"0\" Grid.Column=\"1\" Interval=\"50\"/>\r\n                            <Thumb Background=\"{TemplateBinding Background}\" Template=\"{StaticResource HorizontalThumbTemplate}\" MinWidth=\"18\" x:Name=\"HorizontalThumb\" Width=\"18\" Grid.Column=\"2\"/>\r\n                            <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" x:Name=\"HorizontalLargeIncrease\" Grid.Column=\"3\" Interval=\"50\"/>\r\n\r\n                            <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource HorizontalIncrementTemplate}\" Margin=\"1\" x:Name=\"HorizontalSmallIncrease\" Width=\"16\" Grid.Column=\"4\" Interval=\"50\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"VerticalRoot\" Visibility=\"Visible\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"*\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <Rectangle Grid.RowSpan=\"3\" Stroke=\"{StaticResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\">\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush EndPoint=\"0,0.5\" StartPoint=\"1,0.5\">\r\n                                        <GradientStop Color=\"#FFF4F6F7\" Offset=\"0\"/>\r\n                                        <GradientStop Color=\"#FFF0F4F7\" Offset=\"0.344\"/>\r\n                                        <GradientStop Color=\"#FFDFE3E6\" Offset=\"1\"/>\r\n                                        <GradientStop Color=\"#FFE9EEF4\" Offset=\"0.527\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                            <Rectangle Opacity=\".375\" Grid.RowSpan=\"3\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Stroke=\"{StaticResource NormalBorderBrush}\"/>\r\n                            <Rectangle Margin=\"1\" Grid.RowSpan=\"3\" RadiusX=\"1\" RadiusY=\"1\">\r\n                                <Rectangle.Stroke>\r\n                                    <LinearGradientBrush EndPoint=\"0.125,0.5\" StartPoint=\"0.875,0.5\">\r\n                                        <GradientStop Color=\"#33FFFFFF\"/>\r\n                                        <GradientStop Color=\"#99FFFFFF\" Offset=\"1\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Stroke>\r\n                            </Rectangle>\r\n\r\n                            <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource VerticalDecrementTemplate}\" Height=\"16\" Margin=\"1\" x:Name=\"VerticalSmallDecrease\" Grid.Row=\"0\" Interval=\"50\" Command=\"ScrollBar.LineUpCommand\" />\r\n\r\n                            <Track Grid.Row=\"1\" x:Name=\"PART_Track\" Orientation=\"Vertical\" IsDirectionReversed=\"true\">\r\n                                <Track.Thumb>\r\n                                    <Thumb MinHeight=\"18\" x:Name=\"VerticalThumb\" Template=\"{StaticResource VerticalThumbTemplate}\" />\r\n                                </Track.Thumb>\r\n                                <Track.IncreaseRepeatButton>\r\n                                    <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Command=\"ScrollBar.PageDownCommand\" Interval=\"50\" />\r\n                                </Track.IncreaseRepeatButton>\r\n                                <Track.DecreaseRepeatButton>\r\n                                    <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Command=\"ScrollBar.PageUpCommand\" Interval=\"50\" />\r\n                                </Track.DecreaseRepeatButton>\r\n                            </Track>\r\n\r\n                            <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource VerticalIncrementTemplate}\" Height=\"16\" Margin=\"1\" x:Name=\"VerticalSmallIncrease\" Grid.Row=\"4\" Interval=\"50\" Command=\"ScrollBar.LineDownCommand\" />\r\n\r\n                        </Grid>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"Orientation\" Value=\"Horizontal\">\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"Root\">\r\n                                <Setter.Value>\r\n                                    <RotateTransform Angle=\"-90\"/>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"ScrollViewer\">\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Padding\" Value=\"4\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ScrollViewer\">\r\n                    <Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\">\r\n                        <Grid Background=\"{TemplateBinding Background}\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"*\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <ScrollContentPresenter Cursor=\"{TemplateBinding Cursor}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"ScrollContentPresenter\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                            <Rectangle Grid.Column=\"1\" Grid.Row=\"1\" Fill=\"#FFE9EEF4\"/>\r\n                            <ScrollBar IsTabStop=\"False\" Margin=\"0,-1,-1,-1\" x:Name=\"PART_VerticalScrollBar\" Width=\"18\" Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Grid.Column=\"1\" Grid.Row=\"0\" Orientation=\"Vertical\" ViewportSize=\"{TemplateBinding ViewportHeight}\" Maximum=\"{TemplateBinding ScrollableHeight}\" Minimum=\"0\" Value=\"{TemplateBinding VerticalOffset}\" />\r\n                            <ScrollBar IsTabStop=\"False\" Height=\"18\" Margin=\"-1,0,-1,-1\" x:Name=\"PART_HorizontalScrollBar\" Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Grid.Column=\"0\" Grid.Row=\"1\" Orientation=\"Horizontal\" ViewportSize=\"{TemplateBinding ViewportWidth}\" Maximum=\"{TemplateBinding ScrollableWidth}\" Minimum=\"0\" Value=\"{TemplateBinding HorizontalOffset}\" />\r\n                        </Grid>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- Button -->\r\n    <Style TargetType=\"Button\">\r\n        <Setter Property=\"Background\">\r\n            <Setter.Value>\r\n                <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\"/>\r\n        <Setter Property=\"Padding\" Value=\"3\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Button\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"grid\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\".55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"Background\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" Background=\"{x:Null}\">\r\n                            <Grid Margin=\"1\" Background=\"{TemplateBinding Background}\" x:Name=\"grid\">\r\n                                <Border x:Name=\"BackgroundAnimation\" Background=\"{StaticResource NormalBrush}\" BorderBrush=\"#FFFFFFFF\"/>\r\n                                <Rectangle x:Name=\"BackgroundGradient\" Fill=\"{StaticResource MouseOverBrush}\" Stroke=\"{x:Null}\" Opacity=\"0\"/>\r\n                            </Grid>\r\n                        </Border>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"contentPresenter\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                        <Rectangle x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"false\" Opacity=\"0\" Fill=\"#FFFFFFFF\" RadiusX=\"3\" RadiusY=\"3\"/>\r\n                        <Rectangle Margin=\"1\" x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- TextBox -->\r\n    <Style TargetType=\"TextBox\">\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"Background\" Value=\"#FFFFFFFF\"/>\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\"/>\r\n        <Setter Property=\"Padding\" Value=\"2\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TextBox\">\r\n                    <Grid x:Name=\"RootElement\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"MouseOverBorder\" Storyboard.TargetProperty=\"(Border.BorderBrush).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"{StaticResource MainColor}\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ReadOnly\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ReadOnlyVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"Border\" Opacity=\"1\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"1\">\r\n                            <Grid>\r\n                                <Border x:Name=\"ReadOnlyVisualElement\" Opacity=\"0\" Background=\"#72F7F7F7\"/>\r\n                                <Border x:Name=\"MouseOverBorder\" BorderBrush=\"Transparent\" BorderThickness=\"1\">\r\n                                    <ScrollViewer BorderThickness=\"0\" IsTabStop=\"False\" Padding=\"{TemplateBinding Padding}\" x:Name=\"PART_ContentHost\"/>\r\n                                </Border>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Border x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"False\" Opacity=\"0\" Background=\"#A5F7F7F7\" BorderBrush=\"#A5F7F7F7\" BorderThickness=\"{TemplateBinding BorderThickness}\"/>\r\n                        <Border Margin=\"1\" x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Opacity=\"0\" BorderBrush=\"{StaticResource HighlightBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- ComboBoxItem -->\r\n    <Style TargetType=\"ComboBoxItem\">\r\n        <Setter Property=\"Padding\" Value=\"3\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"Local\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ComboBoxItem\">\r\n                    <Grid Background=\"{TemplateBinding Background}\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"fillColor\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.75\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\".55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualState x:Name=\"Unselected\"/>\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"fillColor2\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\".75\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Rectangle x:Name=\"fillColor\" IsHitTestVisible=\"False\" Opacity=\"0\" Fill=\"{StaticResource MouseOverBrush}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                        <Rectangle x:Name=\"fillColor2\" IsHitTestVisible=\"False\" Opacity=\"0\" Fill=\"{StaticResource SelectedBackgroundBrush}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" />\r\n                        <Rectangle x:Name=\"FocusVisualElement\" Visibility=\"Collapsed\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- ComboBox -->\r\n    <Style TargetType=\"ComboBox\">\r\n        <Setter Property=\"Padding\" Value=\"6,2,25,2\"/>\r\n        <Setter Property=\"Background\" Value=\"#FF1F3B53\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"Once\"/>\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"#FFA3AEB9\" Offset=\"0\"/>\r\n                    <GradientStop Color=\"#FF8399A9\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF718597\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF617584\" Offset=\"1\"/>\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ComboBox\">\r\n                    <Grid>\r\n                        <Grid.Resources>\r\n                            <Style TargetType=\"ToggleButton\" x:Name=\"comboToggleStyle\">\r\n                                <Setter Property=\"Foreground\" Value=\"#FF333333\"/>\r\n                                <Setter Property=\"Background\">\r\n                                    <Setter.Value>\r\n                                        <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n                                    </Setter.Value>\r\n                                </Setter>\r\n                                <Setter Value=\"{StaticResource NormalBorderBrush}\" Property=\"BorderBrush\"/>\r\n                                <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n                                <Setter Property=\"Padding\" Value=\"3\"/>\r\n                                <Setter Property=\"Template\">\r\n                                    <Setter.Value>\r\n                                        <ControlTemplate TargetType=\"ToggleButton\">\r\n                                            <Grid>\r\n                                                <VisualStateManager.VisualStateGroups>\r\n                                                    <VisualStateGroup x:Name=\"CommonStates\">\r\n                                                        <VisualState x:Name=\"Normal\"/>\r\n                                                        <VisualState x:Name=\"MouseOver\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BackgroundOverlay2\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Pressed\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.6\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n\r\n\r\n\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Disabled\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledVisual\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                    </VisualStateGroup>\r\n                                                    <VisualStateGroup x:Name=\"CheckStates\">\r\n                                                        <VisualState x:Name=\"Checked\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BackgroundOverlay3\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Unchecked\"/>\r\n                                                    </VisualStateGroup>\r\n                                                    <VisualStateGroup x:Name=\"FocusStates\">\r\n                                                        <VisualState x:Name=\"Focused\">\r\n                                                            <Storyboard>\r\n                                                                <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Visibility\">\r\n                                                                    <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                                        <DiscreteObjectKeyFrame.Value>\r\n                                                                            <Visibility>Visible</Visibility>\r\n                                                                        </DiscreteObjectKeyFrame.Value>\r\n                                                                    </DiscreteObjectKeyFrame>\r\n                                                                </ObjectAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Unfocused\"/>\r\n                                                    </VisualStateGroup>\r\n                                                </VisualStateManager.VisualStateGroups>\r\n                                                <Rectangle x:Name=\"Background\" Fill=\"{TemplateBinding Background}\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" RadiusX=\"3\" RadiusY=\"3\"/>\r\n                                                <Rectangle x:Name=\"BackgroundOverlay\" StrokeThickness=\"{TemplateBinding BorderThickness}\" RadiusX=\"3\" RadiusY=\"3\" Fill=\"{StaticResource NormalBrush}\" Margin=\"1,1,1,1\">\r\n                                                    <Rectangle.Stroke>\r\n                                                        <SolidColorBrush Color=\"#FFFFFFFF\"/>\r\n                                                    </Rectangle.Stroke>\r\n                                                </Rectangle>\r\n                                                <Rectangle x:Name=\"BackgroundOverlay2\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"{TemplateBinding BorderThickness}\" RadiusX=\"3\" RadiusY=\"3\" Fill=\"{StaticResource MouseOverBrush}\" Opacity=\"0\" Margin=\"1,1,1,1\"/>\r\n                                                <Rectangle x:Name=\"BackgroundOverlay3\" Stroke=\"{x:Null}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" RadiusX=\"3\" RadiusY=\"3\" Opacity=\"0\" Margin=\"1,1,1,1\" Fill=\"#7FFFFFFF\"/>\r\n                                                <Rectangle Margin=\"{TemplateBinding BorderThickness}\" x:Name=\"Highlight\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                                <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"contentPresenter\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                                                <Rectangle Margin=\"1\" x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"3.5\" RadiusY=\"3.5\"/>\r\n                                                <Rectangle Fill=\"#99F4F4F4\" x:Name=\"DisabledVisual\" Opacity=\"0\" Stroke=\"{x:Null}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                            </Grid>\r\n                                        </ControlTemplate>\r\n                                    </Setter.Value>\r\n                                </Setter>\r\n                            </Style>\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\".55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                                <VisualState x:Name=\"FocusedDropDown\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00\" Storyboard.TargetName=\"PopupBorder\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"ContentPresenterBorder\">\r\n                            <Grid>\r\n                                <ToggleButton BorderThickness=\"{TemplateBinding BorderThickness}\" HorizontalContentAlignment=\"Right\" HorizontalAlignment=\"Stretch\" Margin=\"0\" x:Name=\"DropDownToggle\" Style=\"{DynamicResource comboToggleStyle}\" VerticalAlignment=\"Stretch\" IsChecked=\"{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\">\r\n                                    <Path Height=\"4\" HorizontalAlignment=\"Right\" Margin=\"0,0,6,0\" x:Name=\"BtnArrow\" Width=\"8\" Stretch=\"Uniform\" Data=\"F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z \">\r\n                                        <Path.Fill>\r\n                                            <SolidColorBrush Color=\"#FF333333\" x:Name=\"BtnArrowColor\"/>\r\n                                        </Path.Fill>\r\n                                    </Path>\r\n                                </ToggleButton>\r\n                                <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"ContentPresenter\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Content=\"{TemplateBinding SelectionBoxItem}\" ContentTemplate=\"{TemplateBinding SelectionBoxItemTemplate}\" ContentTemplateSelector=\"{TemplateBinding ItemTemplateSelector}\" IsHitTestVisible=\"False\"/>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Rectangle x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"false\" Opacity=\"0\" Fill=\"White\" RadiusX=\"3\" RadiusY=\"3\"/>\r\n                        <Rectangle Margin=\"1\" x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                        <Popup x:Name=\"Popup\" IsOpen=\"{TemplateBinding IsDropDownOpen}\">\r\n                            <Grid MaxHeight=\"{TemplateBinding MaxDropDownHeight}\" MinWidth=\"{TemplateBinding ActualWidth}\" x:Name=\"DropDown\" SnapsToDevicePixels=\"True\">\r\n\r\n                                <Border Height=\"Auto\" HorizontalAlignment=\"Stretch\" x:Name=\"PopupBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\">\r\n                                    <Border.Background>\r\n                                        <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#FFFEFEFE\" Offset=\"1\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Border.Background>\r\n                                    <ScrollViewer BorderThickness=\"0\" Padding=\"1\" SnapsToDevicePixels=\"True\" HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Auto\" CanContentScroll=\"True\">\r\n                                        <ItemsPresenter/>\r\n                                    </ScrollViewer>\r\n                                </Border>\r\n\r\n                            </Grid>\r\n                        </Popup>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- ListBoxItem -->\r\n    <Style TargetType=\"ListBoxItem\">\r\n        <Setter Property=\"Padding\" Value=\"3\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"Local\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ListBoxItem\">\r\n                    <Grid Background=\"{TemplateBinding Background}\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"fillColor\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.75\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\".55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualState x:Name=\"Unselected\"/>\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"fillColor2\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\".75\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Rectangle x:Name=\"fillColor\" IsHitTestVisible=\"False\" Opacity=\"0\" Fill=\"{StaticResource MouseOverBrush}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                        <Rectangle x:Name=\"fillColor2\" IsHitTestVisible=\"False\" Opacity=\"0\" Fill=\"{StaticResource SelectedBackgroundBrush}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" />\r\n                        <Rectangle x:Name=\"FocusVisualElement\" Visibility=\"Collapsed\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- ListBox -->\r\n    <Style TargetType=\"ListBox\">\r\n        <Setter Property=\"Padding\" Value=\"1\"/>\r\n        <Setter Property=\"Background\" Value=\"#FFFFFFFF\"/>\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"Once\"/>\r\n        <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\"/>\r\n        <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\"/>\r\n        <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"True\"/>\r\n        <Setter Value=\"{StaticResource NormalBorderBrush}\" Property=\"BorderBrush\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ListBox\">\r\n                    <Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\">\r\n                        <ScrollViewer Background=\"{TemplateBinding Background}\" BorderBrush=\"Transparent\" BorderThickness=\"0\" Padding=\"{TemplateBinding Padding}\" x:Name=\"ScrollViewer\" >\r\n                            <ItemsPresenter/>\r\n                        </ScrollViewer>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- Expander -->\r\n    <Style TargetType=\"Expander\">\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Expander\">\r\n                    <Grid Background=\"Transparent\">\r\n                        <Grid.Resources>\r\n                            <LinearGradientBrush x:Key=\"ExpanderArrowFill\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n                                <GradientStop Color=\"White\" Offset=\"0\"/>\r\n                                <GradientStop Color=\"#FFBFBFBF\" Offset=\"0.5\"/>\r\n                                <GradientStop Color=\"#FF878787\" Offset=\"1\"/>\r\n                            </LinearGradientBrush>\r\n                            <LinearGradientBrush x:Key=\"ExpanderArrowHoverFill\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n                                <GradientStop Color=\"#FFF0F8FE\" Offset=\"0\"/>\r\n                                <GradientStop Color=\"#FFE0F3FE\" Offset=\"0.3\"/>\r\n                                <GradientStop Color=\"#FF6FA7C5\" Offset=\"1\"/>\r\n                            </LinearGradientBrush>\r\n                            <LinearGradientBrush x:Key=\"ExpanderArrowPressedFill\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n                                <GradientStop Color=\"#FFDCF0FA\" Offset=\"0\"/>\r\n                                <GradientStop Color=\"#FFC5E6F7\" Offset=\"0.2\"/>\r\n                                <GradientStop Color=\"#FF5690D0\" Offset=\"1\"/>\r\n                            </LinearGradientBrush>\r\n                            <ControlTemplate x:Key=\"ExpanderDownHeaderTemplate\" TargetType=\"ToggleButton\">\r\n                                <Grid Background=\"Transparent\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CheckStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Checked\">\r\n                                                <!--                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"Data\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"M 1,4.5 L 4.5,1 L 8,4.5\"/>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>-->\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Unchecked\"/>\r\n                                        </VisualStateGroup>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <ColorAnimation BeginTime=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(Path.Stroke).(SolidColorBrush.Color)\" To=\"#222\"/>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"circle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.8\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <ColorAnimation BeginTime=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(Path.Stroke).(SolidColorBrush.Color)\" To=\"#FF003366\"/>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"circle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.7\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                        <VisualStateGroup x:Name=\"FocusStates\">\r\n                                            <VisualState x:Name=\"Focused\">\r\n                                                <!--                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Visibility\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Visible\"/>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>-->\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Unfocused\"/>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Border Padding=\"{TemplateBinding Padding}\">\r\n                                        <Grid Background=\"Transparent\">\r\n                                            <Grid.ColumnDefinitions>\r\n                                                <ColumnDefinition Width=\"19\"/>\r\n                                                <ColumnDefinition Width=\"*\"/>\r\n                                            </Grid.ColumnDefinitions>\r\n                                            <Grid HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\">\r\n                                                <Ellipse Height=\"19\" HorizontalAlignment=\"Center\" x:Name=\"circle\" VerticalAlignment=\"Center\" Width=\"19\" Fill=\"{StaticResource MouseOverBrush}\" Stroke=\"{StaticResource NormalBorderBrush}\"/>\r\n                                                <Path HorizontalAlignment=\"Center\" x:Name=\"arrow\" VerticalAlignment=\"Center\" Stroke=\"#666\" StrokeThickness=\"2\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\"/>\r\n                                            </Grid>\r\n                                            <ContentPresenter HorizontalAlignment=\"Left\" Margin=\"4,0,0,0\" x:Name=\"header\" VerticalAlignment=\"Center\" Grid.Column=\"1\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                                        </Grid>\r\n                                    </Border>\r\n                                    <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HighlightBrush}\" BorderThickness=\"1\" CornerRadius=\"3\"/>\r\n                                </Grid>\r\n                                <ControlTemplate.Triggers>\r\n                                    <Trigger Property=\"IsChecked\" Value=\"True\">\r\n                                        <Setter Property=\"Data\" TargetName=\"arrow\" Value=\"M 1,4.5 L 4.5,1 L 8,4.5\" />\r\n                                    </Trigger>\r\n                                </ControlTemplate.Triggers>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"ExpanderUpHeaderTemplate\" TargetType=\"ToggleButton\">\r\n                                <Grid Background=\"Transparent\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CheckStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Checked\">\r\n                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"Data\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"M 1,4.5 L 4.5,1 L 8,4.5\"/>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Unchecked\"/>\r\n                                        </VisualStateGroup>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <ColorAnimation BeginTime=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(Path.Stroke).(SolidColorBrush.Color)\" To=\"#222\"/>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"circle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.8\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <ColorAnimation BeginTime=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(Path.Stroke).(SolidColorBrush.Color)\" To=\"#FF003366\"/>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"circle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.7\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                        <VisualStateGroup x:Name=\"FocusStates\">\r\n                                            <VisualState x:Name=\"Focused\">\r\n                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Visibility\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                            <DiscreteObjectKeyFrame.Value>\r\n                                                                <Visibility>Visible</Visibility>\r\n                                                            </DiscreteObjectKeyFrame.Value>\r\n                                                        </DiscreteObjectKeyFrame>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Unfocused\"/>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Border Padding=\"{TemplateBinding Padding}\">\r\n                                        <Grid Background=\"Transparent\">\r\n                                            <Grid.ColumnDefinitions>\r\n                                                <ColumnDefinition Width=\"19\"/>\r\n                                                <ColumnDefinition Width=\"*\"/>\r\n                                            </Grid.ColumnDefinitions>\r\n                                            <Grid HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\">\r\n                                                <Grid.RenderTransform>\r\n                                                    <TransformGroup>\r\n                                                        <TransformGroup.Children>\r\n                                                            <TransformCollection>\r\n                                                                <RotateTransform Angle=\"180\" CenterX=\"9.5\" CenterY=\"9.5\"/>\r\n                                                            </TransformCollection>\r\n                                                        </TransformGroup.Children>\r\n                                                    </TransformGroup>\r\n                                                </Grid.RenderTransform>\r\n                                                <Ellipse Height=\"19\" HorizontalAlignment=\"Center\" x:Name=\"circle\" VerticalAlignment=\"Center\" Width=\"19\" Fill=\"{StaticResource MouseOverBrush}\" Stroke=\"{StaticResource NormalBorderBrush}\"/>\r\n                                                <Path HorizontalAlignment=\"Center\" x:Name=\"arrow\" VerticalAlignment=\"Center\" Stroke=\"#666\" StrokeThickness=\"2\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\"/>\r\n                                            </Grid>\r\n                                            <ContentPresenter HorizontalAlignment=\"Left\" Margin=\"4,0,0,0\" x:Name=\"header\" VerticalAlignment=\"Center\" Grid.Column=\"1\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                                        </Grid>\r\n                                    </Border>\r\n                                    <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HighlightBrush}\" BorderThickness=\"1\" CornerRadius=\"3\"/>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"ExpanderLeftHeaderTemplate\" TargetType=\"ToggleButton\">\r\n                                <Grid Background=\"Transparent\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CheckStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Checked\">\r\n                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"Data\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"M 1,4.5 L 4.5,1 L 8,4.5\"/>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Unchecked\"/>\r\n                                        </VisualStateGroup>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <ColorAnimation BeginTime=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(Path.Stroke).(SolidColorBrush.Color)\" To=\"#222\"/>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"circle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.8\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <ColorAnimation BeginTime=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(Path.Stroke).(SolidColorBrush.Color)\" To=\"#FF003366\"/>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"circle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.7\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                        <VisualStateGroup x:Name=\"FocusStates\">\r\n                                            <VisualState x:Name=\"Focused\">\r\n                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Visibility\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                            <DiscreteObjectKeyFrame.Value>\r\n                                                                <Visibility>Visible</Visibility>\r\n                                                            </DiscreteObjectKeyFrame.Value>\r\n                                                        </DiscreteObjectKeyFrame>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Unfocused\"/>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Border Padding=\"{TemplateBinding Padding}\">\r\n                                        <Grid Background=\"Transparent\">\r\n                                            <Grid.RowDefinitions>\r\n                                                <RowDefinition Height=\"19\"/>\r\n                                                <RowDefinition Height=\"*\"/>\r\n                                            </Grid.RowDefinitions>\r\n                                            <Grid HorizontalAlignment=\"Center\" VerticalAlignment=\"Top\">\r\n                                                <Grid.RenderTransform>\r\n                                                    <TransformGroup>\r\n                                                        <TransformGroup.Children>\r\n                                                            <TransformCollection>\r\n                                                                <RotateTransform Angle=\"90\" CenterX=\"9.5\" CenterY=\"9.5\"/>\r\n                                                            </TransformCollection>\r\n                                                        </TransformGroup.Children>\r\n                                                    </TransformGroup>\r\n                                                </Grid.RenderTransform>\r\n                                                <Ellipse Height=\"19\" HorizontalAlignment=\"Center\" x:Name=\"circle\" VerticalAlignment=\"Center\" Width=\"19\" Fill=\"{StaticResource MouseOverBrush}\" Stroke=\"{StaticResource NormalBorderBrush}\"/>\r\n                                                <Path HorizontalAlignment=\"Center\" x:Name=\"arrow\" VerticalAlignment=\"Center\" Stroke=\"#666\" StrokeThickness=\"2\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\"/>\r\n                                            </Grid>\r\n                                            <ContentPresenter HorizontalAlignment=\"Center\" Margin=\"0,4,0,0\" x:Name=\"header\" VerticalAlignment=\"Top\" Grid.Row=\"1\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                                        </Grid>\r\n                                    </Border>\r\n                                    <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HighlightBrush}\" BorderThickness=\"1\" CornerRadius=\"3\"/>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"ExpanderRightHeaderTemplate\" TargetType=\"ToggleButton\">\r\n                                <Grid Background=\"Transparent\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CheckStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Checked\">\r\n                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"Data\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"M 1,4.5 L 4.5,1 L 8,4.5\"/>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Unchecked\"/>\r\n                                        </VisualStateGroup>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <ColorAnimation BeginTime=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(Path.Stroke).(SolidColorBrush.Color)\" To=\"#222\"/>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"circle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.8\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <ColorAnimation BeginTime=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(Path.Stroke).(SolidColorBrush.Color)\" To=\"#FF003366\"/>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"circle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.7\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                        <VisualStateGroup x:Name=\"FocusStates\">\r\n                                            <VisualState x:Name=\"Focused\">\r\n                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Visibility\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                            <DiscreteObjectKeyFrame.Value>\r\n                                                                <Visibility>Visible</Visibility>\r\n                                                            </DiscreteObjectKeyFrame.Value>\r\n                                                        </DiscreteObjectKeyFrame>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Unfocused\"/>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Border Padding=\"{TemplateBinding Padding}\">\r\n                                        <Grid Background=\"Transparent\">\r\n                                            <Grid.RowDefinitions>\r\n                                                <RowDefinition Height=\"19\"/>\r\n                                                <RowDefinition Height=\"*\"/>\r\n                                            </Grid.RowDefinitions>\r\n                                            <Grid HorizontalAlignment=\"Center\" VerticalAlignment=\"Top\">\r\n                                                <Grid.RenderTransform>\r\n                                                    <TransformGroup>\r\n                                                        <TransformGroup.Children>\r\n                                                            <TransformCollection>\r\n                                                                <RotateTransform Angle=\"-90\" CenterX=\"9.5\" CenterY=\"9.5\"/>\r\n                                                            </TransformCollection>\r\n                                                        </TransformGroup.Children>\r\n                                                    </TransformGroup>\r\n                                                </Grid.RenderTransform>\r\n                                                <Ellipse Height=\"19\" HorizontalAlignment=\"Center\" x:Name=\"circle\" VerticalAlignment=\"Center\" Width=\"19\" Fill=\"{StaticResource MouseOverBrush}\" Stroke=\"{StaticResource NormalBorderBrush}\"/>\r\n                                                <Path HorizontalAlignment=\"Center\" x:Name=\"arrow\" VerticalAlignment=\"Center\" Stroke=\"#666\" StrokeThickness=\"2\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\"/>\r\n                                            </Grid>\r\n                                            <ContentPresenter HorizontalAlignment=\"Center\" Margin=\"0,4,0,0\" x:Name=\"header\" VerticalAlignment=\"Top\" Grid.Row=\"1\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                                        </Grid>\r\n                                    </Border>\r\n                                    <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HighlightBrush}\" BorderThickness=\"1\" CornerRadius=\"3\"/>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" To=\"1\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"ExpansionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Collapsed\"/>\r\n                                <VisualState x:Name=\"Expanded\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"ExpandDirectionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"ExpandDown\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd1\" Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"*\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"*\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ExpandUp\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"Template\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ExpanderUpHeaderTemplate}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"*\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"*\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ExpandLeft\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"Template\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ExpanderLeftHeaderTemplate}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"*\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"*\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ExpandRight\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"Template\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ExpanderRightHeaderTemplate}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"1\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"*\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd1\" Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"*\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"Background\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" Padding=\"{TemplateBinding Padding}\">\r\n                            <Grid>\r\n                                <Grid.RowDefinitions>\r\n                                    <RowDefinition Height=\"Auto\" x:Name=\"rd0\"/>\r\n                                    <RowDefinition Height=\"*\" x:Name=\"rd1\"/>\r\n                                </Grid.RowDefinitions>\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\" x:Name=\"cd0\"/>\r\n                                    <ColumnDefinition Width=\"*\" x:Name=\"cd1\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <ToggleButton FontFamily=\"{TemplateBinding FontFamily}\" FontSize=\"{TemplateBinding FontSize}\" FontStretch=\"{TemplateBinding FontStretch}\" FontStyle=\"{TemplateBinding FontStyle}\" FontWeight=\"{TemplateBinding FontWeight}\" Foreground=\"{TemplateBinding Foreground}\" Template=\"{StaticResource ExpanderDownHeaderTemplate}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"1\" MinHeight=\"0\" MinWidth=\"0\" x:Name=\"ExpanderButton\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Grid.Column=\"0\" Grid.Row=\"0\" Content=\"{TemplateBinding Header}\" ContentTemplate=\"{TemplateBinding HeaderTemplate}\" BorderBrush=\"{StaticResource NormalBorderBrush}\" IsChecked=\"{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" Grid.ColumnSpan=\"2\">\r\n                                    <ToggleButton.Background>\r\n                                        <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n                                    </ToggleButton.Background>\r\n                                </ToggleButton>\r\n\r\n                                <ContentPresenter \r\n                                    HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" \r\n                                    Margin=\"1\" \r\n                                    MinHeight=\"0\" MinWidth=\"0\" x:Name=\"ExpandSite\" \r\n                                    VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" \r\n                                    Visibility=\"Collapsed\" Grid.Column=\"0\" Grid.Row=\"1\" Grid.ColumnSpan=\"2\"\r\n                                    />\r\n\r\n                                <!--\r\n                                Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                                \r\n                                    FontFamily=\"{TemplateBinding FontFamily}\" \r\n                                    FontSize=\"{TemplateBinding FontSize}\" \r\n                                    FontStretch=\"{TemplateBinding FontStretch}\" \r\n                                    FontStyle=\"{TemplateBinding FontStyle}\" \r\n                                    FontWeight=\"{TemplateBinding FontWeight}\" \r\n                                    Foreground=\"{TemplateBinding Foreground}\" \r\n                                -->\r\n                            </Grid>\r\n                        </Border>\r\n                        <Border x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"#A5FFFFFF\" CornerRadius=\"3\"/>\r\n                        <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HighlightBrush}\" BorderThickness=\"1\" CornerRadius=\"3\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsExpanded\" Value=\"True\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"ExpandSite\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- ProgressBar-->\r\n    <Style TargetType=\"ProgressBar\">\r\n        <Setter Property=\"Foreground\">\r\n            <Setter.Value>\r\n                <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Background\" Value=\"#FFD8D7D2\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"Maximum\" Value=\"100\"/>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ProgressBar\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Determinate\"/>\r\n                                <VisualState x:Name=\"Indeterminate\">\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"PART_Track\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\"/>\r\n                        <Grid x:Name=\"ProgressBarRootGrid\">\r\n                            <Rectangle Margin=\"{TemplateBinding BorderThickness}\" x:Name=\"ProgressBarRootGradient\" Canvas.ZIndex=\"1\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\" RadiusX=\"1.5\" RadiusY=\"1.5\">\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                        <GradientStop Color=\"#D8FFFFFF\" Offset=\"0\"/>\r\n                                        <GradientStop Color=\"#7FFFFFFF\" Offset=\"0.316\"/>\r\n                                        <GradientStop Color=\"#00FFFFFF\" Offset=\"0.444\"/>\r\n                                        <GradientStop Color=\"#33FFFFFF\" Offset=\"1\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                            <Grid x:Name=\"IndeterminateRoot\" Visibility=\"Collapsed\">\r\n                                <Rectangle Margin=\"{TemplateBinding BorderThickness}\" x:Name=\"IndeterminateSolidFill\" Opacity=\"1\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"{TemplateBinding Foreground}\" StrokeThickness=\"0\" RadiusX=\"2\" RadiusY=\"2\">\r\n                                    <Rectangle.Stroke>\r\n                                        <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n                                    </Rectangle.Stroke>\r\n                                </Rectangle>\r\n                                <Rectangle Margin=\"{TemplateBinding BorderThickness}\" x:Name=\"IndeterminateGradientFill\" Opacity=\"0.7\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\">\r\n                                    <Rectangle.Fill>\r\n                                        <LinearGradientBrush EndPoint=\"0,1\" StartPoint=\"20,1\" MappingMode=\"Absolute\" SpreadMethod=\"Repeat\">\r\n                                            <LinearGradientBrush.Transform>\r\n                                                <TransformGroup>\r\n                                                    <TranslateTransform X=\"0\"/>\r\n                                                    <SkewTransform AngleX=\"-30\"/>\r\n                                                </TransformGroup>\r\n                                            </LinearGradientBrush.Transform>\r\n                                            <GradientStop Color=\"#FF785F06\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#00FFBA00\" Offset=\".25\"/>\r\n                                            <GradientStop Color=\"{StaticResource AlternateColor}\" Offset=\"0.85\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Rectangle.Fill>\r\n                                </Rectangle>\r\n                            </Grid>\r\n                            <Grid Margin=\"1\" x:Name=\"DeterminateRoot\">\r\n                                <Rectangle HorizontalAlignment=\"Left\" Margin=\"{TemplateBinding BorderThickness}\" x:Name=\"PART_Indicator\" Fill=\"{TemplateBinding Foreground}\" StrokeThickness=\"0.5\" RadiusX=\"1.5\" RadiusY=\"1.5\"/>\r\n                            </Grid>\r\n                        </Grid>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsIndeterminate\" Value=\"True\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard>\r\n                                    <Storyboard RepeatBehavior=\"Forever\">\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00\" Storyboard.TargetName=\"IndeterminateRoot\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00\" Storyboard.TargetName=\"DeterminateRoot\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"IndeterminateGradientFill\" Storyboard.TargetProperty=\"(Shape.Fill).(LinearGradientBrush.Transform).(TransformGroup.Children)[0].X\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:.5\" Value=\"20\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </BeginStoryboard>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- CheckBox -->\r\n    <Style TargetType=\"CheckBox\">\r\n        <Setter Property=\"Background\">\r\n            <Setter.Value>\r\n                <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Padding\" Value=\"4,1,0,0\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"CheckBox\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundOverlay\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddleBackground\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#7FFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#CCFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F2FFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundOverlay\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddleBackground\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#6BFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#C6FFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#EAFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F4FFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"grid\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\".55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\"/>\r\n                                <VisualState x:Name=\"Indeterminate\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"IndeterminateIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ContentFocusVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"16\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" x:Name=\"grid\">\r\n                            <Rectangle Height=\"14\" Margin=\"1\" x:Name=\"Background\" Width=\"14\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" RadiusX=\"1\" RadiusY=\"1\" Fill=\"{x:Null}\"/>\r\n                            <Rectangle Height=\"14\" Margin=\"1\" x:Name=\"BackgroundOverlay\" Width=\"14\" Opacity=\"0\" Fill=\"{StaticResource NormalBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                            <Rectangle Height=\"10\" x:Name=\"BoxMiddleBackground\" Width=\"10\" Fill=\"{TemplateBinding Background}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                            <Rectangle Height=\"10\" x:Name=\"BoxMiddle\" Width=\"10\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Stroke=\"{x:Null}\">\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush EndPoint=\"0.64,0.88\" StartPoint=\"0.62,0.15\">\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.013\"/>\r\n                                        <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                        <GradientStop Color=\"#EAFFFFFF\" Offset=\"0.603\"/>\r\n                                        <GradientStop Color=\"#D8FFFFFF\" Offset=\"1\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                            <Rectangle Height=\"10\" x:Name=\"BoxMiddleLine\" Width=\"10\" Opacity=\".2\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                            <Path Height=\"10\" Margin=\"1,1,0,1.5\" x:Name=\"CheckIcon\" Width=\"10.5\" Opacity=\"0\" Fill=\"#FF333333\" Stretch=\"Fill\" Data=\"M102.03442,598.79645 L105.22962,597.78918 L106.78825,600.42358 C106.78825,600.42358 108.51028,595.74304 110.21724,593.60419 C112.00967,591.35822 114.89314,591.42316 114.89314,591.42316 C114.89314,591.42316 112.67844,593.42645 111.93174,594.44464 C110.7449,596.06293 107.15683,604.13837 107.15683,604.13837 z\"/>\r\n                            <Rectangle Height=\"2\" x:Name=\"IndeterminateIcon\" Width=\"6\" Opacity=\"0\" Fill=\"#FF333333\"/>\r\n                            <Rectangle Height=\"14\" x:Name=\"DisabledVisualElement\" Width=\"14\" Opacity=\"0\" Fill=\"#FFFFFFFF\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                            <Rectangle Height=\"16\" x:Name=\"ContentFocusVisualElement\" Width=\"16\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                        </Grid>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"contentPresenter\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Grid.Column=\"1\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- RadioButton -->\r\n    <Style TargetType=\"RadioButton\">\r\n        <Setter Property=\"Background\">\r\n            <Setter.Value>\r\n                <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Padding\" Value=\"4,1,0,0\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"RadioButton\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundOverlay\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddleBackground\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#7FFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#CCFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F2FFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundOverlay\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddleBackground\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#6BFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#C6FFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#EAFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F4FFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"grid\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\".55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\"/>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ContentFocusVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"16\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" x:Name=\"grid\">\r\n                            <Ellipse Height=\"14\" Margin=\"1\" x:Name=\"Background\" Width=\"14\" Fill=\"#FFFFFFFF\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\"/>\r\n                            <Ellipse Height=\"14\" Margin=\"1\" x:Name=\"BackgroundOverlay\" Width=\"14\" Opacity=\"0\" Fill=\"{StaticResource NormalBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\"/>\r\n                            <Ellipse Height=\"10\" x:Name=\"BoxMiddleBackground\" Width=\"10\" Fill=\"{TemplateBinding Background}\" Stroke=\"#00000000\" StrokeThickness=\"1\"/>\r\n                            <Ellipse Height=\"10\" x:Name=\"BoxMiddle\" Width=\"10\" StrokeThickness=\"1\" Stroke=\"{x:Null}\">\r\n                                <Ellipse.Fill>\r\n                                    <LinearGradientBrush EndPoint=\"0.64,0.88\" StartPoint=\"0.62,0.15\">\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.013\"/>\r\n                                        <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                        <GradientStop Color=\"#EAFFFFFF\" Offset=\"0.603\"/>\r\n                                        <GradientStop Color=\"#D8FFFFFF\" Offset=\"1\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Ellipse.Fill>\r\n                            </Ellipse>\r\n                            <Ellipse Height=\"10\" x:Name=\"BoxMiddleLine\" Width=\"10\" Opacity=\".2\" Stroke=\"#FF333333\" StrokeThickness=\"1\"/>\r\n                            <Ellipse Height=\"4\" x:Name=\"CheckIcon\" Width=\"4\" Opacity=\"0\" Fill=\"#FF333333\"/>\r\n                            <Ellipse Height=\"14\" x:Name=\"DisabledVisualElement\" Width=\"14\" Opacity=\"0\" Fill=\"#FFFFFFFF\"/>\r\n                            <Ellipse Height=\"16\" x:Name=\"ContentFocusVisualElement\" Width=\"16\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\"/>\r\n                        </Grid>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"contentPresenter\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Grid.Column=\"1\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- Thumb -->\r\n    <Style TargetType=\"Thumb\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Thumb\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"grid\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.7\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\".55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"Background\" Background=\"White\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\">\r\n                            <Grid Margin=\"1\" Background=\"{TemplateBinding Background}\" x:Name=\"grid\">\r\n                                <Border x:Name=\"BackgroundAnimation\" Background=\"{StaticResource NormalBrush}\"/>\r\n                                <Rectangle x:Name=\"BackgroundGradient\" Fill=\"{StaticResource MouseOverBrush}\" Opacity=\"0\"/>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Rectangle x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"false\" Opacity=\"0\" Fill=\"#FFFFFFFF\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                        <Rectangle Margin=\"1\" x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- Slider -->\r\n    <Style TargetType=\"Slider\">\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"Maximum\" Value=\"10\"/>\r\n        <Setter Property=\"Minimum\" Value=\"0\"/>\r\n        <Setter Property=\"Value\" Value=\"0\"/>\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"#FFA3AEB9\" Offset=\"0\"/>\r\n                    <GradientStop Color=\"#FF8399A9\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF718597\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF617584\" Offset=\"1\"/>\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Slider\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <Grid.Resources>\r\n                            <ControlTemplate x:Key=\"RepeatButtonTemplate\">\r\n                                <Grid x:Name=\"Root\" Opacity=\"0\" Background=\"Transparent\"/>\r\n                            </ControlTemplate>\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"HorizontalTrackRectangleDisabledOverlay\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ThumbDisabledOverlay\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"VerticalTrackRectangleDisabledOverlay\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid x:Name=\"HorizontalTemplate\" Background=\"{TemplateBinding Background}\">\r\n\r\n                            <Rectangle Height=\"3\" Margin=\"5,0,5,0\" x:Name=\"TrackRectangle\" Grid.Column=\"0\" Grid.ColumnSpan=\"3\" Fill=\"#FFFFFFFF\" Stroke=\"{StaticResource NormalBorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                            <Rectangle Height=\"3\" Margin=\"5,0,5,0\" x:Name=\"HorizontalTrackRectangleDisabledOverlay\" Opacity=\".55\" Visibility=\"Collapsed\" Grid.Column=\"0\" Grid.ColumnSpan=\"3\" Fill=\"White\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n\r\n\r\n                            <Track x:Name=\"PART_Track\">\r\n                                <Track.Thumb>\r\n                                    <Thumb Height=\"18\" x:Name=\"HorizontalThumb\" Width=\"11\" IsTabStop=\"True\" />\r\n                                </Track.Thumb>\r\n                                <Track.IncreaseRepeatButton>\r\n                                    <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Command=\"Slider.IncreaseLarge\" />\r\n                                </Track.IncreaseRepeatButton>\r\n                                <Track.DecreaseRepeatButton>\r\n                                    <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Command=\"Slider.DecreaseLarge\" />\r\n                                </Track.DecreaseRepeatButton>\r\n                            </Track>\r\n\r\n\r\n\r\n                            <!--<Rectangle x:Name=\"ThumbDisabledOverlay\" Width=\"11\" Opacity=\".55\" Visibility=\"Collapsed\" Grid.Column=\"1\" Fill=\"White\" RadiusX=\"2\" RadiusY=\"2\"/>-->\r\n                        </Grid>\r\n                        <Grid x:Name=\"VerticalTemplate\" Visibility=\"Collapsed\" Background=\"{TemplateBinding Background}\">\r\n\r\n                            <Rectangle Margin=\"0,5,0,5\" Width=\"3\" Fill=\"#FFFFFFFF\" Stroke=\"{StaticResource NormalBorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                            <Rectangle Margin=\"0,5,0,5\" x:Name=\"VerticalTrackRectangleDisabledOverlay\" Width=\"3\" Opacity=\".55\" Visibility=\"Collapsed\" Fill=\"White\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n\r\n                            <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" x:Name=\"VerticalTrackLargeChangeDecreaseRepeatButton\" Grid.Row=\"2\"/>\r\n                            <Thumb IsTabStop=\"True\" Height=\"11\" x:Name=\"VerticalThumb\" Width=\"18\" Grid.Row=\"1\" />\r\n                            <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" x:Name=\"VerticalTrackLargeChangeIncreaseRepeatButton\" Grid.Row=\"0\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- TabControl -->\r\n    <Style TargetType=\"TabControl\">\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"Background\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                    <GradientStop Color=\"#FFFEFEFE\" Offset=\"1\"/>\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"Padding\" Value=\"5\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TabControl\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualTop\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualBottom\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualLeft\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualRight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid x:Name=\"TemplateTop\" Visibility=\"Visible\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"*\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <TabPanel Margin=\"2,2,2,-1\" x:Name=\"TabPanelTop\" Canvas.ZIndex=\"1\" IsItemsHost=\"True\" />\r\n                            <Border MinHeight=\"10\" MinWidth=\"10\" Grid.Row=\"1\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"0,0,3,3\">\r\n                                <ContentPresenter Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"PART_SelectedContentHost\" ContentSource=\"SelectedContent\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"/>\r\n                            </Border>\r\n                            <Border x:Name=\"DisabledVisualTop\" IsHitTestVisible=\"False\" Opacity=\"0\" Grid.Row=\"1\" Grid.RowSpan=\"2\" Canvas.ZIndex=\"1\" Background=\"#8CFFFFFF\" CornerRadius=\"0,0,3,3\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateBottom\" Visibility=\"Collapsed\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"*\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <TabPanel Margin=\"2,-1,2,2\" x:Name=\"TabPanelBottom\" Grid.Row=\"1\" Canvas.ZIndex=\"1\"/>\r\n                            <Border MinHeight=\"10\" MinWidth=\"10\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3,3,0,0\">\r\n                                <ContentPresenter Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"ContentBottom\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"/>\r\n                            </Border>\r\n                            <Border x:Name=\"DisabledVisualBottom\" IsHitTestVisible=\"False\" Opacity=\"0\" Canvas.ZIndex=\"1\" Background=\"#8CFFFFFF\" CornerRadius=\"3,3,0,0\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateLeft\" Visibility=\"Collapsed\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <TabPanel Margin=\"2,2,-1,2\" x:Name=\"TabPanelLeft\" Canvas.ZIndex=\"1\"/>\r\n                            <Border MinHeight=\"10\" MinWidth=\"10\" Grid.Column=\"1\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"0,3,3,0\">\r\n                                <ContentPresenter Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"ContentLeft\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"/>\r\n                            </Border>\r\n                            <Border x:Name=\"DisabledVisualLeft\" IsHitTestVisible=\"False\" Opacity=\"0\" Grid.Column=\"1\" Canvas.ZIndex=\"1\" Background=\"#8CFFFFFF\" CornerRadius=\"0,3,3,0\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateRight\" Visibility=\"Collapsed\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <TabPanel Margin=\"-1,2,2,2\" x:Name=\"TabPanelRight\" Grid.Column=\"1\" Canvas.ZIndex=\"1\"/>\r\n                            <Border MinHeight=\"10\" MinWidth=\"10\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3,0,0,3\">\r\n                                <ContentPresenter Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"ContentRight\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"/>\r\n                            </Border>\r\n                            <Border Margin=\"0\" x:Name=\"DisabledVisualRight\" IsHitTestVisible=\"False\" Opacity=\"0\" Canvas.ZIndex=\"1\" Background=\"#8CFFFFFF\" CornerRadius=\"3,0,0,3\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- TabItem -->\r\n\r\n    <Style TargetType=\"TabItem\">\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"Background\">\r\n            <Setter.Value>\r\n                <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"Padding\" Value=\"6,2,6,2\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"MinWidth\" Value=\"5\"/>\r\n        <Setter Property=\"MinHeight\" Value=\"5\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TabItem\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\"/>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"MouseOver\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"TopUnSelectedMouseOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BottomUnSelectedMouseOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"LeftUnSelectedMouseOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"RightUnSelectedMouseOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.6\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"rectangle1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.6\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"rectangle2\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.6\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"rectangle3\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.6\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualTopSelected\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualTopUnSelected\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualBottomSelected\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualBottomUnSelected\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualLeftSelected\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualLeftUnSelected\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualRightSelected\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualRightUnSelected\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualState x:Name=\"Unselected\"/>\r\n                                <VisualState x:Name=\"Selected\"/>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualTop\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualBottom\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualLeft\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualRight\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid x:Name=\"TemplateTopSelected\" Visibility=\"Visible\" Canvas.ZIndex=\"1\">\r\n                            <Border Margin=\"-2,-2,-2,0\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1,1,1,0\" CornerRadius=\"3,3,0,0\">\r\n                                <Border BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1\" CornerRadius=\"1,1,0,0\">\r\n                                    <Border.Background>\r\n                                        <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                            <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.625\"/>\r\n                                            <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Border.Background>\r\n                                    <Grid>\r\n                                        <Rectangle Margin=\"0,0,0,-2\" Fill=\"{StaticResource SelectedBackgroundBrush}\" x:Name=\"rectangle\"/>\r\n                                        <ContentPresenter HorizontalAlignment=\"Center\" Margin=\"12,2,12,2\" x:Name=\"ContentSite\" VerticalAlignment=\"Center\" RecognizesAccessKey=\"True\" ContentSource=\"Header\"/>\r\n                                        <!--<ContentControl FontSize=\"{TemplateBinding FontSize}\" Foreground=\"{TemplateBinding Foreground}\" IsTabStop=\"False\" Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"HeaderTopSelected\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"/>-->\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border Margin=\"-2,-2,-2,0\" x:Name=\"FocusVisualTop\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HighlightBrush}\" BorderThickness=\"1,1,1,0\" CornerRadius=\"3,3,0,0\"/>\r\n                            <Border Margin=\"-2,-2,-2,0\" x:Name=\"DisabledVisualTopSelected\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"#8CFFFFFF\" CornerRadius=\"3,3,0,0\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateTopUnselected\" Visibility=\"Collapsed\">\r\n                            <Border x:Name=\"BorderTop\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1\" CornerRadius=\"3,3,0,0\">\r\n                                <Border x:Name=\"GradientTop\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1\" CornerRadius=\"1,1,0,0\">\r\n                                    <Border.Background>\r\n                                        <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                            <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.625\"/>\r\n                                            <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Border.Background>\r\n                                    <Grid>\r\n                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\" Foreground=\"{TemplateBinding Foreground}\" IsTabStop=\"False\" Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"HeaderTopUnselected\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"/>\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border x:Name=\"TopUnSelectedMouseOver\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"{StaticResource MouseOverBrush}\" CornerRadius=\"3,3,0,0\" Margin=\"1,1,1,1\" />\r\n                            <Border x:Name=\"DisabledVisualTopUnSelected\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"#8CFFFFFF\" CornerRadius=\"3,3,0,0\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateBottomSelected\" Visibility=\"Collapsed\" Canvas.ZIndex=\"1\">\r\n                            <Border Margin=\"-2,0,-2,-2\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1,0,1,1\" CornerRadius=\"0,0,3,3\">\r\n                                <Border BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1\" CornerRadius=\"0,0,1,1\">\r\n                                    <Border.Background>\r\n                                        <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                            <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.625\"/>\r\n                                            <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Border.Background>\r\n                                    <Grid>\r\n                                        <Rectangle Margin=\"0,-2,0,0\" Fill=\"{StaticResource SelectedBackgroundBrush}\" x:Name=\"rectangle1\"/>\r\n                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\" Foreground=\"{TemplateBinding Foreground}\" IsTabStop=\"False\" Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"HeaderBottomSelected\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"/>\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border Margin=\"-2,0,-2,-2\" x:Name=\"FocusVisualBottom\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HighlightBrush}\" BorderThickness=\"1,0,1,1\" CornerRadius=\"0,0,3,3\"/>\r\n                            <Border Margin=\"-2,0,-2,-2\" x:Name=\"DisabledVisualBottomSelected\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"#8CFFFFFF\" CornerRadius=\"0,0,3,3\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateBottomUnselected\" Visibility=\"Collapsed\">\r\n                            <Border x:Name=\"BorderBottom\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1\" CornerRadius=\"0,0,3,3\">\r\n                                <Border x:Name=\"GradientBottom\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1\" CornerRadius=\"0,0,1,1\">\r\n                                    <Border.Background>\r\n                                        <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                            <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.625\"/>\r\n                                            <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Border.Background>\r\n                                    <Grid>\r\n                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\" Foreground=\"{TemplateBinding Foreground}\" IsTabStop=\"False\" Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"HeaderBottomUnselected\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"/>\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border x:Name=\"BottomUnSelectedMouseOver\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"{StaticResource MouseOverBrush}\" CornerRadius=\"3,3,0,0\" Margin=\"1,1,0,0\" />\r\n                            <Border x:Name=\"DisabledVisualBottomUnSelected\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"#8CFFFFFF\" CornerRadius=\"0,0,3,3\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateLeftSelected\" Visibility=\"Collapsed\" Canvas.ZIndex=\"1\">\r\n                            <Border Margin=\"-2,-2,0,-2\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1,1,0,1\" CornerRadius=\"3,0,0,3\">\r\n                                <Border BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1\" CornerRadius=\"1,0,0,1\">\r\n                                    <Border.Background>\r\n                                        <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                            <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.625\"/>\r\n                                            <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Border.Background>\r\n                                    <Grid>\r\n                                        <Rectangle Margin=\"0,0,-2,0\" Fill=\"{StaticResource SelectedBackgroundBrush}\" x:Name=\"rectangle2\"/>\r\n                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\" Foreground=\"{TemplateBinding Foreground}\" IsTabStop=\"False\" Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"HeaderLeftSelected\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"/>\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border Margin=\"-2,-2,0,-2\" x:Name=\"FocusVisualLeft\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HighlightBrush}\" BorderThickness=\"1,1,0,1\" CornerRadius=\"3,0,0,3\"/>\r\n                            <Border Margin=\"-2,-2,0,-2\" x:Name=\"DisabledVisualLeftSelected\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"#8CFFFFFF\" CornerRadius=\"3,0,0,3\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateLeftUnselected\" Visibility=\"Collapsed\">\r\n                            <Border x:Name=\"BorderLeft\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3,0,0,3\">\r\n                                <Border x:Name=\"GradientLeft\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1\" CornerRadius=\"1,0,0,1\">\r\n                                    <Border.Background>\r\n                                        <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                            <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.625\"/>\r\n                                            <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Border.Background>\r\n                                    <Grid>\r\n                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\" Foreground=\"{TemplateBinding Foreground}\" IsTabStop=\"False\" Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"HeaderLeftUnselected\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"/>\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border x:Name=\"LeftUnSelectedMouseOver\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"{StaticResource MouseOverBrush}\" CornerRadius=\"3,3,0,0\" Margin=\"1,1,0,0\" />\r\n                            <Border x:Name=\"DisabledVisualLeftUnSelected\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"#8CFFFFFF\" CornerRadius=\"3,0,0,3\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateRightSelected\" Visibility=\"Collapsed\" Canvas.ZIndex=\"1\">\r\n                            <Border Margin=\"0,-2,-2,-2\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"0,1,1,1\" CornerRadius=\"0,3,3,0\">\r\n                                <Border BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1\" CornerRadius=\"0,1,1,0\">\r\n                                    <Border.Background>\r\n                                        <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                            <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.625\"/>\r\n                                            <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Border.Background>\r\n                                    <Grid>\r\n                                        <Rectangle Margin=\"-2,0,0,0\" Fill=\"{StaticResource SelectedBackgroundBrush}\" x:Name=\"rectangle3\"/>\r\n                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\" Foreground=\"{TemplateBinding Foreground}\" IsTabStop=\"False\" Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"HeaderRightSelected\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"/>\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border Margin=\"0,-2,-2,-2\" x:Name=\"FocusVisualRight\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HighlightBrush}\" BorderThickness=\"0,1,1,1\" CornerRadius=\"0,3,3,0\"/>\r\n                            <Border Margin=\"0,-2,-2,-2\" x:Name=\"DisabledVisualRightSelected\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"#8CFFFFFF\" CornerRadius=\"0,3,3,0\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateRightUnselected\" Visibility=\"Collapsed\">\r\n                            <Border x:Name=\"BorderRight\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1\" CornerRadius=\"0,3,3,0\">\r\n                                <Border x:Name=\"GradientRight\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1\" CornerRadius=\"0,1,1,0\">\r\n                                    <Border.Background>\r\n                                        <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                            <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.625\"/>\r\n                                            <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Border.Background>\r\n                                    <Grid>\r\n                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\" Foreground=\"{TemplateBinding Foreground}\" IsTabStop=\"False\" Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"HeaderRightUnselected\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"/>\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border x:Name=\"RightUnSelectedMouseOver\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"{StaticResource MouseOverBrush}\" CornerRadius=\"3,3,0,0\" Margin=\"1,1,0,0\" />\r\n                            <Border x:Name=\"DisabledVisualRightUnSelected\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"#8CFFFFFF\" CornerRadius=\"0,3,3,0\"/>\r\n                        </Grid>\r\n                        <Border Margin=\"-1\" x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HighlightBrush}\" BorderThickness=\"1\" CornerRadius=\"3,3,0,0\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- ToggleButton -->\r\n\r\n    <Style TargetType=\"ToggleButton\">\r\n        <Setter Property=\"Background\">\r\n            <Setter.Value>\r\n                <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\"/>\r\n        <Setter Property=\"Padding\" Value=\"3\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ToggleButton\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Border.Background).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"{StaticResource MainColor}\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundAnimation\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.7\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"grid\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\"/>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"Background\" Background=\"White\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\">\r\n                            <Grid Margin=\"1\" Background=\"{TemplateBinding Background}\" Opacity=\"0.5\" x:Name=\"grid\">\r\n                                <Border x:Name=\"BackgroundAnimation\" Background=\"{StaticResource NormalBrush}\"/>\r\n                                <Rectangle x:Name=\"BackgroundGradient\" Fill=\"{StaticResource MouseOverBrush}\" Opacity=\"0\"/>\r\n                            </Grid>\r\n                        </Border>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"contentPresenter\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                        <Rectangle x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"false\" Opacity=\"0\" Fill=\"#FFFFFFFF\" RadiusX=\"3\" RadiusY=\"3\"/>\r\n                        <Rectangle Margin=\"1\" x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- TreeViewItem -->\r\n\r\n    <Style TargetType=\"TreeViewItem\">\r\n\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TreeViewItem\">\r\n                    <Grid Background=\"{TemplateBinding Background}\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Header\" Storyboard.TargetProperty=\"Foreground\" Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <SolidColorBrush Color=\"#FF999999\" />\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualState x:Name=\"Unselected\" />\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"select\" Storyboard.TargetProperty=\"Opacity\" Duration=\"0\" To=\".75\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"SelectedInactive\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"inactive\" Storyboard.TargetProperty=\"Opacity\" Duration=\"0\" To=\".2\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"HasItemsStates\">\r\n                                <VisualState x:Name=\"HasItems\" />\r\n                                <VisualState x:Name=\"NoItems\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"Visibility\" Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"ExpansionStates\">\r\n                                <VisualState x:Name=\"Collapsed\" />\r\n                                <VisualState x:Name=\"Expanded\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"ItemsHost\" Storyboard.TargetProperty=\"Visibility\" Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\" />\r\n                            <RowDefinition Height=\"*\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"15\" />\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"*\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <ToggleButton x:Name=\"Expander\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" BorderBrush=\"{StaticResource NormalBorderBrush}\" IsChecked=\"{Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}\">\r\n                            <ToggleButton.Background>\r\n                                <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n                            </ToggleButton.Background>\r\n                            <ToggleButton.Template>\r\n                                <ControlTemplate TargetType=\"ToggleButton\">\r\n                                    <Grid x:Name=\"Root\" Background=\"Transparent\">\r\n                                        <VisualStateManager.VisualStateGroups>\r\n                                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                                <VisualState x:Name=\"Normal\" />\r\n                                                <VisualState x:Name=\"MouseOver\">\r\n                                                    <Storyboard>\r\n                                                        <ColorAnimation Storyboard.TargetName=\"UncheckedBrush\" Storyboard.TargetProperty=\"Color\" To=\"{StaticResource MainColor}\" Duration=\"0\" />\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                                <VisualState x:Name=\"Disabled\">\r\n                                                    <Storyboard>\r\n                                                        <DoubleAnimation Storyboard.TargetName=\"Root\" Storyboard.TargetProperty=\"Opacity\" To=\".7\" Duration=\"0\" />\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                            </VisualStateGroup>\r\n                                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                                <VisualState x:Name=\"Unchecked\" />\r\n                                                <VisualState x:Name=\"Checked\">\r\n                                                    <Storyboard>\r\n                                                        <DoubleAnimation Storyboard.TargetName=\"UncheckedVisual\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" Duration=\"0\" />\r\n                                                        <DoubleAnimation Storyboard.TargetName=\"CheckedVisual\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" Duration=\"0\" />\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                            </VisualStateGroup>\r\n                                        </VisualStateManager.VisualStateGroups>\r\n                                        <Grid HorizontalAlignment=\"Right\" Margin=\"2 2 5 2\">\r\n                                            <Path x:Name=\"UncheckedVisual\" Width=\"6\" Height=\"9\" Fill=\"#FFFFFFFF\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Right\" Data=\"M 0,0 L 0,9 L 5,4.5 Z\" StrokeThickness=\"1\" StrokeLineJoin=\"Miter\">\r\n                                                <Path.Stroke>\r\n                                                    <SolidColorBrush x:Name=\"UncheckedBrush\" Color=\"#FF989898\" />\r\n                                                </Path.Stroke>\r\n                                            </Path>\r\n                                            <Path x:Name=\"CheckedVisual\" Opacity=\"0\" Width=\"6\" Height=\"6\" Fill=\"#FF262626\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Data=\"M 6,0 L 6,6 L 0,6 Z\" StrokeLineJoin=\"Miter\" />\r\n                                        </Grid>\r\n                                    </Grid>\r\n                                </ControlTemplate>\r\n                            </ToggleButton.Template>\r\n                        </ToggleButton>\r\n                        <Rectangle x:Name=\"select\" Grid.Column=\"1\" Opacity=\"0\" Fill=\"{StaticResource SelectedBackgroundBrush}\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" IsHitTestVisible=\"False\" RadiusX=\"2\" RadiusY=\"2\" />\r\n                        <Rectangle x:Name=\"inactive\" Grid.Column=\"1\" Opacity=\"0\" Fill=\"#FF999999\" Stroke=\"#FF333333\" StrokeThickness=\"1\" IsHitTestVisible=\"False\" RadiusX=\"2\" RadiusY=\"2\" />\r\n                        <Button x:Name=\"PART_Header\" Grid.Column=\"1\" ClickMode=\"Hover\" Content=\"{TemplateBinding Header}\" ContentTemplate=\"{TemplateBinding HeaderTemplate}\" Background=\"{TemplateBinding Background}\" Foreground=\"{TemplateBinding Foreground}\" Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" BorderBrush=\"{StaticResource NormalBorderBrush}\">\r\n                            <Button.Template>\r\n                                <ControlTemplate TargetType=\"Button\">\r\n                                    <Grid Background=\"{TemplateBinding Background}\">\r\n                                        <VisualStateManager.VisualStateGroups>\r\n                                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                                <VisualState x:Name=\"Normal\" />\r\n                                                <VisualState x:Name=\"Pressed\">\r\n                                                    <Storyboard>\r\n                                                        <DoubleAnimation Storyboard.TargetName=\"hover\" Storyboard.TargetProperty=\"Opacity\" Duration=\"0\" To=\".5\" />\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                                <VisualState x:Name=\"Disabled\">\r\n                                                    <Storyboard>\r\n                                                        <DoubleAnimation Storyboard.TargetName=\"content\" Storyboard.TargetProperty=\"Opacity\" Duration=\"0\" To=\".55\" />\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                            </VisualStateGroup>\r\n                                        </VisualStateManager.VisualStateGroups>\r\n                                        <Rectangle x:Name=\"hover\" Opacity=\"0\" Fill=\"{StaticResource SelectedBackgroundBrush}\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" IsHitTestVisible=\"False\" RadiusX=\"2\" RadiusY=\"2\" />\r\n                                        <ContentPresenter x:Name=\"content\" Cursor=\"{TemplateBinding Cursor}\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" HorizontalAlignment=\"Left\" Margin=\"{TemplateBinding Padding}\" />\r\n                                    </Grid>\r\n                                </ControlTemplate>\r\n                            </Button.Template>\r\n                        </Button>\r\n                        <ItemsPresenter x:Name=\"ItemsHost\" Grid.Row=\"1\" Grid.Column=\"1\" Grid.ColumnSpan=\"2\" Visibility=\"Visible\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsExpanded\" Value=\"false\">\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ItemsHost\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"HasItems\" Value=\"false\">\r\n                            <Setter Property=\"Visibility\" Value=\"Hidden\" TargetName=\"Expander\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"TreeView\">\r\n        <Setter Property=\"IsTabStop\" Value=\"True\"/>\r\n        <Setter Property=\"Background\" Value=\"#FFFFFFFF\"/>\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Cursor\" Value=\"Arrow\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"Padding\" Value=\"1\"/>\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"#FFA3AEB9\" Offset=\"0\"/>\r\n                    <GradientStop Color=\"#FF8399A9\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF718597\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF617584\" Offset=\"1\"/>\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TreeView\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <Border x:Name=\"Border\" BorderBrush=\"{StaticResource NormalBorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\">\r\n                            <ScrollViewer Background=\"{TemplateBinding Background}\" BorderBrush=\"Transparent\" BorderThickness=\"0\" Padding=\"{TemplateBinding Padding}\" Margin=\"1\" x:Name=\"ScrollViewer\" HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Auto\" >\r\n                                <ItemsPresenter Margin=\"5\" x:Name=\"TreeItems\"/>\r\n                            </ScrollViewer>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/RainierRadialBlue/Theme.xaml",
    "content": "﻿\r\n<!--\r\n// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n-->\r\n\r\n<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n                    xmlns:basic=\"clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit\"\r\n                    xmlns:primitives=\"clr-namespace:Microsoft.Windows.Controls.Primitives;assembly=WPFToolkit\"\r\n                    xmlns:vsm=\"clr-namespace:System.Windows;assembly=WPFToolkit\">\r\n\r\n    <!-- Default Enhanced -->\r\n    <Color x:Key=\"MainColor\">#FF2A3774</Color>\r\n    <Color x:Key=\"AlternateColor\">#FF2A3774</Color>\r\n    <Color x:Key=\"LightColor\">#FF2A3774</Color>\r\n\r\n    <RadialGradientBrush x:Key=\"NormalBrush\" GradientOrigin=\"0.871,0.034\">\r\n        <RadialGradientBrush.RelativeTransform>\r\n            <TransformGroup>\r\n                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.346\" ScaleY=\"1.346\"/>\r\n            </TransformGroup>\r\n        </RadialGradientBrush.RelativeTransform>\r\n        <GradientStop Color=\"#FF2A3774\" Offset=\"1\"/>\r\n        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n    </RadialGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"NormalBorderBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FF2A3774\"/>\r\n        <GradientStop Color=\"#FF2A3774\" Offset=\"0.375\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"HighlightBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FF1E1976\"/>\r\n        <GradientStop Color=\"#FF373462\" Offset=\"0.531\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <RadialGradientBrush x:Key=\"MouseOverBrush\" GradientOrigin=\"0.871,0.192\">\r\n        <RadialGradientBrush.RelativeTransform>\r\n            <TransformGroup>\r\n                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.346\" ScaleY=\"1.402\"/>\r\n                <TranslateTransform X=\"0\" Y=\"-0.028\"/>\r\n            </TransformGroup>\r\n        </RadialGradientBrush.RelativeTransform>\r\n        <GradientStop Color=\"#FF3B4FAB\" Offset=\"1\"/>\r\n        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n    </RadialGradientBrush>\r\n\r\n    <RadialGradientBrush x:Key=\"SelectedBackgroundBrush\" GradientOrigin=\"0.946,0.163\">\r\n        <RadialGradientBrush.RelativeTransform>\r\n            <TransformGroup>\r\n                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.346\" ScaleY=\"1.346\"/>\r\n            </TransformGroup>\r\n        </RadialGradientBrush.RelativeTransform>\r\n        <GradientStop Color=\"#FF2A3774\" Offset=\"1\"/>\r\n        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n    </RadialGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"WindowBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFFFFFFF\"/>\r\n        <GradientStop Color=\"Blue\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <!-- ScrollBar -->\r\n    <Style TargetType=\"ScrollBar\">\r\n        <Setter Property=\"MinWidth\" Value=\"17\"/>\r\n        <Setter Property=\"MinHeight\" Value=\"17\"/>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ScrollBar\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <Grid.Resources>\r\n                            <ControlTemplate x:Key=\"RepeatButtonTemplate\" TargetType=\"RepeatButton\">\r\n                                <Grid x:Name=\"Root\" Background=\"Transparent\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"HorizontalIncrementTemplate\" TargetType=\"RepeatButton\">\r\n                                <Grid x:Name=\"Root\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundAnimation\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#7FFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#CCFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F2FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundAnimation\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#6BFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#C6FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#EAFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F4FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\".7\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Rectangle x:Name=\"Background\" Opacity=\"0\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" Stroke=\"{StaticResource NormalBorderBrush}\">\r\n                                        <Rectangle.Fill>\r\n                                            <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n                                        </Rectangle.Fill>\r\n                                    </Rectangle>\r\n                                    <Rectangle x:Name=\"BackgroundAnimation\" Opacity=\"0\" Fill=\"{StaticResource MouseOverBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                    <Rectangle Margin=\"1\" x:Name=\"BackgroundGradient\" Opacity=\"0\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\">\r\n                                        <Rectangle.Fill>\r\n                                            <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                                <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.013\"/>\r\n                                                <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                                <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.603\"/>\r\n                                                <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Rectangle.Fill>\r\n                                    </Rectangle>\r\n                                    <Rectangle Margin=\"1\" x:Name=\"Highlight\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                                    <Path Height=\"8\" Width=\"4\" Stretch=\"Uniform\" Data=\"F1 M 511.047,352.682L 511.047,342.252L 517.145,347.467L 511.047,352.682 Z \">\r\n                                        <Path.Fill>\r\n                                            <SolidColorBrush Color=\"#FF333333\" x:Name=\"ButtonColor\"/>\r\n                                        </Path.Fill>\r\n                                    </Path>\r\n                                    <Rectangle x:Name=\"DisabledElement\" Opacity=\"0\" Fill=\"#FFFFFFFF\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"HorizontalDecrementTemplate\" TargetType=\"RepeatButton\">\r\n                                <Grid x:Name=\"Root\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundMouseOver\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#7FFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#CCFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F2FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#6BFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#C6FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#EAFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F4FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\".7\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Rectangle x:Name=\"Background\" Opacity=\"0\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\">\r\n                                        <Rectangle.Fill>\r\n                                            <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n                                        </Rectangle.Fill>\r\n                                        <Rectangle.Stroke>\r\n                                            <LinearGradientBrush EndPoint=\".5,1\" StartPoint=\".5,0\">\r\n                                                <GradientStop Color=\"#FF647480\" Offset=\"1\"/>\r\n                                                <GradientStop Color=\"#FFAEB7BF\" Offset=\"0\"/>\r\n                                                <GradientStop Color=\"#FF919EA7\" Offset=\"0.35\"/>\r\n                                                <GradientStop Color=\"#FF7A8A99\" Offset=\"0.35\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Rectangle.Stroke>\r\n                                    </Rectangle>\r\n                                    <Rectangle x:Name=\"BackgroundMouseOver\" Opacity=\"0\" Fill=\"{StaticResource MouseOverBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                    <Rectangle x:Name=\"BackgroundPressed\" Opacity=\"0\" Fill=\"{StaticResource NormalBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                    <Rectangle Margin=\"1\" x:Name=\"BackgroundGradient\" Opacity=\"0\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\">\r\n                                        <Rectangle.Fill>\r\n                                            <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                                <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.013\"/>\r\n                                                <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                                <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.603\"/>\r\n                                                <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Rectangle.Fill>\r\n                                    </Rectangle>\r\n                                    <Rectangle Margin=\"1\" x:Name=\"Highlight\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                                    <Path Height=\"8\" Width=\"4\" Stretch=\"Uniform\" Data=\"F1 M 110.692,342.252L 110.692,352.682L 104.594,347.467L 110.692,342.252 Z \">\r\n                                        <Path.Fill>\r\n                                            <SolidColorBrush Color=\"#FF333333\" x:Name=\"ButtonColor\"/>\r\n                                        </Path.Fill>\r\n                                    </Path>\r\n                                    <Rectangle x:Name=\"DisabledElement\" Opacity=\"0\" Fill=\"#FFFFFFFF\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"VerticalIncrementTemplate\" TargetType=\"RepeatButton\">\r\n                                <Grid x:Name=\"Root\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundMouseOver\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#7FFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#CCFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F2FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#6BFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#C6FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#EAFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F4FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\".7\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Rectangle x:Name=\"Background\" Opacity=\"0\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\">\r\n                                        <Rectangle.Fill>\r\n                                            <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n                                        </Rectangle.Fill>\r\n                                        <Rectangle.Stroke>\r\n                                            <LinearGradientBrush EndPoint=\"1,.5\" StartPoint=\"0,.5\">\r\n                                                <GradientStop Color=\"#FF647480\" Offset=\"1\"/>\r\n                                                <GradientStop Color=\"#FFAEB7BF\" Offset=\"0\"/>\r\n                                                <GradientStop Color=\"#FF919EA7\" Offset=\"0.35\"/>\r\n                                                <GradientStop Color=\"#FF7A8A99\" Offset=\"0.35\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Rectangle.Stroke>\r\n                                    </Rectangle>\r\n                                    <Rectangle x:Name=\"BackgroundMouseOver\" Opacity=\"0\" Fill=\"{StaticResource MouseOverBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                    <Rectangle x:Name=\"BackgroundPressed\" Opacity=\"0\" Fill=\"{StaticResource NormalBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                    <Rectangle Margin=\"1\" x:Name=\"BackgroundGradient\" Opacity=\"0\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\">\r\n                                        <Rectangle.Fill>\r\n                                            <LinearGradientBrush EndPoint=\"1,.7\" StartPoint=\"0,.7\">\r\n                                                <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.013\"/>\r\n                                                <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                                <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.603\"/>\r\n                                                <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Rectangle.Fill>\r\n                                    </Rectangle>\r\n                                    <Rectangle Margin=\"1\" x:Name=\"Highlight\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                                    <Path Height=\"4\" Width=\"8\" Stretch=\"Uniform\" Data=\"F1 M 531.107,321.943L 541.537,321.943L 536.322,328.042L 531.107,321.943 Z \">\r\n                                        <Path.Fill>\r\n                                            <SolidColorBrush Color=\"#FF333333\" x:Name=\"ButtonColor\"/>\r\n                                        </Path.Fill>\r\n                                    </Path>\r\n                                    <Rectangle x:Name=\"DisabledElement\" Opacity=\"0\" Fill=\"#FFFFFFFF\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"VerticalDecrementTemplate\" TargetType=\"RepeatButton\">\r\n                                <Grid x:Name=\"Root\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundMouseOver\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#7FFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#CCFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F2FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#6BFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#C6FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#EAFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F4FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\".7\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Rectangle x:Name=\"Background\" Opacity=\"0\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" Stroke=\"{StaticResource NormalBorderBrush}\">\r\n                                        <Rectangle.Fill>\r\n                                            <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n                                        </Rectangle.Fill>\r\n                                    </Rectangle>\r\n                                    <Rectangle x:Name=\"BackgroundMouseOver\" Opacity=\"0\" Fill=\"{StaticResource MouseOverBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                    <Rectangle x:Name=\"BackgroundPressed\" Opacity=\"0\" Fill=\"{StaticResource NormalBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                    <Rectangle Margin=\"1\" x:Name=\"BackgroundGradient\" Opacity=\"0\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\">\r\n                                        <Rectangle.Fill>\r\n                                            <LinearGradientBrush EndPoint=\"1,.7\" StartPoint=\"0,.7\">\r\n                                                <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.013\"/>\r\n                                                <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                                <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.603\"/>\r\n                                                <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Rectangle.Fill>\r\n                                    </Rectangle>\r\n                                    <Rectangle Margin=\"1\" x:Name=\"Highlight\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                                    <Path Height=\"4\" Width=\"8\" Stretch=\"Uniform\" Data=\"F1 M 541.537,173.589L 531.107,173.589L 536.322,167.49L 541.537,173.589 Z \">\r\n                                        <Path.Fill>\r\n                                            <SolidColorBrush Color=\"#FF333333\" x:Name=\"ButtonColor\"/>\r\n                                        </Path.Fill>\r\n                                    </Path>\r\n                                    <Rectangle x:Name=\"DisabledElement\" Opacity=\"0\" Fill=\"#FFFFFFFF\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"VerticalThumbTemplate\" TargetType=\"Thumb\">\r\n                                <Grid>\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundMouseOver\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#7FFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#CCFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F2FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#6BFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#C6FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#EAFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F4FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ThumbVisual\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"0\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Grid Margin=\"1,0,1,0\" x:Name=\"ThumbVisual\">\r\n                                        <Rectangle x:Name=\"Background\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" Stroke=\"{StaticResource NormalBorderBrush}\">\r\n                                            <Rectangle.Fill>\r\n                                                <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n                                            </Rectangle.Fill>\r\n                                        </Rectangle>\r\n                                        <Rectangle x:Name=\"BackgroundMouseOver\" Opacity=\"0\" Fill=\"{StaticResource MouseOverBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                        <Rectangle x:Name=\"BackgroundPressed\" Opacity=\"0\" Fill=\"{StaticResource NormalBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                        <Rectangle Margin=\"1\" x:Name=\"BackgroundGradient\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\">\r\n                                            <Rectangle.Fill>\r\n                                                <LinearGradientBrush EndPoint=\"1,.7\" StartPoint=\"0,.7\">\r\n                                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                                    <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                                    <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.6\"/>\r\n                                                    <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                                </LinearGradientBrush>\r\n                                            </Rectangle.Fill>\r\n                                        </Rectangle>\r\n                                        <Rectangle Margin=\"1\" x:Name=\"Highlight\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                                    </Grid>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"HorizontalThumbTemplate\" TargetType=\"Thumb\">\r\n                                <Grid>\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundMouseOver\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#7FFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#CCFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F2FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#6BFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#C6FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#EAFFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F4FFFFFF\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ThumbVisual\" Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\" Value=\"0\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Grid Margin=\"0,1,0,1\" x:Name=\"ThumbVisual\">\r\n                                        <Rectangle x:Name=\"Background\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" Stroke=\"{StaticResource NormalBorderBrush}\">\r\n                                            <Rectangle.Fill>\r\n                                                <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n                                            </Rectangle.Fill>\r\n                                        </Rectangle>\r\n                                        <Rectangle x:Name=\"BackgroundMouseOver\" Opacity=\"0\" Fill=\"{StaticResource MouseOverBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                        <Rectangle x:Name=\"BackgroundPressed\" Opacity=\"0\" Fill=\"{StaticResource NormalBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                        <Rectangle Margin=\"1\" x:Name=\"BackgroundGradient\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\">\r\n                                            <Rectangle.Fill>\r\n                                                <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.013\"/>\r\n                                                    <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                                    <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.603\"/>\r\n                                                    <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                                </LinearGradientBrush>\r\n                                            </Rectangle.Fill>\r\n                                        </Rectangle>\r\n                                        <Rectangle Margin=\"1\" x:Name=\"Highlight\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                                    </Grid>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Root\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid x:Name=\"HorizontalRoot\" Visibility=\"Collapsed\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <Rectangle Grid.ColumnSpan=\"5\" Stroke=\"{StaticResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\">\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,0\" StartPoint=\"0.5,1\">\r\n                                        <GradientStop Color=\"#FFF4F6F7\" Offset=\"0\"/>\r\n                                        <GradientStop Color=\"#FFF0F4F7\" Offset=\"0.344\"/>\r\n                                        <GradientStop Color=\"#FFDFE3E6\" Offset=\"1\"/>\r\n                                        <GradientStop Color=\"#FFE9EEF4\" Offset=\"0.527\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                            <Rectangle Grid.ColumnSpan=\"5\" Fill=\"{TemplateBinding Background}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                            <Rectangle Opacity=\".375\" Grid.ColumnSpan=\"5\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\">\r\n                                <Rectangle.Stroke>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                        <GradientStop Color=\"#FFA3AEB9\" Offset=\"0\"/>\r\n                                        <GradientStop Color=\"#FF8399A9\" Offset=\"0.375\"/>\r\n                                        <GradientStop Color=\"#FF718597\" Offset=\"0.375\"/>\r\n                                        <GradientStop Color=\"#FF617584\" Offset=\"1\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Stroke>\r\n                            </Rectangle>\r\n                            <Rectangle Margin=\"1\" Grid.ColumnSpan=\"5\" RadiusX=\"1\" RadiusY=\"1\">\r\n                                <Rectangle.Stroke>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,.125\" StartPoint=\".5,.875\">\r\n                                        <GradientStop Color=\"#33FFFFFF\"/>\r\n                                        <GradientStop Color=\"#99FFFFFF\" Offset=\"1\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Stroke>\r\n                            </Rectangle>\r\n                            <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource HorizontalDecrementTemplate}\" Margin=\"1\" x:Name=\"HorizontalSmallDecrease\" Width=\"16\" Grid.Column=\"0\" Interval=\"50\"/>\r\n\r\n                            <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" x:Name=\"HorizontalLargeDecrease\" Width=\"0\" Grid.Column=\"1\" Interval=\"50\"/>\r\n                            <Thumb Background=\"{TemplateBinding Background}\" Template=\"{StaticResource HorizontalThumbTemplate}\" MinWidth=\"18\" x:Name=\"HorizontalThumb\" Width=\"18\" Grid.Column=\"2\"/>\r\n                            <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" x:Name=\"HorizontalLargeIncrease\" Grid.Column=\"3\" Interval=\"50\"/>\r\n\r\n                            <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource HorizontalIncrementTemplate}\" Margin=\"1\" x:Name=\"HorizontalSmallIncrease\" Width=\"16\" Grid.Column=\"4\" Interval=\"50\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"VerticalRoot\" Visibility=\"Visible\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"*\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <Rectangle Grid.RowSpan=\"3\" Stroke=\"{StaticResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\">\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush EndPoint=\"0,0.5\" StartPoint=\"1,0.5\">\r\n                                        <GradientStop Color=\"#FFF4F6F7\" Offset=\"0\"/>\r\n                                        <GradientStop Color=\"#FFF0F4F7\" Offset=\"0.344\"/>\r\n                                        <GradientStop Color=\"#FFDFE3E6\" Offset=\"1\"/>\r\n                                        <GradientStop Color=\"#FFE9EEF4\" Offset=\"0.527\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                            <Rectangle Opacity=\".375\" Grid.RowSpan=\"3\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Stroke=\"{StaticResource NormalBorderBrush}\"/>\r\n                            <Rectangle Margin=\"1\" Grid.RowSpan=\"3\" RadiusX=\"1\" RadiusY=\"1\">\r\n                                <Rectangle.Stroke>\r\n                                    <LinearGradientBrush EndPoint=\"0.125,0.5\" StartPoint=\"0.875,0.5\">\r\n                                        <GradientStop Color=\"#33FFFFFF\"/>\r\n                                        <GradientStop Color=\"#99FFFFFF\" Offset=\"1\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Stroke>\r\n                            </Rectangle>\r\n\r\n                            <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource VerticalDecrementTemplate}\" Height=\"16\" Margin=\"1\" x:Name=\"VerticalSmallDecrease\" Grid.Row=\"0\" Interval=\"50\" Command=\"ScrollBar.LineUpCommand\" />\r\n\r\n                            <Track Grid.Row=\"1\" x:Name=\"PART_Track\" Orientation=\"Vertical\" IsDirectionReversed=\"true\">\r\n                                <Track.Thumb>\r\n                                    <Thumb MinHeight=\"18\" x:Name=\"VerticalThumb\" Template=\"{StaticResource VerticalThumbTemplate}\" />\r\n                                </Track.Thumb>\r\n                                <Track.IncreaseRepeatButton>\r\n                                    <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Command=\"ScrollBar.PageDownCommand\" Interval=\"50\" />\r\n                                </Track.IncreaseRepeatButton>\r\n                                <Track.DecreaseRepeatButton>\r\n                                    <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Command=\"ScrollBar.PageUpCommand\" Interval=\"50\" />\r\n                                </Track.DecreaseRepeatButton>\r\n                            </Track>\r\n\r\n                            <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource VerticalIncrementTemplate}\" Height=\"16\" Margin=\"1\" x:Name=\"VerticalSmallIncrease\" Grid.Row=\"4\" Interval=\"50\" Command=\"ScrollBar.LineDownCommand\" />\r\n\r\n                        </Grid>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"Orientation\" Value=\"Horizontal\">\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"Root\">\r\n                                <Setter.Value>\r\n                                    <RotateTransform Angle=\"-90\"/>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"ScrollViewer\">\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Padding\" Value=\"4\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ScrollViewer\">\r\n                    <Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\">\r\n                        <Grid Background=\"{TemplateBinding Background}\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"*\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <ScrollContentPresenter Cursor=\"{TemplateBinding Cursor}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"ScrollContentPresenter\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                            <Rectangle Grid.Column=\"1\" Grid.Row=\"1\" Fill=\"#FFE9EEF4\"/>\r\n                            <ScrollBar IsTabStop=\"False\" Margin=\"0,-1,-1,-1\" x:Name=\"PART_VerticalScrollBar\" Width=\"18\" Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Grid.Column=\"1\" Grid.Row=\"0\" Orientation=\"Vertical\" ViewportSize=\"{TemplateBinding ViewportHeight}\" Maximum=\"{TemplateBinding ScrollableHeight}\" Minimum=\"0\" Value=\"{TemplateBinding VerticalOffset}\" />\r\n                            <ScrollBar IsTabStop=\"False\" Height=\"18\" Margin=\"-1,0,-1,-1\" x:Name=\"PART_HorizontalScrollBar\" Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Grid.Column=\"0\" Grid.Row=\"1\" Orientation=\"Horizontal\" ViewportSize=\"{TemplateBinding ViewportWidth}\" Maximum=\"{TemplateBinding ScrollableWidth}\" Minimum=\"0\" Value=\"{TemplateBinding HorizontalOffset}\" />\r\n                        </Grid>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- Button -->\r\n    <Style TargetType=\"Button\">\r\n        <Setter Property=\"Background\">\r\n            <Setter.Value>\r\n                <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\"/>\r\n        <Setter Property=\"Padding\" Value=\"3\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Button\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"grid\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\".55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"Background\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" Background=\"{x:Null}\">\r\n                            <Grid Margin=\"1\" Background=\"{TemplateBinding Background}\" x:Name=\"grid\">\r\n                                <Border x:Name=\"BackgroundAnimation\" Background=\"{StaticResource NormalBrush}\" BorderBrush=\"#FFFFFFFF\"/>\r\n                                <Rectangle x:Name=\"BackgroundGradient\" Fill=\"{StaticResource MouseOverBrush}\" Stroke=\"{x:Null}\" Opacity=\"0\"/>\r\n                            </Grid>\r\n                        </Border>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"contentPresenter\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                        <Rectangle x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"false\" Opacity=\"0\" Fill=\"#FFFFFFFF\" RadiusX=\"3\" RadiusY=\"3\"/>\r\n                        <Rectangle Margin=\"1\" x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- TextBox -->\r\n    <Style TargetType=\"TextBox\">\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"Background\" Value=\"#FFFFFFFF\"/>\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\"/>\r\n        <Setter Property=\"Padding\" Value=\"2\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TextBox\">\r\n                    <Grid x:Name=\"RootElement\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"MouseOverBorder\" Storyboard.TargetProperty=\"(Border.BorderBrush).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"{StaticResource MainColor}\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ReadOnly\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ReadOnlyVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"Border\" Opacity=\"1\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"1\">\r\n                            <Grid>\r\n                                <Border x:Name=\"ReadOnlyVisualElement\" Opacity=\"0\" Background=\"#72F7F7F7\"/>\r\n                                <Border x:Name=\"MouseOverBorder\" BorderBrush=\"Transparent\" BorderThickness=\"1\">\r\n                                    <ScrollViewer BorderThickness=\"0\" IsTabStop=\"False\" Padding=\"{TemplateBinding Padding}\" x:Name=\"PART_ContentHost\"/>\r\n                                </Border>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Border x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"False\" Opacity=\"0\" Background=\"#A5F7F7F7\" BorderBrush=\"#A5F7F7F7\" BorderThickness=\"{TemplateBinding BorderThickness}\"/>\r\n                        <Border Margin=\"1\" x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Opacity=\"0\" BorderBrush=\"{StaticResource HighlightBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- ComboBoxItem -->\r\n    <Style TargetType=\"ComboBoxItem\">\r\n        <Setter Property=\"Padding\" Value=\"3\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"Local\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ComboBoxItem\">\r\n                    <Grid Background=\"{TemplateBinding Background}\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"fillColor\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.75\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\".55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualState x:Name=\"Unselected\"/>\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"fillColor2\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\".75\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Rectangle x:Name=\"fillColor\" IsHitTestVisible=\"False\" Opacity=\"0\" Fill=\"{StaticResource MouseOverBrush}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                        <Rectangle x:Name=\"fillColor2\" IsHitTestVisible=\"False\" Opacity=\"0\" Fill=\"{StaticResource SelectedBackgroundBrush}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" />\r\n                        <Rectangle x:Name=\"FocusVisualElement\" Visibility=\"Collapsed\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- ComboBox -->\r\n    <Style TargetType=\"ComboBox\">\r\n        <Setter Property=\"Padding\" Value=\"6,2,25,2\"/>\r\n        <Setter Property=\"Background\" Value=\"#FF1F3B53\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"Once\"/>\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"#FFA3AEB9\" Offset=\"0\"/>\r\n                    <GradientStop Color=\"#FF8399A9\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF718597\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF617584\" Offset=\"1\"/>\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ComboBox\">\r\n                    <Grid>\r\n                        <Grid.Resources>\r\n                            <Style TargetType=\"ToggleButton\" x:Name=\"comboToggleStyle\">\r\n                                <Setter Property=\"Foreground\" Value=\"#FF333333\"/>\r\n                                <Setter Property=\"Background\">\r\n                                    <Setter.Value>\r\n                                        <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n                                    </Setter.Value>\r\n                                </Setter>\r\n                                <Setter Value=\"{StaticResource NormalBorderBrush}\" Property=\"BorderBrush\"/>\r\n                                <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n                                <Setter Property=\"Padding\" Value=\"3\"/>\r\n                                <Setter Property=\"Template\">\r\n                                    <Setter.Value>\r\n                                        <ControlTemplate TargetType=\"ToggleButton\">\r\n                                            <Grid>\r\n                                                <VisualStateManager.VisualStateGroups>\r\n                                                    <VisualStateGroup x:Name=\"CommonStates\">\r\n                                                        <VisualState x:Name=\"Normal\"/>\r\n                                                        <VisualState x:Name=\"MouseOver\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BackgroundOverlay2\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Pressed\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.6\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n\r\n\r\n\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Disabled\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledVisual\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                    </VisualStateGroup>\r\n                                                    <VisualStateGroup x:Name=\"CheckStates\">\r\n                                                        <VisualState x:Name=\"Checked\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BackgroundOverlay3\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Unchecked\"/>\r\n                                                    </VisualStateGroup>\r\n                                                    <VisualStateGroup x:Name=\"FocusStates\">\r\n                                                        <VisualState x:Name=\"Focused\">\r\n                                                            <Storyboard>\r\n                                                                <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Visibility\">\r\n                                                                    <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                                        <DiscreteObjectKeyFrame.Value>\r\n                                                                            <Visibility>Visible</Visibility>\r\n                                                                        </DiscreteObjectKeyFrame.Value>\r\n                                                                    </DiscreteObjectKeyFrame>\r\n                                                                </ObjectAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Unfocused\"/>\r\n                                                    </VisualStateGroup>\r\n                                                </VisualStateManager.VisualStateGroups>\r\n                                                <Rectangle x:Name=\"Background\" Fill=\"{TemplateBinding Background}\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" RadiusX=\"3\" RadiusY=\"3\"/>\r\n                                                <Rectangle x:Name=\"BackgroundOverlay\" StrokeThickness=\"{TemplateBinding BorderThickness}\" RadiusX=\"3\" RadiusY=\"3\" Fill=\"{StaticResource NormalBrush}\" Margin=\"1,1,1,1\">\r\n                                                    <Rectangle.Stroke>\r\n                                                        <SolidColorBrush Color=\"#FFFFFFFF\"/>\r\n                                                    </Rectangle.Stroke>\r\n                                                </Rectangle>\r\n                                                <Rectangle x:Name=\"BackgroundOverlay2\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"{TemplateBinding BorderThickness}\" RadiusX=\"3\" RadiusY=\"3\" Fill=\"{StaticResource MouseOverBrush}\" Opacity=\"0\" Margin=\"1,1,1,1\"/>\r\n                                                <Rectangle x:Name=\"BackgroundOverlay3\" Stroke=\"{x:Null}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" RadiusX=\"3\" RadiusY=\"3\" Opacity=\"0\" Margin=\"1,1,1,1\" Fill=\"#7FFFFFFF\"/>\r\n                                                <Rectangle Margin=\"{TemplateBinding BorderThickness}\" x:Name=\"Highlight\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                                <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"contentPresenter\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                                                <Rectangle Margin=\"1\" x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"3.5\" RadiusY=\"3.5\"/>\r\n                                                <Rectangle Fill=\"#99F4F4F4\" x:Name=\"DisabledVisual\" Opacity=\"0\" Stroke=\"{x:Null}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                            </Grid>\r\n                                        </ControlTemplate>\r\n                                    </Setter.Value>\r\n                                </Setter>\r\n                            </Style>\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\".55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                                <VisualState x:Name=\"FocusedDropDown\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00\" Storyboard.TargetName=\"PopupBorder\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"ContentPresenterBorder\">\r\n                            <Grid>\r\n                                <ToggleButton BorderThickness=\"{TemplateBinding BorderThickness}\" HorizontalContentAlignment=\"Right\" HorizontalAlignment=\"Stretch\" Margin=\"0\" x:Name=\"DropDownToggle\" Style=\"{DynamicResource comboToggleStyle}\" VerticalAlignment=\"Stretch\" IsChecked=\"{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\">\r\n                                    <Path Height=\"4\" HorizontalAlignment=\"Right\" Margin=\"0,0,6,0\" x:Name=\"BtnArrow\" Width=\"8\" Stretch=\"Uniform\" Data=\"F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z \">\r\n                                        <Path.Fill>\r\n                                            <SolidColorBrush Color=\"#FF333333\" x:Name=\"BtnArrowColor\"/>\r\n                                        </Path.Fill>\r\n                                    </Path>\r\n                                </ToggleButton>\r\n                                <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"ContentPresenter\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Content=\"{TemplateBinding SelectionBoxItem}\" ContentTemplate=\"{TemplateBinding SelectionBoxItemTemplate}\" ContentTemplateSelector=\"{TemplateBinding ItemTemplateSelector}\" IsHitTestVisible=\"False\"/>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Rectangle x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"false\" Opacity=\"0\" Fill=\"White\" RadiusX=\"3\" RadiusY=\"3\"/>\r\n                        <Rectangle Margin=\"1\" x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                        <Popup x:Name=\"Popup\" IsOpen=\"{TemplateBinding IsDropDownOpen}\">\r\n                            <Grid MaxHeight=\"{TemplateBinding MaxDropDownHeight}\" MinWidth=\"{TemplateBinding ActualWidth}\" x:Name=\"DropDown\" SnapsToDevicePixels=\"True\">\r\n\r\n                                <Border Height=\"Auto\" HorizontalAlignment=\"Stretch\" x:Name=\"PopupBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\">\r\n                                    <Border.Background>\r\n                                        <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#FFFEFEFE\" Offset=\"1\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Border.Background>\r\n                                    <ScrollViewer BorderThickness=\"0\" Padding=\"1\" SnapsToDevicePixels=\"True\" HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Auto\" CanContentScroll=\"True\">\r\n                                        <ItemsPresenter/>\r\n                                    </ScrollViewer>\r\n                                </Border>\r\n\r\n                            </Grid>\r\n                        </Popup>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- ListBoxItem -->\r\n    <Style TargetType=\"ListBoxItem\">\r\n        <Setter Property=\"Padding\" Value=\"3\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"Local\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ListBoxItem\">\r\n                    <Grid Background=\"{TemplateBinding Background}\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"fillColor\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.75\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\".55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualState x:Name=\"Unselected\"/>\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"fillColor2\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\".75\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Rectangle x:Name=\"fillColor\" IsHitTestVisible=\"False\" Opacity=\"0\" Fill=\"{StaticResource MouseOverBrush}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                        <Rectangle x:Name=\"fillColor2\" IsHitTestVisible=\"False\" Opacity=\"0\" Fill=\"{StaticResource SelectedBackgroundBrush}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" />\r\n                        <Rectangle x:Name=\"FocusVisualElement\" Visibility=\"Collapsed\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- ListBox -->\r\n    <Style TargetType=\"ListBox\">\r\n        <Setter Property=\"Padding\" Value=\"1\"/>\r\n        <Setter Property=\"Background\" Value=\"#FFFFFFFF\"/>\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"Once\"/>\r\n        <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\"/>\r\n        <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\"/>\r\n        <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"True\"/>\r\n        <Setter Value=\"{StaticResource NormalBorderBrush}\" Property=\"BorderBrush\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ListBox\">\r\n                    <Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\">\r\n                        <ScrollViewer Background=\"{TemplateBinding Background}\" BorderBrush=\"Transparent\" BorderThickness=\"0\" Padding=\"{TemplateBinding Padding}\" x:Name=\"ScrollViewer\" >\r\n                            <ItemsPresenter/>\r\n                        </ScrollViewer>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- Expander -->\r\n    <Style TargetType=\"Expander\">\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Expander\">\r\n                    <Grid Background=\"Transparent\">\r\n                        <Grid.Resources>\r\n                            <LinearGradientBrush x:Key=\"ExpanderArrowFill\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n                                <GradientStop Color=\"White\" Offset=\"0\"/>\r\n                                <GradientStop Color=\"#FFBFBFBF\" Offset=\"0.5\"/>\r\n                                <GradientStop Color=\"#FF878787\" Offset=\"1\"/>\r\n                            </LinearGradientBrush>\r\n                            <LinearGradientBrush x:Key=\"ExpanderArrowHoverFill\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n                                <GradientStop Color=\"#FFF0F8FE\" Offset=\"0\"/>\r\n                                <GradientStop Color=\"#FFE0F3FE\" Offset=\"0.3\"/>\r\n                                <GradientStop Color=\"#FF6FA7C5\" Offset=\"1\"/>\r\n                            </LinearGradientBrush>\r\n                            <LinearGradientBrush x:Key=\"ExpanderArrowPressedFill\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n                                <GradientStop Color=\"#FFDCF0FA\" Offset=\"0\"/>\r\n                                <GradientStop Color=\"#FFC5E6F7\" Offset=\"0.2\"/>\r\n                                <GradientStop Color=\"#FF5690D0\" Offset=\"1\"/>\r\n                            </LinearGradientBrush>\r\n                            <ControlTemplate x:Key=\"ExpanderDownHeaderTemplate\" TargetType=\"ToggleButton\">\r\n                                <Grid Background=\"Transparent\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CheckStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Checked\">\r\n                                                <!--                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"Data\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"M 1,4.5 L 4.5,1 L 8,4.5\"/>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>-->\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Unchecked\"/>\r\n                                        </VisualStateGroup>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <ColorAnimation BeginTime=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(Path.Stroke).(SolidColorBrush.Color)\" To=\"#222\"/>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"circle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.8\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <ColorAnimation BeginTime=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(Path.Stroke).(SolidColorBrush.Color)\" To=\"#FF003366\"/>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"circle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.7\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                        <VisualStateGroup x:Name=\"FocusStates\">\r\n                                            <VisualState x:Name=\"Focused\">\r\n                                                <!--                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Visibility\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Visible\"/>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>-->\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Unfocused\"/>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Border Padding=\"{TemplateBinding Padding}\">\r\n                                        <Grid Background=\"Transparent\">\r\n                                            <Grid.ColumnDefinitions>\r\n                                                <ColumnDefinition Width=\"19\"/>\r\n                                                <ColumnDefinition Width=\"*\"/>\r\n                                            </Grid.ColumnDefinitions>\r\n                                            <Grid HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\">\r\n                                                <Ellipse Height=\"19\" HorizontalAlignment=\"Center\" x:Name=\"circle\" VerticalAlignment=\"Center\" Width=\"19\" Fill=\"{StaticResource MouseOverBrush}\" Stroke=\"{StaticResource NormalBorderBrush}\"/>\r\n                                                <Path HorizontalAlignment=\"Center\" x:Name=\"arrow\" VerticalAlignment=\"Center\" Stroke=\"#666\" StrokeThickness=\"2\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\"/>\r\n                                            </Grid>\r\n                                            <ContentPresenter HorizontalAlignment=\"Left\" Margin=\"4,0,0,0\" x:Name=\"header\" VerticalAlignment=\"Center\" Grid.Column=\"1\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                                        </Grid>\r\n                                    </Border>\r\n                                    <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HighlightBrush}\" BorderThickness=\"1\" CornerRadius=\"3\"/>\r\n                                </Grid>\r\n                                <ControlTemplate.Triggers>\r\n                                    <Trigger Property=\"IsChecked\" Value=\"True\">\r\n                                        <Setter Property=\"Data\" TargetName=\"arrow\" Value=\"M 1,4.5 L 4.5,1 L 8,4.5\" />\r\n                                    </Trigger>\r\n                                </ControlTemplate.Triggers>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"ExpanderUpHeaderTemplate\" TargetType=\"ToggleButton\">\r\n                                <Grid Background=\"Transparent\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CheckStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Checked\">\r\n                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"Data\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"M 1,4.5 L 4.5,1 L 8,4.5\"/>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Unchecked\"/>\r\n                                        </VisualStateGroup>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <ColorAnimation BeginTime=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(Path.Stroke).(SolidColorBrush.Color)\" To=\"#222\"/>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"circle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.8\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <ColorAnimation BeginTime=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(Path.Stroke).(SolidColorBrush.Color)\" To=\"#FF003366\"/>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"circle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.7\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                        <VisualStateGroup x:Name=\"FocusStates\">\r\n                                            <VisualState x:Name=\"Focused\">\r\n                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Visibility\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                            <DiscreteObjectKeyFrame.Value>\r\n                                                                <Visibility>Visible</Visibility>\r\n                                                            </DiscreteObjectKeyFrame.Value>\r\n                                                        </DiscreteObjectKeyFrame>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Unfocused\"/>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Border Padding=\"{TemplateBinding Padding}\">\r\n                                        <Grid Background=\"Transparent\">\r\n                                            <Grid.ColumnDefinitions>\r\n                                                <ColumnDefinition Width=\"19\"/>\r\n                                                <ColumnDefinition Width=\"*\"/>\r\n                                            </Grid.ColumnDefinitions>\r\n                                            <Grid HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\">\r\n                                                <Grid.RenderTransform>\r\n                                                    <TransformGroup>\r\n                                                        <TransformGroup.Children>\r\n                                                            <TransformCollection>\r\n                                                                <RotateTransform Angle=\"180\" CenterX=\"9.5\" CenterY=\"9.5\"/>\r\n                                                            </TransformCollection>\r\n                                                        </TransformGroup.Children>\r\n                                                    </TransformGroup>\r\n                                                </Grid.RenderTransform>\r\n                                                <Ellipse Height=\"19\" HorizontalAlignment=\"Center\" x:Name=\"circle\" VerticalAlignment=\"Center\" Width=\"19\" Fill=\"{StaticResource MouseOverBrush}\" Stroke=\"{StaticResource NormalBorderBrush}\"/>\r\n                                                <Path HorizontalAlignment=\"Center\" x:Name=\"arrow\" VerticalAlignment=\"Center\" Stroke=\"#666\" StrokeThickness=\"2\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\"/>\r\n                                            </Grid>\r\n                                            <ContentPresenter HorizontalAlignment=\"Left\" Margin=\"4,0,0,0\" x:Name=\"header\" VerticalAlignment=\"Center\" Grid.Column=\"1\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                                        </Grid>\r\n                                    </Border>\r\n                                    <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HighlightBrush}\" BorderThickness=\"1\" CornerRadius=\"3\"/>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"ExpanderLeftHeaderTemplate\" TargetType=\"ToggleButton\">\r\n                                <Grid Background=\"Transparent\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CheckStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Checked\">\r\n                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"Data\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"M 1,4.5 L 4.5,1 L 8,4.5\"/>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Unchecked\"/>\r\n                                        </VisualStateGroup>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <ColorAnimation BeginTime=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(Path.Stroke).(SolidColorBrush.Color)\" To=\"#222\"/>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"circle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.8\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <ColorAnimation BeginTime=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(Path.Stroke).(SolidColorBrush.Color)\" To=\"#FF003366\"/>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"circle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.7\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                        <VisualStateGroup x:Name=\"FocusStates\">\r\n                                            <VisualState x:Name=\"Focused\">\r\n                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Visibility\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                            <DiscreteObjectKeyFrame.Value>\r\n                                                                <Visibility>Visible</Visibility>\r\n                                                            </DiscreteObjectKeyFrame.Value>\r\n                                                        </DiscreteObjectKeyFrame>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Unfocused\"/>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Border Padding=\"{TemplateBinding Padding}\">\r\n                                        <Grid Background=\"Transparent\">\r\n                                            <Grid.RowDefinitions>\r\n                                                <RowDefinition Height=\"19\"/>\r\n                                                <RowDefinition Height=\"*\"/>\r\n                                            </Grid.RowDefinitions>\r\n                                            <Grid HorizontalAlignment=\"Center\" VerticalAlignment=\"Top\">\r\n                                                <Grid.RenderTransform>\r\n                                                    <TransformGroup>\r\n                                                        <TransformGroup.Children>\r\n                                                            <TransformCollection>\r\n                                                                <RotateTransform Angle=\"90\" CenterX=\"9.5\" CenterY=\"9.5\"/>\r\n                                                            </TransformCollection>\r\n                                                        </TransformGroup.Children>\r\n                                                    </TransformGroup>\r\n                                                </Grid.RenderTransform>\r\n                                                <Ellipse Height=\"19\" HorizontalAlignment=\"Center\" x:Name=\"circle\" VerticalAlignment=\"Center\" Width=\"19\" Fill=\"{StaticResource MouseOverBrush}\" Stroke=\"{StaticResource NormalBorderBrush}\"/>\r\n                                                <Path HorizontalAlignment=\"Center\" x:Name=\"arrow\" VerticalAlignment=\"Center\" Stroke=\"#666\" StrokeThickness=\"2\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\"/>\r\n                                            </Grid>\r\n                                            <ContentPresenter HorizontalAlignment=\"Center\" Margin=\"0,4,0,0\" x:Name=\"header\" VerticalAlignment=\"Top\" Grid.Row=\"1\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                                        </Grid>\r\n                                    </Border>\r\n                                    <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HighlightBrush}\" BorderThickness=\"1\" CornerRadius=\"3\"/>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"ExpanderRightHeaderTemplate\" TargetType=\"ToggleButton\">\r\n                                <Grid Background=\"Transparent\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CheckStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Checked\">\r\n                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"Data\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"M 1,4.5 L 4.5,1 L 8,4.5\"/>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Unchecked\"/>\r\n                                        </VisualStateGroup>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <ColorAnimation BeginTime=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(Path.Stroke).(SolidColorBrush.Color)\" To=\"#222\"/>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"circle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.8\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <ColorAnimation BeginTime=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"(Path.Stroke).(SolidColorBrush.Color)\" To=\"#FF003366\"/>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"circle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.7\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                        <VisualStateGroup x:Name=\"FocusStates\">\r\n                                            <VisualState x:Name=\"Focused\">\r\n                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Visibility\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                            <DiscreteObjectKeyFrame.Value>\r\n                                                                <Visibility>Visible</Visibility>\r\n                                                            </DiscreteObjectKeyFrame.Value>\r\n                                                        </DiscreteObjectKeyFrame>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Unfocused\"/>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Border Padding=\"{TemplateBinding Padding}\">\r\n                                        <Grid Background=\"Transparent\">\r\n                                            <Grid.RowDefinitions>\r\n                                                <RowDefinition Height=\"19\"/>\r\n                                                <RowDefinition Height=\"*\"/>\r\n                                            </Grid.RowDefinitions>\r\n                                            <Grid HorizontalAlignment=\"Center\" VerticalAlignment=\"Top\">\r\n                                                <Grid.RenderTransform>\r\n                                                    <TransformGroup>\r\n                                                        <TransformGroup.Children>\r\n                                                            <TransformCollection>\r\n                                                                <RotateTransform Angle=\"-90\" CenterX=\"9.5\" CenterY=\"9.5\"/>\r\n                                                            </TransformCollection>\r\n                                                        </TransformGroup.Children>\r\n                                                    </TransformGroup>\r\n                                                </Grid.RenderTransform>\r\n                                                <Ellipse Height=\"19\" HorizontalAlignment=\"Center\" x:Name=\"circle\" VerticalAlignment=\"Center\" Width=\"19\" Fill=\"{StaticResource MouseOverBrush}\" Stroke=\"{StaticResource NormalBorderBrush}\"/>\r\n                                                <Path HorizontalAlignment=\"Center\" x:Name=\"arrow\" VerticalAlignment=\"Center\" Stroke=\"#666\" StrokeThickness=\"2\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\"/>\r\n                                            </Grid>\r\n                                            <ContentPresenter HorizontalAlignment=\"Center\" Margin=\"0,4,0,0\" x:Name=\"header\" VerticalAlignment=\"Top\" Grid.Row=\"1\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                                        </Grid>\r\n                                    </Border>\r\n                                    <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HighlightBrush}\" BorderThickness=\"1\" CornerRadius=\"3\"/>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" To=\"1\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"ExpansionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Collapsed\"/>\r\n                                <VisualState x:Name=\"Expanded\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"ExpandDirectionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"ExpandDown\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd1\" Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"*\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"*\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ExpandUp\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"Template\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ExpanderUpHeaderTemplate}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"*\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"*\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ExpandLeft\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"Template\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ExpanderLeftHeaderTemplate}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"*\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"*\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ExpandRight\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"Template\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ExpanderRightHeaderTemplate}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"1\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"*\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd1\" Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"*\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"Background\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" Padding=\"{TemplateBinding Padding}\">\r\n                            <Grid>\r\n                                <Grid.RowDefinitions>\r\n                                    <RowDefinition Height=\"Auto\" x:Name=\"rd0\"/>\r\n                                    <RowDefinition Height=\"*\" x:Name=\"rd1\"/>\r\n                                </Grid.RowDefinitions>\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\" x:Name=\"cd0\"/>\r\n                                    <ColumnDefinition Width=\"*\" x:Name=\"cd1\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <ToggleButton FontFamily=\"{TemplateBinding FontFamily}\" FontSize=\"{TemplateBinding FontSize}\" FontStretch=\"{TemplateBinding FontStretch}\" FontStyle=\"{TemplateBinding FontStyle}\" FontWeight=\"{TemplateBinding FontWeight}\" Foreground=\"{TemplateBinding Foreground}\" Template=\"{StaticResource ExpanderDownHeaderTemplate}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"1\" MinHeight=\"0\" MinWidth=\"0\" x:Name=\"ExpanderButton\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Grid.Column=\"0\" Grid.Row=\"0\" Content=\"{TemplateBinding Header}\" ContentTemplate=\"{TemplateBinding HeaderTemplate}\" BorderBrush=\"{StaticResource NormalBorderBrush}\" IsChecked=\"{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" Grid.ColumnSpan=\"2\">\r\n                                    <ToggleButton.Background>\r\n                                        <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n                                    </ToggleButton.Background>\r\n                                </ToggleButton>\r\n\r\n                                <ContentPresenter \r\n                                    HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" \r\n                                    Margin=\"1\" \r\n                                    MinHeight=\"0\" MinWidth=\"0\" x:Name=\"ExpandSite\" \r\n                                    VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" \r\n                                    Visibility=\"Collapsed\" Grid.Column=\"0\" Grid.Row=\"1\" Grid.ColumnSpan=\"2\"\r\n                                    />\r\n\r\n                                <!--\r\n                                Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                                \r\n                                    FontFamily=\"{TemplateBinding FontFamily}\" \r\n                                    FontSize=\"{TemplateBinding FontSize}\" \r\n                                    FontStretch=\"{TemplateBinding FontStretch}\" \r\n                                    FontStyle=\"{TemplateBinding FontStyle}\" \r\n                                    FontWeight=\"{TemplateBinding FontWeight}\" \r\n                                    Foreground=\"{TemplateBinding Foreground}\" \r\n                                -->\r\n                            </Grid>\r\n                        </Border>\r\n                        <Border x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"#A5FFFFFF\" CornerRadius=\"3\"/>\r\n                        <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HighlightBrush}\" BorderThickness=\"1\" CornerRadius=\"3\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsExpanded\" Value=\"True\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"ExpandSite\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- ProgressBar-->\r\n    <Style TargetType=\"ProgressBar\">\r\n        <Setter Property=\"Foreground\">\r\n            <Setter.Value>\r\n                <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Background\" Value=\"#FFD8D7D2\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"Maximum\" Value=\"100\"/>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ProgressBar\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <Border x:Name=\"PART_Track\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\"/>\r\n                        <Grid x:Name=\"ProgressBarRootGrid\">\r\n                            <Rectangle Margin=\"{TemplateBinding BorderThickness}\" x:Name=\"ProgressBarRootGradient\" Canvas.ZIndex=\"1\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\" RadiusX=\"1.5\" RadiusY=\"1.5\">\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                        <GradientStop Color=\"#D8FFFFFF\" Offset=\"0\"/>\r\n                                        <GradientStop Color=\"#7FFFFFFF\" Offset=\"0.316\"/>\r\n                                        <GradientStop Color=\"#00FFFFFF\" Offset=\"0.444\"/>\r\n                                        <GradientStop Color=\"#33FFFFFF\" Offset=\"1\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                            <Grid x:Name=\"IndeterminateRoot\" Visibility=\"Collapsed\">\r\n                                <Rectangle Margin=\"{TemplateBinding BorderThickness}\" x:Name=\"IndeterminateSolidFill\" Opacity=\"1\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"{TemplateBinding Foreground}\" StrokeThickness=\"0\" RadiusX=\"2\" RadiusY=\"2\">\r\n                                    <Rectangle.Stroke>\r\n                                        <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n                                    </Rectangle.Stroke>\r\n                                </Rectangle>\r\n                                <Rectangle Margin=\"{TemplateBinding BorderThickness}\" x:Name=\"IndeterminateGradientFill\" Opacity=\"0.7\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\">\r\n                                    <Rectangle.Fill>\r\n                                        <LinearGradientBrush EndPoint=\"0,1\" StartPoint=\"20,1\" MappingMode=\"Absolute\" SpreadMethod=\"Repeat\">\r\n                                            <LinearGradientBrush.Transform>\r\n                                                <TransformGroup>\r\n                                                    <TranslateTransform X=\"0\"/>\r\n                                                    <SkewTransform AngleX=\"-30\"/>\r\n                                                </TransformGroup>\r\n                                            </LinearGradientBrush.Transform>\r\n                                            <GradientStop Color=\"#FF785F06\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#00FFBA00\" Offset=\".25\"/>\r\n                                            <GradientStop Color=\"{StaticResource AlternateColor}\" Offset=\"0.85\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Rectangle.Fill>\r\n                                </Rectangle>\r\n                            </Grid>\r\n                            <Grid Margin=\"1\" x:Name=\"DeterminateRoot\">\r\n                                <Rectangle HorizontalAlignment=\"Left\" Margin=\"{TemplateBinding BorderThickness}\" x:Name=\"PART_Indicator\" Fill=\"{TemplateBinding Foreground}\" StrokeThickness=\"0.5\" RadiusX=\"1.5\" RadiusY=\"1.5\"/>\r\n                            </Grid>\r\n                        </Grid>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsIndeterminate\" Value=\"True\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard>\r\n                                    <Storyboard RepeatBehavior=\"Forever\">\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00\" Storyboard.TargetName=\"IndeterminateRoot\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00\" Storyboard.TargetName=\"DeterminateRoot\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"IndeterminateGradientFill\" Storyboard.TargetProperty=\"(Shape.Fill).(LinearGradientBrush.Transform).(TransformGroup.Children)[0].X\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:.5\" Value=\"20\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </BeginStoryboard>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- CheckBox -->\r\n    <Style TargetType=\"CheckBox\">\r\n        <Setter Property=\"Background\">\r\n            <Setter.Value>\r\n                <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Padding\" Value=\"4,1,0,0\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"CheckBox\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundOverlay\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddleBackground\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#7FFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#CCFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F2FFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundOverlay\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddleBackground\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#6BFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#C6FFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#EAFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F4FFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"grid\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\".55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\"/>\r\n                                <VisualState x:Name=\"Indeterminate\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"IndeterminateIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ContentFocusVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"16\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" x:Name=\"grid\">\r\n                            <Rectangle Height=\"14\" Margin=\"1\" x:Name=\"Background\" Width=\"14\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" RadiusX=\"1\" RadiusY=\"1\" Fill=\"{x:Null}\"/>\r\n                            <Rectangle Height=\"14\" Margin=\"1\" x:Name=\"BackgroundOverlay\" Width=\"14\" Opacity=\"0\" Fill=\"{StaticResource NormalBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                            <Rectangle Height=\"10\" x:Name=\"BoxMiddleBackground\" Width=\"10\" Fill=\"{TemplateBinding Background}\" Stroke=\"#00000000\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                            <Rectangle Height=\"10\" x:Name=\"BoxMiddle\" Width=\"10\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Stroke=\"{x:Null}\">\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush EndPoint=\"0.64,0.88\" StartPoint=\"0.62,0.15\">\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.013\"/>\r\n                                        <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                        <GradientStop Color=\"#EAFFFFFF\" Offset=\"0.603\"/>\r\n                                        <GradientStop Color=\"#D8FFFFFF\" Offset=\"1\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                            <Rectangle Height=\"10\" x:Name=\"BoxMiddleLine\" Width=\"10\" Opacity=\".2\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                            <Path Height=\"10\" Margin=\"1,1,0,1.5\" x:Name=\"CheckIcon\" Width=\"10.5\" Opacity=\"0\" Fill=\"#FF333333\" Stretch=\"Fill\" Data=\"M102.03442,598.79645 L105.22962,597.78918 L106.78825,600.42358 C106.78825,600.42358 108.51028,595.74304 110.21724,593.60419 C112.00967,591.35822 114.89314,591.42316 114.89314,591.42316 C114.89314,591.42316 112.67844,593.42645 111.93174,594.44464 C110.7449,596.06293 107.15683,604.13837 107.15683,604.13837 z\"/>\r\n                            <Rectangle Height=\"2\" x:Name=\"IndeterminateIcon\" Width=\"6\" Opacity=\"0\" Fill=\"#FF333333\"/>\r\n                            <Rectangle Height=\"14\" x:Name=\"DisabledVisualElement\" Width=\"14\" Opacity=\"0\" Fill=\"#FFFFFFFF\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                            <Rectangle Height=\"16\" x:Name=\"ContentFocusVisualElement\" Width=\"16\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                        </Grid>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"contentPresenter\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Grid.Column=\"1\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- RadioButton -->\r\n    <Style TargetType=\"RadioButton\">\r\n        <Setter Property=\"Background\">\r\n            <Setter.Value>\r\n                <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Padding\" Value=\"4,1,0,0\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"RadioButton\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundOverlay\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddleBackground\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#7FFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#CCFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F2FFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundOverlay\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddleBackground\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#6BFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#C6FFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#EAFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BoxMiddle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#F4FFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"grid\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\".55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\"/>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ContentFocusVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"16\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\" x:Name=\"grid\">\r\n                            <Ellipse Height=\"14\" Margin=\"1\" x:Name=\"Background\" Width=\"14\" Fill=\"#FFFFFFFF\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\"/>\r\n                            <Ellipse Height=\"14\" Margin=\"1\" x:Name=\"BackgroundOverlay\" Width=\"14\" Opacity=\"0\" Fill=\"{StaticResource NormalBrush}\" Stroke=\"#00000000\" StrokeThickness=\"1\"/>\r\n                            <Ellipse Height=\"10\" x:Name=\"BoxMiddleBackground\" Width=\"10\" Fill=\"{TemplateBinding Background}\" Stroke=\"#00000000\" StrokeThickness=\"1\"/>\r\n                            <Ellipse Height=\"10\" x:Name=\"BoxMiddle\" Width=\"10\" StrokeThickness=\"1\" Stroke=\"{x:Null}\">\r\n                                <Ellipse.Fill>\r\n                                    <LinearGradientBrush EndPoint=\"0.64,0.88\" StartPoint=\"0.62,0.15\">\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.013\"/>\r\n                                        <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                        <GradientStop Color=\"#EAFFFFFF\" Offset=\"0.603\"/>\r\n                                        <GradientStop Color=\"#D8FFFFFF\" Offset=\"1\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Ellipse.Fill>\r\n                            </Ellipse>\r\n                            <Ellipse Height=\"10\" x:Name=\"BoxMiddleLine\" Width=\"10\" Opacity=\".2\" Stroke=\"#FF333333\" StrokeThickness=\"1\"/>\r\n                            <Ellipse Height=\"4\" x:Name=\"CheckIcon\" Width=\"4\" Opacity=\"0\" Fill=\"#FF333333\"/>\r\n                            <Ellipse Height=\"14\" x:Name=\"DisabledVisualElement\" Width=\"14\" Opacity=\"0\" Fill=\"#FFFFFFFF\"/>\r\n                            <Ellipse Height=\"16\" x:Name=\"ContentFocusVisualElement\" Width=\"16\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\"/>\r\n                        </Grid>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"contentPresenter\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Grid.Column=\"1\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- Thumb -->\r\n    <Style TargetType=\"Thumb\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Thumb\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"grid\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.7\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\".55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"Background\" Background=\"White\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\">\r\n                            <Grid Margin=\"1\" Background=\"{TemplateBinding Background}\" x:Name=\"grid\">\r\n                                <Border x:Name=\"BackgroundAnimation\" Background=\"{StaticResource NormalBrush}\"/>\r\n                                <Rectangle x:Name=\"BackgroundGradient\" Fill=\"{StaticResource MouseOverBrush}\" Opacity=\"0\"/>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Rectangle x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"false\" Opacity=\"0\" Fill=\"#FFFFFFFF\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                        <Rectangle Margin=\"1\" x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- Slider -->\r\n    <Style TargetType=\"Slider\">\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"Maximum\" Value=\"10\"/>\r\n        <Setter Property=\"Minimum\" Value=\"0\"/>\r\n        <Setter Property=\"Value\" Value=\"0\"/>\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"#FFA3AEB9\" Offset=\"0\"/>\r\n                    <GradientStop Color=\"#FF8399A9\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF718597\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF617584\" Offset=\"1\"/>\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Slider\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <Grid.Resources>\r\n                            <ControlTemplate x:Key=\"RepeatButtonTemplate\">\r\n                                <Grid x:Name=\"Root\" Opacity=\"0\" Background=\"Transparent\"/>\r\n                            </ControlTemplate>\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"HorizontalTrackRectangleDisabledOverlay\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ThumbDisabledOverlay\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"VerticalTrackRectangleDisabledOverlay\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid x:Name=\"HorizontalTemplate\" Background=\"{TemplateBinding Background}\">\r\n\r\n                            <Rectangle Height=\"3\" Margin=\"5,0,5,0\" x:Name=\"TrackRectangle\" Grid.Column=\"0\" Grid.ColumnSpan=\"3\" Fill=\"#FFFFFFFF\" Stroke=\"{StaticResource NormalBorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                            <Rectangle Height=\"3\" Margin=\"5,0,5,0\" x:Name=\"HorizontalTrackRectangleDisabledOverlay\" Opacity=\".55\" Visibility=\"Collapsed\" Grid.Column=\"0\" Grid.ColumnSpan=\"3\" Fill=\"White\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n\r\n\r\n                            <Track x:Name=\"PART_Track\">\r\n                                <Track.Thumb>\r\n                                    <Thumb Height=\"18\" x:Name=\"HorizontalThumb\" Width=\"11\" IsTabStop=\"True\" />\r\n                                </Track.Thumb>\r\n                                <Track.IncreaseRepeatButton>\r\n                                    <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Command=\"Slider.IncreaseLarge\" />\r\n                                </Track.IncreaseRepeatButton>\r\n                                <Track.DecreaseRepeatButton>\r\n                                    <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Command=\"Slider.DecreaseLarge\" />\r\n                                </Track.DecreaseRepeatButton>\r\n                            </Track>\r\n\r\n\r\n\r\n                            <!--<Rectangle x:Name=\"ThumbDisabledOverlay\" Width=\"11\" Opacity=\".55\" Visibility=\"Collapsed\" Grid.Column=\"1\" Fill=\"White\" RadiusX=\"2\" RadiusY=\"2\"/>-->\r\n                        </Grid>\r\n                        <Grid x:Name=\"VerticalTemplate\" Visibility=\"Collapsed\" Background=\"{TemplateBinding Background}\">\r\n\r\n                            <Rectangle Margin=\"0,5,0,5\" Width=\"3\" Fill=\"#FFFFFFFF\" Stroke=\"{StaticResource NormalBorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                            <Rectangle Margin=\"0,5,0,5\" x:Name=\"VerticalTrackRectangleDisabledOverlay\" Width=\"3\" Opacity=\".55\" Visibility=\"Collapsed\" Fill=\"White\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n\r\n                            <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" x:Name=\"VerticalTrackLargeChangeDecreaseRepeatButton\" Grid.Row=\"2\"/>\r\n                            <Thumb IsTabStop=\"True\" Height=\"11\" x:Name=\"VerticalThumb\" Width=\"18\" Grid.Row=\"1\" />\r\n                            <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" x:Name=\"VerticalTrackLargeChangeIncreaseRepeatButton\" Grid.Row=\"0\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- TabControl -->\r\n    <Style TargetType=\"TabControl\">\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"Background\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                    <GradientStop Color=\"#FFFEFEFE\" Offset=\"1\"/>\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"Padding\" Value=\"5\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TabControl\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualTop\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualBottom\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualLeft\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualRight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid x:Name=\"TemplateTop\" Visibility=\"Visible\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"*\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <TabPanel Margin=\"2,2,2,-1\" x:Name=\"TabPanelTop\" Canvas.ZIndex=\"1\" IsItemsHost=\"True\"/>\r\n                            <Border MinHeight=\"10\" MinWidth=\"10\" Grid.Row=\"1\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"0,0,3,3\">\r\n                                <ContentPresenter Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"PART_SelectedContentHost\" ContentSource=\"SelectedContent\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"/>\r\n                            </Border>\r\n                            <Border x:Name=\"DisabledVisualTop\" IsHitTestVisible=\"False\" Opacity=\"0\" Grid.Row=\"1\" Grid.RowSpan=\"2\" Canvas.ZIndex=\"1\" Background=\"#8CFFFFFF\" CornerRadius=\"0,0,3,3\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateBottom\" Visibility=\"Collapsed\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"*\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <TabPanel Margin=\"2,-1,2,2\" x:Name=\"TabPanelBottom\" Grid.Row=\"1\" Canvas.ZIndex=\"1\"/>\r\n                            <Border MinHeight=\"10\" MinWidth=\"10\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3,3,0,0\">\r\n                                <ContentPresenter Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"ContentBottom\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"/>\r\n                            </Border>\r\n                            <Border x:Name=\"DisabledVisualBottom\" IsHitTestVisible=\"False\" Opacity=\"0\" Canvas.ZIndex=\"1\" Background=\"#8CFFFFFF\" CornerRadius=\"3,3,0,0\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateLeft\" Visibility=\"Collapsed\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <TabPanel Margin=\"2,2,-1,2\" x:Name=\"TabPanelLeft\" Canvas.ZIndex=\"1\"/>\r\n                            <Border MinHeight=\"10\" MinWidth=\"10\" Grid.Column=\"1\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"0,3,3,0\">\r\n                                <ContentPresenter Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"ContentLeft\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"/>\r\n                            </Border>\r\n                            <Border x:Name=\"DisabledVisualLeft\" IsHitTestVisible=\"False\" Opacity=\"0\" Grid.Column=\"1\" Canvas.ZIndex=\"1\" Background=\"#8CFFFFFF\" CornerRadius=\"0,3,3,0\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateRight\" Visibility=\"Collapsed\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <TabPanel Margin=\"-1,2,2,2\" x:Name=\"TabPanelRight\" Grid.Column=\"1\" Canvas.ZIndex=\"1\"/>\r\n                            <Border MinHeight=\"10\" MinWidth=\"10\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3,0,0,3\">\r\n                                <ContentPresenter Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"ContentRight\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"/>\r\n                            </Border>\r\n                            <Border Margin=\"0\" x:Name=\"DisabledVisualRight\" IsHitTestVisible=\"False\" Opacity=\"0\" Canvas.ZIndex=\"1\" Background=\"#8CFFFFFF\" CornerRadius=\"3,0,0,3\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- TabItem -->\r\n\r\n    <Style TargetType=\"TabItem\">\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"Background\">\r\n            <Setter.Value>\r\n                <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"Padding\" Value=\"6,2,6,2\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"MinWidth\" Value=\"5\"/>\r\n        <Setter Property=\"MinHeight\" Value=\"5\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TabItem\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\"/>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"MouseOver\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"TopUnSelectedMouseOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BottomUnSelectedMouseOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"LeftUnSelectedMouseOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"RightUnSelectedMouseOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.6\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"rectangle1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.6\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"rectangle2\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.6\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"rectangle3\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.6\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualTopSelected\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualTopUnSelected\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualBottomSelected\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualBottomUnSelected\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualLeftSelected\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualLeftUnSelected\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualRightSelected\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualRightUnSelected\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualState x:Name=\"Unselected\"/>\r\n                                <VisualState x:Name=\"Selected\"/>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualTop\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualBottom\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualLeft\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualRight\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid x:Name=\"TemplateTopSelected\" Visibility=\"Visible\" Canvas.ZIndex=\"1\">\r\n                            <Border Margin=\"-2,-2,-2,0\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1,1,1,0\" CornerRadius=\"3,3,0,0\">\r\n                                <Border BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1\" CornerRadius=\"1,1,0,0\">\r\n                                    <Border.Background>\r\n                                        <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                            <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.625\"/>\r\n                                            <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Border.Background>\r\n                                    <Grid>\r\n                                        <Rectangle Margin=\"0,0,0,-2\" Fill=\"{StaticResource SelectedBackgroundBrush}\" x:Name=\"rectangle\"/>\r\n                                        <ContentPresenter HorizontalAlignment=\"Center\" Margin=\"12,2,12,2\" x:Name=\"ContentSite\" VerticalAlignment=\"Center\" RecognizesAccessKey=\"True\" ContentSource=\"Header\"/>\r\n                                        <!--<ContentControl FontSize=\"{TemplateBinding FontSize}\" Foreground=\"{TemplateBinding Foreground}\" IsTabStop=\"False\" Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"HeaderTopSelected\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"/>-->\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border Margin=\"-2,-2,-2,0\" x:Name=\"FocusVisualTop\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HighlightBrush}\" BorderThickness=\"1,1,1,0\" CornerRadius=\"3,3,0,0\"/>\r\n                            <Border Margin=\"-2,-2,-2,0\" x:Name=\"DisabledVisualTopSelected\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"#8CFFFFFF\" CornerRadius=\"3,3,0,0\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateTopUnselected\" Visibility=\"Collapsed\">\r\n                            <Border x:Name=\"BorderTop\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1\" CornerRadius=\"3,3,0,0\">\r\n                                <Border x:Name=\"GradientTop\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1\" CornerRadius=\"1,1,0,0\">\r\n                                    <Border.Background>\r\n                                        <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                            <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.625\"/>\r\n                                            <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Border.Background>\r\n                                    <Grid>\r\n                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\" Foreground=\"{TemplateBinding Foreground}\" IsTabStop=\"False\" Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"HeaderTopUnselected\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"/>\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border x:Name=\"TopUnSelectedMouseOver\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"{StaticResource MouseOverBrush}\" CornerRadius=\"3,3,0,0\" Margin=\"1,1,1,1\" />\r\n                            <Border x:Name=\"DisabledVisualTopUnSelected\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"#8CFFFFFF\" CornerRadius=\"3,3,0,0\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateBottomSelected\" Visibility=\"Collapsed\" Canvas.ZIndex=\"1\">\r\n                            <Border Margin=\"-2,0,-2,-2\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1,0,1,1\" CornerRadius=\"0,0,3,3\">\r\n                                <Border BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1\" CornerRadius=\"0,0,1,1\">\r\n                                    <Border.Background>\r\n                                        <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                            <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.625\"/>\r\n                                            <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Border.Background>\r\n                                    <Grid>\r\n                                        <Rectangle Margin=\"0,-2,0,0\" Fill=\"{StaticResource SelectedBackgroundBrush}\" x:Name=\"rectangle1\"/>\r\n                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\" Foreground=\"{TemplateBinding Foreground}\" IsTabStop=\"False\" Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"HeaderBottomSelected\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"/>\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border Margin=\"-2,0,-2,-2\" x:Name=\"FocusVisualBottom\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HighlightBrush}\" BorderThickness=\"1,0,1,1\" CornerRadius=\"0,0,3,3\"/>\r\n                            <Border Margin=\"-2,0,-2,-2\" x:Name=\"DisabledVisualBottomSelected\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"#8CFFFFFF\" CornerRadius=\"0,0,3,3\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateBottomUnselected\" Visibility=\"Collapsed\">\r\n                            <Border x:Name=\"BorderBottom\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1\" CornerRadius=\"0,0,3,3\">\r\n                                <Border x:Name=\"GradientBottom\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1\" CornerRadius=\"0,0,1,1\">\r\n                                    <Border.Background>\r\n                                        <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                            <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.625\"/>\r\n                                            <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Border.Background>\r\n                                    <Grid>\r\n                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\" Foreground=\"{TemplateBinding Foreground}\" IsTabStop=\"False\" Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"HeaderBottomUnselected\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"/>\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border x:Name=\"BottomUnSelectedMouseOver\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"{StaticResource MouseOverBrush}\" CornerRadius=\"3,3,0,0\" Margin=\"1,1,0,0\" />\r\n                            <Border x:Name=\"DisabledVisualBottomUnSelected\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"#8CFFFFFF\" CornerRadius=\"0,0,3,3\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateLeftSelected\" Visibility=\"Collapsed\" Canvas.ZIndex=\"1\">\r\n                            <Border Margin=\"-2,-2,0,-2\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1,1,0,1\" CornerRadius=\"3,0,0,3\">\r\n                                <Border BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1\" CornerRadius=\"1,0,0,1\">\r\n                                    <Border.Background>\r\n                                        <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                            <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.625\"/>\r\n                                            <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Border.Background>\r\n                                    <Grid>\r\n                                        <Rectangle Margin=\"0,0,-2,0\" Fill=\"{StaticResource SelectedBackgroundBrush}\" x:Name=\"rectangle2\"/>\r\n                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\" Foreground=\"{TemplateBinding Foreground}\" IsTabStop=\"False\" Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"HeaderLeftSelected\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"/>\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border Margin=\"-2,-2,0,-2\" x:Name=\"FocusVisualLeft\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HighlightBrush}\" BorderThickness=\"1,1,0,1\" CornerRadius=\"3,0,0,3\"/>\r\n                            <Border Margin=\"-2,-2,0,-2\" x:Name=\"DisabledVisualLeftSelected\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"#8CFFFFFF\" CornerRadius=\"3,0,0,3\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateLeftUnselected\" Visibility=\"Collapsed\">\r\n                            <Border x:Name=\"BorderLeft\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3,0,0,3\">\r\n                                <Border x:Name=\"GradientLeft\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1\" CornerRadius=\"1,0,0,1\">\r\n                                    <Border.Background>\r\n                                        <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                            <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.625\"/>\r\n                                            <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Border.Background>\r\n                                    <Grid>\r\n                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\" Foreground=\"{TemplateBinding Foreground}\" IsTabStop=\"False\" Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"HeaderLeftUnselected\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"/>\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border x:Name=\"LeftUnSelectedMouseOver\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"{StaticResource MouseOverBrush}\" CornerRadius=\"3,3,0,0\" Margin=\"1,1,0,0\" />\r\n                            <Border x:Name=\"DisabledVisualLeftUnSelected\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"#8CFFFFFF\" CornerRadius=\"3,0,0,3\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateRightSelected\" Visibility=\"Collapsed\" Canvas.ZIndex=\"1\">\r\n                            <Border Margin=\"0,-2,-2,-2\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"0,1,1,1\" CornerRadius=\"0,3,3,0\">\r\n                                <Border BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1\" CornerRadius=\"0,1,1,0\">\r\n                                    <Border.Background>\r\n                                        <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                            <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.625\"/>\r\n                                            <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Border.Background>\r\n                                    <Grid>\r\n                                        <Rectangle Margin=\"-2,0,0,0\" Fill=\"{StaticResource SelectedBackgroundBrush}\" x:Name=\"rectangle3\"/>\r\n                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\" Foreground=\"{TemplateBinding Foreground}\" IsTabStop=\"False\" Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"HeaderRightSelected\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"/>\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border Margin=\"0,-2,-2,-2\" x:Name=\"FocusVisualRight\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HighlightBrush}\" BorderThickness=\"0,1,1,1\" CornerRadius=\"0,3,3,0\"/>\r\n                            <Border Margin=\"0,-2,-2,-2\" x:Name=\"DisabledVisualRightSelected\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"#8CFFFFFF\" CornerRadius=\"0,3,3,0\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateRightUnselected\" Visibility=\"Collapsed\">\r\n                            <Border x:Name=\"BorderRight\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1\" CornerRadius=\"0,3,3,0\">\r\n                                <Border x:Name=\"GradientRight\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1\" CornerRadius=\"0,1,1,0\">\r\n                                    <Border.Background>\r\n                                        <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#F9FFFFFF\" Offset=\"0.375\"/>\r\n                                            <GradientStop Color=\"#E5FFFFFF\" Offset=\"0.625\"/>\r\n                                            <GradientStop Color=\"#C6FFFFFF\" Offset=\"1\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Border.Background>\r\n                                    <Grid>\r\n                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\" Foreground=\"{TemplateBinding Foreground}\" IsTabStop=\"False\" Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"HeaderRightUnselected\" VerticalAlignment=\"{TemplateBinding VerticalAlignment}\"/>\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border x:Name=\"RightUnSelectedMouseOver\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"{StaticResource MouseOverBrush}\" CornerRadius=\"3,3,0,0\" Margin=\"1,1,0,0\" />\r\n                            <Border x:Name=\"DisabledVisualRightUnSelected\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"#8CFFFFFF\" CornerRadius=\"0,3,3,0\"/>\r\n                        </Grid>\r\n                        <Border Margin=\"-1\" x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HighlightBrush}\" BorderThickness=\"1\" CornerRadius=\"3,3,0,0\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- ToggleButton -->\r\n\r\n    <Style TargetType=\"ToggleButton\">\r\n        <Setter Property=\"Background\">\r\n            <Setter.Value>\r\n                <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\"/>\r\n        <Setter Property=\"Padding\" Value=\"3\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ToggleButton\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BackgroundGradient\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Border.Background).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"{StaticResource MainColor}\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundAnimation\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.7\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"grid\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\"/>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"Background\" Background=\"White\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\">\r\n                            <Grid Margin=\"1\" Background=\"{TemplateBinding Background}\" Opacity=\"0.5\" x:Name=\"grid\">\r\n                                <Border x:Name=\"BackgroundAnimation\" Background=\"{StaticResource NormalBrush}\"/>\r\n                                <Rectangle x:Name=\"BackgroundGradient\" Fill=\"{StaticResource MouseOverBrush}\" Opacity=\"0\"/>\r\n                            </Grid>\r\n                        </Border>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"contentPresenter\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                        <Rectangle x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"false\" Opacity=\"0\" Fill=\"#FFFFFFFF\" RadiusX=\"3\" RadiusY=\"3\"/>\r\n                        <Rectangle Margin=\"1\" x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- TreeViewItem -->\r\n\r\n    <Style TargetType=\"TreeViewItem\">\r\n\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TreeViewItem\">\r\n                    <Grid Background=\"{TemplateBinding Background}\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"Header\" Storyboard.TargetProperty=\"Foreground\" Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <SolidColorBrush Color=\"#FF999999\" />\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualState x:Name=\"Unselected\" />\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"select\" Storyboard.TargetProperty=\"Opacity\" Duration=\"0\" To=\".75\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"SelectedInactive\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"inactive\" Storyboard.TargetProperty=\"Opacity\" Duration=\"0\" To=\".2\" />\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"HasItemsStates\">\r\n                                <VisualState x:Name=\"HasItems\" />\r\n                                <VisualState x:Name=\"NoItems\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"Visibility\" Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"ExpansionStates\">\r\n                                <VisualState x:Name=\"Collapsed\" />\r\n                                <VisualState x:Name=\"Expanded\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"ItemsHost\" Storyboard.TargetProperty=\"Visibility\" Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\" />\r\n                            <RowDefinition Height=\"*\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"15\" />\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"*\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <ToggleButton x:Name=\"Expander\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" BorderBrush=\"{StaticResource NormalBorderBrush}\" IsChecked=\"{Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}\">\r\n                            <ToggleButton.Background>\r\n                                <SolidColorBrush Color=\"{StaticResource MainColor}\"/>\r\n                            </ToggleButton.Background>\r\n                            <ToggleButton.Template>\r\n                                <ControlTemplate TargetType=\"ToggleButton\">\r\n                                    <Grid x:Name=\"Root\" Background=\"Transparent\">\r\n                                        <VisualStateManager.VisualStateGroups>\r\n                                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                                <VisualState x:Name=\"Normal\" />\r\n                                                <VisualState x:Name=\"MouseOver\">\r\n                                                    <Storyboard>\r\n                                                        <ColorAnimation Storyboard.TargetName=\"UncheckedBrush\" Storyboard.TargetProperty=\"Color\" To=\"{StaticResource MainColor}\" Duration=\"0\" />\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                                <VisualState x:Name=\"Disabled\">\r\n                                                    <Storyboard>\r\n                                                        <DoubleAnimation Storyboard.TargetName=\"Root\" Storyboard.TargetProperty=\"Opacity\" To=\".7\" Duration=\"0\" />\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                            </VisualStateGroup>\r\n                                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                                <VisualState x:Name=\"Unchecked\" />\r\n                                                <VisualState x:Name=\"Checked\">\r\n                                                    <Storyboard>\r\n                                                        <DoubleAnimation Storyboard.TargetName=\"UncheckedVisual\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" Duration=\"0\" />\r\n                                                        <DoubleAnimation Storyboard.TargetName=\"CheckedVisual\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" Duration=\"0\" />\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                            </VisualStateGroup>\r\n                                        </VisualStateManager.VisualStateGroups>\r\n                                        <Grid HorizontalAlignment=\"Right\" Margin=\"2 2 5 2\">\r\n                                            <Path x:Name=\"UncheckedVisual\" Width=\"6\" Height=\"9\" Fill=\"#FFFFFFFF\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Right\" Data=\"M 0,0 L 0,9 L 5,4.5 Z\" StrokeThickness=\"1\" StrokeLineJoin=\"Miter\">\r\n                                                <Path.Stroke>\r\n                                                    <SolidColorBrush x:Name=\"UncheckedBrush\" Color=\"#FF989898\" />\r\n                                                </Path.Stroke>\r\n                                            </Path>\r\n                                            <Path x:Name=\"CheckedVisual\" Opacity=\"0\" Width=\"6\" Height=\"6\" Fill=\"#FF262626\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Data=\"M 6,0 L 6,6 L 0,6 Z\" StrokeLineJoin=\"Miter\" />\r\n                                        </Grid>\r\n                                    </Grid>\r\n                                </ControlTemplate>\r\n                            </ToggleButton.Template>\r\n                        </ToggleButton>\r\n                        <Rectangle x:Name=\"select\" Grid.Column=\"1\" Opacity=\"0\" Fill=\"{StaticResource SelectedBackgroundBrush}\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" IsHitTestVisible=\"False\" RadiusX=\"2\" RadiusY=\"2\" />\r\n                        <Rectangle x:Name=\"inactive\" Grid.Column=\"1\" Opacity=\"0\" Fill=\"#FF999999\" Stroke=\"#FF333333\" StrokeThickness=\"1\" IsHitTestVisible=\"False\" RadiusX=\"2\" RadiusY=\"2\" />\r\n                        <Button x:Name=\"PART_Header\" Grid.Column=\"1\" ClickMode=\"Hover\" Content=\"{TemplateBinding Header}\" ContentTemplate=\"{TemplateBinding HeaderTemplate}\" Background=\"{TemplateBinding Background}\" Foreground=\"{TemplateBinding Foreground}\" Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" BorderBrush=\"{StaticResource NormalBorderBrush}\">\r\n                            <Button.Template>\r\n                                <ControlTemplate TargetType=\"Button\">\r\n                                    <Grid Background=\"{TemplateBinding Background}\">\r\n                                        <VisualStateManager.VisualStateGroups>\r\n                                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                                <VisualState x:Name=\"Normal\" />\r\n                                                <VisualState x:Name=\"Pressed\">\r\n                                                    <Storyboard>\r\n                                                        <DoubleAnimation Storyboard.TargetName=\"hover\" Storyboard.TargetProperty=\"Opacity\" Duration=\"0\" To=\".5\" />\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                                <VisualState x:Name=\"Disabled\">\r\n                                                    <Storyboard>\r\n                                                        <DoubleAnimation Storyboard.TargetName=\"content\" Storyboard.TargetProperty=\"Opacity\" Duration=\"0\" To=\".55\" />\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                            </VisualStateGroup>\r\n                                        </VisualStateManager.VisualStateGroups>\r\n                                        <Rectangle x:Name=\"hover\" Opacity=\"0\" Fill=\"{StaticResource SelectedBackgroundBrush}\" Stroke=\"{StaticResource HighlightBrush}\" StrokeThickness=\"1\" IsHitTestVisible=\"False\" RadiusX=\"2\" RadiusY=\"2\" />\r\n                                        <ContentPresenter x:Name=\"content\" Cursor=\"{TemplateBinding Cursor}\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" HorizontalAlignment=\"Left\" Margin=\"{TemplateBinding Padding}\" />\r\n                                    </Grid>\r\n                                </ControlTemplate>\r\n                            </Button.Template>\r\n                        </Button>\r\n                        <ItemsPresenter x:Name=\"ItemsHost\" Grid.Row=\"1\" Grid.Column=\"1\" Grid.ColumnSpan=\"2\" Visibility=\"Visible\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsExpanded\" Value=\"false\">\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ItemsHost\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"HasItems\" Value=\"false\">\r\n                            <Setter Property=\"Visibility\" Value=\"Hidden\" TargetName=\"Expander\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"TreeView\">\r\n        <Setter Property=\"IsTabStop\" Value=\"True\"/>\r\n        <Setter Property=\"Background\" Value=\"#FFFFFFFF\"/>\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Cursor\" Value=\"Arrow\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"Padding\" Value=\"1\"/>\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"#FFA3AEB9\" Offset=\"0\"/>\r\n                    <GradientStop Color=\"#FF8399A9\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF718597\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF617584\" Offset=\"1\"/>\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TreeView\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <Border x:Name=\"Border\" BorderBrush=\"{StaticResource NormalBorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\">\r\n                            <ScrollViewer Background=\"{TemplateBinding Background}\" BorderBrush=\"Transparent\" BorderThickness=\"0\" Padding=\"{TemplateBinding Padding}\" Margin=\"1\" x:Name=\"ScrollViewer\" HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Auto\" >\r\n                                <ItemsPresenter Margin=\"5\" x:Name=\"TreeItems\"/>\r\n                            </ScrollViewer>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/ShinyBlue/Theme.xaml",
    "content": "﻿<!--\r\n// (c) Copyright Microsoft Corporation.\r\n// This source is subject to Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n-->\r\n\r\n<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" \r\n                    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n                    mc:Ignorable=\"d\" \r\n                    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\">\r\n\r\n    <!-- Color Resources -->\r\n\r\n    <Color x:Key=\"BlackColor\">#FF000000</Color>\r\n    <Color x:Key=\"WhiteColor\">#FFFFFFFF</Color>\r\n\r\n    <SolidColorBrush x:Key=\"TextBrush\" Color=\"#FFFFFFFF\"/>\r\n\r\n    <Color x:Key=\"NormalBrushGradient1\">#FFBAE4FF</Color>\r\n    <Color x:Key=\"NormalBrushGradient2\">#FF398FDF</Color>\r\n    <Color x:Key=\"NormalBrushGradient3\">#FF006DD4</Color>\r\n    <Color x:Key=\"NormalBrushGradient4\">#FF0A3E69</Color>\r\n\r\n    <Color x:Key=\"NormalBorderBrushGradient1\">#FFBBBBBB</Color>\r\n    <Color x:Key=\"NormalBorderBrushGradient2\">#FF737373</Color>\r\n    <Color x:Key=\"NormalBorderBrushGradient3\">#FF646464</Color>\r\n    <Color x:Key=\"NormalBorderBrushGradient4\">#FF000000</Color>\r\n\r\n    <Color x:Key=\"SelectedBackgroundGradient1\">#FFBBBBBB</Color>\r\n    <Color x:Key=\"SelectedBackgroundGradient2\">#FF737373</Color>\r\n    <Color x:Key=\"SelectedBackgroundGradient3\">#FF646464</Color>\r\n    <Color x:Key=\"SelectedBackgroundGradient4\">#FFA1A1A1</Color>\r\n\r\n    <Color x:Key=\"SliderBorderGradient1\">#FF3F3F3F</Color>\r\n    <Color x:Key=\"SliderBorderGradient2\">#FFADADAD</Color>\r\n\r\n    <Color x:Key=\"ShadeBrushGradient1\">#FF62676A</Color>\r\n    <Color x:Key=\"ShadeBrushGradient2\">#FFD1D4D6</Color>\r\n    <Color x:Key=\"ShadeBrushGradient3\">#FFFFFFFF</Color>\r\n\r\n    <Color x:Key=\"WindowBackgroundBrushGradient1\">#FFD1D1D1</Color>\r\n    <Color x:Key=\"WindowBackgroundBrushGradient2\">#FF8496AA</Color>\r\n\r\n\r\n    <LinearGradientBrush x:Key=\"NormalBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource NormalBrushGradient1}\" Offset=\"0\" />\r\n        <GradientStop Color=\"{StaticResource NormalBrushGradient2}\" Offset=\"0.41800001263618469\" />\r\n        <GradientStop Color=\"{StaticResource NormalBrushGradient3}\" Offset=\"0.418\" />\r\n        <GradientStop Color=\"{StaticResource NormalBrushGradient4}\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"NormalBorderBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource NormalBorderBrushGradient1}\" />\r\n        <GradientStop Color=\"{StaticResource NormalBorderBrushGradient2}\" Offset=\"0.38\" />\r\n        <GradientStop Color=\"{StaticResource NormalBorderBrushGradient3}\" Offset=\"0.384\" />\r\n        <GradientStop Color=\"{StaticResource NormalBorderBrushGradient4}\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <RadialGradientBrush x:Key=\"HoverBrush\">\r\n        <RadialGradientBrush.RelativeTransform>\r\n            <TransformGroup>\r\n                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.804\" ScaleY=\"0.743\" />\r\n                <SkewTransform CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                <RotateTransform CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                <TranslateTransform Y=\"0.47999998927116394\" />\r\n            </TransformGroup>\r\n        </RadialGradientBrush.RelativeTransform>\r\n        <GradientStop Color=\"#FF98DAFF\" Offset=\"0.209\" />\r\n        <GradientStop Color=\"#0098DAFF\" Offset=\"1\" />\r\n        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n    </RadialGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"CheckIconBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FF006CD1\" />\r\n        <GradientStop Color=\"#FFA5D6F9\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n\r\n    <LinearGradientBrush x:Key=\"ShadeBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient2}\" Offset=\"0\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\" Offset=\"0.1\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ShadeBrushTop\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient2}\" Offset=\"0\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\" Offset=\"0.1\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ShadeBrushBottom\" EndPoint=\"0.5,0\" StartPoint=\"0.5,1\">\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient2}\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\" Offset=\"0.1\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ShadeBrushLeft\" EndPoint=\"1,0.5\" StartPoint=\"0,0.5\">\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient2}\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\" Offset=\"0.1\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ShadeBrushRight\" EndPoint=\"0,0.5\" StartPoint=\"1,0.5\">\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient2}\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\" Offset=\"0.1\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n\r\n    <LinearGradientBrush x:Key=\"DisabledBackgroundBrush\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFFFFFFF\" />\r\n        <GradientStop Color=\"#FF62676A\"\r\n                  Offset=\"1\" />\r\n        <GradientStop Color=\"#FFD1D4D6\"\r\n                  Offset=\"0.41800001263618469\" />\r\n        <GradientStop Color=\"#FFA9AFB5\"\r\n                  Offset=\"0.425\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"SelectedBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient1}\" />\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient2}\" Offset=\"0.38\" />\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient3}\" Offset=\"0.384\" />\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient4}\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"SelectedBackgroundBrushVertical\" EndPoint=\"2.05,0.5\" StartPoint=\"-0.55,0.5\">\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient1}\" />\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient2}\" Offset=\"0.37999999523162842\" />\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient3}\" Offset=\"0.38400000333786011\" />\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient4}\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"HorizontalSliderBorderBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource SliderBorderGradient1}\" />\r\n        <GradientStop Color=\"{StaticResource SliderBorderGradient2}\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"VerticalSliderBorderBrush\" EndPoint=\"1.35,0.5\" StartPoint=\"0.6,0.5\">\r\n        <GradientStop Color=\"{StaticResource SliderBorderGradient1}\" />\r\n        <GradientStop Color=\"{StaticResource SliderBorderGradient2}\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"WindowBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource WindowBackgroundBrushGradient1}\" />\r\n        <GradientStop Color=\"{StaticResource WindowBackgroundBrushGradient2}\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"MouseOverBrush\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#FFF\" Offset=\"0.0\"/>\r\n        <GradientStop Color=\"#AAA\" Offset=\"1.0\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"PressedBrush\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#BBB\" Offset=\"0.0\"/>\r\n        <GradientStop Color=\"#EEE\" Offset=\"0.1\"/>\r\n        <GradientStop Color=\"#EEE\" Offset=\"0.9\"/>\r\n        <GradientStop Color=\"#FFF\" Offset=\"1.0\"/>\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"PressedBorderBrush\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#444\" Offset=\"0.0\"/>\r\n        <GradientStop Color=\"#888\" Offset=\"1.0\"/>\r\n    </LinearGradientBrush>\r\n\r\n\r\n    <LinearGradientBrush x:Key=\"LightBrush\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#FFF\" Offset=\"0.0\"/>\r\n        <GradientStop Color=\"#EEE\" Offset=\"1.0\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <SolidColorBrush x:Key=\"DisabledForegroundBrush\" Color=\"#FF636363\"/>\r\n\r\n    <SolidColorBrush x:Key=\"DisabledBorderBrush\" Color=\"#AAA\"/>\r\n\r\n    <LinearGradientBrush x:Key=\"DefaultedBorderBrush\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#777\" Offset=\"0.0\"/>\r\n        <GradientStop Color=\"#000\" Offset=\"1.0\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <SolidColorBrush x:Key=\"SolidBorderBrush\" Color=\"#888\"/>\r\n    <SolidColorBrush x:Key=\"LightBorderBrush\" Color=\"#AAA\"/>\r\n    <SolidColorBrush x:Key=\"LightColorBrush\" Color=\"#DDD\"/>\r\n\r\n\r\n    <SolidColorBrush x:Key=\"GlyphBrush\" Color=\"{StaticResource WhiteColor}\"/>\r\n\r\n\r\n    <Style x:Key=\"NuclearButtonFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Border>\r\n                        <Rectangle Margin=\"2\" Stroke=\"#60000000\" StrokeThickness=\"1\" StrokeDashArray=\"1 2\"/>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type Button}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource NuclearButtonFocusVisual}\"/>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n<Setter Property=\"Template\" Value=\"{DynamicResource ButtonTemplate}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n    </Style>\r\n    \r\n    <ControlTemplate x:Key=\"ButtonTemplate\" TargetType=\"{x:Type Button}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Hover\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Hover\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\n                            </DoubleAnimationUsingKeyFrames>\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"0.6\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                <DiscreteObjectKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"{x:Static Visibility.Visible}\"/>\r\n                            </ObjectAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n\r\n                    <Grid x:Name=\"Grid\">\r\n                        <Border x:Name=\"Background\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"2,2,2,2\">\r\n                            <Border x:Name=\"Hover\" Background=\"{StaticResource HoverBrush}\" CornerRadius=\"1,1,1,1\" Height=\"Auto\" Width=\"Auto\" Opacity=\"0\"/>\r\n                        </Border>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" RecognizesAccessKey=\"True\"/>\r\n                        <Border x:Name=\"FocusVisualElement\"\r\n                    IsHitTestVisible=\"false\"\r\n                    BorderBrush=\"{StaticResource HoverBrush}\"\r\n                    BorderThickness=\"2,2,2,2\"\r\n                    CornerRadius=\"2,2,2,2\" Opacity=\"0\"/>\r\n                    </Grid>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsDefault\" Value=\"True\">\r\n                            <Setter Property=\"BorderBrush\" TargetName=\"Background\" Value=\"{DynamicResource DefaultedBorderBrush}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"FocusedOff_BeginStoryboard\" Storyboard=\"{StaticResource FocusedOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"true\"/>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Background\"/>\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DisabledBorderBrush}\" TargetName=\"Background\"/>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n\r\n    <Style x:Key=\"RadioButtonFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Border>\r\n                        <Rectangle Margin=\"15,0,0,0\" Stroke=\"#60000000\" StrokeThickness=\"1\" StrokeDashArray=\"1 2\"/>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"CheckBoxFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Border>\r\n                        <Rectangle Margin=\"15,0,0,0\" Stroke=\"#60000000\" StrokeThickness=\"1\" StrokeDashArray=\"1 2\"/>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type CheckBox}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource CheckBoxFocusVisual}\"/>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n<Setter Property=\"Template\" Value=\"{DynamicResource CheckBoxTemplate}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n        <Style.Triggers>\r\n            <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n            </Trigger>\r\n        </Style.Triggers>\r\n    </Style>\r\n    \r\n    <ControlTemplate x:Key=\"CheckBoxTemplate\" TargetType=\"{x:Type CheckBox}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"CheckedFalse\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedTrue\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"ThreeStateOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"IndeterminateIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"ThreeStateOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"IndeterminateIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"0.6\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <BulletDecorator Background=\"Transparent\">\r\n                        <BulletDecorator.Bullet>\r\n                            <Grid Width=\"16\" Height=\"16\">\r\n                                <Rectangle Height=\"14\" Margin=\"1\" x:Name=\"Background\" Width=\"14\" Fill=\"{TemplateBinding Background}\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                                <Rectangle Height=\"12\" x:Name=\"BackgroundOverlay\" Width=\"12\" Opacity=\"0\" Fill=\"{StaticResource HoverBrush}\" Stroke=\"{x:Null}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n\r\n                                <Path x:Name=\"CheckIcon\" Opacity=\"0\" Stretch=\"Fill\" Data=\"M102.03442,598.79645 L105.22962,597.78918 L106.95686,599.19977 C106.95686,599.19977 113.77958,590.53656 113.77958,590.53656 C113.77958,590.53656 107.40649,603.79431 107.40649,603.79431 z\" Fill=\"#FFFFFFFF\"\r\n                    Height=\"10\"\r\n                    Width=\"11\"\r\n                    Stroke=\"{StaticResource CheckIconBrush}\"\r\n                    StrokeThickness=\"0\"/>\r\n\r\n                                <Rectangle Height=\"9\" x:Name=\"IndeterminateIcon\" Width=\"9\" Opacity=\"0\" Fill=\"#FFFFFFFF\" Stroke=\"{StaticResource CheckIconBrush}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                                <Rectangle Height=\"14\" x:Name=\"DisabledVisualElement\" Width=\"14\" Opacity=\"0\" Fill=\"{StaticResource DisabledBackgroundBrush}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                                <Rectangle Height=\"16\" x:Name=\"ContentFocusVisualElement\" Width=\"16\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HoverBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                            </Grid>\r\n                        </BulletDecorator.Bullet>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" RecognizesAccessKey=\"True\"/>\r\n                    </BulletDecorator>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsChecked\" Value=\"True\" />\r\n                                <Condition Property=\"IsThreeState\" Value=\"True\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"ThreeStateOn_BeginStoryboard\" Storyboard=\"{StaticResource CheckedFalse}\" />\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"ThreeStateOff_BeginStoryboard\" Storyboard=\"{StaticResource CheckedTrue}\" />\r\n                            </MultiTrigger.ExitActions>\r\n                        </MultiTrigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsChecked\" Value=\"{x:Null}\" />\r\n                                <Condition Property=\"IsThreeState\" Value=\"True\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"ThreeStateOn1_BeginStoryboard\" Storyboard=\"{StaticResource ThreeStateOn}\" />\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"ThreeStateOff1_BeginStoryboard\" Storyboard=\"{StaticResource ThreeStateOff}\" />\r\n                            </MultiTrigger.ExitActions>\r\n                            <Setter Property=\"Visibility\" TargetName=\"CheckIcon\" Value=\"Hidden\"/>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedFalse}\" x:Name=\"CheckedTrue_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"CheckedTrue_BeginStoryboard1\" Storyboard=\"{StaticResource CheckedTrue}\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Fill\" TargetName=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                            <Setter Property=\"Stroke\" TargetName=\"Background\" Value=\"{DynamicResource DisabledBorderBrush}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n\r\n                </ControlTemplate>\r\n\r\n    <Style TargetType=\"{x:Type RadioButton}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource RadioButtonFocusVisual}\"/>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n<Setter Property=\"Template\" Value=\"{DynamicResource RadioButtonTemplate}\" />\r\n        <Style.Triggers>\r\n            <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n            </Trigger>\r\n        </Style.Triggers>\r\n    </Style>\r\n    \r\n    <ControlTemplate x:Key=\"RadioButtonTemplate\" TargetType=\"{x:Type RadioButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"CheckedFalse\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedTrue\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"0.6\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <BulletDecorator Background=\"Transparent\">\r\n                        <BulletDecorator.Bullet>\r\n                            <Grid Width=\"16\" Height=\"16\">\r\n                                <Ellipse Height=\"14\"\r\n                       Margin=\"1\"\r\n                       x:Name=\"Background\"\r\n                       Width=\"14\"\r\n                       Fill=\"{StaticResource NormalBrush}\"\r\n                       Stroke=\"{TemplateBinding BorderBrush}\"\r\n                       StrokeThickness=\"2\"/>\r\n                                <Ellipse Height=\"12\"\r\n                       x:Name=\"BackgroundOverlay\"\r\n                       Width=\"12\"\r\n                       Opacity=\"0\"\r\n                       Fill=\"{StaticResource HoverBrush}\"\r\n                       Stroke=\"#00000000\"\r\n                       Margin=\"2,2,2,2\"\r\n                       StrokeThickness=\"0\"/>\r\n                                <Border HorizontalAlignment=\"Center\"\r\n                      VerticalAlignment=\"Center\"\r\n                      Width=\"6\"\r\n                      Height=\"6\"\r\n                      CornerRadius=\"1,1,1,1\"\r\n                      BorderThickness=\"1,1,1,1\"\r\n                      Background=\"#FFFFFFFF\"\r\n                      x:Name=\"CheckIcon\"\r\n                      BorderBrush=\"{StaticResource CheckIconBrush}\"\r\n                      Opacity=\"0\"/>\r\n                            </Grid>\r\n                        </BulletDecorator.Bullet>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" RecognizesAccessKey=\"True\"/>\r\n                    </BulletDecorator>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsChecked\" Value=\"false\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedTrue}\" x:Name=\"CheckedTrue_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedFalse}\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Fill\" TargetName=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                            <Setter Property=\"Stroke\" TargetName=\"Background\" Value=\"{DynamicResource DisabledBorderBrush}\"/>\r\n\r\n                        </Trigger>\r\n\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n\r\n    <Style x:Key=\"NuclearRepeatButton\" d:IsControlPart=\"True\" TargetType=\"{x:Type RepeatButton}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundAnimation\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundAnimation\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\n                            </DoubleAnimationUsingKeyFrames>\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"0.6\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Border x:Name=\"Border\" Background=\"{TemplateBinding Background}\" CornerRadius=\"2,2,2,2\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"2\"/>\r\n                        <Rectangle x:Name=\"BackgroundAnimation\"\r\n                             Opacity=\"0\"\r\n                             Fill=\"{StaticResource HoverBrush}\"\r\n                             Stroke=\"{x:Null}\"\r\n                             StrokeThickness=\"0\"\r\n                             RadiusX=\"1\"\r\n                             RadiusY=\"1\"\r\n                             Margin=\"2,2,2,2\" />\r\n                        <ContentPresenter HorizontalAlignment=\"Center\" x:Name=\"ContentPresenter\" VerticalAlignment=\"Center\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" ContentTemplateSelector=\"{TemplateBinding ContentTemplateSelector}\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DefaultedBorderBrush}\" TargetName=\"Border\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DisabledBorderBrush}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"NuclearThumbStyle\" d:IsControlPart=\"True\" TargetType=\"{x:Type Thumb}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundMouseOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundMouseOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\n                            </DoubleAnimationUsingKeyFrames>\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"0.6\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid Margin=\"0,0,0,0\" x:Name=\"Grid\">\r\n                        <Rectangle x:Name=\"Background\"\r\n\t\t\t\t\t\t\tFill=\"{StaticResource NormalBrush}\"\r\n\t\t\t\t\t\t\tStrokeThickness=\"2\"\r\n\t\t\t\t\t\t\tRadiusX=\"2\"\r\n\t\t\t\t\t\t\tRadiusY=\"2\"\r\n\t\t\t\t\t\t\tStroke=\"{StaticResource NormalBorderBrush}\" />\r\n                        <Rectangle x:Name=\"BackgroundMouseOver\"\r\n\t\t\t\t\t\t\tFill=\"{StaticResource HoverBrush}\"\r\n\t\t\t\t\t\t\tStroke=\"{x:Null}\"\r\n\t\t\t\t\t\t\tStrokeThickness=\"1\"\r\n\t\t\t\t\t\t\tRadiusX=\"1\"\r\n\t\t\t\t\t\t\tRadiusY=\"1\"\r\n\t\t\t\t\t\t\tMargin=\"2,2,2,2\" Opacity=\"0\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\"/>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsDragging\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Fill\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Background\"/>\r\n                            <Setter Property=\"Stroke\" Value=\"{DynamicResource DisabledBorderBrush}\" TargetName=\"Background\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"NuclearScrollRepeatButtonStyle\" d:IsControlPart=\"True\" TargetType=\"{x:Type RepeatButton}\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n        <Setter Property=\"IsTabStop\" Value=\"false\"/>\r\n        <Setter Property=\"Focusable\" Value=\"false\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n                    <Grid>\r\n                        <Rectangle Fill=\"{TemplateBinding Background}\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n\r\n    <Style TargetType=\"{x:Type ScrollBar}\">\r\n        <Setter Property=\"Stylus.IsFlicksEnabled\" Value=\"false\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ScrollBar}\">\r\n                    <Grid x:Name=\"GridRoot\" Width=\"{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition MaxHeight=\"18\"/>\r\n                            <RowDefinition Height=\"0.00001*\"/>\r\n                            <RowDefinition MaxHeight=\"18\"/>\r\n                        </Grid.RowDefinitions>\r\n\r\n                        <Border Grid.RowSpan=\"3\" Background=\"#FFDDDEDF\" CornerRadius=\"3,3,3,3\"/>\r\n\r\n                        <RepeatButton x:Name=\"DecreaseRepeat\" Style=\"{DynamicResource NuclearRepeatButton}\" Command=\"ScrollBar.LineUpCommand\">\r\n                            <Grid>\r\n                                <Path x:Name=\"DecreaseArrow\" StrokeThickness=\"1\" Data=\"M 0 4 L 8 4 L 4 0 Z\" Fill=\"{DynamicResource GlyphBrush}\"/>\r\n                            </Grid>\r\n                        </RepeatButton>\r\n\r\n                        <Track Grid.Row=\"1\" x:Name=\"PART_Track\" Orientation=\"Vertical\" IsDirectionReversed=\"true\">\r\n                            <Track.Thumb>\r\n                                <Thumb Style=\"{DynamicResource NuclearThumbStyle}\"/>\r\n                            </Track.Thumb>\r\n                            <Track.IncreaseRepeatButton>\r\n                                <RepeatButton x:Name=\"PageUp\" Style=\"{DynamicResource NuclearScrollRepeatButtonStyle}\" Command=\"ScrollBar.PageDownCommand\"/>\r\n                            </Track.IncreaseRepeatButton>\r\n                            <Track.DecreaseRepeatButton>\r\n                                <RepeatButton x:Name=\"PageDown\" Style=\"{DynamicResource NuclearScrollRepeatButtonStyle}\" Command=\"ScrollBar.PageUpCommand\"/>\r\n                            </Track.DecreaseRepeatButton>\r\n                        </Track>\r\n\r\n                        <RepeatButton Grid.Row=\"2\" x:Name=\"IncreaseRepeat\" Style=\"{DynamicResource NuclearRepeatButton}\" Command=\"ScrollBar.LineDownCommand\">\r\n                            <Grid>\r\n                                <Path x:Name=\"IncreaseArrow\" StrokeThickness=\"1\" Data=\"M 0 0 L 4 4 L 8 0 Z\" Fill=\"{DynamicResource GlyphBrush}\"/>\r\n                            </Grid>\r\n                        </RepeatButton>\r\n                    </Grid>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"Orientation\" Value=\"Horizontal\">\r\n\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"GridRoot\">\r\n                                <Setter.Value>\r\n                                    <RotateTransform Angle=\"-90\"/>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n\r\n                            <Setter TargetName=\"PART_Track\" Property=\"Orientation\" Value=\"Vertical\"/>\r\n\r\n                            <Setter Property=\"Command\" Value=\"ScrollBar.LineLeftCommand\" TargetName=\"DecreaseRepeat\"/>\r\n                            <Setter Property=\"Command\" Value=\"ScrollBar.LineRightCommand\" TargetName=\"IncreaseRepeat\"/>\r\n                            <Setter Property=\"Command\" Value=\"ScrollBar.PageLeftCommand\" TargetName=\"PageDown\"/>\r\n                            <Setter Property=\"Command\" Value=\"ScrollBar.PageRightCommand\" TargetName=\"PageUp\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Background\" Value=\"#FFDDDEDF\"/>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type ScrollViewer}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ScrollViewer}\">\r\n                    <Grid Background=\"{TemplateBinding Background}\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"*\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <ScrollContentPresenter Grid.Column=\"0\" Grid.Row=\"0\" Margin=\"{TemplateBinding Padding}\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" CanContentScroll=\"{TemplateBinding CanContentScroll}\"/>\r\n\r\n                        <ScrollBar Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Grid.Column=\"0\" Grid.Row=\"1\" x:Name=\"PART_HorizontalScrollBar\"   Orientation=\"Horizontal\" Value=\"{Binding Path=HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" ViewportSize=\"{TemplateBinding ViewportWidth}\" Minimum=\"0\" Maximum=\"{TemplateBinding ScrollableWidth}\" AutomationProperties.AutomationId=\"HorizontalScrollBar\"/>\r\n                        <ScrollBar Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Grid.Column=\"1\" Grid.Row=\"0\" x:Name=\"PART_VerticalScrollBar\"   Orientation=\"Vertical\" Value=\"{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" ViewportSize=\"{TemplateBinding ViewportHeight}\" Minimum=\"0\" Maximum=\"{TemplateBinding ScrollableHeight}\" AutomationProperties.AutomationId=\"VerticalScrollBar\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type ListBox}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource ShadeBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\"/>\r\n        <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\"/>\r\n        <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"True\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListBox}\">\r\n                    <Grid>\r\n                        <Border x:Name=\"Border\" CornerRadius=\"2\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\"/>\r\n                        <ScrollViewer   Focusable=\"false\" Margin=\"0,0,0,1\" >\r\n\r\n                            <StackPanel Margin=\"2\" IsItemsHost=\"true\"/>\r\n\r\n                        </ScrollViewer>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DisabledBorderBrush}\" TargetName=\"Border\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                            <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n\r\n    <Style d:IsControlPart=\"True\" TargetType=\"{x:Type ListBoxItem}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n        <Setter Property=\"OverridesDefaultStyle\" Value=\"true\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListBoxItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\n                            </DoubleAnimationUsingKeyFrames>\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOff\">\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\n                            </DoubleAnimationUsingKeyFrames>\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid Background=\"{TemplateBinding Background}\"\r\n\t\t\t\t\t\tMargin=\"1,1,1,1\" SnapsToDevicePixels=\"true\" x:Name=\"grid\">\r\n                        <Rectangle x:Name=\"Background\"\r\n\t\t\t\t\t\t\tIsHitTestVisible=\"False\"\r\n\t\t\t\t\t\t\tFill=\"{StaticResource SelectedBackgroundBrush}\"\r\n\t\t\t\t\t\t\tRadiusX=\"0\"/>\r\n                        <Rectangle x:Name=\"SelectedRectangle\"\r\n\t\t\t\t\t\t\tIsHitTestVisible=\"False\"\r\n\t\t\t\t\t\t\tOpacity=\"0\"\r\n\t\t\t\t\t\t\tFill=\"{StaticResource NormalBrush}\"\r\n\t\t\t\t\t\t\tRadiusX=\"0\"/>\r\n                        <Rectangle x:Name=\"HoverRectangle\"\r\n\t\t\t\t\t\t\tIsHitTestVisible=\"False\"\r\n\t\t\t\t\t\t\tFill=\"{StaticResource HoverBrush}\"\r\n\t\t\t\t\t\t\tRadiusX=\"0\"\r\n\t\t\t\t\t\t\tOpacity=\"0\"/>\r\n                        <ContentPresenter Margin=\"5,3,3,3\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" x:Name=\"contentPresenter\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsSelected\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n    </Style>\r\n\r\n    <Style x:Key=\"ExpanderHeaderFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Border>\r\n                        <Rectangle SnapsToDevicePixels=\"true\" Margin=\"0\" Stroke=\"Black\" StrokeDashArray=\"1 2\" StrokeThickness=\"1\" />\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"ExpanderDownHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.6\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Border Padding=\"{TemplateBinding Padding}\" Background=\"#FFFFFFFF\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"2,2,2,2\" x:Name=\"border\">\r\n                        <Grid SnapsToDevicePixels=\"False\" Background=\"Transparent\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"21\" />\r\n                                <ColumnDefinition Width=\"*\" />\r\n                            </Grid.ColumnDefinitions>\r\n                            <Rectangle Margin=\"3,3,3,3\" x:Name=\"Rectangle\" Fill=\"{DynamicResource NormalBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" />\r\n                            <Rectangle Margin=\"3,3,3,3\" x:Name=\"HoverRectangle\" Fill=\"{DynamicResource HoverBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\" />\r\n                            <Path HorizontalAlignment=\"Center\" x:Name=\"Up_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 0 L 4 4 L 8 0 Z\" />\r\n                            <Path Visibility=\"Collapsed\" HorizontalAlignment=\"Center\" x:Name=\"Down_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 4 L 4 0 L 8 4 Z\" />\r\n                            <ContentPresenter SnapsToDevicePixels=\"True\" HorizontalAlignment=\"Left\" Margin=\"4,3,0,3\" VerticalAlignment=\"Center\" Grid.Column=\"1\" RecognizesAccessKey=\"True\" />\r\n                        </Grid>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Fill\" TargetName=\"Rectangle\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                            <Setter Property=\"BorderBrush\" TargetName=\"border\" Value=\"{DynamicResource DisabledBorderBrush}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"Down_Arrow\" Value=\"Visible\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Up_Arrow\" Value=\"Collapsed\" />\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"ExpanderRightHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.6\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Border Padding=\"{TemplateBinding Padding}\" Background=\"#FFFFFFFF\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"2,2,2,2\" x:Name=\"border\">\r\n                        <Grid SnapsToDevicePixels=\"False\" Background=\"Transparent\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"21\" />\r\n                                <RowDefinition Height=\"*\" />\r\n                            </Grid.RowDefinitions>\r\n                            <Grid>\r\n                                <Grid.LayoutTransform>\r\n                                    <TransformGroup>\r\n                                        <TransformGroup.Children>\r\n                                            <TransformCollection>\r\n                                                <RotateTransform Angle=\"-90\" />\r\n                                            </TransformCollection>\r\n                                        </TransformGroup.Children>\r\n                                    </TransformGroup>\r\n                                </Grid.LayoutTransform>\r\n                                <Rectangle Margin=\"3,3,1,3\" x:Name=\"Rectangle\" Fill=\"{DynamicResource NormalBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" />\r\n                                <Rectangle Margin=\"3,3,1,3\" x:Name=\"HoverRectangle\" Fill=\"{DynamicResource HoverBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\" />\r\n                                <Path HorizontalAlignment=\"Center\" x:Name=\"Up_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 0 L 4 4 L 8 0 Z\" />\r\n                                <Path Visibility=\"Collapsed\" HorizontalAlignment=\"Center\" x:Name=\"Down_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 4 L 4 0 L 8 4 Z\" />\r\n                            </Grid>\r\n                            <ContentPresenter SnapsToDevicePixels=\"True\" HorizontalAlignment=\"Center\" Margin=\"2,4,4,0\" VerticalAlignment=\"Top\" Grid.Row=\"1\" RecognizesAccessKey=\"True\">\r\n                                <ContentPresenter.LayoutTransform>\r\n                                    <TransformGroup>\r\n                                        <TransformGroup.Children>\r\n                                            <TransformCollection>\r\n                                                <RotateTransform Angle=\"-90\" />\r\n                                            </TransformCollection>\r\n                                        </TransformGroup.Children>\r\n                                    </TransformGroup>\r\n                                </ContentPresenter.LayoutTransform>\r\n                            </ContentPresenter>\r\n                        </Grid>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Fill\" TargetName=\"Rectangle\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                            <Setter Property=\"BorderBrush\" TargetName=\"border\" Value=\"{DynamicResource DisabledBorderBrush}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"Up_Arrow\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Down_Arrow\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"ExpanderUpHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.6\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Border Padding=\"{TemplateBinding Padding}\" CornerRadius=\"2,2,2,2\" BorderThickness=\"1,1,1,1\" Background=\"#FFFFFFFF\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" x:Name=\"border\">\r\n                        <Grid SnapsToDevicePixels=\"False\" Background=\"Transparent\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"21\" />\r\n                                <ColumnDefinition Width=\"*\" />\r\n                            </Grid.ColumnDefinitions>\r\n                            <Grid>\r\n                                <Grid.LayoutTransform>\r\n                                    <TransformGroup>\r\n                                        <TransformGroup.Children>\r\n                                            <TransformCollection>\r\n                                                <RotateTransform Angle=\"180\" />\r\n                                            </TransformCollection>\r\n                                        </TransformGroup.Children>\r\n                                    </TransformGroup>\r\n                                </Grid.LayoutTransform>\r\n                                <Rectangle Margin=\"3,3,3,3\" x:Name=\"Rectangle\" Fill=\"{DynamicResource NormalBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" />\r\n                                <Rectangle Margin=\"3,3,3,3\" x:Name=\"HoverRectangle\" Fill=\"{DynamicResource HoverBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\" />\r\n                                <Path HorizontalAlignment=\"Center\" x:Name=\"Up_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 0 L 4 4 L 8 0 Z\" />\r\n                                <Path Visibility=\"Collapsed\" HorizontalAlignment=\"Center\" x:Name=\"Down_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 4 L 4 0 L 8 4 Z\" />\r\n                            </Grid>\r\n                            <ContentPresenter SnapsToDevicePixels=\"True\" HorizontalAlignment=\"Left\" Margin=\"4,3,0,3\" VerticalAlignment=\"Center\" Grid.Column=\"1\" RecognizesAccessKey=\"True\" />\r\n                        </Grid>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"BorderBrush\" TargetName=\"border\" Value=\"{DynamicResource DisabledBorderBrush}\"/>\r\n                            <Setter Property=\"Fill\" TargetName=\"Rectangle\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"Up_Arrow\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Down_Arrow\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"ExpanderLeftHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.6\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Border Padding=\"{TemplateBinding Padding}\" CornerRadius=\"2,2,2,2\" Background=\"#FFFFFFFF\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"1,1,1,1\" x:Name=\"border\">\r\n                        <Grid SnapsToDevicePixels=\"False\" Background=\"Transparent\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"21\" />\r\n                                <RowDefinition Height=\"*\" />\r\n                            </Grid.RowDefinitions>\r\n                            <Grid>\r\n                                <Grid.LayoutTransform>\r\n                                    <TransformGroup>\r\n                                        <TransformGroup.Children>\r\n                                            <TransformCollection>\r\n                                                <RotateTransform Angle=\"90\" />\r\n                                            </TransformCollection>\r\n                                        </TransformGroup.Children>\r\n                                    </TransformGroup>\r\n                                </Grid.LayoutTransform>\r\n                                <Rectangle Margin=\"3,3,3,3\" x:Name=\"Rectangle\" Fill=\"{DynamicResource NormalBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" />\r\n                                <Rectangle Margin=\"3,3,3,3\" x:Name=\"HoverRectangle\" Fill=\"{DynamicResource HoverBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\" />\r\n                                <Path HorizontalAlignment=\"Center\" x:Name=\"Up_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 0 L 4 4 L 8 0 Z\" />\r\n                                <Path Visibility=\"Collapsed\" HorizontalAlignment=\"Center\" x:Name=\"Down_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 4 L 4 0 L 8 4 Z\" />\r\n                            </Grid>\r\n                            <ContentPresenter SnapsToDevicePixels=\"True\" HorizontalAlignment=\"Center\" Margin=\"4,4,2,0\" VerticalAlignment=\"Top\" Grid.Row=\"1\" RecognizesAccessKey=\"True\">\r\n                                <ContentPresenter.LayoutTransform>\r\n                                    <TransformGroup>\r\n                                        <TransformGroup.Children>\r\n                                            <TransformCollection>\r\n                                                <RotateTransform Angle=\"90\" />\r\n                                            </TransformCollection>\r\n                                        </TransformGroup.Children>\r\n                                    </TransformGroup>\r\n                                </ContentPresenter.LayoutTransform>\r\n                            </ContentPresenter>\r\n                        </Grid>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Fill\" TargetName=\"Rectangle\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                            <Setter Property=\"BorderBrush\" TargetName=\"border\" Value=\"{DynamicResource DisabledBorderBrush}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"Up_Arrow\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Down_Arrow\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style TargetType=\"{x:Type Expander}\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Expander}\">\r\n                    <Border SnapsToDevicePixels=\"true\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"3\">\r\n                        <DockPanel>\r\n                            <ToggleButton FontFamily=\"{TemplateBinding FontFamily}\" FontSize=\"{TemplateBinding FontSize}\" FontStretch=\"{TemplateBinding FontStretch}\" FontStyle=\"{TemplateBinding FontStyle}\" FontWeight=\"{TemplateBinding FontWeight}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\" FocusVisualStyle=\"{StaticResource ExpanderHeaderFocusVisual}\" Margin=\"1,1,1,0\" MinHeight=\"0\" MinWidth=\"0\" x:Name=\"HeaderSite\" Style=\"{StaticResource ExpanderDownHeaderStyle}\" Content=\"{TemplateBinding Header}\" ContentTemplate=\"{TemplateBinding HeaderTemplate}\" ContentTemplateSelector=\"{TemplateBinding HeaderTemplateSelector}\" IsChecked=\"{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" DockPanel.Dock=\"Top\" />\r\n                            <Grid Visibility=\"Collapsed\" x:Name=\"grid\">\r\n                                <Border Background=\"{DynamicResource ShadeBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"1,0,1,1\" CornerRadius=\"3,3,3,3\" x:Name=\"border\" Margin=\"0,0,0,0\"/>\r\n                                <ContentPresenter Focusable=\"false\" HorizontalAlignment=\"Left\" Margin=\"1,1,1,1\" x:Name=\"ExpandSite\" VerticalAlignment=\"Top\" DockPanel.Dock=\"Bottom\" />\r\n                            </Grid>\r\n                        </DockPanel>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsExpanded\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"grid\" Value=\"Visible\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Down\" >\r\n                            <Setter Property=\"Margin\" TargetName=\"grid\" Value=\"1,0,1,0\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Right\">\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Right\" />\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Left\" />\r\n                            <Setter Property=\"Style\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderRightHeaderStyle}\" />\r\n                            <Setter Property=\"Background\" TargetName=\"border\" Value=\"{DynamicResource ShadeBrushRight}\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"grid\" Value=\"0,1,0,1\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Up\">\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Top\" />\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Bottom\" />\r\n                            <Setter Property=\"Style\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderUpHeaderStyle}\" />\r\n                            <Setter Property=\"Background\" TargetName=\"border\" Value=\"{DynamicResource ShadeBrushBottom}\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"grid\" Value=\"1,0,1,0\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Left\">\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Left\" />\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Right\" />\r\n                            <Setter Property=\"Style\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderLeftHeaderStyle}\" />\r\n                            <Setter Property=\"Background\" TargetName=\"border\" Value=\"{DynamicResource ShadeBrushLeft}\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"grid\" Value=\"0,1,0,1\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <ControlTemplate x:Key=\"ComboBoxToggleButton\" TargetType=\"{x:Type ToggleButton}\">\r\n        <ControlTemplate.Resources>\r\n            <Storyboard x:Key=\"HoverOn\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"HoverOff\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"PressedOn\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.6\"/>\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"PressedOff\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"1\"/>\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n        </ControlTemplate.Resources>\r\n        <Grid>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition/>\r\n                <ColumnDefinition Width=\"20\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Rectangle Grid.ColumnSpan=\"2\" HorizontalAlignment=\"Stretch\" x:Name=\"Rectangle\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" RadiusX=\"3\" RadiusY=\"3\" Fill=\"{DynamicResource NormalBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"2\"/>\r\n            <Rectangle HorizontalAlignment=\"Stretch\" x:Name=\"HoverRectangle\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" RadiusX=\"3\" RadiusY=\"3\" Fill=\"{DynamicResource HoverBrush}\" Stroke=\"{x:Null}\" StrokeThickness=\"2\" Grid.ColumnSpan=\"2\" Opacity=\"0\" Grid.Column=\"1\" Margin=\"0,2,2,2\"/>\r\n            <Rectangle Grid.Column=\"0\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" RadiusX=\"2\" RadiusY=\"2\" Stroke=\"{x:Null}\" Margin=\"2,2,0,2\">\r\n                <Rectangle.Fill>\r\n                    <SolidColorBrush Color=\"{DynamicResource WhiteColor}\"/>\r\n                </Rectangle.Fill>\r\n            </Rectangle>\r\n            <Path Grid.Column=\"1\" HorizontalAlignment=\"Center\" x:Name=\"Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 0 L 4 4 L 8 0 Z\" d:LayoutOverrides=\"Width, Height\" Margin=\"-2,2,0,0\"/>\r\n        </Grid>\r\n        <ControlTemplate.Triggers>\r\n            <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                <Trigger.ExitActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                </Trigger.ExitActions>\r\n                <Trigger.EnterActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                </Trigger.EnterActions>\r\n            </Trigger>\r\n            <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                <Trigger.ExitActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                </Trigger.ExitActions>\r\n                <Trigger.EnterActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                </Trigger.EnterActions>\r\n            </Trigger>\r\n            <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                <Setter Property=\"Fill\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Rectangle\"/>\r\n                <Setter Property=\"Stroke\" Value=\"{DynamicResource DisabledBorderBrush}\" TargetName=\"Rectangle\"/>\r\n                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                <Setter Property=\"Fill\" Value=\"{DynamicResource DisabledForegroundBrush}\" TargetName=\"Arrow\"/>\r\n            </Trigger>\r\n        </ControlTemplate.Triggers>\r\n    </ControlTemplate>\r\n\r\n\r\n    <ControlTemplate x:Key=\"ComboBoxTextBox\" TargetType=\"{x:Type TextBox}\">\r\n        <Border x:Name=\"PART_ContentHost\" Focusable=\"False\" Background=\"{TemplateBinding Background}\"/>\r\n    </ControlTemplate>\r\n\r\n\r\n    <Style TargetType=\"{x:Type ComboBox}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n<Setter Property=\"Template\" Value=\"{DynamicResource ComboBoxTemplate}\" />\r\n    </Style>\r\n    \r\n    <ControlTemplate x:Key=\"ComboBoxTemplate\" TargetType=\"{x:Type ComboBox}\">\r\n                    <Grid>\r\n                        <ToggleButton Grid.Column=\"2\" Template=\"{DynamicResource ComboBoxToggleButton}\" x:Name=\"ToggleButton\" Focusable=\"false\" IsChecked=\"{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" ClickMode=\"Press\"/>\r\n                        <ContentPresenter HorizontalAlignment=\"Left\" Margin=\"3,3,23,3\" x:Name=\"ContentSite\" VerticalAlignment=\"Center\" Content=\"{TemplateBinding SelectionBoxItem}\" ContentTemplate=\"{TemplateBinding SelectionBoxItemTemplate}\" ContentTemplateSelector=\"{TemplateBinding ItemTemplateSelector}\" IsHitTestVisible=\"False\"/>\r\n\r\n                        <TextBox Visibility=\"Hidden\" Template=\"{DynamicResource ComboBoxTextBox}\" HorizontalAlignment=\"Left\" Margin=\"3,3,23,3\" x:Name=\"PART_EditableTextBox\" Style=\"{x:Null}\" VerticalAlignment=\"Center\" Focusable=\"True\" Background=\"Transparent\" IsReadOnly=\"{TemplateBinding IsReadOnly}\"/>\r\n\r\n                        <Popup IsOpen=\"{TemplateBinding IsDropDownOpen}\" Placement=\"Bottom\" x:Name=\"Popup\" Focusable=\"False\" AllowsTransparency=\"True\" PopupAnimation=\"Slide\">\r\n                            <Grid MaxHeight=\"{TemplateBinding MaxDropDownHeight}\" MinWidth=\"{TemplateBinding ActualWidth}\" x:Name=\"DropDown\" SnapsToDevicePixels=\"True\">\r\n                                <Border x:Name=\"DropDownBorder\" Background=\"{DynamicResource ShadeBrush}\" BorderBrush=\"{DynamicResource SolidBorderBrush}\" BorderThickness=\"1\"/>\r\n                                <ScrollViewer Margin=\"4,6,4,6\"   SnapsToDevicePixels=\"True\" HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Auto\" CanContentScroll=\"True\">\r\n\r\n                                    <StackPanel IsItemsHost=\"True\" KeyboardNavigation.DirectionalNavigation=\"Contained\"/>\r\n\r\n                                </ScrollViewer>\r\n                            </Grid>\r\n                        </Popup>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"HasItems\" Value=\"false\">\r\n                            <Setter Property=\"MinHeight\" Value=\"95\" TargetName=\"DropDownBorder\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                            <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"AllowsTransparency\" SourceName=\"Popup\" Value=\"true\">\r\n                            <Setter Property=\"Margin\" Value=\"0,0,0,0\" TargetName=\"DropDownBorder\"/>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"DropDownBorder\" Value=\"3,3,3,3\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEditable\" Value=\"true\">\r\n                            <Setter Property=\"IsTabStop\" Value=\"false\"/>\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"PART_EditableTextBox\"/>\r\n                            <Setter Property=\"Visibility\" Value=\"Hidden\" TargetName=\"ContentSite\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n\r\n    <Style d:IsControlPart=\"True\" TargetType=\"{x:Type ComboBoxItem}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ComboBoxItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"SelectedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid SnapsToDevicePixels=\"true\" Margin=\"0,1,0,1\">\r\n                        <Border x:Name=\"Border\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\"/>\r\n                        <Border x:Name=\"SelectedBorder\" Background=\"{DynamicResource NormalBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Opacity=\"0\"/>\r\n                        <Border x:Name=\"HoverBorder\" Background=\"{DynamicResource HoverBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Opacity=\"0\"/>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Margin=\"5,2,0,2\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" x:Name=\"HoverOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"IsHighlighted\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOff}\" x:Name=\"SelectedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\" x:Name=\"SelectedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource SelectedBackgroundBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type ProgressBar}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ProgressBar}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"IndeterminateOn\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"IndeterminateGradientFill\"\r\n                                                   Storyboard.TargetProperty=\"(Shape.Fill).(LinearGradientBrush.Transform).(TransformGroup.Children)[0].X\" RepeatBehavior=\"Forever\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0\"/>\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:.5\"\r\n                                            Value=\"20\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n\r\n                        <Border x:Name=\"PART_Track\" Background=\"{DynamicResource ShadeBrush}\" BorderBrush=\"{DynamicResource DisabledBackgroundBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"6,6,6,6\"/>\r\n\r\n                        <Border HorizontalAlignment=\"Left\" x:Name=\"PART_Indicator\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{x:Null}\" BorderThickness=\"1\" CornerRadius=\"7,7,7,7\"/>\r\n                        <Grid x:Name=\"IndeterminateRoot\" Visibility=\"Collapsed\">\r\n                            <Rectangle Margin=\"1,1,1,1\"\tx:Name=\"IndeterminateGradientFill\" Opacity=\"0.7\" RadiusX=\"5\" RadiusY=\"5\" StrokeThickness=\"0\">\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush EndPoint=\"0,1\" StartPoint=\"20,1\" MappingMode=\"Absolute\" SpreadMethod=\"Repeat\">\r\n                                        <LinearGradientBrush.Transform>\r\n                                            <TransformGroup>\r\n                                                <TranslateTransform X=\"0\"/>\r\n                                                <SkewTransform AngleX=\"-30\"/>\r\n                                            </TransformGroup>\r\n                                        </LinearGradientBrush.Transform>\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                        <GradientStop Color=\"#00FFFFFF\" Offset=\".25\"/>\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.85\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                                <Rectangle.OpacityMask>\r\n                                    <LinearGradientBrush EndPoint=\"0.004,0.465\" StartPoint=\"0.997,0.422\">\r\n                                        <GradientStop Color=\"#00FFFFFF\"/>\r\n                                        <GradientStop Color=\"#00FFFFFF\" Offset=\"1\"/>\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.486\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.OpacityMask>\r\n                            </Rectangle>\r\n                        </Grid>\r\n                        <Border x:Name=\"DisabledBorder\" Background=\"{DynamicResource DisabledBackgroundBrush}\" BorderBrush=\"{DynamicResource DisabledBackgroundBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"6,6,6,6\" Opacity=\"0\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"DisabledBorder\" Value=\"0.8\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsIndeterminate\" Value=\"True\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource IndeterminateOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Setter Property=\"Visibility\" TargetName=\"IndeterminateRoot\" Value=\"Visible\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type TextBox}\">\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\"/>\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\"/>\r\n        <Setter Property=\"AllowDrop\" Value=\"true\"/>\r\n<Setter Property=\"Template\" Value=\"{DynamicResource TextBoxTemplate}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource ShadeBrush}\"/>\r\n    </Style>\r\n    \r\n    <ControlTemplate x:Key=\"TextBoxTemplate\" TargetType=\"{x:Type TextBox}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Storyboard.TargetName=\"HoverBorder\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\"\r\n\t\t\t\t\t\t\t\t\tValue=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Storyboard.TargetName=\"HoverBorder\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\"\r\n\t\t\t\t\t\t\t\t\tValue=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Border x:Name=\"Border\" Opacity=\"1\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\">\r\n                            <Grid>\r\n                                <Border BorderThickness=\"1\" CornerRadius=\"1,1,1,1\">\r\n                                    <Border.BorderBrush>\r\n                                        <SolidColorBrush Color=\"Transparent\"\r\n                                     x:Name=\"MouseOverColor\"/>\r\n                                    </Border.BorderBrush>\r\n                                    <ScrollViewer Margin=\"0\" x:Name=\"PART_ContentHost\"   Background=\"{TemplateBinding Background}\"/>\r\n                                </Border>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Border x:Name=\"HoverBorder\" Opacity=\"0\" BorderBrush=\"{StaticResource NormalBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"2,2,2,2\"/>\r\n                        <Border x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"False\" Opacity=\"0\" Background=\"#FFFFFFFF\" BorderBrush=\"#A5F7F7F7\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\"/>\r\n                        <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Opacity=\"0\" BorderBrush=\"{StaticResource NormalBrush}\" BorderThickness=\"2.1,2.1,2.1,2.1\" CornerRadius=\"0.2,0.2,0.2,0.2\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\"/>\r\n                                <Condition Property=\"IsFocused\" Value=\"False\"/>\r\n                            </MultiTrigger.Conditions>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n\r\n    <Style TargetType=\"{x:Type PasswordBox}\">\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\"/>\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\"/>\r\n        <Setter Property=\"AllowDrop\" Value=\"true\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type PasswordBox}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Storyboard.TargetName=\"HoverBorder\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\"\r\n\t\t\t\t\t\t\t\t\tValue=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Storyboard.TargetName=\"HoverBorder\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\"\r\n\t\t\t\t\t\t\t\t\tValue=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Border x:Name=\"Border\" Opacity=\"1\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\">\r\n                            <Grid>\r\n                                <Border BorderThickness=\"1\" CornerRadius=\"1,1,1,1\">\r\n                                    <Border.BorderBrush>\r\n                                        <SolidColorBrush Color=\"Transparent\"\r\n                                     x:Name=\"MouseOverColor\"/>\r\n                                    </Border.BorderBrush>\r\n                                    <ScrollViewer Margin=\"0\" x:Name=\"PART_ContentHost\"   Background=\"{TemplateBinding Background}\"/>\r\n                                </Border>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Border x:Name=\"HoverBorder\" Opacity=\"0\" BorderBrush=\"{StaticResource NormalBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"2,2,2,2\"/>\r\n                        <Border x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"False\" Opacity=\"0\" Background=\"#FFFFFFFF\" BorderBrush=\"#A5F7F7F7\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\"/>\r\n                        <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Opacity=\"0\" BorderBrush=\"{StaticResource NormalBrush}\" BorderThickness=\"2.1,2.1,2.1,2.1\" CornerRadius=\"0.2,0.2,0.2,0.2\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\"/>\r\n                                <Condition Property=\"IsFocused\" Value=\"False\"/>\r\n                            </MultiTrigger.Conditions>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource ShadeBrush}\"/>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type RichTextBox}\">\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\"/>\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\"/>\r\n        <Setter Property=\"AllowDrop\" Value=\"true\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type RichTextBox}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Storyboard.TargetName=\"HoverBorder\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\"\r\n\t\t\t\t\t\t\t\t\tValue=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Storyboard.TargetName=\"HoverBorder\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\"\r\n\t\t\t\t\t\t\t\t\tValue=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Border x:Name=\"Border\" Opacity=\"1\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\">\r\n                            <Grid>\r\n                                <Border BorderThickness=\"1\" CornerRadius=\"1,1,1,1\">\r\n                                    <Border.BorderBrush>\r\n                                        <SolidColorBrush Color=\"Transparent\"\r\n                                     x:Name=\"MouseOverColor\"/>\r\n                                    </Border.BorderBrush>\r\n                                    <ScrollViewer Margin=\"0\" x:Name=\"PART_ContentHost\"   Background=\"{TemplateBinding Background}\"/>\r\n                                </Border>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Border x:Name=\"HoverBorder\" Opacity=\"0\" BorderBrush=\"{StaticResource NormalBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"2,2,2,2\"/>\r\n                        <Border x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"False\" Opacity=\"0\" Background=\"#FFFFFFFF\" BorderBrush=\"#A5F7F7F7\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\"/>\r\n                        <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Opacity=\"0\" BorderBrush=\"{StaticResource NormalBrush}\" BorderThickness=\"2.1,2.1,2.1,2.1\" CornerRadius=\"0.2,0.2,0.2,0.2\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\"/>\r\n                                <Condition Property=\"IsFocused\" Value=\"False\"/>\r\n                            </MultiTrigger.Conditions>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource ShadeBrush}\"/>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type Label}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Label}\">\r\n                    <Grid>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" RecognizesAccessKey=\"True\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\"/>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type Menu}\">\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource WindowBackgroundBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"True\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Menu}\">\r\n                    <Grid>\r\n                        <Border Margin=\"1\" x:Name=\"Border\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\"/>\r\n                        <StackPanel Background=\"{TemplateBinding Background}\" IsItemsHost=\"True\" ClipToBounds=\"True\" Orientation=\"Horizontal\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DisabledBorderBrush}\" TargetName=\"Border\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <DropShadowBitmapEffect x:Key=\"PopupDropShadow\" ShadowDepth=\"1.5\" Softness=\"0.15\"/>\r\n\r\n    <Style TargetType=\"{x:Type MenuItem}\">\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\"/>\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type MenuItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HighlightedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HighlightedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Border x:Name=\"Border\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\">\r\n                        <Grid>\r\n\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition MinWidth=\"17\" Width=\"Auto\" SharedSizeGroup=\"MenuItemIconColumnGroup\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"Auto\" SharedSizeGroup=\"MenuItemIGTColumnGroup\"/>\r\n                                <ColumnDefinition Width=\"14\"/>\r\n                            </Grid.ColumnDefinitions>\r\n\r\n                            <Border Grid.Column=\"0\" Grid.ColumnSpan=\"4\" Background=\"{DynamicResource NormalBrush}\" Opacity=\"0\" x:Name=\"border\"/>\r\n\r\n                            <ContentPresenter Margin=\"4,0,6,0\" x:Name=\"Icon\" VerticalAlignment=\"Center\" ContentSource=\"Icon\"/>\r\n\r\n                            <Grid Visibility=\"Hidden\" Margin=\"4,0,6,0\" x:Name=\"GlyphPanel\" VerticalAlignment=\"Center\">\r\n                                <Path x:Name=\"GlyphPanelpath\" VerticalAlignment=\"Center\" Fill=\"{TemplateBinding Foreground}\" Data=\"M0,2 L0,4.8 L2.5,7.4 L7.1,2.8 L7.1,0 L2.5,4.6 z\" FlowDirection=\"LeftToRight\"/>\r\n                            </Grid>\r\n\r\n                            <ContentPresenter Grid.Column=\"1\" Margin=\"{TemplateBinding Padding}\" x:Name=\"HeaderHost\" RecognizesAccessKey=\"True\" ContentSource=\"Header\"/>\r\n\r\n                            <Grid Grid.Column=\"3\" Margin=\"4,0,6,0\" x:Name=\"ArrowPanel\" VerticalAlignment=\"Center\">\r\n                                <Path x:Name=\"ArrowPanelPath\" VerticalAlignment=\"Center\" Fill=\"{TemplateBinding Foreground}\" Data=\"M0,0 L0,8 L4,4 z\"/>\r\n                            </Grid>\r\n\r\n                            <Popup IsOpen=\"{Binding Path=IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Right\" x:Name=\"SubMenuPopup\" Focusable=\"false\" AllowsTransparency=\"true\" PopupAnimation=\"{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}\" VerticalOffset=\"-3\">\r\n                                <Grid x:Name=\"SubMenu\">\r\n                                    <Border x:Name=\"SubMenuBorder\" Background=\"{DynamicResource WindowBackgroundBrush}\" BorderBrush=\"{DynamicResource SolidBorderBrush}\" BorderThickness=\"1\"/>\r\n\r\n                                    <StackPanel IsItemsHost=\"True\" KeyboardNavigation.DirectionalNavigation=\"Cycle\"/>\r\n                                </Grid>\r\n                            </Popup>\r\n\r\n                        </Grid>\r\n                    </Border>\r\n\r\n                    <ControlTemplate.Triggers>\r\n\r\n                        <Trigger Property=\"Role\" Value=\"TopLevelHeader\">\r\n                            <Setter Property=\"Margin\" Value=\"0,1,0,1\"/>\r\n                            <Setter Property=\"Padding\" Value=\"6,3,6,3\"/>\r\n                            <Setter Property=\"Grid.IsSharedSizeScope\" Value=\"true\"/>\r\n                            <Setter Property=\"Placement\" Value=\"Bottom\" TargetName=\"SubMenuPopup\"/>\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ArrowPanel\"/>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"Role\" Value=\"TopLevelItem\">\r\n                            <Setter Property=\"Margin\" Value=\"0,1,0,1\"/>\r\n                            <Setter Property=\"Padding\" Value=\"6,3,6,3\"/>\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ArrowPanel\"/>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"Role\" Value=\"SubmenuHeader\">\r\n                            <Setter Property=\"DockPanel.Dock\" Value=\"Top\"/>\r\n                            <Setter Property=\"Padding\" Value=\"0,2,0,2\"/>\r\n                            <Setter Property=\"Grid.IsSharedSizeScope\" Value=\"true\"/>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"Role\" Value=\"SubmenuItem\">\r\n                            <Setter Property=\"DockPanel.Dock\" Value=\"Top\"/>\r\n                            <Setter Property=\"Padding\" Value=\"0,2,0,2\"/>\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ArrowPanel\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsSuspendingPopupAnimation\" Value=\"true\">\r\n                            <Setter Property=\"PopupAnimation\" Value=\"None\" TargetName=\"SubMenuPopup\"/>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"Icon\" Value=\"{x:Null}\">\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"Icon\"/>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"GlyphPanel\"/>\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"Icon\"/>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"AllowsTransparency\" SourceName=\"SubMenuPopup\" Value=\"true\">\r\n                            <Setter Property=\"Margin\" Value=\"0,0,3,3\" TargetName=\"SubMenu\"/>\r\n                            <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" TargetName=\"SubMenu\"/>\r\n                            <Setter Property=\"BitmapEffect\" Value=\"{DynamicResource PopupDropShadow}\" TargetName=\"SubMenuBorder\"/>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"IsHighlighted\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HighlightedOff}\" x:Name=\"HighlightedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HighlightedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type Separator}\">\r\n        <Setter Property=\"Height\" Value=\"1\"/>\r\n        <Setter Property=\"Margin\" Value=\"0,2,0,2\"/>\r\n        <Setter Property=\"Focusable\" Value=\"false\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Separator}\">\r\n                    <Border BorderBrush=\"{DynamicResource SolidBorderBrush}\" BorderThickness=\"1\"/>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type TabControl}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TabControl}\">\r\n                    <Grid ClipToBounds=\"true\" SnapsToDevicePixels=\"true\" KeyboardNavigation.TabNavigation=\"Local\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition x:Name=\"ColumnDefinition0\" />\r\n                            <ColumnDefinition x:Name=\"ColumnDefinition1\" Width=\"0\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\" x:Name=\"RowDefinition0\" />\r\n                            <RowDefinition Height=\"*\" x:Name=\"RowDefinition1\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Border CornerRadius=\"2,2,0,0\" x:Name=\"border\" Margin=\"3,0,0,-2\">\r\n                            <TabPanel x:Name=\"HeaderPanel\" IsItemsHost=\"true\" Panel.ZIndex=\"1\" KeyboardNavigation.TabIndex=\"1\" RenderTransformOrigin=\"0.5,0.5\" Width=\"Auto\" Height=\"Auto\">\r\n                                <TabPanel.LayoutTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform Angle=\"0\" />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </TabPanel.LayoutTransform>\r\n                                <TabPanel.RenderTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </TabPanel.RenderTransform>\r\n\r\n                            </TabPanel>\r\n                        </Border>\r\n                        <Border Grid.Row=\"1\" x:Name=\"ContentPanel\" Background=\"{DynamicResource ShadeBrushTop}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"1\" CornerRadius=\"0,0,3,3\" KeyboardNavigation.DirectionalNavigation=\"Contained\" KeyboardNavigation.TabNavigation=\"Local\" KeyboardNavigation.TabIndex=\"2\">\r\n                            <ContentPresenter Margin=\"4\" x:Name=\"PART_SelectedContentHost\" ContentSource=\"SelectedContent\"/>\r\n                        </Border>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Bottom\">\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition1\" Value=\"Auto\" />\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"border\" Value=\"1\"/>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"border\" Value=\"0,0,2,2\"/>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"ContentPanel\" Value=\"3,3,0,0\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Left\">\r\n\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"HeaderPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"ContentPanel\" Value=\"1\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition0\" Value=\"Auto\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition1\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition1\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"border\" Value=\"0\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"border\" Value=\"0,0,0,0\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"ContentPanel\" Value=\"0,0,0,0\"/>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"border\" Value=\"0,2,2,0\"/>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"ContentPanel\" Value=\"0,3,3,0\"/>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Right\">\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"HeaderPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition1\" Value=\"Auto\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition1\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"border\" Value=\"1\"/>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"border\" Value=\"0,2,2,0\"/>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"ContentPanel\" Value=\"3,0,0,3\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"border\" Value=\"0,0,0,-2\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style d:IsControlPart=\"True\" TargetType=\"{x:Type TabItem}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TabItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid x:Name=\"grid\">\r\n                        <Grid.LayoutTransform>\r\n                            <TransformGroup>\r\n                                <ScaleTransform ScaleX=\"1\" ScaleY=\"1\"/>\r\n                                <SkewTransform AngleX=\"0\" AngleY=\"0\"/>\r\n                                <RotateTransform Angle=\"0\"/>\r\n                                <TranslateTransform X=\"0\" Y=\"0\"/>\r\n                            </TransformGroup>\r\n                        </Grid.LayoutTransform>\r\n                        <Grid Margin=\"1,0,1,0\">\r\n                            <Border x:Name=\"Border\" Background=\"{DynamicResource SelectedBackgroundBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"3,3,0,0\"/>\r\n                            <Border x:Name=\"SelectedBorder\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"2,2,2,0\" CornerRadius=\"3,3,0,0\" Opacity=\"0\" Margin=\"-2,0,-2,0\"/>\r\n                            <Border x:Name=\"HoverBorder\" Background=\"{DynamicResource HoverBrush}\" BorderBrush=\"{x:Null}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"3,3,0,0\" Opacity=\"0\"/>\r\n                            <Border x:Name=\"SelectedHoverBorder\" Background=\"{DynamicResource HoverBrush}\" BorderBrush=\"{x:Null}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"3,3,0,0\" Opacity=\"0\"/>\r\n                            <ContentPresenter HorizontalAlignment=\"Center\" Margin=\"6,3,6,3\" x:Name=\"ContentSite\" VerticalAlignment=\"Center\" RecognizesAccessKey=\"True\" ContentSource=\"Header\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Left\">\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"grid\">\r\n                                <Setter.Value>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform Angle=\"-90\" />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Right\">\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"grid\">\r\n                                <Setter.Value>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform Angle=\"90\" />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Bottom\">\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"ContentSite\">\r\n                                <Setter.Value>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform Angle=\"180\" />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"grid\">\r\n                                <Setter.Value>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\"/>\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\"/>\r\n                                        <RotateTransform Angle=\"180\"/>\r\n                                        <TranslateTransform X=\"0\" Y=\"0\"/>\r\n                                    </TransformGroup>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" />\r\n                                <Condition Property=\"Selector.IsSelected\" Value=\"False\" />\r\n                            </MultiTrigger.Conditions>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsSelected\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOff}\" x:Name=\"SelectedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\" x:Name=\"SelectedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Setter Property=\"Panel.ZIndex\" Value=\"100\" />\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" SourceName=\"grid\" />\r\n                                <Condition Property=\"Selector.IsSelected\" Value=\"True\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <Setter Property=\"Opacity\" TargetName=\"SelectedHoverBorder\" Value=\"0.6\"/>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                            <Setter Property=\"Background\" TargetName=\"Border\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                            <Setter Property=\"BorderBrush\" TargetName=\"Border\" Value=\"{DynamicResource DisabledBorderBrush}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Style.Triggers>\r\n        </Style.Triggers>\r\n    </Style>\r\n\r\n    <Style x:Key=\"NuclearSliderThumb\" d:IsControlPart=\"True\" TargetType=\"{x:Type Thumb}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n        <Setter Property=\"Height\" Value=\"14\"/>\r\n        <Setter Property=\"Width\" Value=\"14\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundAnimation\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundAnimation\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Rectangle x:Name=\"Base\" RadiusX=\"6\" RadiusY=\"6\" Fill=\"#FF000000\" StrokeThickness=\"2\"/>\r\n                        <Rectangle x:Name=\"Background\" Fill=\"{TemplateBinding Background}\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" RadiusX=\"4\" RadiusY=\"4\"/>\r\n                        <Rectangle x:Name=\"BackgroundAnimation\" Opacity=\"0\" Fill=\"{StaticResource HoverBrush}\" RadiusX=\"3\" RadiusY=\"3\" Margin=\"2,2,2,2\" StrokeThickness=\"0\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Fill\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Base\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type Slider}\">\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource SelectedBackgroundBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource HorizontalSliderBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Slider}\">\r\n                    <Grid x:Name=\"GridRoot\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\" MinHeight=\"{TemplateBinding MinHeight}\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n\r\n                        <TickBar Visibility=\"Collapsed\" x:Name=\"TopTick\" Height=\"4\" SnapsToDevicePixels=\"True\" Placement=\"Top\" Fill=\"{DynamicResource GlyphBrush}\"/>\r\n                        <Border Grid.Row=\"1\" Margin=\"0\" x:Name=\"Border\" Height=\"4\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\"/>\r\n\r\n                        <Track Grid.Row=\"1\" x:Name=\"PART_Track\">\r\n                            <Track.Thumb>\r\n                                <Thumb Style=\"{DynamicResource NuclearSliderThumb}\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"2,2,2,2\" Width=\"24\" Height=\"13\"/>\r\n                            </Track.Thumb>\r\n                            <Track.IncreaseRepeatButton>\r\n                                <RepeatButton Style=\"{DynamicResource NuclearScrollRepeatButtonStyle}\" Command=\"Slider.IncreaseLarge\"/>\r\n                            </Track.IncreaseRepeatButton>\r\n                            <Track.DecreaseRepeatButton>\r\n                                <RepeatButton Style=\"{DynamicResource NuclearScrollRepeatButtonStyle}\" Command=\"Slider.DecreaseLarge\"/>\r\n                            </Track.DecreaseRepeatButton>\r\n                        </Track>\r\n\r\n                        <TickBar Visibility=\"Collapsed\" Grid.Row=\"2\" x:Name=\"BottomTick\" Height=\"4\" SnapsToDevicePixels=\"True\" Placement=\"Bottom\" Fill=\"{TemplateBinding Foreground}\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"TickPlacement\" Value=\"TopLeft\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"TopTick\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"TickPlacement\" Value=\"BottomRight\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"BottomTick\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"TickPlacement\" Value=\"Both\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"TopTick\"/>\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"BottomTick\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DisabledBorderBrush}\" TargetName=\"Border\"/>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"Orientation\" Value=\"Vertical\">\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"GridRoot\">\r\n                                <Setter.Value>\r\n                                    <RotateTransform Angle=\"-90\"/>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                            <Setter TargetName=\"PART_Track\" Property=\"Orientation\" Value=\"Horizontal\"/>\r\n                        </Trigger>\r\n\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"BorderThickness\" Value=\"1,1,1,1\"/>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type TreeView}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TreeView}\">\r\n                    <Grid>\r\n                        <Border x:Name=\"Border\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{DynamicResource SolidBorderBrush}\" BorderThickness=\"1\" CornerRadius=\"3,3,3,3\">\r\n                            <ScrollViewer   Focusable=\"False\" Padding=\"4\" HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Auto\" CanContentScroll=\"False\">\r\n                                <ItemsPresenter/>\r\n                            </ScrollViewer>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource ShadeBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n    </Style>\r\n\r\n    <Style x:Key=\"NuclearTreeViewItemToggleButton\" d:IsControlPart=\"True\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Focusable\" Value=\"False\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <Grid Width=\"15\" Height=\"13\" Background=\"Transparent\">\r\n                        <Path Visibility=\"Collapsed\" HorizontalAlignment=\"Left\" Margin=\"1,1,1,1\" x:Name=\"IsExpandedPath\" VerticalAlignment=\"Center\" Data=\"M 0 4 L 8 4 L 4 8 Z\">\r\n                            <Path.Fill>\r\n                                <SolidColorBrush Color=\"{DynamicResource BlackColor}\"/>\r\n                            </Path.Fill>\r\n                        </Path>\r\n                        <Path HorizontalAlignment=\"Left\" Margin=\"1,1,1,1\" x:Name=\"ExpandPath\" VerticalAlignment=\"Center\" Data=\"M 4 0 L 8 4 L 4 8 Z\">\r\n                            <Path.Fill>\r\n                                <SolidColorBrush Color=\"{DynamicResource BlackColor}\"/>\r\n                            </Path.Fill>\r\n                        </Path>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsChecked\" Value=\"True\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"IsExpandedPath\"/>\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ExpandPath\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style d:IsControlPart=\"True\" TargetType=\"{x:Type TreeViewItem}\">\r\n        <Style.Triggers>\r\n            <Trigger Property=\"IsSelected\" Value=\"True\">\r\n                <Setter Property=\"Foreground\">\r\n                    <Setter.Value>\r\n                        <SolidColorBrush Color=\"{DynamicResource WhiteColor}\"/>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Trigger>\r\n        </Style.Triggers>\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\"/>\r\n        <Setter Property=\"Padding\" Value=\"1,0,0,0\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TreeViewItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"SelectedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder2\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.5\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder2\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedHoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedHoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedHoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedHoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition MinWidth=\"19\" Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition/>\r\n                        </Grid.RowDefinitions>\r\n                        <ToggleButton x:Name=\"Expander\" Style=\"{DynamicResource NuclearTreeViewItemToggleButton}\" IsChecked=\"{Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}\" ClickMode=\"Press\"/>\r\n                        <Border Grid.Column=\"1\" x:Name=\"Selection_Border\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\">\r\n                            <Grid>\r\n                                <Border Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"2,2,2,2\" Opacity=\"0\" x:Name=\"SelectedBorder\"/>\r\n                                <Border x:Name=\"HoverBorder1\" Opacity=\"0\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"2,2,2,2\"/>\r\n                                <Border x:Name=\"HoverBorder2\" Opacity=\"0\" Background=\"{DynamicResource HoverBrush}\" BorderBrush=\"{x:Null}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"2,2,2,2\"/>\r\n                                <ContentPresenter HorizontalAlignment=\"Stretch\" x:Name=\"PART_Header\" ContentSource=\"Header\" d:LayoutOverrides=\"Width\" Margin=\"3,2,3,2\"/>\r\n                                <Border x:Name=\"SelectedHoverBorder\" Opacity=\"0\" Background=\"{DynamicResource HoverBrush}\" BorderBrush=\"{x:Null}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"2,2,2,2\"/>\r\n                            </Grid>\r\n                        </Border>\r\n                        <ItemsPresenter Grid.Column=\"1\" Grid.ColumnSpan=\"2\" Grid.Row=\"1\" x:Name=\"ItemsHost\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedHoverOff}\" x:Name=\"SelectedHoverOff_BeginStoryboard\"/>\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedHoverOn}\" x:Name=\"SelectedHoverOn_BeginStoryboard\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsSelected\" Value=\"True\"/>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\"/>\r\n                            </MultiTrigger.Conditions>\r\n                        </MultiTrigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsSelected\" Value=\"False\"/>\r\n                                <Condition Property=\"IsMouseOver\" SourceName=\"Selection_Border\" Value=\"True\"/>\r\n                            </MultiTrigger.Conditions>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"HoverOff_BeginStoryboard\" Storyboard=\"{StaticResource HoverOff}\"/>\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"HoverOn_BeginStoryboard\" Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsExpanded\" Value=\"false\">\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ItemsHost\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"HasItems\" Value=\"false\">\r\n                            <Setter Property=\"Visibility\" Value=\"Hidden\" TargetName=\"Expander\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsSelected\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"SelectedOff_BeginStoryboard\" Storyboard=\"{StaticResource SelectedOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}\"/>\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsSelected\" Value=\"true\"/>\r\n                                <Condition Property=\"IsSelectionActive\" Value=\"false\"/>\r\n                            </MultiTrigger.Conditions>\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource {x:Static SystemColors.ControlBrushKey}}\" TargetName=\"Selection_Border\"/>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}\"/>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Static ToolBar.ButtonStyleKey}\" TargetType=\"{x:Type Button}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource NuclearButtonFocusVisual}\"/>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\" Value=\"{DynamicResource ButtonTemplate}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n\t\t\t\t\t\t<Setter Property=\"FontSize\" Value=\"10\"/>\r\n\t\t\t\t<Setter Property=\"MinHeight\" Value=\"18\"/>\r\n\t\t\t\t<Setter Property=\"MinWidth\" Value=\"50\"/>\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Static ToolBar.RadioButtonStyleKey}\" TargetType=\"{x:Type RadioButton}\">\r\n\t\t\t<Setter Property=\"FontSize\" Value=\"10\"/>\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource RadioButtonFocusVisual}\"/>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        \r\n<Setter Property=\"Template\" Value=\"{DynamicResource RadioButtonTemplate}\" />\r\n\t\t<Setter Property=\"FontSize\" Value=\"10\"/>\r\n        <Style.Triggers>\r\n            <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n            </Trigger>\r\n        </Style.Triggers>\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Static ToolBar.CheckBoxStyleKey}\" TargetType=\"{x:Type CheckBox}\">\r\n\t\t\t<Setter Property=\"FontSize\" Value=\"10\"/>\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource CheckBoxFocusVisual}\"/>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\" Value=\"{DynamicResource CheckBoxTemplate}\" />\r\n        <Style.Triggers>\r\n            <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n            </Trigger>\r\n        </Style.Triggers>\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Static ToolBar.ComboBoxStyleKey}\" TargetType=\"{x:Type ComboBox}\">\r\n\t\t\t<Setter Property=\"FontSize\" Value=\"10\"/>\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n<Setter Property=\"Template\" Value=\"{DynamicResource ComboBoxTemplate}\" />\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Static ToolBar.TextBoxStyleKey}\" TargetType=\"{x:Type TextBox}\">\r\n\t\t\t<Setter Property=\"FontSize\" Value=\"10\"/>\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\"/>\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\"/>\r\n        <Setter Property=\"AllowDrop\" Value=\"true\"/>\r\n        <Setter Property=\"Template\" Value=\"{DynamicResource TextBoxTemplate}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource ShadeBrush}\"/>\r\n    </Style>\r\n\r\n    <LinearGradientBrush x:Key=\"ToolBarHorizontalBackground\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#FFFFFF\" Offset=\"0\"/>\r\n        <GradientStop Color=\"#FFFBFF\" Offset=\"0.5\"/>\r\n        <GradientStop Color=\"#F7F7F7\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"ToolBarToggleButtonHorizontalBackground\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#ECECEC\" Offset=\"0\"/>\r\n        <GradientStop Color=\"#DDDDDD\" Offset=\"0.5\"/>\r\n        <GradientStop Color=\"#A0A0A0\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"ToolBarButtonHover\" Color=\"{StaticResource NormalBrushGradient1}\" />\r\n    <SolidColorBrush x:Key=\"ToolBarGripper\" Color=\"#C6C3C6\"/>\r\n    <Style x:Key=\"ToolBarHorizontalOverflowButtonStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource ToolBarToggleButtonHorizontalBackground}\"/>\r\n        <Setter Property=\"MinHeight\" Value=\"0\"/>\r\n        <Setter Property=\"MinWidth\" Value=\"0\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <Border SnapsToDevicePixels=\"true\" x:Name=\"Bd\" CornerRadius=\"0,0,0,0\" Background=\"{DynamicResource SelectedBackgroundBrush}\">\r\n                        <Canvas SnapsToDevicePixels=\"true\" HorizontalAlignment=\"Right\" Margin=\"7,2,2,2\" VerticalAlignment=\"Bottom\" Width=\"6\" Height=\"7\">\r\n                            <Path Stroke=\"White\" Data=\"M 1 1.5 L 6 1.5\"/>\r\n                            <Path Stroke=\"{TemplateBinding Foreground}\" Data=\"M 0 0.5 L 5 0.5\"/>\r\n                            <Path Fill=\"White\" Data=\"M 0.5 4 L 6.5 4 L 3.5 7 Z\"/>\r\n                            <Path Fill=\"{TemplateBinding Foreground}\" Data=\"M -0.5 3 L 5.5 3 L 2.5 6 Z\"/>\r\n                        </Canvas>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Setter Property=\"Background\" TargetName=\"Bd\" Value=\"{DynamicResource MouseOverBrush}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                            <Setter Property=\"Background\" TargetName=\"Bd\" Value=\"{StaticResource ToolBarButtonHover}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{StaticResource ToolBarGripper}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <SolidColorBrush x:Key=\"ToolBarSubMenuBackground\" Color=\"#FFFDFDFD\"/>\r\n    <SolidColorBrush x:Key=\"ToolBarMenuBorder\" Color=\"#FFFFFFFF\"/>\r\n    <Style x:Key=\"ToolBarThumbStyle\" TargetType=\"{x:Type Thumb}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <Border SnapsToDevicePixels=\"True\" Background=\"Transparent\" Padding=\"{TemplateBinding Padding}\" CornerRadius=\"0,0,0,0\">\r\n                        <Rectangle>\r\n                            <Rectangle.Fill>\r\n                                <DrawingBrush TileMode=\"Tile\" Viewbox=\"0,0,4,4\" ViewboxUnits=\"Absolute\" Viewport=\"0,0,4,4\" ViewportUnits=\"Absolute\">\r\n                                    <DrawingBrush.Drawing>\r\n                                        <DrawingGroup>\r\n                                            <GeometryDrawing Brush=\"White\" Geometry=\"M 1 1 L 1 3 L 3 3 L 3 1 z\"/>\r\n                                            <GeometryDrawing Brush=\"{StaticResource ToolBarGripper}\" Geometry=\"M 0 0 L 0 2 L 2 2 L 2 0 z\"/>\r\n                                        </DrawingGroup>\r\n                                    </DrawingBrush.Drawing>\r\n                                </DrawingBrush>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Setter Property=\"Cursor\" Value=\"SizeAll\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <LinearGradientBrush x:Key=\"ToolBarToggleButtonVerticalBackground\" EndPoint=\"1,0\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#ECECEC\" Offset=\"0\"/>\r\n        <GradientStop Color=\"#DDDDDD\" Offset=\"0.5\"/>\r\n        <GradientStop Color=\"#A0A0A0\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <Style x:Key=\"ToolBarVerticalOverflowButtonStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource ToolBarToggleButtonVerticalBackground}\"/>\r\n        <Setter Property=\"MinHeight\" Value=\"0\"/>\r\n        <Setter Property=\"MinWidth\" Value=\"0\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <Border SnapsToDevicePixels=\"true\" x:Name=\"Bd\" Background=\"{TemplateBinding Background}\" CornerRadius=\"0,0,3,3\">\r\n                        <Canvas SnapsToDevicePixels=\"true\" HorizontalAlignment=\"Right\" Margin=\"2,7,2,2\" VerticalAlignment=\"Bottom\" Width=\"7\" Height=\"6\">\r\n                            <Path Stroke=\"White\" Data=\"M 1.5 1 L 1.5 6\"/>\r\n                            <Path Stroke=\"{TemplateBinding Foreground}\" Data=\"M 0.5 0 L 0.5 5\"/>\r\n                            <Path Fill=\"White\" Data=\"M 3.5 0.5 L 7 3.5 L 4 6.5 Z\"/>\r\n                            <Path Fill=\"{TemplateBinding Foreground}\" Data=\"M 3 -0.5 L 6 2.5 L 3 5.5 Z\"/>\r\n                        </Canvas>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Setter Property=\"Background\" TargetName=\"Bd\" Value=\"{StaticResource ToolBarButtonHover}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                            <Setter Property=\"Background\" TargetName=\"Bd\" Value=\"{StaticResource ToolBarButtonHover}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{StaticResource ToolBarGripper}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <LinearGradientBrush x:Key=\"ToolBarVerticalBackground\" EndPoint=\"1,0\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#FFFFFF\" Offset=\"0\"/>\r\n        <GradientStop Color=\"#FFFBFF\" Offset=\"0.5\"/>\r\n        <GradientStop Color=\"#F7F7F7\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <Style TargetType=\"{x:Type ToolBar}\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource ToolBarHorizontalBackground}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToolBar}\">\r\n                    <Grid SnapsToDevicePixels=\"true\" Margin=\"3,1,1,1\" x:Name=\"Grid\">\r\n                        <Grid HorizontalAlignment=\"Right\" x:Name=\"OverflowGrid\">\r\n                            <ToggleButton IsEnabled=\"{TemplateBinding HasOverflowItems}\" FocusVisualStyle=\"{x:Null}\" x:Name=\"OverflowButton\" Style=\"{StaticResource ToolBarHorizontalOverflowButtonStyle}\" ClickMode=\"Press\" IsChecked=\"{Binding Path=IsOverflowOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\"/>\r\n                            <Popup Focusable=\"false\" AllowsTransparency=\"true\" IsOpen=\"{Binding Path=IsOverflowOpen, RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Bottom\" PopupAnimation=\"{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}\" StaysOpen=\"False\" x:Name=\"OverflowPopup\">\r\n                                <Border x:Name=\"Shdw\">\r\n                                    <Border BorderThickness=\"1,1,1,1\" Background=\"{DynamicResource ShadeBrush}\" BorderBrush=\"{DynamicResource LightBrush}\">\r\n                                        <ToolBarOverflowPanel Focusable=\"true\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" FocusVisualStyle=\"{x:Null}\" Margin=\"2\" x:Name=\"PART_ToolBarOverflowPanel\" WrapWidth=\"200\" KeyboardNavigation.DirectionalNavigation=\"Cycle\" KeyboardNavigation.TabNavigation=\"Cycle\"/>\r\n                                    </Border>\r\n                                </Border>\r\n                            </Popup>\r\n                        </Grid>\r\n                        <Border Margin=\"0,0,11,0\" x:Name=\"MainPanelBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"0,0,0,0\" Padding=\"{TemplateBinding Padding}\" Background=\"{DynamicResource SelectedBackgroundBrush}\">\r\n                            <Grid>\r\n\r\n                                <DockPanel KeyboardNavigation.TabIndex=\"1\" KeyboardNavigation.TabNavigation=\"Local\">\r\n                                    <Thumb Padding=\"6,5,1,6\" Margin=\"-3,-1,0,0\" x:Name=\"ToolBarThumb\" Style=\"{StaticResource ToolBarThumbStyle}\" Width=\"10\"/>\r\n                                    <ContentPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" HorizontalAlignment=\"Center\" Margin=\"4,0,4,0\" x:Name=\"ToolBarHeader\" VerticalAlignment=\"Center\" ContentSource=\"Header\"/>\r\n                                    <ToolBarPanel SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Margin=\"0,1,2,2\" x:Name=\"PART_ToolBarPanel\" IsItemsHost=\"true\" Background=\"{DynamicResource SelectedBackgroundBrush}\"/>\r\n                                </DockPanel>\r\n                            </Grid>\r\n                        </Border>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsOverflowOpen\" Value=\"true\">\r\n                            <Setter Property=\"IsEnabled\" TargetName=\"ToolBarThumb\" Value=\"false\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"Header\" Value=\"{x:Null}\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"ToolBarHeader\" Value=\"Collapsed\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"ToolBarTray.IsLocked\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"ToolBarThumb\" Value=\"Collapsed\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"HasDropShadow\" SourceName=\"OverflowPopup\" Value=\"true\">\r\n                            <Setter Property=\"Margin\" TargetName=\"Shdw\" Value=\"0,0,5,5\"/>\r\n                            <Setter Property=\"SnapsToDevicePixels\" TargetName=\"Shdw\" Value=\"true\"/>\r\n                            <Setter Property=\"Background\" TargetName=\"Shdw\" Value=\"#71000000\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"Orientation\" Value=\"Vertical\">\r\n                            <Setter Property=\"Margin\" TargetName=\"Grid\" Value=\"1,3,1,1\"/>\r\n                            <Setter Property=\"Style\" TargetName=\"OverflowButton\" Value=\"{StaticResource ToolBarVerticalOverflowButtonStyle}\"/>\r\n                            <Setter Property=\"Height\" TargetName=\"ToolBarThumb\" Value=\"10\"/>\r\n                            <Setter Property=\"Width\" TargetName=\"ToolBarThumb\" Value=\"Auto\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"ToolBarThumb\" Value=\"-1,-3,0,0\"/>\r\n                            <Setter Property=\"Padding\" TargetName=\"ToolBarThumb\" Value=\"5,6,6,1\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"ToolBarHeader\" Value=\"0,0,0,4\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"PART_ToolBarPanel\" Value=\"1,0,2,2\"/>\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ToolBarThumb\" Value=\"Top\"/>\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ToolBarHeader\" Value=\"Top\"/>\r\n                            <Setter Property=\"HorizontalAlignment\" TargetName=\"OverflowGrid\" Value=\"Stretch\"/>\r\n                            <Setter Property=\"VerticalAlignment\" TargetName=\"OverflowGrid\" Value=\"Bottom\"/>\r\n                            <Setter Property=\"Placement\" TargetName=\"OverflowPopup\" Value=\"Right\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"MainPanelBorder\" Value=\"0,0,0,11\"/>\r\n                            <Setter Property=\"Background\" Value=\"{StaticResource ToolBarVerticalBackground}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\"/>\r\n    </Style>\r\n\r\n    <BorderGapMaskConverter x:Key=\"BorderGapMaskConverter\" />\r\n    <Style TargetType=\"{x:Type GroupBox}\">\r\n        <Setter Property=\"BorderBrush\" Value=\"#D5DFE5\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type GroupBox}\">\r\n                    <Grid SnapsToDevicePixels=\"true\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"6\" />\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"*\" />\r\n                            <ColumnDefinition Width=\"6\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\" />\r\n                            <RowDefinition Height=\"Auto\" />\r\n                            <RowDefinition Height=\"*\" />\r\n                            <RowDefinition Height=\"6\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Border Grid.ColumnSpan=\"4\" Grid.RowSpan=\"4\" Background=\"{DynamicResource LightBrush}\" CornerRadius=\"4,4,4,4\" BorderThickness=\"1,1,1,1\" />\r\n                        <Border Grid.ColumnSpan=\"4\" Grid.Row=\"1\" Grid.RowSpan=\"3\" BorderThickness=\"1,1,1,1\" CornerRadius=\"4\" BorderBrush=\"{DynamicResource NormalBorderBrush}\">\r\n                            <Border.OpacityMask>\r\n                                <MultiBinding Converter=\"{StaticResource BorderGapMaskConverter}\" ConverterParameter=\"7\">\r\n                                    <Binding Path=\"ActualWidth\" ElementName=\"Header\" />\r\n                                    <Binding Path=\"ActualWidth\" RelativeSource=\"{RelativeSource Self}\" />\r\n                                    <Binding Path=\"ActualHeight\" RelativeSource=\"{RelativeSource Self}\" />\r\n                                </MultiBinding>\r\n                            </Border.OpacityMask>\r\n                            <Border BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\">\r\n                                <Border.BorderBrush>\r\n                                    <SolidColorBrush Color=\"{DynamicResource MainColor}\" />\r\n                                </Border.BorderBrush>\r\n                                <Border BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\">\r\n                                    <Border.BorderBrush>\r\n                                        <SolidColorBrush Color=\"{DynamicResource MainColor}\" />\r\n                                    </Border.BorderBrush>\r\n                                </Border>\r\n                            </Border>\r\n                        </Border>\r\n                        <Border Grid.Column=\"0\" Grid.ColumnSpan=\"4\" Grid.Row=\"1\" Grid.RowSpan=\"3\" Background=\"{TemplateBinding Background}\" BorderBrush=\"Transparent\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"4\" />\r\n                        <Border Grid.ColumnSpan=\"4\" Grid.RowSpan=\"2\" Background=\"{DynamicResource NormalBrush}\" BorderThickness=\"1,1,1,0\" CornerRadius=\"2,2,0,0\" x:Name=\"Main\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" />\r\n                        <Rectangle Opacity=\"1\" Stroke=\"{x:Null}\" RadiusX=\"3\" RadiusY=\"3\" VerticalAlignment=\"Stretch\" Height=\"Auto\" x:Name=\"Shine\" Grid.ColumnSpan=\"4\" Grid.RowSpan=\"2\" Margin=\"1,1,1,1\">\r\n                            <Rectangle.Fill>\r\n                                <LinearGradientBrush EndPoint=\"0.5,0.971\" StartPoint=\"0.5,0.042\">\r\n                                    <GradientStop Color=\"#26FFFFFF\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"1\" />\r\n                                    <GradientStop Color=\"#26FFFFFF\" Offset=\"0.467\" />\r\n                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"0.475\" />\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n\r\n                        <Border x:Name=\"Header\" Grid.Column=\"1\" Grid.Row=\"0\" Grid.RowSpan=\"2\" Padding=\"3,1,3,0\">\r\n                            <ContentPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" ContentSource=\"Header\" RecognizesAccessKey=\"True\" Margin=\"0,4,0,4\" />\r\n                        </Border>\r\n\r\n                        <ContentPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Margin=\"{TemplateBinding Padding}\" Grid.Column=\"1\" Grid.ColumnSpan=\"2\" Grid.Row=\"2\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\">\r\n            <Setter.Value>\r\n                <SolidColorBrush Color=\"{DynamicResource WhiteColor}\" />\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <SolidColorBrush x:Key=\"ListBorder\" Color=\"#828790\" />\r\n    <Style x:Key=\"{x:Static GridView.GridViewScrollViewerStyleKey}\" TargetType=\"{x:Type ScrollViewer}\">\r\n        <Setter Property=\"Focusable\" Value=\"false\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ScrollViewer}\">\r\n                    <Grid SnapsToDevicePixels=\"true\" Background=\"{TemplateBinding Background}\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\" />\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"*\" />\r\n                            <RowDefinition Height=\"Auto\" />\r\n                        </Grid.RowDefinitions>\r\n                        <DockPanel Margin=\"{TemplateBinding Padding}\">\r\n                            <ScrollViewer Focusable=\"false\" DockPanel.Dock=\"Top\" HorizontalScrollBarVisibility=\"Hidden\" VerticalScrollBarVisibility=\"Hidden\">\r\n                                <GridViewHeaderRowPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Margin=\"2,0,2,0\" AllowsColumnReorder=\"{Binding Path=TemplatedParent.View.AllowsColumnReorder, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderContainerStyle=\"{Binding Path=TemplatedParent.View.ColumnHeaderContainerStyle, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderContextMenu=\"{Binding Path=TemplatedParent.View.ColumnHeaderContextMenu, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderTemplate=\"{Binding Path=TemplatedParent.View.ColumnHeaderTemplate, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderTemplateSelector=\"{Binding Path=TemplatedParent.View.ColumnHeaderTemplateSelector, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderToolTip=\"{Binding Path=TemplatedParent.View.ColumnHeaderToolTip, RelativeSource={RelativeSource TemplatedParent}}\" Columns=\"{Binding Path=TemplatedParent.View.Columns, RelativeSource={RelativeSource TemplatedParent}}\" />\r\n\r\n                            </ScrollViewer>\r\n                            <ScrollContentPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" x:Name=\"PART_ScrollContentPresenter\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" CanContentScroll=\"{TemplateBinding CanContentScroll}\" KeyboardNavigation.DirectionalNavigation=\"Local\" />\r\n                        </DockPanel>\r\n                        <ScrollBar Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Cursor=\"Arrow\" x:Name=\"PART_HorizontalScrollBar\" Grid.Row=\"1\" Orientation=\"Horizontal\" ViewportSize=\"{TemplateBinding ViewportWidth}\" Maximum=\"{TemplateBinding ScrollableWidth}\" Minimum=\"0.0\" Value=\"{Binding Path=HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" />\r\n                        <ScrollBar Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Cursor=\"Arrow\" x:Name=\"PART_VerticalScrollBar\" Grid.Column=\"1\" Orientation=\"Vertical\" ViewportSize=\"{TemplateBinding ViewportHeight}\" Maximum=\"{TemplateBinding ScrollableHeight}\" Minimum=\"0.0\" Value=\"{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" />\r\n                        <DockPanel Grid.Column=\"1\" Grid.Row=\"1\" Background=\"{Binding Path=Background, ElementName=PART_VerticalScrollBar}\" LastChildFill=\"false\">\r\n                            <Rectangle Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Width=\"1\" Fill=\"White\" DockPanel.Dock=\"Left\" />\r\n                            <Rectangle Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Height=\"1\" Fill=\"White\" DockPanel.Dock=\"Top\" />\r\n                        </DockPanel>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style TargetType=\"{x:Type ListView}\">\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource ShadeBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Foreground\" Value=\"#FF042271\" />\r\n        <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\" />\r\n        <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\" />\r\n        <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"true\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListView}\">\r\n                    <Border x:Name=\"Bd\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\" BorderBrush=\"{DynamicResource DefaultedBorderBrush}\" Background=\"{DynamicResource LightBrush}\">\r\n\r\n                        <ScrollViewer Padding=\"{TemplateBinding Padding}\" Style=\"{DynamicResource {x:Static GridView.GridViewScrollViewerStyleKey}}\">\r\n                            <ItemsPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" />\r\n                        </ScrollViewer>\r\n                    </Border>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                            <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Background\" TargetName=\"Bd\" Value=\"{DynamicResource {x:Static SystemColors.ControlBrushKey}}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"ListViewItemFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Rectangle Stroke=\"#8E6EA6F5\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" />\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type ListViewItem}\">\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{StaticResource ListViewItemFocusVisual}\" />\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Margin\" Value=\"0,0,0,1\" />\r\n        <Setter Property=\"Padding\" Value=\"5,2,5,2\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListViewItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedHoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedHoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedHoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedHoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Border SnapsToDevicePixels=\"true\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\" x:Name=\"border\">\r\n\r\n                        <Grid Margin=\"2,0,2,0\">\r\n                            <Rectangle x:Name=\"Background\"\r\n\t\t\t\t\t\t\tIsHitTestVisible=\"False\"\r\n\t\t\t\t\t\t\tFill=\"{StaticResource SelectedBackgroundBrush}\"\r\n\t\t\t\t\t\t\tRadiusX=\"0\"/>\r\n                            <Rectangle x:Name=\"SelectedRectangle\"\r\n\t\t\t\t\t\t\tIsHitTestVisible=\"False\"\r\n\t\t\t\t\t\t\tOpacity=\"0\"\r\n\t\t\t\t\t\t\tFill=\"{StaticResource NormalBrush}\"\r\n\t\t\t\t\t\t\tRadiusX=\"0\"/>\r\n                            <GridViewRowPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" VerticalAlignment=\"Stretch\" Margin=\"0,2,0,2\" />\r\n                            <Rectangle x:Name=\"HoverRectangle\"\r\n                            \tIsHitTestVisible=\"False\"\r\n                            \tFill=\"{StaticResource HoverBrush}\"\r\n                            \tRadiusX=\"0\"\r\n                            \tOpacity=\"0\"/>\r\n                            <Rectangle x:Name=\"SelectedHoverRectangle\"\r\n                            \tIsHitTestVisible=\"False\"\r\n                            \tFill=\"{StaticResource HoverBrush}\"\r\n                            \tRadiusX=\"0\"\r\n                            \tOpacity=\"0\"/>\r\n                        </Grid>\r\n\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsSelected\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOff}\" x:Name=\"SelectedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\" x:Name=\"SelectedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" x:Name=\"HoverOn_BeginStoryboard\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" />\r\n                                <Condition Property=\"Selector.IsSelected\" Value=\"False\" />\r\n                            </MultiTrigger.Conditions>\r\n\r\n                        </MultiTrigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedHoverOff}\" x:Name=\"SelectedHoverOff_BeginStoryboard\"/>\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedHoverOn}\" x:Name=\"SelectedHoverOn_BeginStoryboard\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"Selector.IsSelected\" Value=\"True\" />\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" />\r\n                            </MultiTrigger.Conditions>\r\n\r\n                        </MultiTrigger>\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsSelected\" Value=\"true\" />\r\n                                <Condition Property=\"Selector.IsSelectionActive\" Value=\"false\" />\r\n                            </MultiTrigger.Conditions>\r\n\r\n\r\n                        </MultiTrigger>\r\n\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n    </Style>\r\n\r\n\r\n    <Style x:Key=\"GridViewColumnHeaderGripper\" TargetType=\"{x:Type Thumb}\">\r\n        <Setter Property=\"Canvas.Right\" Value=\"-8.5\" />\r\n        <Setter Property=\"Width\" Value=\"18\" />\r\n        <Setter Property=\"Height\" Value=\"{Binding Path=ActualHeight, RelativeSource={RelativeSource TemplatedParent}}\" />\r\n        <Setter Property=\"Padding\" Value=\"0,3,0,4\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource LightBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <Border Padding=\"{TemplateBinding Padding}\" Background=\"#00FFFFFF\">\r\n                        <Rectangle HorizontalAlignment=\"Center\" Width=\"0.5\">\r\n                            <Rectangle.Fill>\r\n                                <SolidColorBrush Color=\"{DynamicResource WhiteColor}\" />\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"{x:Type GridViewColumnHeader}\" TargetType=\"{x:Type GridViewColumnHeader}\">\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource LightBrush}\" />\r\n        <Setter Property=\"Padding\" Value=\"2,0,2,0\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type GridViewColumnHeader}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Main\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.65\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Main\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid Margin=\"0,1,0,1\">\r\n                        <Grid>\r\n\r\n                            <Border x:Name=\"Main\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" CornerRadius=\"0,0,0,0\" />\r\n                            <Border x:Name=\"HoverBorder\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\" Background=\"{DynamicResource HoverBrush}\" BorderBrush=\"{x:Null}\" CornerRadius=\"0,0,0,0\" Opacity=\"0\" />\r\n\r\n                            <Border BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\">\r\n                                <Border.BorderBrush>\r\n                                    <SolidColorBrush Color=\"{DynamicResource WhiteColor}\"/>\r\n                                </Border.BorderBrush>\r\n                                <ContentPresenter VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" RecognizesAccessKey=\"True\" Margin=\"2,2,2,2\" />\r\n                            </Border>\r\n                        </Grid>\r\n                        <Canvas>\r\n                            <Thumb x:Name=\"PART_HeaderGripper\" Style=\"{StaticResource GridViewColumnHeaderGripper}\" HorizontalAlignment=\"Stretch\" />\r\n                        </Canvas>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"Height\" Value=\"Auto\">\r\n                            <Setter Property=\"MinHeight\" Value=\"20\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"Role\" Value=\"Padding\">\r\n                            <Setter TargetName=\"PART_HeaderGripper\" Property=\"Visibility\" Value=\"Collapsed\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"Role\" Value=\"Floating\">\r\n                            <Setter TargetName=\"PART_HeaderGripper\" Property=\"Visibility\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Background\" Value=\"Yellow\" />\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource MouseOverBrush}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"ButtonFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Rectangle SnapsToDevicePixels=\"true\" Margin=\"2\" Stroke=\"Black\" StrokeDashArray=\"1 2\" StrokeThickness=\"1\" />\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <LinearGradientBrush x:Key=\"ButtonNormalBackground\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#F3F3F3\" Offset=\"0\" />\r\n        <GradientStop Color=\"#EBEBEB\" Offset=\"0.5\" />\r\n        <GradientStop Color=\"#DDDDDD\" Offset=\"0.5\" />\r\n        <GradientStop Color=\"#CDCDCD\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"ButtonNormalBorder\" Color=\"#FF707070\" />\r\n\r\n    <Style TargetType=\"{x:Type ToggleButton}\">\r\n        <Style.Triggers>\r\n            <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n            </Trigger>\r\n        </Style.Triggers>\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{StaticResource ButtonFocusVisual}\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource SelectedBackgroundBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"2,2,2,2\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"Padding\" Value=\"1\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundAnimation\" Storyboard.TargetProperty=\"Opacity\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundAnimation\" Storyboard.TargetProperty=\"Opacity\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n\r\n                        <Border x:Name=\"Background\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"4,4,4,4\" Opacity=\"0.9\"/>\r\n                        <Border x:Name=\"CheckedBorder\" Opacity=\"0\" Background=\"{StaticResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"4\"/>\r\n                        <Border x:Name=\"BackgroundAnimation\" Opacity=\"0\" Background=\"{StaticResource HoverBrush}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"4\"/>\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" RecognizesAccessKey=\"True\" />\n                    </Grid>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsPressed\" Value=\"True\">\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" x:Name=\"HoverOn_BeginStoryboard\"/>\r\n\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\" />\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOff}\" x:Name=\"CheckedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOn}\" x:Name=\"CheckedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Background\" TargetName=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                            <Setter Property=\"BorderBrush\" TargetName=\"Background\" Value=\"{DynamicResource DisabledBorderBrush}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n</ResourceDictionary>\r\n"
  },
  {
    "path": "WpfToolkit/WPF.Themes/ShinyDarkGreen/Theme.xaml",
    "content": "﻿<!--\r\n// (c) Copyright Microsoft Corporation.\r\n// This source is subject to Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n-->\r\n\r\n<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" \r\n                    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n                    mc:Ignorable=\"d\" \r\n                    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\">\r\n\r\n    <!--SHINY BLUE SETTINGS FOR CHARTS-->\r\n    <LinearGradientBrush x:Key=\"ShinyChartOrange\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFFDDBAE\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FFCE955A\" Offset=\"0.185\" />\r\n        <GradientStop Color=\"#FFAB7547\" Offset=\"0.475\" />\r\n        <GradientStop Color=\"#FF704D28\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n\r\n    <LinearGradientBrush x:Key=\"ShinyChartYellow\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFFFFF72\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FFC0C256\" Offset=\"0.17\" />\r\n        <GradientStop Color=\"#FFCAC64C\" Offset=\"0.49\" />\r\n        <GradientStop Color=\"#FF8F8832\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ShinyChartCyan\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFBBF4FD\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FF62B8BC\" Offset=\"0.185\" />\r\n        <GradientStop Color=\"#FF5A9399\" Offset=\"0.475\" />\r\n        <GradientStop Color=\"#FF355E60\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ShinyChartGreen\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFBAF9DA\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FF62BC8A\" Offset=\"0.185\" />\r\n        <GradientStop Color=\"#FF5A996D\" Offset=\"0.475\" />\r\n        <GradientStop Color=\"#FF35603A\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n\r\n    <LinearGradientBrush x:Key=\"ChartBorder\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFBBBBBB\" />\r\n        <GradientStop Color=\"#FF737373\" Offset=\"0.160\" />\r\n        <GradientStop Color=\"#FF646464\" Offset=\"0.162\" />\r\n        <GradientStop Color=\"#FF000000\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ShinyBackground\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFBBBBBB\" />\r\n        <GradientStop Color=\"#FF000000\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"PlotAreaBrush\" EndPoint=\"0.5,0.987\" StartPoint=\"0.5,0.03\">\r\n        <GradientStop Color=\"#FFFFFFFF\"/>\r\n        <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\"/>\r\n        <GradientStop Color=\"#FEDBDBDB\" Offset=\"0.196\"/>\r\n        <GradientStop Color=\"#FEE7E7E7\" Offset=\"0.121\"/>\r\n        <GradientStop Color=\"#FEF4F4F4\" Offset=\"0.058\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <Color x:Key=\"ShinyTopGradientOrange\">#FFFDDBAE</Color>\r\n    <Color x:Key=\"ShinyBottomGradientOrange\">#FF704D28</Color>\r\n    <RadialGradientBrush x:Key=\"ShinyPieDataPointBrushOrange\">\r\n        <RadialGradientBrush.RelativeTransform>\r\n            <TransformGroup>\r\n                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2.09\" ScaleY=\"1.819\"/>\r\n                <SkewTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n                <RotateTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n                <TranslateTransform X=\"-0.425\" Y=\"-0.486\"/>\r\n            </TransformGroup>\r\n        </RadialGradientBrush.RelativeTransform>\r\n        <GradientStop Color=\"{StaticResource ShinyTopGradientOrange}\"/>\r\n        <GradientStop Color=\"{StaticResource ShinyBottomGradientOrange}\" Offset=\"1\"/>\r\n    </RadialGradientBrush>\r\n\r\n\r\n    <Color x:Key=\"ShinyTopGradientYellow\">#FFFFFF72</Color>\r\n    <Color x:Key=\"ShinyBottomGradientYellow\">#FF8F8832</Color>\r\n    <RadialGradientBrush x:Key=\"ShinyPieDataPointBrushYellow\">\r\n        <RadialGradientBrush.RelativeTransform>\r\n            <TransformGroup>\r\n                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2.09\" ScaleY=\"1.819\"/>\r\n                <SkewTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n                <RotateTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n                <TranslateTransform X=\"-0.425\" Y=\"-0.486\"/>\r\n            </TransformGroup>\r\n        </RadialGradientBrush.RelativeTransform>\r\n        <GradientStop Color=\"{StaticResource ShinyTopGradientYellow}\"/>\r\n        <GradientStop Color=\"{StaticResource ShinyBottomGradientYellow}\" Offset=\"1\"/>\r\n    </RadialGradientBrush>\r\n\r\n    <Color x:Key=\"ShinyTopGradientCyan\">#FFBBF4FD</Color>\r\n    <Color x:Key=\"ShinyBottomGradientCyan\">#FF355E60</Color>\r\n    <RadialGradientBrush x:Key=\"ShinyPieDataPointBrushCyan\">\r\n        <RadialGradientBrush.RelativeTransform>\r\n            <TransformGroup>\r\n                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2.09\" ScaleY=\"1.819\"/>\r\n                <SkewTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n                <RotateTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n                <TranslateTransform X=\"-0.425\" Y=\"-0.486\"/>\r\n            </TransformGroup>\r\n        </RadialGradientBrush.RelativeTransform>\r\n        <GradientStop Color=\"{StaticResource ShinyTopGradientCyan}\"/>\r\n        <GradientStop Color=\"{StaticResource ShinyBottomGradientCyan}\" Offset=\"1\"/>\r\n    </RadialGradientBrush>\r\n\r\n    <Color x:Key=\"ShinyTopGradientGreen\">#FFBAF9DA</Color>\r\n    <Color x:Key=\"ShinyBottomGradientGreen\">#FF35603A</Color>\r\n    <RadialGradientBrush x:Key=\"ShinyPieDataPointBrushGreen\">\r\n        <RadialGradientBrush.RelativeTransform>\r\n            <TransformGroup>\r\n                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2.09\" ScaleY=\"1.819\"/>\r\n                <SkewTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n                <RotateTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n                <TranslateTransform X=\"-0.425\" Y=\"-0.486\"/>\r\n            </TransformGroup>\r\n        </RadialGradientBrush.RelativeTransform>\r\n        <GradientStop Color=\"{StaticResource ShinyTopGradientGreen}\"/>\r\n        <GradientStop Color=\"{StaticResource ShinyBottomGradientGreen}\" Offset=\"1\"/>\r\n    </RadialGradientBrush>\r\n\r\n\r\n    <!--SHINY DARK GREEN-->\r\n    <SolidColorBrush x:Key=\"TextBrush\" Color=\"Black\"></SolidColorBrush>\r\n\r\n    <Color x:Key=\"NormalBrushGradient1\">#FFCDE7C5</Color>\r\n    <Color x:Key=\"NormalBrushGradient2\">#FF7FB974</Color>\r\n    <Color x:Key=\"NormalBrushGradient3\">#FF458F37</Color>\r\n    <Color x:Key=\"NormalBrushGradient4\">#FF2D5224</Color>\r\n\r\n\r\n    <Color x:Key=\"NormalBorderBrushGradient1\">#FFBBBBBB</Color>\r\n    <Color x:Key=\"NormalBorderBrushGradient2\">#FF737373</Color>\r\n    <Color x:Key=\"NormalBorderBrushGradient3\">#FF646464</Color>\r\n    <Color x:Key=\"NormalBorderBrushGradient4\">#FF000000</Color>\r\n\r\n    <Color x:Key=\"SelectedBackgroundGradient1\">#FFBBBBBB</Color>\r\n    <Color x:Key=\"SelectedBackgroundGradient2\">#FF737373</Color>\r\n    <Color x:Key=\"SelectedBackgroundGradient3\">#FF646464</Color>\r\n    <Color x:Key=\"SelectedBackgroundGradient4\">#FFA1A1A1</Color>\r\n\r\n    <Color x:Key=\"SliderBorderGradient1\">#FF3F3F3F</Color>\r\n    <Color x:Key=\"SliderBorderGradient2\">#FFADADAD</Color>\r\n\r\n    <Color x:Key=\"ShadeBrushGradient1\">#FF62676A</Color>\r\n    <Color x:Key=\"ShadeBrushGradient2\">#FFD1D4D6</Color>\r\n    <Color x:Key=\"ShadeBrushGradient3\">#FFFFFFFF</Color>\r\n\r\n    <Color x:Key=\"WindowBackgroundBrushGradient1\">#FFD1D1D1</Color>\r\n    <Color x:Key=\"WindowBackgroundBrushGradient2\">#FF8496AA</Color>\r\n\r\n\r\n    <LinearGradientBrush x:Key=\"NormalBrush\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource NormalBrushGradient1}\"\r\n                  Offset=\"0\" />\r\n        <GradientStop Color=\"{StaticResource NormalBrushGradient2}\"\r\n                  Offset=\"0.41800001263618469\" />\r\n        <GradientStop Color=\"{StaticResource NormalBrushGradient3}\"\r\n                  Offset=\"0.418\" />\r\n        <GradientStop Color=\"{StaticResource NormalBrushGradient4}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"NormalBorderBrush\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource NormalBorderBrushGradient1}\" />\r\n        <GradientStop Color=\"{StaticResource NormalBorderBrushGradient2}\"\r\n                  Offset=\"0.38\" />\r\n        <GradientStop Color=\"{StaticResource NormalBorderBrushGradient3}\"\r\n                  Offset=\"0.384\" />\r\n        <GradientStop Color=\"{StaticResource NormalBorderBrushGradient4}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <RadialGradientBrush x:Key=\"HoverBrush\">\r\n        <RadialGradientBrush.RelativeTransform>\r\n            <TransformGroup>\r\n                <ScaleTransform CenterX=\"0.5\"\r\n                        CenterY=\"0.5\"\r\n                        ScaleX=\"1.804\"\r\n                        ScaleY=\"0.743\" />\r\n                <SkewTransform CenterX=\"0.5\"\r\n                       CenterY=\"0.5\" />\r\n                <RotateTransform CenterX=\"0.5\"\r\n                         CenterY=\"0.5\" />\r\n                <TranslateTransform Y=\"0.47999998927116394\" />\r\n            </TransformGroup>\r\n        </RadialGradientBrush.RelativeTransform>\r\n        <GradientStop Color=\"#FF98DAFF\"\r\n                  Offset=\"0.209\" />\r\n        <GradientStop Color=\"#0098DAFF\"\r\n                  Offset=\"1\" />\r\n        <GradientStop Color=\"#FFFFFFFF\"\r\n                  Offset=\"0\" />\r\n    </RadialGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"CheckIconBrush\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FF006CD1\" />\r\n        <GradientStop Color=\"#FFA5D6F9\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ShadeBrush\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient2}\"\r\n                  Offset=\"0\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"0.1\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ShadeBrushTop\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient2}\"\r\n                  Offset=\"0\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"0.1\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ShadeBrushBottom\"\r\n                       EndPoint=\"0.5,0\"\r\n                       StartPoint=\"0.5,1\">\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient2}\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"0.1\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ShadeBrushLeft\"\r\n                       EndPoint=\"1,0.5\"\r\n                       StartPoint=\"0,0.5\">\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient2}\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"0.1\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ShadeBrushRight\"\r\n                       EndPoint=\"0,0.5\"\r\n                       StartPoint=\"1,0.5\">\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient2}\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"0.1\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"DisabledBackgroundBrush\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFFFFFFF\" />\r\n        <GradientStop Color=\"#FF62676A\"\r\n                  Offset=\"1\" />\r\n        <GradientStop Color=\"#FFD1D4D6\"\r\n                  Offset=\"0.41800001263618469\" />\r\n        <GradientStop Color=\"#FFA9AFB5\"\r\n                  Offset=\"0.425\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"SelectedBackgroundBrush\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient1}\" />\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient2}\"\r\n                  Offset=\"0.38\" />\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient3}\"\r\n                  Offset=\"0.384\" />\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient4}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"SelectedBackgroundBrushVertical\"\r\n                       EndPoint=\"2.05,0.5\"\r\n                       StartPoint=\"-0.55,0.5\">\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient1}\" />\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient2}\"\r\n                  Offset=\"0.37999999523162842\" />\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient3}\"\r\n                  Offset=\"0.38400000333786011\" />\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient4}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"HorizontalSliderBorderBrush\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource SliderBorderGradient1}\" />\r\n        <GradientStop Color=\"{StaticResource SliderBorderGradient2}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"VerticalSliderBorderBrush\"\r\n                       EndPoint=\"1.35,0.5\"\r\n                       StartPoint=\"0.6,0.5\">\r\n        <GradientStop Color=\"{StaticResource SliderBorderGradient1}\" />\r\n        <GradientStop Color=\"{StaticResource SliderBorderGradient2}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"WindowBackgroundBrush\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource WindowBackgroundBrushGradient1}\" />\r\n        <GradientStop Color=\"{StaticResource WindowBackgroundBrushGradient2}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n\r\n    <Style x:Key=\"NuclearButtonFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Border>\r\n                        <Rectangle Margin=\"2\" Stroke=\"#60000000\" StrokeThickness=\"1\" StrokeDashArray=\"1 2\"/>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type Button}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource NuclearButtonFocusVisual}\"/>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Button}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Hover\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Hover\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\n                            </DoubleAnimationUsingKeyFrames>\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"0.6\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                <DiscreteObjectKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"{x:Static Visibility.Visible}\"/>\r\n                            </ObjectAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n\r\n                    <Grid x:Name=\"Grid\">\r\n                        <Border x:Name=\"Background\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"2,2,2,2\">\r\n                            <Border x:Name=\"Hover\" Background=\"{StaticResource HoverBrush}\" CornerRadius=\"1,1,1,1\" Height=\"Auto\" Width=\"Auto\" Opacity=\"0\"/>\r\n                        </Border>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" RecognizesAccessKey=\"True\"/>\r\n                        <Border x:Name=\"FocusVisualElement\"\r\n                    IsHitTestVisible=\"false\"\r\n                    BorderBrush=\"{StaticResource HoverBrush}\"\r\n                    BorderThickness=\"2,2,2,2\"\r\n                    CornerRadius=\"2,2,2,2\" Opacity=\"0\"/>\r\n                    </Grid>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsDefault\" Value=\"True\">\r\n                            <Setter Property=\"BorderBrush\" TargetName=\"Background\" Value=\"{DynamicResource DefaultedBorderBrush}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"FocusedOff_BeginStoryboard\" Storyboard=\"{StaticResource FocusedOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"true\"/>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Background\"/>\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DisabledBorderBrush}\" TargetName=\"Background\"/>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n    </Style>\r\n\r\n    <Style x:Key=\"RadioButtonFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Border>\r\n                        <Rectangle Margin=\"15,0,0,0\" Stroke=\"#60000000\" StrokeThickness=\"1\" StrokeDashArray=\"1 2\"/>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"CheckBoxFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Border>\r\n                        <Rectangle Margin=\"15,0,0,0\" Stroke=\"#60000000\" StrokeThickness=\"1\" StrokeDashArray=\"1 2\"/>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type CheckBox}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource CheckBoxFocusVisual}\"/>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type CheckBox}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"CheckedFalse\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedTrue\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"ThreeStateOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"IndeterminateIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"ThreeStateOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"IndeterminateIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"0.6\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <BulletDecorator Background=\"Transparent\">\r\n                        <BulletDecorator.Bullet>\r\n                            <Grid Width=\"16\" Height=\"16\">\r\n                                <Rectangle Height=\"14\" Margin=\"1\" x:Name=\"Background\" Width=\"14\" Fill=\"{TemplateBinding Background}\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                                <Rectangle Height=\"12\" x:Name=\"BackgroundOverlay\" Width=\"12\" Opacity=\"0\" Fill=\"{StaticResource HoverBrush}\" Stroke=\"{x:Null}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n\r\n                                <Path x:Name=\"CheckIcon\" Opacity=\"0\" Stretch=\"Fill\" Data=\"M102.03442,598.79645 L105.22962,597.78918 L106.95686,599.19977 C106.95686,599.19977 113.77958,590.53656 113.77958,590.53656 C113.77958,590.53656 107.40649,603.79431 107.40649,603.79431 z\" Fill=\"#FFFFFFFF\"\r\n                    Height=\"10\"\r\n                    Width=\"11\"\r\n                    Stroke=\"{StaticResource CheckIconBrush}\"\r\n                    StrokeThickness=\"0\"/>\r\n\r\n                                <Rectangle Height=\"9\" x:Name=\"IndeterminateIcon\" Width=\"9\" Opacity=\"0\" Fill=\"#FFFFFFFF\" Stroke=\"{StaticResource CheckIconBrush}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                                <Rectangle Height=\"14\" x:Name=\"DisabledVisualElement\" Width=\"14\" Opacity=\"0\" Fill=\"{StaticResource DisabledBackgroundBrush}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                                <Rectangle Height=\"16\" x:Name=\"ContentFocusVisualElement\" Width=\"16\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HoverBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                            </Grid>\r\n                        </BulletDecorator.Bullet>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" RecognizesAccessKey=\"True\"/>\r\n                    </BulletDecorator>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsChecked\" Value=\"True\" />\r\n                                <Condition Property=\"IsThreeState\" Value=\"True\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"ThreeStateOn_BeginStoryboard\" Storyboard=\"{StaticResource CheckedFalse}\" />\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"ThreeStateOff_BeginStoryboard\" Storyboard=\"{StaticResource CheckedTrue}\" />\r\n                            </MultiTrigger.ExitActions>\r\n                        </MultiTrigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsChecked\" Value=\"{x:Null}\" />\r\n                                <Condition Property=\"IsThreeState\" Value=\"True\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"ThreeStateOn1_BeginStoryboard\" Storyboard=\"{StaticResource ThreeStateOn}\" />\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"ThreeStateOff1_BeginStoryboard\" Storyboard=\"{StaticResource ThreeStateOff}\" />\r\n                            </MultiTrigger.ExitActions>\r\n                            <Setter Property=\"Visibility\" TargetName=\"CheckIcon\" Value=\"Hidden\"/>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"false\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedTrue}\" x:Name=\"CheckedTrue_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedFalse}\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Fill\" TargetName=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                            <Setter Property=\"Stroke\" TargetName=\"Background\" Value=\"{DynamicResource DisabledBorderBrush}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n        <Style.Triggers>\r\n            <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n            </Trigger>\r\n        </Style.Triggers>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type RadioButton}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource RadioButtonFocusVisual}\"/>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type RadioButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"CheckedFalse\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedTrue\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"0.6\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <BulletDecorator Background=\"Transparent\">\r\n                        <BulletDecorator.Bullet>\r\n                            <Grid Width=\"16\" Height=\"16\">\r\n                                <Ellipse Height=\"14\"\r\n                       Margin=\"1\"\r\n                       x:Name=\"Background\"\r\n                       Width=\"14\"\r\n                       Fill=\"{StaticResource NormalBrush}\"\r\n                       Stroke=\"{TemplateBinding BorderBrush}\"\r\n                       StrokeThickness=\"2\"/>\r\n                                <Ellipse Height=\"12\"\r\n                       x:Name=\"BackgroundOverlay\"\r\n                       Width=\"12\"\r\n                       Opacity=\"0\"\r\n                       Fill=\"{StaticResource HoverBrush}\"\r\n                       Stroke=\"#00000000\"\r\n                       Margin=\"2,2,2,2\"\r\n                       StrokeThickness=\"0\"/>\r\n                                <Border HorizontalAlignment=\"Center\"\r\n                      VerticalAlignment=\"Center\"\r\n                      Width=\"6\"\r\n                      Height=\"6\"\r\n                      CornerRadius=\"1,1,1,1\"\r\n                      BorderThickness=\"1,1,1,1\"\r\n                      Background=\"#FFFFFFFF\"\r\n                      x:Name=\"CheckIcon\"\r\n                      BorderBrush=\"{StaticResource CheckIconBrush}\"\r\n                      Opacity=\"0\"/>\r\n                            </Grid>\r\n                        </BulletDecorator.Bullet>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" RecognizesAccessKey=\"True\"/>\r\n                    </BulletDecorator>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsChecked\" Value=\"false\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedTrue}\" x:Name=\"CheckedTrue_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedFalse}\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Fill\" TargetName=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                            <Setter Property=\"Stroke\" TargetName=\"Background\" Value=\"{DynamicResource DisabledBorderBrush}\"/>\r\n\r\n                        </Trigger>\r\n\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Style.Triggers>\r\n            <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n            </Trigger>\r\n        </Style.Triggers>\r\n    </Style>\r\n\r\n    <Style x:Key=\"NuclearRepeatButton\" d:IsControlPart=\"True\" TargetType=\"{x:Type RepeatButton}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundAnimation\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundAnimation\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\n                            </DoubleAnimationUsingKeyFrames>\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"0.6\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Border x:Name=\"Border\" Background=\"{TemplateBinding Background}\" CornerRadius=\"2,2,2,2\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"2\"/>\r\n                        <Rectangle x:Name=\"BackgroundAnimation\"\r\n                             Opacity=\"0\"\r\n                             Fill=\"{StaticResource HoverBrush}\"\r\n                             Stroke=\"{x:Null}\"\r\n                             StrokeThickness=\"0\"\r\n                             RadiusX=\"1\"\r\n                             RadiusY=\"1\"\r\n                             Margin=\"2,2,2,2\" />\r\n                        <ContentPresenter HorizontalAlignment=\"Center\" x:Name=\"ContentPresenter\" VerticalAlignment=\"Center\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" ContentTemplateSelector=\"{TemplateBinding ContentTemplateSelector}\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DefaultedBorderBrush}\" TargetName=\"Border\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DisabledBorderBrush}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"NuclearThumbStyle\" d:IsControlPart=\"True\" TargetType=\"{x:Type Thumb}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundMouseOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundMouseOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\n                            </DoubleAnimationUsingKeyFrames>\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"0.6\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid Margin=\"0,0,0,0\" x:Name=\"Grid\">\r\n                        <Rectangle x:Name=\"Background\"\r\n\t\t\t\t\t\t\tFill=\"{StaticResource NormalBrush}\"\r\n\t\t\t\t\t\t\tStrokeThickness=\"2\"\r\n\t\t\t\t\t\t\tRadiusX=\"2\"\r\n\t\t\t\t\t\t\tRadiusY=\"2\"\r\n\t\t\t\t\t\t\tStroke=\"{StaticResource NormalBorderBrush}\" />\r\n                        <Rectangle x:Name=\"BackgroundMouseOver\"\r\n\t\t\t\t\t\t\tFill=\"{StaticResource HoverBrush}\"\r\n\t\t\t\t\t\t\tStroke=\"{x:Null}\"\r\n\t\t\t\t\t\t\tStrokeThickness=\"1\"\r\n\t\t\t\t\t\t\tRadiusX=\"1\"\r\n\t\t\t\t\t\t\tRadiusY=\"1\"\r\n\t\t\t\t\t\t\tMargin=\"2,2,2,2\" Opacity=\"0\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\"/>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsDragging\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Fill\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Background\"/>\r\n                            <Setter Property=\"Stroke\" Value=\"{DynamicResource DisabledBorderBrush}\" TargetName=\"Background\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"NuclearScrollRepeatButtonStyle\" d:IsControlPart=\"True\" TargetType=\"{x:Type RepeatButton}\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n        <Setter Property=\"IsTabStop\" Value=\"false\"/>\r\n        <Setter Property=\"Focusable\" Value=\"false\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n                    <Grid>\r\n                        <Rectangle Fill=\"{TemplateBinding Background}\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n\r\n    <Style TargetType=\"{x:Type ScrollBar}\">\r\n        <Setter Property=\"Stylus.IsFlicksEnabled\" Value=\"false\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ScrollBar}\">\r\n                    <Grid x:Name=\"GridRoot\" Width=\"{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition MaxHeight=\"18\"/>\r\n                            <RowDefinition Height=\"0.00001*\"/>\r\n                            <RowDefinition MaxHeight=\"18\"/>\r\n                        </Grid.RowDefinitions>\r\n\r\n                        <Border Grid.RowSpan=\"3\" Background=\"#FFDDDEDF\" CornerRadius=\"3,3,3,3\"/>\r\n\r\n                        <RepeatButton x:Name=\"DecreaseRepeat\" Style=\"{DynamicResource NuclearRepeatButton}\" Command=\"ScrollBar.LineUpCommand\">\r\n                            <Grid>\r\n                                <Path x:Name=\"DecreaseArrow\" StrokeThickness=\"1\" Data=\"M 0 4 L 8 4 L 4 0 Z\" Fill=\"{DynamicResource GlyphBrush}\"/>\r\n                            </Grid>\r\n                        </RepeatButton>\r\n\r\n                        <Track Grid.Row=\"1\" x:Name=\"PART_Track\" Orientation=\"Vertical\" IsDirectionReversed=\"true\">\r\n                            <Track.Thumb>\r\n                                <Thumb Style=\"{DynamicResource NuclearThumbStyle}\"/>\r\n                            </Track.Thumb>\r\n                            <Track.IncreaseRepeatButton>\r\n                                <RepeatButton x:Name=\"PageUp\" Style=\"{DynamicResource NuclearScrollRepeatButtonStyle}\" Command=\"ScrollBar.PageDownCommand\"/>\r\n                            </Track.IncreaseRepeatButton>\r\n                            <Track.DecreaseRepeatButton>\r\n                                <RepeatButton x:Name=\"PageDown\" Style=\"{DynamicResource NuclearScrollRepeatButtonStyle}\" Command=\"ScrollBar.PageUpCommand\"/>\r\n                            </Track.DecreaseRepeatButton>\r\n                        </Track>\r\n\r\n                        <RepeatButton Grid.Row=\"2\" x:Name=\"IncreaseRepeat\" Style=\"{DynamicResource NuclearRepeatButton}\" Command=\"ScrollBar.LineDownCommand\">\r\n                            <Grid>\r\n                                <Path x:Name=\"IncreaseArrow\" StrokeThickness=\"1\" Data=\"M 0 0 L 4 4 L 8 0 Z\" Fill=\"{DynamicResource GlyphBrush}\"/>\r\n                            </Grid>\r\n                        </RepeatButton>\r\n                    </Grid>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"Orientation\" Value=\"Horizontal\">\r\n\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"GridRoot\">\r\n                                <Setter.Value>\r\n                                    <RotateTransform Angle=\"-90\"/>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n\r\n                            <Setter TargetName=\"PART_Track\" Property=\"Orientation\" Value=\"Vertical\"/>\r\n\r\n                            <Setter Property=\"Command\" Value=\"ScrollBar.LineLeftCommand\" TargetName=\"DecreaseRepeat\"/>\r\n                            <Setter Property=\"Command\" Value=\"ScrollBar.LineRightCommand\" TargetName=\"IncreaseRepeat\"/>\r\n                            <Setter Property=\"Command\" Value=\"ScrollBar.PageLeftCommand\" TargetName=\"PageDown\"/>\r\n                            <Setter Property=\"Command\" Value=\"ScrollBar.PageRightCommand\" TargetName=\"PageUp\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Background\" Value=\"#FFDDDEDF\"/>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type ScrollViewer}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ScrollViewer}\">\r\n                    <Grid Background=\"{TemplateBinding Background}\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"*\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <ScrollContentPresenter Grid.Column=\"0\" Grid.Row=\"0\" Margin=\"{TemplateBinding Padding}\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" CanContentScroll=\"{TemplateBinding CanContentScroll}\"/>\r\n\r\n                        <ScrollBar Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Grid.Column=\"0\" Grid.Row=\"1\" x:Name=\"PART_HorizontalScrollBar\"   Orientation=\"Horizontal\" Value=\"{Binding Path=HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" ViewportSize=\"{TemplateBinding ViewportWidth}\" Minimum=\"0\" Maximum=\"{TemplateBinding ScrollableWidth}\" AutomationProperties.AutomationId=\"HorizontalScrollBar\"/>\r\n                        <ScrollBar Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Grid.Column=\"1\" Grid.Row=\"0\" x:Name=\"PART_VerticalScrollBar\"   Orientation=\"Vertical\" Value=\"{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" ViewportSize=\"{TemplateBinding ViewportHeight}\" Minimum=\"0\" Maximum=\"{TemplateBinding ScrollableHeight}\" AutomationProperties.AutomationId=\"VerticalScrollBar\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type ListBox}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource ShadeBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\"/>\r\n        <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\"/>\r\n        <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"True\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListBox}\">\r\n                    <Grid>\r\n                        <Border x:Name=\"Border\" CornerRadius=\"2\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\"/>\r\n                        <ScrollViewer   Focusable=\"false\" Margin=\"0,0,0,1\" >\r\n\r\n                            <StackPanel Margin=\"2\" IsItemsHost=\"true\"/>\r\n\r\n                        </ScrollViewer>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DisabledBorderBrush}\" TargetName=\"Border\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                            <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n\r\n    <Style d:IsControlPart=\"True\" TargetType=\"{x:Type ListBoxItem}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n        <Setter Property=\"OverridesDefaultStyle\" Value=\"true\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListBoxItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\n                            </DoubleAnimationUsingKeyFrames>\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOff\">\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\n                            </DoubleAnimationUsingKeyFrames>\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid Background=\"{TemplateBinding Background}\"\r\n\t\t\t\t\t\tMargin=\"1,1,1,1\" SnapsToDevicePixels=\"true\" x:Name=\"grid\">\r\n                        <Rectangle x:Name=\"Background\"\r\n\t\t\t\t\t\t\tIsHitTestVisible=\"False\"\r\n\t\t\t\t\t\t\tFill=\"{StaticResource SelectedBackgroundBrush}\"\r\n\t\t\t\t\t\t\tRadiusX=\"0\"/>\r\n                        <Rectangle x:Name=\"SelectedRectangle\"\r\n\t\t\t\t\t\t\tIsHitTestVisible=\"False\"\r\n\t\t\t\t\t\t\tOpacity=\"0\"\r\n\t\t\t\t\t\t\tFill=\"{StaticResource NormalBrush}\"\r\n\t\t\t\t\t\t\tRadiusX=\"0\"/>\r\n                        <Rectangle x:Name=\"HoverRectangle\"\r\n\t\t\t\t\t\t\tIsHitTestVisible=\"False\"\r\n\t\t\t\t\t\t\tFill=\"{StaticResource HoverBrush}\"\r\n\t\t\t\t\t\t\tRadiusX=\"0\"\r\n\t\t\t\t\t\t\tOpacity=\"0\"/>\r\n                        <ContentPresenter Margin=\"5,3,3,3\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" x:Name=\"contentPresenter\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsSelected\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n    </Style>\r\n\r\n    <Style x:Key=\"ExpanderHeaderFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Border>\r\n                        <Rectangle SnapsToDevicePixels=\"true\" Margin=\"0\" Stroke=\"Black\" StrokeDashArray=\"1 2\" StrokeThickness=\"1\" />\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"ExpanderDownHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.6\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Border Padding=\"{TemplateBinding Padding}\" Background=\"#FFFFFFFF\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"2,2,2,2\" x:Name=\"border\">\r\n                        <Grid SnapsToDevicePixels=\"False\" Background=\"Transparent\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"21\" />\r\n                                <ColumnDefinition Width=\"*\" />\r\n                            </Grid.ColumnDefinitions>\r\n                            <Rectangle Margin=\"3,3,3,3\" x:Name=\"Rectangle\" Fill=\"{DynamicResource NormalBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" />\r\n                            <Rectangle Margin=\"3,3,3,3\" x:Name=\"HoverRectangle\" Fill=\"{DynamicResource HoverBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\" />\r\n                            <Path HorizontalAlignment=\"Center\" x:Name=\"Up_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 0 L 4 4 L 8 0 Z\" />\r\n                            <Path Visibility=\"Collapsed\" HorizontalAlignment=\"Center\" x:Name=\"Down_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 4 L 4 0 L 8 4 Z\" />\r\n                            <ContentPresenter SnapsToDevicePixels=\"True\" HorizontalAlignment=\"Left\" Margin=\"4,3,0,3\" VerticalAlignment=\"Center\" Grid.Column=\"1\" RecognizesAccessKey=\"True\" />\r\n                        </Grid>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Fill\" TargetName=\"Rectangle\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                            <Setter Property=\"BorderBrush\" TargetName=\"border\" Value=\"{DynamicResource DisabledBorderBrush}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"Down_Arrow\" Value=\"Visible\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Up_Arrow\" Value=\"Collapsed\" />\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"ExpanderRightHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.6\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Border Padding=\"{TemplateBinding Padding}\" Background=\"#FFFFFFFF\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"2,2,2,2\" x:Name=\"border\">\r\n                        <Grid SnapsToDevicePixels=\"False\" Background=\"Transparent\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"21\" />\r\n                                <RowDefinition Height=\"*\" />\r\n                            </Grid.RowDefinitions>\r\n                            <Grid>\r\n                                <Grid.LayoutTransform>\r\n                                    <TransformGroup>\r\n                                        <TransformGroup.Children>\r\n                                            <TransformCollection>\r\n                                                <RotateTransform Angle=\"-90\" />\r\n                                            </TransformCollection>\r\n                                        </TransformGroup.Children>\r\n                                    </TransformGroup>\r\n                                </Grid.LayoutTransform>\r\n                                <Rectangle Margin=\"3,3,1,3\" x:Name=\"Rectangle\" Fill=\"{DynamicResource NormalBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" />\r\n                                <Rectangle Margin=\"3,3,1,3\" x:Name=\"HoverRectangle\" Fill=\"{DynamicResource HoverBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\" />\r\n                                <Path HorizontalAlignment=\"Center\" x:Name=\"Up_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 0 L 4 4 L 8 0 Z\" />\r\n                                <Path Visibility=\"Collapsed\" HorizontalAlignment=\"Center\" x:Name=\"Down_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 4 L 4 0 L 8 4 Z\" />\r\n                            </Grid>\r\n                            <ContentPresenter SnapsToDevicePixels=\"True\" HorizontalAlignment=\"Center\" Margin=\"2,4,4,0\" VerticalAlignment=\"Top\" Grid.Row=\"1\" RecognizesAccessKey=\"True\">\r\n                                <ContentPresenter.LayoutTransform>\r\n                                    <TransformGroup>\r\n                                        <TransformGroup.Children>\r\n                                            <TransformCollection>\r\n                                                <RotateTransform Angle=\"-90\" />\r\n                                            </TransformCollection>\r\n                                        </TransformGroup.Children>\r\n                                    </TransformGroup>\r\n                                </ContentPresenter.LayoutTransform>\r\n                            </ContentPresenter>\r\n                        </Grid>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Fill\" TargetName=\"Rectangle\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                            <Setter Property=\"BorderBrush\" TargetName=\"border\" Value=\"{DynamicResource DisabledBorderBrush}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"Up_Arrow\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Down_Arrow\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"ExpanderUpHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.6\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Border Padding=\"{TemplateBinding Padding}\" CornerRadius=\"2,2,2,2\" BorderThickness=\"1,1,1,1\" Background=\"#FFFFFFFF\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" x:Name=\"border\">\r\n                        <Grid SnapsToDevicePixels=\"False\" Background=\"Transparent\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"21\" />\r\n                                <ColumnDefinition Width=\"*\" />\r\n                            </Grid.ColumnDefinitions>\r\n                            <Grid>\r\n                                <Grid.LayoutTransform>\r\n                                    <TransformGroup>\r\n                                        <TransformGroup.Children>\r\n                                            <TransformCollection>\r\n                                                <RotateTransform Angle=\"180\" />\r\n                                            </TransformCollection>\r\n                                        </TransformGroup.Children>\r\n                                    </TransformGroup>\r\n                                </Grid.LayoutTransform>\r\n                                <Rectangle Margin=\"3,3,3,3\" x:Name=\"Rectangle\" Fill=\"{DynamicResource NormalBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" />\r\n                                <Rectangle Margin=\"3,3,3,3\" x:Name=\"HoverRectangle\" Fill=\"{DynamicResource HoverBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\" />\r\n                                <Path HorizontalAlignment=\"Center\" x:Name=\"Up_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 0 L 4 4 L 8 0 Z\" />\r\n                                <Path Visibility=\"Collapsed\" HorizontalAlignment=\"Center\" x:Name=\"Down_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 4 L 4 0 L 8 4 Z\" />\r\n                            </Grid>\r\n                            <ContentPresenter SnapsToDevicePixels=\"True\" HorizontalAlignment=\"Left\" Margin=\"4,3,0,3\" VerticalAlignment=\"Center\" Grid.Column=\"1\" RecognizesAccessKey=\"True\" />\r\n                        </Grid>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"BorderBrush\" TargetName=\"border\" Value=\"{DynamicResource DisabledBorderBrush}\"/>\r\n                            <Setter Property=\"Fill\" TargetName=\"Rectangle\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"Up_Arrow\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Down_Arrow\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"ExpanderLeftHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.6\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Border Padding=\"{TemplateBinding Padding}\" CornerRadius=\"2,2,2,2\" Background=\"#FFFFFFFF\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"1,1,1,1\" x:Name=\"border\">\r\n                        <Grid SnapsToDevicePixels=\"False\" Background=\"Transparent\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"21\" />\r\n                                <RowDefinition Height=\"*\" />\r\n                            </Grid.RowDefinitions>\r\n                            <Grid>\r\n                                <Grid.LayoutTransform>\r\n                                    <TransformGroup>\r\n                                        <TransformGroup.Children>\r\n                                            <TransformCollection>\r\n                                                <RotateTransform Angle=\"90\" />\r\n                                            </TransformCollection>\r\n                                        </TransformGroup.Children>\r\n                                    </TransformGroup>\r\n                                </Grid.LayoutTransform>\r\n                                <Rectangle Margin=\"3,3,3,3\" x:Name=\"Rectangle\" Fill=\"{DynamicResource NormalBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" />\r\n                                <Rectangle Margin=\"3,3,3,3\" x:Name=\"HoverRectangle\" Fill=\"{DynamicResource HoverBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\" />\r\n                                <Path HorizontalAlignment=\"Center\" x:Name=\"Up_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 0 L 4 4 L 8 0 Z\" />\r\n                                <Path Visibility=\"Collapsed\" HorizontalAlignment=\"Center\" x:Name=\"Down_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 4 L 4 0 L 8 4 Z\" />\r\n                            </Grid>\r\n                            <ContentPresenter SnapsToDevicePixels=\"True\" HorizontalAlignment=\"Center\" Margin=\"4,4,2,0\" VerticalAlignment=\"Top\" Grid.Row=\"1\" RecognizesAccessKey=\"True\">\r\n                                <ContentPresenter.LayoutTransform>\r\n                                    <TransformGroup>\r\n                                        <TransformGroup.Children>\r\n                                            <TransformCollection>\r\n                                                <RotateTransform Angle=\"90\" />\r\n                                            </TransformCollection>\r\n                                        </TransformGroup.Children>\r\n                                    </TransformGroup>\r\n                                </ContentPresenter.LayoutTransform>\r\n                            </ContentPresenter>\r\n                        </Grid>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Fill\" TargetName=\"Rectangle\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                            <Setter Property=\"BorderBrush\" TargetName=\"border\" Value=\"{DynamicResource DisabledBorderBrush}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"Up_Arrow\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Down_Arrow\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style TargetType=\"{x:Type Expander}\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Expander}\">\r\n                    <Border SnapsToDevicePixels=\"true\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"3\">\r\n                        <DockPanel>\r\n                            <ToggleButton FontFamily=\"{TemplateBinding FontFamily}\" FontSize=\"{TemplateBinding FontSize}\" FontStretch=\"{TemplateBinding FontStretch}\" FontStyle=\"{TemplateBinding FontStyle}\" FontWeight=\"{TemplateBinding FontWeight}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\" FocusVisualStyle=\"{StaticResource ExpanderHeaderFocusVisual}\" Margin=\"1,1,1,0\" MinHeight=\"0\" MinWidth=\"0\" x:Name=\"HeaderSite\" Style=\"{StaticResource ExpanderDownHeaderStyle}\" Content=\"{TemplateBinding Header}\" ContentTemplate=\"{TemplateBinding HeaderTemplate}\" ContentTemplateSelector=\"{TemplateBinding HeaderTemplateSelector}\" IsChecked=\"{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" DockPanel.Dock=\"Top\" />\r\n                            <Grid Visibility=\"Collapsed\" x:Name=\"grid\">\r\n                                <Border Background=\"{DynamicResource ShadeBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"1,0,1,1\" CornerRadius=\"3,3,3,3\" x:Name=\"border\" Margin=\"0,0,0,0\"/>\r\n                                <ContentPresenter Focusable=\"false\" HorizontalAlignment=\"Left\" Margin=\"1,1,1,1\" x:Name=\"ExpandSite\" VerticalAlignment=\"Top\" DockPanel.Dock=\"Bottom\" />\r\n                            </Grid>\r\n                        </DockPanel>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsExpanded\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"grid\" Value=\"Visible\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Down\" >\r\n                            <Setter Property=\"Margin\" TargetName=\"grid\" Value=\"1,0,1,0\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Right\">\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Right\" />\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Left\" />\r\n                            <Setter Property=\"Style\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderRightHeaderStyle}\" />\r\n                            <Setter Property=\"Background\" TargetName=\"border\" Value=\"{DynamicResource ShadeBrushRight}\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"grid\" Value=\"0,1,0,1\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Up\">\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Top\" />\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Bottom\" />\r\n                            <Setter Property=\"Style\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderUpHeaderStyle}\" />\r\n                            <Setter Property=\"Background\" TargetName=\"border\" Value=\"{DynamicResource ShadeBrushBottom}\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"grid\" Value=\"1,0,1,0\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Left\">\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Left\" />\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Right\" />\r\n                            <Setter Property=\"Style\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderLeftHeaderStyle}\" />\r\n                            <Setter Property=\"Background\" TargetName=\"border\" Value=\"{DynamicResource ShadeBrushLeft}\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"grid\" Value=\"0,1,0,1\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <ControlTemplate x:Key=\"ComboBoxToggleButton\" TargetType=\"{x:Type ToggleButton}\">\r\n        <ControlTemplate.Resources>\r\n            <Storyboard x:Key=\"HoverOn\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"HoverOff\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"PressedOn\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.6\"/>\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"PressedOff\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"1\"/>\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n        </ControlTemplate.Resources>\r\n        <Grid>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition/>\r\n                <ColumnDefinition Width=\"20\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Rectangle Grid.ColumnSpan=\"2\" HorizontalAlignment=\"Stretch\" x:Name=\"Rectangle\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" RadiusX=\"3\" RadiusY=\"3\" Fill=\"{DynamicResource NormalBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"2\"/>\r\n            <Rectangle HorizontalAlignment=\"Stretch\" x:Name=\"HoverRectangle\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" RadiusX=\"3\" RadiusY=\"3\" Fill=\"{DynamicResource HoverBrush}\" Stroke=\"{x:Null}\" StrokeThickness=\"2\" Grid.ColumnSpan=\"2\" Opacity=\"0\" Grid.Column=\"1\" Margin=\"0,2,2,2\"/>\r\n            <Rectangle Grid.Column=\"0\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" RadiusX=\"2\" RadiusY=\"2\" Stroke=\"{x:Null}\" Margin=\"2,2,0,2\">\r\n                <Rectangle.Fill>\r\n                    <SolidColorBrush Color=\"{DynamicResource WhiteColor}\"/>\r\n                </Rectangle.Fill>\r\n            </Rectangle>\r\n            <Path Grid.Column=\"1\" HorizontalAlignment=\"Center\" x:Name=\"Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 0 L 4 4 L 8 0 Z\" d:LayoutOverrides=\"Width, Height\" Margin=\"-2,2,0,0\"/>\r\n        </Grid>\r\n        <ControlTemplate.Triggers>\r\n            <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                <Trigger.ExitActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                </Trigger.ExitActions>\r\n                <Trigger.EnterActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                </Trigger.EnterActions>\r\n            </Trigger>\r\n            <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                <Trigger.ExitActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                </Trigger.ExitActions>\r\n                <Trigger.EnterActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                </Trigger.EnterActions>\r\n            </Trigger>\r\n            <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                <Setter Property=\"Fill\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Rectangle\"/>\r\n                <Setter Property=\"Stroke\" Value=\"{DynamicResource DisabledBorderBrush}\" TargetName=\"Rectangle\"/>\r\n                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                <Setter Property=\"Fill\" Value=\"{DynamicResource DisabledForegroundBrush}\" TargetName=\"Arrow\"/>\r\n            </Trigger>\r\n        </ControlTemplate.Triggers>\r\n    </ControlTemplate>\r\n\r\n\r\n    <ControlTemplate x:Key=\"ComboBoxTextBox\" TargetType=\"{x:Type TextBox}\">\r\n        <Border x:Name=\"PART_ContentHost\" Focusable=\"False\" Background=\"{TemplateBinding Background}\"/>\r\n    </ControlTemplate>\r\n\r\n\r\n    <Style TargetType=\"{x:Type ComboBox}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ComboBox}\">\r\n                    <Grid>\r\n                        <ToggleButton Grid.Column=\"2\" Template=\"{DynamicResource ComboBoxToggleButton}\" x:Name=\"ToggleButton\" Focusable=\"false\" IsChecked=\"{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" ClickMode=\"Press\"/>\r\n                        <ContentPresenter HorizontalAlignment=\"Left\" Margin=\"3,3,23,3\" x:Name=\"ContentSite\" VerticalAlignment=\"Center\" Content=\"{TemplateBinding SelectionBoxItem}\" ContentTemplate=\"{TemplateBinding SelectionBoxItemTemplate}\" ContentTemplateSelector=\"{TemplateBinding ItemTemplateSelector}\" IsHitTestVisible=\"False\"/>\r\n\r\n                        <TextBox Visibility=\"Hidden\" Template=\"{DynamicResource ComboBoxTextBox}\" HorizontalAlignment=\"Left\" Margin=\"3,3,23,3\" x:Name=\"PART_EditableTextBox\" Style=\"{x:Null}\" VerticalAlignment=\"Center\" Focusable=\"True\" Background=\"Transparent\" IsReadOnly=\"{TemplateBinding IsReadOnly}\"/>\r\n\r\n                        <Popup IsOpen=\"{TemplateBinding IsDropDownOpen}\" Placement=\"Bottom\" x:Name=\"Popup\" Focusable=\"False\" AllowsTransparency=\"True\" PopupAnimation=\"Slide\">\r\n                            <Grid MaxHeight=\"{TemplateBinding MaxDropDownHeight}\" MinWidth=\"{TemplateBinding ActualWidth}\" x:Name=\"DropDown\" SnapsToDevicePixels=\"True\">\r\n                                <Border x:Name=\"DropDownBorder\" Background=\"{DynamicResource ShadeBrush}\" BorderBrush=\"{DynamicResource SolidBorderBrush}\" BorderThickness=\"1\"/>\r\n                                <ScrollViewer Margin=\"4,6,4,6\"   SnapsToDevicePixels=\"True\" HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Auto\" CanContentScroll=\"True\">\r\n\r\n                                    <StackPanel IsItemsHost=\"True\" KeyboardNavigation.DirectionalNavigation=\"Contained\"/>\r\n\r\n                                </ScrollViewer>\r\n                            </Grid>\r\n                        </Popup>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"HasItems\" Value=\"false\">\r\n                            <Setter Property=\"MinHeight\" Value=\"95\" TargetName=\"DropDownBorder\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                            <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"AllowsTransparency\" SourceName=\"Popup\" Value=\"true\">\r\n                            <Setter Property=\"Margin\" Value=\"0,0,0,0\" TargetName=\"DropDownBorder\"/>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"DropDownBorder\" Value=\"3,3,3,3\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEditable\" Value=\"true\">\r\n                            <Setter Property=\"IsTabStop\" Value=\"false\"/>\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"PART_EditableTextBox\"/>\r\n                            <Setter Property=\"Visibility\" Value=\"Hidden\" TargetName=\"ContentSite\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style d:IsControlPart=\"True\" TargetType=\"{x:Type ComboBoxItem}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ComboBoxItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"SelectedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid SnapsToDevicePixels=\"true\" Margin=\"0,1,0,1\">\r\n                        <Border x:Name=\"Border\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\"/>\r\n                        <Border x:Name=\"SelectedBorder\" Background=\"{DynamicResource NormalBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Opacity=\"0\"/>\r\n                        <Border x:Name=\"HoverBorder\" Background=\"{DynamicResource HoverBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Opacity=\"0\"/>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Margin=\"5,2,0,2\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" x:Name=\"HoverOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"IsHighlighted\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOff}\" x:Name=\"SelectedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\" x:Name=\"SelectedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource SelectedBackgroundBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type ProgressBar}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ProgressBar}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"IndeterminateOn\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"IndeterminateGradientFill\"\r\n                                                   Storyboard.TargetProperty=\"(Shape.Fill).(LinearGradientBrush.Transform).(TransformGroup.Children)[0].X\" RepeatBehavior=\"Forever\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0\"/>\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:.5\"\r\n                                            Value=\"20\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n\r\n                        <Border x:Name=\"PART_Track\" Background=\"{DynamicResource ShadeBrush}\" BorderBrush=\"{DynamicResource DisabledBackgroundBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"6,6,6,6\"/>\r\n\r\n                        <Border HorizontalAlignment=\"Left\" x:Name=\"PART_Indicator\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{x:Null}\" BorderThickness=\"1\" CornerRadius=\"7,7,7,7\"/>\r\n                        <Grid x:Name=\"IndeterminateRoot\" Visibility=\"Collapsed\">\r\n                            <Rectangle Margin=\"1,1,1,1\"\tx:Name=\"IndeterminateGradientFill\" Opacity=\"0.7\" RadiusX=\"5\" RadiusY=\"5\" StrokeThickness=\"0\">\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush EndPoint=\"0,1\" StartPoint=\"20,1\" MappingMode=\"Absolute\" SpreadMethod=\"Repeat\">\r\n                                        <LinearGradientBrush.Transform>\r\n                                            <TransformGroup>\r\n                                                <TranslateTransform X=\"0\"/>\r\n                                                <SkewTransform AngleX=\"-30\"/>\r\n                                            </TransformGroup>\r\n                                        </LinearGradientBrush.Transform>\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                        <GradientStop Color=\"#00FFFFFF\" Offset=\".25\"/>\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.85\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                                <Rectangle.OpacityMask>\r\n                                    <LinearGradientBrush EndPoint=\"0.004,0.465\" StartPoint=\"0.997,0.422\">\r\n                                        <GradientStop Color=\"#00FFFFFF\"/>\r\n                                        <GradientStop Color=\"#00FFFFFF\" Offset=\"1\"/>\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.486\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.OpacityMask>\r\n                            </Rectangle>\r\n                        </Grid>\r\n                        <Border x:Name=\"DisabledBorder\" Background=\"{DynamicResource DisabledBackgroundBrush}\" BorderBrush=\"{DynamicResource DisabledBackgroundBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"6,6,6,6\" Opacity=\"0\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"DisabledBorder\" Value=\"0.8\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsIndeterminate\" Value=\"True\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource IndeterminateOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Setter Property=\"Visibility\" TargetName=\"IndeterminateRoot\" Value=\"Visible\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type TextBox}\">\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\"/>\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\"/>\r\n        <Setter Property=\"AllowDrop\" Value=\"true\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TextBox}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Storyboard.TargetName=\"HoverBorder\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\"\r\n\t\t\t\t\t\t\t\t\tValue=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Storyboard.TargetName=\"HoverBorder\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\"\r\n\t\t\t\t\t\t\t\t\tValue=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Border x:Name=\"Border\" Opacity=\"1\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\">\r\n                            <Grid>\r\n                                <Border BorderThickness=\"1\" CornerRadius=\"1,1,1,1\">\r\n                                    <Border.BorderBrush>\r\n                                        <SolidColorBrush Color=\"Transparent\"\r\n                                     x:Name=\"MouseOverColor\"/>\r\n                                    </Border.BorderBrush>\r\n                                    <ScrollViewer Margin=\"0\" x:Name=\"PART_ContentHost\"   Background=\"{TemplateBinding Background}\"/>\r\n                                </Border>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Border x:Name=\"HoverBorder\" Opacity=\"0\" BorderBrush=\"{StaticResource NormalBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"2,2,2,2\"/>\r\n                        <Border x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"False\" Opacity=\"0\" Background=\"#FFFFFFFF\" BorderBrush=\"#A5F7F7F7\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\"/>\r\n                        <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Opacity=\"0\" BorderBrush=\"{StaticResource NormalBrush}\" BorderThickness=\"2.1,2.1,2.1,2.1\" CornerRadius=\"0.2,0.2,0.2,0.2\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\"/>\r\n                                <Condition Property=\"IsFocused\" Value=\"False\"/>\r\n                            </MultiTrigger.Conditions>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource ShadeBrush}\"/>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type PasswordBox}\">\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\"/>\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\"/>\r\n        <Setter Property=\"AllowDrop\" Value=\"true\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type PasswordBox}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Storyboard.TargetName=\"HoverBorder\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\"\r\n\t\t\t\t\t\t\t\t\tValue=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Storyboard.TargetName=\"HoverBorder\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\"\r\n\t\t\t\t\t\t\t\t\tValue=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Border x:Name=\"Border\" Opacity=\"1\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\">\r\n                            <Grid>\r\n                                <Border BorderThickness=\"1\" CornerRadius=\"1,1,1,1\">\r\n                                    <Border.BorderBrush>\r\n                                        <SolidColorBrush Color=\"Transparent\"\r\n                                     x:Name=\"MouseOverColor\"/>\r\n                                    </Border.BorderBrush>\r\n                                    <ScrollViewer Margin=\"0\" x:Name=\"PART_ContentHost\"   Background=\"{TemplateBinding Background}\"/>\r\n                                </Border>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Border x:Name=\"HoverBorder\" Opacity=\"0\" BorderBrush=\"{StaticResource NormalBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"2,2,2,2\"/>\r\n                        <Border x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"False\" Opacity=\"0\" Background=\"#FFFFFFFF\" BorderBrush=\"#A5F7F7F7\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\"/>\r\n                        <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Opacity=\"0\" BorderBrush=\"{StaticResource NormalBrush}\" BorderThickness=\"2.1,2.1,2.1,2.1\" CornerRadius=\"0.2,0.2,0.2,0.2\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\"/>\r\n                                <Condition Property=\"IsFocused\" Value=\"False\"/>\r\n                            </MultiTrigger.Conditions>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource ShadeBrush}\"/>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type RichTextBox}\">\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\"/>\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\"/>\r\n        <Setter Property=\"AllowDrop\" Value=\"true\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type RichTextBox}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Storyboard.TargetName=\"HoverBorder\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\"\r\n\t\t\t\t\t\t\t\t\tValue=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Storyboard.TargetName=\"HoverBorder\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\"\r\n\t\t\t\t\t\t\t\t\tValue=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Border x:Name=\"Border\" Opacity=\"1\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\">\r\n                            <Grid>\r\n                                <Border BorderThickness=\"1\" CornerRadius=\"1,1,1,1\">\r\n                                    <Border.BorderBrush>\r\n                                        <SolidColorBrush Color=\"Transparent\"\r\n                                     x:Name=\"MouseOverColor\"/>\r\n                                    </Border.BorderBrush>\r\n                                    <ScrollViewer Margin=\"0\" x:Name=\"PART_ContentHost\"   Background=\"{TemplateBinding Background}\"/>\r\n                                </Border>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Border x:Name=\"HoverBorder\" Opacity=\"0\" BorderBrush=\"{StaticResource NormalBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"2,2,2,2\"/>\r\n                        <Border x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"False\" Opacity=\"0\" Background=\"#FFFFFFFF\" BorderBrush=\"#A5F7F7F7\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\"/>\r\n                        <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Opacity=\"0\" BorderBrush=\"{StaticResource NormalBrush}\" BorderThickness=\"2.1,2.1,2.1,2.1\" CornerRadius=\"0.2,0.2,0.2,0.2\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\"/>\r\n                                <Condition Property=\"IsFocused\" Value=\"False\"/>\r\n                            </MultiTrigger.Conditions>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource ShadeBrush}\"/>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type Label}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Label}\">\r\n                    <Grid>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" RecognizesAccessKey=\"True\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\"/>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type Menu}\">\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource WindowBackgroundBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"True\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Menu}\">\r\n                    <Grid>\r\n                        <Border Margin=\"1\" x:Name=\"Border\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\"/>\r\n                        <StackPanel Background=\"{TemplateBinding Background}\" IsItemsHost=\"True\" ClipToBounds=\"True\" Orientation=\"Horizontal\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DisabledBorderBrush}\" TargetName=\"Border\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <DropShadowBitmapEffect x:Key=\"PopupDropShadow\" ShadowDepth=\"1.5\" Softness=\"0.15\"/>\r\n\r\n    <Style TargetType=\"{x:Type MenuItem}\">\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\"/>\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type MenuItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HighlightedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HighlightedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Border x:Name=\"Border\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\">\r\n                        <Grid>\r\n\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition MinWidth=\"17\" Width=\"Auto\" SharedSizeGroup=\"MenuItemIconColumnGroup\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"Auto\" SharedSizeGroup=\"MenuItemIGTColumnGroup\"/>\r\n                                <ColumnDefinition Width=\"14\"/>\r\n                            </Grid.ColumnDefinitions>\r\n\r\n                            <Border Grid.Column=\"0\" Grid.ColumnSpan=\"4\" Background=\"{DynamicResource NormalBrush}\" Opacity=\"0\" x:Name=\"border\"/>\r\n\r\n                            <ContentPresenter Margin=\"4,0,6,0\" x:Name=\"Icon\" VerticalAlignment=\"Center\" ContentSource=\"Icon\"/>\r\n\r\n                            <Grid Visibility=\"Hidden\" Margin=\"4,0,6,0\" x:Name=\"GlyphPanel\" VerticalAlignment=\"Center\">\r\n                                <Path x:Name=\"GlyphPanelpath\" VerticalAlignment=\"Center\" Fill=\"{TemplateBinding Foreground}\" Data=\"M0,2 L0,4.8 L2.5,7.4 L7.1,2.8 L7.1,0 L2.5,4.6 z\" FlowDirection=\"LeftToRight\"/>\r\n                            </Grid>\r\n\r\n                            <ContentPresenter Grid.Column=\"1\" Margin=\"{TemplateBinding Padding}\" x:Name=\"HeaderHost\" RecognizesAccessKey=\"True\" ContentSource=\"Header\"/>\r\n\r\n                            <Grid Grid.Column=\"3\" Margin=\"4,0,6,0\" x:Name=\"ArrowPanel\" VerticalAlignment=\"Center\">\r\n                                <Path x:Name=\"ArrowPanelPath\" VerticalAlignment=\"Center\" Fill=\"{TemplateBinding Foreground}\" Data=\"M0,0 L0,8 L4,4 z\"/>\r\n                            </Grid>\r\n\r\n                            <Popup IsOpen=\"{Binding Path=IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Right\" x:Name=\"SubMenuPopup\" Focusable=\"false\" AllowsTransparency=\"true\" PopupAnimation=\"{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}\" VerticalOffset=\"-3\">\r\n                                <Grid x:Name=\"SubMenu\">\r\n                                    <Border x:Name=\"SubMenuBorder\" Background=\"{DynamicResource WindowBackgroundBrush}\" BorderBrush=\"{DynamicResource SolidBorderBrush}\" BorderThickness=\"1\"/>\r\n\r\n                                    <StackPanel IsItemsHost=\"True\" KeyboardNavigation.DirectionalNavigation=\"Cycle\"/>\r\n                                </Grid>\r\n                            </Popup>\r\n\r\n                        </Grid>\r\n                    </Border>\r\n\r\n                    <ControlTemplate.Triggers>\r\n\r\n                        <Trigger Property=\"Role\" Value=\"TopLevelHeader\">\r\n                            <Setter Property=\"Margin\" Value=\"0,1,0,1\"/>\r\n                            <Setter Property=\"Padding\" Value=\"6,3,6,3\"/>\r\n                            <Setter Property=\"Grid.IsSharedSizeScope\" Value=\"true\"/>\r\n                            <Setter Property=\"Placement\" Value=\"Bottom\" TargetName=\"SubMenuPopup\"/>\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ArrowPanel\"/>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"Role\" Value=\"TopLevelItem\">\r\n                            <Setter Property=\"Margin\" Value=\"0,1,0,1\"/>\r\n                            <Setter Property=\"Padding\" Value=\"6,3,6,3\"/>\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ArrowPanel\"/>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"Role\" Value=\"SubmenuHeader\">\r\n                            <Setter Property=\"DockPanel.Dock\" Value=\"Top\"/>\r\n                            <Setter Property=\"Padding\" Value=\"0,2,0,2\"/>\r\n                            <Setter Property=\"Grid.IsSharedSizeScope\" Value=\"true\"/>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"Role\" Value=\"SubmenuItem\">\r\n                            <Setter Property=\"DockPanel.Dock\" Value=\"Top\"/>\r\n                            <Setter Property=\"Padding\" Value=\"0,2,0,2\"/>\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ArrowPanel\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsSuspendingPopupAnimation\" Value=\"true\">\r\n                            <Setter Property=\"PopupAnimation\" Value=\"None\" TargetName=\"SubMenuPopup\"/>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"Icon\" Value=\"{x:Null}\">\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"Icon\"/>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"GlyphPanel\"/>\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"Icon\"/>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"AllowsTransparency\" SourceName=\"SubMenuPopup\" Value=\"true\">\r\n                            <Setter Property=\"Margin\" Value=\"0,0,3,3\" TargetName=\"SubMenu\"/>\r\n                            <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" TargetName=\"SubMenu\"/>\r\n                            <Setter Property=\"BitmapEffect\" Value=\"{DynamicResource PopupDropShadow}\" TargetName=\"SubMenuBorder\"/>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"IsHighlighted\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HighlightedOff}\" x:Name=\"HighlightedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HighlightedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type Separator}\">\r\n        <Setter Property=\"Height\" Value=\"1\"/>\r\n        <Setter Property=\"Margin\" Value=\"0,2,0,2\"/>\r\n        <Setter Property=\"Focusable\" Value=\"false\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Separator}\">\r\n                    <Border BorderBrush=\"{DynamicResource SolidBorderBrush}\" BorderThickness=\"1\"/>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type TabControl}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TabControl}\">\r\n                    <Grid ClipToBounds=\"true\" SnapsToDevicePixels=\"true\" KeyboardNavigation.TabNavigation=\"Local\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition x:Name=\"ColumnDefinition0\" />\r\n                            <ColumnDefinition x:Name=\"ColumnDefinition1\" Width=\"0\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\" x:Name=\"RowDefinition0\" />\r\n                            <RowDefinition Height=\"*\" x:Name=\"RowDefinition1\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Border CornerRadius=\"2,2,0,0\" x:Name=\"border\" Margin=\"3,0,0,-2\">\r\n                            <TabPanel x:Name=\"HeaderPanel\" IsItemsHost=\"true\" Panel.ZIndex=\"1\" KeyboardNavigation.TabIndex=\"1\" RenderTransformOrigin=\"0.5,0.5\" Width=\"Auto\" Height=\"Auto\">\r\n                                <TabPanel.LayoutTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform Angle=\"0\" />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </TabPanel.LayoutTransform>\r\n                                <TabPanel.RenderTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </TabPanel.RenderTransform>\r\n\r\n                            </TabPanel>\r\n                        </Border>\r\n                        <Border Grid.Row=\"1\" x:Name=\"ContentPanel\" Background=\"{DynamicResource ShadeBrushTop}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"1\" CornerRadius=\"0,0,3,3\" KeyboardNavigation.DirectionalNavigation=\"Contained\" KeyboardNavigation.TabNavigation=\"Local\" KeyboardNavigation.TabIndex=\"2\">\r\n                            <ContentPresenter Margin=\"4\" x:Name=\"PART_SelectedContentHost\" ContentSource=\"SelectedContent\"/>\r\n                        </Border>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Bottom\">\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition1\" Value=\"Auto\" />\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"border\" Value=\"1\"/>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"border\" Value=\"0,0,2,2\"/>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"ContentPanel\" Value=\"3,3,0,0\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Left\">\r\n\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"HeaderPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"ContentPanel\" Value=\"1\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition0\" Value=\"Auto\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition1\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition1\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"border\" Value=\"0\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"border\" Value=\"0,0,0,0\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"ContentPanel\" Value=\"0,0,0,0\"/>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"border\" Value=\"0,2,2,0\"/>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"ContentPanel\" Value=\"0,3,3,0\"/>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Right\">\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"HeaderPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition1\" Value=\"Auto\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition1\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"border\" Value=\"1\"/>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"border\" Value=\"0,2,2,0\"/>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"ContentPanel\" Value=\"3,0,0,3\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"border\" Value=\"0,0,0,-2\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style d:IsControlPart=\"True\" TargetType=\"{x:Type TabItem}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TabItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid x:Name=\"grid\">\r\n                        <Grid.LayoutTransform>\r\n                            <TransformGroup>\r\n                                <ScaleTransform ScaleX=\"1\" ScaleY=\"1\"/>\r\n                                <SkewTransform AngleX=\"0\" AngleY=\"0\"/>\r\n                                <RotateTransform Angle=\"0\"/>\r\n                                <TranslateTransform X=\"0\" Y=\"0\"/>\r\n                            </TransformGroup>\r\n                        </Grid.LayoutTransform>\r\n                        <Grid Margin=\"1,0,1,0\">\r\n                            <Border x:Name=\"Border\" Background=\"{DynamicResource SelectedBackgroundBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"3,3,0,0\"/>\r\n                            <Border x:Name=\"SelectedBorder\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"2,2,2,0\" CornerRadius=\"3,3,0,0\" Opacity=\"0\" Margin=\"-2,0,-2,0\"/>\r\n                            <Border x:Name=\"HoverBorder\" Background=\"{DynamicResource HoverBrush}\" BorderBrush=\"{x:Null}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"3,3,0,0\" Opacity=\"0\"/>\r\n                            <Border x:Name=\"SelectedHoverBorder\" Background=\"{DynamicResource HoverBrush}\" BorderBrush=\"{x:Null}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"3,3,0,0\" Opacity=\"0\"/>\r\n                            <ContentPresenter HorizontalAlignment=\"Center\" Margin=\"6,3,6,3\" x:Name=\"ContentSite\" VerticalAlignment=\"Center\" RecognizesAccessKey=\"True\" ContentSource=\"Header\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Left\">\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"grid\">\r\n                                <Setter.Value>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform Angle=\"-90\" />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Right\">\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"grid\">\r\n                                <Setter.Value>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform Angle=\"90\" />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Bottom\">\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"ContentSite\">\r\n                                <Setter.Value>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform Angle=\"180\" />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"grid\">\r\n                                <Setter.Value>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\"/>\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\"/>\r\n                                        <RotateTransform Angle=\"180\"/>\r\n                                        <TranslateTransform X=\"0\" Y=\"0\"/>\r\n                                    </TransformGroup>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" />\r\n                                <Condition Property=\"Selector.IsSelected\" Value=\"False\" />\r\n                            </MultiTrigger.Conditions>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsSelected\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOff}\" x:Name=\"SelectedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\" x:Name=\"SelectedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Setter Property=\"Panel.ZIndex\" Value=\"100\" />\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" SourceName=\"grid\" />\r\n                                <Condition Property=\"Selector.IsSelected\" Value=\"True\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <Setter Property=\"Opacity\" TargetName=\"SelectedHoverBorder\" Value=\"0.6\"/>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                            <Setter Property=\"Background\" TargetName=\"Border\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                            <Setter Property=\"BorderBrush\" TargetName=\"Border\" Value=\"{DynamicResource DisabledBorderBrush}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Style.Triggers>\r\n        </Style.Triggers>\r\n    </Style>\r\n\r\n    <Style x:Key=\"NuclearSliderThumb\" d:IsControlPart=\"True\" TargetType=\"{x:Type Thumb}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n        <Setter Property=\"Height\" Value=\"14\"/>\r\n        <Setter Property=\"Width\" Value=\"14\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundAnimation\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundAnimation\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Rectangle x:Name=\"Base\" RadiusX=\"6\" RadiusY=\"6\" Fill=\"#FF000000\" StrokeThickness=\"2\"/>\r\n                        <Rectangle x:Name=\"Background\" Fill=\"{TemplateBinding Background}\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" RadiusX=\"4\" RadiusY=\"4\"/>\r\n                        <Rectangle x:Name=\"BackgroundAnimation\" Opacity=\"0\" Fill=\"{StaticResource HoverBrush}\" RadiusX=\"3\" RadiusY=\"3\" Margin=\"2,2,2,2\" StrokeThickness=\"0\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Fill\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Base\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type Slider}\">\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource SelectedBackgroundBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource HorizontalSliderBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Slider}\">\r\n                    <Grid x:Name=\"GridRoot\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\" MinHeight=\"{TemplateBinding MinHeight}\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n\r\n                        <TickBar Visibility=\"Collapsed\" x:Name=\"TopTick\" Height=\"4\" SnapsToDevicePixels=\"True\" Placement=\"Top\" Fill=\"{DynamicResource GlyphBrush}\"/>\r\n                        <Border Grid.Row=\"1\" Margin=\"0\" x:Name=\"Border\" Height=\"4\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\"/>\r\n\r\n                        <Track Grid.Row=\"1\" x:Name=\"PART_Track\">\r\n                            <Track.Thumb>\r\n                                <Thumb Style=\"{DynamicResource NuclearSliderThumb}\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"2,2,2,2\" Width=\"24\" Height=\"13\"/>\r\n                            </Track.Thumb>\r\n                            <Track.IncreaseRepeatButton>\r\n                                <RepeatButton Style=\"{DynamicResource NuclearScrollRepeatButtonStyle}\" Command=\"Slider.IncreaseLarge\"/>\r\n                            </Track.IncreaseRepeatButton>\r\n                            <Track.DecreaseRepeatButton>\r\n                                <RepeatButton Style=\"{DynamicResource NuclearScrollRepeatButtonStyle}\" Command=\"Slider.DecreaseLarge\"/>\r\n                            </Track.DecreaseRepeatButton>\r\n                        </Track>\r\n\r\n                        <TickBar Visibility=\"Collapsed\" Grid.Row=\"2\" x:Name=\"BottomTick\" Height=\"4\" SnapsToDevicePixels=\"True\" Placement=\"Bottom\" Fill=\"{TemplateBinding Foreground}\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"TickPlacement\" Value=\"TopLeft\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"TopTick\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"TickPlacement\" Value=\"BottomRight\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"BottomTick\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"TickPlacement\" Value=\"Both\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"TopTick\"/>\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"BottomTick\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DisabledBorderBrush}\" TargetName=\"Border\"/>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"Orientation\" Value=\"Vertical\">\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"GridRoot\">\r\n                                <Setter.Value>\r\n                                    <RotateTransform Angle=\"-90\"/>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                            <Setter TargetName=\"PART_Track\" Property=\"Orientation\" Value=\"Horizontal\"/>\r\n                        </Trigger>\r\n\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"BorderThickness\" Value=\"1,1,1,1\"/>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type TreeView}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TreeView}\">\r\n                    <Grid>\r\n                        <Border x:Name=\"Border\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{DynamicResource SolidBorderBrush}\" BorderThickness=\"1\" CornerRadius=\"3,3,3,3\">\r\n                            <ScrollViewer   Focusable=\"False\" Padding=\"4\" HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Auto\" CanContentScroll=\"False\">\r\n                                <ItemsPresenter/>\r\n                            </ScrollViewer>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource ShadeBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n    </Style>\r\n\r\n    <Style x:Key=\"NuclearTreeViewItemToggleButton\" d:IsControlPart=\"True\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Focusable\" Value=\"False\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <Grid Width=\"15\" Height=\"13\" Background=\"Transparent\">\r\n                        <Path Visibility=\"Collapsed\" HorizontalAlignment=\"Left\" Margin=\"1,1,1,1\" x:Name=\"IsExpandedPath\" VerticalAlignment=\"Center\" Data=\"M 0 4 L 8 4 L 4 8 Z\">\r\n                            <Path.Fill>\r\n                                <SolidColorBrush Color=\"{DynamicResource BlackColor}\"/>\r\n                            </Path.Fill>\r\n                        </Path>\r\n                        <Path HorizontalAlignment=\"Left\" Margin=\"1,1,1,1\" x:Name=\"ExpandPath\" VerticalAlignment=\"Center\" Data=\"M 4 0 L 8 4 L 4 8 Z\">\r\n                            <Path.Fill>\r\n                                <SolidColorBrush Color=\"{DynamicResource BlackColor}\"/>\r\n                            </Path.Fill>\r\n                        </Path>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsChecked\" Value=\"True\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"IsExpandedPath\"/>\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ExpandPath\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style d:IsControlPart=\"True\" TargetType=\"{x:Type TreeViewItem}\">\r\n        <Style.Triggers>\r\n            <Trigger Property=\"IsSelected\" Value=\"True\">\r\n                <Setter Property=\"Foreground\">\r\n                    <Setter.Value>\r\n                        <SolidColorBrush Color=\"{DynamicResource WhiteColor}\"/>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Trigger>\r\n        </Style.Triggers>\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\"/>\r\n        <Setter Property=\"Padding\" Value=\"1,0,0,0\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TreeViewItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"SelectedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder2\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.5\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder2\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedHoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedHoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedHoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedHoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition MinWidth=\"19\" Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition/>\r\n                        </Grid.RowDefinitions>\r\n                        <ToggleButton x:Name=\"Expander\" Style=\"{DynamicResource NuclearTreeViewItemToggleButton}\" IsChecked=\"{Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}\" ClickMode=\"Press\"/>\r\n                        <Border Grid.Column=\"1\" x:Name=\"Selection_Border\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\">\r\n                            <Grid>\r\n                                <Border Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"2,2,2,2\" Opacity=\"0\" x:Name=\"SelectedBorder\"/>\r\n                                <Border x:Name=\"HoverBorder1\" Opacity=\"0\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"2,2,2,2\"/>\r\n                                <Border x:Name=\"HoverBorder2\" Opacity=\"0\" Background=\"{DynamicResource HoverBrush}\" BorderBrush=\"{x:Null}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"2,2,2,2\"/>\r\n                                <ContentPresenter HorizontalAlignment=\"Stretch\" x:Name=\"PART_Header\" ContentSource=\"Header\" d:LayoutOverrides=\"Width\" Margin=\"3,2,3,2\"/>\r\n                                <Border x:Name=\"SelectedHoverBorder\" Opacity=\"0\" Background=\"{DynamicResource HoverBrush}\" BorderBrush=\"{x:Null}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"2,2,2,2\"/>\r\n                            </Grid>\r\n                        </Border>\r\n                        <ItemsPresenter Grid.Column=\"1\" Grid.ColumnSpan=\"2\" Grid.Row=\"1\" x:Name=\"ItemsHost\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedHoverOff}\" x:Name=\"SelectedHoverOff_BeginStoryboard\"/>\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedHoverOn}\" x:Name=\"SelectedHoverOn_BeginStoryboard\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsSelected\" Value=\"True\"/>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\"/>\r\n                            </MultiTrigger.Conditions>\r\n                        </MultiTrigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsSelected\" Value=\"False\"/>\r\n                                <Condition Property=\"IsMouseOver\" SourceName=\"Selection_Border\" Value=\"True\"/>\r\n                            </MultiTrigger.Conditions>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"HoverOff_BeginStoryboard\" Storyboard=\"{StaticResource HoverOff}\"/>\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"HoverOn_BeginStoryboard\" Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsExpanded\" Value=\"false\">\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ItemsHost\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"HasItems\" Value=\"false\">\r\n                            <Setter Property=\"Visibility\" Value=\"Hidden\" TargetName=\"Expander\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsSelected\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"SelectedOff_BeginStoryboard\" Storyboard=\"{StaticResource SelectedOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}\"/>\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsSelected\" Value=\"true\"/>\r\n                                <Condition Property=\"IsSelectionActive\" Value=\"false\"/>\r\n                            </MultiTrigger.Conditions>\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource {x:Static SystemColors.ControlBrushKey}}\" TargetName=\"Selection_Border\"/>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}\"/>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Static ToolBar.ButtonStyleKey}\" TargetType=\"{x:Type Button}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource NuclearButtonFocusVisual}\"/>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Button}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Hover\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Hover\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\n                            </DoubleAnimationUsingKeyFrames>\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"0.6\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                <DiscreteObjectKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"{x:Static Visibility.Visible}\"/>\r\n                            </ObjectAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n\r\n                    <Grid x:Name=\"Grid\">\r\n                        <Border x:Name=\"Background\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"2,2,2,2\">\r\n                            <Border x:Name=\"Hover\" Background=\"{StaticResource HoverBrush}\" CornerRadius=\"1,1,1,1\" Height=\"Auto\" Width=\"Auto\" Opacity=\"0\"/>\r\n                        </Border>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" RecognizesAccessKey=\"True\"/>\r\n                        <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" BorderBrush=\"{StaticResource HoverBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"2,2,2,2\" Opacity=\"0\"/>\r\n                    </Grid>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsDefault\" Value=\"True\">\r\n                            <Setter Property=\"BorderBrush\" TargetName=\"Background\" Value=\"{DynamicResource DefaultedBorderBrush}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"FocusedOff_BeginStoryboard\" Storyboard=\"{StaticResource FocusedOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"true\"/>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Background\"/>\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DisabledBorderBrush}\" TargetName=\"Background\"/>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Static ToolBar.RadioButtonStyleKey}\" TargetType=\"{x:Type RadioButton}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource RadioButtonFocusVisual}\"/>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type RadioButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"CheckedFalse\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedTrue\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"0.6\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <BulletDecorator Background=\"Transparent\">\r\n                        <BulletDecorator.Bullet>\r\n                            <Grid Width=\"16\" Height=\"16\">\r\n                                <Ellipse Height=\"14\" Margin=\"1\" x:Name=\"Background\" Width=\"14\" Fill=\"{StaticResource NormalBrush}\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\"/>\r\n                                <Ellipse Height=\"12\" x:Name=\"BackgroundOverlay\" Width=\"12\" Opacity=\"0\" Fill=\"{StaticResource HoverBrush}\" Stroke=\"#00000000\" Margin=\"2,2,2,2\" StrokeThickness=\"0\"/>\r\n                                <Border HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Width=\"6\" Height=\"6\" CornerRadius=\"1,1,1,1\" BorderThickness=\"1,1,1,1\" Background=\"#FFFFFFFF\" x:Name=\"CheckIcon\" BorderBrush=\"{StaticResource CheckIconBrush}\" Opacity=\"0\"/>\r\n                            </Grid>\r\n                        </BulletDecorator.Bullet>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" RecognizesAccessKey=\"True\"/>\r\n                    </BulletDecorator>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsChecked\" Value=\"false\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedTrue}\" x:Name=\"CheckedTrue_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedFalse}\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Fill\" TargetName=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                            <Setter Property=\"Stroke\" TargetName=\"Background\" Value=\"{DynamicResource DisabledBorderBrush}\"/>\r\n\r\n                        </Trigger>\r\n\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Style.Triggers>\r\n            <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n            </Trigger>\r\n        </Style.Triggers>\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Static ToolBar.CheckBoxStyleKey}\" TargetType=\"{x:Type CheckBox}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource CheckBoxFocusVisual}\"/>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type CheckBox}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"CheckedFalse\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedTrue\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"ThreeStateOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"IndeterminateIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"ThreeStateOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"IndeterminateIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"0.6\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <BulletDecorator Background=\"Transparent\">\r\n                        <BulletDecorator.Bullet>\r\n                            <Grid Width=\"16\" Height=\"16\">\r\n                                <Rectangle Height=\"14\" Margin=\"1\" x:Name=\"Background\" Width=\"14\" Fill=\"{TemplateBinding Background}\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                                <Rectangle Height=\"12\" x:Name=\"BackgroundOverlay\" Width=\"12\" Opacity=\"0\" Fill=\"{StaticResource HoverBrush}\" Stroke=\"{x:Null}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n\r\n                                <Path x:Name=\"CheckIcon\" Opacity=\"0\" Stretch=\"Fill\" Data=\"M102.03442,598.79645 L105.22962,597.78918 L106.95686,599.19977 C106.95686,599.19977 113.77958,590.53656 113.77958,590.53656 C113.77958,590.53656 107.40649,603.79431 107.40649,603.79431 z\" Fill=\"#FFFFFFFF\"\r\n                    Height=\"10\"\r\n                    Width=\"11\"\r\n                    Stroke=\"{StaticResource CheckIconBrush}\"\r\n                    StrokeThickness=\"0\"/>\r\n\r\n                                <Rectangle Height=\"9\" x:Name=\"IndeterminateIcon\" Width=\"9\" Opacity=\"0\" Fill=\"#FFFFFFFF\" Stroke=\"{StaticResource CheckIconBrush}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                                <Rectangle Height=\"14\" x:Name=\"DisabledVisualElement\" Width=\"14\" Opacity=\"0\" Fill=\"{StaticResource DisabledBackgroundBrush}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                                <Rectangle Height=\"16\" x:Name=\"ContentFocusVisualElement\" Width=\"16\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HoverBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                            </Grid>\r\n                        </BulletDecorator.Bullet>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" RecognizesAccessKey=\"True\"/>\r\n                    </BulletDecorator>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsChecked\" Value=\"True\" />\r\n                                <Condition Property=\"IsThreeState\" Value=\"True\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"ThreeStateOn_BeginStoryboard\" Storyboard=\"{StaticResource CheckedFalse}\" />\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"ThreeStateOff_BeginStoryboard\" Storyboard=\"{StaticResource CheckedTrue}\" />\r\n                            </MultiTrigger.ExitActions>\r\n                        </MultiTrigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsChecked\" Value=\"{x:Null}\" />\r\n                                <Condition Property=\"IsThreeState\" Value=\"True\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"ThreeStateOn1_BeginStoryboard\" Storyboard=\"{StaticResource ThreeStateOn}\" />\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"ThreeStateOff1_BeginStoryboard\" Storyboard=\"{StaticResource ThreeStateOff}\" />\r\n                            </MultiTrigger.ExitActions>\r\n                            <Setter Property=\"Visibility\" TargetName=\"CheckIcon\" Value=\"Hidden\"/>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"false\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedTrue}\" x:Name=\"CheckedTrue_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedFalse}\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Fill\" TargetName=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                            <Setter Property=\"Stroke\" TargetName=\"Background\" Value=\"{DynamicResource DisabledBorderBrush}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Style.Triggers>\r\n            <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n            </Trigger>\r\n        </Style.Triggers>\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Static ToolBar.ComboBoxStyleKey}\" TargetType=\"{x:Type ComboBox}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ComboBox}\">\r\n                    <Grid>\r\n                        <ToggleButton Grid.Column=\"2\" Template=\"{DynamicResource ComboBoxToggleButton}\" x:Name=\"ToggleButton\" Focusable=\"false\" IsChecked=\"{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" ClickMode=\"Press\"/>\r\n                        <ContentPresenter HorizontalAlignment=\"Left\" Margin=\"3,3,23,3\" x:Name=\"ContentSite\" VerticalAlignment=\"Center\" Content=\"{TemplateBinding SelectionBoxItem}\" ContentTemplate=\"{TemplateBinding SelectionBoxItemTemplate}\" ContentTemplateSelector=\"{TemplateBinding ItemTemplateSelector}\" IsHitTestVisible=\"False\"/>\r\n\r\n                        <TextBox Visibility=\"Hidden\" Template=\"{DynamicResource ComboBoxTextBox}\" HorizontalAlignment=\"Left\" Margin=\"3,3,23,3\" x:Name=\"PART_EditableTextBox\" Style=\"{x:Null}\" VerticalAlignment=\"Center\" Focusable=\"True\" Background=\"Transparent\" IsReadOnly=\"{TemplateBinding IsReadOnly}\"/>\r\n\r\n                        <Popup IsOpen=\"{TemplateBinding IsDropDownOpen}\" Placement=\"Bottom\" x:Name=\"Popup\" Focusable=\"False\" AllowsTransparency=\"True\" PopupAnimation=\"Slide\">\r\n                            <Grid MaxHeight=\"{TemplateBinding MaxDropDownHeight}\" MinWidth=\"{TemplateBinding ActualWidth}\" x:Name=\"DropDown\" SnapsToDevicePixels=\"True\">\r\n                                <Border x:Name=\"DropDownBorder\" Background=\"{DynamicResource ShadeBrush}\" BorderBrush=\"{DynamicResource SolidBorderBrush}\" BorderThickness=\"1\"/>\r\n                                <ScrollViewer Margin=\"4,6,4,6\"   SnapsToDevicePixels=\"True\" HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Auto\" CanContentScroll=\"True\">\r\n\r\n                                    <StackPanel IsItemsHost=\"True\" KeyboardNavigation.DirectionalNavigation=\"Contained\"/>\r\n\r\n                                </ScrollViewer>\r\n                            </Grid>\r\n                        </Popup>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"HasItems\" Value=\"false\">\r\n                            <Setter Property=\"MinHeight\" Value=\"95\" TargetName=\"DropDownBorder\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                            <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"AllowsTransparency\" SourceName=\"Popup\" Value=\"true\">\r\n                            <Setter Property=\"Margin\" Value=\"0,0,0,0\" TargetName=\"DropDownBorder\"/>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"DropDownBorder\" Value=\"3,3,3,3\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEditable\" Value=\"true\">\r\n                            <Setter Property=\"IsTabStop\" Value=\"false\"/>\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"PART_EditableTextBox\"/>\r\n                            <Setter Property=\"Visibility\" Value=\"Hidden\" TargetName=\"ContentSite\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Static ToolBar.TextBoxStyleKey}\" TargetType=\"{x:Type TextBox}\">\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\"/>\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\"/>\r\n        <Setter Property=\"AllowDrop\" Value=\"true\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TextBox}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Storyboard.TargetName=\"HoverBorder\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\"\r\n\t\t\t\t\t\t\t\t\tValue=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Storyboard.TargetName=\"HoverBorder\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\"\r\n\t\t\t\t\t\t\t\t\tValue=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Border x:Name=\"Border\" Opacity=\"1\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\">\r\n                            <Grid>\r\n                                <Border BorderThickness=\"1\" CornerRadius=\"1,1,1,1\">\r\n                                    <Border.BorderBrush>\r\n                                        <SolidColorBrush Color=\"Transparent\"\r\n                                     x:Name=\"MouseOverColor\"/>\r\n                                    </Border.BorderBrush>\r\n                                    <ScrollViewer Margin=\"0\" x:Name=\"PART_ContentHost\"   Background=\"{TemplateBinding Background}\"/>\r\n                                </Border>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Border x:Name=\"HoverBorder\" Opacity=\"0\" BorderBrush=\"{StaticResource NormalBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"2,2,2,2\"/>\r\n                        <Border x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"False\" Opacity=\"0\" Background=\"#FFFFFFFF\" BorderBrush=\"#A5F7F7F7\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\"/>\r\n                        <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Opacity=\"0\" BorderBrush=\"{StaticResource NormalBrush}\" BorderThickness=\"2.1,2.1,2.1,2.1\" CornerRadius=\"0.2,0.2,0.2,0.2\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\"/>\r\n                                <Condition Property=\"IsFocused\" Value=\"False\"/>\r\n                            </MultiTrigger.Conditions>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource ShadeBrush}\"/>\r\n    </Style>\r\n\r\n    <LinearGradientBrush x:Key=\"ToolBarHorizontalBackground\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#FFFFFF\" Offset=\"0\"/>\r\n        <GradientStop Color=\"#FFFBFF\" Offset=\"0.5\"/>\r\n        <GradientStop Color=\"#F7F7F7\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"ToolBarToggleButtonHorizontalBackground\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#ECECEC\" Offset=\"0\"/>\r\n        <GradientStop Color=\"#DDDDDD\" Offset=\"0.5\"/>\r\n        <GradientStop Color=\"#A0A0A0\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"ToolBarButtonHover\" Color=\"{StaticResource NormalBrushGradient1}\" />\r\n    <SolidColorBrush x:Key=\"ToolBarGripper\" Color=\"#C6C3C6\"/>\r\n    <Style x:Key=\"ToolBarHorizontalOverflowButtonStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource ToolBarToggleButtonHorizontalBackground}\"/>\r\n        <Setter Property=\"MinHeight\" Value=\"0\"/>\r\n        <Setter Property=\"MinWidth\" Value=\"0\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <Border SnapsToDevicePixels=\"true\" x:Name=\"Bd\" CornerRadius=\"0,0,0,0\" Background=\"{DynamicResource SelectedBackgroundBrush}\">\r\n                        <Canvas SnapsToDevicePixels=\"true\" HorizontalAlignment=\"Right\" Margin=\"7,2,2,2\" VerticalAlignment=\"Bottom\" Width=\"6\" Height=\"7\">\r\n                            <Path Stroke=\"White\" Data=\"M 1 1.5 L 6 1.5\"/>\r\n                            <Path Stroke=\"{TemplateBinding Foreground}\" Data=\"M 0 0.5 L 5 0.5\"/>\r\n                            <Path Fill=\"White\" Data=\"M 0.5 4 L 6.5 4 L 3.5 7 Z\"/>\r\n                            <Path Fill=\"{TemplateBinding Foreground}\" Data=\"M -0.5 3 L 5.5 3 L 2.5 6 Z\"/>\r\n                        </Canvas>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Setter Property=\"Background\" TargetName=\"Bd\" Value=\"{DynamicResource MouseOverBrush}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                            <Setter Property=\"Background\" TargetName=\"Bd\" Value=\"{StaticResource ToolBarButtonHover}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{StaticResource ToolBarGripper}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <SolidColorBrush x:Key=\"ToolBarSubMenuBackground\" Color=\"#FFFDFDFD\"/>\r\n    <SolidColorBrush x:Key=\"ToolBarMenuBorder\" Color=\"#FFFFFFFF\"/>\r\n    <Style x:Key=\"ToolBarThumbStyle\" TargetType=\"{x:Type Thumb}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <Border SnapsToDevicePixels=\"True\" Background=\"Transparent\" Padding=\"{TemplateBinding Padding}\" CornerRadius=\"0,0,0,0\">\r\n                        <Rectangle>\r\n                            <Rectangle.Fill>\r\n                                <DrawingBrush TileMode=\"Tile\" Viewbox=\"0,0,4,4\" ViewboxUnits=\"Absolute\" Viewport=\"0,0,4,4\" ViewportUnits=\"Absolute\">\r\n                                    <DrawingBrush.Drawing>\r\n                                        <DrawingGroup>\r\n                                            <GeometryDrawing Brush=\"White\" Geometry=\"M 1 1 L 1 3 L 3 3 L 3 1 z\"/>\r\n                                            <GeometryDrawing Brush=\"{StaticResource ToolBarGripper}\" Geometry=\"M 0 0 L 0 2 L 2 2 L 2 0 z\"/>\r\n                                        </DrawingGroup>\r\n                                    </DrawingBrush.Drawing>\r\n                                </DrawingBrush>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Setter Property=\"Cursor\" Value=\"SizeAll\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <LinearGradientBrush x:Key=\"ToolBarToggleButtonVerticalBackground\" EndPoint=\"1,0\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#ECECEC\" Offset=\"0\"/>\r\n        <GradientStop Color=\"#DDDDDD\" Offset=\"0.5\"/>\r\n        <GradientStop Color=\"#A0A0A0\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <Style x:Key=\"ToolBarVerticalOverflowButtonStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource ToolBarToggleButtonVerticalBackground}\"/>\r\n        <Setter Property=\"MinHeight\" Value=\"0\"/>\r\n        <Setter Property=\"MinWidth\" Value=\"0\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <Border SnapsToDevicePixels=\"true\" x:Name=\"Bd\" Background=\"{TemplateBinding Background}\" CornerRadius=\"0,0,3,3\">\r\n                        <Canvas SnapsToDevicePixels=\"true\" HorizontalAlignment=\"Right\" Margin=\"2,7,2,2\" VerticalAlignment=\"Bottom\" Width=\"7\" Height=\"6\">\r\n                            <Path Stroke=\"White\" Data=\"M 1.5 1 L 1.5 6\"/>\r\n                            <Path Stroke=\"{TemplateBinding Foreground}\" Data=\"M 0.5 0 L 0.5 5\"/>\r\n                            <Path Fill=\"White\" Data=\"M 3.5 0.5 L 7 3.5 L 4 6.5 Z\"/>\r\n                            <Path Fill=\"{TemplateBinding Foreground}\" Data=\"M 3 -0.5 L 6 2.5 L 3 5.5 Z\"/>\r\n                        </Canvas>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Setter Property=\"Background\" TargetName=\"Bd\" Value=\"{StaticResource ToolBarButtonHover}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                            <Setter Property=\"Background\" TargetName=\"Bd\" Value=\"{StaticResource ToolBarButtonHover}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{StaticResource ToolBarGripper}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <LinearGradientBrush x:Key=\"ToolBarVerticalBackground\" EndPoint=\"1,0\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#FFFFFF\" Offset=\"0\"/>\r\n        <GradientStop Color=\"#FFFBFF\" Offset=\"0.5\"/>\r\n        <GradientStop Color=\"#F7F7F7\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <Style TargetType=\"{x:Type ToolBar}\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource ToolBarHorizontalBackground}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToolBar}\">\r\n                    <Grid SnapsToDevicePixels=\"true\" Margin=\"3,1,1,1\" x:Name=\"Grid\">\r\n                        <Grid HorizontalAlignment=\"Right\" x:Name=\"OverflowGrid\">\r\n                            <ToggleButton IsEnabled=\"{TemplateBinding HasOverflowItems}\" FocusVisualStyle=\"{x:Null}\" x:Name=\"OverflowButton\" Style=\"{StaticResource ToolBarHorizontalOverflowButtonStyle}\" ClickMode=\"Press\" IsChecked=\"{Binding Path=IsOverflowOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\"/>\r\n                            <Popup Focusable=\"false\" AllowsTransparency=\"true\" IsOpen=\"{Binding Path=IsOverflowOpen, RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Bottom\" PopupAnimation=\"{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}\" StaysOpen=\"False\" x:Name=\"OverflowPopup\">\r\n                                <Border x:Name=\"Shdw\">\r\n                                    <Border BorderThickness=\"1,1,1,1\" Background=\"{DynamicResource ShadeBrush}\" BorderBrush=\"{DynamicResource LightBrush}\">\r\n                                        <ToolBarOverflowPanel Focusable=\"true\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" FocusVisualStyle=\"{x:Null}\" Margin=\"2\" x:Name=\"PART_ToolBarOverflowPanel\" WrapWidth=\"200\" KeyboardNavigation.DirectionalNavigation=\"Cycle\" KeyboardNavigation.TabNavigation=\"Cycle\"/>\r\n                                    </Border>\r\n                                </Border>\r\n                            </Popup>\r\n                        </Grid>\r\n                        <Border Margin=\"0,0,11,0\" x:Name=\"MainPanelBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"0,0,0,0\" Padding=\"{TemplateBinding Padding}\" Background=\"{DynamicResource SelectedBackgroundBrush}\">\r\n                            <Grid>\r\n\r\n                                <DockPanel KeyboardNavigation.TabIndex=\"1\" KeyboardNavigation.TabNavigation=\"Local\">\r\n                                    <Thumb Padding=\"6,5,1,6\" Margin=\"-3,-1,0,0\" x:Name=\"ToolBarThumb\" Style=\"{StaticResource ToolBarThumbStyle}\" Width=\"10\"/>\r\n                                    <ContentPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" HorizontalAlignment=\"Center\" Margin=\"4,0,4,0\" x:Name=\"ToolBarHeader\" VerticalAlignment=\"Center\" ContentSource=\"Header\"/>\r\n                                    <ToolBarPanel SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Margin=\"0,1,2,2\" x:Name=\"PART_ToolBarPanel\" IsItemsHost=\"true\" Background=\"{DynamicResource SelectedBackgroundBrush}\"/>\r\n                                </DockPanel>\r\n                            </Grid>\r\n                        </Border>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsOverflowOpen\" Value=\"true\">\r\n                            <Setter Property=\"IsEnabled\" TargetName=\"ToolBarThumb\" Value=\"false\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"Header\" Value=\"{x:Null}\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"ToolBarHeader\" Value=\"Collapsed\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"ToolBarTray.IsLocked\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"ToolBarThumb\" Value=\"Collapsed\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"HasDropShadow\" SourceName=\"OverflowPopup\" Value=\"true\">\r\n                            <Setter Property=\"Margin\" TargetName=\"Shdw\" Value=\"0,0,5,5\"/>\r\n                            <Setter Property=\"SnapsToDevicePixels\" TargetName=\"Shdw\" Value=\"true\"/>\r\n                            <Setter Property=\"Background\" TargetName=\"Shdw\" Value=\"#71000000\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"Orientation\" Value=\"Vertical\">\r\n                            <Setter Property=\"Margin\" TargetName=\"Grid\" Value=\"1,3,1,1\"/>\r\n                            <Setter Property=\"Style\" TargetName=\"OverflowButton\" Value=\"{StaticResource ToolBarVerticalOverflowButtonStyle}\"/>\r\n                            <Setter Property=\"Height\" TargetName=\"ToolBarThumb\" Value=\"10\"/>\r\n                            <Setter Property=\"Width\" TargetName=\"ToolBarThumb\" Value=\"Auto\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"ToolBarThumb\" Value=\"-1,-3,0,0\"/>\r\n                            <Setter Property=\"Padding\" TargetName=\"ToolBarThumb\" Value=\"5,6,6,1\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"ToolBarHeader\" Value=\"0,0,0,4\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"PART_ToolBarPanel\" Value=\"1,0,2,2\"/>\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ToolBarThumb\" Value=\"Top\"/>\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ToolBarHeader\" Value=\"Top\"/>\r\n                            <Setter Property=\"HorizontalAlignment\" TargetName=\"OverflowGrid\" Value=\"Stretch\"/>\r\n                            <Setter Property=\"VerticalAlignment\" TargetName=\"OverflowGrid\" Value=\"Bottom\"/>\r\n                            <Setter Property=\"Placement\" TargetName=\"OverflowPopup\" Value=\"Right\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"MainPanelBorder\" Value=\"0,0,0,11\"/>\r\n                            <Setter Property=\"Background\" Value=\"{StaticResource ToolBarVerticalBackground}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <!--<Setter Property=\"Foreground\" Value=\"#FF000000\"/>-->\r\n    </Style>\r\n\r\n    <BorderGapMaskConverter x:Key=\"BorderGapMaskConverter\" />\r\n    <Style TargetType=\"{x:Type GroupBox}\">\r\n        <Setter Property=\"BorderBrush\" Value=\"#D5DFE5\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type GroupBox}\">\r\n                    <Grid SnapsToDevicePixels=\"true\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"6\" />\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"*\" />\r\n                            <ColumnDefinition Width=\"6\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\" />\r\n                            <RowDefinition Height=\"Auto\" />\r\n                            <RowDefinition Height=\"*\" />\r\n                            <RowDefinition Height=\"6\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Border Grid.ColumnSpan=\"4\" Grid.RowSpan=\"4\" Background=\"{DynamicResource LightBrush}\" CornerRadius=\"4,4,4,4\" BorderThickness=\"1,1,1,1\" />\r\n                        <Border Grid.ColumnSpan=\"4\" Grid.Row=\"1\" Grid.RowSpan=\"3\" BorderThickness=\"1,1,1,1\" CornerRadius=\"4\" BorderBrush=\"{DynamicResource NormalBorderBrush}\">\r\n                            <Border.OpacityMask>\r\n                                <MultiBinding Converter=\"{StaticResource BorderGapMaskConverter}\" ConverterParameter=\"7\">\r\n                                    <Binding Path=\"ActualWidth\" ElementName=\"Header\" />\r\n                                    <Binding Path=\"ActualWidth\" RelativeSource=\"{RelativeSource Self}\" />\r\n                                    <Binding Path=\"ActualHeight\" RelativeSource=\"{RelativeSource Self}\" />\r\n                                </MultiBinding>\r\n                            </Border.OpacityMask>\r\n                            <Border BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\">\r\n                                <Border.BorderBrush>\r\n                                    <SolidColorBrush Color=\"{DynamicResource MainColor}\" />\r\n                                </Border.BorderBrush>\r\n                                <Border BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\">\r\n                                    <Border.BorderBrush>\r\n                                        <SolidColorBrush Color=\"{DynamicResource MainColor}\" />\r\n                                    </Border.BorderBrush>\r\n                                </Border>\r\n                            </Border>\r\n                        </Border>\r\n                        <Border Grid.Column=\"0\" Grid.ColumnSpan=\"4\" Grid.Row=\"1\" Grid.RowSpan=\"3\" Background=\"{TemplateBinding Background}\" BorderBrush=\"Transparent\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"4\" />\r\n                        <Border Grid.ColumnSpan=\"4\" Grid.RowSpan=\"2\" Background=\"{DynamicResource NormalBrush}\" BorderThickness=\"1,1,1,0\" CornerRadius=\"2,2,0,0\" x:Name=\"Main\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" />\r\n                        <Rectangle Opacity=\"1\" Stroke=\"{x:Null}\" RadiusX=\"3\" RadiusY=\"3\" VerticalAlignment=\"Stretch\" Height=\"Auto\" x:Name=\"Shine\" Grid.ColumnSpan=\"4\" Grid.RowSpan=\"2\" Margin=\"1,1,1,1\">\r\n                            <Rectangle.Fill>\r\n                                <LinearGradientBrush EndPoint=\"0.5,0.971\" StartPoint=\"0.5,0.042\">\r\n                                    <GradientStop Color=\"#26FFFFFF\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"1\" />\r\n                                    <GradientStop Color=\"#26FFFFFF\" Offset=\"0.467\" />\r\n                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"0.475\" />\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n\r\n                        <Border x:Name=\"Header\" Grid.Column=\"1\" Grid.Row=\"0\" Grid.RowSpan=\"2\" Padding=\"3,1,3,0\">\r\n                            <ContentPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" ContentSource=\"Header\" RecognizesAccessKey=\"True\" Margin=\"0,4,0,4\" />\r\n                        </Border>\r\n\r\n                        <ContentPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Margin=\"{TemplateBinding Padding}\" Grid.Column=\"1\" Grid.ColumnSpan=\"2\" Grid.Row=\"2\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\">\r\n            <Setter.Value>\r\n                <SolidColorBrush Color=\"{DynamicResource WhiteColor}\" />\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <SolidColorBrush x:Key=\"ListBorder\" Color=\"#828790\" />\r\n    <Style x:Key=\"{x:Static GridView.GridViewScrollViewerStyleKey}\" TargetType=\"{x:Type ScrollViewer}\">\r\n        <Setter Property=\"Focusable\" Value=\"false\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ScrollViewer}\">\r\n                    <Grid SnapsToDevicePixels=\"true\" Background=\"{TemplateBinding Background}\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\" />\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"*\" />\r\n                            <RowDefinition Height=\"Auto\" />\r\n                        </Grid.RowDefinitions>\r\n                        <DockPanel Margin=\"{TemplateBinding Padding}\">\r\n                            <ScrollViewer Focusable=\"false\" DockPanel.Dock=\"Top\" HorizontalScrollBarVisibility=\"Hidden\" VerticalScrollBarVisibility=\"Hidden\">\r\n                                <GridViewHeaderRowPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Margin=\"2,0,2,0\" AllowsColumnReorder=\"{Binding Path=TemplatedParent.View.AllowsColumnReorder, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderContainerStyle=\"{Binding Path=TemplatedParent.View.ColumnHeaderContainerStyle, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderContextMenu=\"{Binding Path=TemplatedParent.View.ColumnHeaderContextMenu, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderTemplate=\"{Binding Path=TemplatedParent.View.ColumnHeaderTemplate, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderTemplateSelector=\"{Binding Path=TemplatedParent.View.ColumnHeaderTemplateSelector, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderToolTip=\"{Binding Path=TemplatedParent.View.ColumnHeaderToolTip, RelativeSource={RelativeSource TemplatedParent}}\" Columns=\"{Binding Path=TemplatedParent.View.Columns, RelativeSource={RelativeSource TemplatedParent}}\" />\r\n\r\n                            </ScrollViewer>\r\n                            <ScrollContentPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" x:Name=\"PART_ScrollContentPresenter\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" CanContentScroll=\"{TemplateBinding CanContentScroll}\" KeyboardNavigation.DirectionalNavigation=\"Local\" />\r\n                        </DockPanel>\r\n                        <ScrollBar Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Cursor=\"Arrow\" x:Name=\"PART_HorizontalScrollBar\" Grid.Row=\"1\" Orientation=\"Horizontal\" ViewportSize=\"{TemplateBinding ViewportWidth}\" Maximum=\"{TemplateBinding ScrollableWidth}\" Minimum=\"0.0\" Value=\"{Binding Path=HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" />\r\n                        <ScrollBar Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Cursor=\"Arrow\" x:Name=\"PART_VerticalScrollBar\" Grid.Column=\"1\" Orientation=\"Vertical\" ViewportSize=\"{TemplateBinding ViewportHeight}\" Maximum=\"{TemplateBinding ScrollableHeight}\" Minimum=\"0.0\" Value=\"{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" />\r\n                        <DockPanel Grid.Column=\"1\" Grid.Row=\"1\" Background=\"{Binding Path=Background, ElementName=PART_VerticalScrollBar}\" LastChildFill=\"false\">\r\n                            <Rectangle Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Width=\"1\" Fill=\"White\" DockPanel.Dock=\"Left\" />\r\n                            <Rectangle Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Height=\"1\" Fill=\"White\" DockPanel.Dock=\"Top\" />\r\n                        </DockPanel>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style TargetType=\"{x:Type ListView}\">\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource ShadeBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Foreground\" Value=\"#FF042271\" />\r\n        <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\" />\r\n        <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\" />\r\n        <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"true\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListView}\">\r\n                    <Border x:Name=\"Bd\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\" BorderBrush=\"{DynamicResource DefaultedBorderBrush}\" Background=\"{DynamicResource LightBrush}\">\r\n\r\n                        <ScrollViewer Padding=\"{TemplateBinding Padding}\" Style=\"{DynamicResource {x:Static GridView.GridViewScrollViewerStyleKey}}\">\r\n                            <ItemsPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" />\r\n                        </ScrollViewer>\r\n                    </Border>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                            <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Background\" TargetName=\"Bd\" Value=\"{DynamicResource {x:Static SystemColors.ControlBrushKey}}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"ListViewItemFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Rectangle Stroke=\"#8E6EA6F5\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" />\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type ListViewItem}\">\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{StaticResource ListViewItemFocusVisual}\" />\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Margin\" Value=\"0,0,0,1\" />\r\n        <Setter Property=\"Padding\" Value=\"5,2,5,2\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListViewItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedHoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedHoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedHoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedHoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Border SnapsToDevicePixels=\"true\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\" x:Name=\"border\">\r\n\r\n                        <Grid Margin=\"2,0,2,0\">\r\n                            <Rectangle x:Name=\"Background\"\r\n\t\t\t\t\t\t\tIsHitTestVisible=\"False\"\r\n\t\t\t\t\t\t\tFill=\"{StaticResource SelectedBackgroundBrush}\"\r\n\t\t\t\t\t\t\tRadiusX=\"0\"/>\r\n                            <Rectangle x:Name=\"SelectedRectangle\"\r\n\t\t\t\t\t\t\tIsHitTestVisible=\"False\"\r\n\t\t\t\t\t\t\tOpacity=\"0\"\r\n\t\t\t\t\t\t\tFill=\"{StaticResource NormalBrush}\"\r\n\t\t\t\t\t\t\tRadiusX=\"0\"/>\r\n                            <GridViewRowPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" VerticalAlignment=\"Stretch\" Margin=\"0,2,0,2\" />\r\n                            <Rectangle x:Name=\"HoverRectangle\"\r\n                            \tIsHitTestVisible=\"False\"\r\n                            \tFill=\"{StaticResource HoverBrush}\"\r\n                            \tRadiusX=\"0\"\r\n                            \tOpacity=\"0\"/>\r\n                            <Rectangle x:Name=\"SelectedHoverRectangle\"\r\n                            \tIsHitTestVisible=\"False\"\r\n                            \tFill=\"{StaticResource HoverBrush}\"\r\n                            \tRadiusX=\"0\"\r\n                            \tOpacity=\"0\"/>\r\n                        </Grid>\r\n\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsSelected\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOff}\" x:Name=\"SelectedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\" x:Name=\"SelectedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" x:Name=\"HoverOn_BeginStoryboard\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" />\r\n                                <Condition Property=\"Selector.IsSelected\" Value=\"False\" />\r\n                            </MultiTrigger.Conditions>\r\n\r\n                        </MultiTrigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedHoverOff}\" x:Name=\"SelectedHoverOff_BeginStoryboard\"/>\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedHoverOn}\" x:Name=\"SelectedHoverOn_BeginStoryboard\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"Selector.IsSelected\" Value=\"True\" />\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" />\r\n                            </MultiTrigger.Conditions>\r\n\r\n                        </MultiTrigger>\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsSelected\" Value=\"true\" />\r\n                                <Condition Property=\"Selector.IsSelectionActive\" Value=\"false\" />\r\n                            </MultiTrigger.Conditions>\r\n\r\n\r\n                        </MultiTrigger>\r\n\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n    </Style>\r\n\r\n\r\n    <Style x:Key=\"GridViewColumnHeaderGripper\" TargetType=\"{x:Type Thumb}\">\r\n        <Setter Property=\"Canvas.Right\" Value=\"-8.5\" />\r\n        <Setter Property=\"Width\" Value=\"18\" />\r\n        <Setter Property=\"Height\" Value=\"{Binding Path=ActualHeight, RelativeSource={RelativeSource TemplatedParent}}\" />\r\n        <Setter Property=\"Padding\" Value=\"0,3,0,4\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource LightBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <Border Padding=\"{TemplateBinding Padding}\" Background=\"#00FFFFFF\">\r\n                        <Rectangle HorizontalAlignment=\"Center\" Width=\"0.5\">\r\n                            <Rectangle.Fill>\r\n                                <SolidColorBrush Color=\"{DynamicResource WhiteColor}\" />\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"{x:Type GridViewColumnHeader}\" TargetType=\"{x:Type GridViewColumnHeader}\">\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource LightBrush}\" />\r\n        <Setter Property=\"Padding\" Value=\"2,0,2,0\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type GridViewColumnHeader}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Main\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.65\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Main\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid Margin=\"0,1,0,1\">\r\n                        <Grid>\r\n\r\n                            <Border x:Name=\"Main\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" CornerRadius=\"0,0,0,0\" />\r\n                            <Border x:Name=\"HoverBorder\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\" Background=\"{DynamicResource HoverBrush}\" BorderBrush=\"{x:Null}\" CornerRadius=\"0,0,0,0\" Opacity=\"0\" />\r\n\r\n                            <Border BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\">\r\n                                <Border.BorderBrush>\r\n                                    <SolidColorBrush Color=\"{DynamicResource WhiteColor}\"/>\r\n                                </Border.BorderBrush>\r\n                                <ContentPresenter VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" RecognizesAccessKey=\"True\" Margin=\"2,2,2,2\" />\r\n                            </Border>\r\n                        </Grid>\r\n                        <Canvas>\r\n                            <Thumb x:Name=\"PART_HeaderGripper\" Style=\"{StaticResource GridViewColumnHeaderGripper}\" HorizontalAlignment=\"Stretch\" />\r\n                        </Canvas>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"Height\" Value=\"Auto\">\r\n                            <Setter Property=\"MinHeight\" Value=\"20\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"Role\" Value=\"Padding\">\r\n                            <Setter TargetName=\"PART_HeaderGripper\" Property=\"Visibility\" Value=\"Collapsed\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"Role\" Value=\"Floating\">\r\n                            <Setter TargetName=\"PART_HeaderGripper\" Property=\"Visibility\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Background\" Value=\"Yellow\" />\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource MouseOverBrush}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"ButtonFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Rectangle SnapsToDevicePixels=\"true\" Margin=\"2\" Stroke=\"Black\" StrokeDashArray=\"1 2\" StrokeThickness=\"1\" />\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <LinearGradientBrush x:Key=\"ButtonNormalBackground\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#F3F3F3\" Offset=\"0\" />\r\n        <GradientStop Color=\"#EBEBEB\" Offset=\"0.5\" />\r\n        <GradientStop Color=\"#DDDDDD\" Offset=\"0.5\" />\r\n        <GradientStop Color=\"#CDCDCD\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"ButtonNormalBorder\" Color=\"#FF707070\" />\r\n\r\n    <Style TargetType=\"{x:Type ToggleButton}\">\r\n        <Style.Triggers>\r\n            <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n            </Trigger>\r\n        </Style.Triggers>\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{StaticResource ButtonFocusVisual}\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource SelectedBackgroundBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"2,2,2,2\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"Padding\" Value=\"1\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundAnimation\" Storyboard.TargetProperty=\"Opacity\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundAnimation\" Storyboard.TargetProperty=\"Opacity\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n\r\n                        <Border x:Name=\"Background\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"4,4,4,4\" Opacity=\"0.9\"/>\r\n                        <Border x:Name=\"CheckedBorder\" Opacity=\"0\" Background=\"{StaticResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"4\"/>\r\n                        <Border x:Name=\"BackgroundAnimation\" Opacity=\"0\" Background=\"{StaticResource HoverBrush}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"4\"/>\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" RecognizesAccessKey=\"True\" />\n                    </Grid>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsPressed\" Value=\"True\">\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" x:Name=\"HoverOn_BeginStoryboard\"/>\r\n\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\" />\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOff}\" x:Name=\"CheckedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOn}\" x:Name=\"CheckedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Background\" TargetName=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                            <Setter Property=\"BorderBrush\" TargetName=\"Background\" Value=\"{DynamicResource DisabledBorderBrush}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/ShinyDarkPurple/Theme.xaml",
    "content": "﻿<!--\r\n// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n-->\r\n\r\n<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n                    xmlns:basic=\"clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit\"\r\n                    xmlns:primitives=\"clr-namespace:Microsoft.Windows.Controls.Primitives;assembly=WPFToolkit\"\r\n                    xmlns:vsm=\"clr-namespace:System.Windows;assembly=WPFToolkit\">\r\n\r\n\r\n    <!--SHINY BLUE SETTINGS FOR CHARTS-->\r\n    <LinearGradientBrush x:Key=\"ShinyChartOrange\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFFDDBAE\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FFCE955A\" Offset=\"0.185\" />\r\n        <GradientStop Color=\"#FFAB7547\" Offset=\"0.475\" />\r\n        <GradientStop Color=\"#FF704D28\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n\r\n    <LinearGradientBrush x:Key=\"ShinyChartYellow\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFFFFF72\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FFC0C256\" Offset=\"0.17\" />\r\n        <GradientStop Color=\"#FFCAC64C\" Offset=\"0.49\" />\r\n        <GradientStop Color=\"#FF8F8832\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ShinyChartCyan\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFBBF4FD\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FF62B8BC\" Offset=\"0.185\" />\r\n        <GradientStop Color=\"#FF5A9399\" Offset=\"0.475\" />\r\n        <GradientStop Color=\"#FF355E60\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ShinyChartGreen\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFBAF9DA\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FF62BC8A\" Offset=\"0.185\" />\r\n        <GradientStop Color=\"#FF5A996D\" Offset=\"0.475\" />\r\n        <GradientStop Color=\"#FF35603A\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n\r\n    <LinearGradientBrush x:Key=\"ChartBorder\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFBBBBBB\" />\r\n        <GradientStop Color=\"#FF737373\" Offset=\"0.160\" />\r\n        <GradientStop Color=\"#FF646464\" Offset=\"0.162\" />\r\n        <GradientStop Color=\"#FF000000\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ShinyBackground\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFBBBBBB\" />\r\n        <GradientStop Color=\"#FF000000\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"PlotAreaBrush\" EndPoint=\"0.5,0.987\" StartPoint=\"0.5,0.03\">\r\n        <GradientStop Color=\"#FFFFFFFF\"/>\r\n        <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\"/>\r\n        <GradientStop Color=\"#FEDBDBDB\" Offset=\"0.196\"/>\r\n        <GradientStop Color=\"#FEE7E7E7\" Offset=\"0.121\"/>\r\n        <GradientStop Color=\"#FEF4F4F4\" Offset=\"0.058\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <Color x:Key=\"ShinyTopGradientOrange\">#FFFDDBAE</Color>\r\n    <Color x:Key=\"ShinyBottomGradientOrange\">#FF704D28</Color>\r\n    <RadialGradientBrush x:Key=\"ShinyPieDataPointBrushOrange\">\r\n        <RadialGradientBrush.RelativeTransform>\r\n            <TransformGroup>\r\n                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2.09\" ScaleY=\"1.819\"/>\r\n                <SkewTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n                <RotateTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n                <TranslateTransform X=\"-0.425\" Y=\"-0.486\"/>\r\n            </TransformGroup>\r\n        </RadialGradientBrush.RelativeTransform>\r\n        <GradientStop Color=\"{StaticResource ShinyTopGradientOrange}\"/>\r\n        <GradientStop Color=\"{StaticResource ShinyBottomGradientOrange}\" Offset=\"1\"/>\r\n    </RadialGradientBrush>\r\n\r\n\r\n    <Color x:Key=\"ShinyTopGradientYellow\">#FFFFFF72</Color>\r\n    <Color x:Key=\"ShinyBottomGradientYellow\">#FF8F8832</Color>\r\n    <RadialGradientBrush x:Key=\"ShinyPieDataPointBrushYellow\">\r\n        <RadialGradientBrush.RelativeTransform>\r\n            <TransformGroup>\r\n                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2.09\" ScaleY=\"1.819\"/>\r\n                <SkewTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n                <RotateTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n                <TranslateTransform X=\"-0.425\" Y=\"-0.486\"/>\r\n            </TransformGroup>\r\n        </RadialGradientBrush.RelativeTransform>\r\n        <GradientStop Color=\"{StaticResource ShinyTopGradientYellow}\"/>\r\n        <GradientStop Color=\"{StaticResource ShinyBottomGradientYellow}\" Offset=\"1\"/>\r\n    </RadialGradientBrush>\r\n\r\n    <Color x:Key=\"ShinyTopGradientCyan\">#FFBBF4FD</Color>\r\n    <Color x:Key=\"ShinyBottomGradientCyan\">#FF355E60</Color>\r\n    <RadialGradientBrush x:Key=\"ShinyPieDataPointBrushCyan\">\r\n        <RadialGradientBrush.RelativeTransform>\r\n            <TransformGroup>\r\n                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2.09\" ScaleY=\"1.819\"/>\r\n                <SkewTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n                <RotateTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n                <TranslateTransform X=\"-0.425\" Y=\"-0.486\"/>\r\n            </TransformGroup>\r\n        </RadialGradientBrush.RelativeTransform>\r\n        <GradientStop Color=\"{StaticResource ShinyTopGradientCyan}\"/>\r\n        <GradientStop Color=\"{StaticResource ShinyBottomGradientCyan}\" Offset=\"1\"/>\r\n    </RadialGradientBrush>\r\n\r\n    <Color x:Key=\"ShinyTopGradientGreen\">#FFBAF9DA</Color>\r\n    <Color x:Key=\"ShinyBottomGradientGreen\">#FF35603A</Color>\r\n    <RadialGradientBrush x:Key=\"ShinyPieDataPointBrushGreen\">\r\n        <RadialGradientBrush.RelativeTransform>\r\n            <TransformGroup>\r\n                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2.09\" ScaleY=\"1.819\"/>\r\n                <SkewTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n                <RotateTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n                <TranslateTransform X=\"-0.425\" Y=\"-0.486\"/>\r\n            </TransformGroup>\r\n        </RadialGradientBrush.RelativeTransform>\r\n        <GradientStop Color=\"{StaticResource ShinyTopGradientGreen}\"/>\r\n        <GradientStop Color=\"{StaticResource ShinyBottomGradientGreen}\" Offset=\"1\"/>\r\n    </RadialGradientBrush>\r\n\r\n\r\n    <!--SHINY DARK PURPLE-->\r\n    <Color x:Key=\"TextBrush\">#FF000000</Color>\r\n\r\n\r\n    <Color x:Key=\"NormalBrushGradient1\">#FFFFFFFF</Color>\r\n    <Color x:Key=\"NormalBrushGradient2\">#FFCFBDDA</Color>\r\n    <Color x:Key=\"NormalBrushGradient3\">#FF9B86A8</Color>\r\n    <Color x:Key=\"NormalBrushGradient4\">#FF55465F</Color>\r\n\r\n\r\n\r\n    <Color x:Key=\"NormalBorderBrushGradient1\">#FFBBBBBB</Color>\r\n    <Color x:Key=\"NormalBorderBrushGradient2\">#FF737373</Color>\r\n    <Color x:Key=\"NormalBorderBrushGradient3\">#FF646464</Color>\r\n    <Color x:Key=\"NormalBorderBrushGradient4\">#FF000000</Color>\r\n\r\n    <Color x:Key=\"SelectedBackgroundGradient1\">#FFBBBBBB</Color>\r\n    <Color x:Key=\"SelectedBackgroundGradient2\">#FF737373</Color>\r\n    <Color x:Key=\"SelectedBackgroundGradient3\">#FF646464</Color>\r\n    <Color x:Key=\"SelectedBackgroundGradient4\">#FFA1A1A1</Color>\r\n\r\n    <Color x:Key=\"SliderBorderGradient1\">#FF3F3F3F</Color>\r\n    <Color x:Key=\"SliderBorderGradient2\">#FFADADAD</Color>\r\n\r\n    <Color x:Key=\"ShadeBrushGradient1\">#FF62676A</Color>\r\n    <Color x:Key=\"ShadeBrushGradient2\">#FFD1D4D6</Color>\r\n    <Color x:Key=\"ShadeBrushGradient3\">#FFFFFFFF</Color>\r\n\r\n    <Color x:Key=\"WindowBackgroundBrushGradient1\">#FFD1D1D1</Color>\r\n    <Color x:Key=\"WindowBackgroundBrushGradient2\">#FF8496AA</Color>\r\n\r\n\r\n    <LinearGradientBrush x:Key=\"NormalBrush\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource NormalBrushGradient1}\"\r\n                  Offset=\"0\" />\r\n        <GradientStop Color=\"{StaticResource NormalBrushGradient2}\"\r\n                  Offset=\"0.41800001263618469\" />\r\n        <GradientStop Color=\"{StaticResource NormalBrushGradient3}\"\r\n                  Offset=\"0.418\" />\r\n        <GradientStop Color=\"{StaticResource NormalBrushGradient4}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"NormalBorderBrush\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource NormalBorderBrushGradient1}\" />\r\n        <GradientStop Color=\"{StaticResource NormalBorderBrushGradient2}\"\r\n                  Offset=\"0.38\" />\r\n        <GradientStop Color=\"{StaticResource NormalBorderBrushGradient3}\"\r\n                  Offset=\"0.384\" />\r\n        <GradientStop Color=\"{StaticResource NormalBorderBrushGradient4}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <RadialGradientBrush x:Key=\"HoverBrush\">\r\n        <RadialGradientBrush.RelativeTransform>\r\n            <TransformGroup>\r\n                <ScaleTransform CenterX=\"0.5\"\r\n                        CenterY=\"0.5\"\r\n                        ScaleX=\"1.804\"\r\n                        ScaleY=\"0.743\" />\r\n                <SkewTransform CenterX=\"0.5\"\r\n                       CenterY=\"0.5\" />\r\n                <RotateTransform CenterX=\"0.5\"\r\n                         CenterY=\"0.5\" />\r\n                <TranslateTransform Y=\"0.47999998927116394\" />\r\n            </TransformGroup>\r\n        </RadialGradientBrush.RelativeTransform>\r\n        <GradientStop Color=\"#FF98DAFF\"\r\n                  Offset=\"0.209\" />\r\n        <GradientStop Color=\"#0098DAFF\"\r\n                  Offset=\"1\" />\r\n        <GradientStop Color=\"#FFFFFFFF\"\r\n                  Offset=\"0\" />\r\n    </RadialGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"CheckIconBrush\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FF006CD1\" />\r\n        <GradientStop Color=\"#FFA5D6F9\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ShadeBrush\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient2}\"\r\n                  Offset=\"0\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"0.1\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ShadeBrushTop\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient2}\"\r\n                  Offset=\"0\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"0.1\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ShadeBrushBottom\"\r\n                       EndPoint=\"0.5,0\"\r\n                       StartPoint=\"0.5,1\">\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient2}\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"0.1\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ShadeBrushLeft\"\r\n                       EndPoint=\"1,0.5\"\r\n                       StartPoint=\"0,0.5\">\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient2}\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"0.1\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ShadeBrushRight\"\r\n                       EndPoint=\"0,0.5\"\r\n                       StartPoint=\"1,0.5\">\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient2}\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"0.1\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"DisabledBackgroundBrush\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFFFFFFF\" />\r\n        <GradientStop Color=\"#FF62676A\"\r\n                  Offset=\"1\" />\r\n        <GradientStop Color=\"#FFD1D4D6\"\r\n                  Offset=\"0.41800001263618469\" />\r\n        <GradientStop Color=\"#FFA9AFB5\"\r\n                  Offset=\"0.425\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"SelectedBackgroundBrush\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient1}\" />\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient2}\"\r\n                  Offset=\"0.38\" />\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient3}\"\r\n                  Offset=\"0.384\" />\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient4}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"SelectedBackgroundBrushVertical\"\r\n                       EndPoint=\"2.05,0.5\"\r\n                       StartPoint=\"-0.55,0.5\">\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient1}\" />\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient2}\"\r\n                  Offset=\"0.37999999523162842\" />\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient3}\"\r\n                  Offset=\"0.38400000333786011\" />\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient4}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"HorizontalSliderBorderBrush\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource SliderBorderGradient1}\" />\r\n        <GradientStop Color=\"{StaticResource SliderBorderGradient2}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"VerticalSliderBorderBrush\"\r\n                       EndPoint=\"1.35,0.5\"\r\n                       StartPoint=\"0.6,0.5\">\r\n        <GradientStop Color=\"{StaticResource SliderBorderGradient1}\" />\r\n        <GradientStop Color=\"{StaticResource SliderBorderGradient2}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"WindowBackgroundBrush\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource WindowBackgroundBrushGradient1}\" />\r\n        <GradientStop Color=\"{StaticResource WindowBackgroundBrushGradient2}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <!--Button-->\r\n    <Style TargetType=\"Button\">\r\n        <Setter Property=\"Background\"\r\n            Value=\"{StaticResource NormalBrush}\"/>\r\n        <Setter Property=\"Foreground\"\r\n            Value=\"#FFFFFFFF\"/>\r\n        <Setter Property=\"Padding\"\r\n            Value=\"3\"/>\r\n        <Setter Property=\"BorderThickness\"\r\n            Value=\"2\"/>\r\n        <Setter Property=\"BorderBrush\"\r\n            Value=\"{StaticResource NormalBorderBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Button\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                        To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                        To=\"Pressed\"/>\r\n                                    <VisualTransition From=\"Normal\"\r\n                                        GeneratedDuration=\"00:00:00.3000000\"\r\n                                        To=\"MouseOver\"/>\r\n                                    <VisualTransition From=\"MouseOver\"\r\n                                        GeneratedDuration=\"00:00:00.5000000\"\r\n                                        To=\"Normal\"/>\r\n                                    <VisualTransition From=\"Pressed\"\r\n                                        GeneratedDuration=\"00:00:00.5000000\"\r\n                                        To=\"MouseOver\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Hover\"\r\n                                                   Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"Background\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"0.7\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.65\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"Background\"\r\n                    Background=\"{TemplateBinding Background}\"\r\n                    BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                    BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                    CornerRadius=\"2,2,2,2\">\r\n                            <Border x:Name=\"Hover\"\r\n                      Background=\"{StaticResource HoverBrush}\"\r\n                      CornerRadius=\"2,2,2,2\"\r\n                      Height=\"Auto\"\r\n                      Width=\"Auto\"\r\n                      Opacity=\"0\"/>\r\n                        </Border>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                              Margin=\"{TemplateBinding Padding}\"\r\n                              x:Name=\"contentPresenter\"\r\n                              VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                              Content=\"{TemplateBinding Content}\"\r\n                              ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                        <Border x:Name=\"DisabledVisualElement\"\r\n                    IsHitTestVisible=\"false\"\r\n                    Opacity=\"0\"\r\n                    Background=\"{StaticResource DisabledBackgroundBrush}\"\r\n                    CornerRadius=\"2,2,2,2\"/>\r\n                        <Border x:Name=\"FocusVisualElement\"\r\n                    IsHitTestVisible=\"false\"\r\n                    Visibility=\"Collapsed\"\r\n                    BorderBrush=\"{StaticResource HoverBrush}\"\r\n                    BorderThickness=\"2,2,2,2\"\r\n                    CornerRadius=\"2,2,2,2\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--Checkbox-->\r\n    <Style  TargetType=\"CheckBox\">\r\n        <Setter Property=\"Background\"\r\n            Value=\"{StaticResource NormalBrush}\"/>\r\n        <Setter Property=\"Foreground\"\r\n            Value=\"Black\" />\r\n        <Setter Property=\"HorizontalContentAlignment\"\r\n            Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\"\r\n            Value=\"Top\"/>\r\n        <Setter Property=\"Padding\"\r\n            Value=\"4,1,0,0\"/>\r\n        <Setter Property=\"BorderThickness\"\r\n            Value=\"2\"/>\r\n        <Setter Property=\"BorderBrush\"\r\n            Value=\"{StaticResource NormalBorderBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"CheckBox\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                        To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                        To=\"Pressed\"/>\r\n                                    <VisualTransition From=\"Normal\"\r\n                                        GeneratedDuration=\"00:00:00.3000000\"\r\n                                        To=\"MouseOver\"/>\r\n                                    <VisualTransition From=\"MouseOver\"\r\n                                        GeneratedDuration=\"00:00:00.5000000\"\r\n                                        To=\"Normal\"/>\r\n                                    <VisualTransition From=\"Pressed\"\r\n                                        GeneratedDuration=\"00:00:00.5000000\"\r\n                                        To=\"MouseOver\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundOverlay\"\r\n                                                   Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"CheckIcon\"\r\n                                                   Storyboard.TargetProperty=\"(Shape.StrokeThickness)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"0.3\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"Background\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"0.7\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.65\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition From=\"Checked\"\r\n                                        GeneratedDuration=\"00:00:00.5000000\"\r\n                                        To=\"Unchecked\"/>\r\n                                    <VisualTransition From=\"Unchecked\"\r\n                                        GeneratedDuration=\"00:00:00.3000000\"\r\n                                        To=\"Checked\"/>\r\n                                    <VisualTransition From=\"Checked\"\r\n                                        GeneratedDuration=\"00:00:00.3000000\"\r\n                                        To=\"Indeterminate\"/>\r\n                                    <VisualTransition From=\"Indeterminate\"\r\n                                        GeneratedDuration=\"00:00:00.5000000\"\r\n                                        To=\"Unchecked\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"CheckIcon\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\"/>\r\n                                <VisualState x:Name=\"Indeterminate\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"IndeterminateIcon\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"16\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid HorizontalAlignment=\"Left\"\r\n                  VerticalAlignment=\"Top\">\r\n                            <Rectangle Height=\"14\"\r\n                         Margin=\"1\"\r\n                         x:Name=\"Background\"\r\n                         Width=\"14\"\r\n                         Fill=\"{TemplateBinding Background}\"\r\n                         Stroke=\"{TemplateBinding BorderBrush}\"\r\n                         StrokeThickness=\"{TemplateBinding BorderThickness}\"\r\n                         RadiusX=\"1\"\r\n                         RadiusY=\"1\"/>\r\n                            <Rectangle Height=\"12\"\r\n                         x:Name=\"BackgroundOverlay\"\r\n                         Width=\"12\"\r\n                         Opacity=\"0\"\r\n                         Fill=\"{StaticResource HoverBrush}\"\r\n                         Stroke=\"{x:Null}\"\r\n                         StrokeThickness=\"1\"\r\n                         RadiusX=\"1\"\r\n                         RadiusY=\"1\"/>\r\n\r\n                            <Path x:Name=\"CheckIcon\"\r\n                    Stretch=\"Fill\"\r\n                    Data=\"M102.03442,598.79645 L105.22962,597.78918 L106.95686,599.19977 C106.95686,599.19977 113.77958,590.53656 113.77958,590.53656 C113.77958,590.53656 107.40649,603.79431 107.40649,603.79431 z\"\r\n                    Opacity=\"0\"\r\n                    Fill=\"#FFFFFFFF\"\r\n                    Height=\"10\"\r\n                    Width=\"10.5\"\r\n                    Stroke=\"{StaticResource CheckIconBrush}\"\r\n                    StrokeThickness=\"0\"/>\r\n\r\n                            <Rectangle Height=\"9\"\r\n                         x:Name=\"IndeterminateIcon\"\r\n                         Width=\"9\"\r\n                         Opacity=\"0\"\r\n                         Fill=\"#FFFFFFFF\"\r\n                         Stroke=\"{StaticResource CheckIconBrush}\"\r\n                         RadiusX=\"1\"\r\n                         RadiusY=\"1\"/>\r\n                            <Rectangle Height=\"14\"\r\n                         x:Name=\"DisabledVisualElement\"\r\n                         Width=\"14\"\r\n                         Opacity=\"0\"\r\n                         Fill=\"{StaticResource DisabledBackgroundBrush}\"\r\n                         RadiusX=\"1\"\r\n                         RadiusY=\"1\"/>\r\n                            <Rectangle Height=\"16\"\r\n                         x:Name=\"ContentFocusVisualElement\"\r\n                         Width=\"16\"\r\n                         IsHitTestVisible=\"false\"\r\n                         Opacity=\"0\"\r\n                         Stroke=\"{StaticResource HoverBrush}\"\r\n                         StrokeThickness=\"1\"\r\n                         RadiusX=\"2\"\r\n                         RadiusY=\"2\"/>\r\n                        </Grid>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                              Margin=\"{TemplateBinding Padding}\"\r\n                              x:Name=\"contentPresenter\"\r\n                              VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                              Grid.Column=\"1\"\r\n                              Content=\"{TemplateBinding Content}\"\r\n                              ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--RadioButton-->\r\n    <Style TargetType=\"RadioButton\">\r\n        <Setter Property=\"Background\"\r\n            Value=\"{StaticResource NormalBrush}\"/>\r\n        <Setter Property=\"Foreground\"\r\n            Value=\"Black\" />\r\n        <Setter Property=\"HorizontalContentAlignment\"\r\n            Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\"\r\n            Value=\"Top\"/>\r\n        <Setter Property=\"Padding\"\r\n            Value=\"4,1,0,0\"/>\r\n        <Setter Property=\"BorderThickness\"\r\n            Value=\"2\"/>\r\n        <Setter Property=\"BorderBrush\"\r\n            Value=\"{StaticResource NormalBorderBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"RadioButton\">\r\n                    <Grid>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"16\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                        To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                        To=\"Pressed\"/>\r\n                                    <VisualTransition From=\"Normal\"\r\n                                        GeneratedDuration=\"00:00:00.3000000\"\r\n                                        To=\"MouseOver\"/>\r\n                                    <VisualTransition From=\"MouseOver\"\r\n                                        GeneratedDuration=\"00:00:00.5000000\"\r\n                                        To=\"Normal\"/>\r\n                                    <VisualTransition From=\"Pressed\"\r\n                                        GeneratedDuration=\"00:00:00.5000000\"\r\n                                        To=\"MouseOver\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundOverlay\"\r\n                                                   Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.35\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"Background\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"0.7\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.65\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition From=\"Checked\"\r\n                                        GeneratedDuration=\"00:00:00.5000000\"\r\n                                        To=\"Unchecked\"/>\r\n                                    <VisualTransition From=\"Unchecked\"\r\n                                        GeneratedDuration=\"00:00:00.3000000\"\r\n                                        To=\"Checked\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"CheckIcon\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"CheckIcon\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"0\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid HorizontalAlignment=\"Left\"\r\n                  VerticalAlignment=\"Top\">\r\n                            <Ellipse Height=\"14\"\r\n                       Margin=\"1\"\r\n                       x:Name=\"Background\"\r\n                       Width=\"14\"\r\n                       Fill=\"{StaticResource NormalBrush}\"\r\n                       Stroke=\"{TemplateBinding BorderBrush}\"\r\n                       StrokeThickness=\"{TemplateBinding BorderThickness}\"/>\r\n                            <Ellipse Height=\"12\"\r\n                       x:Name=\"BackgroundOverlay\"\r\n                       Width=\"12\"\r\n                       Opacity=\"0\"\r\n                       Fill=\"#FFC4DBEE\"\r\n                       Stroke=\"#00000000\"\r\n                       Margin=\"2,2,2,2\"\r\n                       StrokeThickness=\"0\"/>\r\n                            <Border HorizontalAlignment=\"Center\"\r\n                      VerticalAlignment=\"Center\"\r\n                      Width=\"6\"\r\n                      Height=\"6\"\r\n                      CornerRadius=\"1,1,1,1\"\r\n                      BorderThickness=\"1,1,1,1\"\r\n                      Background=\"#FFFFFFFF\"\r\n                      x:Name=\"CheckIcon\"\r\n                      BorderBrush=\"{StaticResource CheckIconBrush}\"\r\n                      Opacity=\"0\"/>\r\n                            <Ellipse Height=\"14\"\r\n                       x:Name=\"DisabledVisualElement\"\r\n                       Width=\"14\"\r\n                       Opacity=\"0\"\r\n                       Fill=\"{StaticResource DisabledBackgroundBrush}\"/>\r\n                            <Ellipse Height=\"16\"\r\n                       x:Name=\"ContentFocusVisualElement\"\r\n                       Width=\"16\"\r\n                       IsHitTestVisible=\"false\"\r\n                       Opacity=\"0\"\r\n                       Stroke=\"{StaticResource HoverBrush}\"\r\n                       StrokeThickness=\"1\"/>\r\n                        </Grid>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                              Margin=\"{TemplateBinding Padding}\"\r\n                              x:Name=\"contentPresenter\"\r\n                              VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                              Grid.Column=\"1\"\r\n                              Content=\"{TemplateBinding Content}\"\r\n                              ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--ScrollBar-->\r\n    <Style  TargetType=\"ScrollBar\">\r\n        <Setter Property=\"MinWidth\"\r\n            Value=\"17\" />\r\n        <Setter Property=\"MinHeight\"\r\n            Value=\"17\" />\r\n        <Setter Property=\"IsTabStop\"\r\n            Value=\"False\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ScrollBar\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <Grid.Resources>\r\n                            <ControlTemplate x:Key=\"RepeatButtonTemplate\"\r\n                               TargetType=\"RepeatButton\">\r\n                                <Grid x:Name=\"Root\"\r\n                      Background=\"Transparent\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualState x:Name=\"Normal\" />\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"HorizontalIncrementTemplate\"\r\n                               TargetType=\"RepeatButton\">\r\n                                <Grid x:Name=\"Root\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0:0:0.1\"\r\n                                              To=\"MouseOver\" />\r\n                                                <VisualTransition GeneratedDuration=\"0:0:0.1\"\r\n                                              To=\"Pressed\" />\r\n                                                <VisualTransition From=\"Normal\"\r\n                                              GeneratedDuration=\"00:00:00.3000000\"\r\n                                              To=\"MouseOver\" />\r\n                                                <VisualTransition From=\"MouseOver\"\r\n                                              GeneratedDuration=\"00:00:00.5000000\"\r\n                                              To=\"Normal\" />\r\n                                                <VisualTransition From=\"Pressed\"\r\n                                              GeneratedDuration=\"00:00:00.5000000\"\r\n                                              To=\"MouseOver\" />\r\n                                                <VisualTransition From=\"MouseOver\"\r\n                                              GeneratedDuration=\"00:00:00.3000000\"\r\n                                              To=\"Pressed\" />\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\" />\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\"\r\n                                                  Value=\"1\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundAnimation\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\"\r\n                                                  Value=\"1\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\"\r\n                                                  Value=\"0.7\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledElement\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\"\r\n                                                  Value=\"0.65\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Rectangle x:Name=\"Background\"\r\n                             Fill=\"{StaticResource NormalBrush}\"\r\n                             StrokeThickness=\"2\"\r\n                             RadiusX=\"2\"\r\n                             RadiusY=\"2\"\r\n                             Stroke=\"{StaticResource NormalBorderBrush}\" />\r\n                                    <Rectangle x:Name=\"BackgroundAnimation\"\r\n                             Opacity=\"0\"\r\n                             Fill=\"{StaticResource HoverBrush}\"\r\n                             Stroke=\"{x:Null}\"\r\n                             StrokeThickness=\"0\"\r\n                             RadiusX=\"1\"\r\n                             RadiusY=\"1\"\r\n                             Margin=\"2,2,2,2\" />\r\n                                    <Path Height=\"8\"\r\n                        Width=\"4\"\r\n                        Stretch=\"Uniform\"\r\n                        Data=\"F1 M 511.047,352.682L 511.047,342.252L 517.145,347.467L 511.047,352.682 Z \">\r\n                                        <Path.Fill>\r\n                                            <SolidColorBrush Color=\"#FFFFFFFF\"\r\n                                       x:Name=\"ButtonColor\" />\r\n                                        </Path.Fill>\r\n                                    </Path>\r\n                                    <Rectangle x:Name=\"DisabledElement\"\r\n                             Opacity=\"0\"\r\n                             Fill=\"{StaticResource DisabledBackgroundBrush}\"\r\n                             RadiusX=\"3\"\r\n                             RadiusY=\"3\" />\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"HorizontalDecrementTemplate\"\r\n                               TargetType=\"RepeatButton\">\r\n                                <Grid x:Name=\"Root\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0:0:0.1\"\r\n                                              To=\"MouseOver\" />\r\n                                                <VisualTransition GeneratedDuration=\"0:0:0.1\"\r\n                                              To=\"Pressed\" />\r\n                                                <VisualTransition From=\"Normal\"\r\n                                              GeneratedDuration=\"00:00:00.3000000\"\r\n                                              To=\"MouseOver\" />\r\n                                                <VisualTransition From=\"MouseOver\"\r\n                                              GeneratedDuration=\"00:00:00.5000000\"\r\n                                              To=\"Normal\" />\r\n                                                <VisualTransition From=\"Pressed\"\r\n                                              GeneratedDuration=\"00:00:00.5000000\"\r\n                                              To=\"MouseOver\" />\r\n                                                <VisualTransition From=\"MouseOver\"\r\n                                              GeneratedDuration=\"00:00:00.3000000\"\r\n                                              To=\"Pressed\" />\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\" />\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundMouseOver\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\"\r\n                                                  Value=\"1\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\"\r\n                                                  Value=\"0.7\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledElement\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\"\r\n                                                  Value=\"0.65\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Rectangle x:Name=\"Background\"\r\n                             Fill=\"{StaticResource NormalBrush}\"\r\n                             StrokeThickness=\"2\"\r\n                             RadiusX=\"2\"\r\n                             RadiusY=\"2\"\r\n                             Stroke=\"{StaticResource NormalBorderBrush}\" />\r\n                                    <Rectangle x:Name=\"BackgroundMouseOver\"\r\n                             Opacity=\"0\"\r\n                             Fill=\"{StaticResource HoverBrush}\"\r\n                             Stroke=\"{x:Null}\"\r\n                             StrokeThickness=\"0\"\r\n                             RadiusX=\"1\"\r\n                             RadiusY=\"1\"\r\n                             Margin=\"2,2,2,2\" />\r\n                                    <Path Height=\"8\"\r\n                        Width=\"4\"\r\n                        Stretch=\"Uniform\"\r\n                        Data=\"F1 M 110.692,342.252L 110.692,352.682L 104.594,347.467L 110.692,342.252 Z \">\r\n                                        <Path.Fill>\r\n                                            <SolidColorBrush Color=\"#FFFFFFFF\"\r\n                                       x:Name=\"ButtonColor\" />\r\n                                        </Path.Fill>\r\n                                    </Path>\r\n                                    <Rectangle x:Name=\"DisabledElement\"\r\n                             Opacity=\"0\"\r\n                             Fill=\"{StaticResource DisabledBackgroundBrush}\"\r\n                             RadiusX=\"3\"\r\n                             RadiusY=\"3\" />\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"VerticalIncrementTemplate\"\r\n                               TargetType=\"RepeatButton\">\r\n                                <Grid x:Name=\"Root\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0:0:0.1\"\r\n                                              To=\"MouseOver\" />\r\n                                                <VisualTransition GeneratedDuration=\"0:0:0.1\"\r\n                                              To=\"Pressed\" />\r\n                                                <VisualTransition From=\"Normal\"\r\n                                              GeneratedDuration=\"00:00:00.3000000\"\r\n                                              To=\"MouseOver\" />\r\n                                                <VisualTransition From=\"MouseOver\"\r\n                                              GeneratedDuration=\"00:00:00.5000000\"\r\n                                              To=\"Normal\" />\r\n                                                <VisualTransition From=\"Pressed\"\r\n                                              GeneratedDuration=\"00:00:00.5000000\"\r\n                                              To=\"MouseOver\" />\r\n                                                <VisualTransition From=\"MouseOver\"\r\n                                              GeneratedDuration=\"00:00:00.3000000\"\r\n                                              To=\"Pressed\" />\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\" />\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundMouseOver\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\"\r\n                                                  Value=\"1\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\"\r\n                                                  Value=\"0.7\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledElement\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\"\r\n                                                  Value=\"0.65\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Rectangle x:Name=\"Background\"\r\n                             Fill=\"{StaticResource NormalBrush}\"\r\n                             StrokeThickness=\"2\"\r\n                             RadiusX=\"2\"\r\n                             RadiusY=\"2\"\r\n                             Stroke=\"{StaticResource NormalBorderBrush}\" />\r\n                                    <Rectangle x:Name=\"BackgroundMouseOver\"\r\n                             Opacity=\"0\"\r\n                             Fill=\"{StaticResource HoverBrush}\"\r\n                             Stroke=\"{x:Null}\"\r\n                             RadiusX=\"1\"\r\n                             RadiusY=\"1\"\r\n                             StrokeThickness=\"0\"\r\n                             Margin=\"2,2,2,2\" />\r\n                                    <Path Height=\"4\"\r\n                        Width=\"8\"\r\n                        Stretch=\"Uniform\"\r\n                        Data=\"F1 M 531.107,321.943L 541.537,321.943L 536.322,328.042L 531.107,321.943 Z \">\r\n                                        <Path.Fill>\r\n                                            <SolidColorBrush Color=\"#FFFFFFFF\"\r\n                                       x:Name=\"ButtonColor\" />\r\n                                        </Path.Fill>\r\n                                    </Path>\r\n                                    <Rectangle x:Name=\"DisabledElement\"\r\n                             Opacity=\"0\"\r\n                             Fill=\"{StaticResource DisabledBackgroundBrush}\"\r\n                             RadiusX=\"3\"\r\n                             RadiusY=\"3\" />\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"VerticalDecrementTemplate\"\r\n                               TargetType=\"RepeatButton\">\r\n                                <Grid x:Name=\"Root\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0:0:0.1\"\r\n                                              To=\"MouseOver\" />\r\n                                                <VisualTransition GeneratedDuration=\"0:0:0.1\"\r\n                                              To=\"Pressed\" />\r\n                                                <VisualTransition From=\"Normal\"\r\n                                              GeneratedDuration=\"00:00:00.3000000\"\r\n                                              To=\"MouseOver\" />\r\n                                                <VisualTransition From=\"MouseOver\"\r\n                                              GeneratedDuration=\"00:00:00.5000000\"\r\n                                              To=\"Normal\" />\r\n                                                <VisualTransition From=\"Pressed\"\r\n                                              GeneratedDuration=\"00:00:00.5000000\"\r\n                                              To=\"MouseOver\" />\r\n                                                <VisualTransition From=\"MouseOver\"\r\n                                              GeneratedDuration=\"00:00:00.3000000\"\r\n                                              To=\"Pressed\" />\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\" />\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\"\r\n                                                  Value=\"1\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundMouseOver\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\"\r\n                                                  Value=\"1\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                         Duration=\"00:00:00.0010000\"\r\n                                                         Storyboard.TargetName=\"Background\"\r\n                                                         Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                                  Value=\"0.7\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledElement\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\"\r\n                                                  Value=\"0.65\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Rectangle x:Name=\"Background\"\r\n                             Fill=\"{StaticResource NormalBrush}\"\r\n                             StrokeThickness=\"2\"\r\n                             RadiusX=\"2\"\r\n                             RadiusY=\"2\"\r\n                             Stroke=\"{StaticResource NormalBorderBrush}\" />\r\n                                    <Rectangle x:Name=\"BackgroundMouseOver\"\r\n                             Fill=\"{StaticResource HoverBrush}\"\r\n                             Stroke=\"{x:Null}\"\r\n                             RadiusX=\"1\"\r\n                             RadiusY=\"1\"\r\n                             Margin=\"2,2,2,2\"\r\n                             Opacity=\"1\" />\r\n                                    <Path Height=\"4\"\r\n                        Width=\"8\"\r\n                        Stretch=\"Uniform\"\r\n                        Data=\"F1 M 541.537,173.589L 531.107,173.589L 536.322,167.49L 541.537,173.589 Z \">\r\n                                        <Path.Fill>\r\n                                            <SolidColorBrush Color=\"#FFFFFFFF\"\r\n                                       x:Name=\"ButtonColor\" />\r\n                                        </Path.Fill>\r\n                                    </Path>\r\n                                    <Rectangle x:Name=\"DisabledElement\"\r\n                             Opacity=\"0\"\r\n                             Fill=\"{StaticResource DisabledBackgroundBrush}\"\r\n                             RadiusX=\"3\"\r\n                             RadiusY=\"3\" />\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"VerticalThumbTemplate\"\r\n                               TargetType=\"Thumb\">\r\n                                <Grid>\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0:0:0.1\"\r\n                                              To=\"MouseOver\" />\r\n                                                <VisualTransition GeneratedDuration=\"0:0:0.1\"\r\n                                              To=\"Pressed\" />\r\n                                                <VisualTransition From=\"Normal\"\r\n                                              GeneratedDuration=\"00:00:00.3000000\"\r\n                                              To=\"MouseOver\" />\r\n                                                <VisualTransition From=\"MouseOver\"\r\n                                              GeneratedDuration=\"00:00:00.5000000\"\r\n                                              To=\"Normal\" />\r\n                                                <VisualTransition From=\"Pressed\"\r\n                                              GeneratedDuration=\"00:00:00.5000000\"\r\n                                              To=\"MouseOver\" />\r\n                                                <VisualTransition From=\"MouseOver\"\r\n                                              GeneratedDuration=\"00:00:00.3000000\"\r\n                                              To=\"Pressed\" />\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                         Duration=\"00:00:00.0010000\"\r\n                                                         Storyboard.TargetName=\"BackgroundMouseOver\"\r\n                                                         Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                                  Value=\"0\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundMouseOver\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\"\r\n                                                  Value=\"1\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                         Duration=\"00:00:00.0010000\"\r\n                                                         Storyboard.TargetName=\"Background\"\r\n                                                         Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                                  Value=\"0.7\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ThumbVisual\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\"\r\n                                                  Value=\"0\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Grid Margin=\"1,0,1,0\"\r\n                        x:Name=\"ThumbVisual\">\r\n                                        <Rectangle x:Name=\"Background\"\r\n                               Fill=\"{StaticResource NormalBrush}\"\r\n                               StrokeThickness=\"2\"\r\n                               RadiusX=\"2\"\r\n                               RadiusY=\"2\"\r\n                               Stroke=\"{StaticResource NormalBorderBrush}\" />\r\n                                        <Rectangle x:Name=\"BackgroundMouseOver\"\r\n                               Fill=\"{StaticResource HoverBrush}\"\r\n                               Stroke=\"{x:Null}\"\r\n                               StrokeThickness=\"1\"\r\n                               RadiusX=\"1\"\r\n                               RadiusY=\"1\"\r\n                               Margin=\"2,2,2,2\" />\r\n                                    </Grid>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"HorizontalThumbTemplate\"\r\n                               TargetType=\"Thumb\">\r\n                                <Grid>\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0:0:0.1\"\r\n                                              To=\"MouseOver\" />\r\n                                                <VisualTransition GeneratedDuration=\"0:0:0.1\"\r\n                                              To=\"Pressed\" />\r\n                                                <VisualTransition From=\"Normal\"\r\n                                              GeneratedDuration=\"00:00:00.3000000\"\r\n                                              To=\"MouseOver\" />\r\n                                                <VisualTransition From=\"MouseOver\"\r\n                                              GeneratedDuration=\"00:00:00.5000000\"\r\n                                              To=\"Normal\" />\r\n                                                <VisualTransition From=\"Pressed\"\r\n                                              GeneratedDuration=\"00:00:00.5000000\"\r\n                                              To=\"MouseOver\" />\r\n                                                <VisualTransition From=\"MouseOver\"\r\n                                              GeneratedDuration=\"00:00:00.3000000\"\r\n                                              To=\"Pressed\" />\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\" />\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundMouseOver\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\"\r\n                                                  Value=\"1\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                         Duration=\"00:00:00.0010000\"\r\n                                                         Storyboard.TargetName=\"Background\"\r\n                                                         Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                                  Value=\"0.7\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ThumbVisual\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\"\r\n                                                  Value=\"0\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Grid Margin=\"0,1,0,1\"\r\n                        x:Name=\"ThumbVisual\">\r\n                                        <Rectangle x:Name=\"Background\"\r\n                               Fill=\"{StaticResource NormalBrush}\"\r\n                               StrokeThickness=\"2\"\r\n                               RadiusX=\"2\"\r\n                               RadiusY=\"2\"\r\n                               Stroke=\"{StaticResource NormalBorderBrush}\" />\r\n                                        <Rectangle x:Name=\"BackgroundMouseOver\"\r\n                               Opacity=\"0\"\r\n                               Fill=\"{StaticResource HoverBrush}\"\r\n                               Stroke=\"{x:Null}\"\r\n                               StrokeThickness=\"0\"\r\n                               RadiusX=\"1\"\r\n                               RadiusY=\"1\"\r\n                               Margin=\"2,2,2,2\" />\r\n                                    </Grid>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\" />\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Root\"\r\n                                                   Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.5\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid x:Name=\"HorizontalRoot\" Visibility=\"Collapsed\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\" />\r\n                                <ColumnDefinition Width=\"*\" />\r\n                                <ColumnDefinition Width=\"Auto\" />\r\n                            </Grid.ColumnDefinitions>\r\n                            <Rectangle Grid.ColumnSpan=\"3\"\r\n                         Stroke=\"#00000000\"\r\n                         StrokeThickness=\"1\"\r\n                         RadiusX=\"3\"\r\n                         RadiusY=\"3\"\r\n                         Fill=\"#FFDDDEDF\" />\r\n                            <RepeatButton IsTabStop=\"False\"\r\n                            Template=\"{StaticResource HorizontalDecrementTemplate}\"\r\n                            Margin=\"1\"\r\n                            x:Name=\"HorizontalSmallDecrease\"\r\n                            Width=\"16\"\r\n                            Grid.Column=\"0\"\r\n                            Interval=\"50\" />\r\n\r\n\r\n\r\n                            <RepeatButton IsTabStop=\"False\"\r\n                            Template=\"{StaticResource RepeatButtonTemplate}\"\r\n                            x:Name=\"HorizontalLargeDecrease\"\r\n                            Width=\"0\"\r\n                            Grid.Column=\"1\"\r\n                            Interval=\"50\" />\r\n                            <Thumb Background=\"{TemplateBinding Background}\"\r\n                     Template=\"{StaticResource HorizontalThumbTemplate}\"\r\n                     MinWidth=\"18\"\r\n                     x:Name=\"HorizontalThumb\"\r\n                     Width=\"18\"\r\n                     Grid.Column=\"2\" />\r\n                            <RepeatButton IsTabStop=\"False\"\r\n                            Template=\"{StaticResource RepeatButtonTemplate}\"\r\n                            x:Name=\"HorizontalLargeIncrease\"\r\n                            Grid.Column=\"3\"\r\n                            Interval=\"50\" />\r\n\r\n\r\n\r\n                            <RepeatButton IsTabStop=\"False\"\r\n                            Template=\"{StaticResource HorizontalIncrementTemplate}\"\r\n                            Margin=\"1\"\r\n                            x:Name=\"HorizontalSmallIncrease\"\r\n                            Width=\"16\"\r\n                            Grid.Column=\"2\"\r\n                            Interval=\"50\" />\r\n                        </Grid>\r\n                        <Grid x:Name=\"VerticalRoot\"\r\n                  Visibility=\"Visible\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\" />\r\n                                <RowDefinition Height=\"*\" />\r\n                                <RowDefinition Height=\"Auto\" />\r\n                            </Grid.RowDefinitions>\r\n                            <Rectangle Grid.RowSpan=\"3\"\r\n                         Stroke=\"#00000000\"\r\n                         StrokeThickness=\"1\"\r\n                         RadiusX=\"3\"\r\n                         RadiusY=\"3\"\r\n                         Fill=\"#FFDDDEDF\" />\r\n                            <RepeatButton IsTabStop=\"False\"\r\n                            Template=\"{StaticResource VerticalDecrementTemplate}\"\r\n                            Height=\"16\"\r\n                            Margin=\"1\"\r\n                            x:Name=\"VerticalSmallDecrease\"\r\n                            Grid.Row=\"0\"\r\n                            Interval=\"50\" \r\n                            Command=\"ScrollBar.LineUpCommand\"/>\r\n\r\n                            <Track Grid.Row=\"1\" x:Name=\"PART_Track\" Orientation=\"Vertical\" IsDirectionReversed=\"true\">\r\n                                <Track.Thumb>\r\n                                    <Thumb MinHeight=\"18\" x:Name=\"VerticalThumb\" Template=\"{StaticResource VerticalThumbTemplate}\" />\r\n                                </Track.Thumb>\r\n                                <Track.IncreaseRepeatButton>\r\n                                    <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Command=\"ScrollBar.PageDownCommand\" Interval=\"50\" />\r\n                                </Track.IncreaseRepeatButton>\r\n                                <Track.DecreaseRepeatButton>\r\n                                    <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Command=\"ScrollBar.PageUpCommand\" Interval=\"50\" />\r\n                                </Track.DecreaseRepeatButton>\r\n                            </Track>\r\n\r\n                            <RepeatButton IsTabStop=\"False\"\r\n                            Template=\"{StaticResource VerticalIncrementTemplate}\"\r\n                            Height=\"16\"\r\n                            Margin=\"1\"\r\n                            x:Name=\"VerticalSmallIncrease\"\r\n                            Grid.Row=\"2\"\r\n                            Interval=\"50\" \r\n                            Command=\"ScrollBar.LineDownCommand\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--ScrollViewer-->\r\n    <Style  TargetType=\"ScrollViewer\">\r\n        <Setter Property=\"HorizontalContentAlignment\"\r\n            Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\"\r\n            Value=\"Top\" />\r\n        <Setter Property=\"Padding\"\r\n            Value=\"4\" />\r\n        <Setter Property=\"BorderThickness\"\r\n            Value=\"1\" />\r\n        <Setter Property=\"BorderBrush\"\r\n            Value=\"{StaticResource NormalBorderBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ScrollViewer\">\r\n                    <Border BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                  BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                  CornerRadius=\"2\">\r\n                        <Grid Background=\"{TemplateBinding Background}\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"*\" />\r\n                                <ColumnDefinition Width=\"Auto\" />\r\n                            </Grid.ColumnDefinitions>\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"*\" />\r\n                                <RowDefinition Height=\"Auto\" />\r\n                            </Grid.RowDefinitions>\r\n                            <ScrollContentPresenter Cursor=\"{TemplateBinding Cursor}\"\r\n                                      Margin=\"{TemplateBinding Padding}\"\r\n                                      x:Name=\"ScrollContentPresenter\"\r\n                                      ContentTemplate=\"{TemplateBinding ContentTemplate}\" />\r\n                            <Rectangle Grid.Column=\"1\"\r\n                         Grid.Row=\"1\"\r\n                         Fill=\"#FFE9EEF4\" />\r\n                            <ScrollBar IsTabStop=\"False\"\r\n                         x:Name=\"PART_VerticalScrollBar\"\r\n                         Width=\"18\"\r\n                         Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\"\r\n                         Grid.Column=\"1\"\r\n                         Grid.Row=\"0\"\r\n                         Orientation=\"Vertical\"\r\n                         ViewportSize=\"{TemplateBinding ViewportHeight}\"\r\n                         Maximum=\"{TemplateBinding ScrollableHeight}\"\r\n                         Minimum=\"0\"\r\n                         Value=\"{TemplateBinding VerticalOffset}\"/>\r\n                            <ScrollBar IsTabStop=\"False\"\r\n                         Height=\"18\"\r\n                         x:Name=\"PART_HorizontalScrollBar\"\r\n                         Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\"\r\n                         Grid.Column=\"0\"\r\n                         Grid.Row=\"1\"\r\n                         Orientation=\"Horizontal\"\r\n                         ViewportSize=\"{TemplateBinding ViewportWidth}\"\r\n                         Maximum=\"{TemplateBinding ScrollableWidth}\"\r\n                         Minimum=\"0\"\r\n                         Value=\"{TemplateBinding HorizontalOffset}\"/>\r\n                        </Grid>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--Listbox-->\r\n    <Style  TargetType=\"ListBox\">\r\n        <Setter Property=\"Padding\"\r\n            Value=\"1\"/>\r\n        <Setter Property=\"Background\"\r\n            Value=\"{StaticResource ShadeBrush}\"/>\r\n        <Setter Property=\"Foreground\"\r\n            Value=\"#FFFFFFff\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\"\r\n            Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\"\r\n            Value=\"Top\"/>\r\n        <Setter Property=\"IsTabStop\"\r\n            Value=\"False\"/>\r\n        <Setter Property=\"BorderThickness\"\r\n            Value=\"1\"/>\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\"\r\n            Value=\"Once\"/>\r\n        <Setter Property=\"BorderBrush\"\r\n            Value=\"{StaticResource NormalBorderBrush}\" />\r\n        <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" \r\n            Value=\"Auto\"/>\r\n        <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" \r\n            Value=\"Auto\"/>\r\n        <Setter Property=\"ScrollViewer.CanContentScroll\" \r\n            Value=\"True\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ListBox\">\r\n                    <Border BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                  BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                  CornerRadius=\"2\"\r\n                  Background=\"{TemplateBinding Background}\">\r\n                        <ScrollViewer BorderBrush=\"Transparent\"\r\n                          BorderThickness=\"0\"\r\n                          Padding=\"{TemplateBinding Padding}\"\r\n                          x:Name=\"ScrollViewer\">\r\n                            <ItemsPresenter/>\r\n                        </ScrollViewer>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--LisboxItem-->\r\n    <Style TargetType=\"ListBoxItem\">\r\n        <Setter Property=\"Padding\"\r\n            Value=\"3\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\"\r\n            Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\"\r\n            Value=\"Top\"/>\r\n        <Setter Property=\"Background\"\r\n            Value=\"Transparent\"/>\r\n        <Setter Property=\"BorderThickness\"\r\n            Value=\"1\"/>\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\"\r\n            Value=\"Local\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ListBoxItem\">\r\n                    <Grid Background=\"{TemplateBinding Background}\"\r\n                Margin=\"1,1,1,1\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition From=\"Normal\"\r\n                                        GeneratedDuration=\"00:00:00.3000000\"\r\n                                        To=\"MouseOver\"/>\r\n                                    <VisualTransition From=\"MouseOver\"\r\n                                        GeneratedDuration=\"00:00:00.5000000\"\r\n                                        To=\"Normal\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"HoverRectangle\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition From=\"Unselected\"\r\n                                        GeneratedDuration=\"00:00:00.3000000\"\r\n                                        To=\"Selected\"/>\r\n                                    <VisualTransition From=\"Selected\"\r\n                                        GeneratedDuration=\"00:00:00.5000000\"\r\n                                        To=\"Unselected\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Unselected\"/>\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"SelectedRectangle\"\r\n                                                   Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\".75\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Rectangle x:Name=\"Background\"\r\n                       IsHitTestVisible=\"False\"\r\n                       Fill=\"{StaticResource SelectedBackgroundBrush}\"\r\n                       RadiusX=\"0\"/>\r\n                        <Rectangle x:Name=\"SelectedRectangle\"\r\n                       IsHitTestVisible=\"False\"\r\n                       Opacity=\"0\"\r\n                       Fill=\"{StaticResource NormalBrush}\"\r\n                       RadiusX=\"0\"/>\r\n                        <Rectangle x:Name=\"HoverRectangle\"\r\n                       IsHitTestVisible=\"False\"\r\n                       Fill=\"{StaticResource HoverBrush}\"\r\n                       RadiusX=\"0\"\r\n                       Opacity=\"0\"/>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                              Margin=\"{TemplateBinding Padding}\"/>\r\n                        <Rectangle x:Name=\"FocusVisualElement\"\r\n                       Visibility=\"Collapsed\"\r\n                       Stroke=\"{StaticResource HoverBrush}\"\r\n                       StrokeThickness=\"1\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--TabControl-->\r\n    <Style TargetType=\"TabControl\">\r\n        <Setter Property=\"IsTabStop\"\r\n            Value=\"False\" />\r\n        <Setter Property=\"Background\"\r\n            Value=\"{StaticResource ShadeBrushTop}\" />\r\n        <Setter Property=\"BorderBrush\"\r\n            Value=\"{StaticResource NormalBorderBrush}\" />\r\n        <Setter Property=\"BorderThickness\"\r\n            Value=\"1\" />\r\n        <Setter Property=\"Padding\"\r\n            Value=\"5\" />\r\n        <Setter Property=\"HorizontalContentAlignment\"\r\n            Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\"\r\n            Value=\"Stretch\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TabControl\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualTop\"\r\n                                                   Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualBottom\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualLeft\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualRight\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid x:Name=\"TemplateTop\"\r\n                  Visibility=\"Visible\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\" />\r\n                                <RowDefinition Height=\"*\" />\r\n                            </Grid.RowDefinitions>\r\n                            <TabPanel Margin=\"2,2,2,-1\"\r\n                                                           x:Name=\"TabPanelTop\"\r\n                                                           Canvas.ZIndex=\"1\" \r\n                                      IsItemsHost=\"True\"/>\r\n                            <Border MinHeight=\"10\"\r\n                      MinWidth=\"10\"\r\n                      Grid.Row=\"1\"\r\n                      Background=\"{TemplateBinding Background}\"\r\n                      BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                      BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                      CornerRadius=\"0,0,3,3\">\r\n                                <ContentPresenter Cursor=\"{TemplateBinding Cursor}\"\r\n                                  HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\"\r\n                                  Margin=\"{TemplateBinding Padding}\"\r\n                                  x:Name=\"PART_SelectedContentHost\" \r\n                                  ContentSource=\"SelectedContent\"\r\n                                  VerticalAlignment=\"{TemplateBinding VerticalAlignment}\" />\r\n                            </Border>\r\n                            <Border x:Name=\"DisabledVisualTop\"\r\n                      IsHitTestVisible=\"False\"\r\n                      Opacity=\"0\"\r\n                      Canvas.ZIndex=\"1\"\r\n                      Grid.Row=\"1\"\r\n                      Grid.RowSpan=\"2\"\r\n                      Background=\"#8CFFFFFF\"\r\n                      CornerRadius=\"0,0,3,3\" />\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateBottom\"\r\n                  Visibility=\"Collapsed\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"*\" />\r\n                                <RowDefinition Height=\"Auto\" />\r\n                            </Grid.RowDefinitions>\r\n                            <TabPanel Margin=\"2,-1,2,2\"\r\n                                                           x:Name=\"TabPanelBottom\"\r\n                                                           Canvas.ZIndex=\"1\"\r\n                                                           Grid.Row=\"1\" />\r\n                            <Border MinHeight=\"10\"\r\n                      MinWidth=\"10\"\r\n                      BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                      BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                      CornerRadius=\"3,3,0,0\"\r\n                      Background=\"{StaticResource ShadeBrushBottom}\">\r\n                                <ContentPresenter Cursor=\"{TemplateBinding Cursor}\"\r\n                                  HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\"\r\n                                  Margin=\"{TemplateBinding Padding}\"\r\n                                  x:Name=\"ContentBottom\"\r\n                                  VerticalAlignment=\"{TemplateBinding VerticalAlignment}\" />\r\n                            </Border>\r\n                            <Border x:Name=\"DisabledVisualBottom\"\r\n                      IsHitTestVisible=\"False\"\r\n                      Opacity=\"0\"\r\n                      Canvas.ZIndex=\"1\"\r\n                      Background=\"#8CFFFFFF\"\r\n                      CornerRadius=\"3,3,0,0\" />\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateLeft\"\r\n                  Visibility=\"Collapsed\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\" />\r\n                                <ColumnDefinition Width=\"*\" />\r\n                            </Grid.ColumnDefinitions>\r\n                            <TabPanel Margin=\"2,2,-1,2\"\r\n                                                           x:Name=\"TabPanelLeft\"\r\n                                                           Canvas.ZIndex=\"1\" />\r\n                            <Border MinHeight=\"10\"\r\n                      MinWidth=\"10\"\r\n                      Grid.Column=\"1\"\r\n                      BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                      BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                      CornerRadius=\"0,3,3,0\"\r\n                      Background=\"{StaticResource ShadeBrushLeft}\">\r\n                                <ContentPresenter Cursor=\"{TemplateBinding Cursor}\"\r\n                                  HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\"\r\n                                  Margin=\"{TemplateBinding Padding}\"\r\n                                  x:Name=\"ContentLeft\"\r\n                                  VerticalAlignment=\"{TemplateBinding VerticalAlignment}\" />\r\n                            </Border>\r\n                            <Border x:Name=\"DisabledVisualLeft\"\r\n                      IsHitTestVisible=\"False\"\r\n                      Opacity=\"0\"\r\n                      Canvas.ZIndex=\"1\"\r\n                      Grid.Column=\"1\"\r\n                      Background=\"#8CFFFFFF\"\r\n                      CornerRadius=\"0,3,3,0\" />\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateRight\"\r\n                  Visibility=\"Collapsed\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"*\" />\r\n                                <ColumnDefinition Width=\"Auto\" />\r\n                            </Grid.ColumnDefinitions>\r\n                            <TabPanel Margin=\"-1,2,2,2\"\r\n                                                           x:Name=\"TabPanelRight\"\r\n                                                           Canvas.ZIndex=\"1\"\r\n                                                           Grid.Column=\"1\" />\r\n                            <Border MinHeight=\"10\"\r\n                      MinWidth=\"10\"\r\n                      BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                      BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                      CornerRadius=\"3,0,0,3\"\r\n                      Background=\"{StaticResource ShadeBrushRight}\">\r\n                                <ContentPresenter Cursor=\"{TemplateBinding Cursor}\"\r\n                                  HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\"\r\n                                  Margin=\"{TemplateBinding Padding}\"\r\n                                  x:Name=\"ContentRight\"\r\n                                  VerticalAlignment=\"{TemplateBinding VerticalAlignment}\" />\r\n                            </Border>\r\n                            <Border Margin=\"0\"\r\n                      x:Name=\"DisabledVisualRight\"\r\n                      IsHitTestVisible=\"False\"\r\n                      Opacity=\"0\"\r\n                      Canvas.ZIndex=\"1\"\r\n                      Background=\"#8CFFFFFF\"\r\n                      CornerRadius=\"3,0,0,3\" />\r\n                        </Grid>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--TabControlItem-->\r\n    <Style TargetType=\"TabItem\">\r\n        <Setter Property=\"IsTabStop\"\r\n            Value=\"False\" />\r\n        <Setter Property=\"Background\"\r\n            Value=\"{StaticResource SelectedBackgroundBrush}\" />\r\n        <Setter Property=\"BorderBrush\"\r\n            Value=\"{StaticResource NormalBorderBrush}\" />\r\n        <Setter Property=\"BorderThickness\"\r\n            Value=\"1\" />\r\n        <Setter Property=\"Padding\"\r\n            Value=\"6,2,6,2\" />\r\n        <Setter Property=\"HorizontalContentAlignment\"\r\n            Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\"\r\n            Value=\"Stretch\" />\r\n        <Setter Property=\"MinWidth\"\r\n            Value=\"5\" />\r\n        <Setter Property=\"MinHeight\"\r\n            Value=\"5\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TabItem\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\"\r\n                                        To=\"MouseOver\" />\r\n                                    <VisualTransition From=\"Normal\"\r\n                                        GeneratedDuration=\"00:00:00.3000000\"\r\n                                        To=\"MouseOver\" />\r\n                                    <VisualTransition From=\"MouseOver\"\r\n                                        GeneratedDuration=\"00:00:00.5000000\"\r\n                                        To=\"Normal\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"0\"\r\n                                                   Duration=\"00:00:00.001\"\r\n                                                   Storyboard.TargetName=\"FocusVisualTop\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"0\"\r\n                                                   Duration=\"00:00:00.001\"\r\n                                                   Storyboard.TargetName=\"FocusVisualBottom\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"0\"\r\n                                                   Duration=\"00:00:00.001\"\r\n                                                   Storyboard.TargetName=\"FocusVisualLeft\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"0\"\r\n                                                   Duration=\"00:00:00.001\"\r\n                                                   Storyboard.TargetName=\"FocusVisualRight\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"TopSelectedHoverRectangle\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"TopUnselectedHoverRectangle\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"rectangle\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"BottomUnselectedHoverRectangle\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"rectangle1\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"rectangle2\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"rectangle3\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"rectangle4\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualTopSelected\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.65\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualTopUnSelected\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.65\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualBottomSelected\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.65\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualBottomUnSelected\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.65\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualLeftSelected\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.65\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualLeftUnSelected\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.65\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualRightSelected\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.65\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualRightUnSelected\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.65\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualState x:Name=\"Unselected\">\r\n                                    <Storyboard />\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard />\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid x:Name=\"TemplateTopSelected\"\r\n                  Visibility=\"Visible\"\r\n                  Canvas.ZIndex=\"1\"\r\n                  Margin=\"2,0,2,0\">\r\n                            <Border Margin=\"-2,-2,-2,0\"\r\n                      Background=\"{TemplateBinding Background}\"\r\n                      BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                      BorderThickness=\"2,2,2,0\"\r\n                      CornerRadius=\"3,3,0,0\">\r\n                                <Border BorderBrush=\"{x:Null}\"\r\n                        CornerRadius=\"2.4,2.4,0,0\"\r\n                        Background=\"{StaticResource NormalBrush}\">\r\n                                    <Grid>\r\n                                        <Rectangle Fill=\"{StaticResource HoverBrush}\"\r\n                               x:Name=\"TopSelectedHoverRectangle\"\r\n                               Opacity=\"0\" />\r\n\r\n                                        <ContentPresenter HorizontalAlignment=\"Center\" Margin=\"12,2,12,2\" x:Name=\"ContentSite\" VerticalAlignment=\"Center\" RecognizesAccessKey=\"True\" ContentSource=\"Header\"/>\r\n                                        \r\n<!--                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\"\r\n                                    Foreground=\"{TemplateBinding Foreground}\"\r\n                                    IsTabStop=\"False\"\r\n                                    Cursor=\"{TemplateBinding Cursor}\"\r\n                                    HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\"\r\n                                    Margin=\"{TemplateBinding Padding}\"\r\n                                    x:Name=\"HeaderTopSelected\"\r\n                                    VerticalAlignment=\"{TemplateBinding VerticalAlignment}\" />\r\n-->                                        \r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border Margin=\"-2,-2,-2,0\"\r\n                      x:Name=\"FocusVisualTop\"\r\n                      IsHitTestVisible=\"false\"\r\n                      Visibility=\"Collapsed\"\r\n                      BorderBrush=\"{StaticResource HoverBrush}\"\r\n                      BorderThickness=\"2,2,2,0\"\r\n                      CornerRadius=\"3,3,0,0\" />\r\n                            <Border Margin=\"-2,-2,-2,0\"\r\n                      x:Name=\"DisabledVisualTopSelected\"\r\n                      IsHitTestVisible=\"false\"\r\n                      Opacity=\"0\"\r\n                      Background=\"{StaticResource DisabledBackgroundBrush}\"\r\n                      CornerRadius=\"3,3,0,0\" />\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateTopUnselected\"\r\n                  Visibility=\"Collapsed\"\r\n                  Margin=\"1,0,1,0\">\r\n                            <Border x:Name=\"BorderTop\"\r\n                      Background=\"{TemplateBinding Background}\"\r\n                      BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                      BorderThickness=\"1\"\r\n                      CornerRadius=\"3,3,0,0\">\r\n                                <Border x:Name=\"GradientTop\"\r\n                        BorderBrush=\"#FFFFFFFF\"\r\n                        CornerRadius=\"1,1,0,0\"\r\n                        Background=\"{x:Null}\">\r\n                                    <Grid>\r\n                                        <Rectangle Fill=\"{StaticResource HoverBrush}\"\r\n                               x:Name=\"TopUnselectedHoverRectangle\"\r\n                               Opacity=\"0\"\r\n                               Height=\"Auto\"\r\n                               HorizontalAlignment=\"Stretch\"\r\n                               VerticalAlignment=\"Stretch\"\r\n                               Width=\"Auto\" />\r\n                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\"\r\n                                    Foreground=\"{TemplateBinding Foreground}\"\r\n                                    IsTabStop=\"False\"\r\n                                    Cursor=\"{TemplateBinding Cursor}\"\r\n                                    HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\"\r\n                                    Margin=\"{TemplateBinding Padding}\"\r\n                                    x:Name=\"HeaderTopUnselected\"\r\n                                    VerticalAlignment=\"{TemplateBinding VerticalAlignment}\" />\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border x:Name=\"DisabledVisualTopUnSelected\"\r\n                      IsHitTestVisible=\"false\"\r\n                      Opacity=\"0\"\r\n                      Background=\"{StaticResource DisabledBackgroundBrush}\"\r\n                      CornerRadius=\"3,3,0,0\" />\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateBottomSelected\"\r\n                  Visibility=\"Collapsed\"\r\n                  Canvas.ZIndex=\"1\"\r\n                  Margin=\"2,0,2,0\">\r\n                            <Border Margin=\"-2,0,-2,-2\"\r\n                      Background=\"{TemplateBinding Background}\"\r\n                      BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                      BorderThickness=\"2,0,2,2\"\r\n                      CornerRadius=\"0,0,3,3\">\r\n                                <Border BorderBrush=\"{x:Null}\"\r\n                        CornerRadius=\"0,0,2.4,2.4\"\r\n                        Background=\"{StaticResource NormalBrush}\">\r\n                                    <Grid>\r\n                                        <Rectangle Margin=\"0,0,0,0\"\r\n                               Fill=\"{StaticResource HoverBrush}\"\r\n                               Opacity=\"0\"\r\n                               x:Name=\"rectangle\" />\r\n                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\"\r\n                                    Foreground=\"{TemplateBinding Foreground}\"\r\n                                    IsTabStop=\"False\"\r\n                                    Cursor=\"{TemplateBinding Cursor}\"\r\n                                    HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\"\r\n                                    Margin=\"{TemplateBinding Padding}\"\r\n                                    x:Name=\"HeaderBottomSelected\"\r\n                                    VerticalAlignment=\"{TemplateBinding VerticalAlignment}\" />\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border Margin=\"-2,0,-2,-2\"\r\n                      x:Name=\"FocusVisualBottom\"\r\n                      IsHitTestVisible=\"false\"\r\n                      Visibility=\"Collapsed\"\r\n                      BorderBrush=\"{StaticResource HoverBrush}\"\r\n                      BorderThickness=\"2,0,2,2\"\r\n                      CornerRadius=\"0,0,3,3\" />\r\n                            <Border Margin=\"-2,0,-2,-2\"\r\n                      x:Name=\"DisabledVisualBottomSelected\"\r\n                      IsHitTestVisible=\"false\"\r\n                      Opacity=\"0\"\r\n                      Background=\"{StaticResource DisabledBackgroundBrush}\"\r\n                      CornerRadius=\"0,0,3,3\" />\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateBottomUnselected\"\r\n                  Visibility=\"Collapsed\"\r\n                  Margin=\"1,0,1,0\">\r\n                            <Border x:Name=\"BorderBottom\"\r\n                      Background=\"{TemplateBinding Background}\"\r\n                      BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                      BorderThickness=\"1\"\r\n                      CornerRadius=\"0,0,3,3\">\r\n                                <Border x:Name=\"GradientBottom\"\r\n                        BorderBrush=\"{x:Null}\"\r\n                        CornerRadius=\"0,0,1,1\"\r\n                        Background=\"{x:Null}\">\r\n                                    <Grid>\r\n                                        <Rectangle Fill=\"{StaticResource HoverBrush}\"\r\n                               x:Name=\"BottomUnselectedHoverRectangle\"\r\n                               Opacity=\"0\"\r\n                               Height=\"Auto\"\r\n                               HorizontalAlignment=\"Stretch\"\r\n                               VerticalAlignment=\"Stretch\"\r\n                               Width=\"Auto\" />\r\n                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\"\r\n                                    Foreground=\"{TemplateBinding Foreground}\"\r\n                                    IsTabStop=\"False\"\r\n                                    Cursor=\"{TemplateBinding Cursor}\"\r\n                                    HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\"\r\n                                    Margin=\"{TemplateBinding Padding}\"\r\n                                    x:Name=\"HeaderBottomUnselected\"\r\n                                    VerticalAlignment=\"{TemplateBinding VerticalAlignment}\" />\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border x:Name=\"DisabledVisualBottomUnSelected\"\r\n                      IsHitTestVisible=\"false\"\r\n                      Opacity=\"0\"\r\n                      Background=\"{StaticResource DisabledBackgroundBrush}\"\r\n                      CornerRadius=\"0,0,3,3\" />\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateLeftSelected\"\r\n                  Visibility=\"Collapsed\"\r\n                  Canvas.ZIndex=\"1\"\r\n                  Margin=\"0,3,0,3\">\r\n                            <Border Margin=\"-2,-2,0,-2\"\r\n                      Background=\"{TemplateBinding Background}\"\r\n                      BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                      BorderThickness=\"2,2,0,2\"\r\n                      CornerRadius=\"3,0,0,3\">\r\n                                <Border BorderBrush=\"{x:Null}\"\r\n                        BorderThickness=\"0,0,0,0\"\r\n                        CornerRadius=\"1,0,0,1\"\r\n                        Background=\"{StaticResource NormalBrush}\">\r\n                                    <Grid>\r\n                                        <Rectangle Fill=\"{StaticResource HoverBrush}\"\r\n                               Opacity=\"0\"\r\n                               x:Name=\"rectangle1\" />\r\n                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\"\r\n                                    Foreground=\"{TemplateBinding Foreground}\"\r\n                                    IsTabStop=\"False\"\r\n                                    Cursor=\"{TemplateBinding Cursor}\"\r\n                                    HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\"\r\n                                    Margin=\"{TemplateBinding Padding}\"\r\n                                    x:Name=\"HeaderLeftSelected\"\r\n                                    VerticalAlignment=\"{TemplateBinding VerticalAlignment}\" />\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border Margin=\"-2,-2,0,-2\"\r\n                      x:Name=\"FocusVisualLeft\"\r\n                      IsHitTestVisible=\"false\"\r\n                      Visibility=\"Collapsed\"\r\n                      BorderBrush=\"{StaticResource HoverBrush}\"\r\n                      BorderThickness=\"2,2,0,2\"\r\n                      CornerRadius=\"3,0,0,3\" />\r\n                            <Border Margin=\"-2,-2,0,-2\"\r\n                      x:Name=\"DisabledVisualLeftSelected\"\r\n                      IsHitTestVisible=\"false\"\r\n                      Opacity=\"0\"\r\n                      Background=\"{StaticResource DisabledBackgroundBrush}\"\r\n                      CornerRadius=\"3,0,0,3\" />\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateLeftUnselected\"\r\n                  Visibility=\"Collapsed\"\r\n                  Margin=\"0,1,0,1\">\r\n                            <Border x:Name=\"BorderLeft\"\r\n                      Background=\"{TemplateBinding Background}\"\r\n                      BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                      BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                      CornerRadius=\"3,0,0,3\">\r\n                                <Border x:Name=\"GradientLeft\"\r\n                        BorderBrush=\"{x:Null}\"\r\n                        CornerRadius=\"1,0,0,1\"\r\n                        Background=\"{x:Null}\">\r\n                                    <Grid>\r\n                                        <Rectangle Fill=\"{StaticResource HoverBrush}\"\r\n                               Opacity=\"0\"\r\n                               Height=\"Auto\"\r\n                               HorizontalAlignment=\"Stretch\"\r\n                               VerticalAlignment=\"Stretch\"\r\n                               Width=\"Auto\"\r\n                               x:Name=\"rectangle2\" />\r\n                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\"\r\n                                    Foreground=\"{TemplateBinding Foreground}\"\r\n                                    IsTabStop=\"False\"\r\n                                    Cursor=\"{TemplateBinding Cursor}\"\r\n                                    HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\"\r\n                                    Margin=\"{TemplateBinding Padding}\"\r\n                                    x:Name=\"HeaderLeftUnselected\"\r\n                                    VerticalAlignment=\"{TemplateBinding VerticalAlignment}\" />\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border x:Name=\"DisabledVisualLeftUnSelected\"\r\n                      IsHitTestVisible=\"false\"\r\n                      Opacity=\"0\"\r\n                      Background=\"{StaticResource DisabledBackgroundBrush}\"\r\n                      CornerRadius=\"3,0,0,3\" />\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateRightSelected\"\r\n                  Visibility=\"Collapsed\"\r\n                  Canvas.ZIndex=\"1\"\r\n                  Margin=\"0,3,0,3\">\r\n                            <Border Margin=\"0,-2,-2,-2\"\r\n                      Background=\"{TemplateBinding Background}\"\r\n                      BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                      BorderThickness=\"0,2,2,2\"\r\n                      CornerRadius=\"0,3,3,0\">\r\n                                <Border BorderBrush=\"{x:Null}\"\r\n                        CornerRadius=\"0,3,3,0\"\r\n                        Background=\"{StaticResource NormalBrush}\">\r\n                                    <Grid>\r\n                                        <Rectangle Margin=\"-2,0,0,0\"\r\n                               Fill=\"{StaticResource HoverBrush}\"\r\n                               Opacity=\"0\"\r\n                               x:Name=\"rectangle3\" />\r\n                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\"\r\n                                    Foreground=\"{TemplateBinding Foreground}\"\r\n                                    IsTabStop=\"False\"\r\n                                    Cursor=\"{TemplateBinding Cursor}\"\r\n                                    HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\"\r\n                                    Margin=\"{TemplateBinding Padding}\"\r\n                                    x:Name=\"HeaderRightSelected\"\r\n                                    VerticalAlignment=\"{TemplateBinding VerticalAlignment}\" />\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border Margin=\"0,-2,-2,-2\"\r\n                      x:Name=\"FocusVisualRight\"\r\n                      IsHitTestVisible=\"false\"\r\n                      Visibility=\"Collapsed\"\r\n                      BorderBrush=\"{StaticResource HoverBrush}\"\r\n                      BorderThickness=\"0,1,1,1\"\r\n                      CornerRadius=\"0,3,3,0\" />\r\n                            <Border Margin=\"0,-2,-2,-2\"\r\n                      x:Name=\"DisabledVisualRightSelected\"\r\n                      IsHitTestVisible=\"false\"\r\n                      Opacity=\"0\"\r\n                      Background=\"{StaticResource DisabledBackgroundBrush}\"\r\n                      CornerRadius=\"0,3,3,0\" />\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateRightUnselected\"\r\n                  Visibility=\"Collapsed\"\r\n                  Margin=\"0,1,0,1\">\r\n                            <Border x:Name=\"BorderRight\"\r\n                      Background=\"{TemplateBinding Background}\"\r\n                      BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                      BorderThickness=\"1\"\r\n                      CornerRadius=\"0,3,3,0\">\r\n                                <Border x:Name=\"GradientRight\"\r\n                        BorderBrush=\"{x:Null}\"\r\n                        CornerRadius=\"0,1,1,0\"\r\n                        Background=\"{x:Null}\">\r\n                                    <Grid>\r\n                                        <Rectangle Fill=\"{StaticResource HoverBrush}\"\r\n                               Opacity=\"0\"\r\n                               Height=\"Auto\"\r\n                               VerticalAlignment=\"Stretch\"\r\n                               x:Name=\"rectangle4\" />\r\n                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\"\r\n                                    Foreground=\"{TemplateBinding Foreground}\"\r\n                                    IsTabStop=\"False\"\r\n                                    Cursor=\"{TemplateBinding Cursor}\"\r\n                                    HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\"\r\n                                    Margin=\"{TemplateBinding Padding}\"\r\n                                    x:Name=\"HeaderRightUnselected\"\r\n                                    VerticalAlignment=\"{TemplateBinding VerticalAlignment}\" />\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border x:Name=\"DisabledVisualRightUnSelected\"\r\n                      IsHitTestVisible=\"false\"\r\n                      Opacity=\"0\"\r\n                      Background=\"{StaticResource DisabledBackgroundBrush}\"\r\n                      CornerRadius=\"0,3,3,0\" />\r\n                        </Grid>\r\n                        <Border Margin=\"-1\"\r\n                    x:Name=\"FocusVisualElement\"\r\n                    IsHitTestVisible=\"false\"\r\n                    Visibility=\"Collapsed\"\r\n                    BorderBrush=\"#FF6DBDD1\"\r\n                    BorderThickness=\"1\"\r\n                    CornerRadius=\"3,3,0,0\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\"\r\n            Value=\"#FFFFFFFF\" />\r\n    </Style>\r\n    <!--ComboBoxItem-->\r\n    <Style  TargetType=\"ComboBoxItem\">\r\n        <Setter Property=\"Padding\"\r\n            Value=\"3\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\"\r\n            Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\"\r\n            Value=\"Top\"/>\r\n        <Setter Property=\"Background\"\r\n            Value=\"Transparent\"/>\r\n        <Setter Property=\"BorderThickness\"\r\n            Value=\"1\"/>\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\"\r\n            Value=\"Local\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ComboBoxItem\">\r\n                    <Grid Background=\"{TemplateBinding Background}\"\r\n                Margin=\"1,1,1,1\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition From=\"Normal\"\r\n                                        GeneratedDuration=\"00:00:00.3000000\"\r\n                                        To=\"MouseOver\"/>\r\n                                    <VisualTransition From=\"MouseOver\"\r\n                                        GeneratedDuration=\"00:00:00.5000000\"\r\n                                        To=\"Normal\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"HoverRectangle\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition From=\"Unselected\"\r\n                                        GeneratedDuration=\"00:00:00.3000000\"\r\n                                        To=\"Selected\"/>\r\n                                    <VisualTransition From=\"Selected\"\r\n                                        GeneratedDuration=\"00:00:00.5000000\"\r\n                                        To=\"Unselected\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Unselected\"/>\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"SelectedRectangle\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Rectangle x:Name=\"Background\"\r\n                       IsHitTestVisible=\"False\"\r\n                       Fill=\"{StaticResource SelectedBackgroundBrush}\"\r\n                       RadiusX=\"1\"\r\n                       RadiusY=\"1\"/>\r\n                        <Rectangle x:Name=\"HoverRectangle\"\r\n                       IsHitTestVisible=\"False\"\r\n                       Opacity=\"0\"\r\n                       Fill=\"{StaticResource HoverBrush}\"\r\n                       RadiusX=\"1\"\r\n                       RadiusY=\"1\"/>\r\n                        <Rectangle x:Name=\"SelectedRectangle\"\r\n                       IsHitTestVisible=\"False\"\r\n                       Opacity=\"0\"\r\n                       Fill=\"{StaticResource NormalBrush}\"\r\n                       RadiusX=\"1\"\r\n                       RadiusY=\"1\"/>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                              Margin=\"{TemplateBinding Padding}\"/>\r\n                        <Rectangle x:Name=\"FocusVisualElement\"\r\n                       Visibility=\"Collapsed\"\r\n                       Stroke=\"{StaticResource HoverBrush}\"\r\n                       StrokeThickness=\"1\"\r\n                       RadiusX=\"1\"\r\n                       RadiusY=\"1\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\"\r\n            Value=\"#FFFFFFFF\"/>\r\n    </Style>\r\n    <!--ComboBox-->\r\n    <Style  TargetType=\"ComboBox\">\r\n        <Setter Property=\"Padding\"\r\n            Value=\"6,2,25,2\"/>\r\n        <Setter Property=\"Background\"\r\n            Value=\"{StaticResource NormalBrush}\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\"\r\n            Value=\"Left\"/>\r\n        <Setter Property=\"BorderThickness\"\r\n            Value=\"2\"/>\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\"\r\n            Value=\"Once\"/>\r\n        <Setter Property=\"BorderBrush\"\r\n            Value=\"{StaticResource NormalBorderBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ComboBox\">\r\n                    <Grid>\r\n                        <Grid.Resources>\r\n                            <Style TargetType=\"ToggleButton\"\r\n                     x:Name=\"comboToggleStyle\">\r\n                                <Setter Property=\"Foreground\"\r\n                        Value=\"#FF000000\"/>\r\n                                <Setter Property=\"Background\"\r\n                        Value=\"{StaticResource NormalBrush}\"/>\r\n                                <Setter Property=\"BorderBrush\"\r\n                        Value=\"{StaticResource NormalBorderBrush}\" />\r\n                                <Setter Property=\"BorderThickness\"\r\n                        Value=\"2\"/>\r\n                                <Setter Property=\"Padding\"\r\n                        Value=\"1\"/>\r\n                                <Setter Property=\"Template\">\r\n                                    <Setter.Value>\r\n                                        <ControlTemplate TargetType=\"ToggleButton\">\r\n                                            <Grid>\r\n                                                <Grid.ColumnDefinitions>\r\n                                                    <ColumnDefinition />\r\n                                                    <ColumnDefinition Width=\"20\" />\r\n                                                </Grid.ColumnDefinitions>\r\n                                                <VisualStateManager.VisualStateGroups>\r\n                                                    <VisualStateGroup x:Name=\"CommonStates\">\r\n                                                        <VisualStateGroup.Transitions>\r\n                                                            <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                                    To=\"MouseOver\"/>\r\n                                                            <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                                    To=\"Pressed\"/>\r\n                                                            <VisualTransition From=\"Normal\"\r\n                                                    GeneratedDuration=\"00:00:00.3000000\"\r\n                                                    To=\"MouseOver\"/>\r\n                                                            <VisualTransition From=\"MouseOver\"\r\n                                                    GeneratedDuration=\"00:00:00.5000000\"\r\n                                                    To=\"Normal\"/>\r\n                                                            <VisualTransition From=\"Pressed\"\r\n                                                    GeneratedDuration=\"00:00:00.5000000\"\r\n                                                    To=\"MouseOver\"/>\r\n                                                            <VisualTransition From=\"MouseOver\"\r\n                                                    GeneratedDuration=\"00:00:00.3000000\"\r\n                                                    To=\"Pressed\"/>\r\n                                                        </VisualStateGroup.Transitions>\r\n                                                        <VisualState x:Name=\"Normal\"/>\r\n                                                        <VisualState x:Name=\"MouseOver\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                               Duration=\"00:00:00.0010000\"\r\n                                                               Storyboard.TargetName=\"HoverRectangle\"\r\n                                                               Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                                        Value=\"1\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Pressed\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                               Duration=\"00:00:00.0010000\"\r\n                                                               Storyboard.TargetName=\"Background\"\r\n                                                               Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                                        Value=\"0.7\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Disabled\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\"\r\n                                                               Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                                        Value=\"1\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                    </VisualStateGroup>\r\n                                                    <VisualStateGroup x:Name=\"CheckStates\">\r\n                                                        <VisualState x:Name=\"Checked\">\r\n                                                            <Storyboard/>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Unchecked\"/>\r\n                                                    </VisualStateGroup>\r\n                                                </VisualStateManager.VisualStateGroups>\r\n                                                <Rectangle x:Name=\"Background\"\r\n                                   Fill=\"{TemplateBinding Background}\"\r\n                                   Stroke=\"{TemplateBinding BorderBrush}\"\r\n                                   StrokeThickness=\"2\"\r\n                                   RadiusX=\"3\"\r\n                                   RadiusY=\"3\"\r\n                                   Grid.ColumnSpan=\"2\"/>\r\n                                                <Rectangle x:Name=\"HoverRectangle\"\r\n                                   Opacity=\"0\"\r\n                                   Fill=\"{StaticResource HoverBrush}\"\r\n                                   Stroke=\"{x:Null}\"\r\n                                   StrokeThickness=\"{TemplateBinding BorderThickness}\"\r\n                                   RadiusX=\"2\"\r\n                                   RadiusY=\"2\"\r\n                                   Grid.ColumnSpan=\"2\"\r\n                                   Grid.Column=\"1\"\r\n                                   Margin=\"-4,2,2,2\"/>\r\n                                                <Rectangle x:Name=\"BackgroundOverlay2\"\r\n                                   Fill=\"#FFFFFFFF\"\r\n                                   Stroke=\"#00000000\"\r\n                                   RadiusX=\"2\"\r\n                                   RadiusY=\"2\"\r\n                                   Margin=\"1.45000004768372,1,0,1\"/>\r\n                                                <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                                          Margin=\"{TemplateBinding Padding}\"\r\n                                          x:Name=\"contentPresenter\"\r\n                                          VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                                          Content=\"{TemplateBinding Content}\"\r\n                                          ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                                          Grid.Column=\"1\"\r\n                                          Grid.Row=\"9\"/>\r\n                                                <Rectangle x:Name=\"DisabledVisualElement\"\r\n                                   IsHitTestVisible=\"false\"\r\n                                   Opacity=\"0\"\r\n                                   Fill=\"#A5FFFFFF\"\r\n                                   RadiusX=\"3\"\r\n                                   RadiusY=\"3\"/>\r\n                                                <Rectangle x:Name=\"FocusVisualElement\"\r\n                                   IsHitTestVisible=\"false\"\r\n                                   Visibility=\"Collapsed\"\r\n                                   Stroke=\"{StaticResource NormalBrush}\"\r\n                                   StrokeThickness=\"1\"\r\n                                   RadiusX=\"3.5\"\r\n                                   RadiusY=\"3.5\"\r\n                                   Grid.ColumnSpan=\"2\"/>\r\n                                            </Grid>\r\n                                        </ControlTemplate>\r\n                                    </Setter.Value>\r\n                                </Setter>\r\n                            </Style>\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"0.65\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"ContentPresenterBorder\">\r\n                            <Grid>\r\n                                <ToggleButton Background=\"{TemplateBinding Background}\"\r\n                              BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                              BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                              HorizontalContentAlignment=\"Right\"\r\n                              HorizontalAlignment=\"Stretch\"\r\n                              x:Name=\"DropDownToggle\"\r\n                              Style=\"{DynamicResource comboToggleStyle}\"\r\n                              VerticalAlignment=\"Stretch\"\r\n                              IsChecked=\"{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\">\r\n                                    <Path Height=\"4\"\r\n                        HorizontalAlignment=\"Right\"\r\n                        Margin=\"0,0,6,0\"\r\n                        x:Name=\"BtnArrow\"\r\n                        Width=\"8\"\r\n                        Stretch=\"Uniform\"\r\n                        Data=\"F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z \">\r\n                                        <Path.Fill>\r\n                                            <SolidColorBrush Color=\"#FF333333\"\r\n                                       x:Name=\"BtnArrowColor\"/>\r\n                                        </Path.Fill>\r\n                                    </Path>\r\n                                </ToggleButton>\r\n                                <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                                  Margin=\"{TemplateBinding Padding}\"\r\n                                  x:Name=\"ContentPresenter\"\r\n                                  VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                                                  Content=\"{TemplateBinding SelectionBoxItem}\" ContentTemplate=\"{TemplateBinding SelectionBoxItemTemplate}\" ContentTemplateSelector=\"{TemplateBinding ItemTemplateSelector}\" IsHitTestVisible=\"False\">\r\n                                </ContentPresenter>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Rectangle x:Name=\"DisabledVisualElement\"\r\n                       IsHitTestVisible=\"false\"\r\n                       Fill=\"{StaticResource DisabledBackgroundBrush}\"\r\n                       RadiusX=\"4\"\r\n                       RadiusY=\"4\"\r\n                       Opacity=\"0\"\r\n                       StrokeThickness=\"0\"/>\r\n                        <Rectangle x:Name=\"FocusVisualElement\"\r\n                       IsHitTestVisible=\"false\"\r\n                       Opacity=\"0\"\r\n                       Stroke=\"{StaticResource HoverBrush}\"\r\n                       StrokeThickness=\"1\"\r\n                       RadiusX=\"3\"\r\n                       RadiusY=\"3\"/>\r\n                        <Popup x:Name=\"Popup\" IsOpen=\"{TemplateBinding IsDropDownOpen}\">\r\n                            <Grid MaxHeight=\"{TemplateBinding MaxDropDownHeight}\" MinWidth=\"{TemplateBinding ActualWidth}\" x:Name=\"DropDown\" SnapsToDevicePixels=\"True\">\r\n\r\n                                <Border Height=\"Auto\"\r\n                      HorizontalAlignment=\"Stretch\"\r\n                      x:Name=\"PopupBorder\"\r\n                      BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                      BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                      CornerRadius=\"3\"\r\n                      Background=\"{StaticResource ShadeBrush}\">\r\n                                    <ScrollViewer BorderThickness=\"0\"                                             \r\n                                              Padding=\"1\" \r\n                                              SnapsToDevicePixels=\"True\" \r\n                                              HorizontalScrollBarVisibility=\"Auto\" \r\n                                              VerticalScrollBarVisibility=\"Auto\" \r\n                                              CanContentScroll=\"True\">\r\n                                        <ItemsPresenter/>\r\n                                    </ScrollViewer>\r\n                                </Border>\r\n\r\n                            </Grid>\r\n                        </Popup>\r\n\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\"\r\n            Value=\"#FF000000\"/>\r\n    </Style>\r\n    <!--Textbox-->\r\n    <Style TargetType=\"TextBox\">\r\n        <Setter Property=\"BorderThickness\"\r\n            Value=\"1\"/>\r\n        <Setter Property=\"Background\"\r\n            Value=\"{StaticResource ShadeBrush}\"/>\r\n        <Setter Property=\"Foreground\"\r\n            Value=\"#FF000000\"/>\r\n        <Setter Property=\"Padding\"\r\n            Value=\"2\"/>\r\n        <Setter Property=\"BorderBrush\"\r\n            Value=\"{StaticResource NormalBorderBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TextBox\">\r\n                    <Grid >\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                        To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                        To=\"ReadOnly\"/>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                        To=\"Disabled\"/>\r\n                                    <VisualTransition From=\"Normal\"\r\n                                        GeneratedDuration=\"00:00:00.3000000\"\r\n                                        To=\"MouseOver\"/>\r\n                                    <VisualTransition From=\"MouseOver\"\r\n                                        GeneratedDuration=\"00:00:00.5000000\"\r\n                                        To=\"Normal\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"HoverBorder\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\"\r\n                                                   Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.6\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ReadOnly\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ReadOnlyVisualElement\"\r\n                                                   Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"Border\"\r\n                    Opacity=\"1\"\r\n                    Background=\"{TemplateBinding Background}\"\r\n                    BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                    BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                    CornerRadius=\"2,2,2,2\">\r\n                            <Grid>\r\n                                <Border x:Name=\"ReadOnlyVisualElement\"\r\n                        Opacity=\"0\"\r\n                        Background=\"#72F7F7F7\"/>\r\n                                <Border BorderThickness=\"1\"\r\n                        CornerRadius=\"1,1,1,1\">\r\n                                    <Border.BorderBrush>\r\n                                        <SolidColorBrush Color=\"Transparent\"\r\n                                     x:Name=\"MouseOverColor\"/>\r\n                                    </Border.BorderBrush>\r\n                                    <ScrollViewer BorderThickness=\"0\"\r\n                                IsTabStop=\"False\"\r\n                                Padding=\"{TemplateBinding Padding}\"\r\n                                x:Name=\"PART_ContentHost\"/>\r\n                                </Border>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Border x:Name=\"HoverBorder\"\r\n                    Opacity=\"0\"\r\n                    BorderBrush=\"{StaticResource NormalBrush}\"\r\n                    BorderThickness=\"2,2,2,2\"\r\n                    CornerRadius=\"2,2,2,2\"/>\r\n                        <Border x:Name=\"DisabledVisualElement\"\r\n                    IsHitTestVisible=\"False\"\r\n                    Opacity=\"0\"\r\n                    Background=\"#FFFFFFFF\"\r\n                    BorderBrush=\"#A5F7F7F7\"\r\n                    BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                    CornerRadius=\"2,2,2,2\"/>\r\n                        <Border Margin=\"1\"\r\n                    x:Name=\"FocusVisualElement\"\r\n                    IsHitTestVisible=\"False\"\r\n                    Opacity=\"0\"\r\n                    BorderBrush=\"{StaticResource NormalBrush}\"\r\n                    BorderThickness=\"2.1,2.1,2.1,2.1\"\r\n                    CornerRadius=\"0.2,0.2,0.2,0.2\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--ProgressBar-->\r\n    <Style TargetType=\"ProgressBar\">\r\n        <Setter Property=\"Foreground\"\r\n            Value=\"{StaticResource NormalBrush}\"/>\r\n        <Setter Property=\"Background\"\r\n            Value=\"{StaticResource SelectedBackgroundBrush}\"/>\r\n        <Setter Property=\"BorderThickness\"\r\n            Value=\"2\"/>\r\n        <Setter Property=\"Maximum\"\r\n            Value=\"100\"/>\r\n        <Setter Property=\"IsTabStop\"\r\n            Value=\"False\"/>\r\n        <Setter Property=\"BorderBrush\"\r\n            Value=\"{StaticResource DisabledBackgroundBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ProgressBar\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <Border x:Name=\"PART_Track\"\r\n                    Background=\"{TemplateBinding Background}\"\r\n                    BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                    BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                    CornerRadius=\"6,6,6,6\"/>\r\n                        <Grid x:Name=\"ProgressBarRootGrid\">\r\n                            <Grid x:Name=\"IndeterminateRoot\"\r\n                    Visibility=\"Collapsed\">\r\n                                <Rectangle Margin=\"1,1,1,1\"\r\n                           x:Name=\"IndeterminateGradientFill\"\r\n                           Opacity=\"0.7\"\r\n                           RadiusX=\"5\"\r\n                           RadiusY=\"5\"\r\n                           StrokeThickness=\"0\">\r\n                                    <Rectangle.Fill>\r\n                                        <LinearGradientBrush EndPoint=\"0,1\"\r\n                                         StartPoint=\"20,1\"\r\n                                         MappingMode=\"Absolute\"\r\n                                         SpreadMethod=\"Repeat\">\r\n                                            <LinearGradientBrush.Transform>\r\n                                                <TransformGroup>\r\n                                                    <TranslateTransform X=\"0\"/>\r\n                                                    <SkewTransform AngleX=\"-30\"/>\r\n                                                </TransformGroup>\r\n                                            </LinearGradientBrush.Transform>\r\n                                            <GradientStop Color=\"#FFFFFFFF\"\r\n                                    Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#00FFFFFF\"\r\n                                    Offset=\".25\"/>\r\n                                            <GradientStop Color=\"#FFFFFFFF\"\r\n                                    Offset=\"0.85\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Rectangle.Fill>\r\n                                    <Rectangle.OpacityMask>\r\n                                        <LinearGradientBrush EndPoint=\"0.004,0.465\"\r\n                                         StartPoint=\"0.997,0.422\">\r\n                                            <GradientStop Color=\"#00FFFFFF\"/>\r\n                                            <GradientStop Color=\"#00FFFFFF\"\r\n                                    Offset=\"1\"/>\r\n                                            <GradientStop Color=\"#FFFFFFFF\"\r\n                                    Offset=\"0.486\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Rectangle.OpacityMask>\r\n                                </Rectangle>\r\n                            </Grid>\r\n                            <Grid Margin=\"1\"\r\n                    x:Name=\"DeterminateRoot\">\r\n                                <Rectangle HorizontalAlignment=\"Left\"\r\n                           Margin=\"1,1,1,1\"\r\n                           x:Name=\"PART_Indicator\"\r\n                           Fill=\"{TemplateBinding Foreground}\"\r\n                           StrokeThickness=\"0.5\"\r\n                           RadiusX=\"5\"\r\n                           RadiusY=\"5\"/>\r\n                            </Grid>\r\n                        </Grid>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsIndeterminate\" Value=\"True\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard>\r\n                                    <Storyboard RepeatBehavior=\"Forever\">\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00\" Storyboard.TargetName=\"IndeterminateRoot\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00\" Storyboard.TargetName=\"DeterminateRoot\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"IndeterminateGradientFill\" Storyboard.TargetProperty=\"(Shape.Fill).(LinearGradientBrush.Transform).(TransformGroup.Children)[0].X\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0\" />\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:2.4\" Value=\"145\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </BeginStoryboard>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--Thumb-->\r\n    <Style  TargetType=\"Thumb\">\r\n        <Setter Property=\"Background\"\r\n            Value=\"{StaticResource NormalBrush}\"/>\r\n        <Setter Property=\"BorderThickness\"\r\n            Value=\"2\"/>\r\n        <Setter Property=\"IsTabStop\"\r\n            Value=\"False\"/>\r\n        <Setter Property=\"BorderBrush\"\r\n            Value=\"{StaticResource NormalBorderBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Thumb\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                        To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                        To=\"Pressed\"/>\r\n                                    <VisualTransition From=\"Normal\"\r\n                                        GeneratedDuration=\"00:00:00.3000000\"\r\n                                        To=\"MouseOver\"/>\r\n                                    <VisualTransition From=\"MouseOver\"\r\n                                        GeneratedDuration=\"00:00:00.5000000\"\r\n                                        To=\"Normal\"/>\r\n                                    <VisualTransition From=\"Pressed\"\r\n                                        GeneratedDuration=\"00:00:00.5000000\"\r\n                                        To=\"MouseOver\"/>\r\n                                    <VisualTransition From=\"MouseOver\"\r\n                                        GeneratedDuration=\"00:00:00.3000000\"\r\n                                        To=\"Pressed\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundAnimation\"\r\n                                                   Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"Background\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"0.7\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.65\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Rectangle x:Name=\"Base\"\r\n                       RadiusX=\"5\"\r\n                       RadiusY=\"5\"\r\n                       Fill=\"#FF000000\"\r\n                       StrokeThickness=\"0\"/>\r\n                        <Rectangle x:Name=\"Background\"\r\n                       Fill=\"{TemplateBinding Background}\"\r\n                       Stroke=\"{TemplateBinding BorderBrush}\"\r\n                       StrokeThickness=\"2\"\r\n                       RadiusX=\"4\"\r\n                       RadiusY=\"4\"/>\r\n                        <Rectangle x:Name=\"BackgroundAnimation\"\r\n                       Opacity=\"0\"\r\n                       Fill=\"{StaticResource HoverBrush}\"\r\n                       RadiusX=\"3\"\r\n                       RadiusY=\"3\"\r\n                       Margin=\"2,2,2,2\"\r\n                       StrokeThickness=\"0\"/>\r\n                        <Rectangle x:Name=\"DisabledVisualElement\"\r\n                       IsHitTestVisible=\"false\"\r\n                       Opacity=\"0\"\r\n                       Fill=\"{StaticResource DisabledBackgroundBrush}\"\r\n                       RadiusX=\"5\"\r\n                       RadiusY=\"5\"/>\r\n                        <Rectangle x:Name=\"FocusVisualElement\"\r\n                       IsHitTestVisible=\"false\"\r\n                       Visibility=\"Collapsed\"\r\n                       Stroke=\"{StaticResource HoverBrush}\"\r\n                       StrokeThickness=\"1\"\r\n                       RadiusX=\"4.5\"\r\n                       RadiusY=\"4.5\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--Slider-->\r\n    <Style TargetType=\"Slider\">\r\n        <Setter Property=\"BorderThickness\"\r\n            Value=\"1\"/>\r\n        <Setter Property=\"Maximum\"\r\n            Value=\"10\"/>\r\n        <Setter Property=\"Minimum\"\r\n            Value=\"0\"/>\r\n        <Setter Property=\"Value\"\r\n            Value=\"0\"/>\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\"\r\n                             StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"#FFA3AEB9\"\r\n                        Offset=\"0\"/>\r\n                    <GradientStop Color=\"#FF8399A9\"\r\n                        Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF718597\"\r\n                        Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF617584\"\r\n                        Offset=\"1\"/>\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"IsTabStop\"\r\n            Value=\"False\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Slider\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <Grid.Resources>\r\n                            <ControlTemplate x:Key=\"RepeatButtonTemplate\">\r\n                                <Grid x:Name=\"Root\"\r\n                      Opacity=\"0\"\r\n                      Background=\"Transparent\"/>\r\n                            </ControlTemplate>\r\n                            <Style x:Key=\"SLSliderVerticalThumb\"\r\n                     TargetType=\"Thumb\">\r\n                                <Setter Property=\"Background\"\r\n                        Value=\"{StaticResource NormalBrush}\"/>\r\n                                <Setter Property=\"BorderThickness\"\r\n                        Value=\"1\"/>\r\n                                <Setter Property=\"IsTabStop\"\r\n                        Value=\"False\"/>\r\n                                <Setter Property=\"BorderBrush\"\r\n                        Value=\"{StaticResource NormalBorderBrush}\" />\r\n                                <Setter Property=\"Template\">\r\n                                    <Setter.Value>\r\n                                        <ControlTemplate TargetType=\"Thumb\">\r\n                                            <Grid>\r\n                                                <VisualStateManager.VisualStateGroups>\r\n                                                    <VisualStateGroup x:Name=\"CommonStates\">\r\n                                                        <VisualStateGroup.Transitions>\r\n                                                            <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                                    To=\"MouseOver\"/>\r\n                                                            <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                                    To=\"Pressed\"/>\r\n                                                            <VisualTransition From=\"Normal\"\r\n                                                    GeneratedDuration=\"00:00:00.3000000\"\r\n                                                    To=\"MouseOver\"/>\r\n                                                            <VisualTransition From=\"MouseOver\"\r\n                                                    GeneratedDuration=\"00:00:00.5000000\"\r\n                                                    To=\"Normal\"/>\r\n                                                            <VisualTransition From=\"Pressed\"\r\n                                                    GeneratedDuration=\"00:00:00.5000000\"\r\n                                                    To=\"MouseOver\"/>\r\n                                                            <VisualTransition From=\"MouseOver\"\r\n                                                    GeneratedDuration=\"00:00:00.3000000\"\r\n                                                    To=\"Pressed\"/>\r\n                                                        </VisualStateGroup.Transitions>\r\n                                                        <VisualState x:Name=\"Normal\"/>\r\n                                                        <VisualState x:Name=\"MouseOver\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundAnimation\"\r\n                                                               Storyboard.TargetProperty=\"Opacity\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                                        Value=\"1\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Pressed\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                               Duration=\"00:00:00.0010000\"\r\n                                                               Storyboard.TargetName=\"Background\"\r\n                                                               Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                                        Value=\"0.7\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Disabled\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\"\r\n                                                               Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                                        Value=\"0.65\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                    </VisualStateGroup>\r\n                                                </VisualStateManager.VisualStateGroups>\r\n                                                <Rectangle x:Name=\"Base\"\r\n                                   RadiusX=\"5.1\"\r\n                                   RadiusY=\"5.1\"\r\n                                   Fill=\"#FF000000\"/>\r\n                                                <Rectangle x:Name=\"Background\"\r\n                                   Fill=\"{TemplateBinding Background}\"\r\n                                   Stroke=\"{TemplateBinding BorderBrush}\"\r\n                                   StrokeThickness=\"2\"\r\n                                   RadiusX=\"4\"\r\n                                   RadiusY=\"4\"/>\r\n                                                <Rectangle Margin=\"2,2,2,2\"\r\n                                   x:Name=\"BackgroundAnimation\"\r\n                                   Opacity=\"0\"\r\n                                   Fill=\"{StaticResource HoverBrush}\"\r\n                                   RadiusX=\"3\"\r\n                                   RadiusY=\"3\"/>\r\n                                                <Rectangle x:Name=\"DisabledVisualElement\"\r\n                                   IsHitTestVisible=\"false\"\r\n                                   Opacity=\"0\"\r\n                                   Fill=\"{StaticResource DisabledBackgroundBrush}\"\r\n                                   RadiusX=\"5\"\r\n                                   RadiusY=\"5\"/>\r\n                                                <Rectangle x:Name=\"FocusVisualElement\"\r\n                                   IsHitTestVisible=\"false\"\r\n                                   Visibility=\"Collapsed\"\r\n                                   Stroke=\"{StaticResource HoverBrush}\"\r\n                                   StrokeThickness=\"1\"\r\n                                   RadiusX=\"4.5\"\r\n                                   RadiusY=\"4.5\"/>\r\n                                            </Grid>\r\n                                        </ControlTemplate>\r\n                                    </Setter.Value>\r\n                                </Setter>\r\n                            </Style>\r\n                            <Style x:Key=\"SLSliderHorizontalThumb\"\r\n                     TargetType=\"Thumb\">\r\n                                <Setter Property=\"Background\"\r\n                        Value=\"{StaticResource NormalBrush}\"/>\r\n                                <Setter Property=\"BorderThickness\"\r\n                        Value=\"2\"/>\r\n                                <Setter Property=\"IsTabStop\"\r\n                        Value=\"False\"/>\r\n                                <Setter Property=\"BorderBrush\"\r\n                        Value=\"{StaticResource NormalBorderBrush}\" />\r\n                                <Setter Property=\"Template\">\r\n                                    <Setter.Value>\r\n                                        <ControlTemplate TargetType=\"Thumb\">\r\n                                            <Grid>\r\n                                                <VisualStateManager.VisualStateGroups>\r\n                                                    <VisualStateGroup x:Name=\"CommonStates\">\r\n                                                        <VisualStateGroup.Transitions>\r\n                                                            <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                                    To=\"MouseOver\"/>\r\n                                                            <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                                    To=\"Pressed\"/>\r\n                                                            <VisualTransition From=\"Normal\"\r\n                                                    GeneratedDuration=\"00:00:00.3000000\"\r\n                                                    To=\"MouseOver\"/>\r\n                                                            <VisualTransition From=\"MouseOver\"\r\n                                                    GeneratedDuration=\"00:00:00.5000000\"\r\n                                                    To=\"Normal\"/>\r\n                                                            <VisualTransition From=\"Pressed\"\r\n                                                    GeneratedDuration=\"00:00:00.5000000\"\r\n                                                    To=\"MouseOver\"/>\r\n                                                            <VisualTransition From=\"MouseOver\"\r\n                                                    GeneratedDuration=\"00:00:00.3000000\"\r\n                                                    To=\"Pressed\"/>\r\n                                                        </VisualStateGroup.Transitions>\r\n                                                        <VisualState x:Name=\"Normal\"/>\r\n                                                        <VisualState x:Name=\"MouseOver\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundAnimation\"\r\n                                                               Storyboard.TargetProperty=\"Opacity\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                                        Value=\"1\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Pressed\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                               Duration=\"00:00:00.0010000\"\r\n                                                               Storyboard.TargetName=\"Background\"\r\n                                                               Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                                        Value=\"0.7\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Disabled\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\"\r\n                                                               Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                                        Value=\"0.65\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                    </VisualStateGroup>\r\n                                                </VisualStateManager.VisualStateGroups>\r\n                                                <Rectangle x:Name=\"Base\"\r\n                                   RadiusX=\"5\"\r\n                                   RadiusY=\"5\"\r\n                                   Fill=\"#FF000000\"\r\n                                   StrokeThickness=\"0\"/>\r\n                                                <Rectangle x:Name=\"Background\"\r\n                                   Fill=\"{TemplateBinding Background}\"\r\n                                   Stroke=\"{TemplateBinding BorderBrush}\"\r\n                                   StrokeThickness=\"2\"\r\n                                   RadiusX=\"4\"\r\n                                   RadiusY=\"4\"/>\r\n                                                <Rectangle x:Name=\"BackgroundAnimation\"\r\n                                   Opacity=\"0\"\r\n                                   Fill=\"{StaticResource HoverBrush}\"\r\n                                   RadiusX=\"3\"\r\n                                   RadiusY=\"3\"\r\n                                   Margin=\"2,2,2,2\"\r\n                                   StrokeThickness=\"0\"/>\r\n                                                <Rectangle x:Name=\"DisabledVisualElement\"\r\n                                   IsHitTestVisible=\"false\"\r\n                                   Opacity=\"0\"\r\n                                   Fill=\"{StaticResource DisabledBackgroundBrush}\"\r\n                                   RadiusX=\"5\"\r\n                                   RadiusY=\"5\"/>\r\n                                                <Rectangle x:Name=\"FocusVisualElement\"\r\n                                   IsHitTestVisible=\"false\"\r\n                                   Visibility=\"Collapsed\"\r\n                                   Stroke=\"{StaticResource HoverBrush}\"\r\n                                   StrokeThickness=\"1\"\r\n                                   RadiusX=\"4.5\"\r\n                                   RadiusY=\"4.5\"/>\r\n                                            </Grid>\r\n                                        </ControlTemplate>\r\n                                    </Setter.Value>\r\n                                </Setter>\r\n                            </Style>\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Root\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid x:Name=\"HorizontalTemplate\"\r\n                  Background=\"{TemplateBinding Background}\">\r\n                            <Rectangle Height=\"5\"\r\n                         Margin=\"5,0,5,0\"\r\n                         Fill=\"{StaticResource SelectedBackgroundBrush}\"\r\n                         Stroke=\"{StaticResource HorizontalSliderBorderBrush}\"\r\n                         StrokeThickness=\"{TemplateBinding BorderThickness}\"/>\r\n\r\n\r\n                            <Track x:Name=\"PART_Track\">\r\n                                <Track.Thumb>\r\n                                    <Thumb IsTabStop=\"True\"\r\n                     Height=\"13\"\r\n                     x:Name=\"HorizontalThumb\"\r\n                     Width=\"24\"\r\n                     Grid.Column=\"1\"\r\n                     Style=\"{StaticResource SLSliderHorizontalThumb}\"\r\n                     Margin=\"0,0,0,0\"/>\r\n                                </Track.Thumb>\r\n                                <Track.IncreaseRepeatButton>\r\n                                    <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Command=\"Slider.IncreaseLarge\" />\r\n                                </Track.IncreaseRepeatButton>\r\n                                <Track.DecreaseRepeatButton>\r\n                                    <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Command=\"Slider.DecreaseLarge\" />\r\n                                </Track.DecreaseRepeatButton>\r\n                            </Track>\r\n\r\n\r\n                        </Grid>\r\n                        <Grid x:Name=\"VerticalTemplate\"\r\n                  Visibility=\"Collapsed\"\r\n                  Background=\"{TemplateBinding Background}\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"*\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <Rectangle Margin=\"0,5,0,5\"\r\n                         Width=\"5\"\r\n                         Grid.Row=\"0\"\r\n                         Grid.RowSpan=\"3\"\r\n                         StrokeThickness=\"{TemplateBinding BorderThickness}\"\r\n                         Fill=\"{StaticResource SelectedBackgroundBrushVertical}\"\r\n                         Stroke=\"{StaticResource VerticalSliderBorderBrush}\"/>\r\n                            <RepeatButton IsTabStop=\"False\"\r\n                            Template=\"{StaticResource RepeatButtonTemplate}\"\r\n                            x:Name=\"VerticalTrackLargeChangeDecreaseRepeatButton\"\r\n                            Grid.Row=\"2\"/>\r\n                            <Thumb IsTabStop=\"True\"\r\n                     Height=\"24\"\r\n                     x:Name=\"VerticalThumb\"\r\n                     Width=\"13\"\r\n                     Grid.Row=\"1\"\r\n                     Style=\"{StaticResource SLSliderVerticalThumb}\"/>\r\n                            <RepeatButton IsTabStop=\"False\"\r\n                            Template=\"{StaticResource RepeatButtonTemplate}\"\r\n                            x:Name=\"VerticalTrackLargeChangeIncreaseRepeatButton\"\r\n                            Grid.Row=\"0\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--ToggleButton-->\r\n    <Style  TargetType=\"ToggleButton\">\r\n        <Setter Property=\"Background\"\r\n            Value=\"{StaticResource SelectedBackgroundBrush}\"/>\r\n        <Setter Property=\"Foreground\"\r\n            Value=\"#FFFFFFFF\"/>\r\n        <Setter Property=\"Padding\"\r\n            Value=\"3\"/>\r\n        <Setter Property=\"BorderThickness\"\r\n            Value=\"2\"/>\r\n        <Setter Property=\"BorderBrush\"\r\n            Value=\"{StaticResource NormalBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ToggleButton\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                        To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                        To=\"Pressed\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundAnimation\"\r\n                                                   Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.3\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundAnimation\"\r\n                                                   Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.65\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"CheckedBorder\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"Background\"\r\n                    Background=\"{TemplateBinding Background}\"\r\n                    BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                    BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                    CornerRadius=\"4,4,4,4\"\r\n                    Opacity=\"0.9\"/>\r\n                        <Border x:Name=\"CheckedBorder\"\r\n                    Opacity=\"0\"\r\n                    Background=\"{StaticResource NormalBrush}\"\r\n                    BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                    BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                    CornerRadius=\"4\"/>\r\n                        <Border x:Name=\"BackgroundAnimation\"\r\n                    Opacity=\"0\"\r\n                    Background=\"#FFFFFFFF\"\r\n                    BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                    BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                    CornerRadius=\"4\"/>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                              Margin=\"{TemplateBinding Padding}\"\r\n                              x:Name=\"contentPresenter\"\r\n                              VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                              Content=\"{TemplateBinding Content}\"\r\n                              ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                        <Border x:Name=\"DisabledVisualElement\"\r\n                    IsHitTestVisible=\"false\"\r\n                    Opacity=\"0\"\r\n                    Background=\"{StaticResource DisabledBackgroundBrush}\"\r\n                    CornerRadius=\"4\"/>\r\n                        <Border x:Name=\"FocusVisualElement\"\r\n                    IsHitTestVisible=\"false\"\r\n                    Visibility=\"Collapsed\"\r\n                    BorderBrush=\"{StaticResource HoverBrush}\"\r\n                    BorderThickness=\"1\"\r\n                    CornerRadius=\"3\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- Expander -->\r\n    <Style TargetType=\"Expander\">\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Expander\">\r\n                    <Grid Background=\"Transparent\">\r\n                        <Grid.Resources>\r\n\r\n                            <Style x:Key=\"SLExpanderContentControl\" TargetType=\"ContentControl\">\r\n                                <Setter Property=\"Foreground\" Value=\"#FF000000\"/>\r\n                                <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n                                <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n                                <Setter Property=\"Template\">\r\n                                    <Setter.Value>\r\n                                        <ControlTemplate TargetType=\"ContentControl\">\r\n                                        </ControlTemplate>\r\n                                    </Setter.Value>\r\n                                </Setter>\r\n                            </Style>\r\n\r\n                            <LinearGradientBrush x:Key=\"ExpanderArrowFill\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n                                <GradientStop Color=\"White\" Offset=\"0\"/>\r\n                                <GradientStop Color=\"#FFBFBFBF\" Offset=\"0.5\"/>\r\n                                <GradientStop Color=\"#FF878787\" Offset=\"1\"/>\r\n                            </LinearGradientBrush>\r\n                            <LinearGradientBrush x:Key=\"ExpanderArrowHoverFill\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n                                <GradientStop Color=\"#FFF0F8FE\" Offset=\"0\"/>\r\n                                <GradientStop Color=\"#FFE0F3FE\" Offset=\"0.3\"/>\r\n                                <GradientStop Color=\"#FF6FA7C5\" Offset=\"1\"/>\r\n                            </LinearGradientBrush>\r\n                            <LinearGradientBrush x:Key=\"ExpanderArrowPressedFill\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n                                <GradientStop Color=\"#FFDCF0FA\" Offset=\"0\"/>\r\n                                <GradientStop Color=\"#FFC5E6F7\" Offset=\"0.2\"/>\r\n                                <GradientStop Color=\"#FF5690D0\" Offset=\"1\"/>\r\n                            </LinearGradientBrush>\r\n                            <ControlTemplate x:Key=\"ExpanderDownHeaderTemplate\" TargetType=\"ToggleButton\">\r\n                                <Grid Background=\"Transparent\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CheckStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Checked\">\r\n                                                <!--                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"Data\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"M 1,4.5 L 4.5,1 L 8,4.5\"/>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>-->\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Unchecked\"/>\r\n                                        </VisualStateGroup>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\"/>\r\n                                                <VisualTransition From=\"Normal\" GeneratedDuration=\"00:00:00.3000000\" To=\"MouseOver\"/>\r\n                                                <VisualTransition From=\"MouseOver\" GeneratedDuration=\"00:00:00.5000000\" To=\"Normal\"/>\r\n                                                <VisualTransition From=\"Pressed\" GeneratedDuration=\"00:00:00.5000000\" To=\"MouseOver\"/>\r\n                                                <VisualTransition From=\"MouseOver\" GeneratedDuration=\"00:00:00.3000000\" To=\"Pressed\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"FullControlHover\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.7\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Border Padding=\"{TemplateBinding Padding}\" CornerRadius=\"3,3,3,3\" BorderBrush=\"{StaticResource NormalBorderBrush}\" BorderThickness=\"2,2,2,2\" Background=\"#FFFFFFFF\">\r\n                                        <Grid Background=\"Transparent\">\r\n                                            <Grid.ColumnDefinitions>\r\n                                                <ColumnDefinition Width=\"19\"/>\r\n                                                <ColumnDefinition Width=\"*\"/>\r\n                                            </Grid.ColumnDefinitions>\r\n                                            <Grid HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\">\r\n                                                <Border Height=\"19\" Width=\"19\" Background=\"{StaticResource NormalBrush}\" BorderBrush=\"{StaticResource NormalBorderBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"3,3,3,3\" x:Name=\"Background\"/>\r\n                                                <Border Height=\"19\" x:Name=\"HoverBorder\" Width=\"19\" Background=\"{StaticResource HoverBrush}\" BorderBrush=\"{StaticResource NormalBorderBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"3,3,3,3\" Opacity=\"0\"/>\r\n                                                <Path HorizontalAlignment=\"Center\" x:Name=\"arrow\" VerticalAlignment=\"Center\" StrokeThickness=\"2\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\">\r\n                                                    <Path.Stroke>\r\n                                                        <SolidColorBrush Color=\"Black\"/>\r\n                                                    </Path.Stroke>\r\n                                                </Path>\r\n                                            </Grid>\r\n                                            <ContentPresenter HorizontalAlignment=\"Left\" Margin=\"4,0,0,0\" x:Name=\"header\" VerticalAlignment=\"Center\" Grid.Column=\"1\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                                        </Grid>\r\n                                    </Border>\r\n                                    <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HoverBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"3\"/>\r\n                                    <Border x:Name=\"FullControlHover\" IsHitTestVisible=\"false\" Visibility=\"Visible\" BorderBrush=\"{StaticResource NormalBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"3\" Opacity=\"0\"/>\r\n                                </Grid>\r\n                                <ControlTemplate.Triggers>\r\n                                    <Trigger Property=\"IsChecked\" Value=\"True\">\r\n                                        <Setter Property=\"Data\" TargetName=\"arrow\" Value=\"M 1,4.5 L 4.5,1 L 8,4.5\" />\r\n                                    </Trigger>\r\n                                </ControlTemplate.Triggers>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"ExpanderUpHeaderTemplate\" TargetType=\"ToggleButton\">\r\n                                <Grid Background=\"Transparent\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CheckStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Checked\">\r\n                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"Data\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"M 1,4.5 L 4.5,1 L 8,4.5\"/>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Unchecked\"/>\r\n                                        </VisualStateGroup>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\"/>\r\n                                                <VisualTransition From=\"Normal\" GeneratedDuration=\"00:00:00.3000000\" To=\"MouseOver\"/>\r\n                                                <VisualTransition From=\"MouseOver\" GeneratedDuration=\"00:00:00.5000000\" To=\"Normal\"/>\r\n                                                <VisualTransition From=\"Pressed\" GeneratedDuration=\"00:00:00.5000000\" To=\"MouseOver\"/>\r\n                                                <VisualTransition From=\"MouseOver\" GeneratedDuration=\"00:00:00.3000000\" To=\"Pressed\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"FullControlHover\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.7\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Border Padding=\"{TemplateBinding Padding}\" BorderBrush=\"{StaticResource NormalBorderBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"3,3,3,3\" Background=\"#FFFFFFFF\">\r\n                                        <Grid Background=\"Transparent\">\r\n                                            <Grid.ColumnDefinitions>\r\n                                                <ColumnDefinition Width=\"19\"/>\r\n                                                <ColumnDefinition Width=\"*\"/>\r\n                                            </Grid.ColumnDefinitions>\r\n                                            <Grid HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\">\r\n                                                <Grid.RenderTransform>\r\n                                                    <TransformGroup>\r\n                                                        <TransformGroup.Children>\r\n                                                            <TransformCollection>\r\n                                                                <RotateTransform Angle=\"180\" CenterX=\"9.5\" CenterY=\"9.5\"/>\r\n                                                            </TransformCollection>\r\n                                                        </TransformGroup.Children>\r\n                                                    </TransformGroup>\r\n                                                </Grid.RenderTransform>\r\n                                                <Border Height=\"19\" Width=\"19\" Background=\"{StaticResource NormalBrush}\" BorderBrush=\"{StaticResource NormalBorderBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"3,3,3,3\" x:Name=\"Background\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                                    <Border.RenderTransform>\r\n                                                        <TransformGroup>\r\n                                                            <ScaleTransform/>\r\n                                                            <SkewTransform/>\r\n                                                            <RotateTransform Angle=\"180\"/>\r\n                                                            <TranslateTransform/>\r\n                                                        </TransformGroup>\r\n                                                    </Border.RenderTransform>\r\n                                                </Border>\r\n                                                <Border Height=\"19\" x:Name=\"HoverBorder\" Width=\"19\" Background=\"{StaticResource HoverBrush}\" BorderBrush=\"{x:Null}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"3,3,3,3\" RenderTransformOrigin=\"0.5,0.5\" Opacity=\"0\">\r\n                                                    <Border.RenderTransform>\r\n                                                        <TransformGroup>\r\n                                                            <ScaleTransform/>\r\n                                                            <SkewTransform/>\r\n                                                            <RotateTransform Angle=\"180\"/>\r\n                                                            <TranslateTransform/>\r\n                                                        </TransformGroup>\r\n                                                    </Border.RenderTransform>\r\n                                                </Border>\r\n                                                <Path HorizontalAlignment=\"Center\" x:Name=\"arrow\" VerticalAlignment=\"Center\" StrokeThickness=\"2\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\">\r\n                                                    <Path.Stroke>\r\n                                                        <SolidColorBrush Color=\"Black\"/>\r\n                                                    </Path.Stroke>\r\n                                                </Path>\r\n                                            </Grid>\r\n                                            <ContentPresenter HorizontalAlignment=\"Left\" Margin=\"4,0,0,0\" x:Name=\"header\" VerticalAlignment=\"Center\" Grid.Column=\"1\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                                        </Grid>\r\n                                    </Border>\r\n                                    <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HoverBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"3\"/>\r\n                                    <Border x:Name=\"FullControlHover\" IsHitTestVisible=\"false\" Visibility=\"Visible\" BorderBrush=\"{StaticResource NormalBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"3\" Opacity=\"0\"/>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"ExpanderLeftHeaderTemplate\" TargetType=\"ToggleButton\">\r\n                                <Grid Background=\"Transparent\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CheckStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Checked\">\r\n                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"Data\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"M 1,4.5 L 4.5,1 L 8,4.5\"/>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Unchecked\"/>\r\n                                        </VisualStateGroup>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\"/>\r\n                                                <VisualTransition From=\"Normal\" GeneratedDuration=\"00:00:00.3000000\" To=\"MouseOver\"/>\r\n                                                <VisualTransition From=\"MouseOver\" GeneratedDuration=\"00:00:00.5000000\" To=\"Normal\"/>\r\n                                                <VisualTransition From=\"Pressed\" GeneratedDuration=\"00:00:00.5000000\" To=\"MouseOver\"/>\r\n                                                <VisualTransition From=\"MouseOver\" GeneratedDuration=\"00:00:00.3000000\" To=\"Pressed\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"FullControlHover\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.7\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Border CornerRadius=\"3,3,3,3\" BorderBrush=\"{StaticResource NormalBorderBrush}\" BorderThickness=\"2,2,2,2\" Padding=\"0,2,0,2\" Width=\"38\" Background=\"#FFFFFFFF\">\r\n                                        <Grid Background=\"Transparent\">\r\n                                            <Grid.RowDefinitions>\r\n                                                <RowDefinition Height=\"19\"/>\r\n                                                <RowDefinition Height=\"*\"/>\r\n                                            </Grid.RowDefinitions>\r\n                                            <Grid HorizontalAlignment=\"Center\" VerticalAlignment=\"Top\">\r\n                                                <Grid.RenderTransform>\r\n                                                    <TransformGroup>\r\n                                                        <TransformGroup.Children>\r\n                                                            <TransformCollection>\r\n                                                                <RotateTransform Angle=\"90\" CenterX=\"9.5\" CenterY=\"9.5\"/>\r\n                                                            </TransformCollection>\r\n                                                        </TransformGroup.Children>\r\n                                                    </TransformGroup>\r\n                                                </Grid.RenderTransform>\r\n                                                <Border Height=\"19\" x:Name=\"Background\" Width=\"19\" RenderTransformOrigin=\"0.5,0.5\" Background=\"{StaticResource NormalBrush}\" BorderBrush=\"{StaticResource NormalBorderBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"3,3,3,3\">\r\n                                                    <Border.RenderTransform>\r\n                                                        <TransformGroup>\r\n                                                            <ScaleTransform/>\r\n                                                            <SkewTransform/>\r\n                                                            <RotateTransform Angle=\"-90\"/>\r\n                                                            <TranslateTransform/>\r\n                                                        </TransformGroup>\r\n                                                    </Border.RenderTransform>\r\n                                                </Border>\r\n                                                <Border Height=\"19\" x:Name=\"HoverBorder\" Width=\"19\" RenderTransformOrigin=\"0.5,0.5\" Background=\"{StaticResource HoverBrush}\" BorderBrush=\"{x:Null}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"3,3,3,3\" Opacity=\"0\">\r\n                                                    <Border.RenderTransform>\r\n                                                        <TransformGroup>\r\n                                                            <ScaleTransform/>\r\n                                                            <SkewTransform/>\r\n                                                            <RotateTransform Angle=\"-90\"/>\r\n                                                            <TranslateTransform/>\r\n                                                        </TransformGroup>\r\n                                                    </Border.RenderTransform>\r\n                                                </Border>\r\n                                                <Path HorizontalAlignment=\"Center\" x:Name=\"arrow\" VerticalAlignment=\"Center\" StrokeThickness=\"2\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\">\r\n                                                    <Path.Stroke>\r\n                                                        <SolidColorBrush Color=\"Black\"/>\r\n                                                    </Path.Stroke>\r\n                                                </Path>\r\n                                            </Grid>\r\n                                        </Grid>\r\n                                    </Border>\r\n                                    <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HoverBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"3\"/>\r\n                                    <Border x:Name=\"FullControlHover\" IsHitTestVisible=\"false\" Visibility=\"Visible\" BorderBrush=\"{StaticResource NormalBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"3\" Opacity=\"0\"/>\r\n                                    <ContentPresenter x:Name=\"header\" VerticalAlignment=\"Top\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" RenderTransformOrigin=\"0.5,0.5\" HorizontalAlignment=\"Center\" Margin=\"0,42,0,0\" >\r\n                                        <ContentPresenter.RenderTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform/>\r\n                                                <SkewTransform/>\r\n                                                <RotateTransform Angle=\"90\"/>\r\n                                                <TranslateTransform/>\r\n                                            </TransformGroup>\r\n                                        </ContentPresenter.RenderTransform>\r\n                                    </ContentPresenter>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"ExpanderRightHeaderTemplate\" TargetType=\"ToggleButton\">\r\n                                <Grid Background=\"Transparent\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CheckStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Checked\">\r\n                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"Data\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"M 1,4.5 L 4.5,1 L 8,4.5\"/>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Unchecked\"/>\r\n                                        </VisualStateGroup>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\"/>\r\n                                                <VisualTransition From=\"Normal\" GeneratedDuration=\"00:00:00.3000000\" To=\"MouseOver\"/>\r\n                                                <VisualTransition From=\"MouseOver\" GeneratedDuration=\"00:00:00.5000000\" To=\"Normal\"/>\r\n                                                <VisualTransition From=\"Pressed\" GeneratedDuration=\"00:00:00.5000000\" To=\"MouseOver\"/>\r\n                                                <VisualTransition From=\"MouseOver\" GeneratedDuration=\"00:00:00.3000000\" To=\"Pressed\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"FullControlHover\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.7\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Border Padding=\"{TemplateBinding Padding}\" BorderBrush=\"{StaticResource NormalBorderBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"3,3,3,3\" Width=\"38\" Background=\"#FFFFFFFF\">\r\n                                        <Grid Background=\"Transparent\">\r\n                                            <Grid.RowDefinitions>\r\n                                                <RowDefinition Height=\"19\"/>\r\n                                                <RowDefinition Height=\"*\"/>\r\n                                            </Grid.RowDefinitions>\r\n                                            <Grid HorizontalAlignment=\"Center\" VerticalAlignment=\"Top\">\r\n                                                <Grid.RenderTransform>\r\n                                                    <TransformGroup>\r\n                                                        <TransformGroup.Children>\r\n                                                            <TransformCollection>\r\n                                                                <RotateTransform Angle=\"-90\" CenterX=\"9.5\" CenterY=\"9.5\"/>\r\n                                                            </TransformCollection>\r\n                                                        </TransformGroup.Children>\r\n                                                    </TransformGroup>\r\n                                                </Grid.RenderTransform>\r\n                                                <Border Background=\"{StaticResource NormalBrush}\" Width=\"19\" Height=\"19\" BorderBrush=\"{StaticResource NormalBorderBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"3,3,3,3\" RenderTransformOrigin=\"0.5,0.5\" x:Name=\"Background\">\r\n                                                    <Border.RenderTransform>\r\n                                                        <TransformGroup>\r\n                                                            <ScaleTransform/>\r\n                                                            <SkewTransform/>\r\n                                                            <RotateTransform Angle=\"90\"/>\r\n                                                            <TranslateTransform/>\r\n                                                        </TransformGroup>\r\n                                                    </Border.RenderTransform>\r\n                                                </Border>\r\n                                                <Border Height=\"19\" Width=\"19\" RenderTransformOrigin=\"0.5,0.5\" Background=\"{StaticResource HoverBrush}\" BorderBrush=\"{x:Null}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"3,3,3,3\" Opacity=\"0\" x:Name=\"HoverBorder\">\r\n                                                    <Border.RenderTransform>\r\n                                                        <TransformGroup>\r\n                                                            <ScaleTransform/>\r\n                                                            <SkewTransform/>\r\n                                                            <RotateTransform Angle=\"90\"/>\r\n                                                            <TranslateTransform/>\r\n                                                        </TransformGroup>\r\n                                                    </Border.RenderTransform>\r\n                                                </Border>\r\n                                                <Path HorizontalAlignment=\"Center\" x:Name=\"arrow\" VerticalAlignment=\"Center\" StrokeThickness=\"2\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\">\r\n                                                    <Path.Stroke>\r\n                                                        <SolidColorBrush Color=\"Black\"/>\r\n                                                    </Path.Stroke>\r\n                                                </Path>\r\n                                            </Grid>\r\n                                        </Grid>\r\n                                    </Border>\r\n                                    <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HoverBrush}\" BorderThickness=\"1\" CornerRadius=\"3\"/>\r\n                                    <Border x:Name=\"FullControlHover\" IsHitTestVisible=\"false\" Visibility=\"Visible\" BorderBrush=\"{StaticResource NormalBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"3\" Opacity=\"0\"/>\r\n                                    <ContentPresenter x:Name=\"header\" VerticalAlignment=\"Top\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"  RenderTransformOrigin=\"0.5,0.5\" HorizontalAlignment=\"Center\" Margin=\"0,42,0,0\">\r\n                                        <ContentPresenter.RenderTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform/>\r\n                                                <SkewTransform/>\r\n                                                <RotateTransform Angle=\"-90\"/>\r\n                                                <TranslateTransform/>\r\n                                            </TransformGroup>\r\n                                        </ContentPresenter.RenderTransform>\r\n                                    </ContentPresenter>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" To=\"1\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"ExpansionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Collapsed\"/>\r\n                                <VisualState x:Name=\"Expanded\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"ExpandDirectionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"ExpandDown\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd1\" Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"*\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"*\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ExpandUp\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"Template\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ExpanderUpHeaderTemplate}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"*\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"*\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ExpandLeft\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"Template\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ExpanderLeftHeaderTemplate}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"*\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"*\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ExpandRight\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"Template\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ExpanderRightHeaderTemplate}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"1\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"*\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd1\" Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"*\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"Background\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" Padding=\"{TemplateBinding Padding}\">\r\n                            <Grid>\r\n                                <Grid.RowDefinitions>\r\n                                    <RowDefinition Height=\"Auto\" x:Name=\"rd0\"/>\r\n                                    <RowDefinition Height=\"*\" x:Name=\"rd1\"/>\r\n                                </Grid.RowDefinitions>\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\" x:Name=\"cd0\"/>\r\n                                    <ColumnDefinition Width=\"*\" x:Name=\"cd1\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <ToggleButton HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"1\" MinHeight=\"0\" MinWidth=\"0\" x:Name=\"ExpanderButton\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" FontFamily=\"{TemplateBinding FontFamily}\" FontSize=\"{TemplateBinding FontSize}\" FontStretch=\"{TemplateBinding FontStretch}\" FontStyle=\"{TemplateBinding FontStyle}\" FontWeight=\"{TemplateBinding FontWeight}\" Foreground=\"{TemplateBinding Foreground}\" Template=\"{StaticResource ExpanderDownHeaderTemplate}\" Grid.Column=\"0\" Grid.Row=\"0\" Content=\"{TemplateBinding Header}\" ContentTemplate=\"{TemplateBinding HeaderTemplate}\" IsChecked=\"{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" Grid.ColumnSpan=\"2\"/>\r\n                                <Grid Grid.Row=\"1\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" x:Name=\"ExpandSite\" Visibility=\"Collapsed\">\r\n                                    <Border Background=\"{StaticResource ShadeBrush}\" CornerRadius=\"3,3,3,3\" BorderBrush=\"{StaticResource NormalBorderBrush}\" BorderThickness=\"1,1,1,1\"/>\r\n                                    <ContentPresenter Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"4,4,4,4\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                                </Grid>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Border x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"#A5FFFFFF\" CornerRadius=\"3\"/>\r\n                        <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"#FF45D6FA\" BorderThickness=\"1\" CornerRadius=\"3\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsExpanded\" Value=\"True\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"ExpandSite\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- TreeView Item-->\r\n    <Style TargetType=\"TreeViewItem\">\r\n        <Setter Property=\"IsTabStop\" Value=\"True\"/>\r\n        <Setter Property=\"Padding\" Value=\"3\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"Cursor\" Value=\"Arrow\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TreeViewItem\">\r\n                    <Grid Background=\"{TemplateBinding Background}\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"Header\" Storyboard.TargetProperty=\"Foreground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <SolidColorBrush Color=\"#FF999999\"/>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition From=\"Unselected\" GeneratedDuration=\"00:00:00.3000000\" To=\"Selected\"/>\r\n                                    <VisualTransition From=\"Selected\" GeneratedDuration=\"00:00:00.5000000\" To=\"Unselected\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Unselected\"/>\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"select\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.75\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"SelectedInactive\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"inactive\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.4\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"HasItemsStates\">\r\n                                <VisualState x:Name=\"HasItems\"/>\r\n                                <VisualState x:Name=\"NoItems\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"Collapsed\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"ExpansionStates\">\r\n                                <VisualState x:Name=\"Collapsed\"/>\r\n                                <VisualState x:Name=\"Expanded\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ItemsHost\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"*\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"15\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <ToggleButton HorizontalAlignment=\"Stretch\" x:Name=\"Expander\" VerticalAlignment=\"Stretch\" IsChecked=\"{Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}\">\r\n                            <ToggleButton.Template>\r\n                                <ControlTemplate TargetType=\"ToggleButton\">\r\n                                    <Grid x:Name=\"Root\" Background=\"Transparent\">\r\n                                        <VisualStateManager.VisualStateGroups>\r\n                                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                                <VisualState x:Name=\"Normal\"/>\r\n                                                <VisualState x:Name=\"MouseOver\">\r\n                                                    <Storyboard>\r\n                                                        <ColorAnimation Duration=\"0\" Storyboard.TargetName=\"UncheckedBrush\" Storyboard.TargetProperty=\"Color\" To=\"{StaticResource NormalBrushGradient1}\"/>\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                                <VisualState x:Name=\"Disabled\">\r\n                                                    <Storyboard>\r\n                                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"Root\" Storyboard.TargetProperty=\"Opacity\" To=\".7\"/>\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                            </VisualStateGroup>\r\n                                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                                <VisualState x:Name=\"Unchecked\"/>\r\n                                                <VisualState x:Name=\"Checked\">\r\n                                                    <Storyboard>\r\n                                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"UncheckedVisual\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"CheckedVisual\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                            </VisualStateGroup>\r\n                                        </VisualStateManager.VisualStateGroups>\r\n                                        <Grid HorizontalAlignment=\"Right\" Margin=\"2 2 5 2\">\r\n                                            <Path Height=\"9\" HorizontalAlignment=\"Right\" x:Name=\"UncheckedVisual\" VerticalAlignment=\"Center\" Width=\"6\" Fill=\"#FF000000\" StrokeLineJoin=\"Miter\" StrokeThickness=\"1\" Data=\"M 0,0 L 0,9 L 5,4.5 Z\">\r\n                                                <Path.Stroke>\r\n                                                    <SolidColorBrush Color=\"#FF989898\" x:Name=\"UncheckedBrush\"/>\r\n                                                </Path.Stroke>\r\n                                            </Path>\r\n                                            <Path Height=\"6\" HorizontalAlignment=\"Center\" x:Name=\"CheckedVisual\" VerticalAlignment=\"Center\" Width=\"6\" Opacity=\"0\" Fill=\"#FF262626\" StrokeLineJoin=\"Miter\" Data=\"M 6,0 L 6,6 L 0,6 Z\"/>\r\n                                        </Grid>\r\n                                    </Grid>\r\n                                </ControlTemplate>\r\n                            </ToggleButton.Template>\r\n                        </ToggleButton>\r\n                        <Rectangle x:Name=\"select\" IsHitTestVisible=\"False\" Opacity=\"0\" Grid.Column=\"1\" Fill=\"{StaticResource NormalBrush}\" Stroke=\"{StaticResource NormalBorderBrush}\" StrokeThickness=\"2\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                        <Rectangle x:Name=\"inactive\" IsHitTestVisible=\"False\" Opacity=\"0\" Grid.Column=\"1\" Fill=\"{StaticResource NormalBrush}\" Stroke=\"{StaticResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                        <Button Background=\"{TemplateBinding Background}\" Foreground=\"{TemplateBinding Foreground}\" Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" x:Name=\"PART_Header\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Grid.Column=\"1\" Content=\"{TemplateBinding Header}\" ContentTemplate=\"{TemplateBinding HeaderTemplate}\" ClickMode=\"Hover\">\r\n                            <Button.Template>\r\n                                <ControlTemplate TargetType=\"Button\">\r\n                                    <Grid Background=\"{TemplateBinding Background}\">\r\n                                        <VisualStateManager.VisualStateGroups>\r\n                                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                                <VisualStateGroup.Transitions>\r\n                                                    <VisualTransition From=\"Normal\" GeneratedDuration=\"00:00:00.3000000\" To=\"Pressed\"/>\r\n                                                    <VisualTransition From=\"Pressed\" GeneratedDuration=\"00:00:00.5000000\" To=\"Normal\"/>\r\n                                                </VisualStateGroup.Transitions>\r\n                                                <VisualState x:Name=\"Normal\"/>\r\n                                                <VisualState x:Name=\"Pressed\">\r\n                                                    <Storyboard>\r\n                                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"hover\" Storyboard.TargetProperty=\"Opacity\" To=\".5\"/>\r\n                                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                                        </DoubleAnimationUsingKeyFrames>\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                                <VisualState x:Name=\"Disabled\">\r\n                                                    <Storyboard>\r\n                                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"content\" Storyboard.TargetProperty=\"Opacity\" To=\".55\"/>\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                            </VisualStateGroup>\r\n                                        </VisualStateManager.VisualStateGroups>\r\n                                        <Rectangle x:Name=\"Background\" IsHitTestVisible=\"False\" Opacity=\"0\" Fill=\"{StaticResource NormalBrush}\" Stroke=\"{x:Null}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                        <Rectangle x:Name=\"hover\" IsHitTestVisible=\"False\" Opacity=\"0\" Fill=\"{StaticResource HoverBrush}\" Stroke=\"{x:Null}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                        <ContentPresenter Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"Left\" Margin=\"{TemplateBinding Padding}\" x:Name=\"content\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                                    </Grid>\r\n                                </ControlTemplate>\r\n                            </Button.Template>\r\n                        </Button>\r\n                        <ItemsPresenter x:Name=\"ItemsHost\" Visibility=\"Visible\" Grid.Column=\"1\" Grid.ColumnSpan=\"2\" Grid.Row=\"1\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsExpanded\" Value=\"false\">\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ItemsHost\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"HasItems\" Value=\"false\">\r\n                            <Setter Property=\"Visibility\" Value=\"Hidden\" TargetName=\"Expander\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- Tree View -->\r\n    <Style TargetType=\"TreeView\">\r\n        <Setter Property=\"IsTabStop\" Value=\"True\"/>\r\n        <Setter Property=\"Background\" Value=\"{StaticResource ShadeBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Cursor\" Value=\"Arrow\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"Padding\" Value=\"1\"/>\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"#FFA3AEB9\" Offset=\"0\"/>\r\n                    <GradientStop Color=\"#FF8399A9\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF718597\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF617584\" Offset=\"1\"/>\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TreeView\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <Grid.Resources>\r\n                            <SolidColorBrush x:Key=\"BorderBrush\" Color=\"#FF000000\"/>\r\n                        </Grid.Resources>\r\n                        <Border x:Name=\"Border\" BorderBrush=\"{StaticResource NormalBorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\" Background=\"{TemplateBinding Background}\">\r\n                            <ScrollViewer BorderBrush=\"Transparent\" BorderThickness=\"0\" Padding=\"{TemplateBinding Padding}\" Margin=\"1\" x:Name=\"ScrollViewer\" HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Auto\">\r\n                                <ItemsPresenter Margin=\"5\" x:Name=\"TreeItems\"/>\r\n                            </ScrollViewer>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/ShinyDarkTeal/Theme.xaml",
    "content": "﻿<!--\r\n// (c) Copyright Microsoft Corporation.\r\n// This source is subject to the Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n-->\r\n\r\n<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n                    xmlns:basic=\"clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit\"\r\n                    xmlns:primitives=\"clr-namespace:Microsoft.Windows.Controls.Primitives;assembly=WPFToolkit\"\r\n                    xmlns:vsm=\"clr-namespace:System.Windows;assembly=WPFToolkit\">\r\n\r\n\r\n    <!--SHINY BLUE SETTINGS FOR CHARTS-->\r\n    <LinearGradientBrush x:Key=\"ShinyChartOrange\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFFDDBAE\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FFCE955A\" Offset=\"0.185\" />\r\n        <GradientStop Color=\"#FFAB7547\" Offset=\"0.475\" />\r\n        <GradientStop Color=\"#FF704D28\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n\r\n    <LinearGradientBrush x:Key=\"ShinyChartYellow\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFFFFF72\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FFC0C256\" Offset=\"0.17\" />\r\n        <GradientStop Color=\"#FFCAC64C\" Offset=\"0.49\" />\r\n        <GradientStop Color=\"#FF8F8832\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ShinyChartCyan\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFBBF4FD\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FF62B8BC\" Offset=\"0.185\" />\r\n        <GradientStop Color=\"#FF5A9399\" Offset=\"0.475\" />\r\n        <GradientStop Color=\"#FF355E60\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ShinyChartGreen\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFBAF9DA\" Offset=\"0\" />\r\n        <GradientStop Color=\"#FF62BC8A\" Offset=\"0.185\" />\r\n        <GradientStop Color=\"#FF5A996D\" Offset=\"0.475\" />\r\n        <GradientStop Color=\"#FF35603A\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n\r\n    <LinearGradientBrush x:Key=\"ChartBorder\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFBBBBBB\" />\r\n        <GradientStop Color=\"#FF737373\" Offset=\"0.160\" />\r\n        <GradientStop Color=\"#FF646464\" Offset=\"0.162\" />\r\n        <GradientStop Color=\"#FF000000\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ShinyBackground\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFBBBBBB\" />\r\n        <GradientStop Color=\"#FF000000\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"PlotAreaBrush\" EndPoint=\"0.5,0.987\" StartPoint=\"0.5,0.03\">\r\n        <GradientStop Color=\"#FFFFFFFF\"/>\r\n        <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\"/>\r\n        <GradientStop Color=\"#FEDBDBDB\" Offset=\"0.196\"/>\r\n        <GradientStop Color=\"#FEE7E7E7\" Offset=\"0.121\"/>\r\n        <GradientStop Color=\"#FEF4F4F4\" Offset=\"0.058\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <Color x:Key=\"ShinyTopGradientOrange\">#FFFDDBAE</Color>\r\n    <Color x:Key=\"ShinyBottomGradientOrange\">#FF704D28</Color>\r\n    <RadialGradientBrush x:Key=\"ShinyPieDataPointBrushOrange\">\r\n        <RadialGradientBrush.RelativeTransform>\r\n            <TransformGroup>\r\n                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2.09\" ScaleY=\"1.819\"/>\r\n                <SkewTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n                <RotateTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n                <TranslateTransform X=\"-0.425\" Y=\"-0.486\"/>\r\n            </TransformGroup>\r\n        </RadialGradientBrush.RelativeTransform>\r\n        <GradientStop Color=\"{StaticResource ShinyTopGradientOrange}\"/>\r\n        <GradientStop Color=\"{StaticResource ShinyBottomGradientOrange}\" Offset=\"1\"/>\r\n    </RadialGradientBrush>\r\n\r\n\r\n    <Color x:Key=\"ShinyTopGradientYellow\">#FFFFFF72</Color>\r\n    <Color x:Key=\"ShinyBottomGradientYellow\">#FF8F8832</Color>\r\n    <RadialGradientBrush x:Key=\"ShinyPieDataPointBrushYellow\">\r\n        <RadialGradientBrush.RelativeTransform>\r\n            <TransformGroup>\r\n                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2.09\" ScaleY=\"1.819\"/>\r\n                <SkewTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n                <RotateTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n                <TranslateTransform X=\"-0.425\" Y=\"-0.486\"/>\r\n            </TransformGroup>\r\n        </RadialGradientBrush.RelativeTransform>\r\n        <GradientStop Color=\"{StaticResource ShinyTopGradientYellow}\"/>\r\n        <GradientStop Color=\"{StaticResource ShinyBottomGradientYellow}\" Offset=\"1\"/>\r\n    </RadialGradientBrush>\r\n\r\n    <Color x:Key=\"ShinyTopGradientCyan\">#FFBBF4FD</Color>\r\n    <Color x:Key=\"ShinyBottomGradientCyan\">#FF355E60</Color>\r\n    <RadialGradientBrush x:Key=\"ShinyPieDataPointBrushCyan\">\r\n        <RadialGradientBrush.RelativeTransform>\r\n            <TransformGroup>\r\n                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2.09\" ScaleY=\"1.819\"/>\r\n                <SkewTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n                <RotateTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n                <TranslateTransform X=\"-0.425\" Y=\"-0.486\"/>\r\n            </TransformGroup>\r\n        </RadialGradientBrush.RelativeTransform>\r\n        <GradientStop Color=\"{StaticResource ShinyTopGradientCyan}\"/>\r\n        <GradientStop Color=\"{StaticResource ShinyBottomGradientCyan}\" Offset=\"1\"/>\r\n    </RadialGradientBrush>\r\n\r\n    <Color x:Key=\"ShinyTopGradientGreen\">#FFBAF9DA</Color>\r\n    <Color x:Key=\"ShinyBottomGradientGreen\">#FF35603A</Color>\r\n    <RadialGradientBrush x:Key=\"ShinyPieDataPointBrushGreen\">\r\n        <RadialGradientBrush.RelativeTransform>\r\n            <TransformGroup>\r\n                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2.09\" ScaleY=\"1.819\"/>\r\n                <SkewTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n                <RotateTransform CenterX=\"0.5\" CenterY=\"0.5\"/>\r\n                <TranslateTransform X=\"-0.425\" Y=\"-0.486\"/>\r\n            </TransformGroup>\r\n        </RadialGradientBrush.RelativeTransform>\r\n        <GradientStop Color=\"{StaticResource ShinyTopGradientGreen}\"/>\r\n        <GradientStop Color=\"{StaticResource ShinyBottomGradientGreen}\" Offset=\"1\"/>\r\n    </RadialGradientBrush>\r\n\r\n\r\n    <!--SHINY DARK TEAL-->\r\n    <Color x:Key=\"TextBrush\">#FF000000</Color>\r\n\r\n    <Color x:Key=\"NormalBrushGradient1\">#FFC5E1D7</Color>\r\n    <Color x:Key=\"NormalBrushGradient2\">#FF7CB2A2</Color>\r\n    <Color x:Key=\"NormalBrushGradient3\">#FF3F8570</Color>\r\n    <Color x:Key=\"NormalBrushGradient4\">#FF294C41</Color>\r\n\r\n\r\n    <Color x:Key=\"NormalBorderBrushGradient1\">#FFBBBBBB</Color>\r\n    <Color x:Key=\"NormalBorderBrushGradient2\">#FF737373</Color>\r\n    <Color x:Key=\"NormalBorderBrushGradient3\">#FF646464</Color>\r\n    <Color x:Key=\"NormalBorderBrushGradient4\">#FF000000</Color>\r\n\r\n    <Color x:Key=\"SelectedBackgroundGradient1\">#FFBBBBBB</Color>\r\n    <Color x:Key=\"SelectedBackgroundGradient2\">#FF737373</Color>\r\n    <Color x:Key=\"SelectedBackgroundGradient3\">#FF646464</Color>\r\n    <Color x:Key=\"SelectedBackgroundGradient4\">#FFA1A1A1</Color>\r\n\r\n    <Color x:Key=\"SliderBorderGradient1\">#FF3F3F3F</Color>\r\n    <Color x:Key=\"SliderBorderGradient2\">#FFADADAD</Color>\r\n\r\n    <Color x:Key=\"ShadeBrushGradient1\">#FF62676A</Color>\r\n    <Color x:Key=\"ShadeBrushGradient2\">#FFD1D4D6</Color>\r\n    <Color x:Key=\"ShadeBrushGradient3\">#FFFFFFFF</Color>\r\n\r\n    <Color x:Key=\"WindowBackgroundBrushGradient1\">#FFD1D1D1</Color>\r\n    <Color x:Key=\"WindowBackgroundBrushGradient2\">#FF8496AA</Color>\r\n\r\n\r\n    <LinearGradientBrush x:Key=\"NormalBrush\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource NormalBrushGradient1}\"\r\n                  Offset=\"0\" />\r\n        <GradientStop Color=\"{StaticResource NormalBrushGradient2}\"\r\n                  Offset=\"0.41800001263618469\" />\r\n        <GradientStop Color=\"{StaticResource NormalBrushGradient3}\"\r\n                  Offset=\"0.418\" />\r\n        <GradientStop Color=\"{StaticResource NormalBrushGradient4}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"NormalBorderBrush\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource NormalBorderBrushGradient1}\" />\r\n        <GradientStop Color=\"{StaticResource NormalBorderBrushGradient2}\"\r\n                  Offset=\"0.38\" />\r\n        <GradientStop Color=\"{StaticResource NormalBorderBrushGradient3}\"\r\n                  Offset=\"0.384\" />\r\n        <GradientStop Color=\"{StaticResource NormalBorderBrushGradient4}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <RadialGradientBrush x:Key=\"HoverBrush\">\r\n        <RadialGradientBrush.RelativeTransform>\r\n            <TransformGroup>\r\n                <ScaleTransform CenterX=\"0.5\"\r\n                        CenterY=\"0.5\"\r\n                        ScaleX=\"1.804\"\r\n                        ScaleY=\"0.743\" />\r\n                <SkewTransform CenterX=\"0.5\"\r\n                       CenterY=\"0.5\" />\r\n                <RotateTransform CenterX=\"0.5\"\r\n                         CenterY=\"0.5\" />\r\n                <TranslateTransform Y=\"0.47999998927116394\" />\r\n            </TransformGroup>\r\n        </RadialGradientBrush.RelativeTransform>\r\n        <GradientStop Color=\"#FF98DAFF\"\r\n                  Offset=\"0.209\" />\r\n        <GradientStop Color=\"#0098DAFF\"\r\n                  Offset=\"1\" />\r\n        <GradientStop Color=\"#FFFFFFFF\"\r\n                  Offset=\"0\" />\r\n    </RadialGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"CheckIconBrush\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FF006CD1\" />\r\n        <GradientStop Color=\"#FFA5D6F9\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ShadeBrush\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient2}\"\r\n                  Offset=\"0\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"0.1\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ShadeBrushTop\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient2}\"\r\n                  Offset=\"0\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"0.1\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ShadeBrushBottom\"\r\n                       EndPoint=\"0.5,0\"\r\n                       StartPoint=\"0.5,1\">\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient2}\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"0.1\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ShadeBrushLeft\"\r\n                       EndPoint=\"1,0.5\"\r\n                       StartPoint=\"0,0.5\">\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient2}\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"0.1\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ShadeBrushRight\"\r\n                       EndPoint=\"0,0.5\"\r\n                       StartPoint=\"1,0.5\">\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient2}\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"0.1\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"DisabledBackgroundBrush\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFFFFFFF\" />\r\n        <GradientStop Color=\"#FF62676A\"\r\n                  Offset=\"1\" />\r\n        <GradientStop Color=\"#FFD1D4D6\"\r\n                  Offset=\"0.41800001263618469\" />\r\n        <GradientStop Color=\"#FFA9AFB5\"\r\n                  Offset=\"0.425\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"SelectedBackgroundBrush\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient1}\" />\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient2}\"\r\n                  Offset=\"0.38\" />\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient3}\"\r\n                  Offset=\"0.384\" />\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient4}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"SelectedBackgroundBrushVertical\"\r\n                       EndPoint=\"2.05,0.5\"\r\n                       StartPoint=\"-0.55,0.5\">\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient1}\" />\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient2}\"\r\n                  Offset=\"0.37999999523162842\" />\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient3}\"\r\n                  Offset=\"0.38400000333786011\" />\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient4}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"HorizontalSliderBorderBrush\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource SliderBorderGradient1}\" />\r\n        <GradientStop Color=\"{StaticResource SliderBorderGradient2}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"VerticalSliderBorderBrush\"\r\n                       EndPoint=\"1.35,0.5\"\r\n                       StartPoint=\"0.6,0.5\">\r\n        <GradientStop Color=\"{StaticResource SliderBorderGradient1}\" />\r\n        <GradientStop Color=\"{StaticResource SliderBorderGradient2}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"WindowBackgroundBrush\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource WindowBackgroundBrushGradient1}\" />\r\n        <GradientStop Color=\"{StaticResource WindowBackgroundBrushGradient2}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <!--Button-->\r\n    <Style TargetType=\"Button\">\r\n        <Setter Property=\"Background\"\r\n            Value=\"{StaticResource NormalBrush}\"/>\r\n        <Setter Property=\"Foreground\"\r\n            Value=\"#FFFFFFFF\"/>\r\n        <Setter Property=\"Padding\"\r\n            Value=\"3\"/>\r\n        <Setter Property=\"BorderThickness\"\r\n            Value=\"2\"/>\r\n        <Setter Property=\"BorderBrush\"\r\n            Value=\"{StaticResource NormalBorderBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Button\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                        To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                        To=\"Pressed\"/>\r\n                                    <VisualTransition From=\"Normal\"\r\n                                        GeneratedDuration=\"00:00:00.3000000\"\r\n                                        To=\"MouseOver\"/>\r\n                                    <VisualTransition From=\"MouseOver\"\r\n                                        GeneratedDuration=\"00:00:00.5000000\"\r\n                                        To=\"Normal\"/>\r\n                                    <VisualTransition From=\"Pressed\"\r\n                                        GeneratedDuration=\"00:00:00.5000000\"\r\n                                        To=\"MouseOver\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Hover\"\r\n                                                   Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"Background\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"0.7\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.65\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"Background\"\r\n                    Background=\"{TemplateBinding Background}\"\r\n                    BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                    BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                    CornerRadius=\"2,2,2,2\">\r\n                            <Border x:Name=\"Hover\"\r\n                      Background=\"{StaticResource HoverBrush}\"\r\n                      CornerRadius=\"2,2,2,2\"\r\n                      Height=\"Auto\"\r\n                      Width=\"Auto\"\r\n                      Opacity=\"0\"/>\r\n                        </Border>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                              Margin=\"{TemplateBinding Padding}\"\r\n                              x:Name=\"contentPresenter\"\r\n                              VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                              Content=\"{TemplateBinding Content}\"\r\n                              ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                        <Border x:Name=\"DisabledVisualElement\"\r\n                    IsHitTestVisible=\"false\"\r\n                    Opacity=\"0\"\r\n                    Background=\"{StaticResource DisabledBackgroundBrush}\"\r\n                    CornerRadius=\"2,2,2,2\"/>\r\n                        <Border x:Name=\"FocusVisualElement\"\r\n                    IsHitTestVisible=\"false\"\r\n                    Visibility=\"Collapsed\"\r\n                    BorderBrush=\"{StaticResource HoverBrush}\"\r\n                    BorderThickness=\"2,2,2,2\"\r\n                    CornerRadius=\"2,2,2,2\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--Checkbox-->\r\n    <Style  TargetType=\"CheckBox\">\r\n        <Setter Property=\"Background\"\r\n            Value=\"{StaticResource NormalBrush}\"/>\r\n        <Setter Property=\"Foreground\"\r\n            Value=\"Black\" />\r\n        <Setter Property=\"HorizontalContentAlignment\"\r\n            Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\"\r\n            Value=\"Top\"/>\r\n        <Setter Property=\"Padding\"\r\n            Value=\"4,1,0,0\"/>\r\n        <Setter Property=\"BorderThickness\"\r\n            Value=\"2\"/>\r\n        <Setter Property=\"BorderBrush\"\r\n            Value=\"{StaticResource NormalBorderBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"CheckBox\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                        To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                        To=\"Pressed\"/>\r\n                                    <VisualTransition From=\"Normal\"\r\n                                        GeneratedDuration=\"00:00:00.3000000\"\r\n                                        To=\"MouseOver\"/>\r\n                                    <VisualTransition From=\"MouseOver\"\r\n                                        GeneratedDuration=\"00:00:00.5000000\"\r\n                                        To=\"Normal\"/>\r\n                                    <VisualTransition From=\"Pressed\"\r\n                                        GeneratedDuration=\"00:00:00.5000000\"\r\n                                        To=\"MouseOver\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundOverlay\"\r\n                                                   Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"CheckIcon\"\r\n                                                   Storyboard.TargetProperty=\"(Shape.StrokeThickness)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"0.3\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"Background\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"0.7\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.65\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition From=\"Checked\"\r\n                                        GeneratedDuration=\"00:00:00.5000000\"\r\n                                        To=\"Unchecked\"/>\r\n                                    <VisualTransition From=\"Unchecked\"\r\n                                        GeneratedDuration=\"00:00:00.3000000\"\r\n                                        To=\"Checked\"/>\r\n                                    <VisualTransition From=\"Checked\"\r\n                                        GeneratedDuration=\"00:00:00.3000000\"\r\n                                        To=\"Indeterminate\"/>\r\n                                    <VisualTransition From=\"Indeterminate\"\r\n                                        GeneratedDuration=\"00:00:00.5000000\"\r\n                                        To=\"Unchecked\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"CheckIcon\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\"/>\r\n                                <VisualState x:Name=\"Indeterminate\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"IndeterminateIcon\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"16\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid HorizontalAlignment=\"Left\"\r\n                  VerticalAlignment=\"Top\">\r\n                            <Rectangle Height=\"14\"\r\n                         Margin=\"1\"\r\n                         x:Name=\"Background\"\r\n                         Width=\"14\"\r\n                         Fill=\"{TemplateBinding Background}\"\r\n                         Stroke=\"{TemplateBinding BorderBrush}\"\r\n                         StrokeThickness=\"{TemplateBinding BorderThickness}\"\r\n                         RadiusX=\"1\"\r\n                         RadiusY=\"1\"/>\r\n                            <Rectangle Height=\"12\"\r\n                         x:Name=\"BackgroundOverlay\"\r\n                         Width=\"12\"\r\n                         Opacity=\"0\"\r\n                         Fill=\"{StaticResource HoverBrush}\"\r\n                         Stroke=\"{x:Null}\"\r\n                         StrokeThickness=\"1\"\r\n                         RadiusX=\"1\"\r\n                         RadiusY=\"1\"/>\r\n\r\n                            <Path x:Name=\"CheckIcon\"\r\n                    Stretch=\"Fill\"\r\n                    Data=\"M102.03442,598.79645 L105.22962,597.78918 L106.95686,599.19977 C106.95686,599.19977 113.77958,590.53656 113.77958,590.53656 C113.77958,590.53656 107.40649,603.79431 107.40649,603.79431 z\"\r\n                    Opacity=\"0\"\r\n                    Fill=\"#FFFFFFFF\"\r\n                    Height=\"10\"\r\n                    Width=\"10.5\"\r\n                    Stroke=\"{StaticResource CheckIconBrush}\"\r\n                    StrokeThickness=\"0\"/>\r\n\r\n                            <Rectangle Height=\"9\"\r\n                         x:Name=\"IndeterminateIcon\"\r\n                         Width=\"9\"\r\n                         Opacity=\"0\"\r\n                         Fill=\"#FFFFFFFF\"\r\n                         Stroke=\"{StaticResource CheckIconBrush}\"\r\n                         RadiusX=\"1\"\r\n                         RadiusY=\"1\"/>\r\n                            <Rectangle Height=\"14\"\r\n                         x:Name=\"DisabledVisualElement\"\r\n                         Width=\"14\"\r\n                         Opacity=\"0\"\r\n                         Fill=\"{StaticResource DisabledBackgroundBrush}\"\r\n                         RadiusX=\"1\"\r\n                         RadiusY=\"1\"/>\r\n                            <Rectangle Height=\"16\"\r\n                         x:Name=\"ContentFocusVisualElement\"\r\n                         Width=\"16\"\r\n                         IsHitTestVisible=\"false\"\r\n                         Opacity=\"0\"\r\n                         Stroke=\"{StaticResource HoverBrush}\"\r\n                         StrokeThickness=\"1\"\r\n                         RadiusX=\"2\"\r\n                         RadiusY=\"2\"/>\r\n                        </Grid>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                              Margin=\"{TemplateBinding Padding}\"\r\n                              x:Name=\"contentPresenter\"\r\n                              VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                              Grid.Column=\"1\"\r\n                              Content=\"{TemplateBinding Content}\"\r\n                              ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--RadioButton-->\r\n    <Style TargetType=\"RadioButton\">\r\n        <Setter Property=\"Background\"\r\n            Value=\"{StaticResource NormalBrush}\"/>\r\n        <Setter Property=\"Foreground\"\r\n            Value=\"Black\" />\r\n        <Setter Property=\"HorizontalContentAlignment\"\r\n            Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\"\r\n            Value=\"Top\"/>\r\n        <Setter Property=\"Padding\"\r\n            Value=\"4,1,0,0\"/>\r\n        <Setter Property=\"BorderThickness\"\r\n            Value=\"2\"/>\r\n        <Setter Property=\"BorderBrush\"\r\n            Value=\"{StaticResource NormalBorderBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"RadioButton\">\r\n                    <Grid>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"16\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                        To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                        To=\"Pressed\"/>\r\n                                    <VisualTransition From=\"Normal\"\r\n                                        GeneratedDuration=\"00:00:00.3000000\"\r\n                                        To=\"MouseOver\"/>\r\n                                    <VisualTransition From=\"MouseOver\"\r\n                                        GeneratedDuration=\"00:00:00.5000000\"\r\n                                        To=\"Normal\"/>\r\n                                    <VisualTransition From=\"Pressed\"\r\n                                        GeneratedDuration=\"00:00:00.5000000\"\r\n                                        To=\"MouseOver\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundOverlay\"\r\n                                                   Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.35\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"Background\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"0.7\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.65\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition From=\"Checked\"\r\n                                        GeneratedDuration=\"00:00:00.5000000\"\r\n                                        To=\"Unchecked\"/>\r\n                                    <VisualTransition From=\"Unchecked\"\r\n                                        GeneratedDuration=\"00:00:00.3000000\"\r\n                                        To=\"Checked\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"CheckIcon\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"CheckIcon\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"0\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid HorizontalAlignment=\"Left\"\r\n                  VerticalAlignment=\"Top\">\r\n                            <Ellipse Height=\"14\"\r\n                       Margin=\"1\"\r\n                       x:Name=\"Background\"\r\n                       Width=\"14\"\r\n                       Fill=\"{StaticResource NormalBrush}\"\r\n                       Stroke=\"{TemplateBinding BorderBrush}\"\r\n                       StrokeThickness=\"{TemplateBinding BorderThickness}\"/>\r\n                            <Ellipse Height=\"12\"\r\n                       x:Name=\"BackgroundOverlay\"\r\n                       Width=\"12\"\r\n                       Opacity=\"0\"\r\n                       Fill=\"#FFC4DBEE\"\r\n                       Stroke=\"#00000000\"\r\n                       Margin=\"2,2,2,2\"\r\n                       StrokeThickness=\"0\"/>\r\n                            <Border HorizontalAlignment=\"Center\"\r\n                      VerticalAlignment=\"Center\"\r\n                      Width=\"6\"\r\n                      Height=\"6\"\r\n                      CornerRadius=\"1,1,1,1\"\r\n                      BorderThickness=\"1,1,1,1\"\r\n                      Background=\"#FFFFFFFF\"\r\n                      x:Name=\"CheckIcon\"\r\n                      BorderBrush=\"{StaticResource CheckIconBrush}\"\r\n                      Opacity=\"0\"/>\r\n                            <Ellipse Height=\"14\"\r\n                       x:Name=\"DisabledVisualElement\"\r\n                       Width=\"14\"\r\n                       Opacity=\"0\"\r\n                       Fill=\"{StaticResource DisabledBackgroundBrush}\"/>\r\n                            <Ellipse Height=\"16\"\r\n                       x:Name=\"ContentFocusVisualElement\"\r\n                       Width=\"16\"\r\n                       IsHitTestVisible=\"false\"\r\n                       Opacity=\"0\"\r\n                       Stroke=\"{StaticResource HoverBrush}\"\r\n                       StrokeThickness=\"1\"/>\r\n                        </Grid>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                              Margin=\"{TemplateBinding Padding}\"\r\n                              x:Name=\"contentPresenter\"\r\n                              VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                              Grid.Column=\"1\"\r\n                              Content=\"{TemplateBinding Content}\"\r\n                              ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--ScrollBar-->\r\n    <Style  TargetType=\"ScrollBar\">\r\n        <Setter Property=\"MinWidth\"\r\n            Value=\"17\" />\r\n        <Setter Property=\"MinHeight\"\r\n            Value=\"17\" />\r\n        <Setter Property=\"IsTabStop\"\r\n            Value=\"False\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ScrollBar\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <Grid.Resources>\r\n                            <ControlTemplate x:Key=\"RepeatButtonTemplate\"\r\n                               TargetType=\"RepeatButton\">\r\n                                <Grid x:Name=\"Root\"\r\n                      Background=\"Transparent\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualState x:Name=\"Normal\" />\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"HorizontalIncrementTemplate\"\r\n                               TargetType=\"RepeatButton\">\r\n                                <Grid x:Name=\"Root\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0:0:0.1\"\r\n                                              To=\"MouseOver\" />\r\n                                                <VisualTransition GeneratedDuration=\"0:0:0.1\"\r\n                                              To=\"Pressed\" />\r\n                                                <VisualTransition From=\"Normal\"\r\n                                              GeneratedDuration=\"00:00:00.3000000\"\r\n                                              To=\"MouseOver\" />\r\n                                                <VisualTransition From=\"MouseOver\"\r\n                                              GeneratedDuration=\"00:00:00.5000000\"\r\n                                              To=\"Normal\" />\r\n                                                <VisualTransition From=\"Pressed\"\r\n                                              GeneratedDuration=\"00:00:00.5000000\"\r\n                                              To=\"MouseOver\" />\r\n                                                <VisualTransition From=\"MouseOver\"\r\n                                              GeneratedDuration=\"00:00:00.3000000\"\r\n                                              To=\"Pressed\" />\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\" />\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\"\r\n                                                  Value=\"1\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundAnimation\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\"\r\n                                                  Value=\"1\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\"\r\n                                                  Value=\"0.7\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledElement\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\"\r\n                                                  Value=\"0.65\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Rectangle x:Name=\"Background\"\r\n                             Fill=\"{StaticResource NormalBrush}\"\r\n                             StrokeThickness=\"2\"\r\n                             RadiusX=\"2\"\r\n                             RadiusY=\"2\"\r\n                             Stroke=\"{StaticResource NormalBorderBrush}\" />\r\n                                    <Rectangle x:Name=\"BackgroundAnimation\"\r\n                             Opacity=\"0\"\r\n                             Fill=\"{StaticResource HoverBrush}\"\r\n                             Stroke=\"{x:Null}\"\r\n                             StrokeThickness=\"0\"\r\n                             RadiusX=\"1\"\r\n                             RadiusY=\"1\"\r\n                             Margin=\"2,2,2,2\" />\r\n                                    <Path Height=\"8\"\r\n                        Width=\"4\"\r\n                        Stretch=\"Uniform\"\r\n                        Data=\"F1 M 511.047,352.682L 511.047,342.252L 517.145,347.467L 511.047,352.682 Z \">\r\n                                        <Path.Fill>\r\n                                            <SolidColorBrush Color=\"#FFFFFFFF\"\r\n                                       x:Name=\"ButtonColor\" />\r\n                                        </Path.Fill>\r\n                                    </Path>\r\n                                    <Rectangle x:Name=\"DisabledElement\"\r\n                             Opacity=\"0\"\r\n                             Fill=\"{StaticResource DisabledBackgroundBrush}\"\r\n                             RadiusX=\"3\"\r\n                             RadiusY=\"3\" />\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"HorizontalDecrementTemplate\"\r\n                               TargetType=\"RepeatButton\">\r\n                                <Grid x:Name=\"Root\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0:0:0.1\"\r\n                                              To=\"MouseOver\" />\r\n                                                <VisualTransition GeneratedDuration=\"0:0:0.1\"\r\n                                              To=\"Pressed\" />\r\n                                                <VisualTransition From=\"Normal\"\r\n                                              GeneratedDuration=\"00:00:00.3000000\"\r\n                                              To=\"MouseOver\" />\r\n                                                <VisualTransition From=\"MouseOver\"\r\n                                              GeneratedDuration=\"00:00:00.5000000\"\r\n                                              To=\"Normal\" />\r\n                                                <VisualTransition From=\"Pressed\"\r\n                                              GeneratedDuration=\"00:00:00.5000000\"\r\n                                              To=\"MouseOver\" />\r\n                                                <VisualTransition From=\"MouseOver\"\r\n                                              GeneratedDuration=\"00:00:00.3000000\"\r\n                                              To=\"Pressed\" />\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\" />\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundMouseOver\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\"\r\n                                                  Value=\"1\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\"\r\n                                                  Value=\"0.7\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledElement\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\"\r\n                                                  Value=\"0.65\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Rectangle x:Name=\"Background\"\r\n                             Fill=\"{StaticResource NormalBrush}\"\r\n                             StrokeThickness=\"2\"\r\n                             RadiusX=\"2\"\r\n                             RadiusY=\"2\"\r\n                             Stroke=\"{StaticResource NormalBorderBrush}\" />\r\n                                    <Rectangle x:Name=\"BackgroundMouseOver\"\r\n                             Opacity=\"0\"\r\n                             Fill=\"{StaticResource HoverBrush}\"\r\n                             Stroke=\"{x:Null}\"\r\n                             StrokeThickness=\"0\"\r\n                             RadiusX=\"1\"\r\n                             RadiusY=\"1\"\r\n                             Margin=\"2,2,2,2\" />\r\n                                    <Path Height=\"8\"\r\n                        Width=\"4\"\r\n                        Stretch=\"Uniform\"\r\n                        Data=\"F1 M 110.692,342.252L 110.692,352.682L 104.594,347.467L 110.692,342.252 Z \">\r\n                                        <Path.Fill>\r\n                                            <SolidColorBrush Color=\"#FFFFFFFF\"\r\n                                       x:Name=\"ButtonColor\" />\r\n                                        </Path.Fill>\r\n                                    </Path>\r\n                                    <Rectangle x:Name=\"DisabledElement\"\r\n                             Opacity=\"0\"\r\n                             Fill=\"{StaticResource DisabledBackgroundBrush}\"\r\n                             RadiusX=\"3\"\r\n                             RadiusY=\"3\" />\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"VerticalIncrementTemplate\"\r\n                               TargetType=\"RepeatButton\">\r\n                                <Grid x:Name=\"Root\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0:0:0.1\"\r\n                                              To=\"MouseOver\" />\r\n                                                <VisualTransition GeneratedDuration=\"0:0:0.1\"\r\n                                              To=\"Pressed\" />\r\n                                                <VisualTransition From=\"Normal\"\r\n                                              GeneratedDuration=\"00:00:00.3000000\"\r\n                                              To=\"MouseOver\" />\r\n                                                <VisualTransition From=\"MouseOver\"\r\n                                              GeneratedDuration=\"00:00:00.5000000\"\r\n                                              To=\"Normal\" />\r\n                                                <VisualTransition From=\"Pressed\"\r\n                                              GeneratedDuration=\"00:00:00.5000000\"\r\n                                              To=\"MouseOver\" />\r\n                                                <VisualTransition From=\"MouseOver\"\r\n                                              GeneratedDuration=\"00:00:00.3000000\"\r\n                                              To=\"Pressed\" />\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\" />\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundMouseOver\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\"\r\n                                                  Value=\"1\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\"\r\n                                                  Value=\"0.7\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledElement\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\"\r\n                                                  Value=\"0.65\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Rectangle x:Name=\"Background\"\r\n                             Fill=\"{StaticResource NormalBrush}\"\r\n                             StrokeThickness=\"2\"\r\n                             RadiusX=\"2\"\r\n                             RadiusY=\"2\"\r\n                             Stroke=\"{StaticResource NormalBorderBrush}\" />\r\n                                    <Rectangle x:Name=\"BackgroundMouseOver\"\r\n                             Opacity=\"0\"\r\n                             Fill=\"{StaticResource HoverBrush}\"\r\n                             Stroke=\"{x:Null}\"\r\n                             RadiusX=\"1\"\r\n                             RadiusY=\"1\"\r\n                             StrokeThickness=\"0\"\r\n                             Margin=\"2,2,2,2\" />\r\n                                    <Path Height=\"4\"\r\n                        Width=\"8\"\r\n                        Stretch=\"Uniform\"\r\n                        Data=\"F1 M 531.107,321.943L 541.537,321.943L 536.322,328.042L 531.107,321.943 Z \">\r\n                                        <Path.Fill>\r\n                                            <SolidColorBrush Color=\"#FFFFFFFF\"\r\n                                       x:Name=\"ButtonColor\" />\r\n                                        </Path.Fill>\r\n                                    </Path>\r\n                                    <Rectangle x:Name=\"DisabledElement\"\r\n                             Opacity=\"0\"\r\n                             Fill=\"{StaticResource DisabledBackgroundBrush}\"\r\n                             RadiusX=\"3\"\r\n                             RadiusY=\"3\" />\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"VerticalDecrementTemplate\"\r\n                               TargetType=\"RepeatButton\">\r\n                                <Grid x:Name=\"Root\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0:0:0.1\"\r\n                                              To=\"MouseOver\" />\r\n                                                <VisualTransition GeneratedDuration=\"0:0:0.1\"\r\n                                              To=\"Pressed\" />\r\n                                                <VisualTransition From=\"Normal\"\r\n                                              GeneratedDuration=\"00:00:00.3000000\"\r\n                                              To=\"MouseOver\" />\r\n                                                <VisualTransition From=\"MouseOver\"\r\n                                              GeneratedDuration=\"00:00:00.5000000\"\r\n                                              To=\"Normal\" />\r\n                                                <VisualTransition From=\"Pressed\"\r\n                                              GeneratedDuration=\"00:00:00.5000000\"\r\n                                              To=\"MouseOver\" />\r\n                                                <VisualTransition From=\"MouseOver\"\r\n                                              GeneratedDuration=\"00:00:00.3000000\"\r\n                                              To=\"Pressed\" />\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\" />\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\"\r\n                                                  Value=\"1\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundMouseOver\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\"\r\n                                                  Value=\"1\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                         Duration=\"00:00:00.0010000\"\r\n                                                         Storyboard.TargetName=\"Background\"\r\n                                                         Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                                  Value=\"0.7\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledElement\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\"\r\n                                                  Value=\"0.65\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Rectangle x:Name=\"Background\"\r\n                             Fill=\"{StaticResource NormalBrush}\"\r\n                             StrokeThickness=\"2\"\r\n                             RadiusX=\"2\"\r\n                             RadiusY=\"2\"\r\n                             Stroke=\"{StaticResource NormalBorderBrush}\" />\r\n                                    <Rectangle x:Name=\"BackgroundMouseOver\"\r\n                             Fill=\"{StaticResource HoverBrush}\"\r\n                             Stroke=\"{x:Null}\"\r\n                             RadiusX=\"1\"\r\n                             RadiusY=\"1\"\r\n                             Margin=\"2,2,2,2\"\r\n                             Opacity=\"1\" />\r\n                                    <Path Height=\"4\"\r\n                        Width=\"8\"\r\n                        Stretch=\"Uniform\"\r\n                        Data=\"F1 M 541.537,173.589L 531.107,173.589L 536.322,167.49L 541.537,173.589 Z \">\r\n                                        <Path.Fill>\r\n                                            <SolidColorBrush Color=\"#FFFFFFFF\"\r\n                                       x:Name=\"ButtonColor\" />\r\n                                        </Path.Fill>\r\n                                    </Path>\r\n                                    <Rectangle x:Name=\"DisabledElement\"\r\n                             Opacity=\"0\"\r\n                             Fill=\"{StaticResource DisabledBackgroundBrush}\"\r\n                             RadiusX=\"3\"\r\n                             RadiusY=\"3\" />\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"VerticalThumbTemplate\"\r\n                               TargetType=\"Thumb\">\r\n                                <Grid>\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0:0:0.1\"\r\n                                              To=\"MouseOver\" />\r\n                                                <VisualTransition GeneratedDuration=\"0:0:0.1\"\r\n                                              To=\"Pressed\" />\r\n                                                <VisualTransition From=\"Normal\"\r\n                                              GeneratedDuration=\"00:00:00.3000000\"\r\n                                              To=\"MouseOver\" />\r\n                                                <VisualTransition From=\"MouseOver\"\r\n                                              GeneratedDuration=\"00:00:00.5000000\"\r\n                                              To=\"Normal\" />\r\n                                                <VisualTransition From=\"Pressed\"\r\n                                              GeneratedDuration=\"00:00:00.5000000\"\r\n                                              To=\"MouseOver\" />\r\n                                                <VisualTransition From=\"MouseOver\"\r\n                                              GeneratedDuration=\"00:00:00.3000000\"\r\n                                              To=\"Pressed\" />\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                         Duration=\"00:00:00.0010000\"\r\n                                                         Storyboard.TargetName=\"BackgroundMouseOver\"\r\n                                                         Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                                  Value=\"0\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundMouseOver\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\"\r\n                                                  Value=\"1\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                         Duration=\"00:00:00.0010000\"\r\n                                                         Storyboard.TargetName=\"Background\"\r\n                                                         Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                                  Value=\"0.7\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ThumbVisual\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\"\r\n                                                  Value=\"0\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Grid Margin=\"1,0,1,0\"\r\n                        x:Name=\"ThumbVisual\">\r\n                                        <Rectangle x:Name=\"Background\"\r\n                               Fill=\"{StaticResource NormalBrush}\"\r\n                               StrokeThickness=\"2\"\r\n                               RadiusX=\"2\"\r\n                               RadiusY=\"2\"\r\n                               Stroke=\"{StaticResource NormalBorderBrush}\" />\r\n                                        <Rectangle x:Name=\"BackgroundMouseOver\"\r\n                               Fill=\"{StaticResource HoverBrush}\"\r\n                               Stroke=\"{x:Null}\"\r\n                               StrokeThickness=\"1\"\r\n                               RadiusX=\"1\"\r\n                               RadiusY=\"1\"\r\n                               Margin=\"2,2,2,2\" />\r\n                                    </Grid>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"HorizontalThumbTemplate\"\r\n                               TargetType=\"Thumb\">\r\n                                <Grid>\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0:0:0.1\"\r\n                                              To=\"MouseOver\" />\r\n                                                <VisualTransition GeneratedDuration=\"0:0:0.1\"\r\n                                              To=\"Pressed\" />\r\n                                                <VisualTransition From=\"Normal\"\r\n                                              GeneratedDuration=\"00:00:00.3000000\"\r\n                                              To=\"MouseOver\" />\r\n                                                <VisualTransition From=\"MouseOver\"\r\n                                              GeneratedDuration=\"00:00:00.5000000\"\r\n                                              To=\"Normal\" />\r\n                                                <VisualTransition From=\"Pressed\"\r\n                                              GeneratedDuration=\"00:00:00.5000000\"\r\n                                              To=\"MouseOver\" />\r\n                                                <VisualTransition From=\"MouseOver\"\r\n                                              GeneratedDuration=\"00:00:00.3000000\"\r\n                                              To=\"Pressed\" />\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\" />\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundMouseOver\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\"\r\n                                                  Value=\"1\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                         Duration=\"00:00:00.0010000\"\r\n                                                         Storyboard.TargetName=\"Background\"\r\n                                                         Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                                  Value=\"0.7\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ThumbVisual\"\r\n                                                         Storyboard.TargetProperty=\"Opacity\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"0:0:0\"\r\n                                                  Value=\"0\" />\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Grid Margin=\"0,1,0,1\"\r\n                        x:Name=\"ThumbVisual\">\r\n                                        <Rectangle x:Name=\"Background\"\r\n                               Fill=\"{StaticResource NormalBrush}\"\r\n                               StrokeThickness=\"2\"\r\n                               RadiusX=\"2\"\r\n                               RadiusY=\"2\"\r\n                               Stroke=\"{StaticResource NormalBorderBrush}\" />\r\n                                        <Rectangle x:Name=\"BackgroundMouseOver\"\r\n                               Opacity=\"0\"\r\n                               Fill=\"{StaticResource HoverBrush}\"\r\n                               Stroke=\"{x:Null}\"\r\n                               StrokeThickness=\"0\"\r\n                               RadiusX=\"1\"\r\n                               RadiusY=\"1\"\r\n                               Margin=\"2,2,2,2\" />\r\n                                    </Grid>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\" />\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Root\"\r\n                                                   Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.5\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid x:Name=\"HorizontalRoot\" Visibility=\"Collapsed\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\" />\r\n                                <ColumnDefinition Width=\"*\" />\r\n                                <ColumnDefinition Width=\"Auto\" />\r\n                            </Grid.ColumnDefinitions>\r\n                            <Rectangle Grid.ColumnSpan=\"3\"\r\n                         Stroke=\"#00000000\"\r\n                         StrokeThickness=\"1\"\r\n                         RadiusX=\"3\"\r\n                         RadiusY=\"3\"\r\n                         Fill=\"#FFDDDEDF\" />\r\n                            <RepeatButton IsTabStop=\"False\"\r\n                            Template=\"{StaticResource HorizontalDecrementTemplate}\"\r\n                            Margin=\"1\"\r\n                            x:Name=\"HorizontalSmallDecrease\"\r\n                            Width=\"16\"\r\n                            Grid.Column=\"0\"\r\n                            Interval=\"50\" />\r\n\r\n\r\n\r\n                            <RepeatButton IsTabStop=\"False\"\r\n                            Template=\"{StaticResource RepeatButtonTemplate}\"\r\n                            x:Name=\"HorizontalLargeDecrease\"\r\n                            Width=\"0\"\r\n                            Grid.Column=\"1\"\r\n                            Interval=\"50\" />\r\n                            <Thumb Background=\"{TemplateBinding Background}\"\r\n                     Template=\"{StaticResource HorizontalThumbTemplate}\"\r\n                     MinWidth=\"18\"\r\n                     x:Name=\"HorizontalThumb\"\r\n                     Width=\"18\"\r\n                     Grid.Column=\"2\" />\r\n                            <RepeatButton IsTabStop=\"False\"\r\n                            Template=\"{StaticResource RepeatButtonTemplate}\"\r\n                            x:Name=\"HorizontalLargeIncrease\"\r\n                            Grid.Column=\"3\"\r\n                            Interval=\"50\" />\r\n\r\n\r\n\r\n                            <RepeatButton IsTabStop=\"False\"\r\n                            Template=\"{StaticResource HorizontalIncrementTemplate}\"\r\n                            Margin=\"1\"\r\n                            x:Name=\"HorizontalSmallIncrease\"\r\n                            Width=\"16\"\r\n                            Grid.Column=\"2\"\r\n                            Interval=\"50\" />\r\n                        </Grid>\r\n                        <Grid x:Name=\"VerticalRoot\"\r\n                  Visibility=\"Visible\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\" />\r\n                                <RowDefinition Height=\"*\" />\r\n                                <RowDefinition Height=\"Auto\" />\r\n                            </Grid.RowDefinitions>\r\n                            <Rectangle Grid.RowSpan=\"3\"\r\n                         Stroke=\"#00000000\"\r\n                         StrokeThickness=\"1\"\r\n                         RadiusX=\"3\"\r\n                         RadiusY=\"3\"\r\n                         Fill=\"#FFDDDEDF\" />\r\n                            <RepeatButton IsTabStop=\"False\"\r\n                            Template=\"{StaticResource VerticalDecrementTemplate}\"\r\n                            Height=\"16\"\r\n                            Margin=\"1\"\r\n                            x:Name=\"VerticalSmallDecrease\"\r\n                            Grid.Row=\"0\"\r\n                            Interval=\"50\" \r\n                            Command=\"ScrollBar.LineUpCommand\"/>\r\n\r\n                            <Track Grid.Row=\"1\" x:Name=\"PART_Track\" Orientation=\"Vertical\" IsDirectionReversed=\"true\">\r\n                                <Track.Thumb>\r\n                                    <Thumb MinHeight=\"18\" x:Name=\"VerticalThumb\" Template=\"{StaticResource VerticalThumbTemplate}\" />\r\n                                </Track.Thumb>\r\n                                <Track.IncreaseRepeatButton>\r\n                                    <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Command=\"ScrollBar.PageDownCommand\" Interval=\"50\" />\r\n                                </Track.IncreaseRepeatButton>\r\n                                <Track.DecreaseRepeatButton>\r\n                                    <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Command=\"ScrollBar.PageUpCommand\" Interval=\"50\" />\r\n                                </Track.DecreaseRepeatButton>\r\n                            </Track>\r\n\r\n                            <RepeatButton IsTabStop=\"False\"\r\n                            Template=\"{StaticResource VerticalIncrementTemplate}\"\r\n                            Height=\"16\"\r\n                            Margin=\"1\"\r\n                            x:Name=\"VerticalSmallIncrease\"\r\n                            Grid.Row=\"2\"\r\n                            Interval=\"50\" \r\n                            Command=\"ScrollBar.LineDownCommand\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--ScrollViewer-->\r\n    <Style  TargetType=\"ScrollViewer\">\r\n        <Setter Property=\"HorizontalContentAlignment\"\r\n            Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\"\r\n            Value=\"Top\" />\r\n        <Setter Property=\"Padding\"\r\n            Value=\"4\" />\r\n        <Setter Property=\"BorderThickness\"\r\n            Value=\"1\" />\r\n        <Setter Property=\"BorderBrush\"\r\n            Value=\"{StaticResource NormalBorderBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ScrollViewer\">\r\n                    <Border BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                  BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                  CornerRadius=\"2\">\r\n                        <Grid Background=\"{TemplateBinding Background}\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"*\" />\r\n                                <ColumnDefinition Width=\"Auto\" />\r\n                            </Grid.ColumnDefinitions>\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"*\" />\r\n                                <RowDefinition Height=\"Auto\" />\r\n                            </Grid.RowDefinitions>\r\n                            <ScrollContentPresenter Cursor=\"{TemplateBinding Cursor}\"\r\n                                      Margin=\"{TemplateBinding Padding}\"\r\n                                      x:Name=\"ScrollContentPresenter\"\r\n                                      ContentTemplate=\"{TemplateBinding ContentTemplate}\" />\r\n                            <Rectangle Grid.Column=\"1\"\r\n                         Grid.Row=\"1\"\r\n                         Fill=\"#FFE9EEF4\" />\r\n                            <ScrollBar IsTabStop=\"False\"\r\n                         x:Name=\"PART_VerticalScrollBar\"\r\n                         Width=\"18\"\r\n                         Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\"\r\n                         Grid.Column=\"1\"\r\n                         Grid.Row=\"0\"\r\n                         Orientation=\"Vertical\"\r\n                         ViewportSize=\"{TemplateBinding ViewportHeight}\"\r\n                         Maximum=\"{TemplateBinding ScrollableHeight}\"\r\n                         Minimum=\"0\"\r\n                         Value=\"{TemplateBinding VerticalOffset}\"/>\r\n                            <ScrollBar IsTabStop=\"False\"\r\n                         Height=\"18\"\r\n                         x:Name=\"PART_HorizontalScrollBar\"\r\n                         Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\"\r\n                         Grid.Column=\"0\"\r\n                         Grid.Row=\"1\"\r\n                         Orientation=\"Horizontal\"\r\n                         ViewportSize=\"{TemplateBinding ViewportWidth}\"\r\n                         Maximum=\"{TemplateBinding ScrollableWidth}\"\r\n                         Minimum=\"0\"\r\n                         Value=\"{TemplateBinding HorizontalOffset}\"/>\r\n                        </Grid>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--Listbox-->\r\n    <Style  TargetType=\"ListBox\">\r\n        <Setter Property=\"Padding\"\r\n            Value=\"1\"/>\r\n        <Setter Property=\"Background\"\r\n            Value=\"{StaticResource ShadeBrush}\"/>\r\n        <Setter Property=\"Foreground\"\r\n            Value=\"#FFFFFFff\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\"\r\n            Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\"\r\n            Value=\"Top\"/>\r\n        <Setter Property=\"IsTabStop\"\r\n            Value=\"False\"/>\r\n        <Setter Property=\"BorderThickness\"\r\n            Value=\"1\"/>\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\"\r\n            Value=\"Once\"/>\r\n        <Setter Property=\"BorderBrush\"\r\n            Value=\"{StaticResource NormalBorderBrush}\" />\r\n        <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" \r\n            Value=\"Auto\"/>\r\n        <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" \r\n            Value=\"Auto\"/>\r\n        <Setter Property=\"ScrollViewer.CanContentScroll\" \r\n            Value=\"True\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ListBox\">\r\n                    <Border BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                  BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                  CornerRadius=\"2\"\r\n                  Background=\"{TemplateBinding Background}\">\r\n                        <ScrollViewer BorderBrush=\"Transparent\"\r\n                          BorderThickness=\"0\"\r\n                          Padding=\"{TemplateBinding Padding}\"\r\n                          x:Name=\"ScrollViewer\">\r\n                            <ItemsPresenter/>\r\n                        </ScrollViewer>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--LisboxItem-->\r\n    <Style TargetType=\"ListBoxItem\">\r\n        <Setter Property=\"Padding\"\r\n            Value=\"3\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\"\r\n            Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\"\r\n            Value=\"Top\"/>\r\n        <Setter Property=\"Background\"\r\n            Value=\"Transparent\"/>\r\n        <Setter Property=\"BorderThickness\"\r\n            Value=\"1\"/>\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\"\r\n            Value=\"Local\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ListBoxItem\">\r\n                    <Grid Background=\"{TemplateBinding Background}\"\r\n                Margin=\"1,1,1,1\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition From=\"Normal\"\r\n                                        GeneratedDuration=\"00:00:00.3000000\"\r\n                                        To=\"MouseOver\"/>\r\n                                    <VisualTransition From=\"MouseOver\"\r\n                                        GeneratedDuration=\"00:00:00.5000000\"\r\n                                        To=\"Normal\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"HoverRectangle\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition From=\"Unselected\"\r\n                                        GeneratedDuration=\"00:00:00.3000000\"\r\n                                        To=\"Selected\"/>\r\n                                    <VisualTransition From=\"Selected\"\r\n                                        GeneratedDuration=\"00:00:00.5000000\"\r\n                                        To=\"Unselected\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Unselected\"/>\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"SelectedRectangle\"\r\n                                                   Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\".75\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Rectangle x:Name=\"Background\"\r\n                       IsHitTestVisible=\"False\"\r\n                       Fill=\"{StaticResource SelectedBackgroundBrush}\"\r\n                       RadiusX=\"0\"/>\r\n                        <Rectangle x:Name=\"SelectedRectangle\"\r\n                       IsHitTestVisible=\"False\"\r\n                       Opacity=\"0\"\r\n                       Fill=\"{StaticResource NormalBrush}\"\r\n                       RadiusX=\"0\"/>\r\n                        <Rectangle x:Name=\"HoverRectangle\"\r\n                       IsHitTestVisible=\"False\"\r\n                       Fill=\"{StaticResource HoverBrush}\"\r\n                       RadiusX=\"0\"\r\n                       Opacity=\"0\"/>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                              Margin=\"{TemplateBinding Padding}\"/>\r\n                        <Rectangle x:Name=\"FocusVisualElement\"\r\n                       Visibility=\"Collapsed\"\r\n                       Stroke=\"{StaticResource HoverBrush}\"\r\n                       StrokeThickness=\"1\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--TabControl-->\r\n    <Style TargetType=\"TabControl\">\r\n        <Setter Property=\"IsTabStop\"\r\n            Value=\"False\" />\r\n        <Setter Property=\"Background\"\r\n            Value=\"{StaticResource ShadeBrushTop}\" />\r\n        <Setter Property=\"BorderBrush\"\r\n            Value=\"{StaticResource NormalBorderBrush}\" />\r\n        <Setter Property=\"BorderThickness\"\r\n            Value=\"1\" />\r\n        <Setter Property=\"Padding\"\r\n            Value=\"5\" />\r\n        <Setter Property=\"HorizontalContentAlignment\"\r\n            Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\"\r\n            Value=\"Stretch\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TabControl\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualTop\"\r\n                                                   Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualBottom\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualLeft\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualRight\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid x:Name=\"TemplateTop\"\r\n                  Visibility=\"Visible\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\" />\r\n                                <RowDefinition Height=\"*\" />\r\n                            </Grid.RowDefinitions>\r\n                            <TabPanel Margin=\"2,2,2,-1\"\r\n                                                           x:Name=\"TabPanelTop\"\r\n                                                           Canvas.ZIndex=\"1\" \r\n                                      IsItemsHost=\"True\"/>\r\n                            <Border MinHeight=\"10\"\r\n                      MinWidth=\"10\"\r\n                      Grid.Row=\"1\"\r\n                      Background=\"{TemplateBinding Background}\"\r\n                      BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                      BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                      CornerRadius=\"0,0,3,3\">\r\n                                <ContentPresenter Cursor=\"{TemplateBinding Cursor}\"\r\n                                  HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\"\r\n                                  Margin=\"{TemplateBinding Padding}\"\r\n                                  x:Name=\"PART_SelectedContentHost\" \r\n                                  ContentSource=\"SelectedContent\"\r\n                                  VerticalAlignment=\"{TemplateBinding VerticalAlignment}\" />\r\n                            </Border>\r\n                            <Border x:Name=\"DisabledVisualTop\"\r\n                      IsHitTestVisible=\"False\"\r\n                      Opacity=\"0\"\r\n                      Canvas.ZIndex=\"1\"\r\n                      Grid.Row=\"1\"\r\n                      Grid.RowSpan=\"2\"\r\n                      Background=\"#8CFFFFFF\"\r\n                      CornerRadius=\"0,0,3,3\" />\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateBottom\"\r\n                  Visibility=\"Collapsed\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"*\" />\r\n                                <RowDefinition Height=\"Auto\" />\r\n                            </Grid.RowDefinitions>\r\n                            <TabPanel Margin=\"2,-1,2,2\"\r\n                                                           x:Name=\"TabPanelBottom\"\r\n                                                           Canvas.ZIndex=\"1\"\r\n                                                           Grid.Row=\"1\" />\r\n                            <Border MinHeight=\"10\"\r\n                      MinWidth=\"10\"\r\n                      BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                      BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                      CornerRadius=\"3,3,0,0\"\r\n                      Background=\"{StaticResource ShadeBrushBottom}\">\r\n                                <ContentPresenter Cursor=\"{TemplateBinding Cursor}\"\r\n                                  HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\"\r\n                                  Margin=\"{TemplateBinding Padding}\"\r\n                                  x:Name=\"ContentBottom\"\r\n                                  VerticalAlignment=\"{TemplateBinding VerticalAlignment}\" />\r\n                            </Border>\r\n                            <Border x:Name=\"DisabledVisualBottom\"\r\n                      IsHitTestVisible=\"False\"\r\n                      Opacity=\"0\"\r\n                      Canvas.ZIndex=\"1\"\r\n                      Background=\"#8CFFFFFF\"\r\n                      CornerRadius=\"3,3,0,0\" />\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateLeft\"\r\n                  Visibility=\"Collapsed\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\" />\r\n                                <ColumnDefinition Width=\"*\" />\r\n                            </Grid.ColumnDefinitions>\r\n                            <TabPanel Margin=\"2,2,-1,2\"\r\n                                                           x:Name=\"TabPanelLeft\"\r\n                                                           Canvas.ZIndex=\"1\" />\r\n                            <Border MinHeight=\"10\"\r\n                      MinWidth=\"10\"\r\n                      Grid.Column=\"1\"\r\n                      BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                      BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                      CornerRadius=\"0,3,3,0\"\r\n                      Background=\"{StaticResource ShadeBrushLeft}\">\r\n                                <ContentPresenter Cursor=\"{TemplateBinding Cursor}\"\r\n                                  HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\"\r\n                                  Margin=\"{TemplateBinding Padding}\"\r\n                                  x:Name=\"ContentLeft\"\r\n                                  VerticalAlignment=\"{TemplateBinding VerticalAlignment}\" />\r\n                            </Border>\r\n                            <Border x:Name=\"DisabledVisualLeft\"\r\n                      IsHitTestVisible=\"False\"\r\n                      Opacity=\"0\"\r\n                      Canvas.ZIndex=\"1\"\r\n                      Grid.Column=\"1\"\r\n                      Background=\"#8CFFFFFF\"\r\n                      CornerRadius=\"0,3,3,0\" />\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateRight\"\r\n                  Visibility=\"Collapsed\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"*\" />\r\n                                <ColumnDefinition Width=\"Auto\" />\r\n                            </Grid.ColumnDefinitions>\r\n                            <TabPanel Margin=\"-1,2,2,2\"\r\n                                                           x:Name=\"TabPanelRight\"\r\n                                                           Canvas.ZIndex=\"1\"\r\n                                                           Grid.Column=\"1\" />\r\n                            <Border MinHeight=\"10\"\r\n                      MinWidth=\"10\"\r\n                      BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                      BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                      CornerRadius=\"3,0,0,3\"\r\n                      Background=\"{StaticResource ShadeBrushRight}\">\r\n                                <ContentPresenter Cursor=\"{TemplateBinding Cursor}\"\r\n                                  HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\"\r\n                                  Margin=\"{TemplateBinding Padding}\"\r\n                                  x:Name=\"ContentRight\"\r\n                                  VerticalAlignment=\"{TemplateBinding VerticalAlignment}\" />\r\n                            </Border>\r\n                            <Border Margin=\"0\"\r\n                      x:Name=\"DisabledVisualRight\"\r\n                      IsHitTestVisible=\"False\"\r\n                      Opacity=\"0\"\r\n                      Canvas.ZIndex=\"1\"\r\n                      Background=\"#8CFFFFFF\"\r\n                      CornerRadius=\"3,0,0,3\" />\r\n                        </Grid>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--TabControlItem-->\r\n    <Style TargetType=\"TabItem\">\r\n        <Setter Property=\"IsTabStop\"\r\n            Value=\"False\" />\r\n        <Setter Property=\"Background\"\r\n            Value=\"{StaticResource SelectedBackgroundBrush}\" />\r\n        <Setter Property=\"BorderBrush\"\r\n            Value=\"{StaticResource NormalBorderBrush}\" />\r\n        <Setter Property=\"BorderThickness\"\r\n            Value=\"1\" />\r\n        <Setter Property=\"Padding\"\r\n            Value=\"6,2,6,2\" />\r\n        <Setter Property=\"HorizontalContentAlignment\"\r\n            Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\"\r\n            Value=\"Stretch\" />\r\n        <Setter Property=\"MinWidth\"\r\n            Value=\"5\" />\r\n        <Setter Property=\"MinHeight\"\r\n            Value=\"5\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TabItem\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\" />\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\"\r\n                                        To=\"MouseOver\" />\r\n                                    <VisualTransition From=\"Normal\"\r\n                                        GeneratedDuration=\"00:00:00.3000000\"\r\n                                        To=\"MouseOver\" />\r\n                                    <VisualTransition From=\"MouseOver\"\r\n                                        GeneratedDuration=\"00:00:00.5000000\"\r\n                                        To=\"Normal\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"0\"\r\n                                                   Duration=\"00:00:00.001\"\r\n                                                   Storyboard.TargetName=\"FocusVisualTop\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"0\"\r\n                                                   Duration=\"00:00:00.001\"\r\n                                                   Storyboard.TargetName=\"FocusVisualBottom\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"0\"\r\n                                                   Duration=\"00:00:00.001\"\r\n                                                   Storyboard.TargetName=\"FocusVisualLeft\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"0\"\r\n                                                   Duration=\"00:00:00.001\"\r\n                                                   Storyboard.TargetName=\"FocusVisualRight\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"TopSelectedHoverRectangle\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"TopUnselectedHoverRectangle\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"rectangle\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"BottomUnselectedHoverRectangle\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"rectangle1\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"rectangle2\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"rectangle3\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"rectangle4\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualTopSelected\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.65\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualTopUnSelected\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.65\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualBottomSelected\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.65\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualBottomUnSelected\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.65\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualLeftSelected\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.65\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualLeftUnSelected\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.65\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualRightSelected\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.65\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualRightUnSelected\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.65\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualState x:Name=\"Unselected\">\r\n                                    <Storyboard />\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard />\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid x:Name=\"TemplateTopSelected\"\r\n                  Visibility=\"Visible\"\r\n                  Canvas.ZIndex=\"1\"\r\n                  Margin=\"2,0,2,0\">\r\n                            <Border Margin=\"-2,-2,-2,0\"\r\n                      Background=\"{TemplateBinding Background}\"\r\n                      BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                      BorderThickness=\"2,2,2,0\"\r\n                      CornerRadius=\"3,3,0,0\">\r\n                                <Border BorderBrush=\"{x:Null}\"\r\n                        CornerRadius=\"2.4,2.4,0,0\"\r\n                        Background=\"{StaticResource NormalBrush}\">\r\n                                    <Grid>\r\n                                        <Rectangle Fill=\"{StaticResource HoverBrush}\"\r\n                               x:Name=\"TopSelectedHoverRectangle\"\r\n                               Opacity=\"0\" />\r\n\r\n                                        <ContentPresenter HorizontalAlignment=\"Center\" Margin=\"12,2,12,2\" x:Name=\"ContentSite\" VerticalAlignment=\"Center\" RecognizesAccessKey=\"True\" ContentSource=\"Header\"/>\r\n\r\n<!--                                        \r\n                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\"\r\n                                    Foreground=\"{TemplateBinding Foreground}\"\r\n                                    IsTabStop=\"False\"\r\n                                    Cursor=\"{TemplateBinding Cursor}\"\r\n                                    HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\"\r\n                                    Margin=\"{TemplateBinding Padding}\"\r\n                                    x:Name=\"HeaderTopSelected\"\r\n                                    VerticalAlignment=\"{TemplateBinding VerticalAlignment}\" />\r\n-->                                        \r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border Margin=\"-2,-2,-2,0\"\r\n                      x:Name=\"FocusVisualTop\"\r\n                      IsHitTestVisible=\"false\"\r\n                      Visibility=\"Collapsed\"\r\n                      BorderBrush=\"{StaticResource HoverBrush}\"\r\n                      BorderThickness=\"2,2,2,0\"\r\n                      CornerRadius=\"3,3,0,0\" />\r\n                            <Border Margin=\"-2,-2,-2,0\"\r\n                      x:Name=\"DisabledVisualTopSelected\"\r\n                      IsHitTestVisible=\"false\"\r\n                      Opacity=\"0\"\r\n                      Background=\"{StaticResource DisabledBackgroundBrush}\"\r\n                      CornerRadius=\"3,3,0,0\" />\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateTopUnselected\"\r\n                  Visibility=\"Collapsed\"\r\n                  Margin=\"1,0,1,0\">\r\n                            <Border x:Name=\"BorderTop\"\r\n                      Background=\"{TemplateBinding Background}\"\r\n                      BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                      BorderThickness=\"1\"\r\n                      CornerRadius=\"3,3,0,0\">\r\n                                <Border x:Name=\"GradientTop\"\r\n                        BorderBrush=\"#FFFFFFFF\"\r\n                        CornerRadius=\"1,1,0,0\"\r\n                        Background=\"{x:Null}\">\r\n                                    <Grid>\r\n                                        <Rectangle Fill=\"{StaticResource HoverBrush}\"\r\n                               x:Name=\"TopUnselectedHoverRectangle\"\r\n                               Opacity=\"0\"\r\n                               Height=\"Auto\"\r\n                               HorizontalAlignment=\"Stretch\"\r\n                               VerticalAlignment=\"Stretch\"\r\n                               Width=\"Auto\" />\r\n                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\"\r\n                                    Foreground=\"{TemplateBinding Foreground}\"\r\n                                    IsTabStop=\"False\"\r\n                                    Cursor=\"{TemplateBinding Cursor}\"\r\n                                    HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\"\r\n                                    Margin=\"{TemplateBinding Padding}\"\r\n                                    x:Name=\"HeaderTopUnselected\"\r\n                                    VerticalAlignment=\"{TemplateBinding VerticalAlignment}\" />\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border x:Name=\"DisabledVisualTopUnSelected\"\r\n                      IsHitTestVisible=\"false\"\r\n                      Opacity=\"0\"\r\n                      Background=\"{StaticResource DisabledBackgroundBrush}\"\r\n                      CornerRadius=\"3,3,0,0\" />\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateBottomSelected\"\r\n                  Visibility=\"Collapsed\"\r\n                  Canvas.ZIndex=\"1\"\r\n                  Margin=\"2,0,2,0\">\r\n                            <Border Margin=\"-2,0,-2,-2\"\r\n                      Background=\"{TemplateBinding Background}\"\r\n                      BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                      BorderThickness=\"2,0,2,2\"\r\n                      CornerRadius=\"0,0,3,3\">\r\n                                <Border BorderBrush=\"{x:Null}\"\r\n                        CornerRadius=\"0,0,2.4,2.4\"\r\n                        Background=\"{StaticResource NormalBrush}\">\r\n                                    <Grid>\r\n                                        <Rectangle Margin=\"0,0,0,0\"\r\n                               Fill=\"{StaticResource HoverBrush}\"\r\n                               Opacity=\"0\"\r\n                               x:Name=\"rectangle\" />\r\n                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\"\r\n                                    Foreground=\"{TemplateBinding Foreground}\"\r\n                                    IsTabStop=\"False\"\r\n                                    Cursor=\"{TemplateBinding Cursor}\"\r\n                                    HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\"\r\n                                    Margin=\"{TemplateBinding Padding}\"\r\n                                    x:Name=\"HeaderBottomSelected\"\r\n                                    VerticalAlignment=\"{TemplateBinding VerticalAlignment}\" />\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border Margin=\"-2,0,-2,-2\"\r\n                      x:Name=\"FocusVisualBottom\"\r\n                      IsHitTestVisible=\"false\"\r\n                      Visibility=\"Collapsed\"\r\n                      BorderBrush=\"{StaticResource HoverBrush}\"\r\n                      BorderThickness=\"2,0,2,2\"\r\n                      CornerRadius=\"0,0,3,3\" />\r\n                            <Border Margin=\"-2,0,-2,-2\"\r\n                      x:Name=\"DisabledVisualBottomSelected\"\r\n                      IsHitTestVisible=\"false\"\r\n                      Opacity=\"0\"\r\n                      Background=\"{StaticResource DisabledBackgroundBrush}\"\r\n                      CornerRadius=\"0,0,3,3\" />\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateBottomUnselected\"\r\n                  Visibility=\"Collapsed\"\r\n                  Margin=\"1,0,1,0\">\r\n                            <Border x:Name=\"BorderBottom\"\r\n                      Background=\"{TemplateBinding Background}\"\r\n                      BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                      BorderThickness=\"1\"\r\n                      CornerRadius=\"0,0,3,3\">\r\n                                <Border x:Name=\"GradientBottom\"\r\n                        BorderBrush=\"{x:Null}\"\r\n                        CornerRadius=\"0,0,1,1\"\r\n                        Background=\"{x:Null}\">\r\n                                    <Grid>\r\n                                        <Rectangle Fill=\"{StaticResource HoverBrush}\"\r\n                               x:Name=\"BottomUnselectedHoverRectangle\"\r\n                               Opacity=\"0\"\r\n                               Height=\"Auto\"\r\n                               HorizontalAlignment=\"Stretch\"\r\n                               VerticalAlignment=\"Stretch\"\r\n                               Width=\"Auto\" />\r\n                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\"\r\n                                    Foreground=\"{TemplateBinding Foreground}\"\r\n                                    IsTabStop=\"False\"\r\n                                    Cursor=\"{TemplateBinding Cursor}\"\r\n                                    HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\"\r\n                                    Margin=\"{TemplateBinding Padding}\"\r\n                                    x:Name=\"HeaderBottomUnselected\"\r\n                                    VerticalAlignment=\"{TemplateBinding VerticalAlignment}\" />\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border x:Name=\"DisabledVisualBottomUnSelected\"\r\n                      IsHitTestVisible=\"false\"\r\n                      Opacity=\"0\"\r\n                      Background=\"{StaticResource DisabledBackgroundBrush}\"\r\n                      CornerRadius=\"0,0,3,3\" />\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateLeftSelected\"\r\n                  Visibility=\"Collapsed\"\r\n                  Canvas.ZIndex=\"1\"\r\n                  Margin=\"0,3,0,3\">\r\n                            <Border Margin=\"-2,-2,0,-2\"\r\n                      Background=\"{TemplateBinding Background}\"\r\n                      BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                      BorderThickness=\"2,2,0,2\"\r\n                      CornerRadius=\"3,0,0,3\">\r\n                                <Border BorderBrush=\"{x:Null}\"\r\n                        BorderThickness=\"0,0,0,0\"\r\n                        CornerRadius=\"1,0,0,1\"\r\n                        Background=\"{StaticResource NormalBrush}\">\r\n                                    <Grid>\r\n                                        <Rectangle Fill=\"{StaticResource HoverBrush}\"\r\n                               Opacity=\"0\"\r\n                               x:Name=\"rectangle1\" />\r\n                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\"\r\n                                    Foreground=\"{TemplateBinding Foreground}\"\r\n                                    IsTabStop=\"False\"\r\n                                    Cursor=\"{TemplateBinding Cursor}\"\r\n                                    HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\"\r\n                                    Margin=\"{TemplateBinding Padding}\"\r\n                                    x:Name=\"HeaderLeftSelected\"\r\n                                    VerticalAlignment=\"{TemplateBinding VerticalAlignment}\" />\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border Margin=\"-2,-2,0,-2\"\r\n                      x:Name=\"FocusVisualLeft\"\r\n                      IsHitTestVisible=\"false\"\r\n                      Visibility=\"Collapsed\"\r\n                      BorderBrush=\"{StaticResource HoverBrush}\"\r\n                      BorderThickness=\"2,2,0,2\"\r\n                      CornerRadius=\"3,0,0,3\" />\r\n                            <Border Margin=\"-2,-2,0,-2\"\r\n                      x:Name=\"DisabledVisualLeftSelected\"\r\n                      IsHitTestVisible=\"false\"\r\n                      Opacity=\"0\"\r\n                      Background=\"{StaticResource DisabledBackgroundBrush}\"\r\n                      CornerRadius=\"3,0,0,3\" />\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateLeftUnselected\"\r\n                  Visibility=\"Collapsed\"\r\n                  Margin=\"0,1,0,1\">\r\n                            <Border x:Name=\"BorderLeft\"\r\n                      Background=\"{TemplateBinding Background}\"\r\n                      BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                      BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                      CornerRadius=\"3,0,0,3\">\r\n                                <Border x:Name=\"GradientLeft\"\r\n                        BorderBrush=\"{x:Null}\"\r\n                        CornerRadius=\"1,0,0,1\"\r\n                        Background=\"{x:Null}\">\r\n                                    <Grid>\r\n                                        <Rectangle Fill=\"{StaticResource HoverBrush}\"\r\n                               Opacity=\"0\"\r\n                               Height=\"Auto\"\r\n                               HorizontalAlignment=\"Stretch\"\r\n                               VerticalAlignment=\"Stretch\"\r\n                               Width=\"Auto\"\r\n                               x:Name=\"rectangle2\" />\r\n                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\"\r\n                                    Foreground=\"{TemplateBinding Foreground}\"\r\n                                    IsTabStop=\"False\"\r\n                                    Cursor=\"{TemplateBinding Cursor}\"\r\n                                    HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\"\r\n                                    Margin=\"{TemplateBinding Padding}\"\r\n                                    x:Name=\"HeaderLeftUnselected\"\r\n                                    VerticalAlignment=\"{TemplateBinding VerticalAlignment}\" />\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border x:Name=\"DisabledVisualLeftUnSelected\"\r\n                      IsHitTestVisible=\"false\"\r\n                      Opacity=\"0\"\r\n                      Background=\"{StaticResource DisabledBackgroundBrush}\"\r\n                      CornerRadius=\"3,0,0,3\" />\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateRightSelected\"\r\n                  Visibility=\"Collapsed\"\r\n                  Canvas.ZIndex=\"1\"\r\n                  Margin=\"0,3,0,3\">\r\n                            <Border Margin=\"0,-2,-2,-2\"\r\n                      Background=\"{TemplateBinding Background}\"\r\n                      BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                      BorderThickness=\"0,2,2,2\"\r\n                      CornerRadius=\"0,3,3,0\">\r\n                                <Border BorderBrush=\"{x:Null}\"\r\n                        CornerRadius=\"0,3,3,0\"\r\n                        Background=\"{StaticResource NormalBrush}\">\r\n                                    <Grid>\r\n                                        <Rectangle Margin=\"-2,0,0,0\"\r\n                               Fill=\"{StaticResource HoverBrush}\"\r\n                               Opacity=\"0\"\r\n                               x:Name=\"rectangle3\" />\r\n                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\"\r\n                                    Foreground=\"{TemplateBinding Foreground}\"\r\n                                    IsTabStop=\"False\"\r\n                                    Cursor=\"{TemplateBinding Cursor}\"\r\n                                    HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\"\r\n                                    Margin=\"{TemplateBinding Padding}\"\r\n                                    x:Name=\"HeaderRightSelected\"\r\n                                    VerticalAlignment=\"{TemplateBinding VerticalAlignment}\" />\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border Margin=\"0,-2,-2,-2\"\r\n                      x:Name=\"FocusVisualRight\"\r\n                      IsHitTestVisible=\"false\"\r\n                      Visibility=\"Collapsed\"\r\n                      BorderBrush=\"{StaticResource HoverBrush}\"\r\n                      BorderThickness=\"0,1,1,1\"\r\n                      CornerRadius=\"0,3,3,0\" />\r\n                            <Border Margin=\"0,-2,-2,-2\"\r\n                      x:Name=\"DisabledVisualRightSelected\"\r\n                      IsHitTestVisible=\"false\"\r\n                      Opacity=\"0\"\r\n                      Background=\"{StaticResource DisabledBackgroundBrush}\"\r\n                      CornerRadius=\"0,3,3,0\" />\r\n                        </Grid>\r\n                        <Grid x:Name=\"TemplateRightUnselected\"\r\n                  Visibility=\"Collapsed\"\r\n                  Margin=\"0,1,0,1\">\r\n                            <Border x:Name=\"BorderRight\"\r\n                      Background=\"{TemplateBinding Background}\"\r\n                      BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                      BorderThickness=\"1\"\r\n                      CornerRadius=\"0,3,3,0\">\r\n                                <Border x:Name=\"GradientRight\"\r\n                        BorderBrush=\"{x:Null}\"\r\n                        CornerRadius=\"0,1,1,0\"\r\n                        Background=\"{x:Null}\">\r\n                                    <Grid>\r\n                                        <Rectangle Fill=\"{StaticResource HoverBrush}\"\r\n                               Opacity=\"0\"\r\n                               Height=\"Auto\"\r\n                               VerticalAlignment=\"Stretch\"\r\n                               x:Name=\"rectangle4\" />\r\n                                        <ContentControl FontSize=\"{TemplateBinding FontSize}\"\r\n                                    Foreground=\"{TemplateBinding Foreground}\"\r\n                                    IsTabStop=\"False\"\r\n                                    Cursor=\"{TemplateBinding Cursor}\"\r\n                                    HorizontalAlignment=\"{TemplateBinding HorizontalAlignment}\"\r\n                                    Margin=\"{TemplateBinding Padding}\"\r\n                                    x:Name=\"HeaderRightUnselected\"\r\n                                    VerticalAlignment=\"{TemplateBinding VerticalAlignment}\" />\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Border>\r\n                            <Border x:Name=\"DisabledVisualRightUnSelected\"\r\n                      IsHitTestVisible=\"false\"\r\n                      Opacity=\"0\"\r\n                      Background=\"{StaticResource DisabledBackgroundBrush}\"\r\n                      CornerRadius=\"0,3,3,0\" />\r\n                        </Grid>\r\n                        <Border Margin=\"-1\"\r\n                    x:Name=\"FocusVisualElement\"\r\n                    IsHitTestVisible=\"false\"\r\n                    Visibility=\"Collapsed\"\r\n                    BorderBrush=\"#FF6DBDD1\"\r\n                    BorderThickness=\"1\"\r\n                    CornerRadius=\"3,3,0,0\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\"\r\n            Value=\"#FFFFFFFF\" />\r\n    </Style>\r\n    <!--ComboBoxItem-->\r\n    <Style  TargetType=\"ComboBoxItem\">\r\n        <Setter Property=\"Padding\"\r\n            Value=\"3\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\"\r\n            Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\"\r\n            Value=\"Top\"/>\r\n        <Setter Property=\"Background\"\r\n            Value=\"Transparent\"/>\r\n        <Setter Property=\"BorderThickness\"\r\n            Value=\"1\"/>\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\"\r\n            Value=\"Local\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ComboBoxItem\">\r\n                    <Grid Background=\"{TemplateBinding Background}\"\r\n                Margin=\"1,1,1,1\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition From=\"Normal\"\r\n                                        GeneratedDuration=\"00:00:00.3000000\"\r\n                                        To=\"MouseOver\"/>\r\n                                    <VisualTransition From=\"MouseOver\"\r\n                                        GeneratedDuration=\"00:00:00.5000000\"\r\n                                        To=\"Normal\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"HoverRectangle\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition From=\"Unselected\"\r\n                                        GeneratedDuration=\"00:00:00.3000000\"\r\n                                        To=\"Selected\"/>\r\n                                    <VisualTransition From=\"Selected\"\r\n                                        GeneratedDuration=\"00:00:00.5000000\"\r\n                                        To=\"Unselected\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Unselected\"/>\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"SelectedRectangle\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Rectangle x:Name=\"Background\"\r\n                       IsHitTestVisible=\"False\"\r\n                       Fill=\"{StaticResource SelectedBackgroundBrush}\"\r\n                       RadiusX=\"1\"\r\n                       RadiusY=\"1\"/>\r\n                        <Rectangle x:Name=\"HoverRectangle\"\r\n                       IsHitTestVisible=\"False\"\r\n                       Opacity=\"0\"\r\n                       Fill=\"{StaticResource HoverBrush}\"\r\n                       RadiusX=\"1\"\r\n                       RadiusY=\"1\"/>\r\n                        <Rectangle x:Name=\"SelectedRectangle\"\r\n                       IsHitTestVisible=\"False\"\r\n                       Opacity=\"0\"\r\n                       Fill=\"{StaticResource NormalBrush}\"\r\n                       RadiusX=\"1\"\r\n                       RadiusY=\"1\"/>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                              Margin=\"{TemplateBinding Padding}\"/>\r\n                        <Rectangle x:Name=\"FocusVisualElement\"\r\n                       Visibility=\"Collapsed\"\r\n                       Stroke=\"{StaticResource HoverBrush}\"\r\n                       StrokeThickness=\"1\"\r\n                       RadiusX=\"1\"\r\n                       RadiusY=\"1\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\"\r\n            Value=\"#FFFFFFFF\"/>\r\n    </Style>\r\n    <!--ComboBox-->\r\n    <Style  TargetType=\"ComboBox\">\r\n        <Setter Property=\"Padding\"\r\n            Value=\"6,2,25,2\"/>\r\n        <Setter Property=\"Background\"\r\n            Value=\"{StaticResource NormalBrush}\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\"\r\n            Value=\"Left\"/>\r\n        <Setter Property=\"BorderThickness\"\r\n            Value=\"2\"/>\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\"\r\n            Value=\"Once\"/>\r\n        <Setter Property=\"BorderBrush\"\r\n            Value=\"{StaticResource NormalBorderBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ComboBox\">\r\n                    <Grid>\r\n                        <Grid.Resources>\r\n                            <Style TargetType=\"ToggleButton\"\r\n                     x:Name=\"comboToggleStyle\">\r\n                                <Setter Property=\"Foreground\"\r\n                        Value=\"#FF000000\"/>\r\n                                <Setter Property=\"Background\"\r\n                        Value=\"{StaticResource NormalBrush}\"/>\r\n                                <Setter Property=\"BorderBrush\"\r\n                        Value=\"{StaticResource NormalBorderBrush}\" />\r\n                                <Setter Property=\"BorderThickness\"\r\n                        Value=\"2\"/>\r\n                                <Setter Property=\"Padding\"\r\n                        Value=\"1\"/>\r\n                                <Setter Property=\"Template\">\r\n                                    <Setter.Value>\r\n                                        <ControlTemplate TargetType=\"ToggleButton\">\r\n                                            <Grid>\r\n                                                <Grid.ColumnDefinitions>\r\n                                                    <ColumnDefinition />\r\n                                                    <ColumnDefinition Width=\"20\" />\r\n                                                </Grid.ColumnDefinitions>\r\n                                                <VisualStateManager.VisualStateGroups>\r\n                                                    <VisualStateGroup x:Name=\"CommonStates\">\r\n                                                        <VisualStateGroup.Transitions>\r\n                                                            <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                                    To=\"MouseOver\"/>\r\n                                                            <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                                    To=\"Pressed\"/>\r\n                                                            <VisualTransition From=\"Normal\"\r\n                                                    GeneratedDuration=\"00:00:00.3000000\"\r\n                                                    To=\"MouseOver\"/>\r\n                                                            <VisualTransition From=\"MouseOver\"\r\n                                                    GeneratedDuration=\"00:00:00.5000000\"\r\n                                                    To=\"Normal\"/>\r\n                                                            <VisualTransition From=\"Pressed\"\r\n                                                    GeneratedDuration=\"00:00:00.5000000\"\r\n                                                    To=\"MouseOver\"/>\r\n                                                            <VisualTransition From=\"MouseOver\"\r\n                                                    GeneratedDuration=\"00:00:00.3000000\"\r\n                                                    To=\"Pressed\"/>\r\n                                                        </VisualStateGroup.Transitions>\r\n                                                        <VisualState x:Name=\"Normal\"/>\r\n                                                        <VisualState x:Name=\"MouseOver\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                               Duration=\"00:00:00.0010000\"\r\n                                                               Storyboard.TargetName=\"HoverRectangle\"\r\n                                                               Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                                        Value=\"1\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Pressed\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                               Duration=\"00:00:00.0010000\"\r\n                                                               Storyboard.TargetName=\"Background\"\r\n                                                               Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                                        Value=\"0.7\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Disabled\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\"\r\n                                                               Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                                        Value=\"1\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                    </VisualStateGroup>\r\n                                                    <VisualStateGroup x:Name=\"CheckStates\">\r\n                                                        <VisualState x:Name=\"Checked\">\r\n                                                            <Storyboard/>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Unchecked\"/>\r\n                                                    </VisualStateGroup>\r\n                                                </VisualStateManager.VisualStateGroups>\r\n                                                <Rectangle x:Name=\"Background\"\r\n                                   Fill=\"{TemplateBinding Background}\"\r\n                                   Stroke=\"{TemplateBinding BorderBrush}\"\r\n                                   StrokeThickness=\"2\"\r\n                                   RadiusX=\"3\"\r\n                                   RadiusY=\"3\"\r\n                                   Grid.ColumnSpan=\"2\"/>\r\n                                                <Rectangle x:Name=\"HoverRectangle\"\r\n                                   Opacity=\"0\"\r\n                                   Fill=\"{StaticResource HoverBrush}\"\r\n                                   Stroke=\"{x:Null}\"\r\n                                   StrokeThickness=\"{TemplateBinding BorderThickness}\"\r\n                                   RadiusX=\"2\"\r\n                                   RadiusY=\"2\"\r\n                                   Grid.ColumnSpan=\"2\"\r\n                                   Grid.Column=\"1\"\r\n                                   Margin=\"-4,2,2,2\"/>\r\n                                                <Rectangle x:Name=\"BackgroundOverlay2\"\r\n                                   Fill=\"#FFFFFFFF\"\r\n                                   Stroke=\"#00000000\"\r\n                                   RadiusX=\"2\"\r\n                                   RadiusY=\"2\"\r\n                                   Margin=\"1.45000004768372,1,0,1\"/>\r\n                                                <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                                          Margin=\"{TemplateBinding Padding}\"\r\n                                          x:Name=\"contentPresenter\"\r\n                                          VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                                          Content=\"{TemplateBinding Content}\"\r\n                                          ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                                          Grid.Column=\"1\"\r\n                                          Grid.Row=\"9\"/>\r\n                                                <Rectangle x:Name=\"DisabledVisualElement\"\r\n                                   IsHitTestVisible=\"false\"\r\n                                   Opacity=\"0\"\r\n                                   Fill=\"#A5FFFFFF\"\r\n                                   RadiusX=\"3\"\r\n                                   RadiusY=\"3\"/>\r\n                                                <Rectangle x:Name=\"FocusVisualElement\"\r\n                                   IsHitTestVisible=\"false\"\r\n                                   Visibility=\"Collapsed\"\r\n                                   Stroke=\"{StaticResource NormalBrush}\"\r\n                                   StrokeThickness=\"1\"\r\n                                   RadiusX=\"3.5\"\r\n                                   RadiusY=\"3.5\"\r\n                                   Grid.ColumnSpan=\"2\"/>\r\n                                            </Grid>\r\n                                        </ControlTemplate>\r\n                                    </Setter.Value>\r\n                                </Setter>\r\n                            </Style>\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"0.65\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"ContentPresenterBorder\">\r\n                            <Grid>\r\n                                <ToggleButton Background=\"{TemplateBinding Background}\"\r\n                              BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                              BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                              HorizontalContentAlignment=\"Right\"\r\n                              HorizontalAlignment=\"Stretch\"\r\n                              x:Name=\"DropDownToggle\"\r\n                              Style=\"{DynamicResource comboToggleStyle}\"\r\n                              VerticalAlignment=\"Stretch\"\r\n                              IsChecked=\"{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\">\r\n                                    <Path Height=\"4\"\r\n                        HorizontalAlignment=\"Right\"\r\n                        Margin=\"0,0,6,0\"\r\n                        x:Name=\"BtnArrow\"\r\n                        Width=\"8\"\r\n                        Stretch=\"Uniform\"\r\n                        Data=\"F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z \">\r\n                                        <Path.Fill>\r\n                                            <SolidColorBrush Color=\"#FF333333\"\r\n                                       x:Name=\"BtnArrowColor\"/>\r\n                                        </Path.Fill>\r\n                                    </Path>\r\n                                </ToggleButton>\r\n                                <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                                  Margin=\"{TemplateBinding Padding}\"\r\n                                  x:Name=\"ContentPresenter\"\r\n                                  VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                                                  Content=\"{TemplateBinding SelectionBoxItem}\" ContentTemplate=\"{TemplateBinding SelectionBoxItemTemplate}\" ContentTemplateSelector=\"{TemplateBinding ItemTemplateSelector}\" IsHitTestVisible=\"False\">\r\n                                </ContentPresenter>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Rectangle x:Name=\"DisabledVisualElement\"\r\n                       IsHitTestVisible=\"false\"\r\n                       Fill=\"{StaticResource DisabledBackgroundBrush}\"\r\n                       RadiusX=\"4\"\r\n                       RadiusY=\"4\"\r\n                       Opacity=\"0\"\r\n                       StrokeThickness=\"0\"/>\r\n                        <Rectangle x:Name=\"FocusVisualElement\"\r\n                       IsHitTestVisible=\"false\"\r\n                       Opacity=\"0\"\r\n                       Stroke=\"{StaticResource HoverBrush}\"\r\n                       StrokeThickness=\"1\"\r\n                       RadiusX=\"3\"\r\n                       RadiusY=\"3\"/>\r\n                        \r\n                        <Popup x:Name=\"Popup\" IsOpen=\"{TemplateBinding IsDropDownOpen}\">\r\n                            <Grid MaxHeight=\"{TemplateBinding MaxDropDownHeight}\" MinWidth=\"{TemplateBinding ActualWidth}\" x:Name=\"DropDown\" SnapsToDevicePixels=\"True\">\r\n\r\n                                <Border Height=\"Auto\"\r\n                      HorizontalAlignment=\"Stretch\"\r\n                      x:Name=\"PopupBorder\"\r\n                      BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                      BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                      CornerRadius=\"3\"\r\n                      Background=\"{StaticResource ShadeBrush}\">\r\n                                    <ScrollViewer BorderThickness=\"0\"                                             \r\n                                              Padding=\"1\" \r\n                                              SnapsToDevicePixels=\"True\" \r\n                                              HorizontalScrollBarVisibility=\"Auto\" \r\n                                              VerticalScrollBarVisibility=\"Auto\" \r\n                                              CanContentScroll=\"True\">\r\n                                        <ItemsPresenter/>\r\n                                    </ScrollViewer>\r\n                                </Border>\r\n\r\n                            </Grid>\r\n                        </Popup>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\"\r\n            Value=\"#FF000000\"/>\r\n    </Style>\r\n    <!--Textbox-->\r\n    <Style TargetType=\"TextBox\">\r\n        <Setter Property=\"BorderThickness\"\r\n            Value=\"1\"/>\r\n        <Setter Property=\"Background\"\r\n            Value=\"{StaticResource ShadeBrush}\"/>\r\n        <Setter Property=\"Foreground\"\r\n            Value=\"#FF000000\"/>\r\n        <Setter Property=\"Padding\"\r\n            Value=\"2\"/>\r\n        <Setter Property=\"BorderBrush\"\r\n            Value=\"{StaticResource NormalBorderBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TextBox\">\r\n                    <Grid >\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                        To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                        To=\"ReadOnly\"/>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                        To=\"Disabled\"/>\r\n                                    <VisualTransition From=\"Normal\"\r\n                                        GeneratedDuration=\"00:00:00.3000000\"\r\n                                        To=\"MouseOver\"/>\r\n                                    <VisualTransition From=\"MouseOver\"\r\n                                        GeneratedDuration=\"00:00:00.5000000\"\r\n                                        To=\"Normal\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"HoverBorder\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\"\r\n                                                   Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.6\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ReadOnly\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ReadOnlyVisualElement\"\r\n                                                   Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"Border\"\r\n                    Opacity=\"1\"\r\n                    Background=\"{TemplateBinding Background}\"\r\n                    BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                    BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                    CornerRadius=\"2,2,2,2\">\r\n                            <Grid>\r\n                                <Border x:Name=\"ReadOnlyVisualElement\"\r\n                        Opacity=\"0\"\r\n                        Background=\"#72F7F7F7\"/>\r\n                                <Border BorderThickness=\"1\"\r\n                        CornerRadius=\"1,1,1,1\">\r\n                                    <Border.BorderBrush>\r\n                                        <SolidColorBrush Color=\"Transparent\"\r\n                                     x:Name=\"MouseOverColor\"/>\r\n                                    </Border.BorderBrush>\r\n                                    <ScrollViewer BorderThickness=\"0\"\r\n                                IsTabStop=\"False\"\r\n                                Padding=\"{TemplateBinding Padding}\"\r\n                                x:Name=\"PART_ContentHost\"/>\r\n                                </Border>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Border x:Name=\"HoverBorder\"\r\n                    Opacity=\"0\"\r\n                    BorderBrush=\"{StaticResource NormalBrush}\"\r\n                    BorderThickness=\"2,2,2,2\"\r\n                    CornerRadius=\"2,2,2,2\"/>\r\n                        <Border x:Name=\"DisabledVisualElement\"\r\n                    IsHitTestVisible=\"False\"\r\n                    Opacity=\"0\"\r\n                    Background=\"#FFFFFFFF\"\r\n                    BorderBrush=\"#A5F7F7F7\"\r\n                    BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                    CornerRadius=\"2,2,2,2\"/>\r\n                        <Border Margin=\"1\"\r\n                    x:Name=\"FocusVisualElement\"\r\n                    IsHitTestVisible=\"False\"\r\n                    Opacity=\"0\"\r\n                    BorderBrush=\"{StaticResource NormalBrush}\"\r\n                    BorderThickness=\"2.1,2.1,2.1,2.1\"\r\n                    CornerRadius=\"0.2,0.2,0.2,0.2\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--ProgressBar-->\r\n    <Style TargetType=\"ProgressBar\">\r\n        <Setter Property=\"Foreground\"\r\n            Value=\"{StaticResource NormalBrush}\"/>\r\n        <Setter Property=\"Background\"\r\n            Value=\"{StaticResource SelectedBackgroundBrush}\"/>\r\n        <Setter Property=\"BorderThickness\"\r\n            Value=\"2\"/>\r\n        <Setter Property=\"Maximum\"\r\n            Value=\"100\"/>\r\n        <Setter Property=\"IsTabStop\"\r\n            Value=\"False\"/>\r\n        <Setter Property=\"BorderBrush\"\r\n            Value=\"{StaticResource DisabledBackgroundBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ProgressBar\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Determinate\" />\r\n                                <VisualState x:Name=\"Indeterminate\">\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"PART_Track\"\r\n                    Background=\"{TemplateBinding Background}\"\r\n                    BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                    BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                    CornerRadius=\"6,6,6,6\"/>\r\n                        <Grid x:Name=\"ProgressBarRootGrid\">\r\n                            <Grid x:Name=\"IndeterminateRoot\"\r\n                    Visibility=\"Collapsed\">\r\n                                <Rectangle Margin=\"1,1,1,1\"\r\n                           x:Name=\"IndeterminateGradientFill\"\r\n                           Opacity=\"0.7\"\r\n                           RadiusX=\"5\"\r\n                           RadiusY=\"5\"\r\n                           StrokeThickness=\"0\">\r\n                                    <Rectangle.Fill>\r\n                                        <LinearGradientBrush EndPoint=\"0,1\"\r\n                                         StartPoint=\"20,1\"\r\n                                         MappingMode=\"Absolute\"\r\n                                         SpreadMethod=\"Repeat\">\r\n                                            <LinearGradientBrush.Transform>\r\n                                                <TransformGroup>\r\n                                                    <TranslateTransform X=\"0\"/>\r\n                                                    <SkewTransform AngleX=\"-30\"/>\r\n                                                </TransformGroup>\r\n                                            </LinearGradientBrush.Transform>\r\n                                            <GradientStop Color=\"#FFFFFFFF\"\r\n                                    Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#00FFFFFF\"\r\n                                    Offset=\".25\"/>\r\n                                            <GradientStop Color=\"#FFFFFFFF\"\r\n                                    Offset=\"0.85\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Rectangle.Fill>\r\n                                    <Rectangle.OpacityMask>\r\n                                        <LinearGradientBrush EndPoint=\"0.004,0.465\"\r\n                                         StartPoint=\"0.997,0.422\">\r\n                                            <GradientStop Color=\"#00FFFFFF\"/>\r\n                                            <GradientStop Color=\"#00FFFFFF\"\r\n                                    Offset=\"1\"/>\r\n                                            <GradientStop Color=\"#FFFFFFFF\"\r\n                                    Offset=\"0.486\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Rectangle.OpacityMask>\r\n                                </Rectangle>\r\n                            </Grid>\r\n                            <Grid Margin=\"1\"\r\n                    x:Name=\"DeterminateRoot\">\r\n                                <Rectangle HorizontalAlignment=\"Left\"\r\n                           Margin=\"1,1,1,1\"\r\n                           x:Name=\"PART_Indicator\"\r\n                           Fill=\"{TemplateBinding Foreground}\"\r\n                           StrokeThickness=\"0.5\"\r\n                           RadiusX=\"5\"\r\n                           RadiusY=\"5\"/>\r\n                            </Grid>\r\n                        </Grid>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsIndeterminate\" Value=\"True\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard>\r\n                                    <Storyboard RepeatBehavior=\"Forever\">\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00\" Storyboard.TargetName=\"IndeterminateRoot\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00\" Storyboard.TargetName=\"DeterminateRoot\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"IndeterminateGradientFill\" Storyboard.TargetProperty=\"(Shape.Fill).(LinearGradientBrush.Transform).(TransformGroup.Children)[0].X\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0\" />\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:2.4\" Value=\"145\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </BeginStoryboard>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--Thumb-->\r\n    <Style  TargetType=\"Thumb\">\r\n        <Setter Property=\"Background\"\r\n            Value=\"{StaticResource NormalBrush}\"/>\r\n        <Setter Property=\"BorderThickness\"\r\n            Value=\"2\"/>\r\n        <Setter Property=\"IsTabStop\"\r\n            Value=\"False\"/>\r\n        <Setter Property=\"BorderBrush\"\r\n            Value=\"{StaticResource NormalBorderBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Thumb\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                        To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                        To=\"Pressed\"/>\r\n                                    <VisualTransition From=\"Normal\"\r\n                                        GeneratedDuration=\"00:00:00.3000000\"\r\n                                        To=\"MouseOver\"/>\r\n                                    <VisualTransition From=\"MouseOver\"\r\n                                        GeneratedDuration=\"00:00:00.5000000\"\r\n                                        To=\"Normal\"/>\r\n                                    <VisualTransition From=\"Pressed\"\r\n                                        GeneratedDuration=\"00:00:00.5000000\"\r\n                                        To=\"MouseOver\"/>\r\n                                    <VisualTransition From=\"MouseOver\"\r\n                                        GeneratedDuration=\"00:00:00.3000000\"\r\n                                        To=\"Pressed\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundAnimation\"\r\n                                                   Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"Background\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"0.7\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.65\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Rectangle x:Name=\"Base\"\r\n                       RadiusX=\"5\"\r\n                       RadiusY=\"5\"\r\n                       Fill=\"#FF000000\"\r\n                       StrokeThickness=\"0\"/>\r\n                        <Rectangle x:Name=\"Background\"\r\n                       Fill=\"{TemplateBinding Background}\"\r\n                       Stroke=\"{TemplateBinding BorderBrush}\"\r\n                       StrokeThickness=\"2\"\r\n                       RadiusX=\"4\"\r\n                       RadiusY=\"4\"/>\r\n                        <Rectangle x:Name=\"BackgroundAnimation\"\r\n                       Opacity=\"0\"\r\n                       Fill=\"{StaticResource HoverBrush}\"\r\n                       RadiusX=\"3\"\r\n                       RadiusY=\"3\"\r\n                       Margin=\"2,2,2,2\"\r\n                       StrokeThickness=\"0\"/>\r\n                        <Rectangle x:Name=\"DisabledVisualElement\"\r\n                       IsHitTestVisible=\"false\"\r\n                       Opacity=\"0\"\r\n                       Fill=\"{StaticResource DisabledBackgroundBrush}\"\r\n                       RadiusX=\"5\"\r\n                       RadiusY=\"5\"/>\r\n                        <Rectangle x:Name=\"FocusVisualElement\"\r\n                       IsHitTestVisible=\"false\"\r\n                       Visibility=\"Collapsed\"\r\n                       Stroke=\"{StaticResource HoverBrush}\"\r\n                       StrokeThickness=\"1\"\r\n                       RadiusX=\"4.5\"\r\n                       RadiusY=\"4.5\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--Slider-->\r\n    <Style TargetType=\"Slider\">\r\n        <Setter Property=\"BorderThickness\"\r\n            Value=\"1\"/>\r\n        <Setter Property=\"Maximum\"\r\n            Value=\"10\"/>\r\n        <Setter Property=\"Minimum\"\r\n            Value=\"0\"/>\r\n        <Setter Property=\"Value\"\r\n            Value=\"0\"/>\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\"\r\n                             StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"#FFA3AEB9\"\r\n                        Offset=\"0\"/>\r\n                    <GradientStop Color=\"#FF8399A9\"\r\n                        Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF718597\"\r\n                        Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF617584\"\r\n                        Offset=\"1\"/>\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"IsTabStop\"\r\n            Value=\"False\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Slider\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <Grid.Resources>\r\n                            <ControlTemplate x:Key=\"RepeatButtonTemplate\">\r\n                                <Grid x:Name=\"Root\"\r\n                      Opacity=\"0\"\r\n                      Background=\"Transparent\"/>\r\n                            </ControlTemplate>\r\n                            <Style x:Key=\"SLSliderVerticalThumb\"\r\n                     TargetType=\"Thumb\">\r\n                                <Setter Property=\"Background\"\r\n                        Value=\"{StaticResource NormalBrush}\"/>\r\n                                <Setter Property=\"BorderThickness\"\r\n                        Value=\"1\"/>\r\n                                <Setter Property=\"IsTabStop\"\r\n                        Value=\"False\"/>\r\n                                <Setter Property=\"BorderBrush\"\r\n                        Value=\"{StaticResource NormalBorderBrush}\" />\r\n                                <Setter Property=\"Template\">\r\n                                    <Setter.Value>\r\n                                        <ControlTemplate TargetType=\"Thumb\">\r\n                                            <Grid>\r\n                                                <VisualStateManager.VisualStateGroups>\r\n                                                    <VisualStateGroup x:Name=\"CommonStates\">\r\n                                                        <VisualStateGroup.Transitions>\r\n                                                            <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                                    To=\"MouseOver\"/>\r\n                                                            <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                                    To=\"Pressed\"/>\r\n                                                            <VisualTransition From=\"Normal\"\r\n                                                    GeneratedDuration=\"00:00:00.3000000\"\r\n                                                    To=\"MouseOver\"/>\r\n                                                            <VisualTransition From=\"MouseOver\"\r\n                                                    GeneratedDuration=\"00:00:00.5000000\"\r\n                                                    To=\"Normal\"/>\r\n                                                            <VisualTransition From=\"Pressed\"\r\n                                                    GeneratedDuration=\"00:00:00.5000000\"\r\n                                                    To=\"MouseOver\"/>\r\n                                                            <VisualTransition From=\"MouseOver\"\r\n                                                    GeneratedDuration=\"00:00:00.3000000\"\r\n                                                    To=\"Pressed\"/>\r\n                                                        </VisualStateGroup.Transitions>\r\n                                                        <VisualState x:Name=\"Normal\"/>\r\n                                                        <VisualState x:Name=\"MouseOver\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundAnimation\"\r\n                                                               Storyboard.TargetProperty=\"Opacity\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                                        Value=\"1\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Pressed\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                               Duration=\"00:00:00.0010000\"\r\n                                                               Storyboard.TargetName=\"Background\"\r\n                                                               Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                                        Value=\"0.7\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Disabled\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\"\r\n                                                               Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                                        Value=\"0.65\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                    </VisualStateGroup>\r\n                                                </VisualStateManager.VisualStateGroups>\r\n                                                <Rectangle x:Name=\"Base\"\r\n                                   RadiusX=\"5.1\"\r\n                                   RadiusY=\"5.1\"\r\n                                   Fill=\"#FF000000\"/>\r\n                                                <Rectangle x:Name=\"Background\"\r\n                                   Fill=\"{TemplateBinding Background}\"\r\n                                   Stroke=\"{TemplateBinding BorderBrush}\"\r\n                                   StrokeThickness=\"2\"\r\n                                   RadiusX=\"4\"\r\n                                   RadiusY=\"4\"/>\r\n                                                <Rectangle Margin=\"2,2,2,2\"\r\n                                   x:Name=\"BackgroundAnimation\"\r\n                                   Opacity=\"0\"\r\n                                   Fill=\"{StaticResource HoverBrush}\"\r\n                                   RadiusX=\"3\"\r\n                                   RadiusY=\"3\"/>\r\n                                                <Rectangle x:Name=\"DisabledVisualElement\"\r\n                                   IsHitTestVisible=\"false\"\r\n                                   Opacity=\"0\"\r\n                                   Fill=\"{StaticResource DisabledBackgroundBrush}\"\r\n                                   RadiusX=\"5\"\r\n                                   RadiusY=\"5\"/>\r\n                                                <Rectangle x:Name=\"FocusVisualElement\"\r\n                                   IsHitTestVisible=\"false\"\r\n                                   Visibility=\"Collapsed\"\r\n                                   Stroke=\"{StaticResource HoverBrush}\"\r\n                                   StrokeThickness=\"1\"\r\n                                   RadiusX=\"4.5\"\r\n                                   RadiusY=\"4.5\"/>\r\n                                            </Grid>\r\n                                        </ControlTemplate>\r\n                                    </Setter.Value>\r\n                                </Setter>\r\n                            </Style>\r\n                            <Style x:Key=\"SLSliderHorizontalThumb\"\r\n                     TargetType=\"Thumb\">\r\n                                <Setter Property=\"Background\"\r\n                        Value=\"{StaticResource NormalBrush}\"/>\r\n                                <Setter Property=\"BorderThickness\"\r\n                        Value=\"2\"/>\r\n                                <Setter Property=\"IsTabStop\"\r\n                        Value=\"False\"/>\r\n                                <Setter Property=\"BorderBrush\"\r\n                        Value=\"{StaticResource NormalBorderBrush}\" />\r\n                                <Setter Property=\"Template\">\r\n                                    <Setter.Value>\r\n                                        <ControlTemplate TargetType=\"Thumb\">\r\n                                            <Grid>\r\n                                                <VisualStateManager.VisualStateGroups>\r\n                                                    <VisualStateGroup x:Name=\"CommonStates\">\r\n                                                        <VisualStateGroup.Transitions>\r\n                                                            <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                                    To=\"MouseOver\"/>\r\n                                                            <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                                    To=\"Pressed\"/>\r\n                                                            <VisualTransition From=\"Normal\"\r\n                                                    GeneratedDuration=\"00:00:00.3000000\"\r\n                                                    To=\"MouseOver\"/>\r\n                                                            <VisualTransition From=\"MouseOver\"\r\n                                                    GeneratedDuration=\"00:00:00.5000000\"\r\n                                                    To=\"Normal\"/>\r\n                                                            <VisualTransition From=\"Pressed\"\r\n                                                    GeneratedDuration=\"00:00:00.5000000\"\r\n                                                    To=\"MouseOver\"/>\r\n                                                            <VisualTransition From=\"MouseOver\"\r\n                                                    GeneratedDuration=\"00:00:00.3000000\"\r\n                                                    To=\"Pressed\"/>\r\n                                                        </VisualStateGroup.Transitions>\r\n                                                        <VisualState x:Name=\"Normal\"/>\r\n                                                        <VisualState x:Name=\"MouseOver\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundAnimation\"\r\n                                                               Storyboard.TargetProperty=\"Opacity\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                                        Value=\"1\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Pressed\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                               Duration=\"00:00:00.0010000\"\r\n                                                               Storyboard.TargetName=\"Background\"\r\n                                                               Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                                        Value=\"0.7\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Disabled\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\"\r\n                                                               Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                                        Value=\"0.65\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                    </VisualStateGroup>\r\n                                                </VisualStateManager.VisualStateGroups>\r\n                                                <Rectangle x:Name=\"Base\"\r\n                                   RadiusX=\"5\"\r\n                                   RadiusY=\"5\"\r\n                                   Fill=\"#FF000000\"\r\n                                   StrokeThickness=\"0\"/>\r\n                                                <Rectangle x:Name=\"Background\"\r\n                                   Fill=\"{TemplateBinding Background}\"\r\n                                   Stroke=\"{TemplateBinding BorderBrush}\"\r\n                                   StrokeThickness=\"2\"\r\n                                   RadiusX=\"4\"\r\n                                   RadiusY=\"4\"/>\r\n                                                <Rectangle x:Name=\"BackgroundAnimation\"\r\n                                   Opacity=\"0\"\r\n                                   Fill=\"{StaticResource HoverBrush}\"\r\n                                   RadiusX=\"3\"\r\n                                   RadiusY=\"3\"\r\n                                   Margin=\"2,2,2,2\"\r\n                                   StrokeThickness=\"0\"/>\r\n                                                <Rectangle x:Name=\"DisabledVisualElement\"\r\n                                   IsHitTestVisible=\"false\"\r\n                                   Opacity=\"0\"\r\n                                   Fill=\"{StaticResource DisabledBackgroundBrush}\"\r\n                                   RadiusX=\"5\"\r\n                                   RadiusY=\"5\"/>\r\n                                                <Rectangle x:Name=\"FocusVisualElement\"\r\n                                   IsHitTestVisible=\"false\"\r\n                                   Visibility=\"Collapsed\"\r\n                                   Stroke=\"{StaticResource HoverBrush}\"\r\n                                   StrokeThickness=\"1\"\r\n                                   RadiusX=\"4.5\"\r\n                                   RadiusY=\"4.5\"/>\r\n                                            </Grid>\r\n                                        </ControlTemplate>\r\n                                    </Setter.Value>\r\n                                </Setter>\r\n                            </Style>\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Root\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid x:Name=\"HorizontalTemplate\"\r\n                  Background=\"{TemplateBinding Background}\">\r\n                            <Rectangle Height=\"5\"\r\n                         Margin=\"5,0,5,0\"\r\n                         Fill=\"{StaticResource SelectedBackgroundBrush}\"\r\n                         Stroke=\"{StaticResource HorizontalSliderBorderBrush}\"\r\n                         StrokeThickness=\"{TemplateBinding BorderThickness}\"/>\r\n\r\n\r\n                            <Track x:Name=\"PART_Track\">\r\n                                <Track.Thumb>\r\n                                    <Thumb IsTabStop=\"True\"\r\n                     Height=\"13\"\r\n                     x:Name=\"HorizontalThumb\"\r\n                     Width=\"24\"\r\n                     Grid.Column=\"1\"\r\n                     Style=\"{StaticResource SLSliderHorizontalThumb}\"\r\n                     Margin=\"0,0,0,0\"/>\r\n                                </Track.Thumb>\r\n                                <Track.IncreaseRepeatButton>\r\n                                    <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Command=\"Slider.IncreaseLarge\" />\r\n                                </Track.IncreaseRepeatButton>\r\n                                <Track.DecreaseRepeatButton>\r\n                                    <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Command=\"Slider.DecreaseLarge\" />\r\n                                </Track.DecreaseRepeatButton>\r\n                            </Track>\r\n\r\n\r\n                        </Grid>\r\n                        <Grid x:Name=\"VerticalTemplate\"\r\n                  Visibility=\"Collapsed\"\r\n                  Background=\"{TemplateBinding Background}\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"*\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <Rectangle Margin=\"0,5,0,5\"\r\n                         Width=\"5\"\r\n                         Grid.Row=\"0\"\r\n                         Grid.RowSpan=\"3\"\r\n                         StrokeThickness=\"{TemplateBinding BorderThickness}\"\r\n                         Fill=\"{StaticResource SelectedBackgroundBrushVertical}\"\r\n                         Stroke=\"{StaticResource VerticalSliderBorderBrush}\"/>\r\n                            <RepeatButton IsTabStop=\"False\"\r\n                            Template=\"{StaticResource RepeatButtonTemplate}\"\r\n                            x:Name=\"VerticalTrackLargeChangeDecreaseRepeatButton\"\r\n                            Grid.Row=\"2\"/>\r\n                            <Thumb IsTabStop=\"True\"\r\n                     Height=\"24\"\r\n                     x:Name=\"VerticalThumb\"\r\n                     Width=\"13\"\r\n                     Grid.Row=\"1\"\r\n                     Style=\"{StaticResource SLSliderVerticalThumb}\"/>\r\n                            <RepeatButton IsTabStop=\"False\"\r\n                            Template=\"{StaticResource RepeatButtonTemplate}\"\r\n                            x:Name=\"VerticalTrackLargeChangeIncreaseRepeatButton\"\r\n                            Grid.Row=\"0\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--ToggleButton-->\r\n    <Style  TargetType=\"ToggleButton\">\r\n        <Setter Property=\"Background\"\r\n            Value=\"{StaticResource SelectedBackgroundBrush}\"/>\r\n        <Setter Property=\"Foreground\"\r\n            Value=\"#FFFFFFFF\"/>\r\n        <Setter Property=\"Padding\"\r\n            Value=\"3\"/>\r\n        <Setter Property=\"BorderThickness\"\r\n            Value=\"2\"/>\r\n        <Setter Property=\"BorderBrush\"\r\n            Value=\"{StaticResource NormalBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ToggleButton\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                        To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\"\r\n                                        To=\"Pressed\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundAnimation\"\r\n                                                   Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.3\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundAnimation\"\r\n                                                   Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledVisualElement\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0.65\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Duration=\"00:00:00.0010000\"\r\n                                                   Storyboard.TargetName=\"CheckedBorder\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\"\r\n                                            Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"Background\"\r\n                    Background=\"{TemplateBinding Background}\"\r\n                    BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                    BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                    CornerRadius=\"4,4,4,4\"\r\n                    Opacity=\"0.9\"/>\r\n                        <Border x:Name=\"CheckedBorder\"\r\n                    Opacity=\"0\"\r\n                    Background=\"{StaticResource NormalBrush}\"\r\n                    BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                    BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                    CornerRadius=\"4\"/>\r\n                        <Border x:Name=\"BackgroundAnimation\"\r\n                    Opacity=\"0\"\r\n                    Background=\"#FFFFFFFF\"\r\n                    BorderBrush=\"{TemplateBinding BorderBrush}\"\r\n                    BorderThickness=\"{TemplateBinding BorderThickness}\"\r\n                    CornerRadius=\"4\"/>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                              Margin=\"{TemplateBinding Padding}\"\r\n                              x:Name=\"contentPresenter\"\r\n                              VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                              Content=\"{TemplateBinding Content}\"\r\n                              ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                        <Border x:Name=\"DisabledVisualElement\"\r\n                    IsHitTestVisible=\"false\"\r\n                    Opacity=\"0\"\r\n                    Background=\"{StaticResource DisabledBackgroundBrush}\"\r\n                    CornerRadius=\"4\"/>\r\n                        <Border x:Name=\"FocusVisualElement\"\r\n                    IsHitTestVisible=\"false\"\r\n                    Visibility=\"Collapsed\"\r\n                    BorderBrush=\"{StaticResource HoverBrush}\"\r\n                    BorderThickness=\"1\"\r\n                    CornerRadius=\"3\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- Expander -->\r\n    <Style TargetType=\"Expander\">\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Expander\">\r\n                    <Grid Background=\"Transparent\">\r\n                        <Grid.Resources>\r\n\r\n                            <Style x:Key=\"SLExpanderContentControl\" TargetType=\"ContentControl\">\r\n                                <Setter Property=\"Foreground\" Value=\"#FF000000\"/>\r\n                                <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n                                <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n                                <Setter Property=\"Template\">\r\n                                    <Setter.Value>\r\n                                        <ControlTemplate TargetType=\"ContentControl\">\r\n                                        </ControlTemplate>\r\n                                    </Setter.Value>\r\n                                </Setter>\r\n                            </Style>\r\n\r\n                            <LinearGradientBrush x:Key=\"ExpanderArrowFill\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n                                <GradientStop Color=\"White\" Offset=\"0\"/>\r\n                                <GradientStop Color=\"#FFBFBFBF\" Offset=\"0.5\"/>\r\n                                <GradientStop Color=\"#FF878787\" Offset=\"1\"/>\r\n                            </LinearGradientBrush>\r\n                            <LinearGradientBrush x:Key=\"ExpanderArrowHoverFill\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n                                <GradientStop Color=\"#FFF0F8FE\" Offset=\"0\"/>\r\n                                <GradientStop Color=\"#FFE0F3FE\" Offset=\"0.3\"/>\r\n                                <GradientStop Color=\"#FF6FA7C5\" Offset=\"1\"/>\r\n                            </LinearGradientBrush>\r\n                            <LinearGradientBrush x:Key=\"ExpanderArrowPressedFill\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n                                <GradientStop Color=\"#FFDCF0FA\" Offset=\"0\"/>\r\n                                <GradientStop Color=\"#FFC5E6F7\" Offset=\"0.2\"/>\r\n                                <GradientStop Color=\"#FF5690D0\" Offset=\"1\"/>\r\n                            </LinearGradientBrush>\r\n                            <ControlTemplate x:Key=\"ExpanderDownHeaderTemplate\" TargetType=\"ToggleButton\">\r\n                                <Grid Background=\"Transparent\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CheckStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Checked\">\r\n                                                <!--                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"Data\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"M 1,4.5 L 4.5,1 L 8,4.5\"/>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>-->\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Unchecked\"/>\r\n                                        </VisualStateGroup>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\"/>\r\n                                                <VisualTransition From=\"Normal\" GeneratedDuration=\"00:00:00.3000000\" To=\"MouseOver\"/>\r\n                                                <VisualTransition From=\"MouseOver\" GeneratedDuration=\"00:00:00.5000000\" To=\"Normal\"/>\r\n                                                <VisualTransition From=\"Pressed\" GeneratedDuration=\"00:00:00.5000000\" To=\"MouseOver\"/>\r\n                                                <VisualTransition From=\"MouseOver\" GeneratedDuration=\"00:00:00.3000000\" To=\"Pressed\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"FullControlHover\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.7\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Border Padding=\"{TemplateBinding Padding}\" CornerRadius=\"3,3,3,3\" BorderBrush=\"{StaticResource NormalBorderBrush}\" BorderThickness=\"2,2,2,2\" Background=\"#FFFFFFFF\">\r\n                                        <Grid Background=\"Transparent\">\r\n                                            <Grid.ColumnDefinitions>\r\n                                                <ColumnDefinition Width=\"19\"/>\r\n                                                <ColumnDefinition Width=\"*\"/>\r\n                                            </Grid.ColumnDefinitions>\r\n                                            <Grid HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\">\r\n                                                <Border Height=\"19\" Width=\"19\" Background=\"{StaticResource NormalBrush}\" BorderBrush=\"{StaticResource NormalBorderBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"3,3,3,3\" x:Name=\"Background\"/>\r\n                                                <Border Height=\"19\" x:Name=\"HoverBorder\" Width=\"19\" Background=\"{StaticResource HoverBrush}\" BorderBrush=\"{StaticResource NormalBorderBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"3,3,3,3\" Opacity=\"0\"/>\r\n                                                <Path HorizontalAlignment=\"Center\" x:Name=\"arrow\" VerticalAlignment=\"Center\" StrokeThickness=\"2\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\">\r\n                                                    <Path.Stroke>\r\n                                                        <SolidColorBrush Color=\"Black\"/>\r\n                                                    </Path.Stroke>\r\n                                                </Path>\r\n                                            </Grid>\r\n                                            <ContentPresenter HorizontalAlignment=\"Left\" Margin=\"4,0,0,0\" x:Name=\"header\" VerticalAlignment=\"Center\" Grid.Column=\"1\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                                        </Grid>\r\n                                    </Border>\r\n                                    <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HoverBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"3\"/>\r\n                                    <Border x:Name=\"FullControlHover\" IsHitTestVisible=\"false\" Visibility=\"Visible\" BorderBrush=\"{StaticResource NormalBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"3\" Opacity=\"0\"/>\r\n                                </Grid>\r\n                                <ControlTemplate.Triggers>\r\n                                    <Trigger Property=\"IsChecked\" Value=\"True\">\r\n                                        <Setter Property=\"Data\" TargetName=\"arrow\" Value=\"M 1,4.5 L 4.5,1 L 8,4.5\" />\r\n                                    </Trigger>\r\n                                </ControlTemplate.Triggers>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"ExpanderUpHeaderTemplate\" TargetType=\"ToggleButton\">\r\n                                <Grid Background=\"Transparent\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CheckStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Checked\">\r\n                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"Data\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"M 1,4.5 L 4.5,1 L 8,4.5\"/>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Unchecked\"/>\r\n                                        </VisualStateGroup>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\"/>\r\n                                                <VisualTransition From=\"Normal\" GeneratedDuration=\"00:00:00.3000000\" To=\"MouseOver\"/>\r\n                                                <VisualTransition From=\"MouseOver\" GeneratedDuration=\"00:00:00.5000000\" To=\"Normal\"/>\r\n                                                <VisualTransition From=\"Pressed\" GeneratedDuration=\"00:00:00.5000000\" To=\"MouseOver\"/>\r\n                                                <VisualTransition From=\"MouseOver\" GeneratedDuration=\"00:00:00.3000000\" To=\"Pressed\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"FullControlHover\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.7\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Border Padding=\"{TemplateBinding Padding}\" BorderBrush=\"{StaticResource NormalBorderBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"3,3,3,3\" Background=\"#FFFFFFFF\">\r\n                                        <Grid Background=\"Transparent\">\r\n                                            <Grid.ColumnDefinitions>\r\n                                                <ColumnDefinition Width=\"19\"/>\r\n                                                <ColumnDefinition Width=\"*\"/>\r\n                                            </Grid.ColumnDefinitions>\r\n                                            <Grid HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\">\r\n                                                <Grid.RenderTransform>\r\n                                                    <TransformGroup>\r\n                                                        <TransformGroup.Children>\r\n                                                            <TransformCollection>\r\n                                                                <RotateTransform Angle=\"180\" CenterX=\"9.5\" CenterY=\"9.5\"/>\r\n                                                            </TransformCollection>\r\n                                                        </TransformGroup.Children>\r\n                                                    </TransformGroup>\r\n                                                </Grid.RenderTransform>\r\n                                                <Border Height=\"19\" Width=\"19\" Background=\"{StaticResource NormalBrush}\" BorderBrush=\"{StaticResource NormalBorderBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"3,3,3,3\" x:Name=\"Background\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                                    <Border.RenderTransform>\r\n                                                        <TransformGroup>\r\n                                                            <ScaleTransform/>\r\n                                                            <SkewTransform/>\r\n                                                            <RotateTransform Angle=\"180\"/>\r\n                                                            <TranslateTransform/>\r\n                                                        </TransformGroup>\r\n                                                    </Border.RenderTransform>\r\n                                                </Border>\r\n                                                <Border Height=\"19\" x:Name=\"HoverBorder\" Width=\"19\" Background=\"{StaticResource HoverBrush}\" BorderBrush=\"{x:Null}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"3,3,3,3\" RenderTransformOrigin=\"0.5,0.5\" Opacity=\"0\">\r\n                                                    <Border.RenderTransform>\r\n                                                        <TransformGroup>\r\n                                                            <ScaleTransform/>\r\n                                                            <SkewTransform/>\r\n                                                            <RotateTransform Angle=\"180\"/>\r\n                                                            <TranslateTransform/>\r\n                                                        </TransformGroup>\r\n                                                    </Border.RenderTransform>\r\n                                                </Border>\r\n                                                <Path HorizontalAlignment=\"Center\" x:Name=\"arrow\" VerticalAlignment=\"Center\" StrokeThickness=\"2\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\">\r\n                                                    <Path.Stroke>\r\n                                                        <SolidColorBrush Color=\"Black\"/>\r\n                                                    </Path.Stroke>\r\n                                                </Path>\r\n                                            </Grid>\r\n                                            <ContentPresenter HorizontalAlignment=\"Left\" Margin=\"4,0,0,0\" x:Name=\"header\" VerticalAlignment=\"Center\" Grid.Column=\"1\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                                        </Grid>\r\n                                    </Border>\r\n                                    <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HoverBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"3\"/>\r\n                                    <Border x:Name=\"FullControlHover\" IsHitTestVisible=\"false\" Visibility=\"Visible\" BorderBrush=\"{StaticResource NormalBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"3\" Opacity=\"0\"/>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"ExpanderLeftHeaderTemplate\" TargetType=\"ToggleButton\">\r\n                                <Grid Background=\"Transparent\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CheckStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Checked\">\r\n                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"Data\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"M 1,4.5 L 4.5,1 L 8,4.5\"/>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Unchecked\"/>\r\n                                        </VisualStateGroup>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\"/>\r\n                                                <VisualTransition From=\"Normal\" GeneratedDuration=\"00:00:00.3000000\" To=\"MouseOver\"/>\r\n                                                <VisualTransition From=\"MouseOver\" GeneratedDuration=\"00:00:00.5000000\" To=\"Normal\"/>\r\n                                                <VisualTransition From=\"Pressed\" GeneratedDuration=\"00:00:00.5000000\" To=\"MouseOver\"/>\r\n                                                <VisualTransition From=\"MouseOver\" GeneratedDuration=\"00:00:00.3000000\" To=\"Pressed\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"FullControlHover\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.7\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Border CornerRadius=\"3,3,3,3\" BorderBrush=\"{StaticResource NormalBorderBrush}\" BorderThickness=\"2,2,2,2\" Padding=\"0,2,0,2\" Width=\"38\" Background=\"#FFFFFFFF\">\r\n                                        <Grid Background=\"Transparent\">\r\n                                            <Grid.RowDefinitions>\r\n                                                <RowDefinition Height=\"19\"/>\r\n                                                <RowDefinition Height=\"*\"/>\r\n                                            </Grid.RowDefinitions>\r\n                                            <Grid HorizontalAlignment=\"Center\" VerticalAlignment=\"Top\">\r\n                                                <Grid.RenderTransform>\r\n                                                    <TransformGroup>\r\n                                                        <TransformGroup.Children>\r\n                                                            <TransformCollection>\r\n                                                                <RotateTransform Angle=\"90\" CenterX=\"9.5\" CenterY=\"9.5\"/>\r\n                                                            </TransformCollection>\r\n                                                        </TransformGroup.Children>\r\n                                                    </TransformGroup>\r\n                                                </Grid.RenderTransform>\r\n                                                <Border Height=\"19\" x:Name=\"Background\" Width=\"19\" RenderTransformOrigin=\"0.5,0.5\" Background=\"{StaticResource NormalBrush}\" BorderBrush=\"{StaticResource NormalBorderBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"3,3,3,3\">\r\n                                                    <Border.RenderTransform>\r\n                                                        <TransformGroup>\r\n                                                            <ScaleTransform/>\r\n                                                            <SkewTransform/>\r\n                                                            <RotateTransform Angle=\"-90\"/>\r\n                                                            <TranslateTransform/>\r\n                                                        </TransformGroup>\r\n                                                    </Border.RenderTransform>\r\n                                                </Border>\r\n                                                <Border Height=\"19\" x:Name=\"HoverBorder\" Width=\"19\" RenderTransformOrigin=\"0.5,0.5\" Background=\"{StaticResource HoverBrush}\" BorderBrush=\"{x:Null}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"3,3,3,3\" Opacity=\"0\">\r\n                                                    <Border.RenderTransform>\r\n                                                        <TransformGroup>\r\n                                                            <ScaleTransform/>\r\n                                                            <SkewTransform/>\r\n                                                            <RotateTransform Angle=\"-90\"/>\r\n                                                            <TranslateTransform/>\r\n                                                        </TransformGroup>\r\n                                                    </Border.RenderTransform>\r\n                                                </Border>\r\n                                                <Path HorizontalAlignment=\"Center\" x:Name=\"arrow\" VerticalAlignment=\"Center\" StrokeThickness=\"2\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\">\r\n                                                    <Path.Stroke>\r\n                                                        <SolidColorBrush Color=\"Black\"/>\r\n                                                    </Path.Stroke>\r\n                                                </Path>\r\n                                            </Grid>\r\n                                        </Grid>\r\n                                    </Border>\r\n                                    <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HoverBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"3\"/>\r\n                                    <Border x:Name=\"FullControlHover\" IsHitTestVisible=\"false\" Visibility=\"Visible\" BorderBrush=\"{StaticResource NormalBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"3\" Opacity=\"0\"/>\r\n                                    <ContentPresenter x:Name=\"header\" VerticalAlignment=\"Top\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" RenderTransformOrigin=\"0.5,0.5\" HorizontalAlignment=\"Center\" Margin=\"0,42,0,0\" >\r\n                                        <ContentPresenter.RenderTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform/>\r\n                                                <SkewTransform/>\r\n                                                <RotateTransform Angle=\"90\"/>\r\n                                                <TranslateTransform/>\r\n                                            </TransformGroup>\r\n                                        </ContentPresenter.RenderTransform>\r\n                                    </ContentPresenter>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"ExpanderRightHeaderTemplate\" TargetType=\"ToggleButton\">\r\n                                <Grid Background=\"Transparent\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CheckStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Checked\">\r\n                                                <Storyboard>\r\n                                                    <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"arrow\" Storyboard.TargetProperty=\"Data\">\r\n                                                        <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"M 1,4.5 L 4.5,1 L 8,4.5\"/>\r\n                                                    </ObjectAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Unchecked\"/>\r\n                                        </VisualStateGroup>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n                                                <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\"/>\r\n                                                <VisualTransition From=\"Normal\" GeneratedDuration=\"00:00:00.3000000\" To=\"MouseOver\"/>\r\n                                                <VisualTransition From=\"MouseOver\" GeneratedDuration=\"00:00:00.5000000\" To=\"Normal\"/>\r\n                                                <VisualTransition From=\"Pressed\" GeneratedDuration=\"00:00:00.5000000\" To=\"MouseOver\"/>\r\n                                                <VisualTransition From=\"MouseOver\" GeneratedDuration=\"00:00:00.3000000\" To=\"Pressed\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"FullControlHover\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.7\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Border Padding=\"{TemplateBinding Padding}\" BorderBrush=\"{StaticResource NormalBorderBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"3,3,3,3\" Width=\"38\" Background=\"#FFFFFFFF\">\r\n                                        <Grid Background=\"Transparent\">\r\n                                            <Grid.RowDefinitions>\r\n                                                <RowDefinition Height=\"19\"/>\r\n                                                <RowDefinition Height=\"*\"/>\r\n                                            </Grid.RowDefinitions>\r\n                                            <Grid HorizontalAlignment=\"Center\" VerticalAlignment=\"Top\">\r\n                                                <Grid.RenderTransform>\r\n                                                    <TransformGroup>\r\n                                                        <TransformGroup.Children>\r\n                                                            <TransformCollection>\r\n                                                                <RotateTransform Angle=\"-90\" CenterX=\"9.5\" CenterY=\"9.5\"/>\r\n                                                            </TransformCollection>\r\n                                                        </TransformGroup.Children>\r\n                                                    </TransformGroup>\r\n                                                </Grid.RenderTransform>\r\n                                                <Border Background=\"{StaticResource NormalBrush}\" Width=\"19\" Height=\"19\" BorderBrush=\"{StaticResource NormalBorderBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"3,3,3,3\" RenderTransformOrigin=\"0.5,0.5\" x:Name=\"Background\">\r\n                                                    <Border.RenderTransform>\r\n                                                        <TransformGroup>\r\n                                                            <ScaleTransform/>\r\n                                                            <SkewTransform/>\r\n                                                            <RotateTransform Angle=\"90\"/>\r\n                                                            <TranslateTransform/>\r\n                                                        </TransformGroup>\r\n                                                    </Border.RenderTransform>\r\n                                                </Border>\r\n                                                <Border Height=\"19\" Width=\"19\" RenderTransformOrigin=\"0.5,0.5\" Background=\"{StaticResource HoverBrush}\" BorderBrush=\"{x:Null}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"3,3,3,3\" Opacity=\"0\" x:Name=\"HoverBorder\">\r\n                                                    <Border.RenderTransform>\r\n                                                        <TransformGroup>\r\n                                                            <ScaleTransform/>\r\n                                                            <SkewTransform/>\r\n                                                            <RotateTransform Angle=\"90\"/>\r\n                                                            <TranslateTransform/>\r\n                                                        </TransformGroup>\r\n                                                    </Border.RenderTransform>\r\n                                                </Border>\r\n                                                <Path HorizontalAlignment=\"Center\" x:Name=\"arrow\" VerticalAlignment=\"Center\" StrokeThickness=\"2\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\">\r\n                                                    <Path.Stroke>\r\n                                                        <SolidColorBrush Color=\"Black\"/>\r\n                                                    </Path.Stroke>\r\n                                                </Path>\r\n                                            </Grid>\r\n                                        </Grid>\r\n                                    </Border>\r\n                                    <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"{StaticResource HoverBrush}\" BorderThickness=\"1\" CornerRadius=\"3\"/>\r\n                                    <Border x:Name=\"FullControlHover\" IsHitTestVisible=\"false\" Visibility=\"Visible\" BorderBrush=\"{StaticResource NormalBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"3\" Opacity=\"0\"/>\r\n                                    <ContentPresenter x:Name=\"header\" VerticalAlignment=\"Top\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"  RenderTransformOrigin=\"0.5,0.5\" HorizontalAlignment=\"Center\" Margin=\"0,42,0,0\">\r\n                                        <ContentPresenter.RenderTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform/>\r\n                                                <SkewTransform/>\r\n                                                <RotateTransform Angle=\"-90\"/>\r\n                                                <TranslateTransform/>\r\n                                            </TransformGroup>\r\n                                        </ContentPresenter.RenderTransform>\r\n                                    </ContentPresenter>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" To=\"1\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"ExpansionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Collapsed\"/>\r\n                                <VisualState x:Name=\"Expanded\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"ExpandDirectionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"ExpandDown\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd1\" Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"*\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"*\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ExpandUp\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"Template\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ExpanderUpHeaderTemplate}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"*\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"*\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ExpandLeft\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"Template\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ExpanderLeftHeaderTemplate}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"*\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd0\" Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"*\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ExpandRight\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"Template\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{StaticResource ExpanderRightHeaderTemplate}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Row)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"1\" Storyboard.TargetName=\"ExpandSite\" Storyboard.TargetProperty=\"(Grid.Column)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"rd0\" Storyboard.TargetProperty=\"Height\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"*\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"cd1\" Storyboard.TargetProperty=\"Width\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"*\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"Background\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" Padding=\"{TemplateBinding Padding}\">\r\n                            <Grid>\r\n                                <Grid.RowDefinitions>\r\n                                    <RowDefinition Height=\"Auto\" x:Name=\"rd0\"/>\r\n                                    <RowDefinition Height=\"*\" x:Name=\"rd1\"/>\r\n                                </Grid.RowDefinitions>\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"Auto\" x:Name=\"cd0\"/>\r\n                                    <ColumnDefinition Width=\"*\" x:Name=\"cd1\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <ToggleButton HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"1\" MinHeight=\"0\" MinWidth=\"0\" x:Name=\"ExpanderButton\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" FontFamily=\"{TemplateBinding FontFamily}\" FontSize=\"{TemplateBinding FontSize}\" FontStretch=\"{TemplateBinding FontStretch}\" FontStyle=\"{TemplateBinding FontStyle}\" FontWeight=\"{TemplateBinding FontWeight}\" Foreground=\"{TemplateBinding Foreground}\" Template=\"{StaticResource ExpanderDownHeaderTemplate}\" Grid.Column=\"0\" Grid.Row=\"0\" Content=\"{TemplateBinding Header}\" ContentTemplate=\"{TemplateBinding HeaderTemplate}\" IsChecked=\"{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" Grid.ColumnSpan=\"2\"/>\r\n                                <Grid Grid.Row=\"1\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" x:Name=\"ExpandSite\" Visibility=\"Collapsed\">\r\n                                    <Border Background=\"{StaticResource ShadeBrush}\" CornerRadius=\"3,3,3,3\" BorderBrush=\"{StaticResource NormalBorderBrush}\" BorderThickness=\"1,1,1,1\"/>\r\n                                    <ContentPresenter Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"4,4,4,4\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                                </Grid>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Border x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"false\" Opacity=\"0\" Background=\"#A5FFFFFF\" CornerRadius=\"3\"/>\r\n                        <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" BorderBrush=\"#FF45D6FA\" BorderThickness=\"1\" CornerRadius=\"3\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsExpanded\" Value=\"True\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"ExpandSite\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- TreeView Item-->\r\n    <Style TargetType=\"TreeViewItem\">\r\n        <Setter Property=\"IsTabStop\" Value=\"True\"/>\r\n        <Setter Property=\"Padding\" Value=\"3\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"Cursor\" Value=\"Arrow\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TreeViewItem\">\r\n                    <Grid Background=\"{TemplateBinding Background}\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"Header\" Storyboard.TargetProperty=\"Foreground\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <SolidColorBrush Color=\"#FF999999\"/>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition From=\"Unselected\" GeneratedDuration=\"00:00:00.3000000\" To=\"Selected\"/>\r\n                                    <VisualTransition From=\"Selected\" GeneratedDuration=\"00:00:00.5000000\" To=\"Unselected\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Unselected\"/>\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"select\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.75\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"SelectedInactive\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"inactive\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.4\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"HasItemsStates\">\r\n                                <VisualState x:Name=\"HasItems\"/>\r\n                                <VisualState x:Name=\"NoItems\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ExpanderButton\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"ExpansionStates\">\r\n                                <VisualState x:Name=\"Collapsed\"/>\r\n                                <VisualState x:Name=\"Expanded\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"ItemsHost\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"*\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"15\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <ToggleButton HorizontalAlignment=\"Stretch\" x:Name=\"Expander\" VerticalAlignment=\"Stretch\" IsChecked=\"{Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}\">\r\n                            <ToggleButton.Template>\r\n                                <ControlTemplate TargetType=\"ToggleButton\">\r\n                                    <Grid x:Name=\"Root\" Background=\"Transparent\">\r\n                                        <VisualStateManager.VisualStateGroups>\r\n                                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                                <VisualState x:Name=\"Normal\"/>\r\n                                                <VisualState x:Name=\"MouseOver\">\r\n                                                    <Storyboard>\r\n                                                        <ColorAnimation Duration=\"0\" Storyboard.TargetName=\"UncheckedBrush\" Storyboard.TargetProperty=\"Color\" To=\"{StaticResource NormalBrushGradient1}\"/>\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                                <VisualState x:Name=\"Disabled\">\r\n                                                    <Storyboard>\r\n                                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"Root\" Storyboard.TargetProperty=\"Opacity\" To=\".7\"/>\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                            </VisualStateGroup>\r\n                                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                                <VisualState x:Name=\"Unchecked\"/>\r\n                                                <VisualState x:Name=\"Checked\">\r\n                                                    <Storyboard>\r\n                                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"UncheckedVisual\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"CheckedVisual\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                            </VisualStateGroup>\r\n                                        </VisualStateManager.VisualStateGroups>\r\n                                        <Grid HorizontalAlignment=\"Right\" Margin=\"2 2 5 2\">\r\n                                            <Path Height=\"9\" HorizontalAlignment=\"Right\" x:Name=\"UncheckedVisual\" VerticalAlignment=\"Center\" Width=\"6\" Fill=\"#FF000000\" StrokeLineJoin=\"Miter\" StrokeThickness=\"1\" Data=\"M 0,0 L 0,9 L 5,4.5 Z\">\r\n                                                <Path.Stroke>\r\n                                                    <SolidColorBrush Color=\"#FF989898\" x:Name=\"UncheckedBrush\"/>\r\n                                                </Path.Stroke>\r\n                                            </Path>\r\n                                            <Path Height=\"6\" HorizontalAlignment=\"Center\" x:Name=\"CheckedVisual\" VerticalAlignment=\"Center\" Width=\"6\" Opacity=\"0\" Fill=\"#FF262626\" StrokeLineJoin=\"Miter\" Data=\"M 6,0 L 6,6 L 0,6 Z\"/>\r\n                                        </Grid>\r\n                                    </Grid>\r\n                                </ControlTemplate>\r\n                            </ToggleButton.Template>\r\n                        </ToggleButton>\r\n                        <Rectangle x:Name=\"select\" IsHitTestVisible=\"False\" Opacity=\"0\" Grid.Column=\"1\" Fill=\"{StaticResource NormalBrush}\" Stroke=\"{StaticResource NormalBorderBrush}\" StrokeThickness=\"2\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                        <Rectangle x:Name=\"inactive\" IsHitTestVisible=\"False\" Opacity=\"0\" Grid.Column=\"1\" Fill=\"{StaticResource NormalBrush}\" Stroke=\"{StaticResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                        <Button Background=\"{TemplateBinding Background}\" Foreground=\"{TemplateBinding Foreground}\" Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" x:Name=\"PART_Header\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Grid.Column=\"1\" Content=\"{TemplateBinding Header}\" ContentTemplate=\"{TemplateBinding HeaderTemplate}\" ClickMode=\"Hover\">\r\n                            <Button.Template>\r\n                                <ControlTemplate TargetType=\"Button\">\r\n                                    <Grid Background=\"{TemplateBinding Background}\">\r\n                                        <VisualStateManager.VisualStateGroups>\r\n                                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                                <VisualStateGroup.Transitions>\r\n                                                    <VisualTransition From=\"Normal\" GeneratedDuration=\"00:00:00.3000000\" To=\"Pressed\"/>\r\n                                                    <VisualTransition From=\"Pressed\" GeneratedDuration=\"00:00:00.5000000\" To=\"Normal\"/>\r\n                                                </VisualStateGroup.Transitions>\r\n                                                <VisualState x:Name=\"Normal\"/>\r\n                                                <VisualState x:Name=\"Pressed\">\r\n                                                    <Storyboard>\r\n                                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"hover\" Storyboard.TargetProperty=\"Opacity\" To=\".5\"/>\r\n                                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                                        </DoubleAnimationUsingKeyFrames>\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                                <VisualState x:Name=\"Disabled\">\r\n                                                    <Storyboard>\r\n                                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"content\" Storyboard.TargetProperty=\"Opacity\" To=\".55\"/>\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                            </VisualStateGroup>\r\n                                        </VisualStateManager.VisualStateGroups>\r\n                                        <Rectangle x:Name=\"Background\" IsHitTestVisible=\"False\" Opacity=\"0\" Fill=\"{StaticResource NormalBrush}\" Stroke=\"{x:Null}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                        <Rectangle x:Name=\"hover\" IsHitTestVisible=\"False\" Opacity=\"0\" Fill=\"{StaticResource HoverBrush}\" Stroke=\"{x:Null}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                        <ContentPresenter Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"Left\" Margin=\"{TemplateBinding Padding}\" x:Name=\"content\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                                    </Grid>\r\n                                </ControlTemplate>\r\n                            </Button.Template>\r\n                        </Button>\r\n                        <ItemsPresenter x:Name=\"ItemsHost\" Visibility=\"Visible\" Grid.Column=\"1\" Grid.ColumnSpan=\"2\" Grid.Row=\"1\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsExpanded\" Value=\"false\">\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ItemsHost\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"HasItems\" Value=\"false\">\r\n                            <Setter Property=\"Visibility\" Value=\"Hidden\" TargetName=\"Expander\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- Tree View -->\r\n    <Style TargetType=\"TreeView\">\r\n        <Setter Property=\"IsTabStop\" Value=\"True\"/>\r\n        <Setter Property=\"Background\" Value=\"{StaticResource ShadeBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Cursor\" Value=\"Arrow\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"Padding\" Value=\"1\"/>\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"#FFA3AEB9\" Offset=\"0\"/>\r\n                    <GradientStop Color=\"#FF8399A9\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF718597\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF617584\" Offset=\"1\"/>\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TreeView\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <Grid.Resources>\r\n                            <SolidColorBrush x:Key=\"BorderBrush\" Color=\"#FF000000\"/>\r\n                        </Grid.Resources>\r\n                        <Border x:Name=\"Border\" BorderBrush=\"{StaticResource NormalBorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\" Background=\"{TemplateBinding Background}\">\r\n                            <ScrollViewer BorderBrush=\"Transparent\" BorderThickness=\"0\" Padding=\"{TemplateBinding Padding}\" Margin=\"1\" x:Name=\"ScrollViewer\" HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Auto\">\r\n                                <ItemsPresenter Margin=\"5\" x:Name=\"TreeItems\"/>\r\n                            </ScrollViewer>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/ShinyRed/Theme.xaml",
    "content": "﻿<!--\r\n// (c) Copyright Microsoft Corporation.\r\n// This source is subject to Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n-->\r\n    \r\n<ResourceDictionary\r\n  xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n  xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n  xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n  mc:Ignorable=\"d\"\r\n  xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\">\r\n\r\n    <!-- Color Resources -->\r\n\r\n    <Color x:Key=\"BlackColor\">#FF000000</Color>\r\n    <Color x:Key=\"WhiteColor\">#FFFFFFFF</Color>\r\n\r\n    <SolidColorBrush x:Key=\"TextBrush\" Color=\"#FFFFFFFF\"/>\r\n\r\n    <Color x:Key=\"NormalBrushGradient1\">#FFF1BCBE</Color>\r\n    <Color x:Key=\"NormalBrushGradient2\">#FFCE6865</Color>\r\n    <Color x:Key=\"NormalBrushGradient3\">#FFAF231E</Color>\r\n    <Color x:Key=\"NormalBrushGradient4\">#FF601818</Color>\r\n\r\n    <Color x:Key=\"NormalBorderBrushGradient1\">#FFBBBBBB</Color>\r\n    <Color x:Key=\"NormalBorderBrushGradient2\">#FF737373</Color>\r\n    <Color x:Key=\"NormalBorderBrushGradient3\">#FF646464</Color>\r\n    <Color x:Key=\"NormalBorderBrushGradient4\">#FF000000</Color>\r\n\r\n    <Color x:Key=\"SelectedBackgroundGradient1\">#FFBBBBBB</Color>\r\n    <Color x:Key=\"SelectedBackgroundGradient2\">#FF737373</Color>\r\n    <Color x:Key=\"SelectedBackgroundGradient3\">#FF646464</Color>\r\n    <Color x:Key=\"SelectedBackgroundGradient4\">#FFA1A1A1</Color>\r\n\r\n    <Color x:Key=\"SliderBorderGradient1\">#FF3F3F3F</Color>\r\n    <Color x:Key=\"SliderBorderGradient2\">#FFADADAD</Color>\r\n\r\n    <Color x:Key=\"ShadeBrushGradient1\">#FF62676A</Color>\r\n    <Color x:Key=\"ShadeBrushGradient2\">#FFD1D4D6</Color>\r\n    <Color x:Key=\"ShadeBrushGradient3\">#FFFFFFFF</Color>\r\n\r\n    <Color x:Key=\"WindowBackgroundBrushGradient1\">#FFD1D1D1</Color>\r\n    <Color x:Key=\"WindowBackgroundBrushGradient2\">#FF8496AA</Color>\r\n\r\n\r\n    <LinearGradientBrush x:Key=\"NormalBrush\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource NormalBrushGradient1}\"\r\n                  Offset=\"0\" />\r\n        <GradientStop Color=\"{StaticResource NormalBrushGradient2}\"\r\n                  Offset=\"0.41800001263618469\" />\r\n        <GradientStop Color=\"{StaticResource NormalBrushGradient3}\"\r\n                  Offset=\"0.418\" />\r\n        <GradientStop Color=\"{StaticResource NormalBrushGradient4}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"NormalBorderBrush\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource NormalBorderBrushGradient1}\" />\r\n        <GradientStop Color=\"{StaticResource NormalBorderBrushGradient2}\"\r\n                  Offset=\"0.38\" />\r\n        <GradientStop Color=\"{StaticResource NormalBorderBrushGradient3}\"\r\n                  Offset=\"0.384\" />\r\n        <GradientStop Color=\"{StaticResource NormalBorderBrushGradient4}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <RadialGradientBrush x:Key=\"HoverBrush\">\r\n        <RadialGradientBrush.RelativeTransform>\r\n            <TransformGroup>\r\n                <ScaleTransform CenterX=\"0.5\"\r\n                        CenterY=\"0.5\"\r\n                        ScaleX=\"1.804\"\r\n                        ScaleY=\"0.743\" />\r\n                <SkewTransform CenterX=\"0.5\"\r\n                       CenterY=\"0.5\" />\r\n                <RotateTransform CenterX=\"0.5\"\r\n                         CenterY=\"0.5\" />\r\n                <TranslateTransform Y=\"0.47999998927116394\" />\r\n            </TransformGroup>\r\n        </RadialGradientBrush.RelativeTransform>\r\n        <GradientStop Color=\"#FFFFC398\"\r\n                  Offset=\"0.209\" />\r\n        <GradientStop Color=\"#00FFB598\"\r\n                  Offset=\"1\" />\r\n        <GradientStop Color=\"#FFFFFFFF\"\r\n                  Offset=\"0\" />\r\n    </RadialGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"CheckIconBrush\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FF006CD1\" />\r\n        <GradientStop Color=\"#FFA5D6F9\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ShadeBrush\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient2}\"\r\n                  Offset=\"0\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"0.1\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ShadeBrushTop\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient2}\"\r\n                  Offset=\"0\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"0.1\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ShadeBrushBottom\"\r\n                       EndPoint=\"0.5,0\"\r\n                       StartPoint=\"0.5,1\">\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient2}\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"0.1\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ShadeBrushLeft\"\r\n                       EndPoint=\"1,0.5\"\r\n                       StartPoint=\"0,0.5\">\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient2}\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"0.1\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"ShadeBrushRight\"\r\n                       EndPoint=\"0,0.5\"\r\n                       StartPoint=\"1,0.5\">\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient2}\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"0.1\" />\r\n        <GradientStop Color=\"{StaticResource ShadeBrushGradient3}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"DisabledBackgroundBrush\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FFFFFFFF\" />\r\n        <GradientStop Color=\"#FF62676A\"\r\n                  Offset=\"1\" />\r\n        <GradientStop Color=\"#FFD1D4D6\"\r\n                  Offset=\"0.41800001263618469\" />\r\n        <GradientStop Color=\"#FFA9AFB5\"\r\n                  Offset=\"0.425\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"SelectedBackgroundBrush\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient1}\" />\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient2}\"\r\n                  Offset=\"0.38\" />\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient3}\"\r\n                  Offset=\"0.384\" />\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient4}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"SelectedBackgroundBrushVertical\"\r\n                       EndPoint=\"2.05,0.5\"\r\n                       StartPoint=\"-0.55,0.5\">\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient1}\" />\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient2}\"\r\n                  Offset=\"0.37999999523162842\" />\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient3}\"\r\n                  Offset=\"0.38400000333786011\" />\r\n        <GradientStop Color=\"{StaticResource SelectedBackgroundGradient4}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"HorizontalSliderBorderBrush\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource SliderBorderGradient1}\" />\r\n        <GradientStop Color=\"{StaticResource SliderBorderGradient2}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"VerticalSliderBorderBrush\"\r\n                       EndPoint=\"1.35,0.5\"\r\n                       StartPoint=\"0.6,0.5\">\r\n        <GradientStop Color=\"{StaticResource SliderBorderGradient1}\" />\r\n        <GradientStop Color=\"{StaticResource SliderBorderGradient2}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"WindowBackgroundBrush\"\r\n                       EndPoint=\"0.5,1\"\r\n                       StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"{StaticResource WindowBackgroundBrushGradient1}\" />\r\n        <GradientStop Color=\"{StaticResource WindowBackgroundBrushGradient2}\"\r\n                  Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"MouseOverBrush\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#FFF\" Offset=\"0.0\"/>\r\n        <GradientStop Color=\"#AAA\" Offset=\"1.0\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"PressedBrush\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#BBB\" Offset=\"0.0\"/>\r\n        <GradientStop Color=\"#EEE\" Offset=\"0.1\"/>\r\n        <GradientStop Color=\"#EEE\" Offset=\"0.9\"/>\r\n        <GradientStop Color=\"#FFF\" Offset=\"1.0\"/>\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"PressedBorderBrush\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#444\" Offset=\"0.0\"/>\r\n        <GradientStop Color=\"#888\" Offset=\"1.0\"/>\r\n    </LinearGradientBrush>\r\n\r\n\r\n    <LinearGradientBrush x:Key=\"LightBrush\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#FFF\" Offset=\"0.0\"/>\r\n        <GradientStop Color=\"#EEE\" Offset=\"1.0\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <SolidColorBrush x:Key=\"DisabledForegroundBrush\" Color=\"#FF636363\"/>\r\n\r\n    <SolidColorBrush x:Key=\"DisabledBorderBrush\" Color=\"#AAA\"/>\r\n\r\n    <LinearGradientBrush x:Key=\"DefaultedBorderBrush\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#777\" Offset=\"0.0\"/>\r\n        <GradientStop Color=\"#000\" Offset=\"1.0\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <SolidColorBrush x:Key=\"SolidBorderBrush\" Color=\"#888\"/>\r\n    <SolidColorBrush x:Key=\"LightBorderBrush\" Color=\"#AAA\"/>\r\n    <SolidColorBrush x:Key=\"LightColorBrush\" Color=\"#DDD\"/>\r\n\r\n\r\n    <SolidColorBrush x:Key=\"GlyphBrush\" Color=\"{StaticResource WhiteColor}\"/>\r\n\r\n\r\n    <Style x:Key=\"NuclearButtonFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Border>\r\n                        <Rectangle Margin=\"2\" Stroke=\"#60000000\" StrokeThickness=\"1\" StrokeDashArray=\"1 2\"/>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type Button}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource NuclearButtonFocusVisual}\"/>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n<Setter Property=\"Template\" Value=\"{DynamicResource ButtonTemplate}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n    </Style>\r\n    \r\n    <ControlTemplate x:Key=\"ButtonTemplate\" TargetType=\"{x:Type Button}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Hover\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Hover\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\n                            </DoubleAnimationUsingKeyFrames>\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"0.6\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                <DiscreteObjectKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"{x:Static Visibility.Visible}\"/>\r\n                            </ObjectAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n\r\n                    <Grid x:Name=\"Grid\">\r\n                        <Border x:Name=\"Background\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"2,2,2,2\">\r\n                            <Border x:Name=\"Hover\" Background=\"{StaticResource HoverBrush}\" CornerRadius=\"1,1,1,1\" Height=\"Auto\" Width=\"Auto\" Opacity=\"0\"/>\r\n                        </Border>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" RecognizesAccessKey=\"True\"/>\r\n                        <Border x:Name=\"FocusVisualElement\"\r\n                    IsHitTestVisible=\"false\"\r\n                    BorderBrush=\"{StaticResource HoverBrush}\"\r\n                    BorderThickness=\"2,2,2,2\"\r\n                    CornerRadius=\"2,2,2,2\" Opacity=\"0\"/>\r\n                    </Grid>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsDefault\" Value=\"True\">\r\n                            <Setter Property=\"BorderBrush\" TargetName=\"Background\" Value=\"{DynamicResource DefaultedBorderBrush}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"FocusedOff_BeginStoryboard\" Storyboard=\"{StaticResource FocusedOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"true\"/>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Background\"/>\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DisabledBorderBrush}\" TargetName=\"Background\"/>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n\r\n    <Style x:Key=\"RadioButtonFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Border>\r\n                        <Rectangle Margin=\"15,0,0,0\" Stroke=\"#60000000\" StrokeThickness=\"1\" StrokeDashArray=\"1 2\"/>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"CheckBoxFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Border>\r\n                        <Rectangle Margin=\"15,0,0,0\" Stroke=\"#60000000\" StrokeThickness=\"1\" StrokeDashArray=\"1 2\"/>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type CheckBox}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource CheckBoxFocusVisual}\"/>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n<Setter Property=\"Template\" Value=\"{DynamicResource CheckBoxTemplate}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n        <Style.Triggers>\r\n            <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n            </Trigger>\r\n        </Style.Triggers>\r\n    </Style>\r\n    \r\n    <ControlTemplate x:Key=\"CheckBoxTemplate\" TargetType=\"{x:Type CheckBox}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"CheckedFalse\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedTrue\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"ThreeStateOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"IndeterminateIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"ThreeStateOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"IndeterminateIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"0.6\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <BulletDecorator Background=\"Transparent\">\r\n                        <BulletDecorator.Bullet>\r\n                            <Grid Width=\"16\" Height=\"16\">\r\n                                <Rectangle Height=\"14\" Margin=\"1\" x:Name=\"Background\" Width=\"14\" Fill=\"{TemplateBinding Background}\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                                <Rectangle Height=\"12\" x:Name=\"BackgroundOverlay\" Width=\"12\" Opacity=\"0\" Fill=\"{StaticResource HoverBrush}\" Stroke=\"{x:Null}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n\r\n                                <Path x:Name=\"CheckIcon\" Opacity=\"0\" Stretch=\"Fill\" Data=\"M102.03442,598.79645 L105.22962,597.78918 L106.95686,599.19977 C106.95686,599.19977 113.77958,590.53656 113.77958,590.53656 C113.77958,590.53656 107.40649,603.79431 107.40649,603.79431 z\" Fill=\"#FFFFFFFF\"\r\n                    Height=\"10\"\r\n                    Width=\"11\"\r\n                    Stroke=\"{StaticResource CheckIconBrush}\"\r\n                    StrokeThickness=\"0\"/>\r\n\r\n                                <Rectangle Height=\"9\" x:Name=\"IndeterminateIcon\" Width=\"9\" Opacity=\"0\" Fill=\"#FFFFFFFF\" Stroke=\"{StaticResource CheckIconBrush}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                                <Rectangle Height=\"14\" x:Name=\"DisabledVisualElement\" Width=\"14\" Opacity=\"0\" Fill=\"{StaticResource DisabledBackgroundBrush}\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                                <Rectangle Height=\"16\" x:Name=\"ContentFocusVisualElement\" Width=\"16\" IsHitTestVisible=\"false\" Opacity=\"0\" Stroke=\"{StaticResource HoverBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                            </Grid>\r\n                        </BulletDecorator.Bullet>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" RecognizesAccessKey=\"True\"/>\r\n                    </BulletDecorator>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsChecked\" Value=\"True\" />\r\n                                <Condition Property=\"IsThreeState\" Value=\"True\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"ThreeStateOn_BeginStoryboard\" Storyboard=\"{StaticResource CheckedFalse}\" />\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"ThreeStateOff_BeginStoryboard\" Storyboard=\"{StaticResource CheckedTrue}\" />\r\n                            </MultiTrigger.ExitActions>\r\n                        </MultiTrigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsChecked\" Value=\"{x:Null}\" />\r\n                                <Condition Property=\"IsThreeState\" Value=\"True\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"ThreeStateOn1_BeginStoryboard\" Storyboard=\"{StaticResource ThreeStateOn}\" />\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"ThreeStateOff1_BeginStoryboard\" Storyboard=\"{StaticResource ThreeStateOff}\" />\r\n                            </MultiTrigger.ExitActions>\r\n                            <Setter Property=\"Visibility\" TargetName=\"CheckIcon\" Value=\"Hidden\"/>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedFalse}\" x:Name=\"CheckedTrue_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"CheckedTrue_BeginStoryboard1\" Storyboard=\"{StaticResource CheckedTrue}\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Fill\" TargetName=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                            <Setter Property=\"Stroke\" TargetName=\"Background\" Value=\"{DynamicResource DisabledBorderBrush}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n\r\n                </ControlTemplate>\r\n\r\n    <Style TargetType=\"{x:Type RadioButton}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource RadioButtonFocusVisual}\"/>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type RadioButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"CheckedFalse\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedTrue\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"0.6\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <BulletDecorator Background=\"Transparent\">\r\n                        <BulletDecorator.Bullet>\r\n                            <Grid Width=\"16\" Height=\"16\">\r\n                                <Ellipse Height=\"14\"\r\n                       Margin=\"1\"\r\n                       x:Name=\"Background\"\r\n                       Width=\"14\"\r\n                       Fill=\"{StaticResource NormalBrush}\"\r\n                       Stroke=\"{TemplateBinding BorderBrush}\"\r\n                       StrokeThickness=\"2\"/>\r\n                                <Ellipse Height=\"12\"\r\n                       x:Name=\"BackgroundOverlay\"\r\n                       Width=\"12\"\r\n                       Opacity=\"0\"\r\n                       Fill=\"{StaticResource HoverBrush}\"\r\n                       Stroke=\"#00000000\"\r\n                       Margin=\"2,2,2,2\"\r\n                       StrokeThickness=\"0\"/>\r\n                                <Border HorizontalAlignment=\"Center\"\r\n                      VerticalAlignment=\"Center\"\r\n                      Width=\"6\"\r\n                      Height=\"6\"\r\n                      CornerRadius=\"1,1,1,1\"\r\n                      BorderThickness=\"1,1,1,1\"\r\n                      Background=\"#FFFFFFFF\"\r\n                      x:Name=\"CheckIcon\"\r\n                      BorderBrush=\"{StaticResource CheckIconBrush}\"\r\n                      Opacity=\"0\"/>\r\n                            </Grid>\r\n                        </BulletDecorator.Bullet>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" RecognizesAccessKey=\"True\"/>\r\n                    </BulletDecorator>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsChecked\" Value=\"false\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedTrue}\" x:Name=\"CheckedTrue_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedFalse}\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Fill\" TargetName=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                            <Setter Property=\"Stroke\" TargetName=\"Background\" Value=\"{DynamicResource DisabledBorderBrush}\"/>\r\n\r\n                        </Trigger>\r\n\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Style.Triggers>\r\n            <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n            </Trigger>\r\n        </Style.Triggers>\r\n    </Style>\r\n\r\n    <Style x:Key=\"NuclearRepeatButton\" d:IsControlPart=\"True\" TargetType=\"{x:Type RepeatButton}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundAnimation\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundAnimation\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\n                            </DoubleAnimationUsingKeyFrames>\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"0.6\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Border x:Name=\"Border\" Background=\"{TemplateBinding Background}\" CornerRadius=\"2,2,2,2\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"2\"/>\r\n                        <Rectangle x:Name=\"BackgroundAnimation\"\r\n                             Opacity=\"0\"\r\n                             Fill=\"{StaticResource HoverBrush}\"\r\n                             Stroke=\"{x:Null}\"\r\n                             StrokeThickness=\"0\"\r\n                             RadiusX=\"1\"\r\n                             RadiusY=\"1\"\r\n                             Margin=\"2,2,2,2\" />\r\n                        <ContentPresenter HorizontalAlignment=\"Center\" x:Name=\"ContentPresenter\" VerticalAlignment=\"Center\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" ContentTemplateSelector=\"{TemplateBinding ContentTemplateSelector}\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DefaultedBorderBrush}\" TargetName=\"Border\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DisabledBorderBrush}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"NuclearThumbStyle\" d:IsControlPart=\"True\" TargetType=\"{x:Type Thumb}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundMouseOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundMouseOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\n                            </DoubleAnimationUsingKeyFrames>\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"0.6\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid Margin=\"0,0,0,0\" x:Name=\"Grid\">\r\n                        <Rectangle x:Name=\"Background\"\r\n\t\t\t\t\t\t\tFill=\"{StaticResource NormalBrush}\"\r\n\t\t\t\t\t\t\tStrokeThickness=\"2\"\r\n\t\t\t\t\t\t\tRadiusX=\"2\"\r\n\t\t\t\t\t\t\tRadiusY=\"2\"\r\n\t\t\t\t\t\t\tStroke=\"{StaticResource NormalBorderBrush}\" />\r\n                        <Rectangle x:Name=\"BackgroundMouseOver\"\r\n\t\t\t\t\t\t\tFill=\"{StaticResource HoverBrush}\"\r\n\t\t\t\t\t\t\tStroke=\"{x:Null}\"\r\n\t\t\t\t\t\t\tStrokeThickness=\"1\"\r\n\t\t\t\t\t\t\tRadiusX=\"1\"\r\n\t\t\t\t\t\t\tRadiusY=\"1\"\r\n\t\t\t\t\t\t\tMargin=\"2,2,2,2\" Opacity=\"0\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\"/>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsDragging\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Fill\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Background\"/>\r\n                            <Setter Property=\"Stroke\" Value=\"{DynamicResource DisabledBorderBrush}\" TargetName=\"Background\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"NuclearScrollRepeatButtonStyle\" d:IsControlPart=\"True\" TargetType=\"{x:Type RepeatButton}\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n        <Setter Property=\"IsTabStop\" Value=\"false\"/>\r\n        <Setter Property=\"Focusable\" Value=\"false\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n                    <Grid>\r\n                        <Rectangle Fill=\"{TemplateBinding Background}\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n\r\n    <Style TargetType=\"{x:Type ScrollBar}\">\r\n        <Setter Property=\"Stylus.IsFlicksEnabled\" Value=\"false\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ScrollBar}\">\r\n                    <Grid x:Name=\"GridRoot\" Width=\"{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition MaxHeight=\"18\"/>\r\n                            <RowDefinition Height=\"0.00001*\"/>\r\n                            <RowDefinition MaxHeight=\"18\"/>\r\n                        </Grid.RowDefinitions>\r\n\r\n                        <Border Grid.RowSpan=\"3\" Background=\"#FFDDDEDF\" CornerRadius=\"3,3,3,3\"/>\r\n\r\n                        <RepeatButton x:Name=\"DecreaseRepeat\" Style=\"{DynamicResource NuclearRepeatButton}\" Command=\"ScrollBar.LineUpCommand\">\r\n                            <Grid>\r\n                                <Path x:Name=\"DecreaseArrow\" StrokeThickness=\"1\" Data=\"M 0 4 L 8 4 L 4 0 Z\" Fill=\"{DynamicResource GlyphBrush}\"/>\r\n                            </Grid>\r\n                        </RepeatButton>\r\n\r\n                        <Track Grid.Row=\"1\" x:Name=\"PART_Track\" Orientation=\"Vertical\" IsDirectionReversed=\"true\">\r\n                            <Track.Thumb>\r\n                                <Thumb Style=\"{DynamicResource NuclearThumbStyle}\"/>\r\n                            </Track.Thumb>\r\n                            <Track.IncreaseRepeatButton>\r\n                                <RepeatButton x:Name=\"PageUp\" Style=\"{DynamicResource NuclearScrollRepeatButtonStyle}\" Command=\"ScrollBar.PageDownCommand\"/>\r\n                            </Track.IncreaseRepeatButton>\r\n                            <Track.DecreaseRepeatButton>\r\n                                <RepeatButton x:Name=\"PageDown\" Style=\"{DynamicResource NuclearScrollRepeatButtonStyle}\" Command=\"ScrollBar.PageUpCommand\"/>\r\n                            </Track.DecreaseRepeatButton>\r\n                        </Track>\r\n\r\n                        <RepeatButton Grid.Row=\"2\" x:Name=\"IncreaseRepeat\" Style=\"{DynamicResource NuclearRepeatButton}\" Command=\"ScrollBar.LineDownCommand\">\r\n                            <Grid>\r\n                                <Path x:Name=\"IncreaseArrow\" StrokeThickness=\"1\" Data=\"M 0 0 L 4 4 L 8 0 Z\" Fill=\"{DynamicResource GlyphBrush}\"/>\r\n                            </Grid>\r\n                        </RepeatButton>\r\n                    </Grid>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"Orientation\" Value=\"Horizontal\">\r\n\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"GridRoot\">\r\n                                <Setter.Value>\r\n                                    <RotateTransform Angle=\"-90\"/>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n\r\n                            <Setter TargetName=\"PART_Track\" Property=\"Orientation\" Value=\"Vertical\"/>\r\n\r\n                            <Setter Property=\"Command\" Value=\"ScrollBar.LineLeftCommand\" TargetName=\"DecreaseRepeat\"/>\r\n                            <Setter Property=\"Command\" Value=\"ScrollBar.LineRightCommand\" TargetName=\"IncreaseRepeat\"/>\r\n                            <Setter Property=\"Command\" Value=\"ScrollBar.PageLeftCommand\" TargetName=\"PageDown\"/>\r\n                            <Setter Property=\"Command\" Value=\"ScrollBar.PageRightCommand\" TargetName=\"PageUp\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Background\" Value=\"#FFDDDEDF\"/>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type ScrollViewer}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ScrollViewer}\">\r\n                    <Grid Background=\"{TemplateBinding Background}\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"*\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <ScrollContentPresenter Grid.Column=\"0\" Grid.Row=\"0\" Margin=\"{TemplateBinding Padding}\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" CanContentScroll=\"{TemplateBinding CanContentScroll}\"/>\r\n\r\n                        <ScrollBar Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Grid.Column=\"0\" Grid.Row=\"1\" x:Name=\"PART_HorizontalScrollBar\"   Orientation=\"Horizontal\" Value=\"{Binding Path=HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" ViewportSize=\"{TemplateBinding ViewportWidth}\" Minimum=\"0\" Maximum=\"{TemplateBinding ScrollableWidth}\" AutomationProperties.AutomationId=\"HorizontalScrollBar\"/>\r\n                        <ScrollBar Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Grid.Column=\"1\" Grid.Row=\"0\" x:Name=\"PART_VerticalScrollBar\"   Orientation=\"Vertical\" Value=\"{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" ViewportSize=\"{TemplateBinding ViewportHeight}\" Minimum=\"0\" Maximum=\"{TemplateBinding ScrollableHeight}\" AutomationProperties.AutomationId=\"VerticalScrollBar\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type ListBox}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource ShadeBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\"/>\r\n        <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\"/>\r\n        <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"True\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListBox}\">\r\n                    <Grid>\r\n                        <Border x:Name=\"Border\" CornerRadius=\"2\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\"/>\r\n                        <ScrollViewer   Focusable=\"false\" Margin=\"0,0,0,1\" >\r\n\r\n                            <StackPanel Margin=\"2\" IsItemsHost=\"true\"/>\r\n\r\n                        </ScrollViewer>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DisabledBorderBrush}\" TargetName=\"Border\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                            <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n\r\n    <Style d:IsControlPart=\"True\" TargetType=\"{x:Type ListBoxItem}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n        <Setter Property=\"OverridesDefaultStyle\" Value=\"true\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListBoxItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\n                            </DoubleAnimationUsingKeyFrames>\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.2000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOff\">\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\" />\n                            </DoubleAnimationUsingKeyFrames>\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid Background=\"{TemplateBinding Background}\"\r\n\t\t\t\t\t\tMargin=\"1,1,1,1\" SnapsToDevicePixels=\"true\" x:Name=\"grid\">\r\n                        <Rectangle x:Name=\"Background\"\r\n\t\t\t\t\t\t\tIsHitTestVisible=\"False\"\r\n\t\t\t\t\t\t\tFill=\"{StaticResource SelectedBackgroundBrush}\"\r\n\t\t\t\t\t\t\tRadiusX=\"0\"/>\r\n                        <Rectangle x:Name=\"SelectedRectangle\"\r\n\t\t\t\t\t\t\tIsHitTestVisible=\"False\"\r\n\t\t\t\t\t\t\tOpacity=\"0\"\r\n\t\t\t\t\t\t\tFill=\"{StaticResource NormalBrush}\"\r\n\t\t\t\t\t\t\tRadiusX=\"0\"/>\r\n                        <Rectangle x:Name=\"HoverRectangle\"\r\n\t\t\t\t\t\t\tIsHitTestVisible=\"False\"\r\n\t\t\t\t\t\t\tFill=\"{StaticResource HoverBrush}\"\r\n\t\t\t\t\t\t\tRadiusX=\"0\"\r\n\t\t\t\t\t\t\tOpacity=\"0\"/>\r\n                        <ContentPresenter Margin=\"5,3,3,3\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" x:Name=\"contentPresenter\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsSelected\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n    </Style>\r\n\r\n    <Style x:Key=\"ExpanderHeaderFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Border>\r\n                        <Rectangle SnapsToDevicePixels=\"true\" Margin=\"0\" Stroke=\"Black\" StrokeDashArray=\"1 2\" StrokeThickness=\"1\" />\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"ExpanderDownHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.6\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Border Padding=\"{TemplateBinding Padding}\" Background=\"#FFFFFFFF\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"2,2,2,2\" x:Name=\"border\">\r\n                        <Grid SnapsToDevicePixels=\"False\" Background=\"Transparent\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"21\" />\r\n                                <ColumnDefinition Width=\"*\" />\r\n                            </Grid.ColumnDefinitions>\r\n                            <Rectangle Margin=\"3,3,3,3\" x:Name=\"Rectangle\" Fill=\"{DynamicResource NormalBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" />\r\n                            <Rectangle Margin=\"3,3,3,3\" x:Name=\"HoverRectangle\" Fill=\"{DynamicResource HoverBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\" />\r\n                            <Path HorizontalAlignment=\"Center\" x:Name=\"Up_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 0 L 4 4 L 8 0 Z\" />\r\n                            <Path Visibility=\"Collapsed\" HorizontalAlignment=\"Center\" x:Name=\"Down_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 4 L 4 0 L 8 4 Z\" />\r\n                            <ContentPresenter SnapsToDevicePixels=\"True\" HorizontalAlignment=\"Left\" Margin=\"4,3,0,3\" VerticalAlignment=\"Center\" Grid.Column=\"1\" RecognizesAccessKey=\"True\" />\r\n                        </Grid>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Fill\" TargetName=\"Rectangle\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                            <Setter Property=\"BorderBrush\" TargetName=\"border\" Value=\"{DynamicResource DisabledBorderBrush}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"Down_Arrow\" Value=\"Visible\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Up_Arrow\" Value=\"Collapsed\" />\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"ExpanderRightHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.6\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Border Padding=\"{TemplateBinding Padding}\" Background=\"#FFFFFFFF\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"2,2,2,2\" x:Name=\"border\">\r\n                        <Grid SnapsToDevicePixels=\"False\" Background=\"Transparent\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"21\" />\r\n                                <RowDefinition Height=\"*\" />\r\n                            </Grid.RowDefinitions>\r\n                            <Grid>\r\n                                <Grid.LayoutTransform>\r\n                                    <TransformGroup>\r\n                                        <TransformGroup.Children>\r\n                                            <TransformCollection>\r\n                                                <RotateTransform Angle=\"-90\" />\r\n                                            </TransformCollection>\r\n                                        </TransformGroup.Children>\r\n                                    </TransformGroup>\r\n                                </Grid.LayoutTransform>\r\n                                <Rectangle Margin=\"3,3,1,3\" x:Name=\"Rectangle\" Fill=\"{DynamicResource NormalBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" />\r\n                                <Rectangle Margin=\"3,3,1,3\" x:Name=\"HoverRectangle\" Fill=\"{DynamicResource HoverBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\" />\r\n                                <Path HorizontalAlignment=\"Center\" x:Name=\"Up_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 0 L 4 4 L 8 0 Z\" />\r\n                                <Path Visibility=\"Collapsed\" HorizontalAlignment=\"Center\" x:Name=\"Down_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 4 L 4 0 L 8 4 Z\" />\r\n                            </Grid>\r\n                            <ContentPresenter SnapsToDevicePixels=\"True\" HorizontalAlignment=\"Center\" Margin=\"2,4,4,0\" VerticalAlignment=\"Top\" Grid.Row=\"1\" RecognizesAccessKey=\"True\">\r\n                                <ContentPresenter.LayoutTransform>\r\n                                    <TransformGroup>\r\n                                        <TransformGroup.Children>\r\n                                            <TransformCollection>\r\n                                                <RotateTransform Angle=\"-90\" />\r\n                                            </TransformCollection>\r\n                                        </TransformGroup.Children>\r\n                                    </TransformGroup>\r\n                                </ContentPresenter.LayoutTransform>\r\n                            </ContentPresenter>\r\n                        </Grid>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Fill\" TargetName=\"Rectangle\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                            <Setter Property=\"BorderBrush\" TargetName=\"border\" Value=\"{DynamicResource DisabledBorderBrush}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"Up_Arrow\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Down_Arrow\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"ExpanderUpHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.6\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Border Padding=\"{TemplateBinding Padding}\" CornerRadius=\"2,2,2,2\" BorderThickness=\"1,1,1,1\" Background=\"#FFFFFFFF\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" x:Name=\"border\">\r\n                        <Grid SnapsToDevicePixels=\"False\" Background=\"Transparent\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"21\" />\r\n                                <ColumnDefinition Width=\"*\" />\r\n                            </Grid.ColumnDefinitions>\r\n                            <Grid>\r\n                                <Grid.LayoutTransform>\r\n                                    <TransformGroup>\r\n                                        <TransformGroup.Children>\r\n                                            <TransformCollection>\r\n                                                <RotateTransform Angle=\"180\" />\r\n                                            </TransformCollection>\r\n                                        </TransformGroup.Children>\r\n                                    </TransformGroup>\r\n                                </Grid.LayoutTransform>\r\n                                <Rectangle Margin=\"3,3,3,3\" x:Name=\"Rectangle\" Fill=\"{DynamicResource NormalBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" />\r\n                                <Rectangle Margin=\"3,3,3,3\" x:Name=\"HoverRectangle\" Fill=\"{DynamicResource HoverBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\" />\r\n                                <Path HorizontalAlignment=\"Center\" x:Name=\"Up_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 0 L 4 4 L 8 0 Z\" />\r\n                                <Path Visibility=\"Collapsed\" HorizontalAlignment=\"Center\" x:Name=\"Down_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 4 L 4 0 L 8 4 Z\" />\r\n                            </Grid>\r\n                            <ContentPresenter SnapsToDevicePixels=\"True\" HorizontalAlignment=\"Left\" Margin=\"4,3,0,3\" VerticalAlignment=\"Center\" Grid.Column=\"1\" RecognizesAccessKey=\"True\" />\r\n                        </Grid>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"BorderBrush\" TargetName=\"border\" Value=\"{DynamicResource DisabledBorderBrush}\"/>\r\n                            <Setter Property=\"Fill\" TargetName=\"Rectangle\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"Up_Arrow\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Down_Arrow\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"ExpanderLeftHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.6\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Border Padding=\"{TemplateBinding Padding}\" CornerRadius=\"2,2,2,2\" Background=\"#FFFFFFFF\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"1,1,1,1\" x:Name=\"border\">\r\n                        <Grid SnapsToDevicePixels=\"False\" Background=\"Transparent\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"21\" />\r\n                                <RowDefinition Height=\"*\" />\r\n                            </Grid.RowDefinitions>\r\n                            <Grid>\r\n                                <Grid.LayoutTransform>\r\n                                    <TransformGroup>\r\n                                        <TransformGroup.Children>\r\n                                            <TransformCollection>\r\n                                                <RotateTransform Angle=\"90\" />\r\n                                            </TransformCollection>\r\n                                        </TransformGroup.Children>\r\n                                    </TransformGroup>\r\n                                </Grid.LayoutTransform>\r\n                                <Rectangle Margin=\"3,3,3,3\" x:Name=\"Rectangle\" Fill=\"{DynamicResource NormalBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" />\r\n                                <Rectangle Margin=\"3,3,3,3\" x:Name=\"HoverRectangle\" Fill=\"{DynamicResource HoverBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\" />\r\n                                <Path HorizontalAlignment=\"Center\" x:Name=\"Up_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 0 L 4 4 L 8 0 Z\" />\r\n                                <Path Visibility=\"Collapsed\" HorizontalAlignment=\"Center\" x:Name=\"Down_Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 4 L 4 0 L 8 4 Z\" />\r\n                            </Grid>\r\n                            <ContentPresenter SnapsToDevicePixels=\"True\" HorizontalAlignment=\"Center\" Margin=\"4,4,2,0\" VerticalAlignment=\"Top\" Grid.Row=\"1\" RecognizesAccessKey=\"True\">\r\n                                <ContentPresenter.LayoutTransform>\r\n                                    <TransformGroup>\r\n                                        <TransformGroup.Children>\r\n                                            <TransformCollection>\r\n                                                <RotateTransform Angle=\"90\" />\r\n                                            </TransformCollection>\r\n                                        </TransformGroup.Children>\r\n                                    </TransformGroup>\r\n                                </ContentPresenter.LayoutTransform>\r\n                            </ContentPresenter>\r\n                        </Grid>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Fill\" TargetName=\"Rectangle\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                            <Setter Property=\"BorderBrush\" TargetName=\"border\" Value=\"{DynamicResource DisabledBorderBrush}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"Up_Arrow\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Down_Arrow\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style TargetType=\"{x:Type Expander}\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Expander}\">\r\n                    <Border SnapsToDevicePixels=\"true\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"3\">\r\n                        <DockPanel>\r\n                            <ToggleButton FontFamily=\"{TemplateBinding FontFamily}\" FontSize=\"{TemplateBinding FontSize}\" FontStretch=\"{TemplateBinding FontStretch}\" FontStyle=\"{TemplateBinding FontStyle}\" FontWeight=\"{TemplateBinding FontWeight}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\" FocusVisualStyle=\"{StaticResource ExpanderHeaderFocusVisual}\" Margin=\"1,1,1,0\" MinHeight=\"0\" MinWidth=\"0\" x:Name=\"HeaderSite\" Style=\"{StaticResource ExpanderDownHeaderStyle}\" Content=\"{TemplateBinding Header}\" ContentTemplate=\"{TemplateBinding HeaderTemplate}\" ContentTemplateSelector=\"{TemplateBinding HeaderTemplateSelector}\" IsChecked=\"{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" DockPanel.Dock=\"Top\" />\r\n                            <Grid Visibility=\"Collapsed\" x:Name=\"grid\">\r\n                                <Border Background=\"{DynamicResource ShadeBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"1,0,1,1\" CornerRadius=\"3,3,3,3\" x:Name=\"border\" Margin=\"0,0,0,0\"/>\r\n                                <ContentPresenter Focusable=\"false\" HorizontalAlignment=\"Left\" Margin=\"1,1,1,1\" x:Name=\"ExpandSite\" VerticalAlignment=\"Top\" DockPanel.Dock=\"Bottom\" />\r\n                            </Grid>\r\n                        </DockPanel>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsExpanded\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"grid\" Value=\"Visible\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Down\" >\r\n                            <Setter Property=\"Margin\" TargetName=\"grid\" Value=\"1,0,1,0\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Right\">\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Right\" />\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Left\" />\r\n                            <Setter Property=\"Style\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderRightHeaderStyle}\" />\r\n                            <Setter Property=\"Background\" TargetName=\"border\" Value=\"{DynamicResource ShadeBrushRight}\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"grid\" Value=\"0,1,0,1\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Up\">\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Top\" />\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Bottom\" />\r\n                            <Setter Property=\"Style\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderUpHeaderStyle}\" />\r\n                            <Setter Property=\"Background\" TargetName=\"border\" Value=\"{DynamicResource ShadeBrushBottom}\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"grid\" Value=\"1,0,1,0\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Left\">\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Left\" />\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Right\" />\r\n                            <Setter Property=\"Style\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderLeftHeaderStyle}\" />\r\n                            <Setter Property=\"Background\" TargetName=\"border\" Value=\"{DynamicResource ShadeBrushLeft}\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"grid\" Value=\"0,1,0,1\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <ControlTemplate x:Key=\"ComboBoxToggleButton\" TargetType=\"{x:Type ToggleButton}\">\r\n        <ControlTemplate.Resources>\r\n            <Storyboard x:Key=\"HoverOn\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"HoverOff\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"PressedOn\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.6\"/>\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n            <Storyboard x:Key=\"PressedOff\">\r\n                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"1\"/>\r\n                </DoubleAnimationUsingKeyFrames>\r\n            </Storyboard>\r\n        </ControlTemplate.Resources>\r\n        <Grid>\r\n            <Grid.ColumnDefinitions>\r\n                <ColumnDefinition/>\r\n                <ColumnDefinition Width=\"20\"/>\r\n            </Grid.ColumnDefinitions>\r\n            <Rectangle Grid.ColumnSpan=\"2\" HorizontalAlignment=\"Stretch\" x:Name=\"Rectangle\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" RadiusX=\"3\" RadiusY=\"3\" Fill=\"{DynamicResource NormalBrush}\" Stroke=\"{DynamicResource NormalBorderBrush}\" StrokeThickness=\"2\"/>\r\n            <Rectangle HorizontalAlignment=\"Stretch\" x:Name=\"HoverRectangle\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" RadiusX=\"3\" RadiusY=\"3\" Fill=\"{DynamicResource HoverBrush}\" Stroke=\"{x:Null}\" StrokeThickness=\"2\" Grid.ColumnSpan=\"2\" Opacity=\"0\" Grid.Column=\"1\" Margin=\"0,2,2,2\"/>\r\n            <Rectangle Grid.Column=\"0\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" RadiusX=\"2\" RadiusY=\"2\" Stroke=\"{x:Null}\" Margin=\"2,2,0,2\">\r\n                <Rectangle.Fill>\r\n                    <SolidColorBrush Color=\"{DynamicResource WhiteColor}\"/>\r\n                </Rectangle.Fill>\r\n            </Rectangle>\r\n            <Path Grid.Column=\"1\" HorizontalAlignment=\"Center\" x:Name=\"Arrow\" VerticalAlignment=\"Center\" Fill=\"{DynamicResource GlyphBrush}\" Data=\"M 0 0 L 4 4 L 8 0 Z\" d:LayoutOverrides=\"Width, Height\" Margin=\"-2,2,0,0\"/>\r\n        </Grid>\r\n        <ControlTemplate.Triggers>\r\n            <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                <Trigger.ExitActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                </Trigger.ExitActions>\r\n                <Trigger.EnterActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                </Trigger.EnterActions>\r\n            </Trigger>\r\n            <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                <Trigger.ExitActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                </Trigger.ExitActions>\r\n                <Trigger.EnterActions>\r\n                    <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                </Trigger.EnterActions>\r\n            </Trigger>\r\n            <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                <Setter Property=\"Fill\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Rectangle\"/>\r\n                <Setter Property=\"Stroke\" Value=\"{DynamicResource DisabledBorderBrush}\" TargetName=\"Rectangle\"/>\r\n                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                <Setter Property=\"Fill\" Value=\"{DynamicResource DisabledForegroundBrush}\" TargetName=\"Arrow\"/>\r\n            </Trigger>\r\n        </ControlTemplate.Triggers>\r\n    </ControlTemplate>\r\n\r\n\r\n    <ControlTemplate x:Key=\"ComboBoxTextBox\" TargetType=\"{x:Type TextBox}\">\r\n        <Border x:Name=\"PART_ContentHost\" Focusable=\"False\" Background=\"{TemplateBinding Background}\"/>\r\n    </ControlTemplate>\r\n\r\n\r\n    <Style TargetType=\"{x:Type ComboBox}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n<Setter Property=\"Template\" Value=\"{DynamicResource ComboBoxTemplate}\" />\r\n    </Style>\r\n\r\n    <ControlTemplate x:Key=\"ComboBoxTemplate\" TargetType=\"{x:Type ComboBox}\">\r\n                    <Grid>\r\n                        <ToggleButton Grid.Column=\"2\" Template=\"{DynamicResource ComboBoxToggleButton}\" x:Name=\"ToggleButton\" Focusable=\"false\" IsChecked=\"{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" ClickMode=\"Press\"/>\r\n                        <ContentPresenter HorizontalAlignment=\"Left\" Margin=\"3,3,23,3\" x:Name=\"ContentSite\" VerticalAlignment=\"Center\" Content=\"{TemplateBinding SelectionBoxItem}\" ContentTemplate=\"{TemplateBinding SelectionBoxItemTemplate}\" ContentTemplateSelector=\"{TemplateBinding ItemTemplateSelector}\" IsHitTestVisible=\"False\"/>\r\n\r\n                        <TextBox Visibility=\"Hidden\" Template=\"{DynamicResource ComboBoxTextBox}\" HorizontalAlignment=\"Left\" Margin=\"3,3,23,3\" x:Name=\"PART_EditableTextBox\" Style=\"{x:Null}\" VerticalAlignment=\"Center\" Focusable=\"True\" Background=\"Transparent\" IsReadOnly=\"{TemplateBinding IsReadOnly}\"/>\r\n\r\n                        <Popup IsOpen=\"{TemplateBinding IsDropDownOpen}\" Placement=\"Bottom\" x:Name=\"Popup\" Focusable=\"False\" AllowsTransparency=\"True\" PopupAnimation=\"Slide\">\r\n                            <Grid MaxHeight=\"{TemplateBinding MaxDropDownHeight}\" MinWidth=\"{TemplateBinding ActualWidth}\" x:Name=\"DropDown\" SnapsToDevicePixels=\"True\">\r\n                                <Border x:Name=\"DropDownBorder\" Background=\"{DynamicResource ShadeBrush}\" BorderBrush=\"{DynamicResource SolidBorderBrush}\" BorderThickness=\"1\"/>\r\n                                <ScrollViewer Margin=\"4,6,4,6\"   SnapsToDevicePixels=\"True\" HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Auto\" CanContentScroll=\"True\">\r\n\r\n                                    <StackPanel IsItemsHost=\"True\" KeyboardNavigation.DirectionalNavigation=\"Contained\"/>\r\n\r\n                                </ScrollViewer>\r\n                            </Grid>\r\n                        </Popup>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"HasItems\" Value=\"false\">\r\n                            <Setter Property=\"MinHeight\" Value=\"95\" TargetName=\"DropDownBorder\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                            <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"AllowsTransparency\" SourceName=\"Popup\" Value=\"true\">\r\n                            <Setter Property=\"Margin\" Value=\"0,0,0,0\" TargetName=\"DropDownBorder\"/>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"DropDownBorder\" Value=\"3,3,3,3\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEditable\" Value=\"true\">\r\n                            <Setter Property=\"IsTabStop\" Value=\"false\"/>\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"PART_EditableTextBox\"/>\r\n                            <Setter Property=\"Visibility\" Value=\"Hidden\" TargetName=\"ContentSite\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n    \r\n    <Style d:IsControlPart=\"True\" TargetType=\"{x:Type ComboBoxItem}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ComboBoxItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"SelectedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid SnapsToDevicePixels=\"true\" Margin=\"0,1,0,1\">\r\n                        <Border x:Name=\"Border\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\"/>\r\n                        <Border x:Name=\"SelectedBorder\" Background=\"{DynamicResource NormalBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Opacity=\"0\"/>\r\n                        <Border x:Name=\"HoverBorder\" Background=\"{DynamicResource HoverBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Opacity=\"0\"/>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Margin=\"5,2,0,2\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" x:Name=\"HoverOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"IsHighlighted\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOff}\" x:Name=\"SelectedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\" x:Name=\"SelectedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource SelectedBackgroundBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type ProgressBar}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ProgressBar}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"IndeterminateOn\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"IndeterminateGradientFill\"\r\n                                                   Storyboard.TargetProperty=\"(Shape.Fill).(LinearGradientBrush.Transform).(TransformGroup.Children)[0].X\" RepeatBehavior=\"Forever\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"0\"\r\n                                            Value=\"0\"/>\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:.5\"\r\n                                            Value=\"20\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n\r\n                        <Border x:Name=\"PART_Track\" Background=\"{DynamicResource ShadeBrush}\" BorderBrush=\"{DynamicResource DisabledBackgroundBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"6,6,6,6\"/>\r\n\r\n                        <Border HorizontalAlignment=\"Left\" x:Name=\"PART_Indicator\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{x:Null}\" BorderThickness=\"1\" CornerRadius=\"7,7,7,7\"/>\r\n                        <Grid x:Name=\"IndeterminateRoot\" Visibility=\"Collapsed\">\r\n                            <Rectangle Margin=\"1,1,1,1\"\tx:Name=\"IndeterminateGradientFill\" Opacity=\"0.7\" RadiusX=\"5\" RadiusY=\"5\" StrokeThickness=\"0\">\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush EndPoint=\"0,1\" StartPoint=\"20,1\" MappingMode=\"Absolute\" SpreadMethod=\"Repeat\">\r\n                                        <LinearGradientBrush.Transform>\r\n                                            <TransformGroup>\r\n                                                <TranslateTransform X=\"0\"/>\r\n                                                <SkewTransform AngleX=\"-30\"/>\r\n                                            </TransformGroup>\r\n                                        </LinearGradientBrush.Transform>\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                        <GradientStop Color=\"#00FFFFFF\" Offset=\".25\"/>\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.85\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                                <Rectangle.OpacityMask>\r\n                                    <LinearGradientBrush EndPoint=\"0.004,0.465\" StartPoint=\"0.997,0.422\">\r\n                                        <GradientStop Color=\"#00FFFFFF\"/>\r\n                                        <GradientStop Color=\"#00FFFFFF\" Offset=\"1\"/>\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.486\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.OpacityMask>\r\n                            </Rectangle>\r\n                        </Grid>\r\n                        <Border x:Name=\"DisabledBorder\" Background=\"{DynamicResource DisabledBackgroundBrush}\" BorderBrush=\"{DynamicResource DisabledBackgroundBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"6,6,6,6\" Opacity=\"0\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"DisabledBorder\" Value=\"0.8\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsIndeterminate\" Value=\"True\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource IndeterminateOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Setter Property=\"Visibility\" TargetName=\"IndeterminateRoot\" Value=\"Visible\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type TextBox}\">\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\"/>\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\"/>\r\n        <Setter Property=\"AllowDrop\" Value=\"true\"/>\r\n<Setter Property=\"Template\" Value=\"{DynamicResource TextBoxTemplate}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource ShadeBrush}\"/>\r\n    </Style>\r\n    \r\n     <ControlTemplate x:Key=\"TextBoxTemplate\" TargetType=\"{x:Type TextBox}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Storyboard.TargetName=\"HoverBorder\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\"\r\n\t\t\t\t\t\t\t\t\tValue=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Storyboard.TargetName=\"HoverBorder\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\"\r\n\t\t\t\t\t\t\t\t\tValue=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Border x:Name=\"Border\" Opacity=\"1\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\">\r\n                            <Grid>\r\n                                <Border BorderThickness=\"1\" CornerRadius=\"1,1,1,1\">\r\n                                    <Border.BorderBrush>\r\n                                        <SolidColorBrush Color=\"Transparent\"\r\n                                     x:Name=\"MouseOverColor\"/>\r\n                                    </Border.BorderBrush>\r\n                                    <ScrollViewer Margin=\"0\" x:Name=\"PART_ContentHost\"   Background=\"{TemplateBinding Background}\"/>\r\n                                </Border>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Border x:Name=\"HoverBorder\" Opacity=\"0\" BorderBrush=\"{StaticResource NormalBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"2,2,2,2\"/>\r\n                        <Border x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"False\" Opacity=\"0\" Background=\"#FFFFFFFF\" BorderBrush=\"#A5F7F7F7\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\"/>\r\n                        <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Opacity=\"0\" BorderBrush=\"{StaticResource NormalBrush}\" BorderThickness=\"2.1,2.1,2.1,2.1\" CornerRadius=\"0.2,0.2,0.2,0.2\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\"/>\r\n                                <Condition Property=\"IsFocused\" Value=\"False\"/>\r\n                            </MultiTrigger.Conditions>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n\r\n    <Style TargetType=\"{x:Type PasswordBox}\">\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\"/>\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\"/>\r\n        <Setter Property=\"AllowDrop\" Value=\"true\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type PasswordBox}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Storyboard.TargetName=\"HoverBorder\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\"\r\n\t\t\t\t\t\t\t\t\tValue=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Storyboard.TargetName=\"HoverBorder\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\"\r\n\t\t\t\t\t\t\t\t\tValue=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Border x:Name=\"Border\" Opacity=\"1\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\">\r\n                            <Grid>\r\n                                <Border BorderThickness=\"1\" CornerRadius=\"1,1,1,1\">\r\n                                    <Border.BorderBrush>\r\n                                        <SolidColorBrush Color=\"Transparent\"\r\n                                     x:Name=\"MouseOverColor\"/>\r\n                                    </Border.BorderBrush>\r\n                                    <ScrollViewer Margin=\"0\" x:Name=\"PART_ContentHost\"   Background=\"{TemplateBinding Background}\"/>\r\n                                </Border>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Border x:Name=\"HoverBorder\" Opacity=\"0\" BorderBrush=\"{StaticResource NormalBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"2,2,2,2\"/>\r\n                        <Border x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"False\" Opacity=\"0\" Background=\"#FFFFFFFF\" BorderBrush=\"#A5F7F7F7\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\"/>\r\n                        <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Opacity=\"0\" BorderBrush=\"{StaticResource NormalBrush}\" BorderThickness=\"2.1,2.1,2.1,2.1\" CornerRadius=\"0.2,0.2,0.2,0.2\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\"/>\r\n                                <Condition Property=\"IsFocused\" Value=\"False\"/>\r\n                            </MultiTrigger.Conditions>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource ShadeBrush}\"/>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type RichTextBox}\">\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\"/>\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\"/>\r\n        <Setter Property=\"AllowDrop\" Value=\"true\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type RichTextBox}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Storyboard.TargetName=\"HoverBorder\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\"\r\n\t\t\t\t\t\t\t\t\tValue=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\"\r\n                                                   Storyboard.TargetName=\"HoverBorder\"\r\n                                                   Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\"\r\n\t\t\t\t\t\t\t\t\tValue=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"FocusedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Border x:Name=\"Border\" Opacity=\"1\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\">\r\n                            <Grid>\r\n                                <Border BorderThickness=\"1\" CornerRadius=\"1,1,1,1\">\r\n                                    <Border.BorderBrush>\r\n                                        <SolidColorBrush Color=\"Transparent\"\r\n                                     x:Name=\"MouseOverColor\"/>\r\n                                    </Border.BorderBrush>\r\n                                    <ScrollViewer Margin=\"0\" x:Name=\"PART_ContentHost\"   Background=\"{TemplateBinding Background}\"/>\r\n                                </Border>\r\n                            </Grid>\r\n                        </Border>\r\n                        <Border x:Name=\"HoverBorder\" Opacity=\"0\" BorderBrush=\"{StaticResource NormalBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"2,2,2,2\"/>\r\n                        <Border x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"False\" Opacity=\"0\" Background=\"#FFFFFFFF\" BorderBrush=\"#A5F7F7F7\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\"/>\r\n                        <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"False\" Opacity=\"0\" BorderBrush=\"{StaticResource NormalBrush}\" BorderThickness=\"2.1,2.1,2.1,2.1\" CornerRadius=\"0.2,0.2,0.2,0.2\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\"/>\r\n                                <Condition Property=\"IsFocused\" Value=\"False\"/>\r\n                            </MultiTrigger.Conditions>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource ShadeBrush}\"/>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type Label}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Label}\">\r\n                    <Grid>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" RecognizesAccessKey=\"True\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\"/>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type Menu}\">\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource WindowBackgroundBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"True\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Menu}\">\r\n                    <Grid>\r\n                        <Border Margin=\"1\" x:Name=\"Border\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\"/>\r\n                        <StackPanel Background=\"{TemplateBinding Background}\" IsItemsHost=\"True\" ClipToBounds=\"True\" Orientation=\"Horizontal\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DisabledBorderBrush}\" TargetName=\"Border\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <DropShadowBitmapEffect x:Key=\"PopupDropShadow\" ShadowDepth=\"1.5\" Softness=\"0.15\"/>\r\n\r\n    <Style TargetType=\"{x:Type MenuItem}\">\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\"/>\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type MenuItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HighlightedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HighlightedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Border x:Name=\"Border\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\">\r\n                        <Grid>\r\n\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition MinWidth=\"17\" Width=\"Auto\" SharedSizeGroup=\"MenuItemIconColumnGroup\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"Auto\" SharedSizeGroup=\"MenuItemIGTColumnGroup\"/>\r\n                                <ColumnDefinition Width=\"14\"/>\r\n                            </Grid.ColumnDefinitions>\r\n\r\n                            <Border Grid.Column=\"0\" Grid.ColumnSpan=\"4\" Background=\"{DynamicResource NormalBrush}\" Opacity=\"0\" x:Name=\"border\"/>\r\n\r\n                            <ContentPresenter Margin=\"4,0,6,0\" x:Name=\"Icon\" VerticalAlignment=\"Center\" ContentSource=\"Icon\"/>\r\n\r\n                            <Grid Visibility=\"Hidden\" Margin=\"4,0,6,0\" x:Name=\"GlyphPanel\" VerticalAlignment=\"Center\">\r\n                                <Path x:Name=\"GlyphPanelpath\" VerticalAlignment=\"Center\" Fill=\"{TemplateBinding Foreground}\" Data=\"M0,2 L0,4.8 L2.5,7.4 L7.1,2.8 L7.1,0 L2.5,4.6 z\" FlowDirection=\"LeftToRight\"/>\r\n                            </Grid>\r\n\r\n                            <ContentPresenter Grid.Column=\"1\" Margin=\"{TemplateBinding Padding}\" x:Name=\"HeaderHost\" RecognizesAccessKey=\"True\" ContentSource=\"Header\"/>\r\n\r\n                            <Grid Grid.Column=\"3\" Margin=\"4,0,6,0\" x:Name=\"ArrowPanel\" VerticalAlignment=\"Center\">\r\n                                <Path x:Name=\"ArrowPanelPath\" VerticalAlignment=\"Center\" Fill=\"{TemplateBinding Foreground}\" Data=\"M0,0 L0,8 L4,4 z\"/>\r\n                            </Grid>\r\n\r\n                            <Popup IsOpen=\"{Binding Path=IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Right\" x:Name=\"SubMenuPopup\" Focusable=\"false\" AllowsTransparency=\"true\" PopupAnimation=\"{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}\" VerticalOffset=\"-3\">\r\n                                <Grid x:Name=\"SubMenu\">\r\n                                    <Border x:Name=\"SubMenuBorder\" Background=\"{DynamicResource WindowBackgroundBrush}\" BorderBrush=\"{DynamicResource SolidBorderBrush}\" BorderThickness=\"1\"/>\r\n\r\n                                    <StackPanel IsItemsHost=\"True\" KeyboardNavigation.DirectionalNavigation=\"Cycle\"/>\r\n                                </Grid>\r\n                            </Popup>\r\n\r\n                        </Grid>\r\n                    </Border>\r\n\r\n                    <ControlTemplate.Triggers>\r\n\r\n                        <Trigger Property=\"Role\" Value=\"TopLevelHeader\">\r\n                            <Setter Property=\"Margin\" Value=\"0,1,0,1\"/>\r\n                            <Setter Property=\"Padding\" Value=\"6,3,6,3\"/>\r\n                            <Setter Property=\"Grid.IsSharedSizeScope\" Value=\"true\"/>\r\n                            <Setter Property=\"Placement\" Value=\"Bottom\" TargetName=\"SubMenuPopup\"/>\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ArrowPanel\"/>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"Role\" Value=\"TopLevelItem\">\r\n                            <Setter Property=\"Margin\" Value=\"0,1,0,1\"/>\r\n                            <Setter Property=\"Padding\" Value=\"6,3,6,3\"/>\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ArrowPanel\"/>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"Role\" Value=\"SubmenuHeader\">\r\n                            <Setter Property=\"DockPanel.Dock\" Value=\"Top\"/>\r\n                            <Setter Property=\"Padding\" Value=\"0,2,0,2\"/>\r\n                            <Setter Property=\"Grid.IsSharedSizeScope\" Value=\"true\"/>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"Role\" Value=\"SubmenuItem\">\r\n                            <Setter Property=\"DockPanel.Dock\" Value=\"Top\"/>\r\n                            <Setter Property=\"Padding\" Value=\"0,2,0,2\"/>\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ArrowPanel\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsSuspendingPopupAnimation\" Value=\"true\">\r\n                            <Setter Property=\"PopupAnimation\" Value=\"None\" TargetName=\"SubMenuPopup\"/>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"Icon\" Value=\"{x:Null}\">\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"Icon\"/>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"GlyphPanel\"/>\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"Icon\"/>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"AllowsTransparency\" SourceName=\"SubMenuPopup\" Value=\"true\">\r\n                            <Setter Property=\"Margin\" Value=\"0,0,3,3\" TargetName=\"SubMenu\"/>\r\n                            <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" TargetName=\"SubMenu\"/>\r\n                            <Setter Property=\"BitmapEffect\" Value=\"{DynamicResource PopupDropShadow}\" TargetName=\"SubMenuBorder\"/>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"IsHighlighted\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HighlightedOff}\" x:Name=\"HighlightedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HighlightedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type Separator}\">\r\n        <Setter Property=\"Height\" Value=\"1\"/>\r\n        <Setter Property=\"Margin\" Value=\"0,2,0,2\"/>\r\n        <Setter Property=\"Focusable\" Value=\"false\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Separator}\">\r\n                    <Border BorderBrush=\"{DynamicResource SolidBorderBrush}\" BorderThickness=\"1\"/>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type TabControl}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TabControl}\">\r\n                    <Grid ClipToBounds=\"true\" SnapsToDevicePixels=\"true\" KeyboardNavigation.TabNavigation=\"Local\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition x:Name=\"ColumnDefinition0\" />\r\n                            <ColumnDefinition x:Name=\"ColumnDefinition1\" Width=\"0\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\" x:Name=\"RowDefinition0\" />\r\n                            <RowDefinition Height=\"*\" x:Name=\"RowDefinition1\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Border CornerRadius=\"2,2,0,0\" x:Name=\"border\" Margin=\"3,0,0,-2\">\r\n                            <TabPanel x:Name=\"HeaderPanel\" IsItemsHost=\"true\" Panel.ZIndex=\"1\" KeyboardNavigation.TabIndex=\"1\" RenderTransformOrigin=\"0.5,0.5\" Width=\"Auto\" Height=\"Auto\">\r\n                                <TabPanel.LayoutTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform Angle=\"0\" />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </TabPanel.LayoutTransform>\r\n                                <TabPanel.RenderTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </TabPanel.RenderTransform>\r\n\r\n                            </TabPanel>\r\n                        </Border>\r\n                        <Border Grid.Row=\"1\" x:Name=\"ContentPanel\" Background=\"{DynamicResource ShadeBrushTop}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"1\" CornerRadius=\"0,0,3,3\" KeyboardNavigation.DirectionalNavigation=\"Contained\" KeyboardNavigation.TabNavigation=\"Local\" KeyboardNavigation.TabIndex=\"2\">\r\n                            <ContentPresenter Margin=\"4\" x:Name=\"PART_SelectedContentHost\" ContentSource=\"SelectedContent\"/>\r\n                        </Border>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Bottom\">\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition1\" Value=\"Auto\" />\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"border\" Value=\"1\"/>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"border\" Value=\"0,0,2,2\"/>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"ContentPanel\" Value=\"3,3,0,0\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Left\">\r\n\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"HeaderPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"ContentPanel\" Value=\"1\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition0\" Value=\"Auto\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition1\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition1\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"border\" Value=\"0\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"border\" Value=\"0,0,0,0\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"ContentPanel\" Value=\"0,0,0,0\"/>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"border\" Value=\"0,2,2,0\"/>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"ContentPanel\" Value=\"0,3,3,0\"/>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Right\">\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"HeaderPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition1\" Value=\"Auto\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition1\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"border\" Value=\"1\"/>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"border\" Value=\"0,2,2,0\"/>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"ContentPanel\" Value=\"3,0,0,3\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"border\" Value=\"0,0,0,-2\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style d:IsControlPart=\"True\" TargetType=\"{x:Type TabItem}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TabItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid x:Name=\"grid\">\r\n                        <Grid.LayoutTransform>\r\n                            <TransformGroup>\r\n                                <ScaleTransform ScaleX=\"1\" ScaleY=\"1\"/>\r\n                                <SkewTransform AngleX=\"0\" AngleY=\"0\"/>\r\n                                <RotateTransform Angle=\"0\"/>\r\n                                <TranslateTransform X=\"0\" Y=\"0\"/>\r\n                            </TransformGroup>\r\n                        </Grid.LayoutTransform>\r\n                        <Grid Margin=\"1,0,1,0\">\r\n                            <Border x:Name=\"Border\" Background=\"{DynamicResource SelectedBackgroundBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"3,3,0,0\"/>\r\n                            <Border x:Name=\"SelectedBorder\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"2,2,2,0\" CornerRadius=\"3,3,0,0\" Opacity=\"0\" Margin=\"-2,0,-2,0\"/>\r\n                            <Border x:Name=\"HoverBorder\" Background=\"{DynamicResource HoverBrush}\" BorderBrush=\"{x:Null}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"3,3,0,0\" Opacity=\"0\"/>\r\n                            <Border x:Name=\"SelectedHoverBorder\" Background=\"{DynamicResource HoverBrush}\" BorderBrush=\"{x:Null}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"3,3,0,0\" Opacity=\"0\"/>\r\n                            <ContentPresenter HorizontalAlignment=\"Center\" Margin=\"6,3,6,3\" x:Name=\"ContentSite\" VerticalAlignment=\"Center\" RecognizesAccessKey=\"True\" ContentSource=\"Header\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Left\">\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"grid\">\r\n                                <Setter.Value>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform Angle=\"-90\" />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Right\">\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"grid\">\r\n                                <Setter.Value>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform Angle=\"90\" />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Bottom\">\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"ContentSite\">\r\n                                <Setter.Value>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                        <RotateTransform Angle=\"180\" />\r\n                                        <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                    </TransformGroup>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"grid\">\r\n                                <Setter.Value>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"1\" ScaleY=\"1\"/>\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\"/>\r\n                                        <RotateTransform Angle=\"180\"/>\r\n                                        <TranslateTransform X=\"0\" Y=\"0\"/>\r\n                                    </TransformGroup>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" />\r\n                                <Condition Property=\"Selector.IsSelected\" Value=\"False\" />\r\n                            </MultiTrigger.Conditions>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsSelected\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOff}\" x:Name=\"SelectedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\" x:Name=\"SelectedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Setter Property=\"Panel.ZIndex\" Value=\"100\" />\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" SourceName=\"grid\" />\r\n                                <Condition Property=\"Selector.IsSelected\" Value=\"True\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <Setter Property=\"Opacity\" TargetName=\"SelectedHoverBorder\" Value=\"0.6\"/>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                            <Setter Property=\"Background\" TargetName=\"Border\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                            <Setter Property=\"BorderBrush\" TargetName=\"Border\" Value=\"{DynamicResource DisabledBorderBrush}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Style.Triggers>\r\n        </Style.Triggers>\r\n    </Style>\r\n\r\n    <Style x:Key=\"NuclearSliderThumb\" d:IsControlPart=\"True\" TargetType=\"{x:Type Thumb}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n        <Setter Property=\"Height\" Value=\"14\"/>\r\n        <Setter Property=\"Width\" Value=\"14\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundAnimation\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundAnimation\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Rectangle x:Name=\"Base\" RadiusX=\"6\" RadiusY=\"6\" Fill=\"#FF000000\" StrokeThickness=\"2\"/>\r\n                        <Rectangle x:Name=\"Background\" Fill=\"{TemplateBinding Background}\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" RadiusX=\"4\" RadiusY=\"4\"/>\r\n                        <Rectangle x:Name=\"BackgroundAnimation\" Opacity=\"0\" Fill=\"{StaticResource HoverBrush}\" RadiusX=\"3\" RadiusY=\"3\" Margin=\"2,2,2,2\" StrokeThickness=\"0\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Fill\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Base\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type Slider}\">\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource SelectedBackgroundBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource HorizontalSliderBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Slider}\">\r\n                    <Grid x:Name=\"GridRoot\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\" MinHeight=\"{TemplateBinding MinHeight}\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n\r\n                        <TickBar Visibility=\"Collapsed\" x:Name=\"TopTick\" Height=\"4\" SnapsToDevicePixels=\"True\" Placement=\"Top\" Fill=\"{DynamicResource GlyphBrush}\"/>\r\n                        <Border Grid.Row=\"1\" Margin=\"0\" x:Name=\"Border\" Height=\"4\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\"/>\r\n\r\n                        <Track Grid.Row=\"1\" x:Name=\"PART_Track\">\r\n                            <Track.Thumb>\r\n                                <Thumb Style=\"{DynamicResource NuclearSliderThumb}\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"2,2,2,2\" Width=\"24\" Height=\"13\"/>\r\n                            </Track.Thumb>\r\n                            <Track.IncreaseRepeatButton>\r\n                                <RepeatButton Style=\"{DynamicResource NuclearScrollRepeatButtonStyle}\" Command=\"Slider.IncreaseLarge\"/>\r\n                            </Track.IncreaseRepeatButton>\r\n                            <Track.DecreaseRepeatButton>\r\n                                <RepeatButton Style=\"{DynamicResource NuclearScrollRepeatButtonStyle}\" Command=\"Slider.DecreaseLarge\"/>\r\n                            </Track.DecreaseRepeatButton>\r\n                        </Track>\r\n\r\n                        <TickBar Visibility=\"Collapsed\" Grid.Row=\"2\" x:Name=\"BottomTick\" Height=\"4\" SnapsToDevicePixels=\"True\" Placement=\"Bottom\" Fill=\"{TemplateBinding Foreground}\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"TickPlacement\" Value=\"TopLeft\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"TopTick\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"TickPlacement\" Value=\"BottomRight\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"BottomTick\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"TickPlacement\" Value=\"Both\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"TopTick\"/>\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"BottomTick\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DisabledBorderBrush}\" TargetName=\"Border\"/>\r\n                        </Trigger>\r\n\r\n                        <Trigger Property=\"Orientation\" Value=\"Vertical\">\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"GridRoot\">\r\n                                <Setter.Value>\r\n                                    <RotateTransform Angle=\"-90\"/>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                            <Setter TargetName=\"PART_Track\" Property=\"Orientation\" Value=\"Horizontal\"/>\r\n                        </Trigger>\r\n\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"BorderThickness\" Value=\"1,1,1,1\"/>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type TreeView}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TreeView}\">\r\n                    <Grid>\r\n                        <Border x:Name=\"Border\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{DynamicResource SolidBorderBrush}\" BorderThickness=\"1\" CornerRadius=\"3,3,3,3\">\r\n                            <ScrollViewer   Focusable=\"False\" Padding=\"4\" HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Auto\" CanContentScroll=\"False\">\r\n                                <ItemsPresenter/>\r\n                            </ScrollViewer>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource ShadeBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n    </Style>\r\n\r\n    <Style x:Key=\"NuclearTreeViewItemToggleButton\" d:IsControlPart=\"True\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Focusable\" Value=\"False\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <Grid Width=\"15\" Height=\"13\" Background=\"Transparent\">\r\n                        <Path Visibility=\"Collapsed\" HorizontalAlignment=\"Left\" Margin=\"1,1,1,1\" x:Name=\"IsExpandedPath\" VerticalAlignment=\"Center\" Data=\"M 0 4 L 8 4 L 4 8 Z\">\r\n                            <Path.Fill>\r\n                                <SolidColorBrush Color=\"{DynamicResource BlackColor}\"/>\r\n                            </Path.Fill>\r\n                        </Path>\r\n                        <Path HorizontalAlignment=\"Left\" Margin=\"1,1,1,1\" x:Name=\"ExpandPath\" VerticalAlignment=\"Center\" Data=\"M 4 0 L 8 4 L 4 8 Z\">\r\n                            <Path.Fill>\r\n                                <SolidColorBrush Color=\"{DynamicResource BlackColor}\"/>\r\n                            </Path.Fill>\r\n                        </Path>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsChecked\" Value=\"True\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"IsExpandedPath\"/>\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ExpandPath\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style d:IsControlPart=\"True\" TargetType=\"{x:Type TreeViewItem}\">\r\n        <Style.Triggers>\r\n            <Trigger Property=\"IsSelected\" Value=\"True\">\r\n                <Setter Property=\"Foreground\">\r\n                    <Setter.Value>\r\n                        <SolidColorBrush Color=\"{DynamicResource WhiteColor}\"/>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Trigger>\r\n        </Style.Triggers>\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\"/>\r\n        <Setter Property=\"Padding\" Value=\"1,0,0,0\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TreeViewItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"SelectedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder2\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.5\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder2\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedHoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedHoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedHoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedHoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition MinWidth=\"19\" Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition/>\r\n                        </Grid.RowDefinitions>\r\n                        <ToggleButton x:Name=\"Expander\" Style=\"{DynamicResource NuclearTreeViewItemToggleButton}\" IsChecked=\"{Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}\" ClickMode=\"Press\"/>\r\n                        <Border Grid.Column=\"1\" x:Name=\"Selection_Border\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\">\r\n                            <Grid>\r\n                                <Border Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"2,2,2,2\" Opacity=\"0\" x:Name=\"SelectedBorder\"/>\r\n                                <Border x:Name=\"HoverBorder1\" Opacity=\"0\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"2,2,2,2\"/>\r\n                                <Border x:Name=\"HoverBorder2\" Opacity=\"0\" Background=\"{DynamicResource HoverBrush}\" BorderBrush=\"{x:Null}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"2,2,2,2\"/>\r\n                                <ContentPresenter HorizontalAlignment=\"Stretch\" x:Name=\"PART_Header\" ContentSource=\"Header\" d:LayoutOverrides=\"Width\" Margin=\"3,2,3,2\"/>\r\n                                <Border x:Name=\"SelectedHoverBorder\" Opacity=\"0\" Background=\"{DynamicResource HoverBrush}\" BorderBrush=\"{x:Null}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"2,2,2,2\"/>\r\n                            </Grid>\r\n                        </Border>\r\n                        <ItemsPresenter Grid.Column=\"1\" Grid.ColumnSpan=\"2\" Grid.Row=\"1\" x:Name=\"ItemsHost\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedHoverOff}\" x:Name=\"SelectedHoverOff_BeginStoryboard\"/>\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedHoverOn}\" x:Name=\"SelectedHoverOn_BeginStoryboard\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsSelected\" Value=\"True\"/>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\"/>\r\n                            </MultiTrigger.Conditions>\r\n                        </MultiTrigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsSelected\" Value=\"False\"/>\r\n                                <Condition Property=\"IsMouseOver\" SourceName=\"Selection_Border\" Value=\"True\"/>\r\n                            </MultiTrigger.Conditions>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"HoverOff_BeginStoryboard\" Storyboard=\"{StaticResource HoverOff}\"/>\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard x:Name=\"HoverOn_BeginStoryboard\" Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsExpanded\" Value=\"false\">\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ItemsHost\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"HasItems\" Value=\"false\">\r\n                            <Setter Property=\"Visibility\" Value=\"Hidden\" TargetName=\"Expander\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsSelected\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard x:Name=\"SelectedOff_BeginStoryboard\" Storyboard=\"{StaticResource SelectedOff}\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}\"/>\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsSelected\" Value=\"true\"/>\r\n                                <Condition Property=\"IsSelectionActive\" Value=\"false\"/>\r\n                            </MultiTrigger.Conditions>\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource {x:Static SystemColors.ControlBrushKey}}\" TargetName=\"Selection_Border\"/>\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}\"/>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Static ToolBar.ButtonStyleKey}\" TargetType=\"{x:Type Button}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource NuclearButtonFocusVisual}\"/>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\" Value=\"{DynamicResource ButtonTemplate}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n\t\t\t\t\t\t<Setter Property=\"FontSize\" Value=\"10\"/>\r\n\t\t\t\t<Setter Property=\"MinHeight\" Value=\"18\"/>\r\n\t\t\t\t<Setter Property=\"MinWidth\" Value=\"50\"/>\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Static ToolBar.RadioButtonStyleKey}\" TargetType=\"{x:Type RadioButton}\">\r\n\t\t\t<Setter Property=\"FontSize\" Value=\"10\"/>\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource RadioButtonFocusVisual}\"/>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\" Value=\"{DynamicResource RadioButtonTemplate}\" />\r\n        <Style.Triggers>\r\n            <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n            </Trigger>\r\n        </Style.Triggers>\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Static ToolBar.CheckBoxStyleKey}\" TargetType=\"{x:Type CheckBox}\">\r\n\t\t\t<Setter Property=\"FontSize\" Value=\"10\"/>\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource CheckBoxFocusVisual}\"/>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\" Value=\"{DynamicResource CheckBoxTemplate}\" />\r\n        <Style.Triggers>\r\n            <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n            </Trigger>\r\n        </Style.Triggers>\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Static ToolBar.ComboBoxStyleKey}\" TargetType=\"{x:Type ComboBox}\">\r\n\t\t\t<Setter Property=\"FontSize\" Value=\"10\"/>\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n        \r\n<Setter Property=\"Template\" Value=\"{DynamicResource ComboBoxTemplate}\" />\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Static ToolBar.TextBoxStyleKey}\" TargetType=\"{x:Type TextBox}\">\r\n\t\t\t<Setter Property=\"FontSize\" Value=\"10\"/>\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\"/>\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\"/>\r\n        <Setter Property=\"AllowDrop\" Value=\"true\"/>\r\n        <Setter Property=\"Template\" Value=\"{DynamicResource TextBoxTemplate}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource ShadeBrush}\"/>\r\n    </Style>\r\n\r\n    <LinearGradientBrush x:Key=\"ToolBarHorizontalBackground\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#FFFFFF\" Offset=\"0\"/>\r\n        <GradientStop Color=\"#FFFBFF\" Offset=\"0.5\"/>\r\n        <GradientStop Color=\"#F7F7F7\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"ToolBarToggleButtonHorizontalBackground\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#ECECEC\" Offset=\"0\"/>\r\n        <GradientStop Color=\"#DDDDDD\" Offset=\"0.5\"/>\r\n        <GradientStop Color=\"#A0A0A0\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"ToolBarButtonHover\" Color=\"{StaticResource NormalBrushGradient1}\" />\r\n    <SolidColorBrush x:Key=\"ToolBarGripper\" Color=\"#C6C3C6\"/>\r\n    <Style x:Key=\"ToolBarHorizontalOverflowButtonStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource ToolBarToggleButtonHorizontalBackground}\"/>\r\n        <Setter Property=\"MinHeight\" Value=\"0\"/>\r\n        <Setter Property=\"MinWidth\" Value=\"0\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <Border SnapsToDevicePixels=\"true\" x:Name=\"Bd\" CornerRadius=\"0,0,0,0\" Background=\"{DynamicResource SelectedBackgroundBrush}\">\r\n                        <Canvas SnapsToDevicePixels=\"true\" HorizontalAlignment=\"Right\" Margin=\"7,2,2,2\" VerticalAlignment=\"Bottom\" Width=\"6\" Height=\"7\">\r\n                            <Path Stroke=\"White\" Data=\"M 1 1.5 L 6 1.5\"/>\r\n                            <Path Stroke=\"{TemplateBinding Foreground}\" Data=\"M 0 0.5 L 5 0.5\"/>\r\n                            <Path Fill=\"White\" Data=\"M 0.5 4 L 6.5 4 L 3.5 7 Z\"/>\r\n                            <Path Fill=\"{TemplateBinding Foreground}\" Data=\"M -0.5 3 L 5.5 3 L 2.5 6 Z\"/>\r\n                        </Canvas>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Setter Property=\"Background\" TargetName=\"Bd\" Value=\"{DynamicResource MouseOverBrush}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                            <Setter Property=\"Background\" TargetName=\"Bd\" Value=\"{StaticResource ToolBarButtonHover}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{StaticResource ToolBarGripper}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <SolidColorBrush x:Key=\"ToolBarSubMenuBackground\" Color=\"#FFFDFDFD\"/>\r\n    <SolidColorBrush x:Key=\"ToolBarMenuBorder\" Color=\"#FFFFFFFF\"/>\r\n    <Style x:Key=\"ToolBarThumbStyle\" TargetType=\"{x:Type Thumb}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <Border SnapsToDevicePixels=\"True\" Background=\"Transparent\" Padding=\"{TemplateBinding Padding}\" CornerRadius=\"0,0,0,0\">\r\n                        <Rectangle>\r\n                            <Rectangle.Fill>\r\n                                <DrawingBrush TileMode=\"Tile\" Viewbox=\"0,0,4,4\" ViewboxUnits=\"Absolute\" Viewport=\"0,0,4,4\" ViewportUnits=\"Absolute\">\r\n                                    <DrawingBrush.Drawing>\r\n                                        <DrawingGroup>\r\n                                            <GeometryDrawing Brush=\"White\" Geometry=\"M 1 1 L 1 3 L 3 3 L 3 1 z\"/>\r\n                                            <GeometryDrawing Brush=\"{StaticResource ToolBarGripper}\" Geometry=\"M 0 0 L 0 2 L 2 2 L 2 0 z\"/>\r\n                                        </DrawingGroup>\r\n                                    </DrawingBrush.Drawing>\r\n                                </DrawingBrush>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Setter Property=\"Cursor\" Value=\"SizeAll\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <LinearGradientBrush x:Key=\"ToolBarToggleButtonVerticalBackground\" EndPoint=\"1,0\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#ECECEC\" Offset=\"0\"/>\r\n        <GradientStop Color=\"#DDDDDD\" Offset=\"0.5\"/>\r\n        <GradientStop Color=\"#A0A0A0\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <Style x:Key=\"ToolBarVerticalOverflowButtonStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource ToolBarToggleButtonVerticalBackground}\"/>\r\n        <Setter Property=\"MinHeight\" Value=\"0\"/>\r\n        <Setter Property=\"MinWidth\" Value=\"0\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <Border SnapsToDevicePixels=\"true\" x:Name=\"Bd\" Background=\"{TemplateBinding Background}\" CornerRadius=\"0,0,3,3\">\r\n                        <Canvas SnapsToDevicePixels=\"true\" HorizontalAlignment=\"Right\" Margin=\"2,7,2,2\" VerticalAlignment=\"Bottom\" Width=\"7\" Height=\"6\">\r\n                            <Path Stroke=\"White\" Data=\"M 1.5 1 L 1.5 6\"/>\r\n                            <Path Stroke=\"{TemplateBinding Foreground}\" Data=\"M 0.5 0 L 0.5 5\"/>\r\n                            <Path Fill=\"White\" Data=\"M 3.5 0.5 L 7 3.5 L 4 6.5 Z\"/>\r\n                            <Path Fill=\"{TemplateBinding Foreground}\" Data=\"M 3 -0.5 L 6 2.5 L 3 5.5 Z\"/>\r\n                        </Canvas>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Setter Property=\"Background\" TargetName=\"Bd\" Value=\"{StaticResource ToolBarButtonHover}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                            <Setter Property=\"Background\" TargetName=\"Bd\" Value=\"{StaticResource ToolBarButtonHover}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{StaticResource ToolBarGripper}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <LinearGradientBrush x:Key=\"ToolBarVerticalBackground\" EndPoint=\"1,0\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#FFFFFF\" Offset=\"0\"/>\r\n        <GradientStop Color=\"#FFFBFF\" Offset=\"0.5\"/>\r\n        <GradientStop Color=\"#F7F7F7\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <Style TargetType=\"{x:Type ToolBar}\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource ToolBarHorizontalBackground}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToolBar}\">\r\n                    <Grid SnapsToDevicePixels=\"true\" Margin=\"3,1,1,1\" x:Name=\"Grid\">\r\n                        <Grid HorizontalAlignment=\"Right\" x:Name=\"OverflowGrid\">\r\n                            <ToggleButton IsEnabled=\"{TemplateBinding HasOverflowItems}\" FocusVisualStyle=\"{x:Null}\" x:Name=\"OverflowButton\" Style=\"{StaticResource ToolBarHorizontalOverflowButtonStyle}\" ClickMode=\"Press\" IsChecked=\"{Binding Path=IsOverflowOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\"/>\r\n                            <Popup Focusable=\"false\" AllowsTransparency=\"true\" IsOpen=\"{Binding Path=IsOverflowOpen, RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Bottom\" PopupAnimation=\"{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}\" StaysOpen=\"False\" x:Name=\"OverflowPopup\">\r\n                                <Border x:Name=\"Shdw\">\r\n                                    <Border BorderThickness=\"1,1,1,1\" Background=\"{DynamicResource ShadeBrush}\" BorderBrush=\"{DynamicResource LightBrush}\">\r\n                                        <ToolBarOverflowPanel Focusable=\"true\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" FocusVisualStyle=\"{x:Null}\" Margin=\"2\" x:Name=\"PART_ToolBarOverflowPanel\" WrapWidth=\"200\" KeyboardNavigation.DirectionalNavigation=\"Cycle\" KeyboardNavigation.TabNavigation=\"Cycle\"/>\r\n                                    </Border>\r\n                                </Border>\r\n                            </Popup>\r\n                        </Grid>\r\n                        <Border Margin=\"0,0,11,0\" x:Name=\"MainPanelBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"0,0,0,0\" Padding=\"{TemplateBinding Padding}\" Background=\"{DynamicResource SelectedBackgroundBrush}\">\r\n                            <Grid>\r\n\r\n                                <DockPanel KeyboardNavigation.TabIndex=\"1\" KeyboardNavigation.TabNavigation=\"Local\">\r\n                                    <Thumb Padding=\"6,5,1,6\" Margin=\"-3,-1,0,0\" x:Name=\"ToolBarThumb\" Style=\"{StaticResource ToolBarThumbStyle}\" Width=\"10\"/>\r\n                                    <ContentPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" HorizontalAlignment=\"Center\" Margin=\"4,0,4,0\" x:Name=\"ToolBarHeader\" VerticalAlignment=\"Center\" ContentSource=\"Header\"/>\r\n                                    <ToolBarPanel SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Margin=\"0,1,2,2\" x:Name=\"PART_ToolBarPanel\" IsItemsHost=\"true\" Background=\"{DynamicResource SelectedBackgroundBrush}\"/>\r\n                                </DockPanel>\r\n                            </Grid>\r\n                        </Border>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsOverflowOpen\" Value=\"true\">\r\n                            <Setter Property=\"IsEnabled\" TargetName=\"ToolBarThumb\" Value=\"false\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"Header\" Value=\"{x:Null}\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"ToolBarHeader\" Value=\"Collapsed\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"ToolBarTray.IsLocked\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"ToolBarThumb\" Value=\"Collapsed\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"HasDropShadow\" SourceName=\"OverflowPopup\" Value=\"true\">\r\n                            <Setter Property=\"Margin\" TargetName=\"Shdw\" Value=\"0,0,5,5\"/>\r\n                            <Setter Property=\"SnapsToDevicePixels\" TargetName=\"Shdw\" Value=\"true\"/>\r\n                            <Setter Property=\"Background\" TargetName=\"Shdw\" Value=\"#71000000\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"Orientation\" Value=\"Vertical\">\r\n                            <Setter Property=\"Margin\" TargetName=\"Grid\" Value=\"1,3,1,1\"/>\r\n                            <Setter Property=\"Style\" TargetName=\"OverflowButton\" Value=\"{StaticResource ToolBarVerticalOverflowButtonStyle}\"/>\r\n                            <Setter Property=\"Height\" TargetName=\"ToolBarThumb\" Value=\"10\"/>\r\n                            <Setter Property=\"Width\" TargetName=\"ToolBarThumb\" Value=\"Auto\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"ToolBarThumb\" Value=\"-1,-3,0,0\"/>\r\n                            <Setter Property=\"Padding\" TargetName=\"ToolBarThumb\" Value=\"5,6,6,1\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"ToolBarHeader\" Value=\"0,0,0,4\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"PART_ToolBarPanel\" Value=\"1,0,2,2\"/>\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ToolBarThumb\" Value=\"Top\"/>\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ToolBarHeader\" Value=\"Top\"/>\r\n                            <Setter Property=\"HorizontalAlignment\" TargetName=\"OverflowGrid\" Value=\"Stretch\"/>\r\n                            <Setter Property=\"VerticalAlignment\" TargetName=\"OverflowGrid\" Value=\"Bottom\"/>\r\n                            <Setter Property=\"Placement\" TargetName=\"OverflowPopup\" Value=\"Right\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"MainPanelBorder\" Value=\"0,0,0,11\"/>\r\n                            <Setter Property=\"Background\" Value=\"{StaticResource ToolBarVerticalBackground}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\"/>\r\n    </Style>\r\n\r\n    <BorderGapMaskConverter x:Key=\"BorderGapMaskConverter\" />\r\n    <Style TargetType=\"{x:Type GroupBox}\">\r\n        <Setter Property=\"BorderBrush\" Value=\"#D5DFE5\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type GroupBox}\">\r\n                    <Grid SnapsToDevicePixels=\"true\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"6\" />\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"*\" />\r\n                            <ColumnDefinition Width=\"6\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\" />\r\n                            <RowDefinition Height=\"Auto\" />\r\n                            <RowDefinition Height=\"*\" />\r\n                            <RowDefinition Height=\"6\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Border Grid.ColumnSpan=\"4\" Grid.RowSpan=\"4\" Background=\"{DynamicResource LightBrush}\" CornerRadius=\"4,4,4,4\" BorderThickness=\"1,1,1,1\" />\r\n                        <Border Grid.ColumnSpan=\"4\" Grid.Row=\"1\" Grid.RowSpan=\"3\" BorderThickness=\"1,1,1,1\" CornerRadius=\"4\" BorderBrush=\"{DynamicResource NormalBorderBrush}\">\r\n                            <Border.OpacityMask>\r\n                                <MultiBinding Converter=\"{StaticResource BorderGapMaskConverter}\" ConverterParameter=\"7\">\r\n                                    <Binding Path=\"ActualWidth\" ElementName=\"Header\" />\r\n                                    <Binding Path=\"ActualWidth\" RelativeSource=\"{RelativeSource Self}\" />\r\n                                    <Binding Path=\"ActualHeight\" RelativeSource=\"{RelativeSource Self}\" />\r\n                                </MultiBinding>\r\n                            </Border.OpacityMask>\r\n                            <Border BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\">\r\n                                <Border.BorderBrush>\r\n                                    <SolidColorBrush Color=\"{DynamicResource MainColor}\" />\r\n                                </Border.BorderBrush>\r\n                                <Border BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\">\r\n                                    <Border.BorderBrush>\r\n                                        <SolidColorBrush Color=\"{DynamicResource MainColor}\" />\r\n                                    </Border.BorderBrush>\r\n                                </Border>\r\n                            </Border>\r\n                        </Border>\r\n                        <Border Grid.Column=\"0\" Grid.ColumnSpan=\"4\" Grid.Row=\"1\" Grid.RowSpan=\"3\" Background=\"{TemplateBinding Background}\" BorderBrush=\"Transparent\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"4\" />\r\n                        <Border Grid.ColumnSpan=\"4\" Grid.RowSpan=\"2\" Background=\"{DynamicResource NormalBrush}\" BorderThickness=\"1,1,1,0\" CornerRadius=\"2,2,0,0\" x:Name=\"Main\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" />\r\n                        <Rectangle Opacity=\"1\" Stroke=\"{x:Null}\" RadiusX=\"3\" RadiusY=\"3\" VerticalAlignment=\"Stretch\" Height=\"Auto\" x:Name=\"Shine\" Grid.ColumnSpan=\"4\" Grid.RowSpan=\"2\" Margin=\"1,1,1,1\">\r\n                            <Rectangle.Fill>\r\n                                <LinearGradientBrush EndPoint=\"0.5,0.971\" StartPoint=\"0.5,0.042\">\r\n                                    <GradientStop Color=\"#26FFFFFF\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"1\" />\r\n                                    <GradientStop Color=\"#26FFFFFF\" Offset=\"0.467\" />\r\n                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"0.475\" />\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n\r\n                        <Border x:Name=\"Header\" Grid.Column=\"1\" Grid.Row=\"0\" Grid.RowSpan=\"2\" Padding=\"3,1,3,0\">\r\n                            <ContentPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" ContentSource=\"Header\" RecognizesAccessKey=\"True\" Margin=\"0,4,0,4\" />\r\n                        </Border>\r\n\r\n                        <ContentPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Margin=\"{TemplateBinding Padding}\" Grid.Column=\"1\" Grid.ColumnSpan=\"2\" Grid.Row=\"2\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\">\r\n            <Setter.Value>\r\n                <SolidColorBrush Color=\"{DynamicResource WhiteColor}\" />\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <SolidColorBrush x:Key=\"ListBorder\" Color=\"#828790\" />\r\n    <Style x:Key=\"{x:Static GridView.GridViewScrollViewerStyleKey}\" TargetType=\"{x:Type ScrollViewer}\">\r\n        <Setter Property=\"Focusable\" Value=\"false\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ScrollViewer}\">\r\n                    <Grid SnapsToDevicePixels=\"true\" Background=\"{TemplateBinding Background}\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\" />\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"*\" />\r\n                            <RowDefinition Height=\"Auto\" />\r\n                        </Grid.RowDefinitions>\r\n                        <DockPanel Margin=\"{TemplateBinding Padding}\">\r\n                            <ScrollViewer Focusable=\"false\" DockPanel.Dock=\"Top\" HorizontalScrollBarVisibility=\"Hidden\" VerticalScrollBarVisibility=\"Hidden\">\r\n                                <GridViewHeaderRowPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Margin=\"2,0,2,0\" AllowsColumnReorder=\"{Binding Path=TemplatedParent.View.AllowsColumnReorder, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderContainerStyle=\"{Binding Path=TemplatedParent.View.ColumnHeaderContainerStyle, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderContextMenu=\"{Binding Path=TemplatedParent.View.ColumnHeaderContextMenu, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderTemplate=\"{Binding Path=TemplatedParent.View.ColumnHeaderTemplate, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderTemplateSelector=\"{Binding Path=TemplatedParent.View.ColumnHeaderTemplateSelector, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderToolTip=\"{Binding Path=TemplatedParent.View.ColumnHeaderToolTip, RelativeSource={RelativeSource TemplatedParent}}\" Columns=\"{Binding Path=TemplatedParent.View.Columns, RelativeSource={RelativeSource TemplatedParent}}\" />\r\n\r\n                            </ScrollViewer>\r\n                            <ScrollContentPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" x:Name=\"PART_ScrollContentPresenter\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" CanContentScroll=\"{TemplateBinding CanContentScroll}\" KeyboardNavigation.DirectionalNavigation=\"Local\" />\r\n                        </DockPanel>\r\n                        <ScrollBar Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Cursor=\"Arrow\" x:Name=\"PART_HorizontalScrollBar\" Grid.Row=\"1\" Orientation=\"Horizontal\" ViewportSize=\"{TemplateBinding ViewportWidth}\" Maximum=\"{TemplateBinding ScrollableWidth}\" Minimum=\"0.0\" Value=\"{Binding Path=HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" />\r\n                        <ScrollBar Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Cursor=\"Arrow\" x:Name=\"PART_VerticalScrollBar\" Grid.Column=\"1\" Orientation=\"Vertical\" ViewportSize=\"{TemplateBinding ViewportHeight}\" Maximum=\"{TemplateBinding ScrollableHeight}\" Minimum=\"0.0\" Value=\"{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" />\r\n                        <DockPanel Grid.Column=\"1\" Grid.Row=\"1\" Background=\"{Binding Path=Background, ElementName=PART_VerticalScrollBar}\" LastChildFill=\"false\">\r\n                            <Rectangle Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Width=\"1\" Fill=\"White\" DockPanel.Dock=\"Left\" />\r\n                            <Rectangle Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Height=\"1\" Fill=\"White\" DockPanel.Dock=\"Top\" />\r\n                        </DockPanel>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style TargetType=\"{x:Type ListView}\">\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource ShadeBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Foreground\" Value=\"#FF042271\" />\r\n        <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\" />\r\n        <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\" />\r\n        <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"true\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListView}\">\r\n                    <Border x:Name=\"Bd\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2,2,2,2\" BorderBrush=\"{DynamicResource DefaultedBorderBrush}\" Background=\"{DynamicResource LightBrush}\">\r\n\r\n                        <ScrollViewer Padding=\"{TemplateBinding Padding}\" Style=\"{DynamicResource {x:Static GridView.GridViewScrollViewerStyleKey}}\">\r\n                            <ItemsPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" />\r\n                        </ScrollViewer>\r\n                    </Border>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                            <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Background\" TargetName=\"Bd\" Value=\"{DynamicResource {x:Static SystemColors.ControlBrushKey}}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"ListViewItemFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Rectangle Stroke=\"#8E6EA6F5\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" />\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type ListViewItem}\">\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{StaticResource ListViewItemFocusVisual}\" />\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Margin\" Value=\"0,0,0,1\" />\r\n        <Setter Property=\"Padding\" Value=\"5,2,5,2\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListViewItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedHoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedHoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"SelectedHoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedHoverRectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Border SnapsToDevicePixels=\"true\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\" x:Name=\"border\">\r\n\r\n                        <Grid Margin=\"2,0,2,0\">\r\n                            <Rectangle x:Name=\"Background\"\r\n\t\t\t\t\t\t\tIsHitTestVisible=\"False\"\r\n\t\t\t\t\t\t\tFill=\"{StaticResource SelectedBackgroundBrush}\"\r\n\t\t\t\t\t\t\tRadiusX=\"0\"/>\r\n                            <Rectangle x:Name=\"SelectedRectangle\"\r\n\t\t\t\t\t\t\tIsHitTestVisible=\"False\"\r\n\t\t\t\t\t\t\tOpacity=\"0\"\r\n\t\t\t\t\t\t\tFill=\"{StaticResource NormalBrush}\"\r\n\t\t\t\t\t\t\tRadiusX=\"0\"/>\r\n                            <GridViewRowPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" VerticalAlignment=\"Stretch\" Margin=\"0,2,0,2\" />\r\n                            <Rectangle x:Name=\"HoverRectangle\"\r\n                            \tIsHitTestVisible=\"False\"\r\n                            \tFill=\"{StaticResource HoverBrush}\"\r\n                            \tRadiusX=\"0\"\r\n                            \tOpacity=\"0\"/>\r\n                            <Rectangle x:Name=\"SelectedHoverRectangle\"\r\n                            \tIsHitTestVisible=\"False\"\r\n                            \tFill=\"{StaticResource HoverBrush}\"\r\n                            \tRadiusX=\"0\"\r\n                            \tOpacity=\"0\"/>\r\n                        </Grid>\r\n\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsSelected\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOff}\" x:Name=\"SelectedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\" x:Name=\"SelectedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n                        </Trigger>\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" x:Name=\"HoverOn_BeginStoryboard\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" />\r\n                                <Condition Property=\"Selector.IsSelected\" Value=\"False\" />\r\n                            </MultiTrigger.Conditions>\r\n\r\n                        </MultiTrigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedHoverOff}\" x:Name=\"SelectedHoverOff_BeginStoryboard\"/>\r\n                            </MultiTrigger.ExitActions>\r\n                            <MultiTrigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource SelectedHoverOn}\" x:Name=\"SelectedHoverOn_BeginStoryboard\"/>\r\n                            </MultiTrigger.EnterActions>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"Selector.IsSelected\" Value=\"True\" />\r\n                                <Condition Property=\"IsMouseOver\" Value=\"True\" />\r\n                            </MultiTrigger.Conditions>\r\n\r\n                        </MultiTrigger>\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsSelected\" Value=\"true\" />\r\n                                <Condition Property=\"Selector.IsSelectionActive\" Value=\"false\" />\r\n                            </MultiTrigger.Conditions>\r\n\r\n\r\n                        </MultiTrigger>\r\n\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n    </Style>\r\n\r\n\r\n    <Style x:Key=\"GridViewColumnHeaderGripper\" TargetType=\"{x:Type Thumb}\">\r\n        <Setter Property=\"Canvas.Right\" Value=\"-8.5\" />\r\n        <Setter Property=\"Width\" Value=\"18\" />\r\n        <Setter Property=\"Height\" Value=\"{Binding Path=ActualHeight, RelativeSource={RelativeSource TemplatedParent}}\" />\r\n        <Setter Property=\"Padding\" Value=\"0,3,0,4\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource LightBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <Border Padding=\"{TemplateBinding Padding}\" Background=\"#00FFFFFF\">\r\n                        <Rectangle HorizontalAlignment=\"Center\" Width=\"0.5\">\r\n                            <Rectangle.Fill>\r\n                                <SolidColorBrush Color=\"{DynamicResource WhiteColor}\" />\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"{x:Type GridViewColumnHeader}\" TargetType=\"{x:Type GridViewColumnHeader}\">\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource LightBrush}\" />\r\n        <Setter Property=\"Padding\" Value=\"2,0,2,0\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type GridViewColumnHeader}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Main\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.65\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"PressedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Main\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid Margin=\"0,1,0,1\">\r\n                        <Grid>\r\n\r\n                            <Border x:Name=\"Main\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\" Background=\"{DynamicResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBorderBrush}\" CornerRadius=\"0,0,0,0\" />\r\n                            <Border x:Name=\"HoverBorder\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\" Background=\"{DynamicResource HoverBrush}\" BorderBrush=\"{x:Null}\" CornerRadius=\"0,0,0,0\" Opacity=\"0\" />\r\n\r\n                            <Border BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\">\r\n                                <Border.BorderBrush>\r\n                                    <SolidColorBrush Color=\"{DynamicResource WhiteColor}\"/>\r\n                                </Border.BorderBrush>\r\n                                <ContentPresenter VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" RecognizesAccessKey=\"True\" Margin=\"2,2,2,2\" />\r\n                            </Border>\r\n                        </Grid>\r\n                        <Canvas>\r\n                            <Thumb x:Name=\"PART_HeaderGripper\" Style=\"{StaticResource GridViewColumnHeaderGripper}\" HorizontalAlignment=\"Stretch\" />\r\n                        </Canvas>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"Height\" Value=\"Auto\">\r\n                            <Setter Property=\"MinHeight\" Value=\"20\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"Role\" Value=\"Padding\">\r\n                            <Setter TargetName=\"PART_HeaderGripper\" Property=\"Visibility\" Value=\"Collapsed\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"Role\" Value=\"Floating\">\r\n                            <Setter TargetName=\"PART_HeaderGripper\" Property=\"Visibility\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Background\" Value=\"Yellow\" />\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource MouseOverBrush}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"ButtonFocusVisual\">\r\n        <Setter Property=\"Control.Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate>\r\n                    <Rectangle SnapsToDevicePixels=\"true\" Margin=\"2\" Stroke=\"Black\" StrokeDashArray=\"1 2\" StrokeThickness=\"1\" />\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <LinearGradientBrush x:Key=\"ButtonNormalBackground\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#F3F3F3\" Offset=\"0\" />\r\n        <GradientStop Color=\"#EBEBEB\" Offset=\"0.5\" />\r\n        <GradientStop Color=\"#DDDDDD\" Offset=\"0.5\" />\r\n        <GradientStop Color=\"#CDCDCD\" Offset=\"1\" />\r\n    </LinearGradientBrush>\r\n    <SolidColorBrush x:Key=\"ButtonNormalBorder\" Color=\"#FF707070\" />\r\n\r\n    <Style TargetType=\"{x:Type ToggleButton}\">\r\n        <Style.Triggers>\r\n            <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n            </Trigger>\r\n        </Style.Triggers>\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{StaticResource ButtonFocusVisual}\" />\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource SelectedBackgroundBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"2,2,2,2\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"Padding\" Value=\"1\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"HoverOn\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundAnimation\" Storyboard.TargetProperty=\"Opacity\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"HoverOff\">\r\n                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundAnimation\" Storyboard.TargetProperty=\"Opacity\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOn\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"CheckedOff\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckedBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid>\r\n\r\n                        <Border x:Name=\"Background\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"4,4,4,4\" Opacity=\"0.9\"/>\r\n                        <Border x:Name=\"CheckedBorder\" Opacity=\"0\" Background=\"{StaticResource NormalBrush}\" BorderBrush=\"{DynamicResource NormalBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"4\"/>\r\n                        <Border x:Name=\"BackgroundAnimation\" Opacity=\"0\" Background=\"{StaticResource HoverBrush}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"4\"/>\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" RecognizesAccessKey=\"True\" />\n                    </Grid>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsPressed\" Value=\"True\">\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n\r\n                                <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" x:Name=\"HoverOn_BeginStoryboard\"/>\r\n\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\" />\r\n                        <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOff}\" x:Name=\"CheckedOff_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource CheckedOn}\" x:Name=\"CheckedOn_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n\r\n\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Background\" TargetName=\"Background\" Value=\"{DynamicResource DisabledBackgroundBrush}\"/>\r\n                            <Setter Property=\"BorderBrush\" TargetName=\"Background\" Value=\"{DynamicResource DisabledBorderBrush}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n</ResourceDictionary>\r\n"
  },
  {
    "path": "WpfToolkit/WPF.Themes/SunnyOrange/Theme.xaml",
    "content": "﻿<ResourceDictionary\r\n\txmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" \r\n\txmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\" \r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" mc:Ignorable=\"d\">\r\n\r\n    <SolidColorBrush x:Key=\"Normal_Background\" Color=\"#FFF46B00\"/>\r\n    <RadialGradientBrush x:Key=\"RadialBackGround_Orange\" GradientOrigin=\"0.5,0.5\">\r\n        <GradientStop Color=\"#FFF46B00\" Offset=\"1\"/>\r\n        <GradientStop Color=\"#FFF9FE30\" Offset=\"0\"/>\r\n    </RadialGradientBrush>\r\n    <LinearGradientBrush x:Key=\"Stroke_Gradient\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FF6E6E6E\" Offset=\"0\"/>\r\n        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.496\"/>\r\n        <GradientStop Color=\"#FF6E6E6E\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"Stroke_Gradient_Horizontal\" EndPoint=\"1,0\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#FF454545\" Offset=\"0\"/>\r\n        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.5\"/>\r\n        <GradientStop Color=\"#FF3B3B3B\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"Overlay_Fade_Gradient\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#4CFFFFFF\" Offset=\"1\"/>\r\n        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"LinearGradient_Orange\" EndPoint=\"1,0\" StartPoint=\"0,0\" >\r\n        <GradientStop Color=\"#FFF9FF09\" Offset=\"0\"/>\r\n        <GradientStop Color=\"#FFF7DE25\" Offset=\"0.959\"/>\r\n        <GradientStop Color=\"#FFFF7000\" Offset=\"0.033\"/>\r\n        <GradientStop Color=\"#FFFF7200\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"LinearGradient_Orange_H\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#FFF9FF09\" Offset=\"0\"/>\r\n        <GradientStop Color=\"#FFF7DE25\" Offset=\"0.959\"/>\r\n        <GradientStop Color=\"#FFFF7000\" Offset=\"0.033\"/>\r\n        <GradientStop Color=\"#FFFF7200\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <LinearGradientBrush x:Key=\"Horizontal_Gradient\" EndPoint=\"1,0\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#CCC\" Offset=\"0.0\"/>\r\n        <GradientStop Color=\"#444\" Offset=\"1.0\"/>\r\n    </LinearGradientBrush>\r\n    <LinearGradientBrush x:Key=\"Vertical_Gradient\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#CCC\" Offset=\"0.0\"/>\r\n        <GradientStop Color=\"#444\" Offset=\"1.0\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <!-- MouseOverBrush is used for MouseOver in Button, Radio Button, CheckBox -->\r\n    <LinearGradientBrush x:Key=\"MouseOverBrush\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n        <GradientStop Color=\"#FFF\" Offset=\"0.0\"/>\r\n        <GradientStop Color=\"#AAA\" Offset=\"1.0\"/>\r\n    </LinearGradientBrush>\r\n    <!-- LightBrush is used for content areas such as Menu, Tab Control background -->\r\n    <LinearGradientBrush EndPoint=\"0,1\" StartPoint=\"0,0\" x:Key=\"LightBrush\">\r\n        <GradientStop Color=\"#FFF\" Offset=\"0.0\"/>\r\n        <GradientStop Color=\"#EEE\" Offset=\"1.0\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <Style x:Key=\"{x:Type Button}\" TargetType=\"{x:Type Button}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Button}\">\r\n                    <Border>\r\n                        <Grid>\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"0.5*\"/>\r\n                                <RowDefinition Height=\"0.5*\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <Rectangle VerticalAlignment=\"Stretch\" Grid.ColumnSpan=\"3\" Grid.RowSpan=\"5\" x:Name=\"ellipse\" RadiusX=\"4\" RadiusY=\"4\" Stroke=\"{DynamicResource Stroke_Gradient}\" Fill=\"{DynamicResource RadialBackGround_Orange}\" StrokeThickness=\"2\"/>\r\n                            <ContentPresenter HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Grid.ColumnSpan=\"1\" Grid.RowSpan=\"2\" Grid.Row=\"0\" Grid.Column=\"0\"/>\r\n                            <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"1,0,1,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" Grid.Column=\"0\" Grid.Row=\"0\" x:Name=\"ellipse1\" Grid.RowSpan=\"1\" Opacity=\"0.9\" Grid.ColumnSpan=\"1\" RadiusX=\"3\" RadiusY=\"3\" Fill=\"{DynamicResource Overlay_Fade_Gradient}\"/>\r\n                        </Grid>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"ellipse1\" Value=\"0.4\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"ellipse\" Value=\"0,0,0,1\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"True\">\r\n                            <Setter Property=\"StrokeThickness\" TargetName=\"ellipse\" Value=\"3\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Fill\" TargetName=\"ellipse\" Value=\"LightGray\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Type ScrollBar}\" TargetType=\"{x:Type ScrollBar}\">\r\n        <Setter Property=\"Stylus.IsFlicksEnabled\" Value=\"false\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ScrollBar}\">\r\n                    <Grid x:Name=\"GridRoot\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition MaxHeight=\"18\"/>\r\n                            <RowDefinition Height=\"0.00001*\"/>\r\n                            <RowDefinition MaxHeight=\"18\"/>\r\n                        </Grid.RowDefinitions>\r\n\r\n                        <Rectangle x:Name=\"backrect\" Width=\"10\" Height=\"Auto\" Grid.Row=\"0\" Grid.RowSpan=\"3\" Margin=\"2,3,2,3\" StrokeThickness=\"1\" Fill=\"{DynamicResource Horizontal_Gradient}\" Stroke=\"{DynamicResource Stroke_Gradient}\"/>\r\n\r\n                        <RepeatButton x:Name=\"DecreaseRepeat\"  Command=\"ScrollBar.LineUpCommand\">\r\n                            <Grid>\r\n                                <Path x:Name=\"DecreaseArrow\" Fill=\"{TemplateBinding Foreground}\" Data=\"M 0 6 L 12 6 L 6 0 Z\"/>\r\n                            </Grid>\r\n                        </RepeatButton>\r\n\r\n                        <!-- Track is a special layout container which sizes the thumb and the repeat button which do jump scrolling either side of it -->\r\n                        <Track Grid.Row=\"1\" x:Name=\"PART_Track\" Orientation=\"Vertical\" IsDirectionReversed=\"true\">\r\n                            <Track.Thumb>\r\n                                <Thumb />\r\n                            </Track.Thumb>\r\n                            <Track.IncreaseRepeatButton>\r\n                                <RepeatButton x:Name=\"PageUp\" Style=\"{DynamicResource ScrollBar_RepeatButtonStyle1}\" Command=\"ScrollBar.PageDownCommand\"/>\r\n                            </Track.IncreaseRepeatButton>\r\n                            <Track.DecreaseRepeatButton>\r\n                                <RepeatButton x:Name=\"PageDown\" Style=\"{DynamicResource ScrollBar_RepeatButtonStyle1}\" Command=\"ScrollBar.PageUpCommand\"/>\r\n                            </Track.DecreaseRepeatButton>\r\n                        </Track>\r\n\r\n                        <RepeatButton Grid.Row=\"2\" x:Name=\"IncreaseRepeat\"  Command=\"ScrollBar.LineDownCommand\">\r\n                            <Grid>\r\n                                <Path x:Name=\"IncreaseArrow\"  Data=\"M 0 0 L 6 6 L 12 0 Z\" Fill=\"{TemplateBinding Foreground}\"/>\r\n                            </Grid>\r\n                        </RepeatButton>\r\n                    </Grid>\r\n\r\n                    <!-- This uses a single template for ScrollBar and rotate it to be Horizontal\r\n\t\t\t\t\tIt also changes the commands so that the it does Left and Right instead of Up and Down Commands -->\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"Orientation\" Value=\"Horizontal\">\r\n\r\n                            <!-- Rotate the ScrollBar from Vertical to Horizontal -->\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"GridRoot\">\r\n                                <Setter.Value>\r\n                                    <RotateTransform Angle=\"-90\"/>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n\r\n                            <!-- Track is bound to Orientation internally, so we need to rotate it back to Vertical -->\r\n                            <Setter TargetName=\"PART_Track\" Property=\"Orientation\" Value=\"Vertical\"/>\r\n\r\n                            <!-- Change the commands to do Horizontal commands -->\r\n                            <Setter Property=\"Command\" Value=\"ScrollBar.LineLeftCommand\" TargetName=\"DecreaseRepeat\"/>\r\n                            <Setter Property=\"Command\" Value=\"ScrollBar.LineRightCommand\" TargetName=\"IncreaseRepeat\"/>\r\n                            <Setter Property=\"Command\" Value=\"ScrollBar.PageLeftCommand\" TargetName=\"PageDown\"/>\r\n                            <Setter Property=\"Command\" Value=\"ScrollBar.PageRightCommand\" TargetName=\"PageUp\"/>\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Fill\" TargetName=\"backrect\" Value=\"LightGray\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- Resource dictionary entries should be defined here. -->\r\n\r\n    <!-- Simple Repeat Button - This is used by Simple ScrollBar for the up and down buttons -->\r\n    <Style x:Key=\"{x:Type RepeatButton}\" d:IsControlPart=\"True\" TargetType=\"{x:Type RepeatButton}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n                    <Grid>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"0.5*\"/>\r\n                            <RowDefinition Height=\"0.5*\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <Rectangle VerticalAlignment=\"Stretch\" Grid.ColumnSpan=\"3\" Grid.RowSpan=\"5\" x:Name=\"ellipse\"  Stroke=\"{DynamicResource Stroke_Gradient}\" Fill=\"{DynamicResource Normal_Background}\" RadiusX=\"3\" RadiusY=\"3\"/>\r\n                        <ContentPresenter HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Grid.ColumnSpan=\"1\" Grid.RowSpan=\"2\" Grid.Row=\"0\" Grid.Column=\"0\"/>\r\n                        <Rectangle StrokeThickness=\"0\" HorizontalAlignment=\"Stretch\" Margin=\"1,0,1,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" Grid.Column=\"0\" Grid.Row=\"0\" x:Name=\"ellipse1\" Grid.RowSpan=\"1\" Opacity=\"0.9\" Grid.ColumnSpan=\"1\" RadiusX=\"3\" RadiusY=\"3\" Fill=\"{DynamicResource Overlay_Fade_Gradient}\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"ellipse1\" Value=\"0.4\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"ellipse\" Value=\"0,0,0,1\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"True\">\r\n                            <Setter Property=\"StrokeThickness\" TargetName=\"ellipse\" Value=\"2\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Fill\" TargetName=\"ellipse\" Value=\"LightGray\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Type Thumb}\" d:IsControlPart=\"True\" TargetType=\"{x:Type Thumb}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <Grid>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"0.5*\"/>\r\n                            <RowDefinition Height=\"0.5*\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <Rectangle VerticalAlignment=\"Stretch\" Grid.ColumnSpan=\"1\" Grid.RowSpan=\"2\" x:Name=\"ellipse\" RadiusX=\"1\" RadiusY=\"1\" Stroke=\"{DynamicResource Stroke_Gradient}\" Fill=\"{DynamicResource Normal_Background}\"/>\r\n                        <Rectangle StrokeThickness=\"0\" HorizontalAlignment=\"Stretch\" Margin=\"1,0,1,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" Grid.Column=\"0\" Grid.Row=\"0\" x:Name=\"ellipse1\" Grid.RowSpan=\"1\" Opacity=\"0.9\" Grid.ColumnSpan=\"1\" RadiusX=\"1\" RadiusY=\"1\" Fill=\"{DynamicResource Overlay_Fade_Gradient}\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"ellipse1\" Value=\"0.4\"/>\r\n                            <Setter Property=\"StrokeThickness\" TargetName=\"ellipse\" Value=\"2\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Fill\" TargetName=\"ellipse\" Value=\"Gray\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Type ScrollViewer}\" TargetType=\"{x:Type ScrollViewer}\" BasedOn=\"{x:Null}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ScrollViewer}\">\r\n                    <Grid Background=\"{TemplateBinding Background}\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"*\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <ScrollContentPresenter Grid.Column=\"0\" Grid.Row=\"0\" Margin=\"{TemplateBinding Padding}\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" CanContentScroll=\"{TemplateBinding CanContentScroll}\"/>\r\n\r\n                        <!-- The visibility of the ScrollBars is controlled by the implementation fo the control -->\r\n                        <ScrollBar Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Grid.Column=\"0\" Grid.Row=\"1\" x:Name=\"PART_HorizontalScrollBar\"  Orientation=\"Horizontal\" Value=\"{Binding Path=HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" ViewportSize=\"{TemplateBinding ViewportWidth}\" Minimum=\"0\" Maximum=\"{TemplateBinding ScrollableWidth}\" AutomationProperties.AutomationId=\"HorizontalScrollBar\"/>\r\n                        <ScrollBar Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Grid.Column=\"1\" Grid.Row=\"0\" x:Name=\"PART_VerticalScrollBar\" Orientation=\"Vertical\" Value=\"{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" ViewportSize=\"{TemplateBinding ViewportHeight}\" Minimum=\"0\" Maximum=\"{TemplateBinding ScrollableHeight}\" AutomationProperties.AutomationId=\"VerticalScrollBar\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style x:Key=\"{x:Type ListBox}\" TargetType=\"{x:Type ListBox}\">\r\n        <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\"/>\r\n        <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\"/>\r\n        <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"true\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListBox}\">\r\n                    <Grid Width=\"Auto\" Height=\"Auto\">\r\n                        <Border x:Name=\"Bd\" SnapsToDevicePixels=\"true\" CornerRadius=\"4,4,4,4\" Background=\"{DynamicResource GlyphBrush}\" BorderBrush=\"{DynamicResource Stroke_Gradient}\" BorderThickness=\"2,2,2,2\" d:LayoutOverrides=\"Width, Height\" Margin=\"0,0,10,0\"/>\r\n                        <ScrollViewer Padding=\"{TemplateBinding Padding}\" Focusable=\"false\" Margin=\"4,4,4,4\">\r\n                            <ItemsPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\"/>\r\n                        </ScrollViewer>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Background\" TargetName=\"Bd\" Value=\"LightGray\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                            <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"BorderThickness\" Value=\"0,0,0,0\"/>\r\n    </Style>\r\n\r\n    <Style x:Key=\"ComboBox_ToggleButtonStyle1\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <Grid>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                            <ColumnDefinition Width=\"22\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"0.5*\"/>\r\n                            <RowDefinition Height=\"0.5*\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <Rectangle x:Name=\"ellipse_Copy\" Fill=\"{DynamicResource Stroke_Gradient}\" RadiusX=\"4\" RadiusY=\"4\" VerticalAlignment=\"Stretch\" Grid.ColumnSpan=\"2\" Grid.RowSpan=\"2\" StrokeThickness=\"0\"/>\r\n                        <Rectangle x:Name=\"ellipse\" Fill=\"{DynamicResource RadialBackGround_Orange}\" Stroke=\"{DynamicResource Stroke_Gradient}\" RadiusX=\"4\" RadiusY=\"4\" VerticalAlignment=\"Stretch\" Grid.ColumnSpan=\"1\" Grid.RowSpan=\"2\" StrokeThickness=\"1\" Margin=\"1,1,0,1\"/>\r\n                        <ContentPresenter HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Grid.Column=\"0\" Grid.ColumnSpan=\"1\" Grid.Row=\"0\" Grid.RowSpan=\"2\" Content=\"{TemplateBinding Content}\" ContentStringFormat=\"{TemplateBinding ContentStringFormat}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                        <Rectangle x:Name=\"ellipse1\" Fill=\"{DynamicResource Overlay_Fade_Gradient}\" StrokeThickness=\"0\" RadiusX=\"3\" RadiusY=\"3\" HorizontalAlignment=\"Stretch\" Margin=\"1,0,1,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" Opacity=\"0.9\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Grid.Row=\"0\" Grid.RowSpan=\"1\"/>\r\n                        <Path x:Name=\"ArrowPanelPath\" VerticalAlignment=\"Center\" Fill=\"{TemplateBinding Foreground}\" Data=\"M0,0 L14,0 L7,10 z\" StrokeThickness=\"0\" Grid.Column=\"1\" Grid.RowSpan=\"2\" HorizontalAlignment=\"Center\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Setter Property=\"Margin\" TargetName=\"ellipse_Copy\" Value=\"0,0,0,1\"/>\r\n                            <Setter Property=\"Opacity\" TargetName=\"ellipse1\" Value=\"0.5\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"True\">\r\n                            <Setter Property=\"StrokeThickness\" TargetName=\"ellipse\" Value=\"2\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"True\">\r\n                            <Setter Property=\"StrokeThickness\" TargetName=\"ellipse\" Value=\"3\"/>\r\n                            <Setter Property=\"Fill\" TargetName=\"ellipse\" Value=\"#FFF46B00\"/>\r\n                            <Setter Property=\"Data\" TargetName=\"ArrowPanelPath\" Value=\"M 0 10 L 14 10 L 7 0 Z\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Fill\" TargetName=\"ellipse\" Value=\"#FFD3D3D3\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n\r\n    <Style x:Key=\"{x:Type ComboBox}\" TargetType=\"{x:Type ComboBox}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ComboBox}\">\r\n                    <Grid>\r\n                        <!-- The ToggleButton is databound to the ComboBox itself to toggle IsDropDownOpen -->\r\n                        <ToggleButton Grid.Column=\"2\"  x:Name=\"ToggleButton\" Focusable=\"false\" IsChecked=\"{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" ClickMode=\"Press\" Style=\"{DynamicResource ComboBox_ToggleButtonStyle1}\"/>\r\n                        <ContentPresenter HorizontalAlignment=\"Left\" Margin=\"4,3,25,3\" x:Name=\"ContentSite\" VerticalAlignment=\"Center\" Content=\"{TemplateBinding SelectionBoxItem}\" ContentTemplate=\"{TemplateBinding SelectionBoxItemTemplate}\" ContentTemplateSelector=\"{TemplateBinding ItemTemplateSelector}\" IsHitTestVisible=\"False\"/>\r\n\r\n                        <!-- The TextBox must be named PART_EditableTextBox or ComboBox will not recognize it -->\r\n                        <TextBox Visibility=\"Hidden\" Template=\"{DynamicResource ComboBoxTextBox}\" HorizontalAlignment=\"Left\" Margin=\"3,3,23,3\" x:Name=\"PART_EditableTextBox\" Style=\"{x:Null}\" VerticalAlignment=\"Center\" Focusable=\"True\" Background=\"Transparent\" IsReadOnly=\"{TemplateBinding IsReadOnly}\"/>\r\n\r\n                        <!-- The Popup shows the list of items in the ComboBox. IsOpen is databound to IsDropDownOpen which is toggled via the ComboBoxToggleButton -->\r\n                        <Popup IsOpen=\"{TemplateBinding IsDropDownOpen}\" Placement=\"Bottom\" x:Name=\"Popup\" Focusable=\"False\" AllowsTransparency=\"True\" PopupAnimation=\"Slide\">\r\n                            <Grid MaxHeight=\"{TemplateBinding MaxDropDownHeight}\" MinWidth=\"{TemplateBinding ActualWidth}\" x:Name=\"DropDown\" SnapsToDevicePixels=\"True\">\r\n                                <Border x:Name=\"DropDownBorder\" Background=\"{DynamicResource Normal_Background}\" BorderBrush=\"{DynamicResource Stroke_Gradient}\" BorderThickness=\"2,1,2,1\" CornerRadius=\"4,4,4,4\"/>\r\n                                <ScrollViewer Margin=\"4,4,4,4\"  SnapsToDevicePixels=\"True\" HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Auto\" CanContentScroll=\"True\">\r\n\r\n                                    <!-- The StackPanel is used to display the children by setting IsItemsHost to be True -->\r\n                                    <StackPanel IsItemsHost=\"True\" KeyboardNavigation.DirectionalNavigation=\"Contained\"/>\r\n\r\n                                </ScrollViewer>\r\n                            </Grid>\r\n                        </Popup>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <!-- This forces the DropDown to have a minimum size if it is empty -->\r\n                        <Trigger Property=\"HasItems\" Value=\"false\">\r\n                            <Setter Property=\"MinHeight\" Value=\"95\" TargetName=\"DropDownBorder\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource Vertical_Gradient}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                            <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"AllowsTransparency\" SourceName=\"Popup\" Value=\"true\">\r\n                            <Setter Property=\"CornerRadius\" Value=\"4\" TargetName=\"DropDownBorder\"/>\r\n                            <Setter Property=\"Margin\" Value=\"0,2,0,0\" TargetName=\"DropDownBorder\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEditable\" Value=\"true\">\r\n                            <Setter Property=\"IsTabStop\" Value=\"false\"/>\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"PART_EditableTextBox\"/>\r\n                            <Setter Property=\"Visibility\" Value=\"Hidden\" TargetName=\"ContentSite\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\"/>\r\n    </Style>\r\n    <Style x:Key=\"{x:Type ToggleButton}\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <Grid>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"0.5*\"/>\r\n                            <RowDefinition Height=\"0.5*\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <Rectangle VerticalAlignment=\"Stretch\" Grid.ColumnSpan=\"3\" Grid.RowSpan=\"5\" x:Name=\"ellipse\" RadiusX=\"4\" RadiusY=\"4\" Stroke=\"{DynamicResource Stroke_Gradient}\" Fill=\"{DynamicResource RadialBackGround_Orange}\" StrokeThickness=\"2\"/>\r\n                        <ContentPresenter HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Grid.ColumnSpan=\"1\" Grid.RowSpan=\"2\" Grid.Row=\"0\" Grid.Column=\"0\"/>\r\n                        <Rectangle StrokeThickness=\"0\" HorizontalAlignment=\"Stretch\" Margin=\"1,0,1,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" Grid.Column=\"0\" Grid.Row=\"0\" x:Name=\"ellipse1\" Grid.RowSpan=\"1\" Opacity=\"0.9\" Grid.ColumnSpan=\"1\" RadiusX=\"3\" RadiusY=\"3\" Fill=\"{DynamicResource Overlay_Fade_Gradient}\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"ellipse1\" Value=\"0.4\"/>\r\n                            <Setter Property=\"Margin\" TargetName=\"ellipse\" Value=\"0,0,0,1\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"True\">\r\n                            <Setter Property=\"StrokeThickness\" TargetName=\"ellipse\" Value=\"2\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsChecked\" Value=\"True\">\r\n                            <Setter Property=\"StrokeThickness\" TargetName=\"ellipse\" Value=\"4\"/>\r\n                            <Setter Property=\"Fill\" TargetName=\"ellipse\" Value=\"{StaticResource Normal_Background}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Fill\" TargetName=\"ellipse\" Value=\"{StaticResource Vertical_Gradient}\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"{x:Type RadioButton}\" TargetType=\"{x:Type RadioButton}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource RadioButtonFocusVisual}\"/>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource Vertical_Gradient}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource Stroke_Gradient}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type RadioButton}\">\r\n\r\n                    <!-- BulletDecorator is used to provide baseline alignment between the checkmark and the Content -->\r\n                    <BulletDecorator Background=\"Transparent\">\r\n                        <BulletDecorator.Bullet>\r\n                            <Grid Width=\"15\" Height=\"15\">\r\n                                <Rectangle x:Name=\"Ellipse_Border\" Fill=\"{DynamicResource LightBrush}\" Stroke=\"{DynamicResource Stroke_Gradient}\" StrokeThickness=\"1\" HorizontalAlignment=\"Stretch\" RadiusX=\"4\" RadiusY=\"4\"/>\r\n                                <Rectangle Margin=\"3,3,3,3\" x:Name=\"CheckMark\" Fill=\"{DynamicResource Normal_Background}\" RadiusX=\"4\" RadiusY=\"4\"/>\r\n                            </Grid>\r\n                        </BulletDecorator.Bullet>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" RecognizesAccessKey=\"True\"/>\r\n                    </BulletDecorator>\r\n\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsChecked\" Value=\"false\">\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"CheckMark\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Setter Property=\"Fill\" Value=\"{DynamicResource MouseOverBrush}\" TargetName=\"Ellipse_Border\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Setter Property=\"Fill\" Value=\"{DynamicResource Normal_Background}\" TargetName=\"Ellipse_Border\"/>\r\n                            <Setter Property=\"Stroke\" Value=\"{DynamicResource Stroke_Gradient}\" TargetName=\"Ellipse_Border\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Fill\" Value=\"{DynamicResource Vertical_Gradient}\" TargetName=\"Ellipse_Border\"/>\r\n                            <Setter Property=\"Stroke\" Value=\"#40000000\" TargetName=\"Ellipse_Border\"/>\r\n                            <Setter Property=\"Foreground\" Value=\"#80000000\"/>\r\n                        </Trigger>\r\n\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"{x:Type Slider}\" TargetType=\"{x:Type Slider}\">\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource Vertical_Gradient}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource Stroke_Gradient}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Slider}\">\r\n                    <Grid x:Name=\"GridRoot\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\" MinHeight=\"{TemplateBinding MinHeight}\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n\r\n                        <!-- TickBar shows the ticks for Slider -->\r\n                        <TickBar Visibility=\"Collapsed\" x:Name=\"TopTick\" Height=\"4\" SnapsToDevicePixels=\"True\" Placement=\"Top\" Fill=\"{DynamicResource GlyphBrush}\"/>\r\n                        <Border Grid.Row=\"1\" Margin=\"0\" x:Name=\"Border\" Height=\"4\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\"/>\r\n\r\n                        <!-- The Track lays out the repeat buttons and thumb -->\r\n                        <Track Grid.Row=\"1\" x:Name=\"PART_Track\">\r\n                            <Track.Thumb>\r\n                                <Thumb Width=\"15\" Height=\"18\" />\r\n                            </Track.Thumb>\r\n                            <Track.IncreaseRepeatButton>\r\n                                <RepeatButton Style=\"{DynamicResource ScrollBar_RepeatButtonStyle1}\" Command=\"Slider.IncreaseLarge\"/>\r\n                            </Track.IncreaseRepeatButton>\r\n                            <Track.DecreaseRepeatButton>\r\n                                <RepeatButton Style=\"{DynamicResource ScrollBar_RepeatButtonStyle1}\" Command=\"Slider.DecreaseLarge\"/>\r\n                            </Track.DecreaseRepeatButton>\r\n                        </Track>\r\n\r\n                        <TickBar Visibility=\"Collapsed\" Grid.Row=\"2\" x:Name=\"BottomTick\" Height=\"4\" SnapsToDevicePixels=\"True\" Placement=\"Bottom\" Fill=\"{TemplateBinding Foreground}\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"TickPlacement\" Value=\"TopLeft\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"TopTick\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"TickPlacement\" Value=\"BottomRight\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"BottomTick\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"TickPlacement\" Value=\"Both\">\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"TopTick\"/>\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"BottomTick\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource Vertical_Gradient}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DisabledBorderBrush}\" TargetName=\"Border\"/>\r\n                        </Trigger>\r\n\r\n                        <!-- Use a rotation to create a Vertical Slider form the default Horizontal -->\r\n                        <Trigger Property=\"Orientation\" Value=\"Vertical\">\r\n                            <Setter Property=\"LayoutTransform\" TargetName=\"GridRoot\">\r\n                                <Setter.Value>\r\n                                    <RotateTransform Angle=\"-90\"/>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                            <!-- Track rotates itself based on orientation so need to force it back -->\r\n                            <Setter TargetName=\"PART_Track\" Property=\"Orientation\" Value=\"Horizontal\"/>\r\n                        </Trigger>\r\n\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"{x:Type ProgressBar}\" TargetType=\"{x:Type ProgressBar}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ProgressBar}\">\r\n                    <Grid>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"0.514*\"/>\r\n                            <RowDefinition Height=\"0.486*\"/>\r\n                        </Grid.RowDefinitions>\r\n\r\n                        <!-- This Border is the track. It must be named PART_Track -->\r\n                        <Border x:Name=\"PART_Track\" Background=\"{DynamicResource GlyphBrush}\" BorderBrush=\"{DynamicResource Stroke_Gradient}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"3,3,3,3\" Grid.RowSpan=\"2\"/>\r\n\r\n                        <!-- This Border shows progress. It must be named PART_Indicator for the control to function -->\r\n                        <Border HorizontalAlignment=\"Left\" x:Name=\"PART_Indicator\" Background=\"{DynamicResource RadialBackGround_Orange}\" BorderBrush=\"{DynamicResource Stroke_Gradient}\" BorderThickness=\"1\" CornerRadius=\"2\" Grid.RowSpan=\"2\"/>\r\n                        <Rectangle HorizontalAlignment=\"Stretch\" Margin=\"1,0,1,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" Grid.Column=\"0\" Grid.Row=\"0\" x:Name=\"ellipse1\" Grid.RowSpan=\"1\" Opacity=\"0.75\" Grid.ColumnSpan=\"1\" RadiusX=\"3\" RadiusY=\"3\" Fill=\"{DynamicResource Overlay_Fade_Gradient}\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"{x:Type TextBox}\" TargetType=\"{x:Type TextBox}\">\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\"/>\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\"/>\r\n        <Setter Property=\"AllowDrop\" Value=\"true\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TextBox}\">\r\n                    <Grid Width=\"Auto\" Height=\"Auto\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"0.5*\"/>\r\n                            <RowDefinition Height=\"0.5*\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <Border x:Name=\"Border\" Background=\"{DynamicResource Normal_Background}\" CornerRadius=\"4,4,4,4\" Grid.RowSpan=\"2\" BorderBrush=\"{DynamicResource Stroke_Gradient}\" BorderThickness=\"2,2,2,2\">\r\n                            <ScrollViewer Margin=\"1,1,1,1\" x:Name=\"PART_ContentHost\" VerticalContentAlignment=\"Stretch\"/>\r\n                        </Border>\r\n                        <Rectangle x:Name=\"rect\" Fill=\"{DynamicResource Overlay_Fade_Gradient}\" StrokeThickness=\"0\" RadiusX=\"3\" RadiusY=\"3\" HorizontalAlignment=\"Stretch\" Margin=\"1,0,1,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" Height=\"Auto\" Opacity=\"0.315\" Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Grid.Row=\"0\" Grid.RowSpan=\"1\" IsHitTestVisible=\"False\"/>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Setter Property=\"Opacity\" Value=\"0\" TargetName=\"rect\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource Vertical_Gradient}\" TargetName=\"Border\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"ScrollBar_RepeatButtonStyle1\" d:IsControlPart=\"True\" TargetType=\"{x:Type RepeatButton}\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n        <Setter Property=\"IsTabStop\" Value=\"false\"/>\r\n        <Setter Property=\"Focusable\" Value=\"false\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n                    <Grid>\r\n                        <Rectangle Fill=\"{TemplateBinding Background}\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style x:Key=\"{x:Type CheckBox}\" TargetType=\"{x:Type CheckBox}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource CheckBoxFocusVisual}\"/>\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource NormalBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource NormalBorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type CheckBox}\">\r\n\r\n                    <!-- BulletDecorator is used to provide baseline alignment between the checkmark and the Content -->\r\n                    <BulletDecorator Background=\"Transparent\">\r\n                        <BulletDecorator.Bullet>\r\n                            <Grid Width=\"13\" Height=\"13\">\r\n                                <Border x:Name=\"Border\" Background=\"{DynamicResource LightBrush}\" BorderBrush=\"{DynamicResource Stroke_Gradient}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"1,1,1,1\"/>\r\n                                <Path x:Name=\"CheckMark\" Stroke=\"{DynamicResource Normal_Background}\" StrokeThickness=\"3\" SnapsToDevicePixels=\"False\" Data=\"M1.5000001,1.5833334 L9.7920001,9.6666667 M1.5420001,9.6666667 L9.7083333,1.5000001\" Margin=\"0.875,0.895,0.833,0.938\" ClipToBounds=\"False\" StrokeEndLineCap=\"Round\" StrokeStartLineCap=\"Round\"/>\r\n                            </Grid>\r\n                        </BulletDecorator.Bullet>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" RecognizesAccessKey=\"True\"/>\r\n                    </BulletDecorator>\r\n\r\n                    <!-- This uses Visibility to hide and show the CheckMark on IsChecked -->\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsChecked\" Value=\"false\">\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"CheckMark\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource MouseOverBrush}\" TargetName=\"Border\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource Normal_Background}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource PressedBorderBrush}\" TargetName=\"Border\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Background\" Value=\"{DynamicResource Vertical_Gradient}\" TargetName=\"Border\"/>\r\n                            <Setter Property=\"BorderBrush\" Value=\"{DynamicResource DisabledBorderBrush}\" TargetName=\"Border\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/ThemeManager.cs",
    "content": "﻿namespace WPF.Themes\r\n{\r\n    using System;\r\n    using System.IO;\r\n    using System.Reflection;\r\n    using System.Windows;\r\n    using System.Windows.Controls;\r\n\r\n    public static class ThemeManager\r\n    {\r\n        public static ResourceDictionary GetThemeResourceDictionary(string theme)\r\n        {\r\n            if (theme != null)\r\n            {\r\n                string basePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);\r\n                Assembly assembly = Assembly.LoadFrom(Path.Combine(basePath, \"DotNetProjects.WPF.Themes.dll\"));\r\n                string packUri = String.Format(@\"/DotNetProjects.WPF.Themes;component/{0}/Theme.xaml\", theme);\r\n                return Application.LoadComponent(new Uri(packUri, UriKind.Relative)) as ResourceDictionary;\r\n            }\r\n            return null;\r\n        }\r\n\r\n        public static string[] GetThemes()\r\n        {\r\n            string[] themes = {\r\n                \"ExpressionDark\", \"ExpressionLight\",\r\n                \"RainierOrange\", \"RainierPurple\", \"RainierRadialBlue\",\r\n                \"ShinyBlue\", \"ShinyRed\",\r\n                \"ShinyDarkTeal\", \"ShinyDarkGreen\", \"ShinyDarkPurple\",\r\n                \"SunnyOrange\", \"JetPack\",\r\n                \"DavesGlossyControls\",\r\n                \"WhistlerBlue\",\r\n                \"BureauBlack\", \"BureauBlue\",\r\n                \"BubbleCreme\",\r\n                \"TwilightBlue\",\r\n                \"UXMusingsRed\", \"UXMusingsGreen\",\r\n                \"UXMusingsRoughRed\", \"UXMusingsRoughGreen\",\r\n                \"UXMusingsBubblyBlue\", \"MoonUICore\",\r\n                \"MetroDark\", \"MetroLight\",\r\n                \"IG\", \"Office2010Blue\",\r\n            };\r\n            return themes;\r\n        }\r\n\r\n        public static string[] Themes\r\n        {\r\n            get\r\n            {\r\n                return GetThemes();\r\n            }\r\n        }\r\n\r\n        public static void ApplyTheme(this Application app, string theme)\r\n        {\r\n            ResourceDictionary dictionary = GetThemeResourceDictionary(theme);\r\n\r\n            if (dictionary != null)\r\n            {\r\n                app.Resources.MergedDictionaries.Clear();\r\n                app.Resources.MergedDictionaries.Add(dictionary);\r\n            }\r\n        }\r\n\r\n        public static void ApplyTheme(this ContentControl control, string theme)\r\n        {\r\n            ResourceDictionary dictionary = GetThemeResourceDictionary(theme);\r\n\r\n            if (dictionary != null)\r\n            {\r\n                control.Resources.MergedDictionaries.Clear();\r\n                control.Resources.MergedDictionaries.Add(dictionary);\r\n            }\r\n        }\r\n\r\n        #region Theme\r\n\r\n        /// <summary>\r\n        /// Theme Attached Dependency Property\r\n        /// </summary>\r\n        public static readonly DependencyProperty ThemeProperty =\r\n            DependencyProperty.RegisterAttached(\"Theme\", typeof(string), typeof(ThemeManager),\r\n                new FrameworkPropertyMetadata((string)string.Empty,\r\n                    new PropertyChangedCallback(OnThemeChanged)));\r\n\r\n        /// <summary>\r\n        /// Gets the Theme property.  This dependency property \r\n        /// indicates ....\r\n        /// </summary>\r\n        public static string GetTheme(DependencyObject d)\r\n        {\r\n            return (string)d.GetValue(ThemeProperty);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Sets the Theme property.  This dependency property \r\n        /// indicates ....\r\n        /// </summary>\r\n        public static void SetTheme(DependencyObject d, string value)\r\n        {\r\n            d.SetValue(ThemeProperty, value);\r\n        }\r\n\r\n        /// <summary>\r\n        /// Handles changes to the Theme property.\r\n        /// </summary>\r\n        private static void OnThemeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)\r\n        {\r\n            string theme = e.NewValue as string;\r\n            if (theme == string.Empty)\r\n                return;\r\n\r\n            ContentControl control = d as ContentControl;\r\n            if (control != null)\r\n            {\r\n                control.ApplyTheme(theme);\r\n            }\r\n        }\r\n\r\n        #endregion\t  \r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/WPF.Themes/TwilightBlue/Theme.xaml",
    "content": "﻿<!--\r\n// (c) Copyright Microsoft Corporation.\r\n// This source is subject to Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n-->\r\n\r\n<ResourceDictionary\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n    xmlns:basic=\"clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit\" \r\n    xmlns:primitives=\"clr-namespace:Microsoft.Windows.Controls.Primitives;assembly=WPFToolkit\" \r\n    xmlns:vsm=\"clr-namespace:System.Windows;assembly=WPFToolkit\" \r\n    mc:Ignorable=\"d\"\r\n    xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\">\r\n\r\n    <LinearGradientBrush x:Key=\"WindowBackgroundBrush\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n        <GradientStop Color=\"#FF4785B0\" Offset=\"0\"/>\r\n        <GradientStop Color=\"#FF63AADA\" Offset=\"1\"/>\r\n    </LinearGradientBrush>\r\n\r\n    <Color x:Key=\"PrimaryColor\">#FF63AADA</Color>\r\n    <Color x:Key=\"SecondaryColor\">#FFA0FCFF</Color>\r\n    <SolidColorBrush x:Key=\"PrimaryBrush\" Color=\"{StaticResource PrimaryColor}\" />\r\n    <SolidColorBrush x:Key=\"SecondaryBrush\" Color=\"{StaticResource SecondaryColor}\" />\r\n    <SolidColorBrush x:Key=\"TextBrush\" Color=\"#FF152937\" />\r\n    <Color x:Key=\"DisabledColor\">#8CFFFFFF</Color>\r\n\r\n    <!-- Button -->\r\n    <Style TargetType=\"Button\">\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource TextBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"#00000000\" />\r\n        <Setter Property=\"Padding\" Value=\"5,4\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource PrimaryBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Button\">\r\n                    <Grid x:Name=\"Button_Normal\" SnapsToDevicePixels=\"True\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"InnerBorder\" Storyboard.TargetProperty=\"(Border.BorderBrush).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#BF000000\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.3000000\"/>\r\n                                    <VisualTransition From=\"MouseOver\" GeneratedDuration=\"00:00:00\" To=\"Pressed\"/>\r\n                                    <VisualTransition From=\"MouseOver\" GeneratedDuration=\"00:00:00.1000000\" To=\"Normal\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Shadow\" Storyboard.TargetProperty=\"(Panel.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#49000000\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Panel.Background).(GradientBrush.GradientStops)[0].(GradientStop.Offset)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.08\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"White\" Storyboard.TargetProperty=\"(Panel.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#FF000000\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Panel.Background).(GradientBrush.GradientStops)[0].(GradientStop.Offset)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.6\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"White\" Storyboard.TargetProperty=\"(Panel.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#FFECECEC\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"White\" Storyboard.TargetProperty=\"(Panel.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#FFECECEC\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.2\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"50*\" />\r\n                            <RowDefinition Height=\"50*\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Border CornerRadius=\"4\" Grid.RowSpan=\"2\" x:Name=\"White\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1\">\r\n                            <Border.Background>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.35\" ScaleY=\"1.35\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1\" CornerRadius=\"4\" x:Name=\"Background\" Grid.RowSpan=\"2\" Opacity=\"0.65\">\r\n                            <Border.Background>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1.4\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"{StaticResource PrimaryColor}\" Offset=\"0.75\" />\r\n                                    <GradientStop Color=\"{StaticResource SecondaryColor}\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <Border Background=\"{TemplateBinding Background}\" SnapsToDevicePixels=\"True\" BorderBrush=\"#ccFFFFFF\" BorderThickness=\"1\" CornerRadius=\"3.5\" x:Name=\"InnerBorder\" Margin=\"2\" Grid.RowSpan=\"2\" />\r\n                        <Border CornerRadius=\"3.5\" x:Name=\"Shadow\" Margin=\"2\" Grid.RowSpan=\"2\">\r\n                            <Border.OpacityMask>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <TranslateTransform X=\"0\" Y=\"-0.5\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"0.3\" />\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.OpacityMask>\r\n                            <Border.Background>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.75\" ScaleY=\"2.25\" />\r\n                                            <TranslateTransform Y=\"0.65\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#00000000\" Offset=\"0.55\" />\r\n                                    <GradientStop Color=\"#33000000\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <Border Margin=\"1,1,1,0\" CornerRadius=\"4,4,40,40\" x:Name=\"Highlight\" Opacity=\"0.8\" RenderTransformOrigin=\"0.5,1\">\r\n                            <Border.Background>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.25\" ScaleY=\"2\" />\r\n                                            <TranslateTransform Y=\"-0.6\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#BFFFFFFF\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#4CFFFFFF\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <ContentPresenter x:Name=\"contentPresenter\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" RenderTransformOrigin=\"0.5,0.5\" Grid.RowSpan=\"2\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Background\" TargetName=\"White\">\r\n                                <Setter.Value>\r\n                                    <RadialGradientBrush>\r\n                                        <RadialGradientBrush.RelativeTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.35\" ScaleY=\"1.35\"/>\r\n                                            </TransformGroup>\r\n                                        </RadialGradientBrush.RelativeTransform>\r\n                                        <GradientStop Color=\"#FFECECEC\" Offset=\"0\"/>\r\n                                        <GradientStop Color=\"#FFECECEC\" Offset=\"1\"/>\r\n                                    </RadialGradientBrush>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                            <Setter Property=\"Opacity\" TargetName=\"Background\" Value=\"0.2\"/>\r\n                            <Setter Property=\"Opacity\" TargetName=\"contentPresenter\" Value=\"0.5\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- Toggle Button -->\r\n    <Style TargetType=\"ToggleButton\">\r\n        <Setter Property=\"Background\" Value=\"#001F3B53\" />\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource TextBrush}\" />\r\n        <Setter Property=\"Padding\" Value=\"5,4,5,4\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource PrimaryBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ToggleButton\">\r\n                    <Grid SnapsToDevicePixels=\"True\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"0.514*\" />\r\n                            <RowDefinition Height=\"0.486*\" />\r\n                        </Grid.RowDefinitions>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.3000000\" />\r\n                                    <VisualTransition From=\"MouseOver\" GeneratedDuration=\"00:00:00\" To=\"Pressed\" />\r\n                                    <VisualTransition From=\"MouseOver\" GeneratedDuration=\"00:00:00.1000000\" To=\"Normal\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Shadow\" Storyboard.TargetProperty=\"(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#4B000000\" />\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Offset)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\".1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Highlight\" Storyboard.TargetProperty=\"(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#4AFFFFFF\" />\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.6\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Offset)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"White\" Storyboard.TargetProperty=\"(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#FF000000\" />\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"White\" Storyboard.TargetProperty=\"(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#FFC8C8C8\" />\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Highlight\" Storyboard.TargetProperty=\"(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#4BFFFFFF\" />\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.2\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"White\" Storyboard.TargetProperty=\"(Border.BorderBrush).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#FFB1B1B1\" />\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"White\" Storyboard.TargetProperty=\"(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#FFECECEC\" />\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"White\" Storyboard.TargetProperty=\"(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#FFECECEC\" />\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualState x:Name=\"Unchecked\" />\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"grid\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"InnerBorder\" Storyboard.TargetProperty=\"(Border.BorderBrush).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#BF000000\" />\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border CornerRadius=\"4\" x:Name=\"White\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1\" Grid.RowSpan=\"2\">\r\n                            <Border.Background>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.35\" ScaleY=\"1.35\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1.2\" CornerRadius=\"4\" x:Name=\"Background\" Opacity=\"0.65\" Grid.RowSpan=\"2\">\r\n                            <Border.Background>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1.4\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"{StaticResource PrimaryColor}\" Offset=\"0.75\" />\r\n                                    <GradientStop Color=\"{StaticResource SecondaryColor}\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <Border Background=\"{TemplateBinding Background}\" BorderBrush=\"#ccFFFFFF\" BorderThickness=\"1\" CornerRadius=\"3.5\" x:Name=\"InnerBorder\" Margin=\"2\" Grid.RowSpan=\"2\" />\r\n                        <Border CornerRadius=\"3.5\" x:Name=\"Shadow\" Margin=\"2,2,2,2\" Grid.RowSpan=\"2\">\r\n                            <Border.OpacityMask>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <TranslateTransform X=\"0\" Y=\"-0.5\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"0.3\" />\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.OpacityMask>\r\n                            <Border.Background>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.75\" ScaleY=\"2.25\" />\r\n                                            <TranslateTransform Y=\"0.65\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#00000000\" Offset=\"0.55\" />\r\n                                    <GradientStop Color=\"#33000000\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <Border Margin=\"1,1,1,0\" CornerRadius=\"4,4,40,40\" x:Name=\"Highlight\" Opacity=\"0.8\" RenderTransformOrigin=\"0.5,1\">\r\n                            <Border.Background>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.25\" ScaleY=\"2\" />\r\n                                            <TranslateTransform Y=\"-0.6\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#BFFFFFFF\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#4CFFFFFF\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <ContentPresenter x:Name=\"contentPresenter\" RenderTransformOrigin=\"0.5,0.5\" Margin=\"{TemplateBinding Padding}\" Grid.RowSpan=\"2\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" />\r\n                        <Grid Grid.RowSpan=\"2\" Margin=\"2,2,2,2\" Visibility=\"Hidden\" x:Name=\"grid\" Opacity=\"0.35\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"0.161*\" />\r\n                                <RowDefinition Height=\"0.839*\" />\r\n                            </Grid.RowDefinitions>\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"0.039*\" />\r\n                                <ColumnDefinition Width=\"0.961*\" />\r\n                            </Grid.ColumnDefinitions>\r\n                            <Border Grid.ColumnSpan=\"2\" Grid.RowSpan=\"1\" Grid.Column=\"1\" CornerRadius=\"0,3,0,0\">\r\n                                <Border.Background>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                        <GradientStop Color=\"#FF000000\" Offset=\"0\" />\r\n                                        <GradientStop Color=\"#004392C7\" Offset=\"1\" />\r\n                                    </LinearGradientBrush>\r\n                                </Border.Background>\r\n                            </Border>\r\n                            <Border Grid.ColumnSpan=\"1\" Grid.RowSpan=\"2\" Grid.Row=\"1\" CornerRadius=\"0,0,0,3\">\r\n                                <Border.Background>\r\n                                    <LinearGradientBrush EndPoint=\"1.1,0.5\" StartPoint=\"0,0.5\">\r\n                                        <GradientStop Color=\"#FF000000\" />\r\n                                        <GradientStop Color=\"#004392C7\" Offset=\"1\" />\r\n                                    </LinearGradientBrush>\r\n                                </Border.Background>\r\n                            </Border>\r\n                            <Border Grid.ColumnSpan=\"1\" Grid.RowSpan=\"1\" CornerRadius=\"3,0,0,0\">\r\n                                <Border.Background>\r\n                                    <RadialGradientBrush>\r\n                                        <RadialGradientBrush.RelativeTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.988\" ScaleY=\"1.988\" />\r\n                                                <TranslateTransform X=\"0.494\" Y=\"0.494\" />\r\n                                            </TransformGroup>\r\n                                        </RadialGradientBrush.RelativeTransform>\r\n                                        <GradientStop Color=\"#004392C7\" />\r\n                                        <GradientStop Color=\"#FF000000\" Offset=\"1\" />\r\n                                    </RadialGradientBrush>\r\n                                </Border.Background>\r\n                            </Border>\r\n                        </Grid>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Background\" TargetName=\"White\">\r\n                                <Setter.Value>\r\n                                    <RadialGradientBrush>\r\n                                        <RadialGradientBrush.RelativeTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.35\" ScaleY=\"1.35\"/>\r\n                                            </TransformGroup>\r\n                                        </RadialGradientBrush.RelativeTransform>\r\n                                        <GradientStop Color=\"#FFECECEC\" Offset=\"0\"/>\r\n                                        <GradientStop Color=\"#FFECECEC\" Offset=\"1\"/>\r\n                                    </RadialGradientBrush>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                            <Setter Property=\"Opacity\" TargetName=\"Background\" Value=\"0.2\"/>\r\n                            <Setter Property=\"Opacity\" TargetName=\"contentPresenter\" Value=\"0.5\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--CheckBox-->\r\n    <Style TargetType=\"{x:Type CheckBox}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n        <Setter Property=\"Background\" Value=\"#00FFFFFF\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource PrimaryBrush}\" />\r\n        <Setter Property=\"Content\" Value=\"CheckBox\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"Padding\" Value=\"4,1,0,0\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type CheckBox}\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Panel.Background).(GradientBrush.GradientStops)[0].(GradientStop.Offset)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.107\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Shadow\" Storyboard.TargetProperty=\"(Panel.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#49000000\" />\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Bullet\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Border\" Storyboard.TargetProperty=\"(Panel.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#FF080808\" />\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Panel.Background).(GradientBrush.GradientStops)[0].(GradientStop.Offset)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.6\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Bullet\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Border\" Storyboard.TargetProperty=\"(Panel.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#FFECECEC\" />\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Border\" Storyboard.TargetProperty=\"(Panel.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#FFECECEC\" />\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.2\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Bullet\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.55\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"grid\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Bullet\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\" />\r\n                                <VisualState x:Name=\"Indeterminate\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"IndeterminateRectangle\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"InnerBorder\" Storyboard.TargetProperty=\"(Border.BorderBrush).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#FF000000\" />\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"16\" />\r\n                            <ColumnDefinition Width=\"*\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid Height=\"16\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Top\" Width=\"16\" x:Name=\"grid\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"0.508*\" />\r\n                                <RowDefinition Height=\"0.492*\" />\r\n                            </Grid.RowDefinitions>\r\n                            <Border x:Name=\"Border\" Grid.RowSpan=\"2\" BorderBrush=\"#FFB5B5B5\" BorderThickness=\"1.2,1.2,1.2,1.2\">\r\n                                <Border.Background>\r\n                                    <RadialGradientBrush>\r\n                                        <RadialGradientBrush.RelativeTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.414\" ScaleY=\"1.414\" />\r\n                                            </TransformGroup>\r\n                                        </RadialGradientBrush.RelativeTransform>\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                    </RadialGradientBrush>\r\n                                </Border.Background>\r\n                            </Border>\r\n                            <Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1.2\" x:Name=\"Background\" Opacity=\".5\" Grid.RowSpan=\"2\">\r\n                                <Border.Background>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,1.4\" StartPoint=\"0.5,0\">\r\n                                        <GradientStop Color=\"{StaticResource PrimaryColor}\" Offset=\"0.75\" />\r\n                                        <GradientStop Color=\"{StaticResource SecondaryColor}\" Offset=\"1\" />\r\n                                    </LinearGradientBrush>\r\n                                </Border.Background>\r\n                            </Border>\r\n                            <Border Background=\"{TemplateBinding Background}\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\".75\" x:Name=\"InnerBorder\" Margin=\"1\" Visibility=\"Visible\" Grid.RowSpan=\"2\" />\r\n                            <Border x:Name=\"Shadow\" Margin=\"3\" Grid.RowSpan=\"2\">\r\n                                <Border.OpacityMask>\r\n                                    <RadialGradientBrush>\r\n                                        <RadialGradientBrush.RelativeTransform>\r\n                                            <TransformGroup>\r\n                                                <TranslateTransform X=\"0\" Y=\"-0.5\" />\r\n                                            </TransformGroup>\r\n                                        </RadialGradientBrush.RelativeTransform>\r\n                                        <GradientStop Color=\"#00FFFFFF\" Offset=\"0.3\" />\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                    </RadialGradientBrush>\r\n                                </Border.OpacityMask>\r\n                                <Border.Background>\r\n                                    <RadialGradientBrush>\r\n                                        <RadialGradientBrush.RelativeTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.75\" ScaleY=\"2.25\" />\r\n                                                <TranslateTransform Y=\"0.65\" />\r\n                                            </TransformGroup>\r\n                                        </RadialGradientBrush.RelativeTransform>\r\n                                        <GradientStop Color=\"#00000000\" Offset=\"0.55\" />\r\n                                        <GradientStop Color=\"#33000000\" Offset=\"1\" />\r\n                                    </RadialGradientBrush>\r\n                                </Border.Background>\r\n                            </Border>\r\n                            <Border Margin=\"1,1,1,0\" CornerRadius=\"0,0,7,7\" x:Name=\"Highlight\" Opacity=\"0.8\" RenderTransformOrigin=\"0.5,1\">\r\n                                <Border.Background>\r\n                                    <RadialGradientBrush>\r\n                                        <RadialGradientBrush.RelativeTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.25\" ScaleY=\"2\" />\r\n                                                <TranslateTransform Y=\"-0.6\" />\r\n                                            </TransformGroup>\r\n                                        </RadialGradientBrush.RelativeTransform>\r\n                                        <GradientStop Color=\"#BFFFFFFF\" Offset=\"0\" />\r\n                                        <GradientStop Color=\"#4CFFFFFF\" Offset=\"1\" />\r\n                                    </RadialGradientBrush>\r\n                                </Border.Background>\r\n                            </Border>\r\n                            <Grid Opacity=\"0.8\" Visibility=\"Collapsed\" x:Name=\"Bullet\" Margin=\"-0.25,-0.25,0,0\" RenderTransformOrigin=\"0.5,0.5\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" Grid.RowSpan=\"2\" >\r\n                                <Path Fill=\"{TemplateBinding Foreground}\" Data=\"M1.6045539,4.9657478 L3.9166667,6.7270508 L8.7999792,0.13644244 L10.335848,1.2280303 L4.1581869,9.0391064 L0.39386681,6.6038928 z\" Margin=\"1,-1,-1,0\" Stretch=\"Fill\" StrokeLineJoin=\"Miter\" StrokeMiterLimit=\"10\" VerticalAlignment=\"Stretch\" />\r\n                            </Grid>\r\n                            <Rectangle Stroke=\"{x:Null}\" StrokeThickness=\"0\" x:Name=\"IndeterminateRectangle\" Fill=\"{DynamicResource TextBrush}\" Visibility=\"Collapsed\" Height=\"3\" Margin=\"4,0,4,0\" RadiusX=\"1\" RadiusY=\"1\"  Grid.RowSpan=\"2\" />\r\n                        </Grid>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" RecognizesAccessKey=\"True\" Margin=\"{TemplateBinding Padding}\" x:Name=\"contentPresenter\" Grid.Column=\"1\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"grid\" Value=\"0.5\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--RadioButton-->\r\n    <Style TargetType=\"{x:Type RadioButton}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"#00F4F4F4\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource PrimaryBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Padding\" Value=\"4,1,0,0\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type RadioButton}\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Panel.Background).(GradientBrush.GradientStops)[0].(GradientStop.Offset)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.112\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Shadow\" Storyboard.TargetProperty=\"(Panel.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#49000000\" />\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Bullet\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"White\" Storyboard.TargetProperty=\"(Panel.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#FF000000\" />\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.6\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Panel.Background).(GradientBrush.GradientStops)[0].(GradientStop.Offset)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Bullet\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Bullet\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.55\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.2\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"White\" Storyboard.TargetProperty=\"(Panel.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#FFECECEC\" />\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"White\" Storyboard.TargetProperty=\"(Panel.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#FFECECEC\" />\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"grid\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Bullet\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Bullet\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\" />\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"InnerBorder\" Storyboard.TargetProperty=\"(Border.BorderBrush).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#BF000000\" />\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"16\" />\r\n                            <ColumnDefinition Width=\"*\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Top\" Height=\"16\" Width=\"16\" x:Name=\"grid\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"0.512*\" />\r\n                                <RowDefinition Height=\"0.488*\" />\r\n                            </Grid.RowDefinitions>\r\n                            <Border CornerRadius=\"8\" x:Name=\"White\" BorderBrush=\"#FFB5B5B5\" BorderThickness=\"1.2\" Grid.RowSpan=\"2\">\r\n                                <Border.Background>\r\n                                    <RadialGradientBrush>\r\n                                        <RadialGradientBrush.RelativeTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.35\" ScaleY=\"1.35\" />\r\n                                            </TransformGroup>\r\n                                        </RadialGradientBrush.RelativeTransform>\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                    </RadialGradientBrush>\r\n                                </Border.Background>\r\n                            </Border>\r\n                            <Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1.2\" CornerRadius=\"8\" x:Name=\"Background\" Opacity=\".5\" Grid.RowSpan=\"2\">\r\n                                <Border.Background>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,1.4\" StartPoint=\"0.5,0\">\r\n                                        <GradientStop Color=\"{StaticResource PrimaryColor}\" Offset=\"0.75\" />\r\n                                        <GradientStop Color=\"{StaticResource SecondaryColor}\" Offset=\"1\" />\r\n                                    </LinearGradientBrush>\r\n                                </Border.Background>\r\n                            </Border>\r\n                            <Border Background=\"{TemplateBinding Background}\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\".75\" CornerRadius=\"7\" x:Name=\"InnerBorder\" Margin=\"1,1,1,1\" Grid.RowSpan=\"2\" />\r\n                            <Border CornerRadius=\"5\" x:Name=\"Shadow\" Margin=\"3,3,3,3\" Grid.RowSpan=\"2\">\r\n                                <Border.OpacityMask>\r\n                                    <RadialGradientBrush>\r\n                                        <RadialGradientBrush.RelativeTransform>\r\n                                            <TransformGroup>\r\n                                                <TranslateTransform X=\"0\" Y=\"-0.5\" />\r\n                                            </TransformGroup>\r\n                                        </RadialGradientBrush.RelativeTransform>\r\n                                        <GradientStop Color=\"#00FFFFFF\" Offset=\"0.3\" />\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                    </RadialGradientBrush>\r\n                                </Border.OpacityMask>\r\n                                <Border.Background>\r\n                                    <RadialGradientBrush>\r\n                                        <RadialGradientBrush.RelativeTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.75\" ScaleY=\"2.25\" />\r\n                                                <TranslateTransform Y=\"0.65\" />\r\n                                            </TransformGroup>\r\n                                        </RadialGradientBrush.RelativeTransform>\r\n                                        <GradientStop Color=\"#00000000\" Offset=\"0.55\" />\r\n                                        <GradientStop Color=\"#33000000\" Offset=\"1\" />\r\n                                    </RadialGradientBrush>\r\n                                </Border.Background>\r\n                            </Border>\r\n                            <Border Margin=\"3,1,3,0\" CornerRadius=\"6\" x:Name=\"Highlight\" Opacity=\"0.8\" RenderTransformOrigin=\"0.5,1\" Grid.RowSpan=\"1\">\r\n                                <Border.Background>\r\n                                    <RadialGradientBrush>\r\n                                        <RadialGradientBrush.RelativeTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.25\" ScaleY=\"2\" />\r\n                                                <TranslateTransform Y=\"-0.6\" />\r\n                                            </TransformGroup>\r\n                                        </RadialGradientBrush.RelativeTransform>\r\n                                        <GradientStop Color=\"#BFFFFFFF\" Offset=\"0\" />\r\n                                        <GradientStop Color=\"#4CFFFFFF\" Offset=\"1\" />\r\n                                    </RadialGradientBrush>\r\n                                </Border.Background>\r\n                            </Border>\r\n                            <Grid Opacity=\"0.8\" Visibility=\"Collapsed\" x:Name=\"Bullet\" RenderTransformOrigin=\"0.5,0.5\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" Height=\"6\" Grid.RowSpan=\"2\" Width=\"6\">\r\n                                <Ellipse Fill=\"{TemplateBinding Foreground}\" />\r\n                            </Grid>\r\n                        </Grid>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" RecognizesAccessKey=\"True\" Grid.Column=\"1\" Margin=\"{TemplateBinding Padding}\" IsEnabled=\"False\" Content=\"{TemplateBinding Content}\" x:Name=\"contentPresenter\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"grid\" Value=\"0.5\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--Expander-->\r\n    <Style TargetType=\"{x:Type Expander}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"{x:Null}\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{x:Null}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Expander}\">\r\n                    <ControlTemplate.Resources>\r\n                        <ControlTemplate TargetType=\"{x:Type ToggleButton}\" x:Key=\"ExpanderRightHeaderTemplate\">\r\n                            <Border Padding=\"{TemplateBinding Padding}\">\r\n                                <Grid SnapsToDevicePixels=\"False\" Background=\"Transparent\">\r\n                                    <Grid.RowDefinitions>\r\n                                        <RowDefinition Height=\"19\" />\r\n                                        <RowDefinition Height=\"*\" />\r\n                                    </Grid.RowDefinitions>\r\n                                    <Grid>\r\n                                        <Grid.LayoutTransform>\r\n                                            <TransformGroup>\r\n                                                <TransformGroup.Children>\r\n                                                    <TransformCollection>\r\n                                                        <RotateTransform Angle=\"-90\" />\r\n                                                    </TransformCollection>\r\n                                                </TransformGroup.Children>\r\n                                            </TransformGroup>\r\n                                        </Grid.LayoutTransform>\r\n                                        <Grid HorizontalAlignment=\"Left\" VerticalAlignment=\"Stretch\" Width=\"19\" Height=\"19\">\r\n                                            <Grid.LayoutTransform>\r\n                                                <TransformGroup>\r\n                                                    <RotateTransform Angle=\"90\" />\r\n                                                </TransformGroup>\r\n                                            </Grid.LayoutTransform>\r\n                                            <Grid.RowDefinitions>\r\n                                                <RowDefinition Height=\"50*\" />\r\n                                                <RowDefinition Height=\"50*\" />\r\n                                            </Grid.RowDefinitions>\r\n                                            <Border CornerRadius=\"4\" x:Name=\"White\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1.2\" Grid.RowSpan=\"2\">\r\n                                                <Border.Background>\r\n                                                    <RadialGradientBrush>\r\n                                                        <RadialGradientBrush.RelativeTransform>\r\n                                                            <TransformGroup>\r\n                                                                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.35\" ScaleY=\"1.35\" />\r\n                                                            </TransformGroup>\r\n                                                        </RadialGradientBrush.RelativeTransform>\r\n                                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                                    </RadialGradientBrush>\r\n                                                </Border.Background>\r\n                                            </Border>\r\n                                            <Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1.2\" CornerRadius=\"4\" x:Name=\"Background\" Opacity=\"0.65\" Grid.RowSpan=\"2\">\r\n                                                <Border.Background>\r\n                                                    <LinearGradientBrush EndPoint=\"0.5,1.4\" StartPoint=\"0.5,0\">\r\n                                                        <GradientStop Color=\"{StaticResource PrimaryColor}\" Offset=\"0.75\" />\r\n                                                        <GradientStop Color=\"{StaticResource SecondaryColor}\" Offset=\"1\" />\r\n                                                    </LinearGradientBrush>\r\n                                                </Border.Background>\r\n                                            </Border>\r\n                                            <Border BorderBrush=\"#7FFFFFFF\" BorderThickness=\"1\" CornerRadius=\"3.5\" x:Name=\"InnerBorder\" Margin=\"1\" Grid.RowSpan=\"2\" />\r\n                                            <Border CornerRadius=\"3.5\" x:Name=\"Shadow\" Margin=\"2\" Grid.RowSpan=\"2\">\r\n                                                <Border.OpacityMask>\r\n                                                    <RadialGradientBrush>\r\n                                                        <RadialGradientBrush.RelativeTransform>\r\n                                                            <TransformGroup>\r\n                                                                <TranslateTransform X=\"0\" Y=\"-0.5\" />\r\n                                                            </TransformGroup>\r\n                                                        </RadialGradientBrush.RelativeTransform>\r\n                                                        <GradientStop Color=\"#00FFFFFF\" Offset=\"0.3\" />\r\n                                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                                    </RadialGradientBrush>\r\n                                                </Border.OpacityMask>\r\n                                                <Border.Background>\r\n                                                    <RadialGradientBrush>\r\n                                                        <RadialGradientBrush.RelativeTransform>\r\n                                                            <TransformGroup>\r\n                                                                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.75\" ScaleY=\"2.25\" />\r\n                                                                <TranslateTransform Y=\"0.65\" />\r\n                                                            </TransformGroup>\r\n                                                        </RadialGradientBrush.RelativeTransform>\r\n                                                        <GradientStop Color=\"#00000000\" Offset=\"0.55\" />\r\n                                                        <GradientStop Color=\"#33000000\" Offset=\"1\" />\r\n                                                    </RadialGradientBrush>\r\n                                                </Border.Background>\r\n                                            </Border>\r\n                                            <Border Margin=\"1\" CornerRadius=\"4,4,40,40\" x:Name=\"Highlight\" Opacity=\"0.8\" RenderTransformOrigin=\"0.5,1\">\r\n                                                <Border.Background>\r\n                                                    <RadialGradientBrush>\r\n                                                        <RadialGradientBrush.RelativeTransform>\r\n                                                            <TransformGroup>\r\n                                                                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.25\" ScaleY=\"2\" />\r\n                                                                <TranslateTransform Y=\"-0.6\" />\r\n                                                            </TransformGroup>\r\n                                                        </RadialGradientBrush.RelativeTransform>\r\n                                                        <GradientStop Color=\"#BFFFFFFF\" Offset=\"0\" />\r\n                                                        <GradientStop Color=\"#4CFFFFFF\" Offset=\"1\" />\r\n                                                    </RadialGradientBrush>\r\n                                                </Border.Background>\r\n                                            </Border>\r\n                                        </Grid>\r\n                                        <Path Stroke=\"{DynamicResource TextBrush}\" StrokeThickness=\"2\" HorizontalAlignment=\"Center\" x:Name=\"arrow\" VerticalAlignment=\"Center\" SnapsToDevicePixels=\"false\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                            <Path.RenderTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform ScaleX=\"1\" ScaleY=\"-1\"/>\r\n                                                </TransformGroup>\r\n                                            </Path.RenderTransform>\r\n                                        </Path>\r\n                                    </Grid>\r\n                                    <ContentPresenter HorizontalAlignment=\"Center\" Margin=\"0,4,0,0\" VerticalAlignment=\"Top\" SnapsToDevicePixels=\"True\" Grid.Row=\"1\" RecognizesAccessKey=\"True\" />\r\n                                </Grid>\r\n                            </Border>\r\n                            <ControlTemplate.Triggers>\r\n                                <Trigger Property=\"IsChecked\" Value=\"True\">\r\n                                    <Setter Property=\"RenderTransformOrigin\" TargetName=\"arrow\" Value=\"0.5,0.5\" />\r\n                                    <Setter Property=\"RenderTransform\" TargetName=\"arrow\">\r\n                                        <Setter.Value>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform ScaleX=\"1\" ScaleY=\"1\"/>\r\n                                            </TransformGroup>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsPressed\" Value=\"True\">\r\n                                    <Setter Property=\"Background\" TargetName=\"Background\">\r\n                                        <Setter.Value>\r\n                                            <LinearGradientBrush EndPoint=\"0.5,1.4\" StartPoint=\"0.5,0\">\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.138\" />\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                    <Setter Property=\"Opacity\" TargetName=\"Background\" Value=\"1\" />\r\n                                    <Setter Property=\"Background\" TargetName=\"Shadow\">\r\n                                        <Setter.Value>\r\n                                            <RadialGradientBrush>\r\n                                                <RadialGradientBrush.RelativeTransform>\r\n                                                    <TransformGroup>\r\n                                                        <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.75\" ScaleY=\"2.25\" />\r\n                                                        <TranslateTransform Y=\"0.65\" />\r\n                                                    </TransformGroup>\r\n                                                </RadialGradientBrush.RelativeTransform>\r\n                                                <GradientStop Color=\"#00000000\" Offset=\"0.55\" />\r\n                                                <GradientStop Color=\"#33000000\" Offset=\"1\" />\r\n                                            </RadialGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                    <Setter Property=\"Opacity\" TargetName=\"Highlight\" Value=\"0.5\" />\r\n                                    <Setter Property=\"BorderBrush\" TargetName=\"InnerBorder\" Value=\"#7F000000\" />\r\n                                    <Setter Property=\"Background\" TargetName=\"White\">\r\n                                        <Setter.Value>\r\n                                            <RadialGradientBrush>\r\n                                                <RadialGradientBrush.RelativeTransform>\r\n                                                    <TransformGroup>\r\n                                                        <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.35\" ScaleY=\"1.35\" />\r\n                                                    </TransformGroup>\r\n                                                </RadialGradientBrush.RelativeTransform>\r\n                                                <GradientStop Color=\"#FF2B2B2B\" Offset=\"0\" />\r\n                                                <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                            </RadialGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                                    <Setter Property=\"Background\" TargetName=\"Background\">\r\n                                        <Setter.Value>\r\n                                            <LinearGradientBrush EndPoint=\"0.5,1.4\" StartPoint=\"0.5,0\">\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.089\" />\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                    <Setter Property=\"Opacity\" TargetName=\"Background\" Value=\"1\" />\r\n                                    <Setter Property=\"Background\" TargetName=\"Shadow\">\r\n                                        <Setter.Value>\r\n                                            <RadialGradientBrush>\r\n                                                <RadialGradientBrush.RelativeTransform>\r\n                                                    <TransformGroup>\r\n                                                        <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.75\" ScaleY=\"2.25\" />\r\n                                                        <TranslateTransform Y=\"0.65\" />\r\n                                                    </TransformGroup>\r\n                                                </RadialGradientBrush.RelativeTransform>\r\n                                                <GradientStop Color=\"#00000000\" Offset=\"0.55\" />\r\n                                                <GradientStop Color=\"#4C000000\" Offset=\"1\" />\r\n                                            </RadialGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                    <Setter Property=\"Opacity\" TargetName=\"Highlight\" Value=\"1\" />\r\n                                </Trigger>\r\n                            </ControlTemplate.Triggers>\r\n                        </ControlTemplate>\r\n                        <ControlTemplate x:Key=\"ExpanderUpHeaderTemplate\" TargetType=\"{x:Type ToggleButton}\">\r\n                            <Border Padding=\"{TemplateBinding Padding}\">\r\n                                <Grid SnapsToDevicePixels=\"False\" Background=\"Transparent\">\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition Width=\"19\" />\r\n                                        <ColumnDefinition Width=\"*\" />\r\n                                    </Grid.ColumnDefinitions>\r\n                                    <Grid HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" Width=\"19\" Height=\"19\">\r\n                                        <Grid.RowDefinitions>\r\n                                            <RowDefinition Height=\"50*\" />\r\n                                            <RowDefinition Height=\"50*\" />\r\n                                        </Grid.RowDefinitions>\r\n                                        <Border CornerRadius=\"4\" x:Name=\"White\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1.2\" Grid.RowSpan=\"2\">\r\n                                            <Border.Background>\r\n                                                <RadialGradientBrush>\r\n                                                    <RadialGradientBrush.RelativeTransform>\r\n                                                        <TransformGroup>\r\n                                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.35\" ScaleY=\"1.35\" />\r\n                                                        </TransformGroup>\r\n                                                    </RadialGradientBrush.RelativeTransform>\r\n                                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                                </RadialGradientBrush>\r\n                                            </Border.Background>\r\n                                        </Border>\r\n                                        <Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1.2\" CornerRadius=\"4\" x:Name=\"Background\" Opacity=\"0.65\" Grid.RowSpan=\"2\">\r\n                                            <Border.Background>\r\n                                                <LinearGradientBrush EndPoint=\"0.5,1.4\" StartPoint=\"0.5,0\">\r\n                                                    <GradientStop Color=\"{StaticResource PrimaryColor}\" Offset=\"0.75\" />\r\n                                                    <GradientStop Color=\"{StaticResource SecondaryColor}\" Offset=\"1\" />\r\n                                                </LinearGradientBrush>\r\n                                            </Border.Background>\r\n                                        </Border>\r\n                                        <Border BorderBrush=\"#7FFFFFFF\" BorderThickness=\"1\" CornerRadius=\"3.5\" x:Name=\"InnerBorder\" Margin=\"1\" Grid.RowSpan=\"2\" />\r\n                                        <Border CornerRadius=\"3.5\" x:Name=\"Shadow\" Margin=\"2\" Grid.RowSpan=\"2\">\r\n                                            <Border.OpacityMask>\r\n                                                <RadialGradientBrush>\r\n                                                    <RadialGradientBrush.RelativeTransform>\r\n                                                        <TransformGroup>\r\n                                                            <TranslateTransform X=\"0\" Y=\"-0.5\" />\r\n                                                        </TransformGroup>\r\n                                                    </RadialGradientBrush.RelativeTransform>\r\n                                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"0.3\" />\r\n                                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                                </RadialGradientBrush>\r\n                                            </Border.OpacityMask>\r\n                                            <Border.Background>\r\n                                                <RadialGradientBrush>\r\n                                                    <RadialGradientBrush.RelativeTransform>\r\n                                                        <TransformGroup>\r\n                                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.75\" ScaleY=\"2.25\" />\r\n                                                            <TranslateTransform Y=\"0.65\" />\r\n                                                        </TransformGroup>\r\n                                                    </RadialGradientBrush.RelativeTransform>\r\n                                                    <GradientStop Color=\"#00000000\" Offset=\"0.55\" />\r\n                                                    <GradientStop Color=\"#33000000\" Offset=\"1\" />\r\n                                                </RadialGradientBrush>\r\n                                            </Border.Background>\r\n                                        </Border>\r\n                                        <Border Margin=\"1\" CornerRadius=\"4,4,40,40\" x:Name=\"Highlight\" Opacity=\"0.8\" RenderTransformOrigin=\"0.5,1\">\r\n                                            <Border.Background>\r\n                                                <RadialGradientBrush>\r\n                                                    <RadialGradientBrush.RelativeTransform>\r\n                                                        <TransformGroup>\r\n                                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.25\" ScaleY=\"2\" />\r\n                                                            <TranslateTransform Y=\"-0.6\" />\r\n                                                        </TransformGroup>\r\n                                                    </RadialGradientBrush.RelativeTransform>\r\n                                                    <GradientStop Color=\"#BFFFFFFF\" Offset=\"0\" />\r\n                                                    <GradientStop Color=\"#4CFFFFFF\" Offset=\"1\" />\r\n                                                </RadialGradientBrush>\r\n                                            </Border.Background>\r\n                                        </Border>\r\n                                        <Path Stroke=\"{DynamicResource TextBrush}\" StrokeThickness=\"2\" HorizontalAlignment=\"Center\" x:Name=\"arrow\" VerticalAlignment=\"Center\" SnapsToDevicePixels=\"false\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\" Grid.RowSpan=\"2\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                            <Path.RenderTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform ScaleX=\"1\" ScaleY=\"1\"/>\r\n                                                </TransformGroup>\r\n                                            </Path.RenderTransform>\r\n                                        </Path>\r\n                                    </Grid>\r\n                                    <ContentPresenter HorizontalAlignment=\"Left\" Margin=\"4,0,0,0\" VerticalAlignment=\"Center\" SnapsToDevicePixels=\"True\" Grid.Column=\"1\" RecognizesAccessKey=\"True\" />\r\n                                </Grid>\r\n                            </Border>\r\n                            <ControlTemplate.Triggers>\r\n                                <Trigger Property=\"IsChecked\" Value=\"True\">\r\n                                    <Setter Property=\"RenderTransform\" TargetName=\"arrow\">\r\n                                        <Setter.Value>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform ScaleX=\"1\" ScaleY=\"-1\"/>\r\n                                            </TransformGroup>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsPressed\" Value=\"True\">\r\n                                    <Setter Property=\"Opacity\" TargetName=\"Highlight\" Value=\"0.5\" />\r\n                                    <Setter Property=\"BorderBrush\" TargetName=\"InnerBorder\" Value=\"#7F2F2F2F\" />\r\n                                    <Setter Property=\"Background\" TargetName=\"Background\">\r\n                                        <Setter.Value>\r\n                                            <LinearGradientBrush EndPoint=\"0.5,1.4\" StartPoint=\"0.5,0\">\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0\" />\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                    <Setter Property=\"Opacity\" TargetName=\"Background\" Value=\"1\" />\r\n                                    <Setter Property=\"Background\" TargetName=\"White\">\r\n                                        <Setter.Value>\r\n                                            <RadialGradientBrush>\r\n                                                <RadialGradientBrush.RelativeTransform>\r\n                                                    <TransformGroup>\r\n                                                        <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.35\" ScaleY=\"1.35\" />\r\n                                                    </TransformGroup>\r\n                                                </RadialGradientBrush.RelativeTransform>\r\n                                                <GradientStop Color=\"#FF000000\" Offset=\"0\" />\r\n                                                <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                            </RadialGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                                    <Setter Property=\"Background\" TargetName=\"Background\">\r\n                                        <Setter.Value>\r\n                                            <LinearGradientBrush EndPoint=\"0.5,1.4\" StartPoint=\"0.5,0\">\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.129\" />\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                    <Setter Property=\"Opacity\" TargetName=\"Background\" Value=\"1\" />\r\n                                    <Setter Property=\"Background\" TargetName=\"Shadow\">\r\n                                        <Setter.Value>\r\n                                            <RadialGradientBrush>\r\n                                                <RadialGradientBrush.RelativeTransform>\r\n                                                    <TransformGroup>\r\n                                                        <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.75\" ScaleY=\"2.25\" />\r\n                                                        <TranslateTransform Y=\"0.65\" />\r\n                                                    </TransformGroup>\r\n                                                </RadialGradientBrush.RelativeTransform>\r\n                                                <GradientStop Color=\"#00000000\" Offset=\"0.55\" />\r\n                                                <GradientStop Color=\"#4C000000\" Offset=\"1\" />\r\n                                            </RadialGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                    <Setter Property=\"Opacity\" TargetName=\"Highlight\" Value=\"1\" />\r\n                                </Trigger>\r\n                            </ControlTemplate.Triggers>\r\n                        </ControlTemplate>\r\n                        <ControlTemplate TargetType=\"{x:Type ToggleButton}\" x:Key=\"ExpanderLeftHeaderTemplate\">\r\n                            <Border Padding=\"{TemplateBinding Padding}\">\r\n                                <Grid SnapsToDevicePixels=\"False\" Background=\"Transparent\">\r\n                                    <Grid.RowDefinitions>\r\n                                        <RowDefinition Height=\"19\" />\r\n                                        <RowDefinition Height=\"*\" />\r\n                                    </Grid.RowDefinitions>\r\n                                    <Grid>\r\n                                        <Grid.LayoutTransform>\r\n                                            <TransformGroup>\r\n                                                <TransformGroup.Children>\r\n                                                    <TransformCollection>\r\n                                                        <RotateTransform Angle=\"90\" />\r\n                                                    </TransformCollection>\r\n                                                </TransformGroup.Children>\r\n                                            </TransformGroup>\r\n                                        </Grid.LayoutTransform>\r\n                                        <Grid Width=\"19\" Height=\"19\">\r\n                                            <Grid.LayoutTransform>\r\n                                                <TransformGroup>\r\n                                                    <RotateTransform Angle=\"-90\" />\r\n                                                </TransformGroup>\r\n                                            </Grid.LayoutTransform>\r\n                                            <Grid.RowDefinitions>\r\n                                                <RowDefinition Height=\"50*\" />\r\n                                                <RowDefinition Height=\"50*\" />\r\n                                            </Grid.RowDefinitions>\r\n                                            <Border CornerRadius=\"4\" x:Name=\"White\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1.2\" Grid.RowSpan=\"2\">\r\n                                                <Border.Background>\r\n                                                    <RadialGradientBrush>\r\n                                                        <RadialGradientBrush.RelativeTransform>\r\n                                                            <TransformGroup>\r\n                                                                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.35\" ScaleY=\"1.35\" />\r\n                                                            </TransformGroup>\r\n                                                        </RadialGradientBrush.RelativeTransform>\r\n                                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                                    </RadialGradientBrush>\r\n                                                </Border.Background>\r\n                                            </Border>\r\n                                            <Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1.2\" CornerRadius=\"4\" x:Name=\"Background\" Opacity=\"0.65\" Grid.RowSpan=\"2\">\r\n                                                <Border.Background>\r\n                                                    <LinearGradientBrush EndPoint=\"0.5,1.4\" StartPoint=\"0.5,0\">\r\n                                                        <GradientStop Color=\"{StaticResource PrimaryColor}\" Offset=\"0.75\" />\r\n                                                        <GradientStop Color=\"{StaticResource SecondaryColor}\" Offset=\"1\" />\r\n                                                    </LinearGradientBrush>\r\n                                                </Border.Background>\r\n                                            </Border>\r\n                                            <Border BorderBrush=\"#7FFFFFFF\" BorderThickness=\"1\" CornerRadius=\"3.5\" x:Name=\"InnerBorder\" Margin=\"1\" Grid.RowSpan=\"2\" />\r\n                                            <Border CornerRadius=\"3.5\" x:Name=\"Shadow\" Margin=\"2\" Grid.RowSpan=\"2\">\r\n                                                <Border.OpacityMask>\r\n                                                    <RadialGradientBrush>\r\n                                                        <RadialGradientBrush.RelativeTransform>\r\n                                                            <TransformGroup>\r\n                                                                <TranslateTransform X=\"0\" Y=\"-0.5\" />\r\n                                                            </TransformGroup>\r\n                                                        </RadialGradientBrush.RelativeTransform>\r\n                                                        <GradientStop Color=\"#00FFFFFF\" Offset=\"0.3\" />\r\n                                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                                    </RadialGradientBrush>\r\n                                                </Border.OpacityMask>\r\n                                                <Border.Background>\r\n                                                    <RadialGradientBrush>\r\n                                                        <RadialGradientBrush.RelativeTransform>\r\n                                                            <TransformGroup>\r\n                                                                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.75\" ScaleY=\"2.25\" />\r\n                                                                <TranslateTransform Y=\"0.65\" />\r\n                                                            </TransformGroup>\r\n                                                        </RadialGradientBrush.RelativeTransform>\r\n                                                        <GradientStop Color=\"#00000000\" Offset=\"0.55\" />\r\n                                                        <GradientStop Color=\"#33000000\" Offset=\"1\" />\r\n                                                    </RadialGradientBrush>\r\n                                                </Border.Background>\r\n                                            </Border>\r\n                                            <Border Margin=\"1\" CornerRadius=\"4,4,40,40\" x:Name=\"Highlight\" Opacity=\"0.8\" RenderTransformOrigin=\"0.5,1\">\r\n                                                <Border.Background>\r\n                                                    <RadialGradientBrush>\r\n                                                        <RadialGradientBrush.RelativeTransform>\r\n                                                            <TransformGroup>\r\n                                                                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.25\" ScaleY=\"2\" />\r\n                                                                <TranslateTransform Y=\"-0.6\" />\r\n                                                            </TransformGroup>\r\n                                                        </RadialGradientBrush.RelativeTransform>\r\n                                                        <GradientStop Color=\"#BFFFFFFF\" Offset=\"0\" />\r\n                                                        <GradientStop Color=\"#4CFFFFFF\" Offset=\"1\" />\r\n                                                    </RadialGradientBrush>\r\n                                                </Border.Background>\r\n                                            </Border>\r\n                                            <Path Stroke=\"{DynamicResource TextBrush}\" StrokeThickness=\"2\" HorizontalAlignment=\"Center\" x:Name=\"arrow\" VerticalAlignment=\"Center\" SnapsToDevicePixels=\"false\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\"  RenderTransformOrigin=\"0.5,0.5\" Grid.RowSpan=\"2\">\r\n                                                <Path.RenderTransform>\r\n                                                    <TransformGroup>\r\n                                                        <ScaleTransform ScaleX=\"-1\" ScaleY=\"1\"/>\r\n                                                        <RotateTransform Angle=\"-90\"/>\r\n                                                    </TransformGroup>\r\n                                                </Path.RenderTransform>\r\n                                            </Path>\r\n                                        </Grid>\r\n                                    </Grid>\r\n                                    <ContentPresenter HorizontalAlignment=\"Center\" Margin=\"0,4,0,0\" VerticalAlignment=\"Top\" SnapsToDevicePixels=\"True\" Grid.Row=\"1\" RecognizesAccessKey=\"True\" />\r\n                                </Grid>\r\n                            </Border>\r\n                            <ControlTemplate.Triggers>\r\n                                <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                                    <Setter Property=\"Data\" TargetName=\"arrow\" Value=\"M 1,4.5  L 4.5,1  L 8,4.5\" />\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                                    <Setter Property=\"Background\" TargetName=\"Background\">\r\n                                        <Setter.Value>\r\n                                            <LinearGradientBrush EndPoint=\"0.5,1.4\" StartPoint=\"0.5,0\">\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.089\" />\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                    <Setter Property=\"Opacity\" TargetName=\"Background\" Value=\"1\" />\r\n                                    <Setter Property=\"Background\" TargetName=\"Shadow\">\r\n                                        <Setter.Value>\r\n                                            <RadialGradientBrush>\r\n                                                <RadialGradientBrush.RelativeTransform>\r\n                                                    <TransformGroup>\r\n                                                        <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.75\" ScaleY=\"2.25\" />\r\n                                                        <TranslateTransform Y=\"0.65\" />\r\n                                                    </TransformGroup>\r\n                                                </RadialGradientBrush.RelativeTransform>\r\n                                                <GradientStop Color=\"#00000000\" Offset=\"0.55\" />\r\n                                                <GradientStop Color=\"#4C000000\" Offset=\"1\" />\r\n                                            </RadialGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                    <Setter Property=\"Opacity\" TargetName=\"Highlight\" Value=\"1\" />\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                                    <Setter Property=\"Stroke\" TargetName=\"arrow\" Value=\"#FF003366\" />\r\n                                    <Setter Property=\"Opacity\" TargetName=\"Highlight\" Value=\"0.5\" />\r\n                                    <Setter Property=\"BorderBrush\" TargetName=\"InnerBorder\" Value=\"#7F202020\" />\r\n                                    <Setter Property=\"Background\" TargetName=\"Background\">\r\n                                        <Setter.Value>\r\n                                            <LinearGradientBrush EndPoint=\"0.5,1.4\" StartPoint=\"0.5,0\">\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0\" />\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                    <Setter Property=\"Opacity\" TargetName=\"Background\" Value=\"1\" />\r\n                                    <Setter Property=\"Background\" TargetName=\"White\">\r\n                                        <Setter.Value>\r\n                                            <RadialGradientBrush>\r\n                                                <RadialGradientBrush.RelativeTransform>\r\n                                                    <TransformGroup>\r\n                                                        <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.35\" ScaleY=\"1.35\" />\r\n                                                    </TransformGroup>\r\n                                                </RadialGradientBrush.RelativeTransform>\r\n                                                <GradientStop Color=\"#FF0C0C0C\" Offset=\"0\" />\r\n                                                <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                            </RadialGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                </Trigger>\r\n                            </ControlTemplate.Triggers>\r\n                        </ControlTemplate>\r\n                        <ControlTemplate TargetType=\"{x:Type ToggleButton}\" x:Key=\"ExpanderDownHeaderTemplate\">\r\n                            <Border Padding=\"{TemplateBinding Padding}\">\r\n                                <Grid SnapsToDevicePixels=\"False\" Background=\"Transparent\">\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition Width=\"19\" />\r\n                                        <ColumnDefinition Width=\"*\" />\r\n                                    </Grid.ColumnDefinitions>\r\n                                    <Grid HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" Width=\"19\" Height=\"19\">\r\n                                        <Grid.RowDefinitions>\r\n                                            <RowDefinition Height=\"50*\" />\r\n                                            <RowDefinition Height=\"50*\" />\r\n                                        </Grid.RowDefinitions>\r\n                                        <Border CornerRadius=\"4\" x:Name=\"White\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1.2\" Grid.RowSpan=\"2\">\r\n                                            <Border.Background>\r\n                                                <RadialGradientBrush>\r\n                                                    <RadialGradientBrush.RelativeTransform>\r\n                                                        <TransformGroup>\r\n                                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.35\" ScaleY=\"1.35\" />\r\n                                                        </TransformGroup>\r\n                                                    </RadialGradientBrush.RelativeTransform>\r\n                                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                                </RadialGradientBrush>\r\n                                            </Border.Background>\r\n                                        </Border>\r\n                                        <Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1.2\" CornerRadius=\"4\" x:Name=\"Background\" Opacity=\"0.65\" Grid.RowSpan=\"2\">\r\n                                            <Border.Background>\r\n                                                <LinearGradientBrush EndPoint=\"0.5,1.4\" StartPoint=\"0.5,0\">\r\n                                                    <GradientStop Color=\"{StaticResource PrimaryColor}\" Offset=\"0.75\" />\r\n                                                    <GradientStop Color=\"{StaticResource SecondaryColor}\" Offset=\"1\" />\r\n                                                </LinearGradientBrush>\r\n                                            </Border.Background>\r\n                                        </Border>\r\n                                        <Border BorderBrush=\"#7FFFFFFF\" BorderThickness=\"1\" CornerRadius=\"3.5\" x:Name=\"InnerBorder\" Margin=\"1\" Grid.RowSpan=\"2\" />\r\n                                        <Border CornerRadius=\"3.5\" x:Name=\"Shadow\" Margin=\"2\" Grid.RowSpan=\"2\">\r\n                                            <Border.OpacityMask>\r\n                                                <RadialGradientBrush>\r\n                                                    <RadialGradientBrush.RelativeTransform>\r\n                                                        <TransformGroup>\r\n                                                            <TranslateTransform X=\"0\" Y=\"-0.5\" />\r\n                                                        </TransformGroup>\r\n                                                    </RadialGradientBrush.RelativeTransform>\r\n                                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"0.3\" />\r\n                                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                                </RadialGradientBrush>\r\n                                            </Border.OpacityMask>\r\n                                            <Border.Background>\r\n                                                <RadialGradientBrush>\r\n                                                    <RadialGradientBrush.RelativeTransform>\r\n                                                        <TransformGroup>\r\n                                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.75\" ScaleY=\"2.25\" />\r\n                                                            <TranslateTransform Y=\"0.65\" />\r\n                                                        </TransformGroup>\r\n                                                    </RadialGradientBrush.RelativeTransform>\r\n                                                    <GradientStop Color=\"#00000000\" Offset=\"0.55\" />\r\n                                                    <GradientStop Color=\"#33000000\" Offset=\"1\" />\r\n                                                </RadialGradientBrush>\r\n                                            </Border.Background>\r\n                                        </Border>\r\n                                        <Border Margin=\"1\" CornerRadius=\"4,4,40,40\" x:Name=\"Highlight\" Opacity=\"0.8\" RenderTransformOrigin=\"0.5,1\">\r\n                                            <Border.Background>\r\n                                                <RadialGradientBrush>\r\n                                                    <RadialGradientBrush.RelativeTransform>\r\n                                                        <TransformGroup>\r\n                                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.25\" ScaleY=\"2\" />\r\n                                                            <TranslateTransform Y=\"-0.6\" />\r\n                                                        </TransformGroup>\r\n                                                    </RadialGradientBrush.RelativeTransform>\r\n                                                    <GradientStop Color=\"#BFFFFFFF\" Offset=\"0\" />\r\n                                                    <GradientStop Color=\"#4CFFFFFF\" Offset=\"1\" />\r\n                                                </RadialGradientBrush>\r\n                                            </Border.Background>\r\n                                        </Border>\r\n                                        <Path Stroke=\"{DynamicResource TextBrush}\" StrokeThickness=\"2\" HorizontalAlignment=\"Center\" x:Name=\"arrow\" VerticalAlignment=\"Center\" SnapsToDevicePixels=\"false\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\"  Grid.RowSpan=\"23\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                            <Path.RenderTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform ScaleX=\"1\" ScaleY=\"-1\"/>\r\n                                                </TransformGroup>\r\n                                            </Path.RenderTransform>\r\n                                        </Path>\r\n                                    </Grid>\r\n                                    <ContentPresenter HorizontalAlignment=\"Left\" Margin=\"4,0,0,0\" VerticalAlignment=\"Center\" SnapsToDevicePixels=\"True\" Grid.Column=\"1\" RecognizesAccessKey=\"True\" />\r\n                                </Grid>\r\n                            </Border>\r\n                            <ControlTemplate.Triggers>\r\n                                <Trigger Property=\"IsChecked\" Value=\"True\">\r\n                                    <Setter Property=\"RenderTransformOrigin\" TargetName=\"arrow\" Value=\"0.5,0.5\" />\r\n                                    <Setter Property=\"RenderTransform\" TargetName=\"arrow\">\r\n                                        <Setter.Value>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform ScaleX=\"1\" ScaleY=\"1\"/>\r\n                                            </TransformGroup>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsPressed\" Value=\"True\">\r\n                                    <Setter Property=\"Background\" TargetName=\"White\">\r\n                                        <Setter.Value>\r\n                                            <RadialGradientBrush>\r\n                                                <RadialGradientBrush.RelativeTransform>\r\n                                                    <TransformGroup>\r\n                                                        <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.35\" ScaleY=\"1.35\" />\r\n                                                    </TransformGroup>\r\n                                                </RadialGradientBrush.RelativeTransform>\r\n                                                <GradientStop Color=\"#FF141414\" Offset=\"0\" />\r\n                                                <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                            </RadialGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                    <Setter Property=\"Background\" TargetName=\"Background\">\r\n                                        <Setter.Value>\r\n                                            <LinearGradientBrush EndPoint=\"0.5,1.4\" StartPoint=\"0.5,0\">\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0\" />\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                    <Setter Property=\"Opacity\" TargetName=\"Background\" Value=\"1\" />\r\n                                    <Setter Property=\"BorderBrush\" TargetName=\"InnerBorder\" Value=\"#7F686868\" />\r\n                                    <Setter Property=\"Opacity\" TargetName=\"Highlight\" Value=\"0.5\" />\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                                    <Setter Property=\"Background\" TargetName=\"Background\">\r\n                                        <Setter.Value>\r\n                                            <LinearGradientBrush EndPoint=\"0.5,1.4\" StartPoint=\"0.5,0\">\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.143\" />\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                    <Setter Property=\"Opacity\" TargetName=\"Background\" Value=\"1\" />\r\n                                    <Setter Property=\"Background\" TargetName=\"Shadow\">\r\n                                        <Setter.Value>\r\n                                            <RadialGradientBrush>\r\n                                                <RadialGradientBrush.RelativeTransform>\r\n                                                    <TransformGroup>\r\n                                                        <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.75\" ScaleY=\"2.25\" />\r\n                                                        <TranslateTransform Y=\"0.65\" />\r\n                                                    </TransformGroup>\r\n                                                </RadialGradientBrush.RelativeTransform>\r\n                                                <GradientStop Color=\"#00000000\" Offset=\"0.55\" />\r\n                                                <GradientStop Color=\"#4C000000\" Offset=\"1\" />\r\n                                            </RadialGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                    <Setter Property=\"Opacity\" TargetName=\"Highlight\" Value=\"1\" />\r\n                                </Trigger>\r\n                            </ControlTemplate.Triggers>\r\n                        </ControlTemplate>\r\n                    </ControlTemplate.Resources>\r\n                    <Border SnapsToDevicePixels=\"true\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" x:Name=\"border\" Background=\"#00A7A6A6\">\r\n                        <DockPanel>\r\n                            <ToggleButton Margin=\"1\" MinHeight=\"0\" MinWidth=\"0\" x:Name=\"HeaderSite\" Template=\"{StaticResource ExpanderDownHeaderTemplate}\" Content=\"{TemplateBinding Header}\" ContentTemplate=\"{TemplateBinding HeaderTemplate}\" ContentTemplateSelector=\"{TemplateBinding HeaderTemplateSelector}\" FontFamily=\"{TemplateBinding FontFamily}\" FontSize=\"{TemplateBinding FontSize}\" FontStretch=\"{TemplateBinding FontStretch}\" FontStyle=\"{TemplateBinding FontStyle}\" FontWeight=\"{TemplateBinding FontWeight}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\" IsChecked=\"{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" DockPanel.Dock=\"Top\" Background=\"#FF000000\" BorderBrush=\"{DynamicResource PrimaryBrush}\" Opacity=\"1\" />\r\n                            <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"ExpandSite\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Focusable=\"false\" Visibility=\"Collapsed\" />\r\n                        </DockPanel>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsExpanded\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"ExpandSite\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Right\">\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Right\" />\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Left\" />\r\n                            <Setter Property=\"Template\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderRightHeaderTemplate}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Up\">\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Top\" />\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Bottom\" />\r\n                            <Setter Property=\"Template\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderUpHeaderTemplate}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"ExpandDirection\" Value=\"Left\">\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Left\" />\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Right\" />\r\n                            <Setter Property=\"Template\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderLeftHeaderTemplate}\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"ExpandSite\" Value=\"0.5\" />\r\n                            <Setter Property=\"Opacity\" TargetName=\"HeaderSite\" Value=\"0.5\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- TextBox -->\r\n    <Style TargetType=\"{x:Type TextBox}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"#FFFFFFFF\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource SecondaryBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Padding\" Value=\"1\" />\r\n        <Setter Property=\"AllowDrop\" Value=\"true\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\" />\r\n        <Setter Property=\"MinWidth\" Value=\"0\" />\r\n        <Setter Property=\"MinHeight\" Value=\"0\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TextBox}\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"White\" Storyboard.TargetProperty=\"(Border.BorderBrush).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#FF000000\" />\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.8\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.2\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"PART_ContentHost\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledLayer\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\" Value=\"{x:Static Visibility.Visible}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ReadOnly\" />\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusedStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"White\" Storyboard.TargetProperty=\"(Border.BorderBrush).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#FF000000\" />\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.8\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"Inner\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.75\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border Background=\"#FFFFFFFF\" BorderThickness=\"1\" x:Name=\"White\" BorderBrush=\"#FFFFFFFF\" />\r\n                        <Border Background=\"{TemplateBinding Background}\" BorderThickness=\"1\" x:Name=\"Background\" Opacity=\"0.5\">\r\n                            <Border.BorderBrush>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"{StaticResource PrimaryColor}\" />\r\n                                    <GradientStop Color=\"{StaticResource SecondaryColor}\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Border.BorderBrush>\r\n                        </Border>\r\n                        <Rectangle Fill=\"{x:Null}\" Stroke=\"{DynamicResource SecondaryBrush}\" Margin=\"1,1,1,1\" x:Name=\"Inner\" Opacity=\"0.2\">\r\n                            <Rectangle.OpacityMask>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.196\" />\r\n                                    <GradientStop Color=\"#00000000\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.OpacityMask>\r\n                        </Rectangle>\r\n                        <ScrollViewer x:Name=\"PART_ContentHost\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Margin=\"2,2,2,2\" />\r\n                        <Border x:Name=\"DisabledLayer\" BorderBrush=\"{x:Null}\" Visibility=\"Collapsed\" >\r\n                            <Border.Background>\r\n                                <SolidColorBrush Color=\"{DynamicResource DisabledColor}\"/>\r\n                            </Border.Background>\r\n                        </Border>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"PART_ContentHost\" Value=\"0.2\"/>\r\n                            <Setter Property=\"Opacity\" TargetName=\"Background\" Value=\"0.2\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- PasswordBox -->\r\n    <Style TargetType=\"{x:Type PasswordBox}\">\r\n        <Setter Property=\"Background\" Value=\"#FFFFFFFF\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource SecondaryBrush}\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Times New Roman\" />\r\n        <Setter Property=\"PasswordChar\" Value=\"●\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"Padding\" Value=\"1\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\" />\r\n        <Setter Property=\"AllowDrop\" Value=\"true\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type PasswordBox}\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"rectangle\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#FF000000\" />\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"rectangle1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.8\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"PART_ContentHost\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"rectangle1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.2\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisableLayer\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\" Value=\"{x:Static Visibility.Visible}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ReadOnly\" />\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusedStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"rectangle\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#FF000000\" />\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"rectangle1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.8\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"rectangle2\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.75\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Rectangle Fill=\"{TemplateBinding Background}\" Stroke=\"#FFFFFFFF\" x:Name=\"rectangle\" />\r\n                        <Rectangle Fill=\"#FFFFFFFF\" Opacity=\"0.5\" x:Name=\"rectangle1\">\r\n                            <Rectangle.Stroke>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.Stroke>\r\n                        </Rectangle>\r\n                        <Rectangle Fill=\"{x:Null}\" Stroke=\"{DynamicResource SecondaryBrush}\" Margin=\"1,1,1,1\" Opacity=\"0.2\" x:Name=\"rectangle2\">\r\n                            <Rectangle.OpacityMask>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.196\" />\r\n                                    <GradientStop Color=\"#00000000\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.OpacityMask>\r\n                        </Rectangle>\r\n                        <ScrollViewer x:Name=\"PART_ContentHost\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" />\r\n                        <Rectangle x:Name=\"DisableLayer\" StrokeThickness=\"0\" Visibility=\"Collapsed\" >\r\n                            <Rectangle.Fill>\r\n                                <SolidColorBrush Color=\"{DynamicResource DisabledColor}\"/>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Setter Property=\"Stroke\" TargetName=\"rectangle\" Value=\"#FF000000\"/>\r\n                            <Setter Property=\"Opacity\" TargetName=\"rectangle1\" Value=\"0.8\"/>\r\n                            <Setter Property=\"Opacity\" TargetName=\"rectangle2\" Value=\"0.75\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Setter Property=\"Stroke\" TargetName=\"rectangle\" Value=\"#FF000000\"/>\r\n                            <Setter Property=\"Opacity\" TargetName=\"rectangle1\" Value=\"0.8\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"DisableLayer\" Value=\"Visible\"/>\r\n                            <Setter Property=\"Opacity\" TargetName=\"PART_ContentHost\" Value=\"0.2\"/>\r\n                            <Setter Property=\"Opacity\" TargetName=\"rectangle1\" Value=\"0.2\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- RichTextBox -->\r\n    <Style TargetType=\"{x:Type RichTextBox}\">\r\n        <Style.Resources>\r\n            <Style x:Key=\"{x:Type FlowDocument}\" TargetType=\"{x:Type FlowDocument}\">\r\n                <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n            </Style>\r\n        </Style.Resources>\r\n        <Setter Property=\"MinWidth\" Value=\"10\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"#FFFFFFFF\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource PrimaryBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Padding\" Value=\"1\" />\r\n        <Setter Property=\"AllowDrop\" Value=\"true\" />\r\n        <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TextBoxBase}\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"rectangle\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#FF000000\" />\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"rectangle1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.8\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"rectangle1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.2\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"PART_ContentHost\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisableLayer\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\" Value=\"{x:Static Visibility.Visible}\"/>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ReadOnly\" />\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusedStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"rectangle\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"0\" Value=\"#FF000000\" />\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"rectangle1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.8\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"rectangle2\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.75\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"UnFocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Rectangle Fill=\"#FFFFFFFF\" Stroke=\"#FFFFFFFF\" x:Name=\"rectangle\" />\r\n                        <Rectangle Fill=\"{TemplateBinding Background}\" Opacity=\"0.5\" x:Name=\"rectangle1\">\r\n                            <Rectangle.Stroke>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.Stroke>\r\n                        </Rectangle>\r\n                        <Rectangle Fill=\"{x:Null}\" Stroke=\"{DynamicResource SecondaryBrush}\" Margin=\"1,1,1,1\" Opacity=\"0.2\" x:Name=\"rectangle2\">\r\n                            <Rectangle.OpacityMask>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.205\" />\r\n                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.OpacityMask>\r\n                        </Rectangle>\r\n                        <ScrollViewer x:Name=\"PART_ContentHost\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Margin=\"2,2,2,2\" Template=\"{DynamicResource ScrollViewer}\" />\r\n                        <Rectangle Stroke=\"#FFFFFFFF\" x:Name=\"DisableLayer\" Visibility=\"Collapsed\" >\r\n                            <Rectangle.Fill>\r\n                                <SolidColorBrush Color=\"{DynamicResource DisabledColor}\"/>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"rectangle1\" Value=\"0.2\"/>\r\n                            <Setter Property=\"Opacity\" TargetName=\"PART_ContentHost\" Value=\"0.2\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- Thumb -->\r\n    <Style TargetType=\"{x:Type Thumb}\">\r\n        <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\" />\r\n        <Setter Property=\"Background\" Value=\"#FF1F3B53\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource PrimaryBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                    <Grid>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"0.5*\" />\r\n                            <RowDefinition Height=\"0.5*\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Rectangle Stroke=\"#FFFFFFFF\" RadiusX=\"4\" RadiusY=\"4\" Grid.RowSpan=\"2\" StrokeThickness=\"0.5\">\r\n                            <Rectangle.Fill>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                        <Rectangle Stroke=\"{TemplateBinding BorderBrush}\" Grid.RowSpan=\"2\" Opacity=\"0.8\" RadiusX=\"4\" RadiusY=\"4\" StrokeThickness=\"0.5\" x:Name=\"rectangle\">\r\n                            <Rectangle.Fill>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1.29\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.67\" />\r\n                                    <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                        <Rectangle Fill=\"{x:Null}\" Stroke=\"#7FFFFFFF\" Grid.RowSpan=\"2\" RadiusX=\"3.5\" RadiusY=\"3.5\" Margin=\"0.5,0.5,0.5,0.5\" StrokeThickness=\"0.5\" x:Name=\"rectangle3\" />\r\n                        <Rectangle Grid.RowSpan=\"2\" RadiusX=\"3.5\" RadiusY=\"3.5\" StrokeThickness=\"0.5\" Margin=\"1,1,1,1\" x:Name=\"rectangle1\">\r\n                            <Rectangle.OpacityMask>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <TranslateTransform X=\"0\" Y=\"-0.5\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"0.348\" />\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Rectangle.OpacityMask>\r\n                            <Rectangle.Fill>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.886\" ScaleY=\"2.025\" />\r\n                                            <TranslateTransform X=\"-0.016\" Y=\"0.512\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"0.518\" />\r\n                                    <GradientStop Color=\"#33000000\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                        <Border Margin=\"0.5,0.5,0.5,0\" CornerRadius=\"12,12,30,30\" Opacity=\"0.8\" x:Name=\"border\">\r\n                            <Border.Background>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.317\" ScaleY=\"1.918\" />\r\n                                            <TranslateTransform X=\"0\" Y=\"-0.505\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#BFFFFFFF\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#4CFFFFFF\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <Rectangle Stroke=\"#FF000000\" Grid.RowSpan=\"2\" RadiusX=\"4\" RadiusY=\"4\" StrokeThickness=\"0\" Visibility=\"Collapsed\" x:Name=\"rectangle2\">\r\n                            <Rectangle.Fill>\r\n                                <SolidColorBrush Color=\"{DynamicResource DisabledColor}\" />\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                            <Setter Property=\"Stroke\" TargetName=\"rectangle3\" Value=\"#BF000000\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Setter Property=\"Fill\" TargetName=\"rectangle\">\r\n                                <Setter.Value>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,1.29\" StartPoint=\"0.5,0\">\r\n                                        <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0\" />\r\n                                        <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                    </LinearGradientBrush>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                            <Setter Property=\"Opacity\" TargetName=\"rectangle\" Value=\"1\" />\r\n                            <Setter Property=\"Fill\" TargetName=\"rectangle1\">\r\n                                <Setter.Value>\r\n                                    <RadialGradientBrush>\r\n                                        <RadialGradientBrush.RelativeTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.886\" ScaleY=\"2.025\" />\r\n                                                <TranslateTransform X=\"-0.016\" Y=\"0.512\" />\r\n                                            </TransformGroup>\r\n                                        </RadialGradientBrush.RelativeTransform>\r\n                                        <GradientStop Color=\"#00FFFFFF\" Offset=\"0.518\" />\r\n                                        <GradientStop Color=\"#4C000000\" Offset=\"1\" />\r\n                                    </RadialGradientBrush>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                            <Setter Property=\"Opacity\" TargetName=\"border\" Value=\"1\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"Foreground\" Value=\"Blue\" />\r\n                        <Trigger Property=\"IsDragging\" Value=\"true\">\r\n                            <Setter Property=\"Stroke\" TargetName=\"rectangle3\" Value=\"#7F515151\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"rectangle2\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Focusable\" Value=\"True\"/>\r\n    </Style>\r\n\r\n    <!-- Slider -->\r\n    <Style TargetType=\"{x:Type Slider}\">\r\n        <Style.Resources>\r\n            <Style x:Key=\"SliderRepeatButtonStyle\" TargetType=\"{x:Type RepeatButton}\">\r\n                <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n                <Setter Property=\"IsTabStop\" Value=\"false\" />\r\n                <Setter Property=\"Focusable\" Value=\"false\" />\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n                            <Rectangle Fill=\"Transparent\" />\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n        </Style.Resources>\r\n        <Setter Property=\"Stylus.IsPressAndHoldEnabled\" Value=\"false\" />\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"Foreground\" Value=\"#FFC4C4C4\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Slider}\">\r\n                    <Border SnapsToDevicePixels=\"true\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\">\r\n                        <Grid>\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\" />\r\n                                <RowDefinition Height=\"Auto\" MinHeight=\"{TemplateBinding MinHeight}\" />\r\n                                <RowDefinition Height=\"Auto\" />\r\n                            </Grid.RowDefinitions>\r\n                            <TickBar x:Name=\"TopTick\" Height=\"4\" Visibility=\"Collapsed\" Fill=\"{TemplateBinding Foreground}\" Placement=\"Top\" />\r\n                            <TickBar x:Name=\"BottomTick\" Height=\"4\" Visibility=\"Collapsed\" Grid.Row=\"2\" Fill=\"{TemplateBinding Foreground}\" Placement=\"Bottom\" />\r\n                            <Border Margin=\"5,0\" x:Name=\"TrackBackground\" VerticalAlignment=\"center\" Height=\"4.0\" Grid.Row=\"1\" Background=\"#FFE6EFF7\" BorderBrush=\"#FFA3AEB9\" BorderThickness=\"1\" CornerRadius=\"1\">\r\n                                <Canvas Margin=\"-6,-1\">\r\n                                    <Rectangle Fill=\"{DynamicResource {x:Static SystemColors.HighlightBrushKey}}\" Stroke=\"{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}\" StrokeThickness=\"1.0\" x:Name=\"PART_SelectionRange\" Height=\"4.0\" Visibility=\"Hidden\" />\r\n                                </Canvas>\r\n                            </Border>\r\n                            <Track x:Name=\"PART_Track\" Grid.Row=\"1\">\r\n                                <Track.DecreaseRepeatButton>\r\n                                    <RepeatButton Style=\"{StaticResource SliderRepeatButtonStyle}\" Command=\"{x:Static Slider.DecreaseLarge}\" />\r\n                                </Track.DecreaseRepeatButton>\r\n                                <Track.IncreaseRepeatButton>\r\n                                    <RepeatButton Style=\"{StaticResource SliderRepeatButtonStyle}\" Command=\"{x:Static Slider.IncreaseLarge}\" />\r\n                                </Track.IncreaseRepeatButton>\r\n                                <Track.Thumb>\r\n                                    <Thumb x:Name=\"Thumb\" Width=\"11\" Height=\"22\" />\r\n                                </Track.Thumb>\r\n                            </Track>\r\n                        </Grid>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"TickPlacement\" Value=\"TopLeft\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"TopTick\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"TickPlacement\" Value=\"BottomRight\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"BottomTick\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"TickPlacement\" Value=\"Both\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"TopTick\" Value=\"Visible\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"BottomTick\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsSelectionRangeEnabled\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"PART_SelectionRange\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                            <Setter Property=\"Foreground\" TargetName=\"Thumb\" Value=\"Blue\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Style.Triggers>\r\n            <Trigger Property=\"Orientation\" Value=\"Vertical\">\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"{x:Type Slider}\">\r\n                            <Border SnapsToDevicePixels=\"true\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\">\r\n                                <Grid>\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition Width=\"Auto\" />\r\n                                        <ColumnDefinition MinWidth=\"{TemplateBinding MinWidth}\" Width=\"Auto\" />\r\n                                        <ColumnDefinition Width=\"Auto\" />\r\n                                    </Grid.ColumnDefinitions>\r\n                                    <TickBar x:Name=\"TopTick\" Width=\"4\" Visibility=\"Collapsed\" Fill=\"{TemplateBinding Foreground}\" Placement=\"Left\" />\r\n                                    <TickBar x:Name=\"BottomTick\" Width=\"4\" Visibility=\"Collapsed\" Grid.Column=\"2\" Fill=\"{TemplateBinding Foreground}\" Placement=\"Right\" />\r\n                                    <Border HorizontalAlignment=\"center\" Margin=\"0,5\" x:Name=\"TrackBackground\" Width=\"4.0\" Grid.Column=\"1\" BorderThickness=\"1\" CornerRadius=\"1\" Background=\"#FFE6EFF7\" BorderBrush=\"#FFA3AEB9\">\r\n                                        <Canvas Margin=\"-1,-6\">\r\n                                            <Rectangle Fill=\"{DynamicResource {x:Static SystemColors.HighlightBrushKey}}\" Stroke=\"{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}\" StrokeThickness=\"1.0\" x:Name=\"PART_SelectionRange\" Width=\"4.0\" Visibility=\"Hidden\" />\r\n                                        </Canvas>\r\n                                    </Border>\r\n                                    <Track x:Name=\"PART_Track\" Grid.Column=\"1\">\r\n                                        <Track.DecreaseRepeatButton>\r\n                                            <RepeatButton Style=\"{StaticResource SliderRepeatButtonStyle}\" Command=\"{x:Static Slider.DecreaseLarge}\" />\r\n                                        </Track.DecreaseRepeatButton>\r\n                                        <Track.IncreaseRepeatButton>\r\n                                            <RepeatButton Style=\"{StaticResource SliderRepeatButtonStyle}\" Command=\"{x:Static Slider.IncreaseLarge}\" />\r\n                                        </Track.IncreaseRepeatButton>\r\n                                        <Track.Thumb>\r\n                                            <Thumb x:Name=\"Thumb\" RenderTransformOrigin=\"0.5,0.5\" Width=\"22\" Height=\"11\"/>\r\n                                        </Track.Thumb>\r\n                                    </Track>\r\n                                </Grid>\r\n                            </Border>\r\n                            <ControlTemplate.Triggers>\r\n                                <Trigger Property=\"TickPlacement\" Value=\"TopLeft\">\r\n                                    <Setter Property=\"Visibility\" TargetName=\"TopTick\" Value=\"Visible\" />\r\n                                </Trigger>\r\n                                <Trigger Property=\"TickPlacement\" Value=\"BottomRight\">\r\n                                    <Setter Property=\"Visibility\" TargetName=\"BottomTick\" Value=\"Visible\" />\r\n                                </Trigger>\r\n                                <Trigger Property=\"TickPlacement\" Value=\"Both\">\r\n                                    <Setter Property=\"Visibility\" TargetName=\"TopTick\" Value=\"Visible\" />\r\n                                    <Setter Property=\"Visibility\" TargetName=\"BottomTick\" Value=\"Visible\" />\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsSelectionRangeEnabled\" Value=\"true\">\r\n                                    <Setter Property=\"Visibility\" TargetName=\"PART_SelectionRange\" Value=\"Visible\" />\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                                    <Setter Property=\"Foreground\" TargetName=\"Thumb\" Value=\"Blue\" />\r\n                                </Trigger>\r\n                            </ControlTemplate.Triggers>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Trigger>\r\n        </Style.Triggers>\r\n    </Style>\r\n\r\n    <!-- ScrollBar -->\r\n    <Style TargetType=\"{x:Type ScrollBar}\">\r\n        <Style.Resources>\r\n            <Style x:Key=\"ScrollBarButton\" TargetType=\"{x:Type RepeatButton}\">\r\n                <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n                <Setter Property=\"Focusable\" Value=\"false\" />\r\n                <Setter Property=\"IsTabStop\" Value=\"false\" />\r\n                <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n                <Setter Property=\"Background\" Value=\"#00000000\" />\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n                            <Border Background=\"{TemplateBinding Background}\">\r\n                                <Path Fill=\"{TemplateBinding Foreground}\" Stretch=\"Fill\" Stroke=\"{x:Null}\" Width=\"8\" Height=\"4\" Data=\"M3.9375,0.5 L7.5,3.5 0.5,3.5 z\" />\r\n                            </Border>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n            <Style x:Key=\"ScrollBarPageButton\" TargetType=\"{x:Type RepeatButton}\">\r\n                <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n                <Setter Property=\"Background\" Value=\"Transparent\" />\r\n                <Setter Property=\"Focusable\" Value=\"false\" />\r\n                <Setter Property=\"IsTabStop\" Value=\"false\" />\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n                            <Rectangle Fill=\"{TemplateBinding Background}\" Width=\"{TemplateBinding Width}\" Height=\"{TemplateBinding Height}\" />\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n            <Style x:Key=\"ScrollBarThumb\" TargetType=\"{x:Type Thumb}\">\r\n                <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n                <Setter Property=\"IsTabStop\" Value=\"false\" />\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                            <Grid>\r\n                                <VisualStateManager.VisualStateGroups>\r\n                                    <VisualStateGroup x:Name=\"CommonStates\">\r\n                                        <VisualState x:Name=\"Normal\" />\r\n                                        <VisualState x:Name=\"MouseOver\">\r\n                                            <Storyboard>\r\n                                                <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"rectangle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Offset)\">\r\n                                                    <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.161\" />\r\n                                                </DoubleAnimationUsingKeyFrames>\r\n                                                <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                    <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                                                </DoubleAnimationUsingKeyFrames>\r\n                                                <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"rectangle1\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                    <SplineColorKeyFrame KeyTime=\"0\" Value=\"#49000000\" />\r\n                                                </ColorAnimationUsingKeyFrames>\r\n                                                <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                    <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                                                </DoubleAnimationUsingKeyFrames>\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                        <VisualState x:Name=\"Pressed\">\r\n                                            <Storyboard>\r\n                                                <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"rectangle2\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                                    <SplineColorKeyFrame KeyTime=\"0\" Value=\"#FF000000\" />\r\n                                                </ColorAnimationUsingKeyFrames>\r\n                                                <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"rectangle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Offset)\">\r\n                                                    <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0\" />\r\n                                                </DoubleAnimationUsingKeyFrames>\r\n                                                <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                    <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\" />\r\n                                                </DoubleAnimationUsingKeyFrames>\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                        <VisualState x:Name=\"Disabled\">\r\n                                            <Storyboard>\r\n                                                <ObjectAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"rectangle3\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                                    <DiscreteObjectKeyFrame KeyTime=\"0\" Value=\"{x:Static Visibility.Visible}\" />\r\n                                                </ObjectAnimationUsingKeyFrames>\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                    </VisualStateGroup>\r\n                                    <VisualStateGroup x:Name=\"FocusStates\">\r\n                                        <VisualState x:Name=\"IsFocused\">\r\n                                            <Storyboard>\r\n                                                <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"rectangle4\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\">\r\n                                                    <SplineColorKeyFrame KeyTime=\"0\" Value=\"#BF000000\" />\r\n                                                </ColorAnimationUsingKeyFrames>\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                        <VisualState x:Name=\"UnFocused\" />\r\n                                    </VisualStateGroup>\r\n                                </VisualStateManager.VisualStateGroups>\r\n                                <Grid.RowDefinitions>\r\n                                    <RowDefinition Height=\"0.5*\" />\r\n                                    <RowDefinition Height=\"0.5*\" />\r\n                                </Grid.RowDefinitions>\r\n                                <Rectangle Stroke=\"#FFFFFFFF\" RadiusX=\"4\" RadiusY=\"4\" StrokeThickness=\"1.2\" Grid.RowSpan=\"2\" x:Name=\"rectangle2\">\r\n                                    <Rectangle.Fill>\r\n                                        <RadialGradientBrush>\r\n                                            <RadialGradientBrush.RelativeTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1\" ScaleY=\"2.048\" />\r\n                                                    <TranslateTransform X=\"0\" Y=\"0.021\" />\r\n                                                </TransformGroup>\r\n                                            </RadialGradientBrush.RelativeTransform>\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                        </RadialGradientBrush>\r\n                                    </Rectangle.Fill>\r\n                                </Rectangle>\r\n                                <Rectangle Stroke=\"{TemplateBinding BorderBrush}\" Opacity=\"0.8\" RadiusX=\"4\" RadiusY=\"4\" StrokeThickness=\"1.2\" Grid.RowSpan=\"2\" x:Name=\"rectangle\">\r\n                                    <Rectangle.Fill>\r\n                                        <LinearGradientBrush EndPoint=\"0.5,1.308\" StartPoint=\"0.5,0\">\r\n                                            <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.683\" />\r\n                                            <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                        </LinearGradientBrush>\r\n                                    </Rectangle.Fill>\r\n                                </Rectangle>\r\n                                <Rectangle Fill=\"{x:Null}\" Stroke=\"#7FFFFFFF\" RadiusX=\"3.5\" RadiusY=\"3.5\" Margin=\"1,1,1,1\" Grid.RowSpan=\"2\" x:Name=\"rectangle4\" />\r\n                                <Rectangle Stroke=\"#FF000000\" RadiusX=\"3.5\" RadiusY=\"3.5\" StrokeThickness=\"0\" Margin=\"2,2,2,2\" Grid.RowSpan=\"2\" x:Name=\"rectangle1\">\r\n                                    <Rectangle.OpacityMask>\r\n                                        <RadialGradientBrush>\r\n                                            <RadialGradientBrush.RelativeTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1\" ScaleY=\"1.404\" />\r\n                                                    <TranslateTransform X=\"0\" Y=\"-0.686\" />\r\n                                                </TransformGroup>\r\n                                            </RadialGradientBrush.RelativeTransform>\r\n                                            <GradientStop Color=\"#00000000\" Offset=\"0.371\" />\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                        </RadialGradientBrush>\r\n                                    </Rectangle.OpacityMask>\r\n                                    <Rectangle.Fill>\r\n                                        <RadialGradientBrush>\r\n                                            <RadialGradientBrush.RelativeTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.288\" ScaleY=\"2.638\" />\r\n                                                    <TranslateTransform X=\"0.012\" Y=\"0.819\" />\r\n                                                </TransformGroup>\r\n                                            </RadialGradientBrush.RelativeTransform>\r\n                                            <GradientStop Color=\"#00000000\" Offset=\"0.607\" />\r\n                                            <GradientStop Color=\"#33000000\" Offset=\"1\" />\r\n                                        </RadialGradientBrush>\r\n                                    </Rectangle.Fill>\r\n                                </Rectangle>\r\n                                <Border Grid.RowSpan=\"1\" CornerRadius=\"6,6,40,40\" Margin=\"1,1,1,0\" Opacity=\"0.8\" x:Name=\"border\">\r\n                                    <Border.Background>\r\n                                        <RadialGradientBrush>\r\n                                            <RadialGradientBrush.RelativeTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1\" ScaleY=\"2.057\" />\r\n                                                    <TranslateTransform X=\"0\" Y=\"-0.529\" />\r\n                                                </TransformGroup>\r\n                                            </RadialGradientBrush.RelativeTransform>\r\n                                            <GradientStop Color=\"#BFFFFFFF\" Offset=\"0\" />\r\n                                            <GradientStop Color=\"#4CFFFFFF\" Offset=\"1\" />\r\n                                        </RadialGradientBrush>\r\n                                    </Border.Background>\r\n                                </Border>\r\n                                <Rectangle Stroke=\"{x:Null}\" Grid.RowSpan=\"2\" RadiusX=\"4\" RadiusY=\"4\" Visibility=\"Collapsed\" x:Name=\"rectangle3\">\r\n                                    <Rectangle.Fill>\r\n                                        <SolidColorBrush Color=\"{DynamicResource DisabledColor}\" />\r\n                                    </Rectangle.Fill>\r\n                                </Rectangle>\r\n                            </Grid>\r\n                            <ControlTemplate.Triggers>\r\n                                <Trigger Property=\"IsDragging\" Value=\"True\">\r\n                                    <Setter Property=\"Fill\" TargetName=\"rectangle2\">\r\n                                        <Setter.Value>\r\n                                            <RadialGradientBrush>\r\n                                                <RadialGradientBrush.RelativeTransform>\r\n                                                    <TransformGroup>\r\n                                                        <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1\" ScaleY=\"2.048\"/>\r\n                                                        <TranslateTransform X=\"0\" Y=\"0.021\"/>\r\n                                                    </TransformGroup>\r\n                                                </RadialGradientBrush.RelativeTransform>\r\n                                                <GradientStop Color=\"#FF000000\" Offset=\"0\"/>\r\n                                                <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\"/>\r\n                                            </RadialGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                    <Setter Property=\"Fill\" TargetName=\"rectangle\">\r\n                                        <Setter.Value>\r\n                                            <LinearGradientBrush EndPoint=\"0.5,1.308\" StartPoint=\"0.5,0\">\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.013\"/>\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                    <Setter Property=\"Opacity\" TargetName=\"border\" Value=\"0.5\"/>\r\n                                    <Setter Property=\"Opacity\" TargetName=\"rectangle\" Value=\"0.8\"/>\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                                    <Setter Property=\"Fill\" TargetName=\"rectangle\">\r\n                                        <Setter.Value>\r\n                                            <LinearGradientBrush EndPoint=\"0.5,1.308\" StartPoint=\"0.5,0\">\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.085\"/>\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                    <Setter Property=\"Fill\" TargetName=\"rectangle1\">\r\n                                        <Setter.Value>\r\n                                            <RadialGradientBrush>\r\n                                                <RadialGradientBrush.RelativeTransform>\r\n                                                    <TransformGroup>\r\n                                                        <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.288\" ScaleY=\"2.638\"/>\r\n                                                        <TranslateTransform X=\"0.012\" Y=\"0.819\"/>\r\n                                                    </TransformGroup>\r\n                                                </RadialGradientBrush.RelativeTransform>\r\n                                                <GradientStop Color=\"#00000000\" Offset=\"0.607\"/>\r\n                                                <GradientStop Color=\"#49000000\" Offset=\"1\"/>\r\n                                            </RadialGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                    <Setter Property=\"Opacity\" TargetName=\"border\" Value=\"1\"/>\r\n                                </Trigger>\r\n                            </ControlTemplate.Triggers>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n        </Style.Resources>\r\n        <Setter Property=\"Background\" Value=\"#FFFFFFFF\" />\r\n        <Setter Property=\"Stylus.IsPressAndHoldEnabled\" Value=\"false\" />\r\n        <Setter Property=\"Stylus.IsFlicksEnabled\" Value=\"false\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}\" />\r\n        <Setter Property=\"Width\" Value=\"{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}\" />\r\n        <Setter Property=\"MinWidth\" Value=\"{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ScrollBar}\">\r\n                    <Grid x:Name=\"Bg\" SnapsToDevicePixels=\"true\" Background=\"{TemplateBinding Background}\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"thumb\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition MaxHeight=\"{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}\" />\r\n                            <RowDefinition Height=\"*\" />\r\n                            <RowDefinition MaxHeight=\"{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}\" />\r\n                        </Grid.RowDefinitions>\r\n                        <RepeatButton Style=\"{StaticResource ScrollBarButton}\" IsEnabled=\"{TemplateBinding IsMouseOver}\" Command=\"{x:Static ScrollBar.LineUpCommand}\" />\r\n                        <Track x:Name=\"PART_Track\" IsEnabled=\"{TemplateBinding IsMouseOver}\" Grid.Row=\"1\" IsDirectionReversed=\"true\">\r\n                            <Track.DecreaseRepeatButton>\r\n                                <RepeatButton Style=\"{StaticResource ScrollBarPageButton}\" Command=\"{x:Static ScrollBar.PageUpCommand}\" />\r\n                            </Track.DecreaseRepeatButton>\r\n                            <Track.IncreaseRepeatButton>\r\n                                <RepeatButton Style=\"{StaticResource ScrollBarPageButton}\" Command=\"{x:Static ScrollBar.PageDownCommand}\" />\r\n                            </Track.IncreaseRepeatButton>\r\n                            <Track.Thumb>\r\n                                <Thumb Style=\"{StaticResource ScrollBarThumb}\" x:Name=\"thumb\" />\r\n                            </Track.Thumb>\r\n                        </Track>\r\n                        <RepeatButton Style=\"{StaticResource ScrollBarButton}\" IsEnabled=\"{TemplateBinding IsMouseOver}\" Grid.Row=\"2\" Command=\"{x:Static ScrollBar.LineDownCommand}\" RenderTransformOrigin=\"0.5,0.5\">\r\n                            <RepeatButton.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform ScaleX=\"1\" ScaleY=\"-1\" />\r\n                                </TransformGroup>\r\n                            </RepeatButton.RenderTransform>\r\n                        </RepeatButton>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Style.Triggers>\r\n            <Trigger Property=\"Orientation\" Value=\"Horizontal\">\r\n                <Setter Property=\"Width\" Value=\"Auto\" />\r\n                <Setter Property=\"MinWidth\" Value=\"0\" />\r\n                <Setter Property=\"Height\" Value=\"{DynamicResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}}\" />\r\n                <Setter Property=\"MinHeight\" Value=\"{DynamicResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}}\" />\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"{x:Type ScrollBar}\">\r\n                            <Grid x:Name=\"Bg\" SnapsToDevicePixels=\"true\" Background=\"{TemplateBinding Background}\">\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition MaxWidth=\"{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}\" />\r\n                                    <ColumnDefinition Width=\"0.00001*\" />\r\n                                    <ColumnDefinition MaxWidth=\"{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}\" />\r\n                                </Grid.ColumnDefinitions>\r\n                                <RepeatButton Style=\"{StaticResource ScrollBarButton}\" IsEnabled=\"{TemplateBinding IsMouseOver}\" Command=\"{x:Static ScrollBar.LineLeftCommand}\" >\r\n                                    <RepeatButton.LayoutTransform>\r\n                                        <TransformGroup>\r\n                                            <RotateTransform Angle=\"-90\" />\r\n                                        </TransformGroup>\r\n                                    </RepeatButton.LayoutTransform>\r\n                                </RepeatButton>\r\n                                <Track x:Name=\"PART_Track\" IsEnabled=\"{TemplateBinding IsMouseOver}\" Grid.Column=\"1\">\r\n                                    <Track.DecreaseRepeatButton>\r\n                                        <RepeatButton Style=\"{StaticResource ScrollBarPageButton}\" Command=\"{x:Static ScrollBar.PageLeftCommand}\" />\r\n                                    </Track.DecreaseRepeatButton>\r\n                                    <Track.IncreaseRepeatButton>\r\n                                        <RepeatButton Style=\"{StaticResource ScrollBarPageButton}\" Command=\"{x:Static ScrollBar.PageRightCommand}\" />\r\n                                    </Track.IncreaseRepeatButton>\r\n                                    <Track.Thumb>\r\n                                        <Thumb Style=\"{StaticResource ScrollBarThumb}\" />\r\n                                    </Track.Thumb>\r\n                                </Track>\r\n                                <RepeatButton Style=\"{StaticResource ScrollBarButton}\" IsEnabled=\"{TemplateBinding IsMouseOver}\" Grid.Column=\"2\" Command=\"{x:Static ScrollBar.LineRightCommand}\" >\r\n                                    <RepeatButton.LayoutTransform>\r\n                                        <TransformGroup>\r\n                                            <RotateTransform Angle=\"90\" />\r\n                                        </TransformGroup>\r\n                                    </RepeatButton.LayoutTransform>\r\n                                </RepeatButton>\r\n                            </Grid>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Trigger>\r\n        </Style.Triggers>\r\n    </Style>\r\n\r\n    <!-- ScrollViewer -->\r\n    <Style TargetType=\"{x:Type ScrollViewer}\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ScrollViewer}\">\r\n                    <Grid x:Name=\"Grid\" Background=\"{TemplateBinding Background}\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\" />\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"*\" />\r\n                            <RowDefinition Height=\"Auto\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Rectangle Fill=\"{TemplateBinding Background}\" x:Name=\"Corner\" Grid.Column=\"1\" Grid.Row=\"1\" />\r\n                        <ScrollContentPresenter Margin=\"{TemplateBinding Padding}\" x:Name=\"PART_ScrollContentPresenter\" Grid.Column=\"0\" Grid.Row=\"0\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" CanContentScroll=\"{TemplateBinding CanContentScroll}\" CanHorizontallyScroll=\"False\" CanVerticallyScroll=\"False\" />\r\n                        <ScrollBar Cursor=\"Arrow\" x:Name=\"PART_VerticalScrollBar\" Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Grid.Column=\"1\" Grid.Row=\"0\" ViewportSize=\"{TemplateBinding ViewportHeight}\" Maximum=\"{TemplateBinding ScrollableHeight}\" Minimum=\"0\" Value=\"{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" AutomationProperties.AutomationId=\"VerticalScrollBar\" />\r\n                        <ScrollBar Cursor=\"Arrow\" x:Name=\"PART_HorizontalScrollBar\" Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Grid.Column=\"0\" Grid.Row=\"1\" Orientation=\"Horizontal\" ViewportSize=\"{TemplateBinding ViewportWidth}\" Maximum=\"{TemplateBinding ScrollableWidth}\" Minimum=\"0\" Value=\"{Binding Path=HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" AutomationProperties.AutomationId=\"HorizontalScrollBar\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"#00FFFFFF\" />\r\n    </Style>\r\n\r\n    <!-- FlowDocumentScrollViewer -->\r\n    <Style TargetType=\"{x:Type FlowDocumentScrollViewer}\">\r\n        <Setter Property=\"Background\" Value=\"#00FFFFFF\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"Local\" />\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.263\" />\r\n                    <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"BorderThickness\" Value=\"1,1,1,1\" />\r\n        <Setter Property=\"IsToolBarVisible\" Value=\"True\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type FlowDocumentScrollViewer}\">\r\n                    <Grid Language=\"en-us\" Uid=\"Grid_26\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"*\" />\r\n                            <RowDefinition Height=\"Auto\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Border Margin=\"{TemplateBinding Padding}\" Uid=\"Border_49\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"4,4,4,4\">\r\n                            <ScrollViewer HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" x:Name=\"PART_ContentHost\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Uid=\"ScrollViewer_8\" CanContentScroll=\"True\" />\r\n                        </Border>\r\n                        <Border x:Name=\"PART_ToolBarHost\" Uid=\"Border_51\" Grid.Row=\"1\" Background=\"{TemplateBinding Background}\">\r\n                            <Grid Uid=\"Grid_34\">\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"*\" />\r\n                                    <ColumnDefinition Width=\"*\" />\r\n                                </Grid.ColumnDefinitions>\r\n                                <Border HorizontalAlignment=\"Left\" x:Name=\"PART_FindToolBarHost\" VerticalAlignment=\"Center\" Uid=\"Border_61\" Visibility=\"Collapsed\" />\r\n                                <Grid HorizontalAlignment=\"Right\" VerticalAlignment=\"Center\" Uid=\"Grid_27\" Grid.Column=\"1\">\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition Width=\"Auto\" />\r\n                                        <ColumnDefinition />\r\n                                        <ColumnDefinition Width=\"Auto\" />\r\n                                    </Grid.ColumnDefinitions>\r\n                                    <RepeatButton ToolTip=\"Decrease Zoom\" Width=\"{TemplateBinding FontSize}\" Height=\"{TemplateBinding FontSize}\" BorderBrush=\"{TemplateBinding BorderBrush}\" Foreground=\"{TemplateBinding Foreground}\" IsEnabled=\"{TemplateBinding CanDecreaseZoom}\" Uid=\"RepeatButton_7\" Command=\"NavigationCommands.DecreaseZoom\">\r\n                                        <RepeatButton.Style>\r\n                                            <Style TargetType=\"{x:Type RepeatButton}\">\r\n                                                <Setter Property=\"Padding\" Value=\"2,2,0,2\" />\r\n                                                <Setter Property=\"Template\">\r\n                                                    <Setter.Value>\r\n                                                        <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n                                                            <Border Uid=\"Border_41\" Background=\"#00FFFFFF\" Padding=\"{Binding Path=Padding, RelativeSource={RelativeSource TemplatedParent}}\">\r\n                                                                <Viewbox x:Name=\"Content\" RenderTransformOrigin=\"0.5,0.5\" Uid=\"Viewbox_2\">\r\n                                                                    <Grid Width=\"32\" Height=\"32\" Uid=\"Canvas_4\">\r\n                                                                        <Grid.RowDefinitions>\r\n                                                                            <RowDefinition Height=\"0.496*\" />\r\n                                                                            <RowDefinition Height=\"0.504*\" />\r\n                                                                        </Grid.RowDefinitions>\r\n                                                                        <Ellipse Stroke=\"#FFFFFFFF\" StrokeThickness=\"0.5\" Grid.RowSpan=\"2\" x:Name=\"ellipse3\">\r\n                                                                            <Ellipse.Fill>\r\n                                                                                <RadialGradientBrush>\r\n                                                                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                                                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                                                                </RadialGradientBrush>\r\n                                                                            </Ellipse.Fill>\r\n                                                                        </Ellipse>\r\n                                                                        <Ellipse Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"0.5\" Grid.RowSpan=\"2\" x:Name=\"ellipse\" Opacity=\"0.65\">\r\n                                                                            <Ellipse.Fill>\r\n                                                                                <LinearGradientBrush EndPoint=\"0.5,1.253\" StartPoint=\"0.5,0\">\r\n                                                                                    <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.71\" />\r\n                                                                                    <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"0.991\" />\r\n                                                                                </LinearGradientBrush>\r\n                                                                            </Ellipse.Fill>\r\n                                                                        </Ellipse>\r\n                                                                        <Ellipse Fill=\"{TemplateBinding Background}\" Stroke=\"#7FFFFFFF\" StrokeThickness=\"0.5\" Margin=\"0.5,0.5,0.5,0.5\" Grid.RowSpan=\"2\" x:Name=\"ellipse4\" />\r\n                                                                        <Ellipse Margin=\"1,1,1,1\" Grid.RowSpan=\"2\" x:Name=\"ellipse1\">\r\n                                                                            <Ellipse.OpacityMask>\r\n                                                                                <RadialGradientBrush>\r\n                                                                                    <RadialGradientBrush.RelativeTransform>\r\n                                                                                        <TransformGroup>\r\n                                                                                            <TranslateTransform X=\"0\" Y=\"-0.49\" />\r\n                                                                                        </TransformGroup>\r\n                                                                                    </RadialGradientBrush.RelativeTransform>\r\n                                                                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"0.433\" />\r\n                                                                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                                                                </RadialGradientBrush>\r\n                                                                            </Ellipse.OpacityMask>\r\n                                                                            <Ellipse.Fill>\r\n                                                                                <RadialGradientBrush>\r\n                                                                                    <RadialGradientBrush.RelativeTransform>\r\n                                                                                        <TransformGroup>\r\n                                                                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.336\" ScaleY=\"1.621\" />\r\n                                                                                            <TranslateTransform X=\"0.01\" Y=\"0.398\" />\r\n                                                                                        </TransformGroup>\r\n                                                                                    </RadialGradientBrush.RelativeTransform>\r\n                                                                                    <GradientStop Color=\"#00000000\" Offset=\"0.509\" />\r\n                                                                                    <GradientStop Color=\"#33000000\" Offset=\"1\" />\r\n                                                                                </RadialGradientBrush>\r\n                                                                            </Ellipse.Fill>\r\n                                                                        </Ellipse>\r\n                                                                        <Ellipse Stroke=\"{x:Null}\" HorizontalAlignment=\"Stretch\" Margin=\"8.121,1,8,-0.121\" Opacity=\"0.5\" x:Name=\"ellipse2\">\r\n                                                                            <Ellipse.Fill>\r\n                                                                                <RadialGradientBrush>\r\n                                                                                    <RadialGradientBrush.RelativeTransform>\r\n                                                                                        <TransformGroup>\r\n                                                                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.028\" ScaleY=\"1.573\" />\r\n                                                                                            <TranslateTransform X=\"0.017\" Y=\"-0.269\" />\r\n                                                                                        </TransformGroup>\r\n                                                                                    </RadialGradientBrush.RelativeTransform>\r\n                                                                                    <GradientStop Color=\"#BFFFFFFF\" Offset=\"0\" />\r\n                                                                                    <GradientStop Color=\"#4CFFFFFF\" Offset=\"1\" />\r\n                                                                                </RadialGradientBrush>\r\n                                                                            </Ellipse.Fill>\r\n                                                                        </Ellipse>\r\n                                                                        <Path Stroke=\"{Binding Path=Foreground, RelativeSource={RelativeSource TemplatedParent}}\" StrokeThickness=\"3\" Uid=\"Path_9\" HorizontalAlignment=\"Right\" Margin=\"0,0.121,6,0\" VerticalAlignment=\"Top\" Grid.Row=\"1\">\r\n                                                                            <Path.Data>\r\n                                                                                <LineGeometry EndPoint=\"10,0\" StartPoint=\"-10,0\" />\r\n                                                                            </Path.Data>\r\n                                                                        </Path>\r\n                                                                    </Grid>\r\n                                                                </Viewbox>\r\n                                                            </Border>\r\n                                                            <ControlTemplate.Triggers>\r\n                                                                <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                                                                    <Setter Property=\"Fill\" TargetName=\"ellipse\">\r\n                                                                        <Setter.Value>\r\n                                                                            <LinearGradientBrush EndPoint=\"0.5,1.253\" StartPoint=\"0.5,0\">\r\n                                                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0\" />\r\n                                                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"0.991\" />\r\n                                                                            </LinearGradientBrush>\r\n                                                                        </Setter.Value>\r\n                                                                    </Setter>\r\n                                                                    <Setter Property=\"Fill\" TargetName=\"ellipse1\">\r\n                                                                        <Setter.Value>\r\n                                                                            <RadialGradientBrush>\r\n                                                                                <RadialGradientBrush.RelativeTransform>\r\n                                                                                    <TransformGroup>\r\n                                                                                        <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.336\" ScaleY=\"1.621\" />\r\n                                                                                        <TranslateTransform X=\"0.01\" Y=\"0.398\" />\r\n                                                                                    </TransformGroup>\r\n                                                                                </RadialGradientBrush.RelativeTransform>\r\n                                                                                <GradientStop Color=\"#00000000\" Offset=\"0.509\" />\r\n                                                                                <GradientStop Color=\"#4C000000\" Offset=\"1\" />\r\n                                                                            </RadialGradientBrush>\r\n                                                                        </Setter.Value>\r\n                                                                    </Setter>\r\n                                                                    <Setter Property=\"Opacity\" TargetName=\"ellipse2\" Value=\"0.8\" />\r\n                                                                </Trigger>\r\n                                                                <Trigger Property=\"IsPressed\" Value=\"True\">\r\n                                                                    <Setter Property=\"RenderTransform\" TargetName=\"Content\">\r\n                                                                        <Setter.Value>\r\n                                                                            <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                                                        </Setter.Value>\r\n                                                                    </Setter>\r\n                                                                    <Setter Property=\"Fill\" TargetName=\"ellipse3\">\r\n                                                                        <Setter.Value>\r\n                                                                            <RadialGradientBrush>\r\n                                                                                <GradientStop Color=\"#FF000000\" Offset=\"0\" />\r\n                                                                                <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                                                            </RadialGradientBrush>\r\n                                                                        </Setter.Value>\r\n                                                                    </Setter>\r\n                                                                    <Setter Property=\"Fill\" TargetName=\"ellipse\">\r\n                                                                        <Setter.Value>\r\n                                                                            <LinearGradientBrush EndPoint=\"0.5,1.253\" StartPoint=\"0.5,0\">\r\n                                                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0\" />\r\n                                                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"0.991\" />\r\n                                                                            </LinearGradientBrush>\r\n                                                                        </Setter.Value>\r\n                                                                    </Setter>\r\n                                                                    <Setter Property=\"Opacity\" TargetName=\"ellipse\" Value=\"1\" />\r\n                                                                    <Setter Property=\"Fill\" TargetName=\"ellipse1\">\r\n                                                                        <Setter.Value>\r\n                                                                            <RadialGradientBrush>\r\n                                                                                <RadialGradientBrush.RelativeTransform>\r\n                                                                                    <TransformGroup>\r\n                                                                                        <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.336\" ScaleY=\"1.621\" />\r\n                                                                                        <TranslateTransform X=\"0.01\" Y=\"0.398\" />\r\n                                                                                    </TransformGroup>\r\n                                                                                </RadialGradientBrush.RelativeTransform>\r\n                                                                                <GradientStop Color=\"#00000000\" Offset=\"0.509\" />\r\n                                                                                <GradientStop Color=\"#4C000000\" Offset=\"1\" />\r\n                                                                            </RadialGradientBrush>\r\n                                                                        </Setter.Value>\r\n                                                                    </Setter>\r\n                                                                    <Setter Property=\"Opacity\" TargetName=\"ellipse1\" Value=\"0.65\" />\r\n                                                                    <Setter Property=\"Opacity\" TargetName=\"ellipse2\" Value=\"0.8\" />\r\n                                                                    <Setter Property=\"Stroke\" TargetName=\"ellipse4\" Value=\"#7F000000\" />\r\n                                                                </Trigger>\r\n                                                            </ControlTemplate.Triggers>\r\n                                                        </ControlTemplate>\r\n                                                    </Setter.Value>\r\n                                                </Setter>\r\n                                                <Setter Property=\"BorderBrush\" Value=\"{DynamicResource PrimaryBrush}\" />\r\n                                                <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n                                                <Setter Property=\"Opacity\" Value=\"1\" />\r\n                                                <Style.BasedOn>\r\n                                                    <Style TargetType=\"{x:Type RepeatButton}\">\r\n                                                        <Setter Property=\"Padding\" Value=\"5,5,5,5\" />\r\n                                                        <Setter Property=\"Delay\" Value=\"1000\" />\r\n                                                        <Setter Property=\"Interval\" Value=\"250\" />\r\n                                                        <Style.BasedOn>\r\n                                                            <Style TargetType=\"{x:Type ButtonBase}\">\r\n                                                                <Setter Property=\"Focusable\" Value=\"False\" />\r\n                                                                <Setter Property=\"Opacity\" Value=\"0.5\" />\r\n                                                                <Setter Property=\"Cursor\" Value=\"Hand\" />\r\n                                                                <Setter Property=\"Background\" Value=\"#00FFFFFF\" />\r\n                                                                <Setter Property=\"Padding\" Value=\"3,1,3,1\" />\r\n                                                                <Setter Property=\"BorderBrush\" Value=\"{x:Null}\" />\r\n                                                                <Setter Property=\"BorderThickness\" Value=\"0,0,0,0\" />\r\n                                                                <Setter Property=\"MinWidth\" Value=\"0\" />\r\n                                                                <Setter Property=\"MinHeight\" Value=\"0\" />\r\n                                                                <Setter Property=\"Template\">\r\n                                                                    <Setter.Value>\r\n                                                                        <ControlTemplate TargetType=\"{x:Type ButtonBase}\">\r\n                                                                            <Border Uid=\"Border_39\" Background=\"{TemplateBinding Background}\">\r\n                                                                                <ContentPresenter x:Name=\"Content\" RenderTransformOrigin=\"0.5,0.5\" Uid=\"ContentPresenter_2\" Content=\"{TemplateBinding Content}\" ContentStringFormat=\"{TemplateBinding ContentStringFormat}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" />\r\n                                                                            </Border>\r\n                                                                            <ControlTemplate.Triggers>\r\n                                                                                <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                                                                                    <Setter Property=\"RenderTransform\" TargetName=\"Content\">\r\n                                                                                        <Setter.Value>\r\n                                                                                            <ScaleTransform ScaleX=\"1.1\" ScaleY=\"1.1\" />\r\n                                                                                        </Setter.Value>\r\n                                                                                    </Setter>\r\n                                                                                </Trigger>\r\n                                                                                <Trigger Property=\"IsPressed\" Value=\"True\">\r\n                                                                                    <Setter Property=\"RenderTransform\" TargetName=\"Content\">\r\n                                                                                        <Setter.Value>\r\n                                                                                            <ScaleTransform ScaleX=\"0.9\" ScaleY=\"0.9\" />\r\n                                                                                        </Setter.Value>\r\n                                                                                    </Setter>\r\n                                                                                </Trigger>\r\n                                                                            </ControlTemplate.Triggers>\r\n                                                                        </ControlTemplate>\r\n                                                                    </Setter.Value>\r\n                                                                </Setter>\r\n                                                                <Style.Triggers>\r\n                                                                    <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                                                                        <Setter Property=\"Opacity\" Value=\"0.3\" />\r\n                                                                    </Trigger>\r\n                                                                    <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                                                                        <Setter Property=\"Opacity\" Value=\"1\" />\r\n                                                                    </Trigger>\r\n                                                                </Style.Triggers>\r\n                                                            </Style>\r\n                                                        </Style.BasedOn>\r\n                                                    </Style>\r\n                                                </Style.BasedOn>\r\n                                            </Style>\r\n                                        </RepeatButton.Style>\r\n                                        <RepeatButton.LayoutTransform>\r\n                                            <ScaleTransform ScaleX=\"2.2\" ScaleY=\"2.2\" />\r\n                                        </RepeatButton.LayoutTransform>\r\n                                    </RepeatButton>\r\n                                    <Slider HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Center\" MinWidth=\"50\" FontSize=\"{TemplateBinding FontSize}\" Uid=\"Slider_2\" Grid.Column=\"1\" TickFrequency=\"{TemplateBinding ZoomIncrement}\" LargeChange=\"{TemplateBinding ZoomIncrement}\" Maximum=\"{TemplateBinding MaxZoom}\" Minimum=\"{TemplateBinding MinZoom}\" SmallChange=\"{TemplateBinding ZoomIncrement}\" Value=\"{Binding Path=Zoom, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\"/>\r\n                                    <RepeatButton ToolTip=\"Increase Zoom\" Width=\"{TemplateBinding FontSize}\" Height=\"{TemplateBinding FontSize}\" BorderBrush=\"{TemplateBinding BorderBrush}\" Foreground=\"{TemplateBinding Foreground}\" IsEnabled=\"{TemplateBinding CanIncreaseZoom}\" Uid=\"RepeatButton_8\" Grid.Column=\"2\" Command=\"NavigationCommands.IncreaseZoom\">\r\n                                        <RepeatButton.Style>\r\n                                            <Style TargetType=\"{x:Type RepeatButton}\">\r\n                                                <Setter Property=\"Padding\" Value=\"2,2,0,2\" />\r\n                                                <Setter Property=\"Template\">\r\n                                                    <Setter.Value>\r\n                                                        <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n                                                            <Border Uid=\"Border_41\" Background=\"#00FFFFFF\" Padding=\"{Binding Path=Padding, RelativeSource={RelativeSource TemplatedParent}}\">\r\n                                                                <Viewbox x:Name=\"Content\" RenderTransformOrigin=\"0.5,0.5\" Uid=\"Viewbox_2\">\r\n                                                                    <Grid Width=\"32\" Height=\"32\" Uid=\"Canvas_4\">\r\n                                                                        <Grid.RowDefinitions>\r\n                                                                            <RowDefinition Height=\"0.496*\" />\r\n                                                                            <RowDefinition Height=\"0.504*\" />\r\n                                                                        </Grid.RowDefinitions>\r\n                                                                        <Ellipse Stroke=\"#FFFFFFFF\" StrokeThickness=\"0.5\" Grid.RowSpan=\"2\" x:Name=\"ellipse3\">\r\n                                                                            <Ellipse.Fill>\r\n                                                                                <RadialGradientBrush>\r\n                                                                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                                                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                                                                </RadialGradientBrush>\r\n                                                                            </Ellipse.Fill>\r\n                                                                        </Ellipse>\r\n                                                                        <Ellipse Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"0.5\" Grid.RowSpan=\"2\" x:Name=\"ellipse\" Opacity=\"0.65\">\r\n                                                                            <Ellipse.Fill>\r\n                                                                                <LinearGradientBrush EndPoint=\"0.5,1.253\" StartPoint=\"0.5,0\">\r\n                                                                                    <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.71\" />\r\n                                                                                    <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"0.991\" />\r\n                                                                                </LinearGradientBrush>\r\n                                                                            </Ellipse.Fill>\r\n                                                                        </Ellipse>\r\n                                                                        <Ellipse Fill=\"{TemplateBinding Background}\" Stroke=\"#7FFFFFFF\" StrokeThickness=\"0.5\" Margin=\"0.5,0.5,0.5,0.5\" Grid.RowSpan=\"2\" x:Name=\"ellipse4\" />\r\n                                                                        <Ellipse Margin=\"1,1,1,1\" Grid.RowSpan=\"2\" x:Name=\"ellipse1\">\r\n                                                                            <Ellipse.OpacityMask>\r\n                                                                                <RadialGradientBrush>\r\n                                                                                    <RadialGradientBrush.RelativeTransform>\r\n                                                                                        <TransformGroup>\r\n                                                                                            <TranslateTransform X=\"0\" Y=\"-0.49\" />\r\n                                                                                        </TransformGroup>\r\n                                                                                    </RadialGradientBrush.RelativeTransform>\r\n                                                                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"0.433\" />\r\n                                                                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                                                                </RadialGradientBrush>\r\n                                                                            </Ellipse.OpacityMask>\r\n                                                                            <Ellipse.Fill>\r\n                                                                                <RadialGradientBrush>\r\n                                                                                    <RadialGradientBrush.RelativeTransform>\r\n                                                                                        <TransformGroup>\r\n                                                                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.336\" ScaleY=\"1.621\" />\r\n                                                                                            <TranslateTransform X=\"0.01\" Y=\"0.398\" />\r\n                                                                                        </TransformGroup>\r\n                                                                                    </RadialGradientBrush.RelativeTransform>\r\n                                                                                    <GradientStop Color=\"#00000000\" Offset=\"0.509\" />\r\n                                                                                    <GradientStop Color=\"#33000000\" Offset=\"1\" />\r\n                                                                                </RadialGradientBrush>\r\n                                                                            </Ellipse.Fill>\r\n                                                                        </Ellipse>\r\n                                                                        <Ellipse Stroke=\"{x:Null}\" HorizontalAlignment=\"Stretch\" Margin=\"8.121,1,8,-0.121\" Opacity=\"0.5\" x:Name=\"ellipse2\">\r\n                                                                            <Ellipse.Fill>\r\n                                                                                <RadialGradientBrush>\r\n                                                                                    <RadialGradientBrush.RelativeTransform>\r\n                                                                                        <TransformGroup>\r\n                                                                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.028\" ScaleY=\"1.573\" />\r\n                                                                                            <TranslateTransform X=\"0.017\" Y=\"-0.269\" />\r\n                                                                                        </TransformGroup>\r\n                                                                                    </RadialGradientBrush.RelativeTransform>\r\n                                                                                    <GradientStop Color=\"#BFFFFFFF\" Offset=\"0\" />\r\n                                                                                    <GradientStop Color=\"#4CFFFFFF\" Offset=\"1\" />\r\n                                                                                </RadialGradientBrush>\r\n                                                                            </Ellipse.Fill>\r\n                                                                        </Ellipse>\r\n                                                                        <Path Stroke=\"{Binding Path=Foreground, RelativeSource={RelativeSource TemplatedParent}}\" StrokeThickness=\"3\" Uid=\"Path_12\"  Grid.RowSpan=\"1\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Stretch\" Grid.Row=\"1\" Margin=\"0,0,6,6\">\r\n                                                                            <Path.Data>\r\n                                                                                <GeometryGroup>\r\n                                                                                    <LineGeometry EndPoint=\"10,0\" StartPoint=\"-10,0\" />\r\n                                                                                    <LineGeometry EndPoint=\"0,10\" StartPoint=\"0,-10\" />\r\n                                                                                </GeometryGroup>\r\n                                                                            </Path.Data>\r\n                                                                        </Path>\r\n                                                                    </Grid>\r\n                                                                </Viewbox>\r\n                                                            </Border>\r\n                                                            <ControlTemplate.Triggers>\r\n                                                                <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                                                                    <Setter Property=\"Fill\" TargetName=\"ellipse\">\r\n                                                                        <Setter.Value>\r\n                                                                            <LinearGradientBrush EndPoint=\"0.5,1.253\" StartPoint=\"0.5,0\">\r\n                                                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0\" />\r\n                                                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"0.991\" />\r\n                                                                            </LinearGradientBrush>\r\n                                                                        </Setter.Value>\r\n                                                                    </Setter>\r\n                                                                    <Setter Property=\"Fill\" TargetName=\"ellipse1\">\r\n                                                                        <Setter.Value>\r\n                                                                            <RadialGradientBrush>\r\n                                                                                <RadialGradientBrush.RelativeTransform>\r\n                                                                                    <TransformGroup>\r\n                                                                                        <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.336\" ScaleY=\"1.621\" />\r\n                                                                                        <TranslateTransform X=\"0.01\" Y=\"0.398\" />\r\n                                                                                    </TransformGroup>\r\n                                                                                </RadialGradientBrush.RelativeTransform>\r\n                                                                                <GradientStop Color=\"#00000000\" Offset=\"0.509\" />\r\n                                                                                <GradientStop Color=\"#4C000000\" Offset=\"1\" />\r\n                                                                            </RadialGradientBrush>\r\n                                                                        </Setter.Value>\r\n                                                                    </Setter>\r\n                                                                    <Setter Property=\"Opacity\" TargetName=\"ellipse2\" Value=\"0.8\" />\r\n                                                                </Trigger>\r\n                                                                <Trigger Property=\"IsPressed\" Value=\"True\">\r\n                                                                    <Setter Property=\"RenderTransform\" TargetName=\"Content\">\r\n                                                                        <Setter.Value>\r\n                                                                            <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                                                        </Setter.Value>\r\n                                                                    </Setter>\r\n                                                                    <Setter Property=\"Fill\" TargetName=\"ellipse3\">\r\n                                                                        <Setter.Value>\r\n                                                                            <RadialGradientBrush>\r\n                                                                                <GradientStop Color=\"#FF000000\" Offset=\"0\" />\r\n                                                                                <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                                                            </RadialGradientBrush>\r\n                                                                        </Setter.Value>\r\n                                                                    </Setter>\r\n                                                                    <Setter Property=\"Fill\" TargetName=\"ellipse\">\r\n                                                                        <Setter.Value>\r\n                                                                            <LinearGradientBrush EndPoint=\"0.5,1.253\" StartPoint=\"0.5,0\">\r\n                                                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0\" />\r\n                                                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"0.991\" />\r\n                                                                            </LinearGradientBrush>\r\n                                                                        </Setter.Value>\r\n                                                                    </Setter>\r\n                                                                    <Setter Property=\"Opacity\" TargetName=\"ellipse\" Value=\"1\" />\r\n                                                                    <Setter Property=\"Fill\" TargetName=\"ellipse1\">\r\n                                                                        <Setter.Value>\r\n                                                                            <RadialGradientBrush>\r\n                                                                                <RadialGradientBrush.RelativeTransform>\r\n                                                                                    <TransformGroup>\r\n                                                                                        <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.336\" ScaleY=\"1.621\" />\r\n                                                                                        <TranslateTransform X=\"0.01\" Y=\"0.398\" />\r\n                                                                                    </TransformGroup>\r\n                                                                                </RadialGradientBrush.RelativeTransform>\r\n                                                                                <GradientStop Color=\"#00000000\" Offset=\"0.509\" />\r\n                                                                                <GradientStop Color=\"#4C000000\" Offset=\"1\" />\r\n                                                                            </RadialGradientBrush>\r\n                                                                        </Setter.Value>\r\n                                                                    </Setter>\r\n                                                                    <Setter Property=\"Opacity\" TargetName=\"ellipse1\" Value=\"0.65\" />\r\n                                                                    <Setter Property=\"Opacity\" TargetName=\"ellipse2\" Value=\"0.8\" />\r\n                                                                    <Setter Property=\"Stroke\" TargetName=\"ellipse4\" Value=\"#7F000000\" />\r\n                                                                </Trigger>\r\n                                                            </ControlTemplate.Triggers>\r\n                                                        </ControlTemplate>\r\n                                                    </Setter.Value>\r\n                                                </Setter>\r\n                                                <Setter Property=\"BorderBrush\" Value=\"{DynamicResource PrimaryBrush}\" />\r\n                                                <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n                                                <Setter Property=\"Opacity\" Value=\"1\" />\r\n                                                <Style.BasedOn>\r\n                                                    <Style TargetType=\"{x:Type RepeatButton}\">\r\n                                                        <Setter Property=\"Padding\" Value=\"5,5,5,5\" />\r\n                                                        <Setter Property=\"Delay\" Value=\"1000\" />\r\n                                                        <Setter Property=\"Interval\" Value=\"250\" />\r\n                                                        <Style.BasedOn>\r\n                                                            <Style TargetType=\"{x:Type ButtonBase}\">\r\n                                                                <Setter Property=\"Focusable\" Value=\"False\" />\r\n                                                                <Setter Property=\"Opacity\" Value=\"0.5\" />\r\n                                                                <Setter Property=\"Cursor\" Value=\"Hand\" />\r\n                                                                <Setter Property=\"Background\" Value=\"#00FFFFFF\" />\r\n                                                                <Setter Property=\"Padding\" Value=\"3,1,3,1\" />\r\n                                                                <Setter Property=\"BorderBrush\" Value=\"{x:Null}\" />\r\n                                                                <Setter Property=\"BorderThickness\" Value=\"0,0,0,0\" />\r\n                                                                <Setter Property=\"MinWidth\" Value=\"0\" />\r\n                                                                <Setter Property=\"MinHeight\" Value=\"0\" />\r\n                                                                <Setter Property=\"Template\">\r\n                                                                    <Setter.Value>\r\n                                                                        <ControlTemplate TargetType=\"{x:Type ButtonBase}\">\r\n                                                                            <Border Uid=\"Border_39\" Background=\"{TemplateBinding Background}\">\r\n                                                                                <ContentPresenter x:Name=\"Content\" RenderTransformOrigin=\"0.5,0.5\" Uid=\"ContentPresenter_2\" Content=\"{TemplateBinding Content}\" ContentStringFormat=\"{TemplateBinding ContentStringFormat}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" />\r\n                                                                            </Border>\r\n                                                                            <ControlTemplate.Triggers>\r\n                                                                                <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                                                                                    <Setter Property=\"RenderTransform\" TargetName=\"Content\">\r\n                                                                                        <Setter.Value>\r\n                                                                                            <ScaleTransform ScaleX=\"1.1\" ScaleY=\"1.1\" />\r\n                                                                                        </Setter.Value>\r\n                                                                                    </Setter>\r\n                                                                                </Trigger>\r\n                                                                                <Trigger Property=\"IsPressed\" Value=\"True\">\r\n                                                                                    <Setter Property=\"RenderTransform\" TargetName=\"Content\">\r\n                                                                                        <Setter.Value>\r\n                                                                                            <ScaleTransform ScaleX=\"0.9\" ScaleY=\"0.9\" />\r\n                                                                                        </Setter.Value>\r\n                                                                                    </Setter>\r\n                                                                                </Trigger>\r\n                                                                            </ControlTemplate.Triggers>\r\n                                                                        </ControlTemplate>\r\n                                                                    </Setter.Value>\r\n                                                                </Setter>\r\n                                                                <Style.Triggers>\r\n                                                                    <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                                                                        <Setter Property=\"Opacity\" Value=\"0.3\" />\r\n                                                                    </Trigger>\r\n                                                                    <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                                                                        <Setter Property=\"Opacity\" Value=\"1\" />\r\n                                                                    </Trigger>\r\n                                                                </Style.Triggers>\r\n                                                            </Style>\r\n                                                        </Style.BasedOn>\r\n                                                    </Style>\r\n                                                </Style.BasedOn>\r\n                                            </Style>\r\n                                        </RepeatButton.Style>\r\n                                        <RepeatButton.LayoutTransform>\r\n                                            <ScaleTransform ScaleX=\"2.2\" ScaleY=\"2.2\" />\r\n                                        </RepeatButton.LayoutTransform>\r\n                                    </RepeatButton>\r\n                                </Grid>\r\n                            </Grid>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- ListBox -->\r\n    <Style TargetType=\"{x:Type ListBox}\">\r\n        <Setter Property=\"Background\" Value=\"{DynamicResource {x:Static SystemColors.WindowBrushKey}}\" />\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0\" />\r\n                    <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}\" />\r\n        <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\" />\r\n        <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\" />\r\n        <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"true\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListBox}\">\r\n                    <Border x:Name=\"Bd\" SnapsToDevicePixels=\"true\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"1\" CornerRadius=\"4,4,4,4\">\r\n                        <Grid>\r\n                            <ScrollViewer Padding=\"{TemplateBinding Padding}\" Focusable=\"false\" x:Name=\"scrollViewer\">\r\n                                <ItemsPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" />\r\n                            </ScrollViewer>\r\n                            <Border CornerRadius=\"4,4,4,4\" Visibility=\"Collapsed\" x:Name=\"border\" Margin=\"-2,-2,-2,-2\">\r\n                                <Border.Background>\r\n                                    <SolidColorBrush Color=\"{DynamicResource DisabledColor}\"/>\r\n                                </Border.Background>\r\n                            </Border>\r\n                        </Grid>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"border\" Value=\"Visible\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                            <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- ListBoxItem -->\r\n    <Style TargetType=\"{x:Type ListBoxItem}\">\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"MinHeight\" Value=\"30\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource PrimaryBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListBoxItem}\">\r\n                    <Border x:Name=\"Bd\" SnapsToDevicePixels=\"true\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.3000000\" To=\"MouseOver\" />\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"HoverGrid\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.3000000\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Unselected\" />\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"SelectedGrid\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\"/>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid>\r\n                            <Rectangle x:Name=\"rectangleSelected\" Opacity=\"0\" RadiusX=\"3\" RadiusY=\"3\" >\r\n                                <Rectangle.Stroke>\r\n                                    <SolidColorBrush Color=\"#7F4392C7\" />\r\n                                </Rectangle.Stroke>\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                        <GradientStop Color=\"#594392C7\" Offset=\"0\"/>\r\n                                        <GradientStop Color=\"#59A0FCFF\" Offset=\"1\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                            <Rectangle x:Name=\"rectangle\" Opacity=\"0\" Stroke=\"{x:Null}\" RadiusX=\"3\" RadiusY=\"3\" >\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                        <GradientStop Color=\"#334392C7\" Offset=\"0\"/>\r\n                                        <GradientStop Color=\"#33A0FCFF\" Offset=\"1\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                            <Grid x:Name=\"HoverGrid\" Opacity=\"0\">\r\n                                <Border CornerRadius=\"4\" x:Name=\"White\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1.2\">\r\n                                    <Border.Background>\r\n                                        <RadialGradientBrush>\r\n                                            <RadialGradientBrush.RelativeTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.35\" ScaleY=\"1.35\" />\r\n                                                </TransformGroup>\r\n                                            </RadialGradientBrush.RelativeTransform>\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                        </RadialGradientBrush>\r\n                                    </Border.Background>\r\n                                </Border>\r\n                                <Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1.2\" CornerRadius=\"4\" x:Name=\"Background\" Opacity=\"0.65\">\r\n                                    <Border.Background>\r\n                                        <LinearGradientBrush EndPoint=\"0.5,1.4\" StartPoint=\"0.5,0\">\r\n                                            <GradientStop Color=\"{StaticResource PrimaryColor}\" Offset=\"0.75\" />\r\n                                            <GradientStop Color=\"{StaticResource SecondaryColor}\" Offset=\"1\" />\r\n                                        </LinearGradientBrush>\r\n                                    </Border.Background>\r\n                                </Border>\r\n                                <Border Background=\"{TemplateBinding Background}\" BorderBrush=\"#7FFFFFFF\" BorderThickness=\"1\" CornerRadius=\"3.5\" x:Name=\"InnerBorder\" Margin=\"1\" />\r\n                                <Border CornerRadius=\"3.5\" x:Name=\"Shadow\" Margin=\"2\" Grid.RowSpan=\"2\">\r\n                                    <Border.OpacityMask>\r\n                                        <RadialGradientBrush>\r\n                                            <RadialGradientBrush.RelativeTransform>\r\n                                                <TransformGroup>\r\n                                                    <TranslateTransform X=\"0\" Y=\"-0.5\" />\r\n                                                </TransformGroup>\r\n                                            </RadialGradientBrush.RelativeTransform>\r\n                                            <GradientStop Color=\"#00FFFFFF\" Offset=\"0.3\" />\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                        </RadialGradientBrush>\r\n                                    </Border.OpacityMask>\r\n                                    <Border.Background>\r\n                                        <RadialGradientBrush>\r\n                                            <RadialGradientBrush.RelativeTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.75\" ScaleY=\"2.25\" />\r\n                                                    <TranslateTransform Y=\"0.65\" />\r\n                                                </TransformGroup>\r\n                                            </RadialGradientBrush.RelativeTransform>\r\n                                            <GradientStop Color=\"#00000000\" Offset=\"0.55\" />\r\n                                            <GradientStop Color=\"#33000000\" Offset=\"1\" />\r\n                                        </RadialGradientBrush>\r\n                                    </Border.Background>\r\n                                </Border>\r\n                                <Border Margin=\"1,1,1,10\" CornerRadius=\"4,4,40,40\" x:Name=\"Highlight\" Opacity=\"0.8\" RenderTransformOrigin=\"0.5,1\">\r\n                                    <Border.Background>\r\n                                        <RadialGradientBrush>\r\n                                            <RadialGradientBrush.RelativeTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.25\" ScaleY=\"2\" />\r\n                                                    <TranslateTransform Y=\"-0.6\" />\r\n                                                </TransformGroup>\r\n                                            </RadialGradientBrush.RelativeTransform>\r\n                                            <GradientStop Color=\"#BFFFFFFF\" Offset=\"0\" />\r\n                                            <GradientStop Color=\"#4CFFFFFF\" Offset=\"1\" />\r\n                                        </RadialGradientBrush>\r\n                                    </Border.Background>\r\n                                </Border>\r\n                            </Grid>\r\n                            <Grid x:Name=\"SelectedGrid\" Opacity=\"0\">\r\n                                <Border CornerRadius=\"4\" x:Name=\"White1\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1.2\">\r\n                                    <Border.Background>\r\n                                        <RadialGradientBrush>\r\n                                            <RadialGradientBrush.RelativeTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.35\" ScaleY=\"1.35\" />\r\n                                                </TransformGroup>\r\n                                            </RadialGradientBrush.RelativeTransform>\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                        </RadialGradientBrush>\r\n                                    </Border.Background>\r\n                                </Border>\r\n                                <Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1.2\" CornerRadius=\"4\" x:Name=\"Background1\" Opacity=\"0.65\">\r\n                                    <Border.Background>\r\n                                        <LinearGradientBrush EndPoint=\"0.5,1.4\" StartPoint=\"0.5,0\">\r\n                                            <GradientStop Color=\"{StaticResource PrimaryColor}\" Offset=\"0.75\" />\r\n                                            <GradientStop Color=\"{StaticResource SecondaryColor}\" Offset=\"1\" />\r\n                                        </LinearGradientBrush>\r\n                                    </Border.Background>\r\n                                </Border>\r\n                                <Border Background=\"{TemplateBinding Background}\" BorderBrush=\"#7FFFFFFF\" BorderThickness=\"1\" CornerRadius=\"3.5\" x:Name=\"InnerBorder1\" Margin=\"1\" />\r\n                                <Border CornerRadius=\"3.5\" x:Name=\"Shadow1\" Margin=\"2\" Grid.RowSpan=\"2\">\r\n                                    <Border.OpacityMask>\r\n                                        <RadialGradientBrush>\r\n                                            <RadialGradientBrush.RelativeTransform>\r\n                                                <TransformGroup>\r\n                                                    <TranslateTransform X=\"0\" Y=\"-0.5\" />\r\n                                                </TransformGroup>\r\n                                            </RadialGradientBrush.RelativeTransform>\r\n                                            <GradientStop Color=\"#00FFFFFF\" Offset=\"0.3\" />\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                        </RadialGradientBrush>\r\n                                    </Border.OpacityMask>\r\n                                    <Border.Background>\r\n                                        <RadialGradientBrush>\r\n                                            <RadialGradientBrush.RelativeTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.75\" ScaleY=\"2.25\" />\r\n                                                    <TranslateTransform Y=\"0.65\" />\r\n                                                </TransformGroup>\r\n                                            </RadialGradientBrush.RelativeTransform>\r\n                                            <GradientStop Color=\"#00000000\" Offset=\"0.55\" />\r\n                                            <GradientStop Color=\"#33000000\" Offset=\"1\" />\r\n                                        </RadialGradientBrush>\r\n                                    </Border.Background>\r\n                                </Border>\r\n                                <Border Margin=\"1,1,1,10\" CornerRadius=\"4,4,40,40\" x:Name=\"Highlight1\" Opacity=\"0.8\" RenderTransformOrigin=\"0.5,1\">\r\n                                    <Border.Background>\r\n                                        <RadialGradientBrush>\r\n                                            <RadialGradientBrush.RelativeTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.25\" ScaleY=\"2\" />\r\n                                                    <TranslateTransform Y=\"-0.6\" />\r\n                                                </TransformGroup>\r\n                                            </RadialGradientBrush.RelativeTransform>\r\n                                            <GradientStop Color=\"#BFFFFFFF\" Offset=\"0\" />\r\n                                            <GradientStop Color=\"#4CFFFFFF\" Offset=\"1\" />\r\n                                        </RadialGradientBrush>\r\n                                    </Border.Background>\r\n                                </Border>\r\n                            </Grid>\r\n                            <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"contentPresenter\" />\r\n                            <Rectangle x:Name=\"FocusVisualElement\" Visibility=\"Collapsed\" Stroke=\"#FF6DBDD1\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" />\r\n                        </Grid>\r\n                    </Border>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"contentPresenter\" Value=\"0.5\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- TabControl -->\r\n    <Style TargetType=\"{x:Type TabControl}\">\r\n        <Setter Property=\"Background\" Value=\"#FFFFFFFF\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}\" />\r\n        <Setter Property=\"Padding\" Value=\"4,4,4,4\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TabControl}\">\r\n                    <Grid ClipToBounds=\"true\" SnapsToDevicePixels=\"true\" KeyboardNavigation.TabNavigation=\"Local\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition x:Name=\"ColumnDefinition0\" />\r\n                            <ColumnDefinition x:Name=\"ColumnDefinition1\" Width=\"0\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition x:Name=\"RowDefinition0\" Height=\"Auto\" />\r\n                            <RowDefinition x:Name=\"RowDefinition1\" Height=\"*\" />\r\n                        </Grid.RowDefinitions>\r\n                        <TabPanel Margin=\"2,2,2,-1\" x:Name=\"HeaderPanel\" IsItemsHost=\"true\" Panel.ZIndex=\"1\" KeyboardNavigation.TabIndex=\"1\" />\r\n                        <Border x:Name=\"ContentPanel\" Grid.Row=\"1\" Background=\"{TemplateBinding Background}\" BorderThickness=\"{TemplateBinding BorderThickness}\" KeyboardNavigation.DirectionalNavigation=\"Contained\" KeyboardNavigation.TabIndex=\"2\" KeyboardNavigation.TabNavigation=\"Local\" CornerRadius=\"0,0,3,3\">\r\n                            <Border.BorderBrush>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.232\" />\r\n                                    <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Border.BorderBrush>\r\n                            <Grid Margin=\"3,3,3,3\">\r\n                                <ContentPresenter Margin=\"1,1,1,1\" x:Name=\"PART_SelectedContentHost\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" ContentSource=\"SelectedContent\" />\r\n                            </Grid>\r\n                        </Border>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Bottom\">\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"HeaderPanel\" Value=\"1\" />\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition1\" Value=\"Auto\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"HeaderPanel\" Value=\"2,-1,2,2\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"ContentPanel\" Value=\"3,3,0,0\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Left\">\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"HeaderPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"HeaderPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"ContentPanel\" Value=\"1\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition0\" Value=\"Auto\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition1\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition1\" Value=\"0\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"HeaderPanel\" Value=\"2,2,-1,2\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"ContentPanel\" Value=\"0,3,3,0\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Right\">\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"HeaderPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Row\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"HeaderPanel\" Value=\"1\" />\r\n                            <Setter Property=\"Grid.Column\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ColumnDefinition1\" Value=\"Auto\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition0\" Value=\"*\" />\r\n                            <Setter Property=\"Height\" TargetName=\"RowDefinition1\" Value=\"0\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"HeaderPanel\" Value=\"-1,2,2,2\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"ContentPanel\" Value=\"3,0,0,3\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- TabItem -->\r\n    <Style TargetType=\"{x:Type TabItem}\">\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Padding\" Value=\"6,1,6,1\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource PrimaryBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"#FFFFFFFF\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TabItem}\">\r\n                    <Grid SnapsToDevicePixels=\"true\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"0.505*\" />\r\n                            <RowDefinition Height=\"0.495*\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Border Grid.RowSpan=\"2\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1.2,1.2,1.2,1.2\" CornerRadius=\"3,3,0,0\" x:Name=\"border\">\r\n                            <Border.Background>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <Border Grid.RowSpan=\"2\" Opacity=\"0.65\" BorderThickness=\"1.2,1.2,1.2,1.2\" CornerRadius=\"3,3,0,0\" BorderBrush=\"{TemplateBinding BorderBrush}\" x:Name=\"border1\">\r\n                            <Border.Background>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1.305\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.721\" />\r\n                                    <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <Border Grid.RowSpan=\"2\" Background=\"#00FFFFFF\" BorderBrush=\"#7FFFFFFF\" BorderThickness=\"1,1,1,1\" CornerRadius=\"2,2,0,0\" Margin=\"1,1,1,1\" x:Name=\"border2\" />\r\n                        <Border Grid.RowSpan=\"2\" CornerRadius=\"2,2,0,0\" Margin=\"2,2,2,2\" x:Name=\"border3\">\r\n                            <Border.OpacityMask>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.272\" ScaleY=\"1.099\" />\r\n                                            <TranslateTransform X=\"0\" Y=\"-0.548\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"0.431\" />\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.OpacityMask>\r\n                            <Border.Background>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.535\" ScaleY=\"2.412\" />\r\n                                            <TranslateTransform X=\"-0.015\" Y=\"0.463\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"0.549\" />\r\n                                    <GradientStop Color=\"#33000000\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <Border Grid.RowSpan=\"1\" CornerRadius=\"4,4,40,40\" Margin=\"1,1,1,0\" x:Name=\"border4\" Opacity=\"0.665\">\r\n                            <Border.Background>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1\" ScaleY=\"2.127\" />\r\n                                            <TranslateTransform X=\"0\" Y=\"-0.563\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#BFFFFFFF\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#4CFFFFFF\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <Border x:Name=\"BdSelected\" BorderThickness=\"1,1,1,0\" Grid.RowSpan=\"2\" CornerRadius=\"3,3,0,0\" Visibility=\"Collapsed\" Background=\"{TemplateBinding Background}\" BorderBrush=\"#FFFFFFFF\" />\r\n                        <Border Grid.RowSpan=\"2\" CornerRadius=\"3,3,0,0\" BorderBrush=\"{DynamicResource PrimaryBrush}\" BorderThickness=\"1,1,1,0\" Visibility=\"Collapsed\" x:Name=\"borderSelected\" />\r\n                        <Border x:Name=\"SelectedBG\" Grid.RowSpan=\"2\" Visibility=\"Collapsed\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1,1,1,0\" CornerRadius=\"2,2,0,0\" Margin=\"1,1,1,0\" />\r\n                        <Border x:Name=\"Selected\" Grid.RowSpan=\"2\" Visibility=\"Collapsed\" CornerRadius=\"1,1,1,1\" Margin=\"2,2,2,0\">\r\n                            <Border.OpacityMask>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"#4C000000\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Border.OpacityMask>\r\n                            <Border.Background>\r\n                                <LinearGradientBrush EndPoint=\"0.5,0.612\" StartPoint=\"0.5,-0.388\">\r\n                                    <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <ContentPresenter HorizontalAlignment=\"{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\" x:Name=\"Content\" VerticalAlignment=\"{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" ContentSource=\"Header\" RecognizesAccessKey=\"True\" Grid.RowSpan=\"2\" Margin=\"{TemplateBinding Padding}\" />\r\n                        <Border BorderBrush=\"{x:Null}\" CornerRadius=\"3,3,0,0\" x:Name=\"Disabled\" Grid.RowSpan=\"2\" Background=\"#8CFFFFFF\" Visibility=\"Collapsed\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"border1\" Value=\"1\" />\r\n                            <Setter Property=\"Opacity\" TargetName=\"border4\" Value=\"1\" />\r\n                            <Setter Property=\"Background\" TargetName=\"border1\">\r\n                                <Setter.Value>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,1.305\" StartPoint=\"0.5,0\">\r\n                                        <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.147\" />\r\n                                        <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                    </LinearGradientBrush>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                            <Setter Property=\"Background\" TargetName=\"border3\">\r\n                                <Setter.Value>\r\n                                    <RadialGradientBrush>\r\n                                        <RadialGradientBrush.RelativeTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.535\" ScaleY=\"2.412\" />\r\n                                                <TranslateTransform X=\"-0.015\" Y=\"0.463\" />\r\n                                            </TransformGroup>\r\n                                        </RadialGradientBrush.RelativeTransform>\r\n                                        <GradientStop Color=\"#00FFFFFF\" Offset=\"0.549\" />\r\n                                        <GradientStop Color=\"#49000000\" Offset=\"1\" />\r\n                                    </RadialGradientBrush>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsSelected\" Value=\"true\">\r\n                            <Setter Property=\"Panel.ZIndex\" Value=\"1\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"border\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"border1\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"border2\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"border3\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"border4\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"BdSelected\" Value=\"Visible\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"borderSelected\" Value=\"Visible\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"SelectedBG\" Value=\"Visible\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Selected\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsSelected\" Value=\"false\" />\r\n                                <Condition Property=\"IsMouseOver\" Value=\"true\" />\r\n                            </MultiTrigger.Conditions>\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Bottom\">\r\n                            <Setter Property=\"BorderThickness\" TargetName=\"BdSelected\" Value=\"1,0,1,1\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"border\" Value=\"0,0,3,3\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"border1\" Value=\"0,0,3,3\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"border2\" Value=\"0,0,2,2\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"border3\" Value=\"0,0,2,2\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"BdSelected\" Value=\"0,0,3,3\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"borderSelected\" Value=\"0,0,3,3\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"Disabled\" Value=\"0,0,3,3\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Left\">\r\n                            <Setter Property=\"BorderThickness\" TargetName=\"BdSelected\" Value=\"1,1,0,1\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"border\" Value=\"3,0,0,3\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"border1\" Value=\"3,0,0,3\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"border2\" Value=\"2,0,0,2\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"border3\" Value=\"2,0,0,2\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"BdSelected\" Value=\"3,0,0,3\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"borderSelected\" Value=\"3,0,0,3\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"Disabled\" Value=\"3,0,0,3\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"TabStripPlacement\" Value=\"Right\">\r\n                            <Setter Property=\"BorderThickness\" TargetName=\"BdSelected\" Value=\"0,1,1,1\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"border\" Value=\"0,3,3,0\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"border1\" Value=\"0,3,3,0\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"border2\" Value=\"0,2,2,0\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"border3\" Value=\"0,2,2,0\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"BdSelected\" Value=\"0,3,3,0\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"borderSelected\" Value=\"0,3,3,0\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"Disabled\" Value=\"0,3,3,0\" />\r\n                        </Trigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsSelected\" Value=\"true\" />\r\n                                <Condition Property=\"TabStripPlacement\" Value=\"Top\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <Setter Property=\"Visibility\" TargetName=\"border\" Value=\"Hidden\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"border1\" Value=\"Hidden\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"border2\" Value=\"Hidden\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"border3\" Value=\"Hidden\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"border4\" Value=\"Hidden\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"BdSelected\" Value=\"Visible\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"borderSelected\" Value=\"Visible\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"SelectedBG\" Value=\"Visible\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Selected\" Value=\"Visible\" />\r\n                        </MultiTrigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsSelected\" Value=\"true\" />\r\n                                <Condition Property=\"TabStripPlacement\" Value=\"Bottom\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <Setter Property=\"Margin\" Value=\"-2,-1,-2,-2\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"Content\" Value=\"6,1,6,1\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"BdSelected\" Value=\"Visible\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"borderSelected\" Value=\"Visible\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"border\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"border1\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"border2\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"border3\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"border4\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"BdSelected\" Value=\"0,0,3,3\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"borderSelected\" Value=\"0,0,3,3\" />\r\n                            <Setter Property=\"BorderThickness\" TargetName=\"BdSelected\" Value=\"1,0,1,1\" />\r\n                            <Setter Property=\"BorderThickness\" TargetName=\"borderSelected\" Value=\"1,0,1,1\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Selected\" Value=\"Visible\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"SelectedBG\" Value=\"Visible\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"SelectedBG\" Value=\"0,0,2,2\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"SelectedBG\" Value=\"1,0,1,1\" />\r\n                            <Setter Property=\"BorderThickness\" TargetName=\"SelectedBG\" Value=\"1,0,1,1\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"Selected\" Value=\"2,0,2,2\" />\r\n                            <Setter Property=\"Background\" TargetName=\"Selected\">\r\n                                <Setter.Value>\r\n                                    <LinearGradientBrush EndPoint=\"0.498,0.393\" StartPoint=\"0.498,1.393\">\r\n                                        <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0\" />\r\n                                        <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                    </LinearGradientBrush>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                            <Setter Property=\"OpacityMask\" TargetName=\"Selected\">\r\n                                <Setter.Value>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,0\" StartPoint=\"0.5,1\">\r\n                                        <GradientStop Color=\"#4C000000\" Offset=\"0\" />\r\n                                        <GradientStop Color=\"#00FFFFFF\" Offset=\"1\" />\r\n                                    </LinearGradientBrush>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"Disabled\" Value=\"0,0,3,3\" />\r\n                        </MultiTrigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsSelected\" Value=\"true\" />\r\n                                <Condition Property=\"TabStripPlacement\" Value=\"Left\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <Setter Property=\"Margin\" Value=\"-2,-2,-1,-2\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"Content\" Value=\"6,1,6,1\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"border\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"border1\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"border2\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"border3\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"border4\" Value=\"Collapsed\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"BdSelected\" Value=\"Visible\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"borderSelected\" Value=\"Visible\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"BdSelected\" Value=\"3,0,0,3\" />\r\n                            <Setter Property=\"BorderThickness\" TargetName=\"BdSelected\" Value=\"1,1,0,1\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"borderSelected\" Value=\"3,0,0,3\" />\r\n                            <Setter Property=\"BorderThickness\" TargetName=\"borderSelected\" Value=\"1,1,0,1\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"SelectedBG\" Value=\"Visible\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"SelectedBG\" Value=\"2,0,0,2\" />\r\n                            <Setter Property=\"BorderThickness\" TargetName=\"SelectedBG\" Value=\"1,1,0,1\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"SelectedBG\" Value=\"1,1,0,1\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"Selected\" Value=\"2,2,0,2\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Selected\" Value=\"Visible\" />\r\n                            <Setter Property=\"OpacityMask\" TargetName=\"Selected\">\r\n                                <Setter.Value>\r\n                                    <LinearGradientBrush EndPoint=\"0.626,0.5\" StartPoint=\"0.374,0.5\">\r\n                                        <GradientStop Color=\"#4C000000\" Offset=\"0\" />\r\n                                        <GradientStop Color=\"#00FFFFFF\" Offset=\"1\" />\r\n                                    </LinearGradientBrush>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"Disabled\" Value=\"3,0,0,3\" />\r\n                        </MultiTrigger>\r\n                        <MultiTrigger>\r\n                            <MultiTrigger.Conditions>\r\n                                <Condition Property=\"IsSelected\" Value=\"true\" />\r\n                                <Condition Property=\"TabStripPlacement\" Value=\"Right\" />\r\n                            </MultiTrigger.Conditions>\r\n                            <Setter Property=\"Margin\" Value=\"-1,-2,-2,-2\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"Content\" Value=\"6,1,6,1\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"border\" Value=\"Hidden\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"border1\" Value=\"Hidden\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"border2\" Value=\"Hidden\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"border3\" Value=\"Hidden\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"border4\" Value=\"Hidden\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"BdSelected\" Value=\"Visible\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"borderSelected\" Value=\"Visible\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"BdSelected\" Value=\"0,3,3,0\" />\r\n                            <Setter Property=\"BorderThickness\" TargetName=\"BdSelected\" Value=\"0,1,1,1\" />\r\n                            <Setter Property=\"BorderThickness\" TargetName=\"borderSelected\" Value=\"0,1,1,1\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"borderSelected\" Value=\"0,3,3,0\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"SelectedBG\" Value=\"Visible\" />\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"SelectedBG\" Value=\"0,2,2,0\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"SelectedBG\" Value=\"0,1,1,1\" />\r\n                            <Setter Property=\"BorderThickness\" TargetName=\"SelectedBG\" Value=\"0,1,1,1\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"Selected\" Value=\"0,2,2,2\" />\r\n                            <Setter Property=\"Visibility\" TargetName=\"Selected\" Value=\"Visible\" />\r\n                            <Setter Property=\"OpacityMask\" TargetName=\"Selected\">\r\n                                <Setter.Value>\r\n                                    <LinearGradientBrush EndPoint=\"0.374,0.5\" StartPoint=\"0.626,0.5\">\r\n                                        <GradientStop Color=\"#4C000000\" Offset=\"0\" />\r\n                                        <GradientStop Color=\"#00FFFFFF\" Offset=\"1\" />\r\n                                    </LinearGradientBrush>\r\n                                </Setter.Value>\r\n                            </Setter>\r\n                            <Setter Property=\"CornerRadius\" TargetName=\"Disabled\" Value=\"0,3,3,0\" />\r\n                        </MultiTrigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"Disabled\" Value=\"Visible\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- ComboBox -->\r\n    <Style TargetType=\"{x:Type ComboBox}\">\r\n        <Style.Resources>\r\n            <Geometry x:Key=\"DownArrowGeometry\">M 0 0 L 3.5 4 L 7 0 Z</Geometry>\r\n            <Style x:Key=\"ComboBoxReadonlyToggleButton\" TargetType=\"{x:Type ToggleButton}\">\r\n                <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n                <Setter Property=\"IsTabStop\" Value=\"false\" />\r\n                <Setter Property=\"Focusable\" Value=\"false\" />\r\n                <Setter Property=\"ClickMode\" Value=\"Press\" />\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                            <Grid>\r\n                                <VisualStateManager.VisualStateGroups>\r\n                                    <VisualStateGroup x:Name=\"CommonStates\">\r\n                                        <VisualState x:Name=\"Normal\" />\r\n                                        <VisualState x:Name=\"MouseOver\">\r\n                                            <Storyboard>\r\n                                                <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"rectangle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Offset)\">\r\n                                                    <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.101\" />\r\n                                                </DoubleAnimationUsingKeyFrames>\r\n                                                <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                    <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                                                </DoubleAnimationUsingKeyFrames>\r\n                                                <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"rectangle1\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                    <SplineColorKeyFrame KeyTime=\"0\" Value=\"#49000000\" />\r\n                                                </ColorAnimationUsingKeyFrames>\r\n                                                <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                    <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                                                </DoubleAnimationUsingKeyFrames>\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                        <VisualState x:Name=\"Pressed\">\r\n                                            <Storyboard>\r\n                                                <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"rectangle2\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                                    <SplineColorKeyFrame KeyTime=\"0\" Value=\"#FF000000\" />\r\n                                                </ColorAnimationUsingKeyFrames>\r\n                                                <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"rectangle\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Offset)\">\r\n                                                    <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0\" />\r\n                                                </DoubleAnimationUsingKeyFrames>\r\n                                                <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"rectangle\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                    <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"1\" />\r\n                                                </DoubleAnimationUsingKeyFrames>\r\n                                                <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"rectangle1\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                    <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.495\" />\r\n                                                </DoubleAnimationUsingKeyFrames>\r\n                                                <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"rectangle3\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\">\r\n                                                    <SplineColorKeyFrame KeyTime=\"0\" Value=\"#7F000000\" />\r\n                                                </ColorAnimationUsingKeyFrames>\r\n                                                <DoubleAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                    <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.495\" />\r\n                                                </DoubleAnimationUsingKeyFrames>\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                    </VisualStateGroup>\r\n                                    <VisualStateGroup x:Name=\"FocusedStates\">\r\n                                        <VisualState x:Name=\"Focused\">\r\n                                            <Storyboard>\r\n                                                <ColorAnimationUsingKeyFrames Duration=\"00:00:00.001\" Storyboard.TargetName=\"rectangle3\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\">\r\n                                                    <SplineColorKeyFrame KeyTime=\"0\" Value=\"#7F000000\" />\r\n                                                </ColorAnimationUsingKeyFrames>\r\n                                            </Storyboard>\r\n                                        </VisualState>\r\n                                        <VisualState x:Name=\"Unfocused\" />\r\n                                    </VisualStateGroup>\r\n                                </VisualStateManager.VisualStateGroups>\r\n                                <Grid.RowDefinitions>\r\n                                    <RowDefinition Height=\"0.514*\" />\r\n                                    <RowDefinition Height=\"0.486*\" />\r\n                                </Grid.RowDefinitions>\r\n                                <Rectangle Stroke=\"#FFFFFFFF\" Grid.RowSpan=\"2\" RadiusX=\"4\" RadiusY=\"4\" StrokeThickness=\"1.2\" x:Name=\"rectangle2\">\r\n                                    <Rectangle.Fill>\r\n                                        <RadialGradientBrush>\r\n                                            <RadialGradientBrush.RelativeTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.147\" ScaleY=\"1.723\" />\r\n                                                    <TranslateTransform X=\"0.002\" Y=\"0.008\" />\r\n                                                </TransformGroup>\r\n                                            </RadialGradientBrush.RelativeTransform>\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                        </RadialGradientBrush>\r\n                                    </Rectangle.Fill>\r\n                                </Rectangle>\r\n                                <Rectangle Stroke=\"{TemplateBinding BorderBrush}\" Grid.RowSpan=\"2\" RadiusX=\"4\" RadiusY=\"4\" Opacity=\"0.65\" StrokeThickness=\"1.2\" x:Name=\"rectangle\">\r\n                                    <Rectangle.Fill>\r\n                                        <LinearGradientBrush EndPoint=\"0.5,1.4\" StartPoint=\"0.5,0\">\r\n                                            <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.697\" />\r\n                                            <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                        </LinearGradientBrush>\r\n                                    </Rectangle.Fill>\r\n                                </Rectangle>\r\n                                <Rectangle Fill=\"{TemplateBinding Background}\" Stroke=\"#7FFFFFFF\" Grid.RowSpan=\"2\" RadiusX=\"3.5\" RadiusY=\"3.5\" Margin=\"1,1,1,1\" x:Name=\"rectangle3\" />\r\n                                <Rectangle Stroke=\"{x:Null}\" Grid.RowSpan=\"2\" RadiusX=\"3.5\" RadiusY=\"3.5\" StrokeThickness=\"0\" Margin=\"2,2,2,2\" x:Name=\"rectangle1\">\r\n                                    <Rectangle.OpacityMask>\r\n                                        <RadialGradientBrush>\r\n                                            <RadialGradientBrush.RelativeTransform>\r\n                                                <TransformGroup>\r\n                                                    <TranslateTransform X=\"0\" Y=\"-0.496\" />\r\n                                                </TransformGroup>\r\n                                            </RadialGradientBrush.RelativeTransform>\r\n                                            <GradientStop Color=\"#00FFFFFF\" Offset=\"0.286\" />\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                        </RadialGradientBrush>\r\n                                    </Rectangle.OpacityMask>\r\n                                    <Rectangle.Fill>\r\n                                        <RadialGradientBrush>\r\n                                            <RadialGradientBrush.RelativeTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.613\" ScaleY=\"2.078\" />\r\n                                                    <TranslateTransform X=\"-0.011\" Y=\"0.539\" />\r\n                                                </TransformGroup>\r\n                                            </RadialGradientBrush.RelativeTransform>\r\n                                            <GradientStop Color=\"#00FFFFFF\" Offset=\"0.559\" />\r\n                                            <GradientStop Color=\"#33000000\" Offset=\"1\" />\r\n                                        </RadialGradientBrush>\r\n                                    </Rectangle.Fill>\r\n                                </Rectangle>\r\n                                <Border Grid.RowSpan=\"1\" Opacity=\"0.8\" CornerRadius=\"4,4,40,40\" Margin=\"1,1,1,0\" x:Name=\"border\">\r\n                                    <Border.Background>\r\n                                        <RadialGradientBrush>\r\n                                            <RadialGradientBrush.RelativeTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1\" ScaleY=\"1.898\" />\r\n                                                    <TranslateTransform X=\"0\" Y=\"-0.449\" />\r\n                                                </TransformGroup>\r\n                                            </RadialGradientBrush.RelativeTransform>\r\n                                            <GradientStop Color=\"#BFFFFFFF\" Offset=\"0\" />\r\n                                            <GradientStop Color=\"#4CFFFFFF\" Offset=\"1\" />\r\n                                        </RadialGradientBrush>\r\n                                    </Border.Background>\r\n                                </Border>\r\n                                <Grid Width=\"{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}\" HorizontalAlignment=\"Right\" Grid.RowSpan=\"2\">\r\n                                    <Path Fill=\"{TemplateBinding Foreground}\" HorizontalAlignment=\"Center\" x:Name=\"Arrow\" VerticalAlignment=\"Center\" Data=\"{StaticResource DownArrowGeometry}\" />\r\n                                </Grid>\r\n                            </Grid>\r\n                            <ControlTemplate.Triggers>\r\n                                <Trigger Property=\"IsChecked\" Value=\"true\">\r\n\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                                    <Setter Property=\"Fill\" TargetName=\"Arrow\" Value=\"#AFAFAF\" />\r\n                                    <Setter Property=\"Opacity\" TargetName=\"rectangle\" Value=\"0.2\"/>\r\n                                    <Setter Property=\"Fill\" TargetName=\"rectangle2\">\r\n                                        <Setter.Value>\r\n                                            <RadialGradientBrush>\r\n                                                <RadialGradientBrush.RelativeTransform>\r\n                                                    <TransformGroup>\r\n                                                        <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.147\" ScaleY=\"1.723\"/>\r\n                                                        <TranslateTransform X=\"0.002\" Y=\"0.008\"/>\r\n                                                    </TransformGroup>\r\n                                                </RadialGradientBrush.RelativeTransform>\r\n                                                <GradientStop Color=\"#FFECECEC\" Offset=\"0\"/>\r\n                                                <GradientStop Color=\"#FFECECEC\" Offset=\"1\"/>\r\n                                            </RadialGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                </Trigger>\r\n                            </ControlTemplate.Triggers>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n                <Setter Property=\"Background\" Value=\"#00000000\" />\r\n                <Setter Property=\"BorderBrush\" Value=\"{DynamicResource PrimaryBrush}\" />\r\n                <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n            </Style>\r\n            <ControlTemplate x:Key=\"ComboBoxEditableTemplate\" TargetType=\"{x:Type ComboBox}\">\r\n                <Grid x:Name=\"Placement\" SnapsToDevicePixels=\"true\">\r\n                    <Grid.ColumnDefinitions>\r\n                        <ColumnDefinition Width=\"*\" />\r\n                    </Grid.ColumnDefinitions>\r\n                    <Popup x:Name=\"PART_Popup\" AllowsTransparency=\"true\" IsOpen=\"{Binding Path=IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Bottom\" PopupAnimation=\"{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}\" Grid.ColumnSpan=\"1\" >\r\n                        <Border MaxHeight=\"{TemplateBinding MaxDropDownHeight}\" MinWidth=\"{Binding Path=ActualWidth, ElementName=Placement}\" x:Name=\"Shdw\">\r\n                            <Border x:Name=\"DropDownBorder\" Background=\"#FFFFFFFF\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1\" CornerRadius=\"4,4,4,4\">\r\n                                <ScrollViewer>\r\n                                    <ItemsPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" KeyboardNavigation.DirectionalNavigation=\"Contained\" />\r\n                                </ScrollViewer>\r\n                            </Border>\r\n                        </Border>\r\n                    </Popup>\r\n                    <Border CornerRadius=\"4,4,4,4\" x:Name=\"Border\">\r\n                        <Grid>\r\n                            <ToggleButton Style=\"{DynamicResource ComboBoxReadonlyToggleButton}\" IsChecked=\"{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" HorizontalAlignment=\"Stretch\" />\r\n                            <TextBox x:Name=\"PART_EditableTextBox\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\" IsReadOnly=\"{Binding Path=IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}\" Margin=\"2,2,21,2\" Background=\"{x:Null}\" />\r\n                        </Grid>\r\n                    </Border>\r\n                </Grid>\r\n                <ControlTemplate.Triggers>\r\n                    <Trigger Property=\"IsKeyboardFocusWithin\" Value=\"true\">\r\n                        <Setter Property=\"Foreground\" Value=\"Black\" />\r\n                    </Trigger>\r\n                    <Trigger Property=\"IsDropDownOpen\" Value=\"true\" />\r\n                    <Trigger Property=\"HasItems\" Value=\"false\">\r\n                        <Setter Property=\"Height\" TargetName=\"DropDownBorder\" Value=\"95\" />\r\n                    </Trigger>\r\n                    <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                        <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                        <Setter Property=\"Background\" Value=\"#FFF4F4F4\" />\r\n                    </Trigger>\r\n                    <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                        <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\" />\r\n                    </Trigger>\r\n                </ControlTemplate.Triggers>\r\n            </ControlTemplate>\r\n        </Style.Resources>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource PrimaryBrush}\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\" />\r\n        <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\" />\r\n        <Setter Property=\"Padding\" Value=\"4,3\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ComboBox}\">\r\n                    <Grid x:Name=\"MainGrid\" SnapsToDevicePixels=\"true\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\" />\r\n                            <ColumnDefinition MinWidth=\"{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}\" Width=\"0\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Popup Margin=\"1\" x:Name=\"PART_Popup\" AllowsTransparency=\"true\" IsOpen=\"{Binding Path=IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Bottom\" PopupAnimation=\"{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}\" Grid.ColumnSpan=\"2\">\r\n\r\n                            <Border x:Name=\"DropDownBorder\" Background=\"#FFFFFFFF\" BorderBrush=\"{DynamicResource PrimaryBrush}\" BorderThickness=\"1\" MaxHeight=\"{TemplateBinding MaxDropDownHeight}\" MinWidth=\"{Binding Path=ActualWidth, ElementName=MainGrid}\" CornerRadius=\"3,3,3,3\">\r\n                                <ScrollViewer CanContentScroll=\"true\">\r\n                                    <ItemsPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" KeyboardNavigation.DirectionalNavigation=\"Contained\" />\r\n                                </ScrollViewer>\r\n                            </Border>\r\n                        </Popup>\r\n                        <ToggleButton Style=\"{StaticResource ComboBoxReadonlyToggleButton}\" Grid.ColumnSpan=\"2\" IsChecked=\"{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" />\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" IsHitTestVisible=\"false\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Content=\"{TemplateBinding SelectionBoxItem}\" ContentTemplate=\"{TemplateBinding SelectionBoxItemTemplate}\" ContentTemplateSelector=\"{TemplateBinding ItemTemplateSelector}\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"HasItems\" Value=\"false\">\r\n                            <Setter Property=\"Height\" TargetName=\"DropDownBorder\" Value=\"95\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                            <Setter Property=\"Background\" Value=\"#FFF4F4F4\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                            <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Style.Triggers>\r\n            <Trigger Property=\"IsEditable\" Value=\"true\">\r\n                <Setter Property=\"IsTabStop\" Value=\"false\" />\r\n                <Setter Property=\"Template\" Value=\"{StaticResource ComboBoxEditableTemplate}\" />\r\n            </Trigger>\r\n        </Style.Triggers>\r\n    </Style>\r\n\r\n    <!-- ComboBoxItem -->\r\n    <Style TargetType=\"{x:Type ComboBoxItem}\">\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\" />\r\n        <Setter Property=\"Padding\" Value=\"3,0,3,0\" />\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ComboBoxItem}\">\r\n                    <Grid>\r\n                        <Grid x:Name=\"SelectedHoverGrid\" Opacity=\"0\">\r\n                            <Border CornerRadius=\"4\" x:Name=\"White\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1.2\">\r\n                                <Border.Background>\r\n                                    <RadialGradientBrush>\r\n                                        <RadialGradientBrush.RelativeTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.35\" ScaleY=\"1.35\" />\r\n                                            </TransformGroup>\r\n                                        </RadialGradientBrush.RelativeTransform>\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                    </RadialGradientBrush>\r\n                                </Border.Background>\r\n                            </Border>\r\n                            <Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1.2\" CornerRadius=\"4\" x:Name=\"Background\" Opacity=\"0.65\">\r\n                                <Border.Background>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,1.4\" StartPoint=\"0.5,0\">\r\n                                        <GradientStop Color=\"{StaticResource PrimaryColor}\" Offset=\"0.75\" />\r\n                                        <GradientStop Color=\"{StaticResource SecondaryColor}\" Offset=\"1\" />\r\n                                    </LinearGradientBrush>\r\n                                </Border.Background>\r\n                            </Border>\r\n                            <Border Background=\"{TemplateBinding Background}\" BorderBrush=\"#7FFFFFFF\" BorderThickness=\"1\" CornerRadius=\"3.5\" x:Name=\"InnerBorder\" Margin=\"1\" />\r\n                            <Border CornerRadius=\"3.5\" x:Name=\"Shadow\" Margin=\"2\" Grid.RowSpan=\"2\">\r\n                                <Border.OpacityMask>\r\n                                    <RadialGradientBrush>\r\n                                        <RadialGradientBrush.RelativeTransform>\r\n                                            <TransformGroup>\r\n                                                <TranslateTransform X=\"0\" Y=\"-0.5\" />\r\n                                            </TransformGroup>\r\n                                        </RadialGradientBrush.RelativeTransform>\r\n                                        <GradientStop Color=\"#00FFFFFF\" Offset=\"0.3\" />\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                    </RadialGradientBrush>\r\n                                </Border.OpacityMask>\r\n                                <Border.Background>\r\n                                    <RadialGradientBrush>\r\n                                        <RadialGradientBrush.RelativeTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.75\" ScaleY=\"2.25\" />\r\n                                                <TranslateTransform Y=\"0.65\" />\r\n                                            </TransformGroup>\r\n                                        </RadialGradientBrush.RelativeTransform>\r\n                                        <GradientStop Color=\"#00000000\" Offset=\"0.55\" />\r\n                                        <GradientStop Color=\"#33000000\" Offset=\"1\" />\r\n                                    </RadialGradientBrush>\r\n                                </Border.Background>\r\n                            </Border>\r\n                            <Border Margin=\"1,1,1,10\" CornerRadius=\"4,4,40,40\" x:Name=\"Highlight\" Opacity=\"0.8\" RenderTransformOrigin=\"0.5,1\">\r\n                                <Border.Background>\r\n                                    <RadialGradientBrush>\r\n                                        <RadialGradientBrush.RelativeTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.25\" ScaleY=\"2\" />\r\n                                                <TranslateTransform Y=\"-0.6\" />\r\n                                            </TransformGroup>\r\n                                        </RadialGradientBrush.RelativeTransform>\r\n                                        <GradientStop Color=\"#BFFFFFFF\" Offset=\"0\" />\r\n                                        <GradientStop Color=\"#4CFFFFFF\" Offset=\"1\" />\r\n                                    </RadialGradientBrush>\r\n                                </Border.Background>\r\n                            </Border>\r\n                        </Grid>\r\n                        <Border x:Name=\"Bd\" SnapsToDevicePixels=\"true\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\">\r\n                            <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" />\r\n                        </Border>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"SelectedHoverGrid\" Value=\"0.55\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsHighlighted\" Value=\"true\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"SelectedHoverGrid\" Value=\"0.75\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                            <Setter Property=\"Opacity\" TargetName=\"Bd\" Value=\"0.5\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- Menu -->\r\n    <Style TargetType=\"{x:Type Menu}\">\r\n        <Setter Property=\"Background\" Value=\"#00000000\" />\r\n        <Setter Property=\"FontFamily\" Value=\"{DynamicResource {x:Static SystemFonts.MenuFontFamilyKey}}\" />\r\n        <Setter Property=\"FontSize\" Value=\"{DynamicResource {x:Static SystemFonts.MenuFontSizeKey}}\" />\r\n        <Setter Property=\"FontStyle\" Value=\"{DynamicResource {x:Static SystemFonts.MenuFontStyleKey}}\" />\r\n        <Setter Property=\"FontWeight\" Value=\"{DynamicResource {x:Static SystemFonts.MenuFontWeightKey}}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{DynamicResource PrimaryBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Menu}\">\r\n                    <Grid>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"0.502*\" />\r\n                            <RowDefinition Height=\"0.498*\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Rectangle Stroke=\"#FFFFFFFF\" Grid.RowSpan=\"2\">\r\n                            <Rectangle.Fill>\r\n                                <RadialGradientBrush>\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                        <Rectangle Stroke=\"{TemplateBinding BorderBrush}\" Grid.RowSpan=\"2\" Margin=\"1,1,1,1\" Opacity=\"0.6\">\r\n                            <Rectangle.Fill>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1.244\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.714\" />\r\n                                    <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                        <Rectangle Fill=\"{TemplateBinding Background}\" Grid.RowSpan=\"2\" Margin=\"2,2,2,2\" Stroke=\"#7FFFFFFF\" />\r\n                        <Rectangle Stroke=\"{x:Null}\" Grid.RowSpan=\"2\" Margin=\"2,2,2,2\">\r\n                            <Rectangle.OpacityMask>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <TranslateTransform X=\"0\" Y=\"-0.499\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"0.293\" />\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Rectangle.OpacityMask>\r\n                            <Rectangle.Fill>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"3.703\" ScaleY=\"1.996\" />\r\n                                            <TranslateTransform X=\"-0.012\" Y=\"0.498\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"0.559\" />\r\n                                    <GradientStop Color=\"#33000000\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                        <Border CornerRadius=\"4,4,40,40\" Opacity=\"0.5\">\r\n                            <Border.Background>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"2.023\" ScaleY=\"1.945\" />\r\n                                            <TranslateTransform X=\"0.015\" Y=\"-0.472\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#BFFFFFFF\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#49FFFFFF\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <Border SnapsToDevicePixels=\"true\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" Padding=\"{TemplateBinding Padding}\" Grid.RowSpan=\"2\">\r\n                            <ItemsPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" />\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- MenuItem -->\r\n    <Style TargetType=\"{x:Type MenuItem}\">\r\n        <Style.Resources>\r\n            <Geometry x:Key=\"Checkmark\">M 0,5.1 L 1.7,5.2 L 3.4,7.1 L 8,0.4 L 9.2,0 L 3.3,10.8 Z</Geometry>\r\n            <Style x:Key=\"MenuScrollButton\" BasedOn=\"{x:Null}\" TargetType=\"{x:Type RepeatButton}\">\r\n                <Setter Property=\"ClickMode\" Value=\"Hover\" />\r\n                <Setter Property=\"MinWidth\" Value=\"0\" />\r\n                <Setter Property=\"MinHeight\" Value=\"0\" />\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n                            <DockPanel SnapsToDevicePixels=\"true\" Background=\"Transparent\">\r\n                                <Rectangle Fill=\"Transparent\" x:Name=\"R1\" Width=\"1\" DockPanel.Dock=\"Right\" />\r\n                                <Rectangle Fill=\"Transparent\" x:Name=\"B1\" Height=\"1\" DockPanel.Dock=\"Bottom\" />\r\n                                <Rectangle Fill=\"Transparent\" x:Name=\"L1\" Width=\"1\" DockPanel.Dock=\"Left\" />\r\n                                <Rectangle Fill=\"Transparent\" x:Name=\"T1\" Height=\"1\" DockPanel.Dock=\"Top\" />\r\n                                <ContentPresenter HorizontalAlignment=\"Center\" Margin=\"2,2,2,2\" x:Name=\"ContentContainer\" VerticalAlignment=\"Center\" />\r\n                            </DockPanel>\r\n                            <ControlTemplate.Triggers>\r\n                                <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                                    <Setter Property=\"Fill\" TargetName=\"R1\" Value=\"{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}\" />\r\n                                    <Setter Property=\"Fill\" TargetName=\"B1\" Value=\"{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}\" />\r\n                                    <Setter Property=\"Fill\" TargetName=\"L1\" Value=\"{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}\" />\r\n                                    <Setter Property=\"Fill\" TargetName=\"T1\" Value=\"{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}\" />\r\n                                    <Setter Property=\"Margin\" TargetName=\"ContentContainer\" Value=\"3,3,1,1\" />\r\n                                </Trigger>\r\n                            </ControlTemplate.Triggers>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n            <Geometry x:Key=\"UpArrow\">M 0,4 L 3.5,0 L 7,4 Z</Geometry>\r\n            <MenuScrollingVisibilityConverter x:Key=\"MenuScrollingVisibilityConverter\" />\r\n            <Geometry x:Key=\"DownArrow\">M 0,0 L 3.5,4 L 7,0 Z</Geometry>\r\n            <Geometry x:Key=\"RightArrow\">M 0,0 L 4,3.5 L 0,7 Z</Geometry>\r\n            <Style x:Key=\"{ComponentResourceKey ResourceId=MenuScrollViewer, TypeInTargetAssembly={x:Type FrameworkElement}}\" BasedOn=\"{x:Null}\" TargetType=\"{x:Type ScrollViewer}\">\r\n                <Setter Property=\"HorizontalScrollBarVisibility\" Value=\"Hidden\" />\r\n                <Setter Property=\"VerticalScrollBarVisibility\" Value=\"Auto\" />\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"{x:Type ScrollViewer}\">\r\n                            <Grid SnapsToDevicePixels=\"true\">\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"*\" />\r\n                                </Grid.ColumnDefinitions>\r\n                                <Grid.RowDefinitions>\r\n                                    <RowDefinition Height=\"Auto\" />\r\n                                    <RowDefinition Height=\"*\" />\r\n                                    <RowDefinition Height=\"Auto\" />\r\n                                </Grid.RowDefinitions>\r\n                                <Border Grid.Row=\"1\">\r\n                                    <ScrollContentPresenter Margin=\"{TemplateBinding Padding}\" />\r\n                                </Border>\r\n                                <RepeatButton Style=\"{StaticResource MenuScrollButton}\" Focusable=\"false\" Command=\"{x:Static ScrollBar.LineUpCommand}\" CommandTarget=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\">\r\n                                    <RepeatButton.Visibility>\r\n                                        <MultiBinding FallbackValue=\"Visibility.Collapsed\" Converter=\"{StaticResource MenuScrollingVisibilityConverter}\" ConverterParameter=\"0\">\r\n                                            <Binding Path=\"ComputedVerticalScrollBarVisibility\" RelativeSource=\"{RelativeSource TemplatedParent}\" />\r\n                                            <Binding Path=\"VerticalOffset\" RelativeSource=\"{RelativeSource TemplatedParent}\" />\r\n                                            <Binding Path=\"ExtentHeight\" RelativeSource=\"{RelativeSource TemplatedParent}\" />\r\n                                            <Binding Path=\"ViewportHeight\" RelativeSource=\"{RelativeSource TemplatedParent}\" />\r\n                                        </MultiBinding>\r\n                                    </RepeatButton.Visibility>\r\n                                    <Path Fill=\"{DynamicResource {x:Static SystemColors.MenuTextBrushKey}}\" Data=\"{StaticResource UpArrow}\" />\r\n                                </RepeatButton>\r\n                                <RepeatButton Style=\"{StaticResource MenuScrollButton}\" Focusable=\"false\" Grid.Row=\"2\" Command=\"{x:Static ScrollBar.LineDownCommand}\" CommandTarget=\"{Binding RelativeSource={RelativeSource TemplatedParent}}\">\r\n                                    <RepeatButton.Visibility>\r\n                                        <MultiBinding FallbackValue=\"Visibility.Collapsed\" Converter=\"{StaticResource MenuScrollingVisibilityConverter}\" ConverterParameter=\"100\">\r\n                                            <Binding Path=\"ComputedVerticalScrollBarVisibility\" RelativeSource=\"{RelativeSource TemplatedParent}\" />\r\n                                            <Binding Path=\"VerticalOffset\" RelativeSource=\"{RelativeSource TemplatedParent}\" />\r\n                                            <Binding Path=\"ExtentHeight\" RelativeSource=\"{RelativeSource TemplatedParent}\" />\r\n                                            <Binding Path=\"ViewportHeight\" RelativeSource=\"{RelativeSource TemplatedParent}\" />\r\n                                        </MultiBinding>\r\n                                    </RepeatButton.Visibility>\r\n                                    <Path Fill=\"{DynamicResource {x:Static SystemColors.MenuTextBrushKey}}\" Data=\"{StaticResource DownArrow}\" />\r\n                                </RepeatButton>\r\n                            </Grid>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n            <ControlTemplate x:Key=\"{ComponentResourceKey ResourceId=SubmenuContent, TypeInTargetAssembly={x:Type FrameworkElement}}\" TargetType=\"{x:Type ContentControl}\">\r\n                <Border Background=\"#FFFFFFFF\" BorderBrush=\"{DynamicResource PrimaryBrush}\" BorderThickness=\"1\" CornerRadius=\"4,4,4,4\">\r\n                    <Grid>\r\n                        <ContentPresenter Margin=\"1,0\" Grid.ColumnSpan=\"2\" />\r\n                    </Grid>\r\n                </Border>\r\n            </ControlTemplate>\r\n            <ControlTemplate x:Key=\"{ComponentResourceKey ResourceId=SubmenuItemTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}\" TargetType=\"{x:Type MenuItem}\">\r\n                <Grid SnapsToDevicePixels=\"true\">\r\n                    <Grid.RowDefinitions>\r\n                        <RowDefinition Height=\"*\" />\r\n                    </Grid.RowDefinitions>\r\n                    <Rectangle RadiusX=\"4\" RadiusY=\"4\" Margin=\"1\" x:Name=\"Hover\" Grid.RowSpan=\"1\" Opacity=\"0\">\r\n                        <Rectangle.Fill>\r\n                            <RadialGradientBrush>\r\n                                <RadialGradientBrush.RelativeTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.148\" ScaleY=\"2\" />\r\n                                        <SkewTransform AngleX=\"0\" AngleY=\"0\" CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                                        <RotateTransform Angle=\"0\" CenterX=\"0.5\" CenterY=\"0.5\" />\r\n                                        <TranslateTransform X=\"-0.01\" Y=\"-0.03\" />\r\n                                    </TransformGroup>\r\n                                </RadialGradientBrush.RelativeTransform>\r\n                                <GradientStop Color=\"#334392C7\" Offset=\"0\" />\r\n                                <GradientStop Color=\"#33A0FCFF\" Offset=\"1\" />\r\n                            </RadialGradientBrush>\r\n                        </Rectangle.Fill>\r\n                    </Rectangle>\r\n                    <Rectangle Opacity=\"0\" RadiusX=\"4\" RadiusY=\"4\" Margin=\"1,1,1,1\" Grid.RowSpan=\"1\" x:Name=\"Selected\">\r\n                        <Rectangle.Stroke>\r\n                            <SolidColorBrush Color=\"#7F4392C7\" />\r\n                        </Rectangle.Stroke>\r\n                        <Rectangle.Fill>\r\n                            <LinearGradientBrush EndPoint=\"0.5,1.314\" StartPoint=\"0.5,0\">\r\n                                <GradientStop Color=\"#594392C7\" Offset=\"0\" />\r\n                                <GradientStop Color=\"#59A0FCFF\" Offset=\"1\" />\r\n                            </LinearGradientBrush>\r\n                        </Rectangle.Fill>\r\n                    </Rectangle>\r\n                    <Grid x:Name=\"SelectedHoverGrid\" Opacity=\"0\">\r\n                        <Border CornerRadius=\"4\" x:Name=\"White\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1.2\">\r\n                            <Border.Background>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.35\" ScaleY=\"1.35\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1\" CornerRadius=\"4\" x:Name=\"Background\" Opacity=\"0.65\">\r\n                            <Border.Background>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1.4\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"{StaticResource PrimaryColor}\" Offset=\"0.75\" />\r\n                                    <GradientStop Color=\"{StaticResource SecondaryColor}\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <Border Background=\"{TemplateBinding Background}\" BorderBrush=\"#ccFFFFFF\" BorderThickness=\"1\" CornerRadius=\"3.5\" x:Name=\"InnerBorder\" Margin=\"2\" />\r\n                        <Border CornerRadius=\"3.5\" x:Name=\"Shadow\" Margin=\"2\" Grid.RowSpan=\"2\">\r\n                            <Border.OpacityMask>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <TranslateTransform X=\"0\" Y=\"-0.5\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"0.3\" />\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.OpacityMask>\r\n                            <Border.Background>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.75\" ScaleY=\"2.25\" />\r\n                                            <TranslateTransform Y=\"0.65\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#00000000\" Offset=\"0.55\" />\r\n                                    <GradientStop Color=\"#33000000\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <Border Margin=\"1,1,1,10\" CornerRadius=\"4,4,40,40\" x:Name=\"Highlight\" Opacity=\"0.8\" RenderTransformOrigin=\"0.5,1\">\r\n                            <Border.Background>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.25\" ScaleY=\"2\" />\r\n                                            <TranslateTransform Y=\"-0.6\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#BFFFFFFF\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#4CFFFFFF\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                    </Grid>\r\n                    <Grid Grid.RowSpan=\"1\" Margin=\"4,0,4,0\" VerticalAlignment=\"Center\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition SharedSizeGroup=\"MenuItemIconColumnGroup\" MinWidth=\"24\" Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"4\" />\r\n                            <ColumnDefinition Width=\"*\" />\r\n                            <ColumnDefinition Width=\"37\" />\r\n                            <ColumnDefinition SharedSizeGroup=\"MenuItemIGTColumnGroup\" Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"17\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <ContentPresenter Margin=\"1\" x:Name=\"Icon\" VerticalAlignment=\"Center\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" ContentSource=\"Icon\" />\r\n                        <Border Margin=\"1\" x:Name=\"GlyphPanel\" Width=\"22\" Height=\"22\" Visibility=\"Hidden\" Background=\"#E6EFF4\" BorderBrush=\"#CDD3E6\" BorderThickness=\"1\" CornerRadius=\"3\">\r\n                            <Path Fill=\"{DynamicResource TextBrush}\" FlowDirection=\"LeftToRight\" x:Name=\"Glyph\" Width=\"9\" Height=\"11\" Data=\"{StaticResource Checkmark}\" />\r\n                        </Border>\r\n                        <ContentPresenter Margin=\"{TemplateBinding Padding}\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Grid.Column=\"2\" ContentSource=\"Header\" RecognizesAccessKey=\"True\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" />\r\n                        <TextBlock Margin=\"{TemplateBinding Padding}\" Grid.Column=\"4\" Foreground=\"{DynamicResource TextBrush}\" Text=\"{TemplateBinding InputGestureText}\" />\r\n                    </Grid>\r\n                </Grid>\r\n                <ControlTemplate.Triggers>\r\n                    <Trigger Property=\"IsPressed\" Value=\"True\">\r\n                        <Setter Property=\"Background\" TargetName=\"White\">\r\n                            <Setter.Value>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.35\" ScaleY=\"1.35\"/>\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#FF000000\" Offset=\"0\"/>\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\"/>\r\n                                </RadialGradientBrush>\r\n                            </Setter.Value>\r\n                        </Setter>\r\n                        <Setter Property=\"Background\" TargetName=\"Background\">\r\n                            <Setter.Value>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1.4\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0\"/>\r\n                                    <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\"/>\r\n                                </LinearGradientBrush>\r\n                            </Setter.Value>\r\n                        </Setter>\r\n                        <Setter Property=\"Opacity\" TargetName=\"Background\" Value=\"0.6\"/>\r\n                        <Setter Property=\"Opacity\" TargetName=\"Highlight\" Value=\"0.5\"/>\r\n                    </Trigger>\r\n                    <Trigger Property=\"Icon\" Value=\"{x:Null}\">\r\n                        <Setter Property=\"Visibility\" TargetName=\"Icon\" Value=\"Collapsed\" />\r\n                    </Trigger>\r\n                    <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                        <Setter Property=\"Visibility\" TargetName=\"GlyphPanel\" Value=\"Visible\" />\r\n                        <Setter Property=\"Visibility\" TargetName=\"Icon\" Value=\"Collapsed\" />\r\n                    </Trigger>\r\n                    <Trigger Property=\"IsHighlighted\" Value=\"true\">\r\n                        <Setter Property=\"Stroke\" TargetName=\"Hover\" Value=\"#40FFFFFF\" />\r\n                        <Setter Property=\"Opacity\" TargetName=\"Selected\" Value=\"1\" />\r\n                        <Setter Property=\"Opacity\" TargetName=\"SelectedHoverGrid\" Value=\"1\"/>\r\n                    </Trigger>\r\n                    <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                        <Setter Property=\"Foreground\" Value=\"#FF9A9A9A\" />\r\n                        <Setter Property=\"Background\" TargetName=\"GlyphPanel\" Value=\"#EEE9E9\" />\r\n                        <Setter Property=\"BorderBrush\" TargetName=\"GlyphPanel\" Value=\"#DBD6D6\" />\r\n                        <Setter Property=\"Fill\" TargetName=\"Glyph\" Value=\"#848589\" />\r\n                    </Trigger>\r\n                </ControlTemplate.Triggers>\r\n            </ControlTemplate>\r\n            <ControlTemplate x:Key=\"{ComponentResourceKey ResourceId=TopLevelHeaderTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}\" TargetType=\"{x:Type MenuItem}\">\r\n                <Grid SnapsToDevicePixels=\"true\">\r\n                    <Rectangle RadiusX=\"4\" RadiusY=\"4\" x:Name=\"OuterBorder\" />\r\n                    <Rectangle Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"1\" RadiusX=\"4\" RadiusY=\"4\" Margin=\"1\" x:Name=\"Bg\" Opacity=\"0\">\r\n                        <Rectangle.Fill>\r\n                            <LinearGradientBrush EndPoint=\"0.5,1.47\" StartPoint=\"0.5,0\">\r\n                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.576\" />\r\n                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                            </LinearGradientBrush>\r\n                        </Rectangle.Fill>\r\n                    </Rectangle>\r\n                    <Grid x:Name=\"SelectedHoverGrid\" Opacity=\"0\">\r\n                        <Border  x:Name=\"White\" BorderBrush=\"#FFFFFFFF\" Background=\"white\" Opacity=\"0.25\" BorderThickness=\"1\"/>\r\n                        <Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1\" CornerRadius=\"1\" x:Name=\"Background\" Opacity=\"0.65\">\r\n                            <Border.Background>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1.4\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"{StaticResource PrimaryColor}\" Offset=\"0.75\" />\r\n                                    <GradientStop Color=\"{StaticResource SecondaryColor}\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <Border Background=\"{TemplateBinding Background}\" BorderBrush=\"#FFFFFF\" BorderThickness=\"1\" CornerRadius=\"1\" x:Name=\"InnerBorder\" Margin=\"2\" />\r\n                        <Border CornerRadius=\"2\" x:Name=\"Shadow\" Margin=\"2\" Grid.RowSpan=\"2\">\r\n                            <Border.OpacityMask>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <TranslateTransform X=\"0\" Y=\"-0.5\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"0.3\" />\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.OpacityMask>\r\n                            <Border.Background>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.75\" ScaleY=\"2.25\" />\r\n                                            <TranslateTransform Y=\"0.65\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#00000000\" Offset=\"0.55\" />\r\n                                    <GradientStop Color=\"#33000000\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <Border Margin=\"1,1,1,10\" CornerRadius=\"4,4,40,10\" x:Name=\"Highlight\" Opacity=\"0.8\" RenderTransformOrigin=\"0.5,1\">\r\n                            <Border.Background>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.25\" ScaleY=\"2\" />\r\n                                            <TranslateTransform Y=\"-0.6\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#BFFFFFFF\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#4CFFFFFF\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                    </Grid>\r\n                    <DockPanel>\r\n                        <ContentPresenter Margin=\"4,0,6,0\" x:Name=\"Icon\" VerticalAlignment=\"Center\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" ContentSource=\"Icon\" />\r\n                        <Path Fill=\"{TemplateBinding Foreground}\" FlowDirection=\"LeftToRight\" Margin=\"7,0,0,0\" x:Name=\"GlyphPanel\" VerticalAlignment=\"Center\" Visibility=\"Collapsed\" Data=\"{StaticResource Checkmark}\" />\r\n                        <ContentPresenter Margin=\"{TemplateBinding Padding}\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" ContentSource=\"Header\" RecognizesAccessKey=\"True\" />\r\n                    </DockPanel>\r\n                    <Popup x:Name=\"PART_Popup\" AllowsTransparency=\"true\" HorizontalOffset=\"1\" IsOpen=\"{Binding Path=IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Bottom\" PopupAnimation=\"{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}\" VerticalOffset=\"-1\" Focusable=\"false\">\r\n                        <Border x:Name=\"Shdw\" CornerRadius=\"4,4,4,4\">\r\n                            <ContentControl x:Name=\"SubMenuBorder\" IsTabStop=\"false\" Template=\"{DynamicResource {ComponentResourceKey ResourceId=SubmenuContent, TypeInTargetAssembly={x:Type FrameworkElement}}}\">\r\n                                <ScrollViewer Style=\"{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer, TypeInTargetAssembly={x:Type FrameworkElement}}}\" CanContentScroll=\"true\">\r\n                                    <ItemsPresenter Margin=\"2\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Grid.IsSharedSizeScope=\"true\" KeyboardNavigation.DirectionalNavigation=\"Cycle\" KeyboardNavigation.TabNavigation=\"Cycle\" />\r\n                                </ScrollViewer>\r\n                            </ContentControl>\r\n                        </Border>\r\n                    </Popup>\r\n                </Grid>\r\n                <ControlTemplate.Triggers>\r\n                    <MultiTrigger>\r\n                        <MultiTrigger.Conditions>\r\n                            <Condition Property=\"IsChecked\" Value=\"True\"/>\r\n                            <Condition Property=\"IsHighlighted\" Value=\"True\"/>\r\n                        </MultiTrigger.Conditions>\r\n                        <Setter Property=\"Opacity\" TargetName=\"SelectedHoverGrid\" Value=\"1\"/>\r\n                        <Setter Property=\"Visibility\" TargetName=\"GlyphPanel\" Value=\"Visible\"/>\r\n                        <Setter Property=\"Visibility\" TargetName=\"Icon\" Value=\"Collapsed\"/>\r\n                    </MultiTrigger>\r\n                    <Trigger Property=\"IsSuspendingPopupAnimation\" Value=\"true\">\r\n                        <Setter Property=\"PopupAnimation\" TargetName=\"PART_Popup\" Value=\"None\" />\r\n                    </Trigger>\r\n                    <Trigger Property=\"Icon\" Value=\"{x:Null}\">\r\n                        <Setter Property=\"Visibility\" TargetName=\"Icon\" Value=\"Collapsed\" />\r\n                    </Trigger>\r\n                    <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                        <Setter Property=\"Visibility\" TargetName=\"GlyphPanel\" Value=\"Visible\" />\r\n                        <Setter Property=\"Visibility\" TargetName=\"Icon\" Value=\"Collapsed\" />\r\n                    </Trigger>\r\n                    <Trigger Property=\"IsHighlighted\" Value=\"true\">\r\n                        <Setter Property=\"Stroke\" TargetName=\"Bg\" Value=\"#90FFFFFF\" />\r\n                        <Setter Property=\"Stroke\" TargetName=\"OuterBorder\" Value=\"#50FFFFFF\" />\r\n\r\n                        <Setter Property=\"Opacity\" TargetName=\"SelectedHoverGrid\" Value=\"1\"/>\r\n                    </Trigger>\r\n                    <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                        <Setter Property=\"Stroke\" TargetName=\"Bg\" Value=\"#E0717070\" />\r\n                    </Trigger>\r\n                    <Trigger Property=\"IsSubmenuOpen\" Value=\"true\">\r\n                        <Setter Property=\"Opacity\" TargetName=\"SelectedHoverGrid\" Value=\"1\"/>\r\n                        <Setter Property=\"Background\" TargetName=\"White\">\r\n                            <Setter.Value>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.35\" ScaleY=\"1.35\"/>\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#FF242424\" Offset=\"0\"/>\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\"/>\r\n                                </RadialGradientBrush>\r\n                            </Setter.Value>\r\n                        </Setter>\r\n                        <Setter Property=\"Background\" TargetName=\"Background\">\r\n                            <Setter.Value>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1.4\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0\"/>\r\n                                    <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\"/>\r\n                                </LinearGradientBrush>\r\n                            </Setter.Value>\r\n                        </Setter>\r\n                        <Setter Property=\"Opacity\" TargetName=\"Background\" Value=\"0.6\"/>\r\n                        <Setter Property=\"Opacity\" TargetName=\"Shadow\" Value=\"0.5\"/>\r\n                        <Setter Property=\"Opacity\" TargetName=\"Highlight\" Value=\"0.5\"/>\r\n                    </Trigger>\r\n                    <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                        <Setter Property=\"Foreground\" Value=\"#FF9A9A9A\" />\r\n                        <Setter Property=\"Fill\" TargetName=\"GlyphPanel\" Value=\"#848589\" />\r\n                    </Trigger>\r\n                </ControlTemplate.Triggers>\r\n            </ControlTemplate>\r\n            <ControlTemplate x:Key=\"{ComponentResourceKey ResourceId=TopLevelItemTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}\" TargetType=\"{x:Type MenuItem}\">\r\n                <Grid SnapsToDevicePixels=\"true\">\r\n                    <Rectangle RadiusX=\"2\" RadiusY=\"2\" x:Name=\"OuterBorder\" />\r\n                    <Rectangle Fill=\"{TemplateBinding Background}\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Margin=\"1\" x:Name=\"Bg\" />\r\n                    <Rectangle Margin=\"2\" x:Name=\"InnerBorder\" />\r\n                    <Grid x:Name=\"SelectedHoverGrid\" Opacity=\"0\">\r\n                        <Border CornerRadius=\"4\" x:Name=\"White\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1\">\r\n                            <Border.Background>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.35\" ScaleY=\"1.35\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1\" CornerRadius=\"4\" x:Name=\"Background\" Opacity=\"0.65\">\r\n                            <Border.Background>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1.4\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"{StaticResource PrimaryColor}\" Offset=\"0.75\" />\r\n                                    <GradientStop Color=\"{StaticResource SecondaryColor}\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <Border Background=\"{TemplateBinding Background}\" BorderBrush=\"#ccFFFFFF\" BorderThickness=\"1\" CornerRadius=\"3.5\" x:Name=\"InnerBorder1\" Margin=\"2\" />\r\n                        <Border CornerRadius=\"3.5\" x:Name=\"Shadow\" Margin=\"2\" Grid.RowSpan=\"2\">\r\n                            <Border.OpacityMask>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <TranslateTransform X=\"0\" Y=\"-0.5\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"0.3\" />\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.OpacityMask>\r\n                            <Border.Background>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.75\" ScaleY=\"2.25\" />\r\n                                            <TranslateTransform Y=\"0.65\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#00000000\" Offset=\"0.55\" />\r\n                                    <GradientStop Color=\"#33000000\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <Border Margin=\"1,1,1,10\" CornerRadius=\"4,4,40,10\" x:Name=\"Highlight\" Opacity=\"0.8\" RenderTransformOrigin=\"0.5,1\">\r\n                            <Border.Background>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.25\" ScaleY=\"2\" />\r\n                                            <TranslateTransform Y=\"-0.6\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#BFFFFFFF\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#4CFFFFFF\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                    </Grid>\r\n                    <DockPanel>\r\n                        <ContentPresenter Margin=\"4,0,6,0\" x:Name=\"Icon\" VerticalAlignment=\"Center\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" ContentSource=\"Icon\" />\r\n                        <Path Fill=\"{TemplateBinding Foreground}\" FlowDirection=\"LeftToRight\" Margin=\"7,0,0,0\" x:Name=\"GlyphPanel\" VerticalAlignment=\"Center\" Visibility=\"Collapsed\" Data=\"{StaticResource Checkmark}\" />\r\n                        <ContentPresenter Margin=\"{TemplateBinding Padding}\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" ContentSource=\"Header\" RecognizesAccessKey=\"True\" />\r\n                    </DockPanel>\r\n                </Grid>\r\n                <ControlTemplate.Triggers>\r\n                    <Trigger Property=\"Icon\" Value=\"{x:Null}\">\r\n                        <Setter Property=\"Visibility\" TargetName=\"Icon\" Value=\"Collapsed\" />\r\n                    </Trigger>\r\n                    <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                        <Setter Property=\"Visibility\" TargetName=\"GlyphPanel\" Value=\"Visible\" />\r\n                        <Setter Property=\"Visibility\" TargetName=\"Icon\" Value=\"Collapsed\" />\r\n                    </Trigger>\r\n                    <Trigger Property=\"IsHighlighted\" Value=\"true\">\r\n                        <Setter Property=\"Stroke\" TargetName=\"Bg\" Value=\"#90717070\" />\r\n                        <Setter Property=\"Stroke\" TargetName=\"OuterBorder\" Value=\"#ccFFFFFF\" />\r\n                        <Setter Property=\"Stroke\" TargetName=\"InnerBorder\" Value=\"#ccFFFFFF\" />\r\n                        <Setter Property=\"Opacity\" TargetName=\"SelectedHoverGrid\" Value=\"1\"/>\r\n                    </Trigger>\r\n                    <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                        <Setter Property=\"Stroke\" TargetName=\"InnerBorder\" Value=\"#50747272\" />\r\n                        <Setter Property=\"Stroke\" TargetName=\"Bg\" Value=\"{DynamicResource PrimaryBrush}\"/>\r\n                    </Trigger>\r\n                    <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                        <Setter Property=\"Foreground\" Value=\"#FF9A9A9A\" />\r\n                        <Setter Property=\"Fill\" TargetName=\"GlyphPanel\" Value=\"#848589\" />\r\n                    </Trigger>\r\n                </ControlTemplate.Triggers>\r\n            </ControlTemplate>\r\n            <ControlTemplate x:Key=\"{ComponentResourceKey ResourceId=SubmenuHeaderTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}\" TargetType=\"{x:Type MenuItem}\">\r\n                <Grid SnapsToDevicePixels=\"true\">\r\n                    <Rectangle StrokeThickness=\"1\" RadiusX=\"4\" RadiusY=\"4\" x:Name=\"Bg\" Opacity=\"0\" Margin=\"1,1,1,1\" Stroke=\"#7F4392C7\">\r\n                        <Rectangle.Fill>\r\n                            <LinearGradientBrush EndPoint=\"0.5,1.043\" StartPoint=\"0.5,0\">\r\n                                <GradientStop Color=\"#594392C7\" Offset=\"0\" />\r\n                                <GradientStop Color=\"#59A0FCFF\" Offset=\"1\" />\r\n                            </LinearGradientBrush>\r\n                        </Rectangle.Fill>\r\n                    </Rectangle>\r\n                    <Rectangle StrokeThickness=\"1\" RadiusX=\"4\" RadiusY=\"4\" Margin=\"1\" x:Name=\"InnerBorder\" Opacity=\"0\">\r\n                        <Rectangle.Fill>\r\n                            <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                <GradientStop Color=\"#334392C7\" Offset=\"0\" />\r\n                                <GradientStop Color=\"#33A0FCFF\" Offset=\"1\" />\r\n                            </LinearGradientBrush>\r\n                        </Rectangle.Fill>\r\n                    </Rectangle>\r\n                    <Grid x:Name=\"SelectedHoverGrid\" Opacity=\"0\">\r\n                        <Border CornerRadius=\"4\" x:Name=\"White\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1\">\r\n                            <Border.Background>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.35\" ScaleY=\"1.35\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1\" CornerRadius=\"4\" x:Name=\"Background\" Opacity=\"0.65\">\r\n                            <Border.Background>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1.4\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"{StaticResource PrimaryColor}\" Offset=\"0.75\" />\r\n                                    <GradientStop Color=\"{StaticResource SecondaryColor}\" Offset=\"1\" />\r\n                                </LinearGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <Border Background=\"{TemplateBinding Background}\" BorderBrush=\"#ccFFFFFF\" BorderThickness=\"1\" CornerRadius=\"3.5\" x:Name=\"InnerBorder1\" Margin=\"2\" />\r\n                        <Border CornerRadius=\"3.5\" x:Name=\"Shadow\" Margin=\"2\" Grid.RowSpan=\"2\">\r\n                            <Border.OpacityMask>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <TranslateTransform X=\"0\" Y=\"-0.5\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"0.3\" />\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.OpacityMask>\r\n                            <Border.Background>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.75\" ScaleY=\"2.25\" />\r\n                                            <TranslateTransform Y=\"0.65\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#00000000\" Offset=\"0.55\" />\r\n                                    <GradientStop Color=\"#33000000\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <Border Margin=\"1,1,1,10\" CornerRadius=\"4,4,40,40\" x:Name=\"Highlight\" Opacity=\"0.8\" RenderTransformOrigin=\"0.5,1\">\r\n                            <Border.Background>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.25\" ScaleY=\"2\" />\r\n                                            <TranslateTransform Y=\"-0.6\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#BFFFFFFF\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#4CFFFFFF\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                    </Grid>\r\n                    <Grid>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition SharedSizeGroup=\"MenuItemIconColumnGroup\" MinWidth=\"24\" Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"4\" />\r\n                            <ColumnDefinition Width=\"*\" />\r\n                            <ColumnDefinition Width=\"37\" />\r\n                            <ColumnDefinition SharedSizeGroup=\"MenuItemIGTColumnGroup\" Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"17\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <ContentPresenter Margin=\"1\" x:Name=\"Icon\" VerticalAlignment=\"Center\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" ContentSource=\"Icon\" />\r\n                        <Border Margin=\"1\" x:Name=\"GlyphPanel\" Width=\"22\" Height=\"22\" Visibility=\"Hidden\" Background=\"#E6EFF4\" BorderBrush=\"#CDD3E6\" BorderThickness=\"1\" CornerRadius=\"3\">\r\n                            <Path Fill=\"#0C12A1\" FlowDirection=\"LeftToRight\" x:Name=\"Glyph\" Width=\"9\" Height=\"11\" Data=\"{StaticResource Checkmark}\" />\r\n                        </Border>\r\n                        <ContentPresenter Margin=\"{TemplateBinding Padding}\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Grid.Column=\"2\" ContentSource=\"Header\" RecognizesAccessKey=\"True\" />\r\n                        <TextBlock Margin=\"{TemplateBinding Padding}\" Visibility=\"Collapsed\" Grid.Column=\"4\" Text=\"{TemplateBinding InputGestureText}\" />\r\n                        <Path Fill=\"{TemplateBinding Foreground}\" Margin=\"4,0,0,0\" VerticalAlignment=\"Center\" Grid.Column=\"5\" Data=\"{StaticResource RightArrow}\" />\r\n                    </Grid>\r\n                    <Popup x:Name=\"PART_Popup\" AllowsTransparency=\"true\" HorizontalOffset=\"-2\" IsOpen=\"{Binding Path=IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Right\" PopupAnimation=\"{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}\" VerticalOffset=\"-3\" Focusable=\"false\">\r\n                        <Border x:Name=\"Shdw\" Background=\"{x:Null}\" CornerRadius=\"4,4,4,4\">\r\n                            <ContentControl x:Name=\"SubMenuBorder\" IsTabStop=\"false\" Template=\"{DynamicResource {ComponentResourceKey ResourceId=SubmenuContent, TypeInTargetAssembly={x:Type FrameworkElement}}}\">\r\n                                <ScrollViewer Style=\"{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer, TypeInTargetAssembly={x:Type FrameworkElement}}}\" CanContentScroll=\"true\">\r\n                                    <ItemsPresenter Margin=\"2\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Grid.IsSharedSizeScope=\"true\" KeyboardNavigation.DirectionalNavigation=\"Cycle\" KeyboardNavigation.TabNavigation=\"Cycle\" />\r\n                                </ScrollViewer>\r\n                            </ContentControl>\r\n                        </Border>\r\n                    </Popup>\r\n                </Grid>\r\n                <ControlTemplate.Triggers>\r\n                    <Trigger Property=\"IsPressed\" Value=\"True\">\r\n                        <Setter Property=\"Background\" TargetName=\"White\">\r\n                            <Setter.Value>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.35\" ScaleY=\"1.35\"/>\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#FF000000\" Offset=\"0\"/>\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\"/>\r\n                                </RadialGradientBrush>\r\n                            </Setter.Value>\r\n                        </Setter>\r\n                        <Setter Property=\"Background\" TargetName=\"Background\">\r\n                            <Setter.Value>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1.4\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0\"/>\r\n                                    <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\"/>\r\n                                </LinearGradientBrush>\r\n                            </Setter.Value>\r\n                        </Setter>\r\n                        <Setter Property=\"Opacity\" TargetName=\"Background\" Value=\"0.6\"/>\r\n                        <Setter Property=\"Opacity\" TargetName=\"Highlight\" Value=\"0.5\"/>\r\n                    </Trigger>\r\n                    <Trigger Property=\"IsSuspendingPopupAnimation\" Value=\"true\">\r\n                        <Setter Property=\"PopupAnimation\" TargetName=\"PART_Popup\" Value=\"None\" />\r\n                    </Trigger>\r\n                    <Trigger Property=\"Icon\" Value=\"{x:Null}\">\r\n                        <Setter Property=\"Visibility\" TargetName=\"Icon\" Value=\"Collapsed\" />\r\n                    </Trigger>\r\n                    <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                        <Setter Property=\"Visibility\" TargetName=\"GlyphPanel\" Value=\"Visible\" />\r\n                        <Setter Property=\"Visibility\" TargetName=\"Icon\" Value=\"Collapsed\" />\r\n                    </Trigger>\r\n                    <Trigger Property=\"IsHighlighted\" Value=\"true\">\r\n                        <Setter Property=\"Opacity\" TargetName=\"SelectedHoverGrid\" Value=\"1\"/>\r\n                    </Trigger>\r\n                    <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                        <Setter Property=\"Foreground\" Value=\"#FF9A9A9A\" />\r\n                        <Setter Property=\"Background\" TargetName=\"GlyphPanel\" Value=\"#EEE9E9\" />\r\n                        <Setter Property=\"BorderBrush\" TargetName=\"GlyphPanel\" Value=\"#DBD6D6\" />\r\n                        <Setter Property=\"Fill\" TargetName=\"Glyph\" Value=\"#848589\" />\r\n                    </Trigger>\r\n                </ControlTemplate.Triggers>\r\n            </ControlTemplate>\r\n        </Style.Resources>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\" />\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"Template\" Value=\"{DynamicResource {ComponentResourceKey ResourceId=SubmenuItemTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}}\" />\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Style.Triggers>\r\n            <Trigger Property=\"Role\" Value=\"TopLevelHeader\">\r\n                <Setter Property=\"Padding\" Value=\"7,2,8,3\" />\r\n                <Setter Property=\"Template\" Value=\"{DynamicResource {ComponentResourceKey ResourceId=TopLevelHeaderTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}}\" />\r\n            </Trigger>\r\n            <Trigger Property=\"Role\" Value=\"TopLevelItem\">\r\n                <Setter Property=\"Padding\" Value=\"7,2,8,3\" />\r\n                <Setter Property=\"Template\" Value=\"{DynamicResource {ComponentResourceKey ResourceId=TopLevelItemTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}}\" />\r\n            </Trigger>\r\n            <Trigger Property=\"Role\" Value=\"SubmenuHeader\">\r\n                <Setter Property=\"Padding\" Value=\"2,3,2,3\" />\r\n                <Setter Property=\"Template\" Value=\"{DynamicResource {ComponentResourceKey ResourceId=SubmenuHeaderTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}}\" />\r\n            </Trigger>\r\n            <Trigger Property=\"Role\" Value=\"SubmenuItem\">\r\n                <Setter Property=\"Padding\" Value=\"2,3,2,3\" />\r\n            </Trigger>\r\n        </Style.Triggers>\r\n    </Style>\r\n\r\n    <!-- ToolBar -->\r\n    <Style TargetType=\"{x:Type ToolBar}\">\r\n        <Style.Resources>\r\n            <Style x:Key=\"ToolBarVerticalOverflowButtonStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n                <Setter Property=\"MinHeight\" Value=\"0\" />\r\n                <Setter Property=\"MinWidth\" Value=\"0\" />\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                            <Border x:Name=\"Bd\" SnapsToDevicePixels=\"true\" CornerRadius=\"0,0,3,3\">\r\n                                <Border.Background>\r\n                                    <LinearGradientBrush EndPoint=\"0,1.407\" StartPoint=\"0,0\">\r\n                                        <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.671\" />\r\n                                        <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                    </LinearGradientBrush>\r\n                                </Border.Background>\r\n                                <Canvas HorizontalAlignment=\"Right\" Margin=\"2,7,2,2\" VerticalAlignment=\"Bottom\" Width=\"7\" Height=\"6\" SnapsToDevicePixels=\"true\">\r\n                                    <Path Stroke=\"White\" Data=\"M 1.5 1 L 1.5 6\" />\r\n                                    <Path Stroke=\"{TemplateBinding Foreground}\" Data=\"M 0.5 0 L 0.5 5\" />\r\n                                    <Path Fill=\"White\" Data=\"M 3.5 0.5 L 7 3.5 L 4 6.5 Z\" />\r\n                                    <Path Fill=\"{TemplateBinding Foreground}\" Data=\"M 3 -0.5 L 6 2.5 L 3 5.5 Z\" />\r\n                                </Canvas>\r\n                            </Border>\r\n                            <ControlTemplate.Triggers>\r\n                                <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                                    <Setter Property=\"Background\" TargetName=\"Bd\">\r\n                                        <Setter.Value>\r\n                                            <LinearGradientBrush EndPoint=\"0,1.143\" StartPoint=\"0,0\">\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.133\" />\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                                    <Setter Property=\"BorderBrush\" TargetName=\"Bd\" Value=\"{DynamicResource TextBrush}\" />\r\n                                    <Setter Property=\"BorderThickness\" TargetName=\"Bd\" Value=\"1,0,1,1\" />\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                                    <Setter Property=\"Opacity\" TargetName=\"Bd\" Value=\"0.2\"/>\r\n                                </Trigger>\r\n                            </ControlTemplate.Triggers>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n            <Style x:Key=\"ToolBarHorizontalOverflowButtonStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n                <Setter Property=\"MinHeight\" Value=\"0\" />\r\n                <Setter Property=\"MinWidth\" Value=\"0\" />\r\n                <Setter Property=\"Background\" Value=\"#00FFFFFF\" />\r\n                <Setter Property=\"BorderBrush\" Value=\"{DynamicResource PrimaryBrush}\" />\r\n                <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                            <Border x:Name=\"Bd\" SnapsToDevicePixels=\"true\" CornerRadius=\"0,3,3,0\">\r\n                                <Border.Background>\r\n                                    <LinearGradientBrush EndPoint=\"0,1.307\" StartPoint=\"0,0\">\r\n                                        <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.74\" />\r\n                                        <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                    </LinearGradientBrush>\r\n                                </Border.Background>\r\n                                <Canvas HorizontalAlignment=\"Right\" Margin=\"7,2,2,2\" VerticalAlignment=\"Bottom\" Width=\"6\" Height=\"7\" SnapsToDevicePixels=\"true\">\r\n                                    <Path Stroke=\"White\" Data=\"M 1 1.5 L 6 1.5\" />\r\n                                    <Path Stroke=\"{TemplateBinding Foreground}\" Data=\"M 0 0.5 L 5 0.5\" />\r\n                                    <Path Fill=\"White\" Data=\"M 0.5 4 L 6.5 4 L 3.5 7 Z\" />\r\n                                    <Path Fill=\"{TemplateBinding Foreground}\" Data=\"M -0.5 3 L 5.5 3 L 2.5 6 Z\" />\r\n                                </Canvas>\r\n                            </Border>\r\n                            <ControlTemplate.Triggers>\r\n                                <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                                    <Setter Property=\"Background\" TargetName=\"Bd\">\r\n                                        <Setter.Value>\r\n                                            <LinearGradientBrush EndPoint=\"0,1.121\" StartPoint=\"0,0\">\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.039\" />\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                                    <Setter Property=\"Background\" TargetName=\"Bd\">\r\n                                        <Setter.Value>\r\n                                            <LinearGradientBrush EndPoint=\"0,1.307\" StartPoint=\"0,0\">\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0\" />\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                    <Setter Property=\"BorderThickness\" TargetName=\"Bd\" Value=\"0,1,1,1\" />\r\n                                    <Setter Property=\"BorderBrush\" TargetName=\"Bd\" Value=\"{DynamicResource SecondaryBrush}\" />\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                                    <Setter Property=\"Opacity\" TargetName=\"Bd\" Value=\"0.2\"/>\r\n                                </Trigger>\r\n                            </ControlTemplate.Triggers>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n            <Style x:Key=\"ToolBarThumbStyle\" TargetType=\"{x:Type Thumb}\">\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                            <Border SnapsToDevicePixels=\"True\" Background=\"Transparent\" Padding=\"{TemplateBinding Padding}\">\r\n                                <Rectangle>\r\n                                    <Rectangle.Fill>\r\n                                        <DrawingBrush TileMode=\"Tile\" Viewbox=\"0,0,4,4\" ViewboxUnits=\"Absolute\" Viewport=\"0,0,4,4\" ViewportUnits=\"Absolute\">\r\n                                            <DrawingBrush.Drawing>\r\n                                                <DrawingGroup>\r\n                                                    <GeometryDrawing Brush=\"#FFA0FCFF\" Geometry=\"M1,1L1,3 3,3 3,1z\" />\r\n                                                    <GeometryDrawing Brush=\"#FF152937\" Geometry=\"M0,0L0,2 2,2 2,0z\" />\r\n                                                </DrawingGroup>\r\n                                            </DrawingBrush.Drawing>\r\n                                        </DrawingBrush>\r\n                                    </Rectangle.Fill>\r\n                                </Rectangle>\r\n                            </Border>\r\n                            <ControlTemplate.Triggers>\r\n                                <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                                    <Setter Property=\"Cursor\" Value=\"SizeAll\" />\r\n                                </Trigger>\r\n                            </ControlTemplate.Triggers>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n            <Style x:Key=\"ToolBarButtonBaseStyle\" TargetType=\"{x:Type Button}\">\r\n                <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" />\r\n                <Setter Property=\"OverridesDefaultStyle\" Value=\"true\" />\r\n                <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n                <Setter Property=\"Template\">\r\n                    <Setter.Value>\r\n                        <ControlTemplate TargetType=\"{x:Type ButtonBase}\">\r\n                            <Grid>\r\n                                <Grid x:Name=\"SelectedHoverGrid\" Opacity=\"0\">\r\n                                    <Border CornerRadius=\"4\" x:Name=\"White\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1.2\">\r\n                                        <Border.Background>\r\n                                            <RadialGradientBrush>\r\n                                                <RadialGradientBrush.RelativeTransform>\r\n                                                    <TransformGroup>\r\n                                                        <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.35\" ScaleY=\"1.35\" />\r\n                                                    </TransformGroup>\r\n                                                </RadialGradientBrush.RelativeTransform>\r\n                                                <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                                <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                            </RadialGradientBrush>\r\n                                        </Border.Background>\r\n                                    </Border>\r\n                                    <Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1.2\" CornerRadius=\"4\" x:Name=\"Background\" Opacity=\"0.65\">\r\n                                        <Border.Background>\r\n                                            <LinearGradientBrush EndPoint=\"0.5,1.4\" StartPoint=\"0.5,0\">\r\n                                                <GradientStop Color=\"{StaticResource PrimaryColor}\" Offset=\"0.75\" />\r\n                                                <GradientStop Color=\"{StaticResource SecondaryColor}\" Offset=\"1\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Border.Background>\r\n                                    </Border>\r\n                                    <Border Background=\"{TemplateBinding Background}\" BorderBrush=\"#7FFFFFFF\" BorderThickness=\"1\" CornerRadius=\"3.5\" x:Name=\"InnerBorder\" Margin=\"1\" />\r\n                                    <Border CornerRadius=\"3.5\" x:Name=\"Shadow\" Margin=\"2\" Grid.RowSpan=\"2\">\r\n                                        <Border.OpacityMask>\r\n                                            <RadialGradientBrush>\r\n                                                <RadialGradientBrush.RelativeTransform>\r\n                                                    <TransformGroup>\r\n                                                        <TranslateTransform X=\"0\" Y=\"-0.5\" />\r\n                                                    </TransformGroup>\r\n                                                </RadialGradientBrush.RelativeTransform>\r\n                                                <GradientStop Color=\"#00FFFFFF\" Offset=\"0.3\" />\r\n                                                <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                            </RadialGradientBrush>\r\n                                        </Border.OpacityMask>\r\n                                        <Border.Background>\r\n                                            <RadialGradientBrush>\r\n                                                <RadialGradientBrush.RelativeTransform>\r\n                                                    <TransformGroup>\r\n                                                        <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.75\" ScaleY=\"2.25\" />\r\n                                                        <TranslateTransform Y=\"0.65\" />\r\n                                                    </TransformGroup>\r\n                                                </RadialGradientBrush.RelativeTransform>\r\n                                                <GradientStop Color=\"#00000000\" Offset=\"0.55\" />\r\n                                                <GradientStop Color=\"#33000000\" Offset=\"1\" />\r\n                                            </RadialGradientBrush>\r\n                                        </Border.Background>\r\n                                    </Border>\r\n                                    <Border Margin=\"1,1,1,10\" CornerRadius=\"4,4,40,40\" x:Name=\"Highlight\" Opacity=\"0.8\" RenderTransformOrigin=\"0.5,1\">\r\n                                        <Border.Background>\r\n                                            <RadialGradientBrush>\r\n                                                <RadialGradientBrush.RelativeTransform>\r\n                                                    <TransformGroup>\r\n                                                        <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.25\" ScaleY=\"2\" />\r\n                                                        <TranslateTransform Y=\"-0.6\" />\r\n                                                    </TransformGroup>\r\n                                                </RadialGradientBrush.RelativeTransform>\r\n                                                <GradientStop Color=\"#BFFFFFFF\" Offset=\"0\" />\r\n                                                <GradientStop Color=\"#4CFFFFFF\" Offset=\"1\" />\r\n                                            </RadialGradientBrush>\r\n                                        </Border.Background>\r\n                                    </Border>\r\n                                </Grid>\r\n                                <Grid Margin=\"2,2,2,2\" Visibility=\"Hidden\" x:Name=\"grid\" Opacity=\"0.35\">\r\n                                    <Grid.RowDefinitions>\r\n                                        <RowDefinition Height=\"0.161*\" />\r\n                                        <RowDefinition Height=\"0.839*\" />\r\n                                    </Grid.RowDefinitions>\r\n                                    <Grid.ColumnDefinitions>\r\n                                        <ColumnDefinition Width=\"0.039*\" />\r\n                                        <ColumnDefinition Width=\"0.961*\" />\r\n                                    </Grid.ColumnDefinitions>\r\n                                    <Border Grid.ColumnSpan=\"2\" Grid.RowSpan=\"1\" Grid.Column=\"1\" CornerRadius=\"0,3,0,0\">\r\n                                        <Border.Background>\r\n                                            <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                                <GradientStop Color=\"#FF000000\" Offset=\"0\" />\r\n                                                <GradientStop Color=\"#004392C7\" Offset=\"1\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Border.Background>\r\n                                    </Border>\r\n                                    <Border Grid.ColumnSpan=\"1\" Grid.RowSpan=\"2\" Grid.Row=\"1\" CornerRadius=\"0,0,0,3\">\r\n                                        <Border.Background>\r\n                                            <LinearGradientBrush EndPoint=\"1.1,0.5\" StartPoint=\"0,0.5\">\r\n                                                <GradientStop Color=\"#FF000000\" />\r\n                                                <GradientStop Color=\"#004392C7\" Offset=\"1\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Border.Background>\r\n                                    </Border>\r\n                                    <Border Grid.ColumnSpan=\"1\" Grid.RowSpan=\"1\" CornerRadius=\"3,0,0,0\">\r\n                                        <Border.Background>\r\n                                            <RadialGradientBrush>\r\n                                                <RadialGradientBrush.RelativeTransform>\r\n                                                    <TransformGroup>\r\n                                                        <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.988\" ScaleY=\"1.988\" />\r\n                                                        <TranslateTransform X=\"0.494\" Y=\"0.494\" />\r\n                                                    </TransformGroup>\r\n                                                </RadialGradientBrush.RelativeTransform>\r\n                                                <GradientStop Color=\"#004392C7\" />\r\n                                                <GradientStop Color=\"#FF000000\" Offset=\"1\" />\r\n                                            </RadialGradientBrush>\r\n                                        </Border.Background>\r\n                                    </Border>\r\n                                </Grid>\r\n                                <Border x:Name=\"Border\" BorderThickness=\"1\" Background=\"Transparent\" BorderBrush=\"Transparent\">\r\n                                    <ContentPresenter Margin=\"10,5\" HorizontalAlignment=\"Center\" x:Name=\"contentPresenter\"/>\r\n                                </Border>\r\n                            </Grid>\r\n                            <ControlTemplate.Triggers>\r\n                                <Trigger Property=\"IsKeyboardFocused\" Value=\"true\" />\r\n                                <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                                    <Setter Property=\"Opacity\" TargetName=\"SelectedHoverGrid\" Value=\"1\" />\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                                    <Setter Property=\"Opacity\" TargetName=\"SelectedHoverGrid\" Value=\"1\" />\r\n                                    <Setter Property=\"Background\" TargetName=\"White\">\r\n                                        <Setter.Value>\r\n                                            <RadialGradientBrush>\r\n                                                <RadialGradientBrush.RelativeTransform>\r\n                                                    <TransformGroup>\r\n                                                        <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.35\" ScaleY=\"1.35\" />\r\n                                                    </TransformGroup>\r\n                                                </RadialGradientBrush.RelativeTransform>\r\n                                                <GradientStop Color=\"#FF0E0E0E\" Offset=\"0\" />\r\n                                                <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                            </RadialGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                    <Setter Property=\"Background\" TargetName=\"Background\">\r\n                                        <Setter.Value>\r\n                                            <LinearGradientBrush EndPoint=\"0.5,1.4\" StartPoint=\"0.5,0\">\r\n                                                <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0\" />\r\n                                                <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Setter.Value>\r\n                                    </Setter>\r\n                                    <Setter Property=\"Opacity\" TargetName=\"Background\" Value=\"1\" />\r\n                                    <Setter Property=\"Opacity\" TargetName=\"Highlight\" Value=\"0.5\" />\r\n                                    <Setter Property=\"BorderBrush\" TargetName=\"InnerBorder\" Value=\"#7F242424\" />\r\n                                </Trigger>\r\n                                <Trigger Property=\"CheckBox.IsChecked\" Value=\"true\">\r\n                                    <Setter Property=\"Opacity\" TargetName=\"SelectedHoverGrid\" Value=\"1\" />\r\n                                    <Setter Property=\"Visibility\" TargetName=\"grid\" Value=\"Visible\" />\r\n                                </Trigger>\r\n                                <Trigger Property=\"IsEnabled\" Value=\"false\" >\r\n                                    <Setter Property=\"Opacity\" TargetName=\"contentPresenter\" Value=\"0.5\"/>\r\n                                </Trigger>\r\n                            </ControlTemplate.Triggers>\r\n                        </ControlTemplate>\r\n                    </Setter.Value>\r\n                </Setter>\r\n            </Style>\r\n            <Style x:Key=\"{x:Static ToolBar.ButtonStyleKey}\" BasedOn=\"{StaticResource ToolBarButtonBaseStyle}\" TargetType=\"{x:Type Button}\" />\r\n        </Style.Resources>\r\n        <Setter Property=\"Background\" Value=\"#00FFFFFF\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{DynamicResource TextBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToolBar}\">\r\n                    <Grid Margin=\"3,1,1,1\" x:Name=\"Grid\" SnapsToDevicePixels=\"true\">\r\n                        <Grid HorizontalAlignment=\"Right\" x:Name=\"OverflowGrid\">\r\n                            <ToggleButton FocusVisualStyle=\"{x:Null}\" x:Name=\"OverflowButton\" Style=\"{StaticResource ToolBarHorizontalOverflowButtonStyle}\" IsEnabled=\"{TemplateBinding HasOverflowItems}\" IsChecked=\"{Binding Path=IsOverflowOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" ClickMode=\"Press\" />\r\n                            <Popup x:Name=\"OverflowPopup\" AllowsTransparency=\"true\" IsOpen=\"{Binding Path=IsOverflowOpen, RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Bottom\" PopupAnimation=\"{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}\" StaysOpen=\"false\" Focusable=\"false\">\r\n                                <Border x:Name=\"Shdw\" >\r\n                                    <Border Background=\"#FFFFFFFF\" BorderBrush=\"{DynamicResource PrimaryBrush}\" BorderThickness=\"1\" CornerRadius=\"4,4,4,4\">\r\n                                        <ToolBarOverflowPanel FocusVisualStyle=\"{x:Null}\" Margin=\"2\" x:Name=\"PART_ToolBarOverflowPanel\" Focusable=\"true\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" KeyboardNavigation.DirectionalNavigation=\"Cycle\" KeyboardNavigation.TabNavigation=\"Cycle\" WrapWidth=\"200\" />\r\n                                    </Border>\r\n                                </Border>\r\n                            </Popup>\r\n                        </Grid>\r\n                        <Border Margin=\"0,0,11,0\" x:Name=\"MainPanelBorder\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3,3,3,3\" Padding=\"{TemplateBinding Padding}\">\r\n                            <Grid>\r\n                                <Grid.RowDefinitions>\r\n                                    <RowDefinition Height=\"0.485*\" />\r\n                                    <RowDefinition Height=\"0.515*\" />\r\n                                </Grid.RowDefinitions>\r\n                                <Rectangle Stroke=\"#FFFFFFFF\" RadiusX=\"3\" RadiusY=\"3\" Grid.RowSpan=\"2\">\r\n                                    <Rectangle.Fill>\r\n                                        <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                        </LinearGradientBrush>\r\n                                    </Rectangle.Fill>\r\n                                </Rectangle>\r\n                                <Rectangle Stroke=\"{TemplateBinding BorderBrush}\" RadiusX=\"3\" RadiusY=\"3\" Opacity=\"0.65\" Grid.RowSpan=\"2\">\r\n                                    <Rectangle.Fill>\r\n                                        <LinearGradientBrush EndPoint=\"0.5,1.379\" StartPoint=\"0.5,0\">\r\n                                            <GradientStop Color=\"{DynamicResource PrimaryColor}\" Offset=\"0.651\" />\r\n                                            <GradientStop Color=\"{DynamicResource SecondaryColor}\" Offset=\"1\" />\r\n                                        </LinearGradientBrush>\r\n                                    </Rectangle.Fill>\r\n                                </Rectangle>\r\n                                <Rectangle Fill=\"{TemplateBinding Background}\" Stroke=\"#7FFFFFFF\" RadiusX=\"3\" RadiusY=\"3\" Margin=\"1,1,1,1\" Grid.RowSpan=\"2\" />\r\n                                <Rectangle Stroke=\"{x:Null}\" StrokeThickness=\"0\" RadiusX=\"2.5\" RadiusY=\"2.5\" Margin=\"2,2,2,2\" Grid.RowSpan=\"2\">\r\n                                    <Rectangle.OpacityMask>\r\n                                        <RadialGradientBrush>\r\n                                            <RadialGradientBrush.RelativeTransform>\r\n                                                <TransformGroup>\r\n                                                    <TranslateTransform X=\"0\" Y=\"-0.531\" />\r\n                                                </TransformGroup>\r\n                                            </RadialGradientBrush.RelativeTransform>\r\n                                            <GradientStop Color=\"#00FFFFFF\" Offset=\"0.339\" />\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                        </RadialGradientBrush>\r\n                                    </Rectangle.OpacityMask>\r\n                                    <Rectangle.Fill>\r\n                                        <RadialGradientBrush>\r\n                                            <RadialGradientBrush.RelativeTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.405\" ScaleY=\"1.952\" />\r\n                                                    <TranslateTransform X=\"0\" Y=\"0.476\" />\r\n                                                </TransformGroup>\r\n                                            </RadialGradientBrush.RelativeTransform>\r\n                                            <GradientStop Color=\"#00FFFFFF\" Offset=\"0.447\" />\r\n                                            <GradientStop Color=\"#33000000\" Offset=\"1\" />\r\n                                        </RadialGradientBrush>\r\n                                    </Rectangle.Fill>\r\n                                </Rectangle>\r\n                                <Border Margin=\"1,1,1,0\" Opacity=\"0.8\" Grid.RowSpan=\"1\" CornerRadius=\"4,4,40,40\">\r\n                                    <Border.Background>\r\n                                        <RadialGradientBrush>\r\n                                            <RadialGradientBrush.RelativeTransform>\r\n                                                <TransformGroup>\r\n                                                    <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1\" ScaleY=\"1.971\" />\r\n                                                    <TranslateTransform X=\"0\" Y=\"-0.486\" />\r\n                                                </TransformGroup>\r\n                                            </RadialGradientBrush.RelativeTransform>\r\n                                            <GradientStop Color=\"#BFFFFFFF\" Offset=\"0\" />\r\n                                            <GradientStop Color=\"#4CFFFFFF\" Offset=\"1\" />\r\n                                        </RadialGradientBrush>\r\n                                    </Border.Background>\r\n                                </Border>\r\n                                <DockPanel KeyboardNavigation.TabIndex=\"1\" KeyboardNavigation.TabNavigation=\"Local\" Grid.RowSpan=\"2\">\r\n                                    <Thumb Margin=\"-3,-1,0,0\" x:Name=\"ToolBarThumb\" Style=\"{StaticResource ToolBarThumbStyle}\" Width=\"10\" Padding=\"6,5,1,6\" />\r\n                                    <ContentPresenter HorizontalAlignment=\"Center\" Margin=\"4,0,4,0\" x:Name=\"ToolBarHeader\" VerticalAlignment=\"Center\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" ContentSource=\"Header\" />\r\n                                    <ToolBarPanel Margin=\"0,1,2,2\" x:Name=\"PART_ToolBarPanel\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" IsItemsHost=\"true\" />\r\n                                </DockPanel>\r\n                            </Grid>\r\n                        </Border>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsOverflowOpen\" Value=\"true\">\r\n                            <Setter Property=\"IsEnabled\" TargetName=\"ToolBarThumb\" Value=\"false\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"Header\" Value=\"{x:Null}\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"ToolBarHeader\" Value=\"Collapsed\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"ToolBarTray.IsLocked\" Value=\"true\">\r\n                            <Setter Property=\"Visibility\" TargetName=\"ToolBarThumb\" Value=\"Collapsed\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"HasDropShadow\" SourceName=\"OverflowPopup\" Value=\"true\">\r\n                            <Setter Property=\"Margin\" TargetName=\"Shdw\" Value=\"0,0,5,5\" />\r\n                            <Setter Property=\"SnapsToDevicePixels\" TargetName=\"Shdw\" Value=\"true\" />\r\n\r\n                        </Trigger>\r\n                        <Trigger Property=\"Orientation\" Value=\"Vertical\">\r\n                            <Setter Property=\"Margin\" TargetName=\"Grid\" Value=\"1,3,1,1\" />\r\n                            <Setter Property=\"Style\" TargetName=\"OverflowButton\" Value=\"{StaticResource ToolBarVerticalOverflowButtonStyle}\" />\r\n                            <Setter Property=\"Height\" TargetName=\"ToolBarThumb\" Value=\"10\" />\r\n                            <Setter Property=\"Width\" TargetName=\"ToolBarThumb\" Value=\"Auto\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"ToolBarThumb\" Value=\"-1,-3,0,0\" />\r\n                            <Setter Property=\"Padding\" TargetName=\"ToolBarThumb\" Value=\"5,6,6,1\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"ToolBarHeader\" Value=\"0,0,0,4\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"PART_ToolBarPanel\" Value=\"1,0,2,2\" />\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ToolBarThumb\" Value=\"Top\" />\r\n                            <Setter Property=\"DockPanel.Dock\" TargetName=\"ToolBarHeader\" Value=\"Top\" />\r\n                            <Setter Property=\"HorizontalAlignment\" TargetName=\"OverflowGrid\" Value=\"Stretch\" />\r\n                            <Setter Property=\"VerticalAlignment\" TargetName=\"OverflowGrid\" Value=\"Bottom\" />\r\n                            <Setter Property=\"Placement\" TargetName=\"OverflowPopup\" Value=\"Right\" />\r\n                            <Setter Property=\"Margin\" TargetName=\"MainPanelBorder\" Value=\"0,0,0,11\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--ToolTip-->\r\n    <Style TargetType=\"ToolTip\">\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource TextBrush}\" />\r\n        <Setter Property=\"Background\" Value=\"{StaticResource PrimaryBrush}\" />\r\n        <Setter Property=\"Padding\" Value=\"5,3,5,3\" />\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"{StaticResource PrimaryColor}\" />\r\n                    <GradientStop Color=\"{StaticResource SecondaryColor}\" Offset=\"1\" />\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Content\" Value=\"ToolTip\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ToolTip\">\r\n                    <Grid x:Name=\"RootElement\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"0.096*\" />\r\n                            <ColumnDefinition Width=\"0.836*\" />\r\n                            <ColumnDefinition Width=\"0.068*\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"0.257*\" />\r\n                            <RowDefinition Height=\"0.536*\" />\r\n                            <RowDefinition Height=\"0.207*\" />\r\n                        </Grid.RowDefinitions>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\" />\r\n                                <VisualState x:Name=\"Disabled\" />\r\n                                <VisualState x:Name=\"ReadOnly\" />\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\" />\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"Background\"  CornerRadius=\"4,4,4,4\" Background=\"{StaticResource PrimaryBrush}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1,1,1,1\" Grid.RowSpan=\"3\" Grid.ColumnSpan=\"3\" />\r\n\r\n                        <ContentPresenter x:Name=\"contentPresenter\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" TextBlock.Foreground=\"white\" RenderTransformOrigin=\"0.5,0.5\" MaxWidth=\"150\" Content=\"{TemplateBinding Content}\" Grid.Row=\"1\" Grid.Column=\"1\" Margin=\"10,5\" />\r\n\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- ProgressBar -->\r\n    <Style x:Key=\"{x:Type ProgressBar}\" TargetType=\"{x:Type ProgressBar}\">\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource TextBrush}\" />\r\n        <Setter Property=\"Background\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"#FFB4B4B4\" />\r\n                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Maximum\" Value=\"100\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource PrimaryBrush}\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ProgressBar}\">\r\n                    <Grid x:Name=\"Root\" SnapsToDevicePixels=\"True\">\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"0.5*\" />\r\n                            <RowDefinition Height=\"0.5*\" />\r\n                        </Grid.RowDefinitions>\r\n                        <Border CornerRadius=\"4\" x:Name=\"White\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1\" Grid.RowSpan=\"2\">\r\n                            <Border.Background>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.35\" ScaleY=\"1.35\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <Border x:Name=\"PART_Track\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1\" CornerRadius=\"4,4,4,4\" Grid.RowSpan=\"2\" Opacity=\"0.65\" />\r\n                        <Grid x:Name=\"ProgressBarRootGrid\" Grid.RowSpan=\"2\">\r\n                            <Rectangle x:Name=\"ProgressBarRootGradient\" Canvas.ZIndex=\"1\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\" RadiusX=\"4\" RadiusY=\"4\" Opacity=\"0.65\">\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush EndPoint=\"0.7,1.263\" StartPoint=\"0.699999988079071,0\">\r\n                                        <GradientStop Color=\"{StaticResource PrimaryColor}\" Offset=\"0.312\" />\r\n                                        <GradientStop Color=\"{StaticResource SecondaryColor}\" Offset=\"1\" />\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                            <Grid x:Name=\"IndeterminateRoot\" Visibility=\"Collapsed\">\r\n                                <Rectangle Margin=\"{TemplateBinding BorderThickness}\" x:Name=\"IndeterminateSolidFill\" Opacity=\"1\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"{TemplateBinding Foreground}\" Stroke=\"#FF448DCA\" StrokeThickness=\"0\" RadiusX=\"4\" RadiusY=\"4\" />\r\n                                <Rectangle Margin=\"{TemplateBinding BorderThickness}\" x:Name=\"IndeterminateGradientFill\" Opacity=\"0.7\" StrokeThickness=\"1\" RadiusX=\"4\" RadiusY=\"4\">\r\n                                    <Rectangle.Fill>\r\n                                        <LinearGradientBrush MappingMode=\"Absolute\" SpreadMethod=\"Repeat\" EndPoint=\"0,1\" StartPoint=\"20,1\">\r\n                                            <LinearGradientBrush.Transform>\r\n                                                <TransformGroup>\r\n                                                    <TranslateTransform X=\"0\" />\r\n                                                    <SkewTransform AngleX=\"-30\" />\r\n                                                </TransformGroup>\r\n                                            </LinearGradientBrush.Transform>\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                            <GradientStop Color=\"#00FFFFFF\" Offset=\".25\" />\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.85\" />\r\n                                        </LinearGradientBrush>\r\n                                    </Rectangle.Fill>\r\n                                </Rectangle>\r\n                            </Grid>\r\n                            <Grid Margin=\"1\" x:Name=\"DeterminateRoot\">\r\n                                <Rectangle HorizontalAlignment=\"Left\" Margin=\"2\" x:Name=\"PART_Indicator\" StrokeThickness=\"0.5\" RadiusX=\"4\" RadiusY=\"4\" Fill=\"{StaticResource PrimaryBrush}\" />\r\n                            </Grid>\r\n                        </Grid>\r\n                        <Border BorderBrush=\"#ccFFFFFF\" BorderThickness=\"1\" CornerRadius=\"3.5\" x:Name=\"InnerBorder\" Margin=\"2\" Grid.RowSpan=\"2\" />\r\n                        <Border CornerRadius=\"3.5\" x:Name=\"Shadow\" Margin=\"2\" Opacity=\"0.2\" Grid.RowSpan=\"2\">\r\n                            <Border.OpacityMask>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <TranslateTransform X=\"0\" Y=\"-0.5\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#00FFFFFF\" Offset=\"0.3\" />\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.OpacityMask>\r\n                            <Border.Background>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.75\" ScaleY=\"2.25\" />\r\n                                            <TranslateTransform Y=\"0.65\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#00000000\" Offset=\"0.55\" />\r\n                                    <GradientStop Color=\"#4C000000\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                        <Border Margin=\"1\" CornerRadius=\"4,4,4,10\" x:Name=\"Highlight\" Opacity=\"0.8\" RenderTransformOrigin=\"0.5,1\">\r\n                            <Border.Background>\r\n                                <RadialGradientBrush>\r\n                                    <RadialGradientBrush.RelativeTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.25\" ScaleY=\"2\" />\r\n                                            <TranslateTransform Y=\"-0.6\" />\r\n                                        </TransformGroup>\r\n                                    </RadialGradientBrush.RelativeTransform>\r\n                                    <GradientStop Color=\"#BFFFFFFF\" Offset=\"0\" />\r\n                                    <GradientStop Color=\"#4CFFFFFF\" Offset=\"1\" />\r\n                                </RadialGradientBrush>\r\n                            </Border.Background>\r\n                        </Border>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsIndeterminate\" Value=\"True\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard>\r\n                                    <Storyboard RepeatBehavior=\"Forever\">\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"IndeterminateGradientFill\" Storyboard.TargetProperty=\"(Shape.Fill).(LinearGradientBrush.Transform).(TransformGroup.Children)[0].X\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0\" />\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:.5\" Value=\"20\" />\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </BeginStoryboard>\r\n                            </Trigger.EnterActions>\r\n                            <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"IndeterminateRoot\" />\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"DeterminateRoot\" />\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- TreeView -->\r\n    <Style x:Key=\"{x:Type TreeView}\" TargetType=\"{x:Type TreeView}\">\r\n        <Setter Property=\"Background\" Value=\"white\" />\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource TextBrush}\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"Cursor\" Value=\"Arrow\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"Padding\" Value=\"1\" />\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush StartPoint=\"0.5,0\" EndPoint=\"0.5,1.65\">\r\n                    <GradientStop Color=\"{StaticResource PrimaryColor}\" Offset=\".25\" />\r\n                    <GradientStop Color=\"{StaticResource SecondaryColor}\" Offset=\"1\" />\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TreeView}\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <Border x:Name=\"Border\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\">\r\n                            <Border Margin=\"1\" Background=\"{TemplateBinding Background}\" Padding=\"{TemplateBinding Padding}\">\r\n                                <ScrollViewer x:Name=\"ScrollViewer\" Background=\"{x:Null}\" BorderBrush=\"Transparent\" BorderThickness=\"0\" IsTabStop=\"False\" HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Auto\">\r\n                                    <ItemsPresenter Margin=\"5\" x:Name=\"TreeItems\" />\r\n                                </ScrollViewer>\r\n                            </Border>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!-- TreeViewItem -->\r\n    <Style x:Key=\"{x:Type TreeViewItem}\" TargetType=\"{x:Type TreeViewItem}\">\r\n        <Setter Property=\"Padding\" Value=\"3\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"Background\" Value=\"Transparent\" />\r\n        <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource PrimaryBrush}\" />\r\n        <Setter Property=\"Cursor\" Value=\"Arrow\" />\r\n        <Setter Property=\"IsTabStop\" Value=\"True\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TreeViewItem}\">\r\n                    <ControlTemplate.Resources>\r\n                        <Storyboard x:Key=\"MouseOver\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"MouseOverGrid\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0.5\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"MouseOut\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"MouseOverGrid\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"Selected\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedHoverGrid\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"1\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                        <Storyboard x:Key=\"Unselected\">\r\n                            <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"SelectedHoverGrid\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                            </DoubleAnimationUsingKeyFrames>\r\n                        </Storyboard>\r\n                    </ControlTemplate.Resources>\r\n                    <Grid Background=\"Transparent\" x:Name=\"grid\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"15\" />\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"*\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\" />\r\n                            <RowDefinition Height=\"*\" />\r\n                        </Grid.RowDefinitions>\r\n                        <ToggleButton x:Name=\"Expander\" IsTabStop=\"False\" IsChecked=\"{Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}\" ClickMode=\"Press\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\">\r\n                            <ToggleButton.Template>\r\n                                <ControlTemplate TargetType=\"ToggleButton\">\r\n                                    <Grid x:Name=\"Root\" Background=\"Transparent\">\r\n                                        <VisualStateManager.VisualStateGroups>\r\n                                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                                <VisualState x:Name=\"Normal\" />\r\n                                                <VisualState x:Name=\"MouseOver\">\r\n                                                    <Storyboard>\r\n                                                        <ColorAnimation Duration=\"0\" Storyboard.TargetName=\"UncheckedVisual\" Storyboard.TargetProperty=\"(Path.Stroke).Color\" To=\"#FF1BBBFA\" />\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                                <VisualState x:Name=\"Disabled\">\r\n                                                    <Storyboard>\r\n                                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"Root\" Storyboard.TargetProperty=\"Opacity\" To=\".7\" />\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                            </VisualStateGroup>\r\n                                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                                <VisualState x:Name=\"Unchecked\" />\r\n                                                <VisualState x:Name=\"Checked\">\r\n                                                    <Storyboard>\r\n                                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"UncheckedVisual\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"CheckedVisual\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                                                    </Storyboard>\r\n                                                </VisualState>\r\n                                            </VisualStateGroup>\r\n                                        </VisualStateManager.VisualStateGroups>\r\n                                        <Grid HorizontalAlignment=\"Right\" Margin=\"2 2 5 2\">\r\n                                            <Path x:Name=\"UncheckedVisual\" Height=\"9\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Center\" Width=\"6\" Data=\"M 0,0 L 0,9 L 5,4.5 Z\" Fill=\"#FFFFFFFF\" Stroke=\"#FF989898\" StrokeLineJoin=\"Miter\" StrokeThickness=\"1\" />\r\n                                            <Path x:Name=\"CheckedVisual\" Height=\"6\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Width=\"6\" Opacity=\"0\" Data=\"M 6,0 L 6,6 L 0,6 Z\" Fill=\"#FF262626\" StrokeLineJoin=\"Miter\" />\r\n                                        </Grid>\r\n                                    </Grid>\r\n                                </ControlTemplate>\r\n                            </ToggleButton.Template>\r\n                        </ToggleButton>\r\n                        <Rectangle x:Name=\"select\" IsHitTestVisible=\"False\" Opacity=\"0\" Grid.Column=\"1\" Fill=\"#FFBADDE9\" Stroke=\"#FF6DBDD1\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" />\r\n                        <Rectangle x:Name=\"inactive\" IsHitTestVisible=\"False\" Opacity=\"0\" Grid.Column=\"1\" Fill=\"#FF999999\" Stroke=\"#FF333333\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" />\r\n                        <Grid x:Name=\"MouseOverGrid\" Opacity=\"0\" Grid.Column=\"1\">\r\n                            <Border CornerRadius=\"4\" x:Name=\"HoverWhite\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1\">\r\n                                <Border.Background>\r\n                                    <RadialGradientBrush>\r\n                                        <RadialGradientBrush.RelativeTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.35\" ScaleY=\"1.35\" />\r\n                                            </TransformGroup>\r\n                                        </RadialGradientBrush.RelativeTransform>\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                    </RadialGradientBrush>\r\n                                </Border.Background>\r\n                            </Border>\r\n                            <Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1\" CornerRadius=\"4\" x:Name=\"HoverBackground\" Opacity=\"0.65\">\r\n                                <Border.Background>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,1.4\" StartPoint=\"0.5,0\">\r\n                                        <GradientStop Color=\"{StaticResource PrimaryColor}\" Offset=\"0.75\" />\r\n                                        <GradientStop Color=\"{StaticResource SecondaryColor}\" Offset=\"1\" />\r\n                                    </LinearGradientBrush>\r\n                                </Border.Background>\r\n                            </Border>\r\n                            <Border Background=\"{TemplateBinding Background}\" BorderBrush=\"#FFFFFF\" BorderThickness=\"1\" CornerRadius=\"3.5\" x:Name=\"HoverInnerBorder\" Margin=\"2\" />\r\n                            <Border CornerRadius=\"3.5\" x:Name=\"HoverShadow\" Margin=\"2\" Grid.RowSpan=\"2\">\r\n                                <Border.OpacityMask>\r\n                                    <RadialGradientBrush>\r\n                                        <RadialGradientBrush.RelativeTransform>\r\n                                            <TransformGroup>\r\n                                                <TranslateTransform X=\"0\" Y=\"-0.5\" />\r\n                                            </TransformGroup>\r\n                                        </RadialGradientBrush.RelativeTransform>\r\n                                        <GradientStop Color=\"#00FFFFFF\" Offset=\"0.3\" />\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                    </RadialGradientBrush>\r\n                                </Border.OpacityMask>\r\n                                <Border.Background>\r\n                                    <RadialGradientBrush>\r\n                                        <RadialGradientBrush.RelativeTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.75\" ScaleY=\"2.25\" />\r\n                                                <TranslateTransform Y=\"0.65\" />\r\n                                            </TransformGroup>\r\n                                        </RadialGradientBrush.RelativeTransform>\r\n                                        <GradientStop Color=\"#00000000\" Offset=\"0.55\" />\r\n                                        <GradientStop Color=\"#33000000\" Offset=\"1\" />\r\n                                    </RadialGradientBrush>\r\n                                </Border.Background>\r\n                            </Border>\r\n                            <Border Margin=\"1,1,1,10\" CornerRadius=\"4,4,40,10\" x:Name=\"HoverHighlight\" Opacity=\"0.8\" RenderTransformOrigin=\"0.5,1\">\r\n                                <Border.Background>\r\n                                    <RadialGradientBrush>\r\n                                        <RadialGradientBrush.RelativeTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.25\" ScaleY=\"2\" />\r\n                                                <TranslateTransform Y=\"-0.6\" />\r\n                                            </TransformGroup>\r\n                                        </RadialGradientBrush.RelativeTransform>\r\n                                        <GradientStop Color=\"#BFFFFFFF\" Offset=\"0\" />\r\n                                        <GradientStop Color=\"#4CFFFFFF\" Offset=\"1\" />\r\n                                    </RadialGradientBrush>\r\n                                </Border.Background>\r\n                            </Border>\r\n                        </Grid>\r\n                        <Grid x:Name=\"SelectedHoverGrid\" Opacity=\"0\" Grid.Column=\"1\">\r\n                            <Border CornerRadius=\"4\" x:Name=\"White\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1\">\r\n                                <Border.Background>\r\n                                    <RadialGradientBrush>\r\n                                        <RadialGradientBrush.RelativeTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.35\" ScaleY=\"1.35\" />\r\n                                            </TransformGroup>\r\n                                        </RadialGradientBrush.RelativeTransform>\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\" />\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                    </RadialGradientBrush>\r\n                                </Border.Background>\r\n                            </Border>\r\n                            <Border BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1.2\" CornerRadius=\"4\" x:Name=\"Background\" Opacity=\"0.65\">\r\n                                <Border.Background>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,1.4\" StartPoint=\"0.5,0\">\r\n                                        <GradientStop Color=\"{StaticResource PrimaryColor}\" Offset=\"0.75\" />\r\n                                        <GradientStop Color=\"{StaticResource SecondaryColor}\" Offset=\"1\" />\r\n                                    </LinearGradientBrush>\r\n                                </Border.Background>\r\n                            </Border>\r\n                            <Border Background=\"{TemplateBinding Background}\" BorderBrush=\"#FFFFFF\" BorderThickness=\"1\" CornerRadius=\"3.5\" x:Name=\"InnerBorder\" Margin=\"1\" />\r\n                            <Border CornerRadius=\"3.5\" x:Name=\"Shadow\" Margin=\"2\" Grid.RowSpan=\"2\">\r\n                                <Border.OpacityMask>\r\n                                    <RadialGradientBrush>\r\n                                        <RadialGradientBrush.RelativeTransform>\r\n                                            <TransformGroup>\r\n                                                <TranslateTransform X=\"0\" Y=\"-0.5\" />\r\n                                            </TransformGroup>\r\n                                        </RadialGradientBrush.RelativeTransform>\r\n                                        <GradientStop Color=\"#00FFFFFF\" Offset=\"0.3\" />\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\" />\r\n                                    </RadialGradientBrush>\r\n                                </Border.OpacityMask>\r\n                                <Border.Background>\r\n                                    <RadialGradientBrush>\r\n                                        <RadialGradientBrush.RelativeTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.75\" ScaleY=\"2.25\" />\r\n                                                <TranslateTransform Y=\"0.65\" />\r\n                                            </TransformGroup>\r\n                                        </RadialGradientBrush.RelativeTransform>\r\n                                        <GradientStop Color=\"#00000000\" Offset=\"0.55\" />\r\n                                        <GradientStop Color=\"#33000000\" Offset=\"1\" />\r\n                                    </RadialGradientBrush>\r\n                                </Border.Background>\r\n                            </Border>\r\n                            <Border Margin=\"1,1,1,10\" CornerRadius=\"4,4,40,10\" x:Name=\"Highlight\" Opacity=\"0.8\" RenderTransformOrigin=\"0.5,1\">\r\n                                <Border.Background>\r\n                                    <RadialGradientBrush>\r\n                                        <RadialGradientBrush.RelativeTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform CenterX=\"0.5\" CenterY=\"0.5\" ScaleX=\"1.25\" ScaleY=\"2\" />\r\n                                                <TranslateTransform Y=\"-0.6\" />\r\n                                            </TransformGroup>\r\n                                        </RadialGradientBrush.RelativeTransform>\r\n                                        <GradientStop Color=\"#BFFFFFFF\" Offset=\"0\" />\r\n                                        <GradientStop Color=\"#4CFFFFFF\" Offset=\"1\" />\r\n                                    </RadialGradientBrush>\r\n                                </Border.Background>\r\n                            </Border>\r\n                        </Grid>\r\n                        <Button x:Name=\"Header\" Background=\"{TemplateBinding Background}\" Foreground=\"{TemplateBinding Foreground}\" IsTabStop=\"False\" Cursor=\"{TemplateBinding Cursor}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Grid.Column=\"1\" ClickMode=\"Hover\" Content=\"{TemplateBinding Header}\" ContentTemplate=\"{TemplateBinding HeaderTemplate}\">\r\n                            <Button.Template>\r\n                                <ControlTemplate TargetType=\"Button\">\r\n                                    <Grid x:Name=\"Button_Normal\" Background=\"Transparent\">\r\n                                        <ContentPresenter x:Name=\"contentPresenter\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Margin=\"15,4\" RenderTransformOrigin=\"0.5,0.5\" Grid.RowSpan=\"2\" />\r\n                                    </Grid>\r\n                                    <ControlTemplate.Triggers>\r\n                                    </ControlTemplate.Triggers>\r\n                                </ControlTemplate>\r\n                            </Button.Template>\r\n                        </Button>\r\n                        <ItemsPresenter x:Name=\"ItemsHost\" Visibility=\"Visible\" Grid.Column=\"1\" Grid.ColumnSpan=\"2\" Grid.Row=\"1\" />\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsExpanded\" Value=\"false\">\r\n                            <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ItemsHost\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"HasItems\" Value=\"false\">\r\n                            <Setter Property=\"Visibility\" Value=\"Hidden\" TargetName=\"Expander\" />\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource MouseOver}\" x:Name=\"MouseOver_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource MouseOut}\" x:Name=\"MouseOut_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                            <Setter Property=\"Opacity\" TargetName=\"MouseOverGrid\" Value=\"0\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsSelected\" Value=\"true\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource Selected}\" x:Name=\"Selected_BeginStoryboard\"/>\r\n                            </Trigger.EnterActions>\r\n                            <Trigger.ExitActions>\r\n                                <BeginStoryboard Storyboard=\"{StaticResource Unselected}\" x:Name=\"Unselected_BeginStoryboard\"/>\r\n                            </Trigger.ExitActions>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Opacity\" TargetName=\"grid\" Value=\"0.65\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/UXMusingsBubblyBlue/Theme.xaml",
    "content": "﻿<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n                    xmlns:basic=\"clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit\"\r\n                    xmlns:primitives=\"clr-namespace:Microsoft.Windows.Controls.Primitives;assembly=WPFToolkit\"\r\n                    xmlns:vsm=\"clr-namespace:System.Windows;assembly=WPFToolkit\">\r\n\r\n    <!-- Resources -->\r\n    <SolidColorBrush x:Key=\"BaseColorBrush\" Color=\"#FF4CB6F2\"/>\r\n    <SolidColorBrush x:Key=\"HoverBrush\" Color=\"#FFFBF445\"/>\r\n    <SolidColorBrush x:Key=\"HyperlinkBrush\" Color=\"#FF549DE6\"/>\r\n    \r\n    <SolidColorBrush x:Key=\"WindowBackgroundBrush\" Color=\"#FFFFFFFF\" />\r\n\r\n    <!--Button Style-->\r\n    <Style TargetType=\"Button\">\r\n        <Setter Property=\"Foreground\" Value=\"#FF1E2B33\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"10.5\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Button\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"Pressed\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FVElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FVElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"FVElement\" Storyboard.TargetProperty=\"(Shape.Fill).(SolidColorBrush.Color)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#FF4486B6\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <!-- Start:UI -->\r\n                        <Rectangle x:Name=\"FVElement\" Stretch=\"Fill\" StrokeLineJoin=\"Round\" StrokeThickness=\"0.5\" RadiusX=\"11\" RadiusY=\"11\" Opacity=\"0\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" Fill=\"#004486B6\">\r\n                            <Rectangle.Stroke>\r\n                                <LinearGradientBrush EndPoint=\"0.5,-5\" StartPoint=\"0.5,1\">\r\n                                    <GradientStop Color=\"#FF6B7987\" Offset=\"0\"/>\r\n                                    <GradientStop Color=\"#FFC1C7CE\" Offset=\"1\"/>\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.Stroke>\r\n                        </Rectangle>\r\n                        <Rectangle x:Name=\"Background\" StrokeLineJoin=\"Round\" StrokeThickness=\"0.5\" RadiusX=\"9.5\" RadiusY=\"9.5\" Opacity=\"1\" Margin=\"2\">\r\n                            <Rectangle.Stroke>\r\n                                <LinearGradientBrush EndPoint=\"0.5,-1.85\" StartPoint=\"0.5,1.5\">\r\n                                    <GradientStop Color=\"#FF4E5F70\" Offset=\"0\"/>\r\n                                    <GradientStop Color=\"#FFF6F7FA\" Offset=\"1\"/>\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.Stroke>\r\n                            <Rectangle.Fill>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\"/>\r\n                                    <GradientStop Color=\"#FF4CB6F2\" Offset=\"0\"/>\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                        <Path x:Name=\"WhiteBand\" Height=\"4.25\" Stretch=\"Fill\" StrokeLineJoin=\"Round\" Data=\"M4.2160064,2.75 C4.2160064,1.6454305 5.1114369,1.7153466 6.2160064,1.7153466 L22.679308,1.7153466 C23.783877,1.7153466 24.679308,1.6454305 24.679308,2.75 24.679308,2.75 4.2160064,2.75 4.2160064,2.75 z\" Margin=\"7,4,7,0\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Top\">\r\n                            <Path.Fill>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.5\"/>\r\n                                    <GradientStop Color=\"#FF50B8F2\" Offset=\"1\"/>\r\n                                </LinearGradientBrush>\r\n                            </Path.Fill>\r\n                        </Path>\r\n                        <ContentPresenter\r\n                              Content=\"{TemplateBinding Content}\"\r\n                              ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                              Cursor=\"Hand\"\r\n                            \r\n                              HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" \r\n                              Margin=\"{TemplateBinding Padding}\"\r\n                              VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" />\r\n<!--                        \r\n                              TextAlignment=\"Center\"\r\n                              VerticalContentAlignment=\"Center\"\r\n                              HorizontalContentAlignment=\"Center\"\r\n-->                        \r\n                        <Rectangle x:Name=\"FocusVisualElement\" Stretch=\"Fill\" StrokeThickness=\".75\" Stroke=\"#7F999999\" StrokeDashCap=\"Square\"  StrokeDashArray=\"1 2\" Margin=\"-1\" Visibility=\"Collapsed\" RadiusX=\"11\" RadiusY=\"11\" />\r\n                        <Rectangle x:Name=\"DisabledOverlay\" StrokeLineJoin=\"Round\" StrokeThickness=\"0.5\" RadiusX=\"9.5\" RadiusY=\"9.5\" Opacity=\"0\" Margin=\"2\" Fill=\"#B2FFFFFF\" Stroke=\"#B2FFFFFF\"/>\r\n                        <!-- End:UI -->\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--Toggle Button Style-->\r\n    <Style TargetType=\"ToggleButton\">\r\n        <Setter Property=\"Foreground\" Value=\"#FF1E2B33\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"10.5\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ToggleButton\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"Pressed\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FVElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FVElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"FVElement\" Storyboard.TargetProperty=\"(Shape.Fill).(SolidColorBrush.Color)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#FF4486B6\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"WhiteBand\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\">\r\n                                    <Storyboard/>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Indeterminate\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"WhiteBand\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\">\r\n                                    <Storyboard/>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <!-- Start:UI -->\r\n                        <Rectangle x:Name=\"FVElement\" Stretch=\"Fill\" StrokeLineJoin=\"Round\" StrokeThickness=\"0.5\" RadiusX=\"11\" RadiusY=\"11\" Opacity=\"0\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" Fill=\"#004486B6\">\r\n                            <Rectangle.Stroke>\r\n                                <LinearGradientBrush EndPoint=\"0.5,-5\" StartPoint=\"0.5,1\">\r\n                                    <GradientStop Color=\"#FF6B7987\" Offset=\"0\"/>\r\n                                    <GradientStop Color=\"#FFC1C7CE\" Offset=\"1\"/>\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.Stroke>\r\n                        </Rectangle>\r\n                        <Rectangle x:Name=\"Background\" StrokeLineJoin=\"Round\" StrokeThickness=\"0.5\" RadiusX=\"9.5\" RadiusY=\"9.5\" Opacity=\"1\" Margin=\"2\">\r\n                            <Rectangle.Stroke>\r\n                                <LinearGradientBrush EndPoint=\"0.5,-1.85\" StartPoint=\"0.5,1.5\">\r\n                                    <GradientStop Color=\"#FF4E5F70\" Offset=\"0\"/>\r\n                                    <GradientStop Color=\"#FFF6F7FA\" Offset=\"1\"/>\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.Stroke>\r\n                            <Rectangle.Fill>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\"/>\r\n                                    <GradientStop Color=\"#FF4CB6F2\" Offset=\"0\"/>\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                        <Path x:Name=\"WhiteBand\" Height=\"4.25\" Stretch=\"Fill\" StrokeLineJoin=\"Round\" Data=\"M4.2160064,2.75 C4.2160064,1.6454305 5.1114369,1.7153466 6.2160064,1.7153466 L22.679308,1.7153466 C23.783877,1.7153466 24.679308,1.6454305 24.679308,2.75 24.679308,2.75 4.2160064,2.75 4.2160064,2.75 z\" Margin=\"7,4,7,0\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Top\">\r\n                            <Path.Fill>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.5\"/>\r\n                                    <GradientStop Color=\"#FF50B8F2\" Offset=\"1\"/>\r\n                                </LinearGradientBrush>\r\n                            </Path.Fill>\r\n                        </Path>\r\n                        <ContentPresenter\r\n                              Content=\"{TemplateBinding Content}\"\r\n                              ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                              Cursor=\"Hand\"\r\n                            \r\n                              HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" \r\n                              Margin=\"{TemplateBinding Padding}\"\r\n                              VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" />\r\n                        <!--\r\n                              TextAlignment=\"Center\"\r\n                              VerticalContentAlignment=\"Center\"\r\n                              HorizontalContentAlignment=\"Center\"\r\n                        -->\r\n                        <Rectangle x:Name=\"FocusVisualElement\" Stretch=\"Fill\" StrokeThickness=\".75\" Stroke=\"#7F999999\" StrokeDashCap=\"Square\"  StrokeDashArray=\"1 2\" Margin=\"-1\" Visibility=\"Collapsed\" RadiusX=\"11\" RadiusY=\"11\" />\r\n                        <Rectangle x:Name=\"DisabledOverlay\" StrokeLineJoin=\"Round\" StrokeThickness=\"0.5\" RadiusX=\"9.5\" RadiusY=\"9.5\" Opacity=\"0\" Margin=\"2\" Fill=\"#B2FFFFFF\" Stroke=\"#B2FFFFFF\"/>\r\n                        <!-- End:UI -->\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--Checkbox Style-->\r\n    <Style TargetType=\"CheckBox\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"CheckBox\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"Pressed\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"Down\" Storyboard.TargetProperty=\"(Shape.Fill).(SolidColorBrush.Color)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#004486B6\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Down\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Down\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledVisual\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Check\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\"/>\r\n                                <VisualState x:Name=\"Indeterminate\">\r\n                                    <Storyboard>\r\n                                        <PointAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundIndeterminate\" Storyboard.TargetProperty=\"(Shape.Fill).(LinearGradientBrush.StartPoint)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplinePointKeyFrame KeyTime=\"00:00:00\" Value=\"0.5,1\"/>\r\n                                        </PointAnimationUsingKeyFrames>\r\n                                        <PointAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundIndeterminate\" Storyboard.TargetProperty=\"(Shape.Fill).(LinearGradientBrush.EndPoint)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplinePointKeyFrame KeyTime=\"00:00:00\" Value=\"0.5,0\"/>\r\n                                        </PointAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"BackgroundIndeterminate\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#FF6AC2F3\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BackgroundIndeterminate\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"WhiteBubble\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ContentFocused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"*\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Rectangle x:Name=\"Down\" Grid.Column=\"0\" Width=\"17\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Height=\"16.5\" StrokeThickness=\"0.5\" RadiusX=\"3\" RadiusY=\"3\" Opacity=\"0\" Fill=\"#FF4486B6\" Margin=\"0,0,0,0\">\r\n                            <Rectangle.Stroke>\r\n                                <LinearGradientBrush EndPoint=\"0.507,-1.856\" StartPoint=\"0.507,1.515\">\r\n                                    <GradientStop Color=\"#FF4E5F70\" Offset=\"0\"/>\r\n                                    <GradientStop Color=\"#FFF6F7FA\" Offset=\"1\"/>\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.Stroke>\r\n                        </Rectangle>\r\n                        <Rectangle x:Name=\"Background\" Grid.Column=\"0\" Width=\"14\" Height=\"13.5\" StrokeLineJoin=\"Round\" StrokeThickness=\"0.5\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"1\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\">\r\n                            <Rectangle.Stroke>\r\n                                <LinearGradientBrush EndPoint=\"0.5,-1.85\" StartPoint=\"0.5,1.5\">\r\n                                    <GradientStop Color=\"#FF4E5F70\" Offset=\"0\"/>\r\n                                    <GradientStop Color=\"#FFF6F7FA\" Offset=\"1\"/>\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.Stroke>\r\n                            <Rectangle.Fill>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"#FFF4F4FA\" Offset=\"0.3\"/>\r\n                                    <GradientStop Color=\"#FFCDCDCD\" Offset=\"1\"/>\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                        <Rectangle x:Name=\"BackgroundIndeterminate\" Grid.Column=\"0\" Width=\"14\" Height=\"13.5\" StrokeLineJoin=\"Round\" StrokeThickness=\"0.5\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\">\r\n                            <Rectangle.Stroke>\r\n                                <LinearGradientBrush EndPoint=\"0.5,-1.85\" StartPoint=\"0.5,1.5\">\r\n                                    <GradientStop Color=\"#FF4E5F70\" Offset=\"0\"/>\r\n                                    <GradientStop Color=\"#FFF6F7FA\" Offset=\"1\"/>\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.Stroke>\r\n                            <Rectangle.Fill>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"#FFF4F4FA\" Offset=\"0.3\"/>\r\n                                    <GradientStop Color=\"#FFCDCDCD\" Offset=\"1\"/>\r\n                                </LinearGradientBrush>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                        <Path x:Name=\"WhiteBubble\" Grid.Column=\"0\" Width=\"10\" Height=\"2\" Stretch=\"Fill\" Data=\"M4.2160064,2.8920099 C4.2160064,1.7874404 5.1114369,1.7153466 6.2160064,1.7153466 L22.679308,1.7153466 C23.783877,1.7153466 24.679308,1.7874404 24.679308,2.8920099 24.679308,2.8920099 4.2160064,2.8920099 4.2160064,2.8920099 z\" Margin=\"0,5,0,0\" VerticalAlignment=\"Top\" HorizontalAlignment=\"Center\">\r\n                            <Path.Fill>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.5\"/>\r\n                                    <GradientStop Color=\"#FFCDCDCD\" Offset=\"1\"/>\r\n                                </LinearGradientBrush>\r\n                            </Path.Fill>\r\n                        </Path>\r\n                        <Path x:Name=\"Check\" StrokeThickness=\"0.5\" Grid.Column=\"0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Data=\"F1 M3.719238,8.53418 L1.5016037,8.53418 4.4125023,4.498047 1.525391,0.5 3.757324,0.5 5.63623,2.7412344 7.594238,0.5 9.825684,0.5 6.9390607,4.498047 9.491699,8.53418 7.286621,8.549805 5.67627,6.3583746 z\" Stretch=\"Fill\" Height=\"7.825\" Width=\"8.345\" Fill=\"#FF6D7A88\" Stroke=\"#FF63BFF4\" Opacity=\"0\"/>\r\n                        <ContentPresenter\r\n\t\t                          Grid.Column=\"1\"\r\n\t\t                          x:Name=\"Content\"\r\n\t\t                          Content=\"{TemplateBinding Content}\"\r\n\t\t                          ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                                  Margin=\"4\" />\r\n<!--                        \r\n\t\t                          Background=\"Transparent\"\r\n\t\t                          FontFamily=\"Trebuchet MS\"\r\n\t\t                          FontSize=\"10.5\"\r\n\t\t                          FontWeight=\"Normal\"\r\n\t\t                          Foreground=\"#FF1E2B33\"\r\n                                  TextAlignment=\"Left\"\r\n\t\t                          HorizontalContentAlignment=\"Left\"\r\n\t\t                          VerticalContentAlignment=\"Center\"\r\n-->\t\t                          \r\n                        <Rectangle x:Name=\"FocusVisual\" Grid.Column=\"1\" Stroke=\"#7F999999\" StrokeThickness=\".75\" StrokeDashCap=\"Square\" StrokeDashArray=\"1 2\" Margin=\"1\" Visibility=\"Collapsed\" RadiusX=\"1\" RadiusY=\"1\" IsHitTestVisible=\"false\"/>\r\n                        <Rectangle x:Name=\"DisabledVisual\" Width=\"14\" Height=\"13.5\" StrokeThickness=\"0.5\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\" Stroke=\"#B2FFFFFF\" Margin=\"1.5,1.5,1.5,1.5\" Fill=\"#B2FFFFFF\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--Radio Style-->\r\n    <Style TargetType=\"RadioButton\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"RadioButton\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"Pressed\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"Down\" Storyboard.TargetProperty=\"(Shape.Fill).(SolidColorBrush.Color)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#004486B6\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Down\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Down\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledVisual\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Check\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\"/>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ContentFocused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"*\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Ellipse x:Name=\"Down\" Grid.Column=\"0\" Width=\"17\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Height=\"16.5\" StrokeThickness=\"0.5\" Opacity=\"0\" Fill=\"#FF4486B6\" Margin=\"0,0,0,0\">\r\n                            <Ellipse.Stroke>\r\n                                <LinearGradientBrush EndPoint=\"0.507,-1.856\" StartPoint=\"0.507,1.515\">\r\n                                    <GradientStop Color=\"#FF4E5F70\" Offset=\"0\"/>\r\n                                    <GradientStop Color=\"#FFF6F7FA\" Offset=\"1\"/>\r\n                                </LinearGradientBrush>\r\n                            </Ellipse.Stroke>\r\n                        </Ellipse>\r\n                        <Ellipse x:Name=\"Background\" Grid.Column=\"0\" Width=\"14\" Height=\"13.5\" StrokeLineJoin=\"Round\" StrokeThickness=\"0.5\" Opacity=\"1\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\">\r\n                            <Ellipse.Stroke>\r\n                                <LinearGradientBrush EndPoint=\"0.5,-1.85\" StartPoint=\"0.5,1.5\">\r\n                                    <GradientStop Color=\"#FF4E5F70\" Offset=\"0\"/>\r\n                                    <GradientStop Color=\"#FFF6F7FA\" Offset=\"1\"/>\r\n                                </LinearGradientBrush>\r\n                            </Ellipse.Stroke>\r\n                            <Ellipse.Fill>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"#FFF4F4FA\" Offset=\"0.3\"/>\r\n                                    <GradientStop Color=\"#FFCDCDCD\" Offset=\"1\"/>\r\n                                </LinearGradientBrush>\r\n                            </Ellipse.Fill>\r\n                        </Ellipse>\r\n                        <Ellipse x:Name=\"BackgroundIndeterminate\" Grid.Column=\"0\" Width=\"14\" Height=\"13.5\" StrokeLineJoin=\"Round\" StrokeThickness=\"0.5\" Opacity=\"0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\">\r\n                            <Ellipse.Stroke>\r\n                                <LinearGradientBrush EndPoint=\"0.5,-1.85\" StartPoint=\"0.5,1.5\">\r\n                                    <GradientStop Color=\"#FF4E5F70\" Offset=\"0\"/>\r\n                                    <GradientStop Color=\"#FFF6F7FA\" Offset=\"1\"/>\r\n                                </LinearGradientBrush>\r\n                            </Ellipse.Stroke>\r\n                            <Ellipse.Fill>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"#FFF4F4FA\" Offset=\"0.3\"/>\r\n                                    <GradientStop Color=\"#FFCDCDCD\" Offset=\"1\"/>\r\n                                </LinearGradientBrush>\r\n                            </Ellipse.Fill>\r\n                        </Ellipse>\r\n                        <Path x:Name=\"WhiteBubble\" Grid.Column=\"0\" Width=\"6\" Height=\"2\" Stretch=\"Fill\" Data=\"M4.2160064,2.8920099 C4.2160064,1.7874404 5.1114369,1.7153466 6.2160064,1.7153466 L22.679308,1.7153466 C23.783877,1.7153466 24.679308,1.7874404 24.679308,2.8920099 24.679308,2.8920099 4.2160064,2.8920099 4.2160064,2.8920099 z\" Margin=\"0,5,0,0\" VerticalAlignment=\"Top\" HorizontalAlignment=\"Center\">\r\n                            <Path.Fill>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.5\"/>\r\n                                    <GradientStop Color=\"#FFCDCDCD\" Offset=\"1\"/>\r\n                                </LinearGradientBrush>\r\n                            </Path.Fill>\r\n                        </Path>\r\n                        <Ellipse x:Name=\"Check\" Fill=\"#FF6D7A88\" Stroke=\"#FF63BFF4\" Grid.Column=\"0\" Width=\"6\" Height=\"6\" StrokeLineJoin=\"Round\" StrokeThickness=\"0.5\" Opacity=\"0\"/>\r\n                        <ContentPresenter\r\n\t\t                          Grid.Column=\"1\"\r\n\t\t                          x:Name=\"Content\"\r\n\t\t                          Content=\"{TemplateBinding Content}\"\r\n\t\t                          ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                                  Margin=\"4\" />\r\n<!--                        \r\n\t\t                          Background=\"Transparent\"\r\n\t\t                          FontFamily=\"Trebuchet MS\"\r\n\t\t                          FontSize=\"10.5\"\r\n\t\t                          FontWeight=\"Normal\"\r\n\t\t                          Foreground=\"#FF1E2B33\"\r\n                                  TextAlignment=\"Left\"\r\n\t\t                          HorizontalContentAlignment=\"Left\"\r\n\t\t                          VerticalContentAlignment=\"Center\"\r\n-->\t\t                          \r\n                        <Rectangle x:Name=\"FocusVisual\" Grid.Column=\"1\" Stroke=\"#7F999999\" StrokeThickness=\".75\" StrokeDashCap=\"Square\" StrokeDashArray=\"1 2\" Margin=\"1\" Visibility=\"Collapsed\" RadiusX=\"1\" RadiusY=\"1\" IsHitTestVisible=\"false\"/>\r\n                        <Ellipse x:Name=\"DisabledVisual\" Width=\"14\" Height=\"13.5\" StrokeThickness=\"0.5\" Opacity=\"0\" Stroke=\"#B2FFFFFF\" Margin=\"1.5,1.5,1.5,1.5\" Fill=\"#B2FFFFFF\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--Thumb Style-->\r\n    <Style TargetType=\"Thumb\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Thumb\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"Pressed\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"Down\" Storyboard.TargetProperty=\"(Shape.Fill).(SolidColorBrush.Color)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#004486B6\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Down\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Down\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Disabled\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Ellipse x:Name=\"Down\" Grid.Column=\"0\" Width=\"17\" Height=\"17\" StrokeThickness=\"0.5\" Opacity=\"0\" Fill=\"#FF4486B6\" Margin=\"0,0,0,0\">\r\n                            <Ellipse.Stroke>\r\n                                <LinearGradientBrush EndPoint=\"0.507,-1.856\" StartPoint=\"0.507,1.515\">\r\n                                    <GradientStop Color=\"#FF4E5F70\" Offset=\"0\"/>\r\n                                    <GradientStop Color=\"#FFF6F7FA\" Offset=\"1\"/>\r\n                                </LinearGradientBrush>\r\n                            </Ellipse.Stroke>\r\n                        </Ellipse>\r\n                        <Ellipse x:Name=\"Background\" Grid.Column=\"0\" Width=\"14\" Height=\"14\" StrokeLineJoin=\"Round\" StrokeThickness=\"0.5\" Opacity=\"1\" Stroke=\"#FF2E4040\">\r\n                            <Ellipse.Fill>\r\n                                <LinearGradientBrush EndPoint=\"0.5,0\" StartPoint=\"0.5,1\">\r\n                                    <GradientStop Color=\"#FFF4F4FA\" Offset=\"0.3\"/>\r\n                                    <GradientStop Color=\"#FF6AC2F3\" Offset=\"1\"/>\r\n                                </LinearGradientBrush>\r\n                            </Ellipse.Fill>\r\n                        </Ellipse>\r\n                        <Path x:Name=\"WhiteBubble\" Grid.Column=\"0\" Width=\"6\" Height=\"2\" Stretch=\"Fill\" StrokeLineJoin=\"Round\" StrokeThickness=\"1.8\" Data=\"M4.2160064,2.8920099 C4.2160064,1.7874404 5.1114369,1.7153466 6.2160064,1.7153466 L22.679308,1.7153466 C23.783877,1.7153466 24.679308,1.7874404 24.679308,2.8920099 24.679308,2.8920099 4.2160064,2.8920099 4.2160064,2.8920099 z\" Margin=\"0,0,0,7.5\" VerticalAlignment=\"Stretch\" Opacity=\"1\">\r\n                            <Path.Stroke>\r\n                                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                    <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.5\"/>\r\n                                    <GradientStop Color=\"#FFCDCDCD\" Offset=\"1\"/>\r\n                                </LinearGradientBrush>\r\n                            </Path.Stroke>\r\n                        </Path>\r\n                        <Ellipse x:Name=\"DisabledOverlay\" Width=\"14\" Height=\"13.5\" StrokeLineJoin=\"Round\" StrokeThickness=\"0.5\" Opacity=\"0\" Stroke=\"#B2FFFFFF\" Margin=\"1.5,233.25,1.5,233.25\" Fill=\"#B2FFFFFF\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--Slider Style-->\r\n    <Style TargetType=\"Slider\">\r\n        \r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Slider\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <Grid.Resources>\r\n                            <ControlTemplate x:Key=\"RepeatButtonTemplate\">\r\n                                <Grid x:Name=\"Root\" Opacity=\"0\" Background=\"Transparent\"/>\r\n                            </ControlTemplate>\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\" />\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Root\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Unfocused\">\r\n                                    <Storyboard/>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid x:Name=\"HorizontalTemplate\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"*\" />\r\n                            </Grid.ColumnDefinitions>\r\n                            <Rectangle StrokeThickness=\".5\" Fill=\"#FFFFFFFF\" Grid.Column=\"0\" Grid.ColumnSpan=\"3\" Height=\"4\" RadiusX=\"2\" RadiusY=\"2\" >\r\n                                <Rectangle.Stroke>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,-5\" StartPoint=\"0.5,1\">\r\n                                        <GradientStop Color=\"#FF4E5F70\" Offset=\"0\"/>\r\n                                        <GradientStop Color=\"#FFF6F7FA\" Offset=\"1\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Stroke>\r\n                            </Rectangle>\r\n\r\n                            <Track x:Name=\"PART_Track\" Grid.Column=\"0\" Grid.ColumnSpan=\"3\">\r\n                                <Track.Thumb>\r\n                                    <Thumb Width=\"18\" Height=\"18\" />\r\n                                </Track.Thumb>\r\n                                <Track.IncreaseRepeatButton>\r\n                                    <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Command=\"Slider.IncreaseLarge\" />\r\n                                </Track.IncreaseRepeatButton>\r\n                                <Track.DecreaseRepeatButton>\r\n                                    <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Command=\"Slider.DecreaseLarge\" />\r\n                                </Track.DecreaseRepeatButton>\r\n                            </Track>\r\n\r\n                        </Grid>\r\n                        <Grid x:Name=\"VerticalTemplate\" Visibility=\"Collapsed\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <Rectangle StrokeThickness=\".5\" Fill=\"#FFFFFFFF\" Grid.Column=\"0\" Grid.ColumnSpan=\"3\" Width=\"4\" RadiusX=\"2\" RadiusY=\"2\">\r\n                                <Rectangle.Stroke>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,-5\" StartPoint=\"0.5,1\">\r\n                                        <GradientStop Color=\"#FF4E5F70\" Offset=\"0\"/>\r\n                                        <GradientStop Color=\"#FFF6F7FA\" Offset=\"1\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Stroke>\r\n                            </Rectangle>\r\n                            <RepeatButton x:Name=\"VerticalTrackLargeChangeDecreaseRepeatButton\" IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Grid.Row=\"2\"/>\r\n                            <Thumb x:Name=\"VerticalThumb\" Width=\"18\" Height=\"18\" Grid.Row=\"1\" />\r\n                            <RepeatButton x:Name=\"VerticalTrackLargeChangeIncreaseRepeatButton\" IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Grid.Row=\"0\"/>\r\n                        </Grid>\r\n                        <Rectangle x:Name=\"FocusVisual\" Stroke=\"#99313131\" StrokeDashArray=\"1 3\" StrokeThickness=\".65\" Opacity=\"1\" StrokeDashCap=\"Square\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--Textbox Style-->\r\n    <Style TargetType=\"TextBox\">\r\n        <Setter Property=\"FontSize\" Value=\"10.5\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\"/>\r\n        <Setter Property=\"Foreground\" Value=\"#FF1E2B33\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TextBox\">\r\n                    <Grid x:Name=\"RootElement\">\r\n                        <Grid.Resources>\r\n                            <Storyboard x:Key=\"Normal State\">\r\n                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"Focused State\">\r\n                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                        </Grid.Resources>\r\n                        <Border x:Name=\"Background\" BorderThickness=\"0.5\" CornerRadius=\"9\" Opacity=\"1\" Background=\"#FFFFFFFF\">\r\n                            <Border.BorderBrush>\r\n                                <LinearGradientBrush EndPoint=\"0.5,-5\" StartPoint=\"0.5,1\">\r\n                                    <GradientStop Color=\"#FF4E5F70\" Offset=\"0\"/>\r\n                                    <GradientStop Color=\"#FFF6F7FA\" Offset=\"1\"/>\r\n                                </LinearGradientBrush>\r\n                            </Border.BorderBrush>\r\n                            <Grid>\r\n                                <Border x:Name=\"ContentElement\" CornerRadius=\"9\" Margin=\"5,4,5,4\">\r\n                                    <ScrollViewer BorderThickness=\"0\" IsTabStop=\"False\" Padding=\"{TemplateBinding Padding}\" x:Name=\"PART_ContentHost\" />\r\n                                </Border>\r\n                                <Rectangle x:Name=\"FocusVisual\" RadiusX=\"11\" RadiusY=\"11\" Margin=\"-3\" Stroke=\"#99313131\" StrokeDashArray=\"1 3\" StrokeThickness=\".65\" Opacity=\"0\" StrokeDashCap=\"Square\" IsHitTestVisible=\"false\" />\r\n                            </Grid>\r\n                        </Border>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--Scrollbar Style-->\r\n    <Style TargetType=\"ScrollBar\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ScrollBar\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <Grid.Resources>\r\n                            <ControlTemplate x:Key=\"RepeatButtonTemplate\" TargetType=\"RepeatButton\">\r\n                                <Grid x:Name=\"Root\" Background=\"Transparent\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n\r\n                            <!--I'm not using the repeat buttons and that's why these templates are empty-->\r\n                            <ControlTemplate x:Key=\"HorizontalIncrementTemplate\" TargetType=\"RepeatButton\" />\r\n                            <ControlTemplate x:Key=\"HorizontalDecrementTemplate\" TargetType=\"RepeatButton\" />\r\n                            <ControlTemplate x:Key=\"VerticalIncrementTemplate\" TargetType=\"RepeatButton\" />\r\n                            <ControlTemplate x:Key=\"VerticalDecrementTemplate\" TargetType=\"RepeatButton\" />\r\n\r\n                            <!--Thumb templates-->\r\n                            <ControlTemplate x:Key=\"VerticalThumbTemplate\" TargetType=\"Thumb\">\r\n                                <Grid>\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"MouseOver\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(Shape.Fill).(SolidColorBrush.Color)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#FF4486B6\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Rectangle x:Name=\"FocusVisualElement\" Stretch=\"Fill\" StrokeLineJoin=\"Round\" StrokeThickness=\"0.5\" RadiusX=\"6\" RadiusY=\"6\" Opacity=\"0\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" Fill=\"#004486B6\">\r\n                                        <Rectangle.Stroke>\r\n                                            <LinearGradientBrush EndPoint=\"0.5,-5\" StartPoint=\"0.5,1\">\r\n                                                <GradientStop Color=\"#FF6B7987\" Offset=\"0\"/>\r\n                                                <GradientStop Color=\"#FFC1C7CE\" Offset=\"1\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Rectangle.Stroke>\r\n                                    </Rectangle>\r\n                                    <Rectangle x:Name=\"Background\" StrokeLineJoin=\"Round\" StrokeThickness=\"0.5\" RadiusX=\"6\" RadiusY=\"6\" Opacity=\"1\" Margin=\"1.5\">\r\n                                        <Rectangle.Stroke>\r\n                                            <LinearGradientBrush EndPoint=\"0.5,-1.85\" StartPoint=\"0.5,1.5\">\r\n                                                <GradientStop Color=\"#FF4E5F70\" Offset=\"0\"/>\r\n                                                <GradientStop Color=\"#FFF6F7FA\" Offset=\"1\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Rectangle.Stroke>\r\n                                        <Rectangle.Fill>\r\n                                            <LinearGradientBrush EndPoint=\"0.875,0.5\" StartPoint=\"0.125,0.5\">\r\n                                                <GradientStop Color=\"#FFF2F3F4\" Offset=\"1\"/>\r\n                                                <GradientStop Color=\"#FF4CB6F2\" Offset=\"0\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Rectangle.Fill>\r\n                                    </Rectangle>\r\n                                    <Path x:Name=\"WhiteBand\" Width=\"2\" Stretch=\"Fill\" StrokeLineJoin=\"Round\" Data=\"M4.2160064,2.75 C4.2160064,1.6454305 5.1114369,1.7153466 6.2160064,1.7153466 L22.679308,1.7153466 C23.783877,1.7153466 24.679308,1.6454305 24.679308,2.75 24.679308,2.75 4.2160064,2.75 4.2160064,2.75 z\" Margin=\"4,6,0,6\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Center\">\r\n                                        <Path.Fill>\r\n                                            <LinearGradientBrush EndPoint=\"1.5,0.5\" StartPoint=\"0,0.5\">\r\n                                                <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.5\"/>\r\n                                                <GradientStop Color=\"#FF50B8F2\" Offset=\"1\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Path.Fill>\r\n                                    </Path>\r\n                                    <Rectangle x:Name=\"DisabledOverlay\" StrokeLineJoin=\"Round\" StrokeThickness=\"0.5\" RadiusX=\"9.5\" RadiusY=\"9.5\" Opacity=\"0\" Margin=\"2\" Fill=\"#B2FFFFFF\" Stroke=\"#B2FFFFFF\"/>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"HorizontalThumbTemplate\" TargetType=\"Thumb\">\r\n                                <Grid>\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"MouseOver\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(Shape.Fill).(SolidColorBrush.Color)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#FF4486B6\"/>\r\n                                                    </ColorAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Rectangle x:Name=\"FocusVisualElement\" Stretch=\"Fill\" StrokeLineJoin=\"Round\" StrokeThickness=\"0.5\" RadiusX=\"6\" RadiusY=\"6\" Opacity=\"0\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" Fill=\"#004486B6\">\r\n                                        <Rectangle.Stroke>\r\n                                            <LinearGradientBrush EndPoint=\"0.5,-5\" StartPoint=\"0.5,1\">\r\n                                                <GradientStop Color=\"#FF6B7987\" Offset=\"0\"/>\r\n                                                <GradientStop Color=\"#FFC1C7CE\" Offset=\"1\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Rectangle.Stroke>\r\n                                    </Rectangle>\r\n                                    <Rectangle x:Name=\"Background\" StrokeLineJoin=\"Round\" StrokeThickness=\"0.5\" RadiusX=\"6\" RadiusY=\"6\" Opacity=\"1\" Margin=\"1.5\">\r\n                                        <Rectangle.Stroke>\r\n                                            <LinearGradientBrush EndPoint=\"0.5,-1.85\" StartPoint=\"0.5,1.5\">\r\n                                                <GradientStop Color=\"#FF4E5F70\" Offset=\"0\"/>\r\n                                                <GradientStop Color=\"#FFF6F7FA\" Offset=\"1\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Rectangle.Stroke>\r\n                                        <Rectangle.Fill>\r\n                                            <LinearGradientBrush EndPoint=\"0.5,0.875\" StartPoint=\"0.5,0.125\">\r\n                                                <GradientStop Color=\"#FFF2F3F4\" Offset=\"1\"/>\r\n                                                <GradientStop Color=\"#FF4CB6F2\" Offset=\"0\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Rectangle.Fill>\r\n                                    </Rectangle>\r\n                                    <Path x:Name=\"WhiteBand\" Height=\"2\" Stretch=\"Fill\" StrokeLineJoin=\"Round\" Data=\"M4.2160064,2.75 C4.2160064,1.6454305 5.1114369,1.7153466 6.2160064,1.7153466 L22.679308,1.7153466 C23.783877,1.7153466 24.679308,1.6454305 24.679308,2.75 24.679308,2.75 4.2160064,2.75 4.2160064,2.75 z\" Margin=\"6,4,6,0\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Top\">\r\n                                        <Path.Fill>\r\n                                            <LinearGradientBrush EndPoint=\"0.5,1.5\" StartPoint=\"0.5,0\">\r\n                                                <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.5\"/>\r\n                                                <GradientStop Color=\"#FF50B8F2\" Offset=\"1\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Path.Fill>\r\n                                    </Path>\r\n                                    <Rectangle x:Name=\"DisabledOverlay\" StrokeLineJoin=\"Round\" StrokeThickness=\"0.5\" RadiusX=\"6\" RadiusY=\"6\" Opacity=\"0\" Margin=\"2\" Fill=\"#B2FFFFFF\" Stroke=\"#B2FFFFFF\"/>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Root\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid x:Name=\"HorizontalRoot\" Visibility=\"Collapsed\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition/>\r\n                                <RowDefinition/>\r\n                            </Grid.RowDefinitions>\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                            </Grid.ColumnDefinitions>\r\n\r\n                            <!--Start: Track-->\r\n                            <Rectangle Grid.RowSpan=\"2\" Grid.ColumnSpan=\"5\" StrokeThickness=\"0.5\" RadiusX=\"2\" RadiusY=\"2\">\r\n                                <Rectangle.Stroke>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,-1.85\" StartPoint=\"0.5,1.5\">\r\n                                        <GradientStop Color=\"#004E5F70\" Offset=\"0\"/>\r\n                                        <GradientStop Color=\"#00F6F7FA\" Offset=\"1\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Stroke>\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,-2\" StartPoint=\"0.5,2\">\r\n                                        <GradientStop Color=\"#FFC3CACA\" Offset=\"0\"/>\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.3\"/>\r\n                                        <GradientStop Color=\"#FFEFEFEF\" Offset=\"0.415\"/>\r\n                                        <GradientStop Color=\"#FF9DB5C3\" Offset=\"0.8\"/>\r\n                                        <GradientStop Color=\"#FF849FAF\" Offset=\"0.9\"/>\r\n                                        <GradientStop Color=\"#FFF2F3F4\" Offset=\"1\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                            <Rectangle Grid.RowSpan=\"2\" Grid.ColumnSpan=\"5\"  Stretch=\"Fill\" RadiusX=\"2\" RadiusY=\"2\" StrokeThickness=\"1\" StrokeLineJoin=\"Round\" Stroke=\"#FFFFFFFF\"/>\r\n                            <!--End: Track-->\r\n\r\n                            <RepeatButton x:Name=\"HorizontalSmallDecrease\" Width=\"0\" IsTabStop=\"False\" Template=\"{StaticResource HorizontalDecrementTemplate}\" Grid.Column=\"0\" Grid.RowSpan=\"2\" Interval=\"50\"/>\r\n                            <RepeatButton x:Name=\"HorizontalLargeDecrease\" Width=\"0\" IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Grid.Column=\"1\" Grid.RowSpan=\"2\" Interval=\"50\"/>\r\n                            <Thumb MinWidth=\"30\" x:Name=\"HorizontalThumb\" Background=\"{TemplateBinding Background}\" Width=\"30\" Template=\"{StaticResource HorizontalThumbTemplate}\" Grid.Column=\"2\" Grid.RowSpan=\"2\"/>\r\n                            <RepeatButton x:Name=\"HorizontalLargeIncrease\" IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Grid.Column=\"3\" Grid.RowSpan=\"2\" Interval=\"50\"/>\r\n                            <RepeatButton x:Name=\"HorizontalSmallIncrease\" Width=\"0\" IsTabStop=\"False\" Template=\"{StaticResource HorizontalIncrementTemplate}\" Grid.Column=\"4\" Grid.RowSpan=\"2\" Interval=\"50\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"VerticalRoot\" Visibility=\"Visible\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"*\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition/>\r\n                                <ColumnDefinition/>\r\n                            </Grid.ColumnDefinitions>\r\n\r\n                            <!--Start: Track-->\r\n                            <Rectangle Grid.ColumnSpan=\"2\" Grid.RowSpan=\"5\"  StrokeThickness=\"0.5\" RadiusX=\"2\" RadiusY=\"2\">\r\n                                <Rectangle.Stroke>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,-1.85\" StartPoint=\"0.5,1.5\">\r\n                                        <GradientStop Color=\"#004E5F70\" Offset=\"0\"/>\r\n                                        <GradientStop Color=\"#00F6F7FA\" Offset=\"1\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Stroke>\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush EndPoint=\"-2,0.5\" StartPoint=\"2,0.5\">\r\n                                        <GradientStop Color=\"#FFC3CACA\" Offset=\"0\"/>\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.3\"/>\r\n                                        <GradientStop Color=\"#FFEFEFEF\" Offset=\"0.415\"/>\r\n                                        <GradientStop Color=\"#FF9DB5C3\" Offset=\"0.8\"/>\r\n                                        <GradientStop Color=\"#FF849FAF\" Offset=\"0.9\"/>\r\n                                        <GradientStop Color=\"#FFF2F3F4\" Offset=\"1\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                            <Rectangle Grid.ColumnSpan=\"2\" Grid.RowSpan=\"5\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" Stroke=\"#FFFFFFFF\"/>\r\n                            <!--End: Track-->\r\n\r\n                            <RepeatButton Height=\"0\" x:Name=\"VerticalSmallDecrease\" IsTabStop=\"False\" Template=\"{StaticResource VerticalDecrementTemplate}\" Grid.ColumnSpan=\"2\" Grid.Row=\"0\" Interval=\"50\"/>\r\n\r\n                            <Track Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Grid.Row=\"0\" Grid.RowSpan=\"5\" x:Name=\"PART_Track\" Orientation=\"Vertical\" IsDirectionReversed=\"true\">\r\n                                <Track.Thumb>\r\n                                    <Thumb Height=\"30\" MinHeight=\"30\" x:Name=\"VerticalThumb\" Background=\"{TemplateBinding Background}\" />\r\n                                </Track.Thumb>\r\n                                <Track.IncreaseRepeatButton>\r\n                                    <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Command=\"ScrollBar.PageDownCommand\" Interval=\"50\" />\r\n                                </Track.IncreaseRepeatButton>\r\n                                <Track.DecreaseRepeatButton>\r\n                                    <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Command=\"ScrollBar.PageUpCommand\" Interval=\"50\" />\r\n                                </Track.DecreaseRepeatButton>\r\n                            </Track>                          \r\n                            \r\n                            <RepeatButton Height=\"0\" x:Name=\"VerticalSmallIncrease\" IsTabStop=\"False\" Template=\"{StaticResource VerticalIncrementTemplate}\" Grid.ColumnSpan=\"2\" Grid.Row=\"4\" Interval=\"50\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--Scrollviewer Style-->\r\n    <Style TargetType=\"ScrollViewer\">\r\n        <Setter Property=\"Background\" Value=\"#FFFFFFFF\" />\r\n        <Setter Property=\"Foreground\" Value=\"#FF1E2B33\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\" />\r\n        <Setter Property=\"Cursor\" Value=\"Arrow\" />\r\n        <!--<Setter Property=\"TextAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"TextWrapping\" Value=\"Wrap\" />-->\r\n        <Setter Property=\"FontSize\" Value=\"10.5\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\"/>\r\n        <Setter Property=\"Margin\" Value=\"4\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ScrollViewer\">\r\n                    <Border CornerRadius=\"4\" BorderThickness=\".5\">\r\n                        <Border.BorderBrush>\r\n                            <LinearGradientBrush EndPoint=\"0.5,-1.85\" StartPoint=\"0.5,1.5\">\r\n                                <GradientStop Color=\"#FF4E5F70\" Offset=\"0\"/>\r\n                                <GradientStop Color=\"#FFF6F7FA\" Offset=\"1\"/>\r\n                            </LinearGradientBrush>\r\n                        </Border.BorderBrush>\r\n                        <Grid Background=\"{TemplateBinding Background}\" Margin=\"1\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"*\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <Rectangle Grid.Column=\"1\" Grid.Row=\"1\" />\r\n                            <ScrollContentPresenter  \r\n\t\t\t\t\t\t\t\t\tx:Name=\"ScrollContentPresenter\" \r\n\t\t\t\t\t\t\t\t\tGrid.Column=\"0\" \r\n\t\t\t\t\t\t\t\t\tGrid.Row=\"0\" \r\n\t\t\t\t\t\t\t\t\tCursor=\"{TemplateBinding Cursor}\" \r\n\t\t\t\t\t\t\t\t\tContent=\"{TemplateBinding Content}\" \r\n\t\t\t\t\t\t\t\t\tContentTemplate=\"{TemplateBinding ContentTemplate}\" \r\n\t\t\t\t\t\t\t\t\tMargin=\"0\"/>\r\n<!--                            \r\n\t\t\t\t\t\t\t\t\tBackground=\"{TemplateBinding Background}\" \r\n\t\t\t\t\t\t\t\t\tHorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" \r\n\t\t\t\t\t\t\t\t\tVerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\" \r\n\t\t\t\t\t\t\t\t\tTextAlignment=\"{TemplateBinding TextAlignment}\" \r\n\t\t\t\t\t\t\t\t\tTextWrapping=\"{TemplateBinding TextWrapping}\"/>\r\n-->                            \r\n                            <ScrollBar Margin=\"0\" Cursor=\"Arrow\" x:Name=\"PART_VerticalScrollBar\" Width=\"18\" Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Grid.Column=\"1\" Grid.Row=\"0\" Maximum=\"{TemplateBinding ScrollableHeight}\" Minimum=\"0\" Value=\"{TemplateBinding VerticalOffset}\" Orientation=\"Vertical\" ViewportSize=\"{TemplateBinding ViewportHeight}\" />\r\n                            <ScrollBar Margin=\"0\" Cursor=\"Arrow\" Height=\"18\" x:Name=\"PART_HorizontalScrollBar\" Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Grid.Column=\"0\" Grid.Row=\"1\" Maximum=\"{TemplateBinding ScrollableWidth}\" Minimum=\"0\" Value=\"{TemplateBinding HorizontalOffset}\" Orientation=\"Horizontal\" ViewportSize=\"{TemplateBinding ViewportWidth}\" />\r\n                            <Rectangle Grid.Column=\"1\" Grid.Row=\"1\" RadiusX=\"2\" RadiusY=\"2\" Fill=\"#FFEFF0F0\"/>\r\n                        </Grid>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--Listbox Style-->\r\n    <Style TargetType=\"ListBox\">\r\n        <Setter Property=\"Padding\" Value=\"0\"/>\r\n        <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\"/>\r\n        <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\"/>\r\n        <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"True\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ListBox\">\r\n                    <Grid>\r\n                        <Border x:Name=\"BackgroundBorder\" CornerRadius=\"5\" BorderThickness=\"1\" Background=\"#FFFFFFFF\">\r\n                            <Border.BorderBrush>\r\n                                <LinearGradientBrush EndPoint=\"0.5,-1.85\" StartPoint=\"0.5,1.5\">\r\n                                    <GradientStop Color=\"#FF4E5F70\" Offset=\"0\"/>\r\n                                    <GradientStop Color=\"#FFF6F7FA\" Offset=\"1\"/>\r\n                                </LinearGradientBrush>\r\n                            </Border.BorderBrush>\r\n                        </Border>\r\n                        <ScrollViewer Margin=\"3\" x:Name=\"ScrollViewerElement\" Padding=\"{TemplateBinding Padding}\">\r\n                            <ItemsPresenter />\r\n                        </ScrollViewer>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--TreeView-->\r\n    <Style TargetType=\"TreeView\">\r\n        <Setter Property=\"Padding\" Value=\"0\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TreeView\">\r\n                    <Grid>\r\n                        <Border x:Name=\"BackgroundBorder\" CornerRadius=\"5\" BorderThickness=\"1\" Background=\"#FFFFFFFF\">\r\n                            <Border.BorderBrush>\r\n                                <LinearGradientBrush EndPoint=\"0.5,-1.85\" StartPoint=\"0.5,1.5\">\r\n                                    <GradientStop Color=\"#FF4E5F70\" Offset=\"0\"/>\r\n                                    <GradientStop Color=\"#FFF6F7FA\" Offset=\"1\"/>\r\n                                </LinearGradientBrush>\r\n                            </Border.BorderBrush>\r\n                        </Border>\r\n                        <ScrollViewer Margin=\"3\" x:Name=\"ScrollViewerElement\" Padding=\"{TemplateBinding Padding}\" >\r\n                            <ItemsPresenter />\r\n                        </ScrollViewer>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--ListboxItem-->\r\n    <Style TargetType=\"ListBoxItem\">\r\n        <Setter Property=\"IsEnabled\" Value=\"true\" />\r\n        <Setter Property=\"Cursor\" Value=\"Arrow\" />\r\n        <Setter Property=\"Foreground\" Value=\"#FF1E2B33\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"10.5\" />\r\n        <Setter Property=\"FontWeight\" Value=\"Normal\" />\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\" />\r\n        <Setter Property=\"Padding\" Value=\"4,4.5,4,4.5\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ListBoxItem\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimation Storyboard.TargetName=\"fillColor\" Storyboard.TargetProperty=\"Color\" Duration=\"0\" To=\"#7FB0E3FF\"/>\r\n                                        <ColorAnimation Storyboard.TargetName=\"fillColor1\" Storyboard.TargetProperty=\"Color\" Duration=\"0\" To=\"#FFFFFFFF\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualState x:Name=\"Unselected\" />\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimation Storyboard.TargetName=\"fillColor2\" Storyboard.TargetProperty=\"Color\" Duration=\"0\" To=\"#7FFBF724\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Visibility\" Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"*\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <Rectangle>\r\n                            <Rectangle.Fill>\r\n                                <SolidColorBrush x:Name=\"fillColor2\" Color=\"#00FFFFFF\"/>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                        <Rectangle>\r\n                            <Rectangle.Fill>\r\n                                <SolidColorBrush x:Name=\"fillColor1\" Color=\"#00FFFFFF\"/>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                        <Rectangle>\r\n                            <Rectangle.Fill>\r\n                                <SolidColorBrush x:Name=\"fillColor\" Color=\"#00FFFFFF\"/>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                        <Rectangle x:Name=\"FocusVisualElement\" Stroke=\"#FF999999\" StrokeThickness=\".75\" StrokeDashArray=\"1,2\" Visibility=\"Collapsed\" />\r\n                        <ContentPresenter\r\n                              HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                              Margin=\"{TemplateBinding Padding}\"/>\r\n<!--\r\n                              Content=\"{TemplateBinding Content}\"\r\n                              ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                              TextAlignment=\"Left\"\r\n                              HorizontalContentAlignment=\"Left\"\r\n                              VerticalContentAlignment=\"Center\"\r\n                              TextWrapping=\"NoWrap\"\r\n                               />\r\n-->                            \r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--comboBoxItem-->\r\n    <Style TargetType=\"ComboBoxItem\">\r\n        <Setter Property=\"IsEnabled\" Value=\"true\" />\r\n        <Setter Property=\"Cursor\" Value=\"Arrow\" />\r\n        <Setter Property=\"Foreground\" Value=\"#FF1E2B33\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\" />\r\n        <Setter Property=\"FontSize\" Value=\"10.5\" />\r\n        <Setter Property=\"FontWeight\" Value=\"Normal\" />\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\" />\r\n        <Setter Property=\"Padding\" Value=\"4,4.5,4,4.5\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ComboBoxItem\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimation Storyboard.TargetName=\"fillColor\" Storyboard.TargetProperty=\"Color\" Duration=\"0\" To=\"#7FB0E3FF\"/>\r\n                                        <ColorAnimation Storyboard.TargetName=\"fillColor1\" Storyboard.TargetProperty=\"Color\" Duration=\"0\" To=\"#FFFFFFFF\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualState x:Name=\"Unselected\" />\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimation Storyboard.TargetName=\"fillColor2\" Storyboard.TargetProperty=\"Color\" Duration=\"0\" To=\"#7FFBF724\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"Visibility\" Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"*\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <Rectangle>\r\n                            <Rectangle.Fill>\r\n                                <SolidColorBrush x:Name=\"fillColor2\" Color=\"#00FFFFFF\"/>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                        <Rectangle>\r\n                            <Rectangle.Fill>\r\n                                <SolidColorBrush x:Name=\"fillColor1\" Color=\"#00FFFFFF\"/>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                        <Rectangle>\r\n                            <Rectangle.Fill>\r\n                                <SolidColorBrush x:Name=\"fillColor\" Color=\"#00FFFFFF\"/>\r\n                            </Rectangle.Fill>\r\n                        </Rectangle>\r\n                        <Rectangle x:Name=\"FocusVisualElement\" Stroke=\"#FF999999\" StrokeThickness=\".75\" StrokeDashArray=\"1,2\" Visibility=\"Collapsed\" />\r\n                        <ContentPresenter\r\n                              HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                              Margin=\"{TemplateBinding Padding}\"/>\r\n                        <!--\r\n                              Content=\"{TemplateBinding Content}\"\r\n                              ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                              TextAlignment=\"Left\"\r\n                              HorizontalContentAlignment=\"Left\"\r\n                              VerticalContentAlignment=\"Center\"\r\n                              TextWrapping=\"NoWrap\"\r\n                               />\r\n-->\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style TargetType=\"Expander\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Expander\">\r\n                    <Grid>\r\n                        <ContentPresenter />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n\r\n\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/UXMusingsGreen/Theme.xaml",
    "content": "﻿<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n\txmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\" \r\n\txmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" \r\n\txmlns:vsm=\"clr-namespace:System.Windows;assembly=WPFToolkit\"\r\n\tmc:Ignorable=\"d\">\r\n\r\n    <SolidColorBrush x:Key=\"WindowBackgroundBrush\" Color=\"#FF333333\" />\r\n    <SolidColorBrush x:Key=\"BaseColorBrush\" Color=\"#FF9FD752\"/>\r\n    <SolidColorBrush x:Key=\"BaseColorBrushFaint\" Color=\"#269FD752\"/>\r\n    <SolidColorBrush x:Key=\"ForegroundColorBrush\" Color=\"#FF333333\"/>\r\n    <SolidColorBrush x:Key=\"HoverBrush\" Color=\"#7FFBF445\"/>\r\n    <SolidColorBrush x:Key=\"HyperlinkBrush\" Color=\"#FF74AF22\"/>   \r\n\r\n<!-- Control Templates -->\r\n   \r\n    <!-- Button -->\r\n    <Style x:Key=\"{x:Type Button}\" TargetType=\"{x:Type Button}\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundColorBrush}\" />\r\n        <Setter Property=\"Padding\" Value=\"4\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\"/>\r\n        <Setter Property=\"FontSize\" Value=\"12\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Button}\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BorderTransparency\" Storyboard.TargetProperty=\"(Shape.StrokeThickness)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"7\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BorderTransparency\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.35\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#CCFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BorderTransparency\" Storyboard.TargetProperty=\"(Shape.StrokeThickness)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"7\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ScalableBorder\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ScalableBorder\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#CCFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledVisual\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledVisual\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n\r\n                        <!-- Start:UI -->\r\n                        <Grid x:Name=\"ScalableBorder\" RenderTransformOrigin=\"0.5,0.5\">\r\n                            <Grid.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Grid.RenderTransform>\r\n                            <Path Stretch=\"Fill\" Stroke=\"{TemplateBinding Background}\" Data=\"M20.231335,0.5 L26.636795,0.5 L153.5,0.5 L162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 L163.5,35.943314 L163.5,41.943314 C163.5,53.542103 155.39055,59.5 143.3632,59.5 L140.3632,59.5 L10.499999,59.5 L1.5000005,59.5 C0.94771522,59.5 0.5,59.052284 0.5,58.5 L0.5,49.5 L0.5,23.056734 L0.5,18.056734 C0.5,7.0391827 9.4203978,0.4999994 20.636806,0.5\" StrokeThickness=\"3\" x:Name=\"BackColor\" Fill=\"{TemplateBinding Background}\"/>\r\n                            <Path Stretch=\"Fill\" Stroke=\"#FF888888\" Data=\"M20.231335,0.5 L26.636795,0.5 L153.5,0.5 L162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 L163.5,35.943314 L163.5,41.943314 C163.5,53.542103 155.39055,59.5 143.3632,59.5 L140.3632,59.5 L10.499999,59.5 L1.5000005,59.5 C0.94771522,59.5 0.5,59.052284 0.5,58.5 L0.5,49.5 L0.5,23.056734 L0.5,18.056734 C0.5,7.0391827 9.4203978,0.4999994 20.636806,0.5\" StrokeThickness=\"3\" x:Name=\"Background\">\r\n                                <Path.Fill>\r\n                                    <LinearGradientBrush StartPoint=\"0.7,0\" EndPoint=\"0.7,1\">\r\n                                        <GradientStop Color=\"#CCFFFFFF\" Offset=\"0\" />\r\n                                        <GradientStop Color=\"#AAFFFFFF\" Offset=\"0.285\" />\r\n                                        <GradientStop Color=\"#88FFFFFF\" Offset=\"0.285\" />\r\n                                        <GradientStop Color=\"#19FFFFFF\" Offset=\"1\" />\r\n                                    </LinearGradientBrush>\r\n                                </Path.Fill>\r\n                            </Path>\r\n                            <Path x:Name=\"BorderTransparency\" Stretch=\"Fill\" StrokeThickness=\"7\" Stroke=\"#FFFFFFFF\" Opacity=\"0.25\" Margin=\".5\" Data=\"M10.499999,0.5 L16.5,0.5 153.5,0.5 162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 163.5,43.499999 163.5,49.499999 C163.5,55.022846 159.02284,59.499999 153.5,59.499999 L150.5,59.499999 10.499999,59.499999 1.5000005,59.499999 C0.94771522,59.499999 0.5,59.052284 0.5,58.499999 L0.5,49.499999 0.5,15.499999 0.5,10.499999 C0.5,4.9771518 4.9771523,0.4999994 10.499999,0.5 z\"/>\r\n                            <ContentPresenter \r\n                                    x:Name=\"contentPresenter\" \r\n                                    Content=\"{TemplateBinding Content}\" \r\n                                    ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                                    Margin=\"{TemplateBinding Padding}\" \r\n                                    HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" \r\n                                    VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                            <Path x:Name=\"FocusVisual\" Stretch=\"Fill\" StrokeThickness=\"1\" Stroke=\"#BFFFFFFF\" StrokeDashCap=\"Square\" StrokeDashArray=\"1 2\" Margin=\"5\" Visibility=\"Collapsed\" Data=\"M10.499999,0.5 L16.5,0.5 153.5,0.5 162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 163.5,43.499999 163.5,49.499999 C163.5,55.022846 159.02284,59.499999 153.5,59.499999 L150.5,59.499999 10.499999,59.499999 1.5000005,59.499999 C0.94771522,59.499999 0.5,59.052284 0.5,58.499999 L0.5,49.499999 0.5,15.499999 0.5,10.499999 C0.5,4.9771518 4.9771523,0.4999994 10.499999,0.5 z\"/>\r\n                            <Path x:Name=\"DisabledVisual\" Stretch=\"Fill\" Fill=\"#FFFFFFFF\" StrokeThickness=\"3\" Stroke=\"#FFFFFFFF\" Visibility=\"Collapsed\" Data=\"M10.499999,0.5 L16.5,0.5 153.5,0.5 162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 163.5,43.499999 163.5,49.499999 C163.5,55.022846 159.02284,59.499999 153.5,59.499999 L150.5,59.499999 10.499999,59.499999 1.5000005,59.499999 C0.94771522,59.499999 0.5,59.052284 0.5,58.499999 L0.5,49.499999 0.5,15.499999 0.5,10.499999 C0.5,4.9771518 4.9771523,0.4999994 10.499999,0.5 z\" Opacity=\"0.55\"/>\r\n                        </Grid>\r\n                        <!-- End:UI -->\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- ToggleButton -->\r\n    <Style x:Key=\"{x:Type ToggleButton}\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundColorBrush}\" />\r\n        <Setter Property=\"Padding\" Value=\"4\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\"/>\r\n        <Setter Property=\"FontSize\" Value=\"12\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BorderTransparency\" Storyboard.TargetProperty=\"(Shape.StrokeThickness)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"7\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BorderTransparency\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.35\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#CCFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BorderTransparency\" Storyboard.TargetProperty=\"(Shape.StrokeThickness)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"7\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ScalableBorder\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ScalableBorder\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#CCFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledVisual\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledVisual\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n\r\n                        <!-- Start:UI -->\r\n                        <Grid x:Name=\"ScalableBorder\" RenderTransformOrigin=\"0.5,0.5\">\r\n                            <Grid.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Grid.RenderTransform>\r\n                            <Path Stretch=\"Fill\" Stroke=\"{TemplateBinding Background}\" Data=\"M20.231335,0.5 L26.636795,0.5 L153.5,0.5 L162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 L163.5,35.943314 L163.5,41.943314 C163.5,53.542103 155.39055,59.5 143.3632,59.5 L140.3632,59.5 L10.499999,59.5 L1.5000005,59.5 C0.94771522,59.5 0.5,59.052284 0.5,58.5 L0.5,49.5 L0.5,23.056734 L0.5,18.056734 C0.5,7.0391827 9.4203978,0.4999994 20.636806,0.5\" StrokeThickness=\"3\" x:Name=\"BackColor\" Fill=\"{TemplateBinding Background}\"/>\r\n                            <Path Stretch=\"Fill\" Stroke=\"#FF888888\" Data=\"M20.231335,0.5 L26.636795,0.5 L153.5,0.5 L162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 L163.5,35.943314 L163.5,41.943314 C163.5,53.542103 155.39055,59.5 143.3632,59.5 L140.3632,59.5 L10.499999,59.5 L1.5000005,59.5 C0.94771522,59.5 0.5,59.052284 0.5,58.5 L0.5,49.5 L0.5,23.056734 L0.5,18.056734 C0.5,7.0391827 9.4203978,0.4999994 20.636806,0.5\" StrokeThickness=\"3\" x:Name=\"Background\">\r\n                                <Path.Fill>\r\n                                    <LinearGradientBrush StartPoint=\"0.7,0\" EndPoint=\"0.7,1\">\r\n                                        <GradientStop Color=\"#CCFFFFFF\" Offset=\"0\" />\r\n                                        <GradientStop Color=\"#AAFFFFFF\" Offset=\"0.285\" />\r\n                                        <GradientStop Color=\"#88FFFFFF\" Offset=\"0.285\" />\r\n                                        <GradientStop Color=\"#19FFFFFF\" Offset=\"1\" />\r\n                                    </LinearGradientBrush>\r\n                                </Path.Fill>\r\n                            </Path>\r\n                            <Path x:Name=\"BorderTransparency\" Stretch=\"Fill\" StrokeThickness=\"7\" Stroke=\"#FFFFFFFF\" Opacity=\"0.25\" Margin=\".5\" Data=\"M10.499999,0.5 L16.5,0.5 153.5,0.5 162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 163.5,43.499999 163.5,49.499999 C163.5,55.022846 159.02284,59.499999 153.5,59.499999 L150.5,59.499999 10.499999,59.499999 1.5000005,59.499999 C0.94771522,59.499999 0.5,59.052284 0.5,58.499999 L0.5,49.499999 0.5,15.499999 0.5,10.499999 C0.5,4.9771518 4.9771523,0.4999994 10.499999,0.5 z\"/>\r\n                            <ContentPresenter \r\n                                    x:Name=\"contentPresenter\" \r\n                                    Content=\"{TemplateBinding Content}\" \r\n                                    ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                                    Margin=\"{TemplateBinding Padding}\" \r\n                                    HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" \r\n                                    VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                            <Path x:Name=\"FocusVisual\" Stretch=\"Fill\" StrokeThickness=\"1\" Stroke=\"#BFFFFFFF\" StrokeDashCap=\"Square\" StrokeDashArray=\"1 2\" Margin=\"5\" Visibility=\"Collapsed\" Data=\"M10.499999,0.5 L16.5,0.5 153.5,0.5 162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 163.5,43.499999 163.5,49.499999 C163.5,55.022846 159.02284,59.499999 153.5,59.499999 L150.5,59.499999 10.499999,59.499999 1.5000005,59.499999 C0.94771522,59.499999 0.5,59.052284 0.5,58.499999 L0.5,49.499999 0.5,15.499999 0.5,10.499999 C0.5,4.9771518 4.9771523,0.4999994 10.499999,0.5 z\"/>\r\n                            <Path x:Name=\"DisabledVisual\" Stretch=\"Fill\" Fill=\"#FFFFFFFF\" StrokeThickness=\"3\" Stroke=\"#FFFFFFFF\" Visibility=\"Collapsed\" Data=\"M10.499999,0.5 L16.5,0.5 153.5,0.5 162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 163.5,43.499999 163.5,49.499999 C163.5,55.022846 159.02284,59.499999 153.5,59.499999 L150.5,59.499999 10.499999,59.499999 1.5000005,59.499999 C0.94771522,59.499999 0.5,59.052284 0.5,58.499999 L0.5,49.499999 0.5,15.499999 0.5,10.499999 C0.5,4.9771518 4.9771523,0.4999994 10.499999,0.5 z\" Opacity=\"0.55\"/>\r\n                        </Grid>\r\n                        <!-- End:UI -->\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- TextBox -->\r\n    <Style x:Key=\"{x:Type TextBox}\" TargetType=\"{x:Type TextBox}\">\r\n        <Setter Property=\"Background\" Value=\"#FFFFFFFF\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\"/>\r\n        <Setter Property=\"FontSize\" Value=\"12\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TextBox}\">\r\n                    <Grid x:Name=\"RootElement\" VerticalAlignment=\"Bottom\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BackgroundBorder\" Storyboard.TargetProperty=\"(Border.BorderBrush).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#CCFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ReadOnly\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"ContentElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n\r\n                        <Border x:Name=\"BackgroundBorder\" VerticalAlignment=\"Bottom\" BorderBrush=\"#FF888888\" CornerRadius=\"2.5\" BorderThickness=\"2.5\" Background=\"#FFFFFFFF\" HorizontalAlignment=\"Stretch\">\r\n                            <Grid>\r\n                                <Border Margin=\"-1,-1,0,0\" CornerRadius=\"2\"  BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"2,2,2,2\" Background=\"{x:Null}\" VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" x:Name=\"Line\" Opacity=\"0.5\"/>\r\n                                <Border x:Name=\"InnerBorder\" Margin=\"-1,-1,0,0\" CornerRadius=\"2\" BorderThickness=\"2,2,2,2\" Background=\"#FFFFFFFF\" VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" BorderBrush=\"{x:Null}\">\r\n                                    <Grid VerticalAlignment=\"Stretch\">\r\n                                        <ScrollViewer x:Name=\"PART_ContentHost\" BorderThickness=\"0\" IsTabStop=\"False\"/>\r\n                                        <Border x:Name=\"HoverBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" Opacity=\".2\" BorderThickness=\"2,2,2,2\" Visibility=\"Collapsed\" Margin=\"-1,-1,0,0\"/>\r\n                                        <Rectangle x:Name=\"FocusVisual\" RadiusX=\"1\" RadiusY=\"1\" Margin=\"1,1,1,1\" Stroke=\"#BF313131\" StrokeDashArray=\"1 2\" StrokeThickness=\"1\" Opacity=\"0\" StrokeDashCap=\"Square\" IsHitTestVisible=\"false\" />                                                                               \r\n                                    </Grid>\r\n                                </Border>                                                               \r\n                            </Grid>\r\n                        </Border>\r\n\r\n                        <Border x:Name=\"DisabledVisualElement\" BorderBrush=\"#FFFFFFFF\" CornerRadius=\"2.5\" BorderThickness=\"2.5\" Background=\"#FFFFFFFF\" Margin=\"0,0,0,0\" Opacity=\"0.55\" Visibility=\"Collapsed\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- CheckBox -->\r\n    <Style x:Key=\"{x:Type CheckBox}\" TargetType=\"{x:Type CheckBox}\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"#FFBBBBBB\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\"/>\r\n        <Setter Property=\"FontSize\" Value=\"12\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\"/>\r\n        <Setter Property=\"Padding\" Value=\"6,1,0,0\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type CheckBox}\">\r\n                    <Grid>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"16\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Border\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#FFFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Border\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#FFFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"CheckVisualGrid\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"CheckVisualGrid\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledVisual\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BoxBackground\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"InnerBoxBackground\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"CheckPunch\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\"/>\r\n                                <VisualState x:Name=\"Indeterminate\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BoxBackground\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"InnerBoxBackground\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"IndeterminatePunch\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledVisual\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid Grid.Column=\"0\" Width=\"15\" Height=\"15\" x:Name=\"CheckVisualGrid\" RenderTransformOrigin=\"0.5,0.5\" HorizontalAlignment=\"Left\">\r\n                            <Grid.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Grid.RenderTransform>\r\n                            <Path x:Name=\"BoxBackground\" Stretch=\"Fill\" Fill=\"{TemplateBinding Background}\" Stroke=\"#FF888888\" StrokeThickness=\"1.5\" Data=\"M34.859547,0.5 L41.265007,0.5 L153.5,0.5 L162.5,0.5 C163.05229,0.4999994 163.5,3.2169452 163.5,3.7692311 L163.5,10.499999 L163.5,35.943314 L163.5,41.943314 C163.5,53.542103 143.64745,59.5 128.73494,59.5 L125.73496,59.5 L10.499999,59.5 L1.5000005,59.5 C0.94771522,59.5 0.5,56.783058 0.5,56.230774 L0.5,49.5 L0.5,23.056734 L0.5,18.056734 C0.5,7.0391827 18.262821,0.4999994 35.265018,0.5\"/>\r\n                            <Path x:Name=\"InnerBoxBackground\" Stretch=\"Fill\" Fill=\"#59FFFFFF\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"0.65\" Margin=\"4,4,4,4\" Data=\"M27.023003,0.5 L33.428463,0.5 L142.18057,0.5 L162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 L163.5,35.943314 L163.5,41.943314 C163.5,53.542103 148.59889,59.5 136.57155,59.5 L133.57155,59.5 L21.819443,59.5 L1.5000005,59.5 C0.94771522,59.5 0.5,59.052284 0.5,58.5 L0.5,49.5 L0.5,23.056734 L0.5,18.056734 C0.5,7.0391827 16.212063,0.4999994 27.428474,0.5\" Opacity=\"1\"/>\r\n                            <Path x:Name=\"IndeterminatePunch\" Stretch=\"Fill\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\" Opacity=\"0\" Margin=\"0.5,0.5,0.5,0.5\" Data=\"M5.0955529,4.2793331 C4.567708,4.2793331 4.2793331,4.9282775 4.2793331,6.1620564 L4.2793331,6.721972 L4.2793331,9.6831694 C4.2793331,9.6831694 4.2558069,10.573813 4.2782001,10.573833 L9.833333,10.562499 L9.9549341,10.562499 C10.593154,10.562499 10.771154,10.124483 10.771154,8.8256149 L10.771154,8.153717 L10.771154,5.3044972 C10.771154,5.3044972 10.753014,4.2680192 10.73062,4.2680001 L5.020833,4.2793331 M2.6060028,1 L3.0845296,1 L13.202454,1 L13.920245,1 C13.964306,1.0000378 14,1.0986724 14,1.2203391 L14,3.2033896 L14,8.8095436 L14,10.131577 C14,12.687243 13.353233,14 12.393997,14 L12.154734,14 L1.7975459,14 L1.0797546,14 C1.0356936,13.999962 1,13.901327 1,13.779661 L1,11.79661 L1,5.9701281 L1,4.868433 C1,2.4408369 1.7114427,0.99999988 2.6060028,1\" Fill=\"{TemplateBinding Background}\"/>\r\n                            <Path x:Name=\"CheckPunch\" Stretch=\"Fill\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"0.85\" Opacity=\"0\" Data=\"M3.7890608,3.714 L3.1559999,4.3821225 5.4124908,6.9780746 3.2708275,9.4536371 4.0477991,10.273244 5.4861608,10.273244 7.0000672,8.4968786 8.2457905,10.286 9.9515781,10.273244 10.728172,9.4536371 8.5868788,6.9780746 10.843,4.3821225 10.20994,3.714 8.4837542,3.714 6.9690933,5.5437827 5.5156231,3.714 3.7890608,3.714 z M3.5593879,1 L4.0011048,1 12.263804,1 12.926381,1 C12.967042,1.000037 13,1.5526028 13,1.6649284 L13,3.0338981 13,8.2088089 13,9.4291487 C13,11.788224 11.538463,13 10.440609,13 L10.219752,13 1.7361963,13 1.0736196,13 C1.0329584,12.999962 1,12.447397 1,12.335073 L1,10.966102 1,5.58781 1,4.5708609 C1,2.3300033 2.3076925,0.99999982 3.5593879,1 z\" Margin=\"0.5,0.5,0.5,0.5\" Fill=\"{TemplateBinding Background}\"/>\r\n                            <Path x:Name=\"Border\" Stretch=\"Fill\" Stroke=\"#FF888888\" StrokeThickness=\"1.5\" Opacity=\"1\" Data=\"M34.859547,0.5 L41.265007,0.5 L153.5,0.5 L162.5,0.5 C163.05229,0.4999994 163.5,3.5951502 163.5,4.1474361 L163.5,10.499999 L163.5,35.943314 L163.5,41.943314 C163.5,53.542103 146.78206,59.5 128.73494,59.5 L125.73496,59.5 L10.499999,59.5 L1.5000005,59.5 C0.94771522,59.5 0.5,56.404854 0.5,55.85257 L0.5,49.5 L0.5,23.056734 L0.5,18.056734 C0.5,7.0391827 20.352564,0.4999994 35.265018,0.5\"/>\r\n                        </Grid>\r\n                        <ContentPresenter Grid.Column=\"1\" \r\n                                x:Name=\"contentPresenter\" \r\n                                Margin=\"{TemplateBinding Padding}\"\r\n                                HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" \r\n                                VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" \r\n                                Content=\"{TemplateBinding Content}\" \r\n                                ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                        <Rectangle x:Name=\"FocusVisual\" RadiusX=\"1\" RadiusY=\"1\" Grid.Column=\"1\" Stroke=\"#BF999999\" StrokeThickness=\"1\" StrokeDashCap=\"Square\" StrokeDashArray=\"1 2\" Margin=\"2,-1,-2,-1\" Visibility=\"Collapsed\" IsHitTestVisible=\"false\"/>\r\n                        <Path x:Name=\"DisabledVisual\" Stretch=\"Fill\" Fill=\"#FFFFFFFF\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"2\" Data=\"M34.859547,0.5 L41.265007,0.5 L153.5,0.5 L162.5,0.5 C163.05229,0.4999994 163.5,3.2169452 163.5,3.7692311 L163.5,10.499999 L163.5,35.943314 L163.5,41.943314 C163.5,53.542103 143.64745,59.5 128.73494,59.5 L125.73496,59.5 L10.499999,59.5 L1.5000005,59.5 C0.94771522,59.5 0.5,56.783058 0.5,56.230774 L0.5,49.5 L0.5,23.056734 L0.5,18.056734 C0.5,7.0391827 18.262821,0.4999994 35.265018,0.5\" HorizontalAlignment=\"Left\" Width=\"15\" Opacity=\"0.55\" Height=\"15\" Visibility=\"Collapsed\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- RadioButton -->\r\n    <Style x:Key=\"{x:Type RadioButton}\" TargetType=\"{x:Type RadioButton}\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"#FFBBBBBB\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\"/>\r\n        <Setter Property=\"FontSize\" Value=\"12\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\"/>\r\n        <Setter Property=\"Padding\" Value=\"6,1,0,0\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type RadioButton}\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Border\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#FFFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Border\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#FFFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"CheckVisualGrid\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"CheckVisualGrid\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledVisual\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"EllipseBackgroundInner\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"EllipseBackground\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"CheckedPunch\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\"/>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"*\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid Grid.Column=\"0\" Width=\"15\" Height=\"15\" x:Name=\"CheckVisualGrid\" RenderTransformOrigin=\"0.5,0.5\" HorizontalAlignment=\"Left\">\r\n                            <Grid.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Grid.RenderTransform>\r\n                            <Ellipse x:Name=\"EllipseBackground\" Height=\"15\" Width=\"15\" Stretch=\"Fill\" StrokeThickness=\"1.5\" Stroke=\"#FF888888\" Fill=\"{TemplateBinding Background}\" VerticalAlignment=\"Center\" RenderTransformOrigin=\"0.5,0.5\" />\r\n                            <Ellipse x:Name=\"EllipseBackgroundInner\" Height=\"7\" Width=\"7\" StrokeThickness=\"0.65\" Stroke=\"#FFFFFFFF\" Fill=\"#59FFFFFF\" VerticalAlignment=\"Stretch\" RenderTransformOrigin=\"0.5,0.5\" />\r\n                            <Path x:Name=\"CheckedPunch\" Height=\"13\" Width=\"13\" Stretch=\"Fill\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\" Data=\"M7,3.5 C5.0670035,3.5 3.5,5.0670035 3.5,7 3.5,8.9329967 5.0670035,10.5 7,10.5 C8.9329967,10.5 10.5,8.9329967 10.5,7 C10.5,5.0670035 8.9329967,3.5 7,3.5 z M7,0.5 C10.589851,0.5 13.5,3.4101491 13.5,7 C13.5,10.589851 10.589851,13.5 7,13.5 3.4101491,13.5 0.5,10.589851 0.5,7 0.5,3.4101491 3.4101491,0.5 7,0.5 z\" Margin=\".5\" Opacity=\"0\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"{TemplateBinding Background}\" />\r\n                            <Ellipse x:Name=\"Border\" Height=\"15\" Width=\"15\" Stretch=\"Fill\" StrokeThickness=\"1.5\" Stroke=\"#FF888888\" VerticalAlignment=\"Center\" RenderTransformOrigin=\"0.5,0.5\" />\r\n                        </Grid>\r\n                        <ContentPresenter Grid.Column=\"1\" \r\n                                x:Name=\"contentPresenter\" \r\n                                HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" \r\n                                Margin=\"{TemplateBinding Padding}\" \r\n                                VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" \r\n                                Content=\"{TemplateBinding Content}\" \r\n                                ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                        <Rectangle x:Name=\"FocusVisual\" RadiusX=\"1\" RadiusY=\"1\" Grid.Column=\"1\" Stroke=\"#BF999999\" StrokeThickness=\"1\" StrokeDashCap=\"Square\" StrokeDashArray=\"1 2\" Margin=\"2,-1,-2,-1\" Visibility=\"Collapsed\" IsHitTestVisible=\"false\"/>\r\n                        <Ellipse x:Name=\"DisabledVisual\" StrokeThickness=\"1\"  Stroke=\"#FFFFFFFF\"  Fill=\"#FFFFFFFF\" VerticalAlignment=\"Center\" Opacity=\"0.55\" Width=\"15\" Height=\"15\" Visibility=\"Collapsed\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- ProgressBar -->\r\n    <Style x:Key=\"{x:Type ProgressBar}\" TargetType=\"{x:Type ProgressBar}\">\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"Background\" Value=\"#FFD2D5D8\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"2\"/>\r\n        <Setter Property=\"Maximum\" Value=\"100\"/>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"#FF888888\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ProgressBar}\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <Border x:Name=\"PART_Track\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\"/>\r\n                        <Grid x:Name=\"ProgressBarRootGrid\">\r\n                            <Rectangle Margin=\"{TemplateBinding BorderThickness}\" x:Name=\"ProgressBarRootGradient\" Canvas.ZIndex=\"1\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\" RadiusX=\"1.5\" RadiusY=\"1.5\">\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                        <GradientStop Color=\"#B2FFFFFF\" Offset=\"0\"/>\r\n                                        <GradientStop Color=\"#C6FFFFFF\" Offset=\"0.15\"/>\r\n                                        <GradientStop Color=\"#D1FFFFFF\" Offset=\"0.275\"/>\r\n                                        <GradientStop Color=\"#C6FFFFFF\" Offset=\"0.4\"/>\r\n                                        <GradientStop Color=\"#BFFFFFFF\" Offset=\"0.65\"/>\r\n                                        <GradientStop Color=\"#A5FFFFFF\" Offset=\"0.75\"/>\r\n                                        <GradientStop Color=\"#91FFFFFF\" Offset=\"0.85\"/>\r\n                                        <GradientStop Color=\"#72FFFFFF\" Offset=\"1\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                            <Grid x:Name=\"IndeterminateRoot\" Visibility=\"Collapsed\">\r\n                                <Rectangle Margin=\"{TemplateBinding BorderThickness}\" x:Name=\"IndeterminateSolidFill\" Opacity=\"1\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"{TemplateBinding Foreground}\" Stroke=\"#FF448DCA\" StrokeThickness=\"0\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                <Rectangle Margin=\"{TemplateBinding BorderThickness}\" x:Name=\"IndeterminateGradientFill\" Opacity=\"0.7\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\">\r\n                                    <Rectangle.Fill>\r\n                                        <LinearGradientBrush EndPoint=\"0,1\" StartPoint=\"20,1\" MappingMode=\"Absolute\" SpreadMethod=\"Repeat\">\r\n                                            <LinearGradientBrush.Transform>\r\n                                                <TransformGroup>\r\n                                                    <TranslateTransform X=\"0\"/>\r\n                                                    <SkewTransform AngleX=\"-30\"/>\r\n                                                </TransformGroup>\r\n                                            </LinearGradientBrush.Transform>\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#00FFFFFF\" Offset=\".25\"/>\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.85\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Rectangle.Fill>\r\n                                </Rectangle>\r\n                            </Grid>\r\n                            <Grid Margin=\"1\" x:Name=\"DeterminateRoot\">\r\n                                <Rectangle HorizontalAlignment=\"Left\" Margin=\"{TemplateBinding BorderThickness}\" x:Name=\"PART_Indicator\" Fill=\"{TemplateBinding Foreground}\" StrokeThickness=\"0.5\" RadiusX=\"1.5\" RadiusY=\"1.5\"/>\r\n                            </Grid>\r\n                        </Grid>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsIndeterminate\" Value=\"True\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard>\r\n                                    <Storyboard RepeatBehavior=\"Forever\">\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00\" Storyboard.TargetName=\"IndeterminateRoot\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00\" Storyboard.TargetName=\"DeterminateRoot\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"IndeterminateGradientFill\" Storyboard.TargetProperty=\"(Shape.Fill).(LinearGradientBrush.Transform).(TransformGroup.Children)[0].X\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:.5\" Value=\"20\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"IndeterminateGradientFill\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.SpreadMethod)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GradientSpreadMethod>Repeat</GradientSpreadMethod>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00.5000000\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GradientSpreadMethod>Repeat</GradientSpreadMethod>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </BeginStoryboard>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- ComboBox -->\r\n    <Style x:Key=\"{x:Type ComboBox}\" TargetType=\"{x:Type ComboBox}\">\r\n        <Setter Property=\"Padding\" Value=\"14,2,34,2\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundColorBrush}\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\"/>\r\n        <Setter Property=\"FontSize\" Value=\"12\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ComboBox}\">\r\n                    <Grid>\r\n                        <Grid.Resources>\r\n                            <Style TargetType=\"ToggleButton\" x:Name=\"comboToggleStyle\">\r\n                                <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n                                <Setter Property=\"Foreground\" Value=\"#FFFFFFFF\" />\r\n                                <Setter Property=\"Padding\" Value=\"4\"/>\r\n                                <Setter Property=\"Template\">\r\n                                    <Setter.Value>\r\n                                        <ControlTemplate TargetType=\"ToggleButton\">\r\n                                            <Grid>\r\n                                                <VisualStateManager.VisualStateGroups>\r\n                                                    <VisualStateGroup x:Name=\"CommonStates\">\r\n                                                        <VisualStateGroup.Transitions>\r\n                                                            <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n                                                            <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\"/>\r\n                                                        </VisualStateGroup.Transitions>\r\n                                                        <VisualState x:Name=\"Normal\"/>\r\n                                                        <VisualState x:Name=\"MouseOver\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BorderTransparency\" Storyboard.TargetProperty=\"(Shape.StrokeThickness)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"7\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BorderTransparency\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.35\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                                <ColorAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BackgroundStroke\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\">\r\n                                                                    <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#CCFFFFFF\"/>\r\n                                                                </ColorAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Pressed\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BorderTransparency\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.35\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ScalableBorder\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ScalableBorder\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                                <ColorAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BackgroundStroke\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\">\r\n                                                                    <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#CCFFFFFF\"/>\r\n                                                                </ColorAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Disabled\">\r\n                                                            <Storyboard>\r\n                                                                <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledVisual\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                                                    <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                                        <DiscreteObjectKeyFrame.Value>\r\n                                                                            <Visibility>Visible</Visibility>\r\n                                                                        </DiscreteObjectKeyFrame.Value>\r\n                                                                    </DiscreteObjectKeyFrame>\r\n                                                                </ObjectAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                    </VisualStateGroup>\r\n                                                    <VisualStateGroup x:Name=\"CheckStates\">\r\n                                                        <VisualState x:Name=\"Checked\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                                <ColorAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                                    <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#FFFFFFFF\"/>\r\n                                                                </ColorAnimationUsingKeyFrames>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Offset)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.671\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Offset)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.225\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Offset)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.215\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                                <ColorAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                                                    <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#99FFFFFF\"/>\r\n                                                                </ColorAnimationUsingKeyFrames>\r\n                                                                <ColorAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                                    <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#EEFFFFFF\"/>\r\n                                                                </ColorAnimationUsingKeyFrames>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.8\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Unchecked\"/>\r\n                                                        <VisualState x:Name=\"Indeterminate\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                                <ColorAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                                    <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#FFFFFFFF\"/>\r\n                                                                </ColorAnimationUsingKeyFrames>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Offset)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.671\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Offset)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.225\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Offset)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.215\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                                <ColorAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                                                    <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#99FFFFFF\"/>\r\n                                                                </ColorAnimationUsingKeyFrames>\r\n                                                                <ColorAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                                    <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#EEFFFFFF\"/>\r\n                                                                </ColorAnimationUsingKeyFrames>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.8\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                    </VisualStateGroup>\r\n                                                    <VisualStateGroup x:Name=\"FocusStates\">\r\n                                                        <VisualState x:Name=\"Focused\">\r\n                                                            <Storyboard>\r\n                                                                <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                                                    <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                                        <DiscreteObjectKeyFrame.Value>\r\n                                                                            <Visibility>Visible</Visibility>\r\n                                                                        </DiscreteObjectKeyFrame.Value>\r\n                                                                    </DiscreteObjectKeyFrame>\r\n                                                                </ObjectAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Unfocused\"/>\r\n                                                    </VisualStateGroup>\r\n                                                </VisualStateManager.VisualStateGroups>\r\n\r\n                                                <!-- Start:UI -->\r\n                                                <Grid x:Name=\"ScalableBorder\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                                    <Grid.RenderTransform>\r\n                                                        <TransformGroup>\r\n                                                            <ScaleTransform/>\r\n                                                            <SkewTransform/>\r\n                                                            <RotateTransform/>\r\n                                                            <TranslateTransform/>\r\n                                                        </TransformGroup>\r\n                                                    </Grid.RenderTransform>\r\n                                                    <Path Stretch=\"Fill\" Stroke=\"{TemplateBinding Background}\" Data=\"M20.231335,0.5 L26.636795,0.5 L153.5,0.5 L162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 L163.5,35.943314 L163.5,41.943314 C163.5,53.542103 155.39055,59.5 143.3632,59.5 L140.3632,59.5 L10.499999,59.5 L1.5000005,59.5 C0.94771522,59.5 0.5,59.052284 0.5,58.5 L0.5,49.5 L0.5,23.056734 L0.5,18.056734 C0.5,7.0391827 9.4203978,0.4999994 20.636806,0.5\" StrokeThickness=\"3\" x:Name=\"BackColor\" Fill=\"{TemplateBinding Background}\"/>\r\n                                                    <Path Stretch=\"Fill\" Stroke=\"#FF888888\" Data=\"M20.231335,0.5 L26.636795,0.5 L153.5,0.5 L162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 L163.5,35.943314 L163.5,41.943314 C163.5,53.542103 155.39055,59.5 143.3632,59.5 L140.3632,59.5 L10.499999,59.5 L1.5000005,59.5 C0.94771522,59.5 0.5,59.052284 0.5,58.5 L0.5,49.5 L0.5,23.056734 L0.5,18.056734 C0.5,7.0391827 9.4203978,0.4999994 20.636806,0.5\" StrokeThickness=\"3\" x:Name=\"Background\">\r\n                                                        <Path.Fill>\r\n                                                            <LinearGradientBrush StartPoint=\"0.7,0\" EndPoint=\"0.7,1\">\r\n                                                                <GradientStop Color=\"#CCFFFFFF\" Offset=\"0\" />\r\n                                                                <GradientStop Color=\"#AAFFFFFF\" Offset=\"0.285\" />\r\n                                                                <GradientStop Color=\"#88FFFFFF\" Offset=\"0.285\" />\r\n                                                                <GradientStop Color=\"#19FFFFFF\" Offset=\"1\" />\r\n                                                            </LinearGradientBrush>\r\n                                                        </Path.Fill>\r\n                                                    </Path>\r\n                                                    <Path Stretch=\"Fill\" Stroke=\"#FF888888\" Data=\"M20.231335,0.5 L26.636795,0.5 L153.5,0.5 L162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 L163.5,35.943314 L163.5,41.943314 C163.5,53.542103 155.39055,59.5 143.3632,59.5 L140.3632,59.5 L10.499999,59.5 L1.5000005,59.5 C0.94771522,59.5 0.5,59.052284 0.5,58.5 L0.5,49.5 L0.5,23.056734 L0.5,18.056734 C0.5,7.0391827 9.4203978,0.4999994 20.636806,0.5\" StrokeThickness=\"3\" x:Name=\"BackgroundStroke\"/>\r\n                                                    <Path x:Name=\"BorderTransparency\" Stretch=\"Fill\" StrokeThickness=\"7\" Stroke=\"#FFFFFFFF\" Opacity=\"0.25\" Margin=\".5\" Data=\"M10.499999,0.5 L16.5,0.5 153.5,0.5 162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 163.5,43.499999 163.5,49.499999 C163.5,55.022846 159.02284,59.499999 153.5,59.499999 L150.5,59.499999 10.499999,59.499999 1.5000005,59.499999 C0.94771522,59.499999 0.5,59.052284 0.5,58.499999 L0.5,49.499999 0.5,15.499999 0.5,10.499999 C0.5,4.9771518 4.9771523,0.4999994 10.499999,0.5 z\"/>\r\n                                                    <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"contentPresenter\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                                                    <Path x:Name=\"FocusVisual\" Stretch=\"Fill\" StrokeThickness=\"1\" Stroke=\"#BFFFFFFF\" StrokeDashCap=\"Square\"  StrokeDashArray=\"1 2\" Margin=\"5\" Visibility=\"Collapsed\" Data=\"M10.499999,0.5 L16.5,0.5 153.5,0.5 162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 163.5,43.499999 163.5,49.499999 C163.5,55.022846 159.02284,59.499999 153.5,59.499999 L150.5,59.499999 10.499999,59.499999 1.5000005,59.499999 C0.94771522,59.499999 0.5,59.052284 0.5,58.499999 L0.5,49.499999 0.5,15.499999 0.5,10.499999 C0.5,4.9771518 4.9771523,0.4999994 10.499999,0.5 z\"/>\r\n                                                    <Path x:Name=\"DisabledVisual\" Stretch=\"Fill\" Fill=\"#FFFFFFFF\" StrokeThickness=\"3\" Stroke=\"#FFFFFFFF\" Visibility=\"Collapsed\" Data=\"M10.499999,0.5 L16.5,0.5 153.5,0.5 162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 163.5,43.499999 163.5,49.499999 C163.5,55.022846 159.02284,59.499999 153.5,59.499999 L150.5,59.499999 10.499999,59.499999 1.5000005,59.499999 C0.94771522,59.499999 0.5,59.052284 0.5,58.499999 L0.5,49.499999 0.5,15.499999 0.5,10.499999 C0.5,4.9771518 4.9771523,0.4999994 10.499999,0.5 z\" Opacity=\"0.55\"/>\r\n                                                </Grid>\r\n                                                <!-- End:UI -->\r\n                                            </Grid>\r\n                                        </ControlTemplate>\r\n                                    </Setter.Value>\r\n                                </Setter>\r\n                            </Style>\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard/>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                                <VisualState x:Name=\"FocusedDropDown\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00\" Storyboard.TargetName=\"PopupBorder\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"ContentPresenterBorder\">\r\n                            <Grid>\r\n\r\n\r\n\r\n                                <ToggleButton Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" HorizontalContentAlignment=\"Right\" HorizontalAlignment=\"Stretch\" Margin=\"0\" x:Name=\"DropDownToggle\" Style=\"{DynamicResource comboToggleStyle}\" VerticalAlignment=\"Stretch\" IsChecked=\"{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" ClickMode=\"Press\">\r\n                                    <StackPanel Height=\"Auto\" Width=\"Auto\" Orientation=\"Horizontal\">\r\n                                        <Rectangle Height=\"10\" Width=\"1\" Fill=\"#3FFFFFFF\" Stroke=\"#FF000000\" StrokeThickness=\"0\" Margin=\"0,0,0,0\"/>\r\n                                        <Rectangle Height=\"10\" Width=\"1\" Fill=\"#7FFFFFFF\" Stroke=\"#FF000000\" StrokeThickness=\"0\" Margin=\"0,0,6,0\"/>\r\n                                        <Path Height=\"5\" x:Name=\"BtnArrow\" Width=\"8\" Stretch=\"Uniform\" Data=\"F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z \" Fill=\"{TemplateBinding Foreground}\" Margin=\"0,0,8,0\"/>\r\n                                    </StackPanel>\r\n                                </ToggleButton>\r\n                                <ContentPresenter HorizontalAlignment=\"Left\" Margin=\"3,3,23,3\" x:Name=\"ContentSite\" VerticalAlignment=\"Center\" Content=\"{TemplateBinding SelectionBoxItem}\" ContentTemplate=\"{TemplateBinding SelectionBoxItemTemplate}\" ContentTemplateSelector=\"{TemplateBinding ItemTemplateSelector}\" IsHitTestVisible=\"False\"/>\r\n                                <!--<ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"ContentPresenter\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\">\r\n                                </ContentPresenter>-->\r\n                            </Grid>\r\n                        </Border>\r\n                        <Path x:Name=\"FocusVisualElement\" Stretch=\"Fill\" StrokeThickness=\"1\" Stroke=\"#BFFFFFFF\" StrokeDashCap=\"Square\"  StrokeDashArray=\"1 2\" Margin=\"5\" Visibility=\"Collapsed\" Data=\"M10.499999,0.5 L16.5,0.5 153.5,0.5 162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 163.5,43.499999 163.5,49.499999 C163.5,55.022846 159.02284,59.499999 153.5,59.499999 L150.5,59.499999 10.499999,59.499999 1.5000005,59.499999 C0.94771522,59.499999 0.5,59.052284 0.5,58.499999 L0.5,49.499999 0.5,15.499999 0.5,10.499999 C0.5,4.9771518 4.9771523,0.4999994 10.499999,0.5 z\"/>\r\n                        <Path x:Name=\"DisabledVisualElement\" Stretch=\"Fill\" Fill=\"#FFFFFFFF\" StrokeThickness=\"3\" Stroke=\"#FFFFFFFF\" Visibility=\"Collapsed\" Data=\"M10.499999,0.5 L16.5,0.5 153.5,0.5 162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 163.5,43.499999 163.5,49.499999 C163.5,55.022846 159.02284,59.499999 153.5,59.499999 L150.5,59.499999 10.499999,59.499999 1.5000005,59.499999 C0.94771522,59.499999 0.5,59.052284 0.5,58.499999 L0.5,49.499999 0.5,15.499999 0.5,10.499999 C0.5,4.9771518 4.9771523,0.4999994 10.499999,0.5 z\" Opacity=\"0.55\"/>\r\n                        <Popup IsOpen=\"{TemplateBinding IsDropDownOpen}\" Placement=\"Bottom\" x:Name=\"Popup\" Focusable=\"False\" AllowsTransparency=\"True\" PopupAnimation=\"Slide\">\r\n                            <Grid MaxHeight=\"{TemplateBinding MaxDropDownHeight}\" MinWidth=\"{TemplateBinding ActualWidth}\" x:Name=\"DropDown\" SnapsToDevicePixels=\"True\">\r\n\r\n                                <Border Height=\"Auto\" HorizontalAlignment=\"Stretch\" x:Name=\"PopupBorder\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"5,5,5,5\" BorderBrush=\"#FF888888\" Background=\"#FFFEFEFE\">\r\n                                    <Border x:Name=\"BackgroundBorder\" BorderBrush=\"#FF888888\" CornerRadius=\"3,3,3,3\" BorderThickness=\"2,2,2,2\" Background=\"#FFFFFFFF\" Width=\"Auto\" Height=\"Auto\">\r\n                                        <Grid Height=\"Auto\" Width=\"Auto\">\r\n                                            <Border CornerRadius=\"1,1,1,1\"  BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"2,2,2,2\" Background=\"#33FFFFFF\" VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" x:Name=\"Line\" Opacity=\"0.5\"/>\r\n                                            <Border x:Name=\"InnerBorder\" CornerRadius=\"1,1,1,1\" BorderThickness=\"2,2,2,2\" Background=\"{x:Null}\" VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" BorderBrush=\"{x:Null}\">\r\n                                                <ScrollViewer BorderThickness=\"0\" Padding=\"1\" x:Name=\"ScrollViewer\" Height=\"Auto\" HorizontalAlignment=\"Stretch\" Margin=\"-1,-1,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" SnapsToDevicePixels=\"True\" HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Auto\" CanContentScroll=\"True\">\r\n                                                    <ItemsPresenter Margin=\"1,1,1,1\"/>\r\n                                                </ScrollViewer>\r\n                                            </Border>\r\n                                        </Grid>\r\n                                    </Border>\r\n                                </Border>\r\n\r\n                            </Grid>\r\n                        </Popup>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- Thumb - HorizontalThumbStyle -->\r\n    <Style x:Key=\"HorizontalThumbStyle\" TargetType=\"Thumb\">\r\n        <Setter Property=\"Background\" Value=\"#FF1F3B53\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"#FFA3AEB9\" Offset=\"0\"/>\r\n                    <GradientStop Color=\"#FF8399A9\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF718597\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF617584\" Offset=\"1\"/>\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Thumb\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#FFFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#FFFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"grid\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"grid\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledVisual\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid Cursor=\"Hand\" RenderTransformOrigin=\"0.5,0.5\" x:Name=\"grid\">\r\n                            <Grid.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Grid.RenderTransform>\r\n                            <Path x:Name=\"BackgroundShadow1\" Stretch=\"Fill\" Stroke=\"#FF000000\" StrokeThickness=\"2\" Fill=\"#FF000000\" Margin=\"-2\" Opacity=\".05\" Data=\"M20.747934,1.5 L52.092117,1.5 C52.250446,1.5000001 53.737717,2.7400134 53.737717,3.1673 L53.737717,25.5 C53.737717,27.709139 52.209141,29.5 50,29.5 L46.235802,29.5 C43.564945,33.395603 36.190704,43.5 31.75,43.5 C27.309294,43.5 19.935053,33.395603 17.2642,29.5 L13.5,29.5 C11.290861,29.5 9.5,27.709139 9.5,25.5 L9.5,10.805009 C9.5,4.6463528 15.468018,1.5000001 20.747934,1.5\" />\r\n                            <Path x:Name=\"BackgroundShadow2\" Stretch=\"Fill\" Stroke=\"#FF000000\" StrokeThickness=\"2\" Fill=\"#FF000000\" Margin=\"-1\" Opacity=\".05\" Data=\"M20.747934,1.5 L52.092117,1.5 C52.250446,1.5000001 53.737717,2.7400134 53.737717,3.1673 L53.737717,25.5 C53.737717,27.709139 52.209141,29.5 50,29.5 L46.235802,29.5 C43.564945,33.395603 36.190704,43.5 31.75,43.5 C27.309294,43.5 19.935053,33.395603 17.2642,29.5 L13.5,29.5 C11.290861,29.5 9.5,27.709139 9.5,25.5 L9.5,10.805009 C9.5,4.6463528 15.468018,1.5000001 20.747934,1.5\" />\r\n                            <Path Stretch=\"Fill\" Stroke=\"{TemplateBinding Background}\" Fill=\"{TemplateBinding Background}\" StrokeThickness=\"1.5\" Data=\"M20.747934,1.5 L52.092117,1.5 C52.250446,1.5000001 53.737717,2.7400134 53.737717,3.1673 L53.737717,25.5 C53.737717,27.709139 52.209141,29.5 50,29.5 L46.235802,29.5 C43.564945,33.395603 36.190704,43.5 31.75,43.5 C27.309294,43.5 19.935053,33.395603 17.2642,29.5 L13.5,29.5 C11.290861,29.5 9.5,27.709139 9.5,25.5 L9.5,10.805009 C9.5,4.6463528 15.468018,1.5000001 20.747934,1.5\" x:Name=\"ButtonFill\"/>\r\n                            <Path x:Name=\"Background\" Stretch=\"Fill\" Stroke=\"#FF888888\" StrokeThickness=\"1.5\" Data=\"M20.747934,1.5 L52.092117,1.5 C52.250446,1.5000001 53.737717,2.7400134 53.737717,3.1673 L53.737717,25.5 C53.737717,27.709139 52.209141,29.5 50,29.5 L46.235802,29.5 C43.564945,33.395603 36.190704,43.5 31.75,43.5 C27.309294,43.5 19.935053,33.395603 17.2642,29.5 L13.5,29.5 C11.290861,29.5 9.5,27.709139 9.5,25.5 L9.5,10.805009 C9.5,4.6463528 15.468018,1.5000001 20.747934,1.5\">\r\n                                <Path.Fill>\r\n                                    <LinearGradientBrush StartPoint=\"0.7,0\" EndPoint=\"0.7,1\">\r\n                                        <GradientStop Color=\"#CCFFFFFF\" Offset=\"0\" />\r\n                                        <GradientStop Color=\"#AAFFFFFF\" Offset=\"0.285\" />\r\n                                        <GradientStop Color=\"#88FFFFFF\" Offset=\"0.285\" />\r\n                                        <GradientStop Color=\"#19FFFFFF\" Offset=\"1\" />\r\n                                    </LinearGradientBrush>\r\n                                </Path.Fill>\r\n                            </Path>\r\n                            <Path x:Name=\"BorderTransparency\" Margin=\"0.5\" Opacity=\"0.35\" Stretch=\"Fill\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"2.5\" Data=\"M20.747934,1.5 L52.092117,1.5 C52.250446,1.5000001 53.737717,2.7400134 53.737717,3.1673 L53.737717,25.5 C53.737717,27.709139 52.209141,29.5 50,29.5 L46.235802,29.5 C43.564945,33.395603 36.190704,43.5 31.75,43.5 C27.309294,43.5 19.935053,33.395603 17.2642,29.5 L13.5,29.5 C11.290861,29.5 9.5,27.709139 9.5,25.5 L9.5,10.805009 C9.5,4.6463528 15.468018,1.5000001 20.747934,1.5\"/>\r\n                            <Path x:Name=\"FocusVisual\" StrokeDashArray=\"1 2\" Margin=\"3,3,3,3\" Visibility=\"Collapsed\" Stretch=\"Fill\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\" Data=\"M20.747934,1.5 L52.092117,1.5 C52.250446,1.5000001 53.737717,2.7400134 53.737717,3.1673 L53.737717,25.5 C53.737717,27.709139 52.209141,29.5 50,29.5 L46.235802,29.5 C43.564945,33.395603 36.190704,43.5 31.75,43.5 C27.309294,43.5 19.935053,33.395603 17.2642,29.5 L13.5,29.5 C11.290861,29.5 9.5,27.709139 9.5,25.5 L9.5,10.805009 C9.5,4.6463528 15.468018,1.5000001 20.747934,1.5\"/>\r\n                            <Path x:Name=\"DisabledVisual\" Stretch=\"Fill\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"2\" Fill=\"#FFFFFFFF\" Opacity=\"0\" Data=\"M20.747934,1.5 L52.092117,1.5 C52.250446,1.5000001 53.737717,2.7400134 53.737717,3.1673 L53.737717,25.5 C53.737717,27.709139 52.209141,29.5 50,29.5 L46.235802,29.5 C43.564945,33.395603 36.190704,43.5 31.75,43.5 C27.309294,43.5 19.935053,33.395603 17.2642,29.5 L13.5,29.5 C11.290861,29.5 9.5,27.709139 9.5,25.5 L9.5,10.805009 C9.5,4.6463528 15.468018,1.5000001 20.747934,1.5\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- Slider -->\r\n    <Style x:Key=\"{x:Type Slider}\" TargetType=\"{x:Type Slider}\">\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"#FFA3AEB9\" Offset=\"0\"/>\r\n                    <GradientStop Color=\"#FF8399A9\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF718597\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF617584\" Offset=\"1\"/>\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Slider}\">\r\n                    <Grid x:Name=\"GridRoot\">\r\n                        <Grid.Resources>\r\n                            <ControlTemplate x:Key=\"RepeatButtonTemplate\">\r\n                                <Grid x:Name=\"Root\" Background=\"Transparent\" Opacity=\"0\"/>\r\n                            </ControlTemplate>\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Root\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\" MinHeight=\"{TemplateBinding MinHeight}\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n\r\n                        <Grid Width=\"Auto\" Height=\"3\" Grid.Row=\"1\">\r\n                            <Rectangle Height=\"3\" x:Name=\"TrackRectangle\" Fill=\"#FF888888\" RadiusX=\".5\" RadiusY=\".5\"/>\r\n                            <Rectangle Height=\"3\" x:Name=\"HorizontalTrackRectangleDisabledOverlay\" Opacity=\".55\" Visibility=\"Collapsed\" Fill=\"White\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                        </Grid>\r\n\r\n                        <Track Grid.Row=\"1\" x:Name=\"PART_Track\">\r\n                            <Track.Thumb>\r\n                                <Thumb Margin=\"0,0,0,0\" Background=\"{TemplateBinding Background}\" IsTabStop=\"True\" Height=\"20\" Width=\"20\" x:Name=\"HorizontalThumb\" Grid.Column=\"1\" Style=\"{StaticResource HorizontalThumbStyle}\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                    <Thumb.RenderTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform/>\r\n                                            <SkewTransform/>\r\n                                            <RotateTransform/>\r\n                                            <TranslateTransform Y=\"2\"/>\r\n                                        </TransformGroup>\r\n                                    </Thumb.RenderTransform>\r\n                                </Thumb>\r\n                            </Track.Thumb>\r\n                            <Track.IncreaseRepeatButton>\r\n                                <RepeatButton Command=\"Slider.IncreaseLarge\" Template=\"{StaticResource RepeatButtonTemplate}\"/>\r\n                            </Track.IncreaseRepeatButton>\r\n                            <Track.DecreaseRepeatButton>\r\n                                <RepeatButton Command=\"Slider.DecreaseLarge\" Template=\"{StaticResource RepeatButtonTemplate}\"/>\r\n                            </Track.DecreaseRepeatButton>\r\n                        </Track>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- ScrollBar -->\r\n    <Style x:Key=\"{x:Type ScrollBar}\" TargetType=\"{x:Type ScrollBar}\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"MinWidth\" Value=\"17\"/>\r\n        <Setter Property=\"MinHeight\" Value=\"17\"/>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ScrollBar}\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <Grid.Resources>\r\n                            <ControlTemplate x:Key=\"RepeatButtonTemplate\" TargetType=\"RepeatButton\">\r\n                                <Grid x:Name=\"Root\" Background=\"Transparent\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n\r\n                            <!--I'm not using the repeat buttons and that's why these templates are empty-->\r\n                            <ControlTemplate x:Key=\"HorizontalIncrementTemplate\" TargetType=\"RepeatButton\" />\r\n                            <ControlTemplate x:Key=\"HorizontalDecrementTemplate\" TargetType=\"RepeatButton\" />\r\n                            <ControlTemplate x:Key=\"VerticalIncrementTemplate\" TargetType=\"RepeatButton\" />\r\n                            <ControlTemplate x:Key=\"VerticalDecrementTemplate\" TargetType=\"RepeatButton\" />\r\n\r\n                            <!--Thumb templates-->\r\n                            <ControlTemplate x:Key=\"VerticalThumbTemplate\" TargetType=\"Thumb\">\r\n                                <Grid>\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <ColorAnimation Duration=\"0:0:0.1\" Storyboard.TargetName=\"LinearBevelDarkEnd\" Storyboard.TargetProperty=\"Color\" To=\"#9FFFFFFF\" />\r\n                                                    <ColorAnimation Duration=\"0:0:0\" Storyboard.TargetName=\"borderColor\" Storyboard.TargetProperty=\"Color\" To=\"#FF999999\" />\r\n                                                    <DoubleAnimation Duration=\"0:0:0\" Storyboard.TargetName=\"whiteBorder\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <ColorAnimation Duration=\"0:0:0.1\" Storyboard.TargetName=\"LinearBevelDarkEnd\" Storyboard.TargetProperty=\"Color\" To=\"#6FFFFFFF\" />\r\n                                                    <ColorAnimation Duration=\"0:0:0.1\" Storyboard.TargetName=\"borderColor\" Storyboard.TargetProperty=\"Color\" To=\"#FF999999\" />\r\n                                                    <DoubleAnimation Duration=\"0:0:0.1\" Storyboard.TargetName=\"whiteBorder\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\".7\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Rectangle x:Name=\"Background\" Margin=\".5\" RadiusX=\"2.5\" RadiusY=\"2.5\" Fill=\"{TemplateBinding Background}\" />\r\n                                    <Rectangle Margin=\"0\" RadiusX=\"2.5\" RadiusY=\"2.5\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\"/>\r\n                                    <Rectangle Margin=\"0\" RadiusX=\"2.5\" RadiusY=\"2.5\" StrokeThickness=\"1\">\r\n                                        <Rectangle.Fill>\r\n                                            <LinearGradientBrush StartPoint=\"0,0.5\" EndPoint=\"1,0.5\">\r\n                                                <GradientStop Color=\"#FCFFFFFF\" Offset=\"0\" />\r\n                                                <GradientStop Color=\"#F4FFFFFF\" Offset=\"0.35\" />\r\n                                                <GradientStop Color=\"#E0FFFFFF\" Offset=\"0.35\" />\r\n                                                <GradientStop x:Name=\"LinearBevelDarkEnd\" Color=\"#B2FFFFFF\" Offset=\"1\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Rectangle.Fill>\r\n                                        <Rectangle.Stroke>\r\n                                            <SolidColorBrush x:Name=\"borderColor\" Color=\"#FF999999\" />\r\n                                        </Rectangle.Stroke>\r\n                                    </Rectangle>\r\n                                    <Rectangle x:Name=\"whiteBorder\" Margin=\"1\"  RadiusX=\"2.5\" RadiusY=\"2.5\" StrokeThickness=\"1\" Stroke=\"White\" Fill=\"#00000000\" />\r\n                                    <Rectangle x:Name=\"DisabledOverlay\" Margin=\".5\" RadiusX=\"2.5\" RadiusY=\"2.5\" Fill=\"#FFFFFFFF\" Opacity=\"0\" />\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"HorizontalThumbTemplate\" TargetType=\"Thumb\">\r\n                                <Grid>\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <ColorAnimation Duration=\"0:0:0.1\" Storyboard.TargetName=\"LinearBevelDarkEnd\" Storyboard.TargetProperty=\"Color\" To=\"#9FFFFFFF\" />\r\n                                                    <ColorAnimation Duration=\"0:0:0\" Storyboard.TargetName=\"borderColor\" Storyboard.TargetProperty=\"Color\" To=\"#FF999999\" />\r\n                                                    <DoubleAnimation Duration=\"0:0:0\" Storyboard.TargetName=\"whiteBorder\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <ColorAnimation Duration=\"0:0:0.1\" Storyboard.TargetName=\"LinearBevelDarkEnd\" Storyboard.TargetProperty=\"Color\" To=\"#9FFFFFFF\" />\r\n                                                    <ColorAnimation Duration=\"0:0:0.1\" Storyboard.TargetName=\"borderColor\" Storyboard.TargetProperty=\"Color\" To=\"#ff999999\" />\r\n                                                    <DoubleAnimation Duration=\"0:0:0.1\" Storyboard.TargetName=\"whiteBorder\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\".7\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Rectangle x:Name=\"Background\" Margin=\".5\" RadiusX=\"2.5\" RadiusY=\"2.5\" Fill=\"{TemplateBinding Background}\" />\r\n                                    <Rectangle Margin=\"0\" RadiusX=\"2.5\" RadiusY=\"2.5\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\"/>\r\n                                    <Rectangle Margin=\"0\" RadiusX=\"2.5\" RadiusY=\"2.5\" StrokeThickness=\"1\">\r\n                                        <Rectangle.Fill>\r\n                                            <LinearGradientBrush StartPoint=\".5,0\" EndPoint=\".5,1\">\r\n                                                <GradientStop Color=\"#FCFFFFFF\" Offset=\"0\" />\r\n                                                <GradientStop Color=\"#F4FFFFFF\" Offset=\"0.35\" />\r\n                                                <GradientStop Color=\"#E0FFFFFF\" Offset=\"0.35\" />\r\n                                                <GradientStop x:Name=\"LinearBevelDarkEnd\" Color=\"#B2FFFFFF\" Offset=\"1\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Rectangle.Fill>\r\n                                        <Rectangle.Stroke>\r\n                                            <SolidColorBrush x:Name=\"borderColor\" Color=\"#FF999999\" />\r\n                                        </Rectangle.Stroke>\r\n                                    </Rectangle>\r\n                                    <Rectangle x:Name=\"whiteBorder\" Margin=\"1\"  RadiusX=\"2.5\" RadiusY=\"2.5\" StrokeThickness=\"1\" Stroke=\"White\" Fill=\"#00000000\" />\r\n                                    <Rectangle x:Name=\"DisabledOverlay\" Margin=\".5\" RadiusX=\"2.5\" RadiusY=\"2.5\" Fill=\"#FFFFFFFF\" Opacity=\"0\" />\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Root\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        \r\n                        <Grid x:Name=\"VerticalRoot\" Visibility=\"Visible\">\r\n                            <!--Start: Track-->\r\n                            <Border Background=\"#FFFFFFFF\" BorderThickness=\"1\" BorderBrush=\"#FFFFFFFF\"/>\r\n                            <Border Margin=\"0,0,0,1\" Background=\"{TemplateBinding Background}\" Opacity=\".1\"/>\r\n                            <!--End: Track-->\r\n\r\n                            <Track x:Name=\"PART_Track\" Orientation=\"Vertical\" IsDirectionReversed=\"true\">\r\n                                <Track.Thumb>\r\n                                    <Thumb Template=\"{StaticResource VerticalThumbTemplate}\" Background=\"{TemplateBinding Background}\" MinHeight=\"10\" x:Name=\"VerticalThumb\" />\r\n                                </Track.Thumb>\r\n                                <Track.IncreaseRepeatButton>\r\n                                    <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" x:Name=\"VerticalLargeIncrease\" Interval=\"50\" Command=\"ScrollBar.PageDownCommand\"/>\r\n                                </Track.IncreaseRepeatButton>\r\n                                <Track.DecreaseRepeatButton>\r\n                                    <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" x:Name=\"VerticalLargeDecrease\" Interval=\"50\" Command=\"ScrollBar.PageUpCommand\"/>\r\n                                </Track.DecreaseRepeatButton>\r\n                            </Track>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- ListBoxItem -->\r\n    <Style x:Key=\"{x:Type ListBoxItem}\" TargetType=\"{x:Type ListBoxItem}\">\r\n        <Setter Property=\"Padding\" Value=\"4\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Background\" Value=\"{StaticResource HoverBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource HoverBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"#FF333333\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListBoxItem}\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"BGColor3\" Storyboard.TargetProperty=\"Opacity\" Duration=\"0\" To=\"1\"/>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BGColor\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.4\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualState x:Name=\"Unselected\"/>\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BGColor2\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.6\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"Visibility\" Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Rectangle x:Name=\"BGColor2\" Fill=\"{TemplateBinding Background}\" StrokeThickness=\"0\" Opacity=\"0\"/>\r\n                        <Rectangle x:Name=\"BGColor3\" Fill=\"#FFFFFFFF\" StrokeThickness=\"0\" Opacity=\"0\"/>\r\n                        <Rectangle x:Name=\"BGColor\" Fill=\"{TemplateBinding Background}\" StrokeThickness=\"0\" Opacity=\"0\"/>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"contentPresenter\" />\r\n                        <Rectangle x:Name=\"FocusVisual\" Stroke=\"#BF313131\" Margin=\"1\" StrokeThickness=\"1\" StrokeDashArray=\"1 2\" StrokeDashCap=\"Square\" Visibility=\"Collapsed\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- ComboBoxItem -->\r\n    <Style x:Key=\"{x:Type ComboBoxItem}\" TargetType=\"{x:Type ComboBoxItem}\">\r\n        <Setter Property=\"Padding\" Value=\"4\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Background\" Value=\"{StaticResource HoverBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource HoverBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"#FF333333\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ComboBoxItem}\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"BGColor3\" Storyboard.TargetProperty=\"Opacity\" Duration=\"0\" To=\"1\"/>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BGColor\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.4\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualState x:Name=\"Unselected\"/>\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BGColor2\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.6\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"Visibility\" Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Rectangle x:Name=\"BGColor2\" Fill=\"{TemplateBinding Background}\" StrokeThickness=\"0\" Opacity=\"0\"/>\r\n                        <Rectangle x:Name=\"BGColor3\" Fill=\"#FFFFFFFF\" StrokeThickness=\"0\" Opacity=\"0\"/>\r\n                        <Rectangle x:Name=\"BGColor\" Fill=\"{TemplateBinding Background}\" StrokeThickness=\"0\" Opacity=\"0\"/>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" />\r\n                        <Rectangle x:Name=\"FocusVisual\" Stroke=\"#BF313131\" Margin=\"1\" StrokeThickness=\"1\" StrokeDashArray=\"1 2\" StrokeDashCap=\"Square\" Visibility=\"Collapsed\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n\r\n\r\n    <!-- ScrollViewer -->    \r\n    <Style x:Key=\"{x:Type ScrollViewer}\" TargetType=\"{x:Type ScrollViewer}\">\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Background\" Value=\"#FFFFFFFF\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"Padding\" Value=\"4\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"3\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ScrollViewer\">\r\n                    <Border BorderThickness=\"2.5,2.5,2.5,2.5\" CornerRadius=\"2.5\" BorderBrush=\"#FF888888\" x:Name=\"root\" Background=\"#FFFFFFFF\">\r\n                        <Grid x:Name=\"rootGrid\" Background=\"#FFFFFFFF\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"*\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <Border Height=\"Auto\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" Width=\"Auto\" BorderBrush=\"{StaticResource BaseColorBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"0.5,0.5,0.5,0.5\" x:Name=\"Line\" Opacity=\"0.5\"/>\r\n                            <Grid Grid.ColumnSpan=\"2\" Grid.RowSpan=\"2\" x:Name=\"Content\" Margin=\"2,2,2,2\">\r\n                                <ScrollContentPresenter Cursor=\"{TemplateBinding Cursor}\" Margin=\"1,1,19,17\" x:Name=\"ScrollContentPresenter\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                                <Rectangle Height=\"17\" HorizontalAlignment=\"Right\" Margin=\"0,0,0,0\" VerticalAlignment=\"Bottom\" Width=\"17\" Fill=\"{TemplateBinding Background}\" Opacity=\".1\"/>\r\n                                <ScrollBar IsTabStop=\"False\" HorizontalAlignment=\"Right\" Margin=\"0,0,0,17\" x:Name=\"PART_VerticalScrollBar\" Width=\"18\" Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Maximum=\"{TemplateBinding ScrollableHeight}\" Minimum=\"0\" Value=\"{TemplateBinding VerticalOffset}\" Orientation=\"Vertical\" ViewportSize=\"{TemplateBinding ViewportHeight}\"/>\r\n                                <ScrollBar IsTabStop=\"False\" Height=\"18\" Margin=\"0,0,17,0\" x:Name=\"PART_HorizontalScrollBar\" VerticalAlignment=\"Bottom\" Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Maximum=\"{TemplateBinding ScrollableWidth}\" Minimum=\"0\" Value=\"{TemplateBinding HorizontalOffset}\" Orientation=\"Horizontal\" ViewportSize=\"{TemplateBinding ViewportWidth}\"/>\r\n                            </Grid>\r\n                        </Grid>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- ListBox -->    \r\n    <Style x:Key=\"{x:Type ListBox}\" TargetType=\"{x:Type ListBox}\">\r\n        <Setter Property=\"Padding\" Value=\"1\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\"/>\r\n        <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\"/>\r\n        <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\"/>\r\n        <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"True\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListBox}\">\r\n                    <Border BorderThickness=\"0,0,0,0\" CornerRadius=\"0,0,0,0\">\r\n                        <ScrollViewer Background=\"{TemplateBinding Background}\" BorderBrush=\"Transparent\" BorderThickness=\"0\" Padding=\"{TemplateBinding Padding}\" x:Name=\"ScrollViewer\">\r\n                            <ItemsPresenter/>\r\n                        </ScrollViewer>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style TargetType=\"Expander\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Expander\">\r\n                    <Grid>\r\n                        <ContentPresenter />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/UXMusingsRed/Theme.xaml",
    "content": "﻿<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n\txmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\" \r\n\txmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" \r\n\txmlns:vsm=\"clr-namespace:System.Windows;assembly=WPFToolkit\"\r\n\tmc:Ignorable=\"d\">\r\n\r\n    <SolidColorBrush x:Key=\"WindowBackgroundBrush\" Color=\"#FF333333\" />\r\n    <SolidColorBrush x:Key=\"BaseColorBrush\" Color=\"#FF5B0000\"/>\r\n    <SolidColorBrush x:Key=\"BaseColorBrushFaint\" Color=\"#265B0000\"/>\r\n    <SolidColorBrush x:Key=\"ForegroundColorBrush\" Color=\"#FFFFFFFF\"/>\r\n    <SolidColorBrush x:Key=\"HoverBrush\" Color=\"#FF808000\"/>\r\n    <SolidColorBrush x:Key=\"HyperlinkBrush\" Color=\"#FFC8A1A1\"/>    \r\n\r\n<!-- Control Templates -->\r\n\r\n    <!-- Button -->\r\n    <Style x:Key=\"{x:Type Button}\" TargetType=\"{x:Type Button}\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundColorBrush}\" />\r\n        <Setter Property=\"Padding\" Value=\"4\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\"/>\r\n        <Setter Property=\"FontSize\" Value=\"12\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Button}\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BorderTransparency\" Storyboard.TargetProperty=\"(Shape.StrokeThickness)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"7\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BorderTransparency\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.35\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#CCFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BorderTransparency\" Storyboard.TargetProperty=\"(Shape.StrokeThickness)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"7\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ScalableBorder\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ScalableBorder\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#CCFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledVisual\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledVisual\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n\r\n                        <!-- Start:UI -->\r\n                        <Grid x:Name=\"ScalableBorder\" RenderTransformOrigin=\"0.5,0.5\">\r\n                            <Grid.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Grid.RenderTransform>\r\n                            <Path Stretch=\"Fill\" Stroke=\"{TemplateBinding Background}\" Data=\"M20.231335,0.5 L26.636795,0.5 L153.5,0.5 L162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 L163.5,35.943314 L163.5,41.943314 C163.5,53.542103 155.39055,59.5 143.3632,59.5 L140.3632,59.5 L10.499999,59.5 L1.5000005,59.5 C0.94771522,59.5 0.5,59.052284 0.5,58.5 L0.5,49.5 L0.5,23.056734 L0.5,18.056734 C0.5,7.0391827 9.4203978,0.4999994 20.636806,0.5\" StrokeThickness=\"3\" x:Name=\"BackColor\" Fill=\"{TemplateBinding Background}\"/>\r\n                            <Path Stretch=\"Fill\" Stroke=\"#FF888888\" Data=\"M20.231335,0.5 L26.636795,0.5 L153.5,0.5 L162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 L163.5,35.943314 L163.5,41.943314 C163.5,53.542103 155.39055,59.5 143.3632,59.5 L140.3632,59.5 L10.499999,59.5 L1.5000005,59.5 C0.94771522,59.5 0.5,59.052284 0.5,58.5 L0.5,49.5 L0.5,23.056734 L0.5,18.056734 C0.5,7.0391827 9.4203978,0.4999994 20.636806,0.5\" StrokeThickness=\"3\" x:Name=\"Background\">\r\n                                <Path.Fill>\r\n                                    <LinearGradientBrush StartPoint=\"0.7,0\" EndPoint=\"0.7,1\">\r\n                                        <GradientStop Color=\"#CCFFFFFF\" Offset=\"0\" />\r\n                                        <GradientStop Color=\"#AAFFFFFF\" Offset=\"0.285\" />\r\n                                        <GradientStop Color=\"#88FFFFFF\" Offset=\"0.285\" />\r\n                                        <GradientStop Color=\"#19FFFFFF\" Offset=\"1\" />\r\n                                    </LinearGradientBrush>\r\n                                </Path.Fill>\r\n                            </Path>\r\n                            <Path x:Name=\"BorderTransparency\" Stretch=\"Fill\" StrokeThickness=\"7\" Stroke=\"#FFFFFFFF\" Opacity=\"0.25\" Margin=\".5\" Data=\"M10.499999,0.5 L16.5,0.5 153.5,0.5 162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 163.5,43.499999 163.5,49.499999 C163.5,55.022846 159.02284,59.499999 153.5,59.499999 L150.5,59.499999 10.499999,59.499999 1.5000005,59.499999 C0.94771522,59.499999 0.5,59.052284 0.5,58.499999 L0.5,49.499999 0.5,15.499999 0.5,10.499999 C0.5,4.9771518 4.9771523,0.4999994 10.499999,0.5 z\"/>\r\n                            <ContentPresenter \r\n                                    x:Name=\"contentPresenter\" \r\n                                    Content=\"{TemplateBinding Content}\" \r\n                                    ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                                    Margin=\"{TemplateBinding Padding}\" \r\n                                    HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" \r\n                                    VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                            <Path x:Name=\"FocusVisual\" Stretch=\"Fill\" StrokeThickness=\"1\" Stroke=\"#BFFFFFFF\" StrokeDashCap=\"Square\" StrokeDashArray=\"1 2\" Margin=\"5\" Visibility=\"Collapsed\" Data=\"M10.499999,0.5 L16.5,0.5 153.5,0.5 162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 163.5,43.499999 163.5,49.499999 C163.5,55.022846 159.02284,59.499999 153.5,59.499999 L150.5,59.499999 10.499999,59.499999 1.5000005,59.499999 C0.94771522,59.499999 0.5,59.052284 0.5,58.499999 L0.5,49.499999 0.5,15.499999 0.5,10.499999 C0.5,4.9771518 4.9771523,0.4999994 10.499999,0.5 z\"/>\r\n                            <Path x:Name=\"DisabledVisual\" Stretch=\"Fill\" Fill=\"#FFFFFFFF\" StrokeThickness=\"3\" Stroke=\"#FFFFFFFF\" Visibility=\"Collapsed\" Data=\"M10.499999,0.5 L16.5,0.5 153.5,0.5 162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 163.5,43.499999 163.5,49.499999 C163.5,55.022846 159.02284,59.499999 153.5,59.499999 L150.5,59.499999 10.499999,59.499999 1.5000005,59.499999 C0.94771522,59.499999 0.5,59.052284 0.5,58.499999 L0.5,49.499999 0.5,15.499999 0.5,10.499999 C0.5,4.9771518 4.9771523,0.4999994 10.499999,0.5 z\" Opacity=\"0.55\"/>\r\n                        </Grid>\r\n                        <!-- End:UI -->\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- ToggleButton -->\r\n    <Style x:Key=\"{x:Type ToggleButton}\" TargetType=\"{x:Type ToggleButton}\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundColorBrush}\" />\r\n        <Setter Property=\"Padding\" Value=\"4\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\"/>\r\n        <Setter Property=\"FontSize\" Value=\"12\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BorderTransparency\" Storyboard.TargetProperty=\"(Shape.StrokeThickness)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"7\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BorderTransparency\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.35\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#CCFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BorderTransparency\" Storyboard.TargetProperty=\"(Shape.StrokeThickness)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"7\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ScalableBorder\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ScalableBorder\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#CCFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledVisual\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledVisual\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n\r\n                        <!-- Start:UI -->\r\n                        <Grid x:Name=\"ScalableBorder\" RenderTransformOrigin=\"0.5,0.5\">\r\n                            <Grid.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Grid.RenderTransform>\r\n                            <Path Stretch=\"Fill\" Stroke=\"{TemplateBinding Background}\" Data=\"M20.231335,0.5 L26.636795,0.5 L153.5,0.5 L162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 L163.5,35.943314 L163.5,41.943314 C163.5,53.542103 155.39055,59.5 143.3632,59.5 L140.3632,59.5 L10.499999,59.5 L1.5000005,59.5 C0.94771522,59.5 0.5,59.052284 0.5,58.5 L0.5,49.5 L0.5,23.056734 L0.5,18.056734 C0.5,7.0391827 9.4203978,0.4999994 20.636806,0.5\" StrokeThickness=\"3\" x:Name=\"BackColor\" Fill=\"{TemplateBinding Background}\"/>\r\n                            <Path Stretch=\"Fill\" Stroke=\"#FF888888\" Data=\"M20.231335,0.5 L26.636795,0.5 L153.5,0.5 L162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 L163.5,35.943314 L163.5,41.943314 C163.5,53.542103 155.39055,59.5 143.3632,59.5 L140.3632,59.5 L10.499999,59.5 L1.5000005,59.5 C0.94771522,59.5 0.5,59.052284 0.5,58.5 L0.5,49.5 L0.5,23.056734 L0.5,18.056734 C0.5,7.0391827 9.4203978,0.4999994 20.636806,0.5\" StrokeThickness=\"3\" x:Name=\"Background\">\r\n                                <Path.Fill>\r\n                                    <LinearGradientBrush StartPoint=\"0.7,0\" EndPoint=\"0.7,1\">\r\n                                        <GradientStop Color=\"#CCFFFFFF\" Offset=\"0\" />\r\n                                        <GradientStop Color=\"#AAFFFFFF\" Offset=\"0.285\" />\r\n                                        <GradientStop Color=\"#88FFFFFF\" Offset=\"0.285\" />\r\n                                        <GradientStop Color=\"#19FFFFFF\" Offset=\"1\" />\r\n                                    </LinearGradientBrush>\r\n                                </Path.Fill>\r\n                            </Path>\r\n                            <Path x:Name=\"BorderTransparency\" Stretch=\"Fill\" StrokeThickness=\"7\" Stroke=\"#FFFFFFFF\" Opacity=\"0.25\" Margin=\".5\" Data=\"M10.499999,0.5 L16.5,0.5 153.5,0.5 162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 163.5,43.499999 163.5,49.499999 C163.5,55.022846 159.02284,59.499999 153.5,59.499999 L150.5,59.499999 10.499999,59.499999 1.5000005,59.499999 C0.94771522,59.499999 0.5,59.052284 0.5,58.499999 L0.5,49.499999 0.5,15.499999 0.5,10.499999 C0.5,4.9771518 4.9771523,0.4999994 10.499999,0.5 z\"/>\r\n                            <ContentPresenter \r\n                                    x:Name=\"contentPresenter\" \r\n                                    Content=\"{TemplateBinding Content}\" \r\n                                    ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                                    Margin=\"{TemplateBinding Padding}\" \r\n                                    HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" \r\n                                    VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"/>\r\n                            <Path x:Name=\"FocusVisual\" Stretch=\"Fill\" StrokeThickness=\"1\" Stroke=\"#BFFFFFFF\" StrokeDashCap=\"Square\" StrokeDashArray=\"1 2\" Margin=\"5\" Visibility=\"Collapsed\" Data=\"M10.499999,0.5 L16.5,0.5 153.5,0.5 162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 163.5,43.499999 163.5,49.499999 C163.5,55.022846 159.02284,59.499999 153.5,59.499999 L150.5,59.499999 10.499999,59.499999 1.5000005,59.499999 C0.94771522,59.499999 0.5,59.052284 0.5,58.499999 L0.5,49.499999 0.5,15.499999 0.5,10.499999 C0.5,4.9771518 4.9771523,0.4999994 10.499999,0.5 z\"/>\r\n                            <Path x:Name=\"DisabledVisual\" Stretch=\"Fill\" Fill=\"#FFFFFFFF\" StrokeThickness=\"3\" Stroke=\"#FFFFFFFF\" Visibility=\"Collapsed\" Data=\"M10.499999,0.5 L16.5,0.5 153.5,0.5 162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 163.5,43.499999 163.5,49.499999 C163.5,55.022846 159.02284,59.499999 153.5,59.499999 L150.5,59.499999 10.499999,59.499999 1.5000005,59.499999 C0.94771522,59.499999 0.5,59.052284 0.5,58.499999 L0.5,49.499999 0.5,15.499999 0.5,10.499999 C0.5,4.9771518 4.9771523,0.4999994 10.499999,0.5 z\" Opacity=\"0.55\"/>\r\n                        </Grid>\r\n                        <!-- End:UI -->\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- TextBox -->\r\n    <Style x:Key=\"{x:Type TextBox}\" TargetType=\"{x:Type TextBox}\">\r\n        <Setter Property=\"Background\" Value=\"#FFFFFFFF\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\"/>\r\n        <Setter Property=\"FontSize\" Value=\"12\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type TextBox}\">\r\n                    <Grid x:Name=\"RootElement\" VerticalAlignment=\"Bottom\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ColorAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BackgroundBorder\" Storyboard.TargetProperty=\"(Border.BorderBrush).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#CCFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"HoverBorder\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledVisualElement\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ReadOnly\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"ContentElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n\r\n                        <Border x:Name=\"BackgroundBorder\" VerticalAlignment=\"Bottom\" BorderBrush=\"#FF888888\" CornerRadius=\"2.5\" BorderThickness=\"2.5\" Background=\"#FFFFFFFF\" HorizontalAlignment=\"Stretch\">\r\n                            <Grid>\r\n                                <Border Margin=\"-1,-1,0,0\" CornerRadius=\"2\"  BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"2,2,2,2\" Background=\"{x:Null}\" VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" x:Name=\"Line\" Opacity=\"0.5\"/>\r\n                                <Border x:Name=\"InnerBorder\" Margin=\"-1,-1,0,0\" CornerRadius=\"2\" BorderThickness=\"2,2,2,2\" Background=\"#FFFFFFFF\" VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" BorderBrush=\"{x:Null}\">\r\n                                    <Grid VerticalAlignment=\"Stretch\">\r\n                                        <ScrollViewer x:Name=\"PART_ContentHost\" BorderThickness=\"0\" IsTabStop=\"False\"/>\r\n                                        <Border x:Name=\"HoverBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" Opacity=\".2\" BorderThickness=\"2,2,2,2\" Visibility=\"Collapsed\" Margin=\"-1,-1,0,0\"/>\r\n                                        <Rectangle x:Name=\"FocusVisual\" RadiusX=\"1\" RadiusY=\"1\" Margin=\"1,1,1,1\" Stroke=\"#BF313131\" StrokeDashArray=\"1 2\" StrokeThickness=\"1\" Opacity=\"0\" StrokeDashCap=\"Square\" IsHitTestVisible=\"false\" />\r\n                                    </Grid>\r\n                                </Border>\r\n                            </Grid>\r\n                        </Border>\r\n\r\n                        <Border x:Name=\"DisabledVisualElement\" BorderBrush=\"#FFFFFFFF\" CornerRadius=\"2.5\" BorderThickness=\"2.5\" Background=\"#FFFFFFFF\" Margin=\"0,0,0,0\" Opacity=\"0.55\" Visibility=\"Collapsed\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- CheckBox -->\r\n    <Style x:Key=\"{x:Type CheckBox}\" TargetType=\"{x:Type CheckBox}\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"#FFBBBBBB\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\"/>\r\n        <Setter Property=\"FontSize\" Value=\"12\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\"/>\r\n        <Setter Property=\"Padding\" Value=\"6,1,0,0\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type CheckBox}\">\r\n                    <Grid>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"16\"/>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Border\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#FFFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Border\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#FFFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Border\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"CheckVisualGrid\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"CheckVisualGrid\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledVisual\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BoxBackground\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"InnerBoxBackground\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"CheckPunch\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\"/>\r\n                                <VisualState x:Name=\"Indeterminate\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BoxBackground\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"InnerBoxBackground\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"IndeterminatePunch\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledVisual\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid Grid.Column=\"0\" Width=\"15\" Height=\"15\" x:Name=\"CheckVisualGrid\" RenderTransformOrigin=\"0.5,0.5\" HorizontalAlignment=\"Left\">\r\n                            <Grid.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Grid.RenderTransform>\r\n                            <Path x:Name=\"BoxBackground\" Stretch=\"Fill\" Fill=\"{TemplateBinding Background}\" Stroke=\"#FF888888\" StrokeThickness=\"1.5\" Data=\"M34.859547,0.5 L41.265007,0.5 L153.5,0.5 L162.5,0.5 C163.05229,0.4999994 163.5,3.2169452 163.5,3.7692311 L163.5,10.499999 L163.5,35.943314 L163.5,41.943314 C163.5,53.542103 143.64745,59.5 128.73494,59.5 L125.73496,59.5 L10.499999,59.5 L1.5000005,59.5 C0.94771522,59.5 0.5,56.783058 0.5,56.230774 L0.5,49.5 L0.5,23.056734 L0.5,18.056734 C0.5,7.0391827 18.262821,0.4999994 35.265018,0.5\"/>\r\n                            <Path x:Name=\"InnerBoxBackground\" Stretch=\"Fill\" Fill=\"#59FFFFFF\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"0.65\" Margin=\"4,4,4,4\" Data=\"M27.023003,0.5 L33.428463,0.5 L142.18057,0.5 L162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 L163.5,35.943314 L163.5,41.943314 C163.5,53.542103 148.59889,59.5 136.57155,59.5 L133.57155,59.5 L21.819443,59.5 L1.5000005,59.5 C0.94771522,59.5 0.5,59.052284 0.5,58.5 L0.5,49.5 L0.5,23.056734 L0.5,18.056734 C0.5,7.0391827 16.212063,0.4999994 27.428474,0.5\" Opacity=\"1\"/>\r\n                            <Path x:Name=\"IndeterminatePunch\" Stretch=\"Fill\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\" Opacity=\"0\" Margin=\"0.5,0.5,0.5,0.5\" Data=\"M5.0955529,4.2793331 C4.567708,4.2793331 4.2793331,4.9282775 4.2793331,6.1620564 L4.2793331,6.721972 L4.2793331,9.6831694 C4.2793331,9.6831694 4.2558069,10.573813 4.2782001,10.573833 L9.833333,10.562499 L9.9549341,10.562499 C10.593154,10.562499 10.771154,10.124483 10.771154,8.8256149 L10.771154,8.153717 L10.771154,5.3044972 C10.771154,5.3044972 10.753014,4.2680192 10.73062,4.2680001 L5.020833,4.2793331 M2.6060028,1 L3.0845296,1 L13.202454,1 L13.920245,1 C13.964306,1.0000378 14,1.0986724 14,1.2203391 L14,3.2033896 L14,8.8095436 L14,10.131577 C14,12.687243 13.353233,14 12.393997,14 L12.154734,14 L1.7975459,14 L1.0797546,14 C1.0356936,13.999962 1,13.901327 1,13.779661 L1,11.79661 L1,5.9701281 L1,4.868433 C1,2.4408369 1.7114427,0.99999988 2.6060028,1\" Fill=\"{TemplateBinding Background}\"/>\r\n                            <Path x:Name=\"CheckPunch\" Stretch=\"Fill\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"0.85\" Opacity=\"0\" Data=\"M3.7890608,3.714 L3.1559999,4.3821225 5.4124908,6.9780746 3.2708275,9.4536371 4.0477991,10.273244 5.4861608,10.273244 7.0000672,8.4968786 8.2457905,10.286 9.9515781,10.273244 10.728172,9.4536371 8.5868788,6.9780746 10.843,4.3821225 10.20994,3.714 8.4837542,3.714 6.9690933,5.5437827 5.5156231,3.714 3.7890608,3.714 z M3.5593879,1 L4.0011048,1 12.263804,1 12.926381,1 C12.967042,1.000037 13,1.5526028 13,1.6649284 L13,3.0338981 13,8.2088089 13,9.4291487 C13,11.788224 11.538463,13 10.440609,13 L10.219752,13 1.7361963,13 1.0736196,13 C1.0329584,12.999962 1,12.447397 1,12.335073 L1,10.966102 1,5.58781 1,4.5708609 C1,2.3300033 2.3076925,0.99999982 3.5593879,1 z\" Margin=\"0.5,0.5,0.5,0.5\" Fill=\"{TemplateBinding Background}\"/>\r\n                            <Path x:Name=\"Border\" Stretch=\"Fill\" Stroke=\"#FF888888\" StrokeThickness=\"1.5\" Opacity=\"1\" Data=\"M34.859547,0.5 L41.265007,0.5 L153.5,0.5 L162.5,0.5 C163.05229,0.4999994 163.5,3.5951502 163.5,4.1474361 L163.5,10.499999 L163.5,35.943314 L163.5,41.943314 C163.5,53.542103 146.78206,59.5 128.73494,59.5 L125.73496,59.5 L10.499999,59.5 L1.5000005,59.5 C0.94771522,59.5 0.5,56.404854 0.5,55.85257 L0.5,49.5 L0.5,23.056734 L0.5,18.056734 C0.5,7.0391827 20.352564,0.4999994 35.265018,0.5\"/>\r\n                        </Grid>\r\n                        <ContentPresenter Grid.Column=\"1\" \r\n                                x:Name=\"contentPresenter\" \r\n                                Margin=\"{TemplateBinding Padding}\"\r\n                                HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" \r\n                                VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" \r\n                                Content=\"{TemplateBinding Content}\" \r\n                                ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                        <Rectangle x:Name=\"FocusVisual\" RadiusX=\"1\" RadiusY=\"1\" Grid.Column=\"1\" Stroke=\"#BF999999\" StrokeThickness=\"1\" StrokeDashCap=\"Square\" StrokeDashArray=\"1 2\" Margin=\"2,-1,-2,-1\" Visibility=\"Collapsed\" IsHitTestVisible=\"false\"/>\r\n                        <Path x:Name=\"DisabledVisual\" Stretch=\"Fill\" Fill=\"#FFFFFFFF\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"2\" Data=\"M34.859547,0.5 L41.265007,0.5 L153.5,0.5 L162.5,0.5 C163.05229,0.4999994 163.5,3.2169452 163.5,3.7692311 L163.5,10.499999 L163.5,35.943314 L163.5,41.943314 C163.5,53.542103 143.64745,59.5 128.73494,59.5 L125.73496,59.5 L10.499999,59.5 L1.5000005,59.5 C0.94771522,59.5 0.5,56.783058 0.5,56.230774 L0.5,49.5 L0.5,23.056734 L0.5,18.056734 C0.5,7.0391827 18.262821,0.4999994 35.265018,0.5\" HorizontalAlignment=\"Left\" Width=\"15\" Opacity=\"0.55\" Height=\"15\" Visibility=\"Collapsed\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- RadioButton -->\r\n    <Style x:Key=\"{x:Type RadioButton}\" TargetType=\"{x:Type RadioButton}\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"#FFBBBBBB\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\"/>\r\n        <Setter Property=\"FontSize\" Value=\"12\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\"/>\r\n        <Setter Property=\"Padding\" Value=\"6,1,0,0\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type RadioButton}\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Border\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#FFFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Border\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#FFFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"CheckVisualGrid\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"CheckVisualGrid\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledVisual\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"EllipseBackgroundInner\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"EllipseBackground\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"CheckedPunch\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\"/>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"*\" />\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid Grid.Column=\"0\" Width=\"15\" Height=\"15\" x:Name=\"CheckVisualGrid\" RenderTransformOrigin=\"0.5,0.5\" HorizontalAlignment=\"Left\">\r\n                            <Grid.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Grid.RenderTransform>\r\n                            <Ellipse x:Name=\"EllipseBackground\" Height=\"15\" Width=\"15\" Stretch=\"Fill\" StrokeThickness=\"1.5\" Stroke=\"#FF888888\" Fill=\"{TemplateBinding Background}\" VerticalAlignment=\"Center\" RenderTransformOrigin=\"0.5,0.5\" />\r\n                            <Ellipse x:Name=\"EllipseBackgroundInner\" Height=\"7\" Width=\"7\" StrokeThickness=\"0.65\" Stroke=\"#FFFFFFFF\" Fill=\"#59FFFFFF\" VerticalAlignment=\"Stretch\" RenderTransformOrigin=\"0.5,0.5\" />\r\n                            <Path x:Name=\"CheckedPunch\" Height=\"13\" Width=\"13\" Stretch=\"Fill\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\" Data=\"M7,3.5 C5.0670035,3.5 3.5,5.0670035 3.5,7 3.5,8.9329967 5.0670035,10.5 7,10.5 C8.9329967,10.5 10.5,8.9329967 10.5,7 C10.5,5.0670035 8.9329967,3.5 7,3.5 z M7,0.5 C10.589851,0.5 13.5,3.4101491 13.5,7 C13.5,10.589851 10.589851,13.5 7,13.5 3.4101491,13.5 0.5,10.589851 0.5,7 0.5,3.4101491 3.4101491,0.5 7,0.5 z\" Margin=\".5\" Opacity=\"0\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"{TemplateBinding Background}\" />\r\n                            <Ellipse x:Name=\"Border\" Height=\"15\" Width=\"15\" Stretch=\"Fill\" StrokeThickness=\"1.5\" Stroke=\"#FF888888\" VerticalAlignment=\"Center\" RenderTransformOrigin=\"0.5,0.5\" />\r\n                        </Grid>\r\n                        <ContentPresenter Grid.Column=\"1\" \r\n                                x:Name=\"contentPresenter\" \r\n                                HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" \r\n                                Margin=\"{TemplateBinding Padding}\" \r\n                                VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" \r\n                                Content=\"{TemplateBinding Content}\" \r\n                                ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                        <Rectangle x:Name=\"FocusVisual\" RadiusX=\"1\" RadiusY=\"1\" Grid.Column=\"1\" Stroke=\"#BF999999\" StrokeThickness=\"1\" StrokeDashCap=\"Square\" StrokeDashArray=\"1 2\" Margin=\"2,-1,-2,-1\" Visibility=\"Collapsed\" IsHitTestVisible=\"false\"/>\r\n                        <Ellipse x:Name=\"DisabledVisual\" StrokeThickness=\"1\"  Stroke=\"#FFFFFFFF\"  Fill=\"#FFFFFFFF\" VerticalAlignment=\"Center\" Opacity=\"0.55\" Width=\"15\" Height=\"15\" Visibility=\"Collapsed\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- ProgressBar -->\r\n    <Style x:Key=\"{x:Type ProgressBar}\" TargetType=\"{x:Type ProgressBar}\">\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"Background\" Value=\"#FFD2D5D8\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"2\"/>\r\n        <Setter Property=\"Maximum\" Value=\"100\"/>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"#FF888888\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ProgressBar}\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <Border x:Name=\"PART_Track\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\"/>\r\n                        <Grid x:Name=\"ProgressBarRootGrid\">\r\n                            <Rectangle Margin=\"{TemplateBinding BorderThickness}\" x:Name=\"ProgressBarRootGradient\" Canvas.ZIndex=\"1\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\" RadiusX=\"1.5\" RadiusY=\"1.5\">\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush EndPoint=\".7,1\" StartPoint=\".7,0\">\r\n                                        <GradientStop Color=\"#B2FFFFFF\" Offset=\"0\"/>\r\n                                        <GradientStop Color=\"#C6FFFFFF\" Offset=\"0.15\"/>\r\n                                        <GradientStop Color=\"#D1FFFFFF\" Offset=\"0.275\"/>\r\n                                        <GradientStop Color=\"#C6FFFFFF\" Offset=\"0.4\"/>\r\n                                        <GradientStop Color=\"#BFFFFFFF\" Offset=\"0.65\"/>\r\n                                        <GradientStop Color=\"#A5FFFFFF\" Offset=\"0.75\"/>\r\n                                        <GradientStop Color=\"#91FFFFFF\" Offset=\"0.85\"/>\r\n                                        <GradientStop Color=\"#72FFFFFF\" Offset=\"1\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                            <Grid x:Name=\"IndeterminateRoot\" Visibility=\"Collapsed\">\r\n                                <Rectangle Margin=\"{TemplateBinding BorderThickness}\" x:Name=\"IndeterminateSolidFill\" Opacity=\"1\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"{TemplateBinding Foreground}\" Stroke=\"#FF448DCA\" StrokeThickness=\"0\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                <Rectangle Margin=\"{TemplateBinding BorderThickness}\" x:Name=\"IndeterminateGradientFill\" Opacity=\"0.7\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\">\r\n                                    <Rectangle.Fill>\r\n                                        <LinearGradientBrush EndPoint=\"0,1\" StartPoint=\"20,1\" MappingMode=\"Absolute\" SpreadMethod=\"Repeat\">\r\n                                            <LinearGradientBrush.Transform>\r\n                                                <TransformGroup>\r\n                                                    <TranslateTransform X=\"0\"/>\r\n                                                    <SkewTransform AngleX=\"-30\"/>\r\n                                                </TransformGroup>\r\n                                            </LinearGradientBrush.Transform>\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#00FFFFFF\" Offset=\".25\"/>\r\n                                            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0.85\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Rectangle.Fill>\r\n                                </Rectangle>\r\n                            </Grid>\r\n                            <Grid Margin=\"1\" x:Name=\"DeterminateRoot\">\r\n                                <Rectangle HorizontalAlignment=\"Left\" Margin=\"{TemplateBinding BorderThickness}\" x:Name=\"PART_Indicator\" Fill=\"{TemplateBinding Foreground}\" StrokeThickness=\"0.5\" RadiusX=\"1.5\" RadiusY=\"1.5\"/>\r\n                            </Grid>\r\n                        </Grid>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <Trigger Property=\"IsIndeterminate\" Value=\"True\">\r\n                            <Trigger.EnterActions>\r\n                                <BeginStoryboard>\r\n                                    <Storyboard RepeatBehavior=\"Forever\">\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00\" Storyboard.TargetName=\"IndeterminateRoot\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00\" Storyboard.TargetName=\"DeterminateRoot\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Collapsed</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"IndeterminateGradientFill\" Storyboard.TargetProperty=\"(Shape.Fill).(LinearGradientBrush.Transform).(TransformGroup.Children)[0].X\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:.5\" Value=\"20\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"IndeterminateGradientFill\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.SpreadMethod)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GradientSpreadMethod>Repeat</GradientSpreadMethod>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00.5000000\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <GradientSpreadMethod>Repeat</GradientSpreadMethod>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </BeginStoryboard>\r\n                            </Trigger.EnterActions>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- ComboBox -->\r\n    <Style x:Key=\"{x:Type ComboBox}\" TargetType=\"{x:Type ComboBox}\">\r\n        <Setter Property=\"Padding\" Value=\"14,2,34,2\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundColorBrush}\" />\r\n        <Setter Property=\"FontFamily\" Value=\"Trebuchet MS\"/>\r\n        <Setter Property=\"FontSize\" Value=\"12\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ComboBox}\">\r\n                    <Grid>\r\n                        <Grid.Resources>\r\n                            <Style TargetType=\"ToggleButton\" x:Name=\"comboToggleStyle\">\r\n                                <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n                                <Setter Property=\"Foreground\" Value=\"#FFFFFFFF\" />\r\n                                <Setter Property=\"Padding\" Value=\"4\"/>\r\n                                <Setter Property=\"Template\">\r\n                                    <Setter.Value>\r\n                                        <ControlTemplate TargetType=\"ToggleButton\">\r\n                                            <Grid>\r\n                                                <VisualStateManager.VisualStateGroups>\r\n                                                    <VisualStateGroup x:Name=\"CommonStates\">\r\n                                                        <VisualStateGroup.Transitions>\r\n                                                            <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"MouseOver\"/>\r\n                                                            <VisualTransition GeneratedDuration=\"00:00:00.1\" To=\"Pressed\"/>\r\n                                                        </VisualStateGroup.Transitions>\r\n                                                        <VisualState x:Name=\"Normal\"/>\r\n                                                        <VisualState x:Name=\"MouseOver\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BorderTransparency\" Storyboard.TargetProperty=\"(Shape.StrokeThickness)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"7\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BorderTransparency\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.35\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                                <ColorAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BackgroundStroke\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\">\r\n                                                                    <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#CCFFFFFF\"/>\r\n                                                                </ColorAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Pressed\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"BorderTransparency\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.35\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ScalableBorder\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"ScalableBorder\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                                <ColorAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BackgroundStroke\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\">\r\n                                                                    <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#CCFFFFFF\"/>\r\n                                                                </ColorAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Disabled\">\r\n                                                            <Storyboard>\r\n                                                                <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledVisual\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                                                    <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                                        <DiscreteObjectKeyFrame.Value>\r\n                                                                            <Visibility>Visible</Visibility>\r\n                                                                        </DiscreteObjectKeyFrame.Value>\r\n                                                                    </DiscreteObjectKeyFrame>\r\n                                                                </ObjectAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                    </VisualStateGroup>\r\n                                                    <VisualStateGroup x:Name=\"CheckStates\">\r\n                                                        <VisualState x:Name=\"Checked\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                                <ColorAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                                    <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#FFFFFFFF\"/>\r\n                                                                </ColorAnimationUsingKeyFrames>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Offset)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.671\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Offset)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.225\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Offset)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.215\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                                <ColorAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                                                    <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#99FFFFFF\"/>\r\n                                                                </ColorAnimationUsingKeyFrames>\r\n                                                                <ColorAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                                    <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#EEFFFFFF\"/>\r\n                                                                </ColorAnimationUsingKeyFrames>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.8\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Unchecked\"/>\r\n                                                        <VisualState x:Name=\"Indeterminate\">\r\n                                                            <Storyboard>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                                <ColorAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)\">\r\n                                                                    <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#FFFFFFFF\"/>\r\n                                                                </ColorAnimationUsingKeyFrames>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Offset)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.671\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Offset)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.225\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Offset)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.215\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                                <ColorAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)\">\r\n                                                                    <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#99FFFFFF\"/>\r\n                                                                </ColorAnimationUsingKeyFrames>\r\n                                                                <ColorAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)\">\r\n                                                                    <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#EEFFFFFF\"/>\r\n                                                                </ColorAnimationUsingKeyFrames>\r\n                                                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.8\"/>\r\n                                                                </DoubleAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                    </VisualStateGroup>\r\n                                                    <VisualStateGroup x:Name=\"FocusStates\">\r\n                                                        <VisualState x:Name=\"Focused\">\r\n                                                            <Storyboard>\r\n                                                                <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                                                    <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                                        <DiscreteObjectKeyFrame.Value>\r\n                                                                            <Visibility>Visible</Visibility>\r\n                                                                        </DiscreteObjectKeyFrame.Value>\r\n                                                                    </DiscreteObjectKeyFrame>\r\n                                                                </ObjectAnimationUsingKeyFrames>\r\n                                                            </Storyboard>\r\n                                                        </VisualState>\r\n                                                        <VisualState x:Name=\"Unfocused\"/>\r\n                                                    </VisualStateGroup>\r\n                                                </VisualStateManager.VisualStateGroups>\r\n\r\n                                                <!-- Start:UI -->\r\n                                                <Grid x:Name=\"ScalableBorder\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                                    <Grid.RenderTransform>\r\n                                                        <TransformGroup>\r\n                                                            <ScaleTransform/>\r\n                                                            <SkewTransform/>\r\n                                                            <RotateTransform/>\r\n                                                            <TranslateTransform/>\r\n                                                        </TransformGroup>\r\n                                                    </Grid.RenderTransform>\r\n                                                    <Path Stretch=\"Fill\" Stroke=\"{TemplateBinding Background}\" Data=\"M20.231335,0.5 L26.636795,0.5 L153.5,0.5 L162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 L163.5,35.943314 L163.5,41.943314 C163.5,53.542103 155.39055,59.5 143.3632,59.5 L140.3632,59.5 L10.499999,59.5 L1.5000005,59.5 C0.94771522,59.5 0.5,59.052284 0.5,58.5 L0.5,49.5 L0.5,23.056734 L0.5,18.056734 C0.5,7.0391827 9.4203978,0.4999994 20.636806,0.5\" StrokeThickness=\"3\" x:Name=\"BackColor\" Fill=\"{TemplateBinding Background}\"/>\r\n                                                    <Path Stretch=\"Fill\" Stroke=\"#FF888888\" Data=\"M20.231335,0.5 L26.636795,0.5 L153.5,0.5 L162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 L163.5,35.943314 L163.5,41.943314 C163.5,53.542103 155.39055,59.5 143.3632,59.5 L140.3632,59.5 L10.499999,59.5 L1.5000005,59.5 C0.94771522,59.5 0.5,59.052284 0.5,58.5 L0.5,49.5 L0.5,23.056734 L0.5,18.056734 C0.5,7.0391827 9.4203978,0.4999994 20.636806,0.5\" StrokeThickness=\"3\" x:Name=\"Background\">\r\n                                                        <Path.Fill>\r\n                                                            <LinearGradientBrush StartPoint=\"0.7,0\" EndPoint=\"0.7,1\">\r\n                                                                <GradientStop Color=\"#CCFFFFFF\" Offset=\"0\" />\r\n                                                                <GradientStop Color=\"#AAFFFFFF\" Offset=\"0.285\" />\r\n                                                                <GradientStop Color=\"#88FFFFFF\" Offset=\"0.285\" />\r\n                                                                <GradientStop Color=\"#19FFFFFF\" Offset=\"1\" />\r\n                                                            </LinearGradientBrush>\r\n                                                        </Path.Fill>\r\n                                                    </Path>\r\n                                                    <Path Stretch=\"Fill\" Stroke=\"#FF888888\" Data=\"M20.231335,0.5 L26.636795,0.5 L153.5,0.5 L162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 L163.5,35.943314 L163.5,41.943314 C163.5,53.542103 155.39055,59.5 143.3632,59.5 L140.3632,59.5 L10.499999,59.5 L1.5000005,59.5 C0.94771522,59.5 0.5,59.052284 0.5,58.5 L0.5,49.5 L0.5,23.056734 L0.5,18.056734 C0.5,7.0391827 9.4203978,0.4999994 20.636806,0.5\" StrokeThickness=\"3\" x:Name=\"BackgroundStroke\"/>\r\n                                                    <Path x:Name=\"BorderTransparency\" Stretch=\"Fill\" StrokeThickness=\"7\" Stroke=\"#FFFFFFFF\" Opacity=\"0.25\" Margin=\".5\" Data=\"M10.499999,0.5 L16.5,0.5 153.5,0.5 162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 163.5,43.499999 163.5,49.499999 C163.5,55.022846 159.02284,59.499999 153.5,59.499999 L150.5,59.499999 10.499999,59.499999 1.5000005,59.499999 C0.94771522,59.499999 0.5,59.052284 0.5,58.499999 L0.5,49.499999 0.5,15.499999 0.5,10.499999 C0.5,4.9771518 4.9771523,0.4999994 10.499999,0.5 z\"/>\r\n                                                    <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"contentPresenter\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                                                    <Path x:Name=\"FocusVisual\" Stretch=\"Fill\" StrokeThickness=\"1\" Stroke=\"#BFFFFFFF\" StrokeDashCap=\"Square\"  StrokeDashArray=\"1 2\" Margin=\"5\" Visibility=\"Collapsed\" Data=\"M10.499999,0.5 L16.5,0.5 153.5,0.5 162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 163.5,43.499999 163.5,49.499999 C163.5,55.022846 159.02284,59.499999 153.5,59.499999 L150.5,59.499999 10.499999,59.499999 1.5000005,59.499999 C0.94771522,59.499999 0.5,59.052284 0.5,58.499999 L0.5,49.499999 0.5,15.499999 0.5,10.499999 C0.5,4.9771518 4.9771523,0.4999994 10.499999,0.5 z\"/>\r\n                                                    <Path x:Name=\"DisabledVisual\" Stretch=\"Fill\" Fill=\"#FFFFFFFF\" StrokeThickness=\"3\" Stroke=\"#FFFFFFFF\" Visibility=\"Collapsed\" Data=\"M10.499999,0.5 L16.5,0.5 153.5,0.5 162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 163.5,43.499999 163.5,49.499999 C163.5,55.022846 159.02284,59.499999 153.5,59.499999 L150.5,59.499999 10.499999,59.499999 1.5000005,59.499999 C0.94771522,59.499999 0.5,59.052284 0.5,58.499999 L0.5,49.499999 0.5,15.499999 0.5,10.499999 C0.5,4.9771518 4.9771523,0.4999994 10.499999,0.5 z\" Opacity=\"0.55\"/>\r\n                                                </Grid>\r\n                                                <!-- End:UI -->\r\n                                            </Grid>\r\n                                        </ControlTemplate>\r\n                                    </Setter.Value>\r\n                                </Setter>\r\n                            </Style>\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard/>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                                <VisualState x:Name=\"FocusedDropDown\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"00:00:00\" Storyboard.TargetName=\"PopupBorder\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Border x:Name=\"ContentPresenterBorder\">\r\n                            <Grid>\r\n\r\n\r\n\r\n                                <ToggleButton Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" HorizontalContentAlignment=\"Right\" HorizontalAlignment=\"Stretch\" Margin=\"0\" x:Name=\"DropDownToggle\" Style=\"{DynamicResource comboToggleStyle}\" VerticalAlignment=\"Stretch\" IsChecked=\"{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" ClickMode=\"Press\">\r\n                                    <StackPanel Height=\"Auto\" Width=\"Auto\" Orientation=\"Horizontal\">\r\n                                        <Rectangle Height=\"10\" Width=\"1\" Fill=\"#3FFFFFFF\" Stroke=\"#FF000000\" StrokeThickness=\"0\" Margin=\"0,0,0,0\"/>\r\n                                        <Rectangle Height=\"10\" Width=\"1\" Fill=\"#7FFFFFFF\" Stroke=\"#FF000000\" StrokeThickness=\"0\" Margin=\"0,0,6,0\"/>\r\n                                        <Path Height=\"5\" x:Name=\"BtnArrow\" Width=\"8\" Stretch=\"Uniform\" Data=\"F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z \" Fill=\"{TemplateBinding Foreground}\" Margin=\"0,0,8,0\"/>\r\n                                    </StackPanel>\r\n                                </ToggleButton>\r\n                                <ContentPresenter HorizontalAlignment=\"Left\" Margin=\"3,3,23,3\" x:Name=\"ContentSite\" VerticalAlignment=\"Center\" Content=\"{TemplateBinding SelectionBoxItem}\" ContentTemplate=\"{TemplateBinding SelectionBoxItemTemplate}\" ContentTemplateSelector=\"{TemplateBinding ItemTemplateSelector}\" IsHitTestVisible=\"False\"/>\r\n                                <!--<ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"ContentPresenter\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\">\r\n                                </ContentPresenter>-->\r\n                            </Grid>\r\n                        </Border>\r\n                        <Path x:Name=\"FocusVisualElement\" Stretch=\"Fill\" StrokeThickness=\"1\" Stroke=\"#BFFFFFFF\" StrokeDashCap=\"Square\"  StrokeDashArray=\"1 2\" Margin=\"5\" Visibility=\"Collapsed\" Data=\"M10.499999,0.5 L16.5,0.5 153.5,0.5 162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 163.5,43.499999 163.5,49.499999 C163.5,55.022846 159.02284,59.499999 153.5,59.499999 L150.5,59.499999 10.499999,59.499999 1.5000005,59.499999 C0.94771522,59.499999 0.5,59.052284 0.5,58.499999 L0.5,49.499999 0.5,15.499999 0.5,10.499999 C0.5,4.9771518 4.9771523,0.4999994 10.499999,0.5 z\"/>\r\n                        <Path x:Name=\"DisabledVisualElement\" Stretch=\"Fill\" Fill=\"#FFFFFFFF\" StrokeThickness=\"3\" Stroke=\"#FFFFFFFF\" Visibility=\"Collapsed\" Data=\"M10.499999,0.5 L16.5,0.5 153.5,0.5 162.5,0.5 C163.05229,0.4999994 163.5,0.94771463 163.5,1.5000005 L163.5,10.499999 163.5,43.499999 163.5,49.499999 C163.5,55.022846 159.02284,59.499999 153.5,59.499999 L150.5,59.499999 10.499999,59.499999 1.5000005,59.499999 C0.94771522,59.499999 0.5,59.052284 0.5,58.499999 L0.5,49.499999 0.5,15.499999 0.5,10.499999 C0.5,4.9771518 4.9771523,0.4999994 10.499999,0.5 z\" Opacity=\"0.55\"/>\r\n                        <Popup IsOpen=\"{TemplateBinding IsDropDownOpen}\" Placement=\"Bottom\" x:Name=\"Popup\" Focusable=\"False\" AllowsTransparency=\"True\" PopupAnimation=\"Slide\">\r\n                            <Grid MaxHeight=\"{TemplateBinding MaxDropDownHeight}\" MinWidth=\"{TemplateBinding ActualWidth}\" x:Name=\"DropDown\" SnapsToDevicePixels=\"True\">\r\n\r\n                                <Border Height=\"Auto\" HorizontalAlignment=\"Stretch\" x:Name=\"PopupBorder\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"5,5,5,5\" BorderBrush=\"#FF888888\" Background=\"#FFFEFEFE\">\r\n                                    <Border x:Name=\"BackgroundBorder\" BorderBrush=\"#FF888888\" CornerRadius=\"3,3,3,3\" BorderThickness=\"2,2,2,2\" Background=\"#FFFFFFFF\" Width=\"Auto\" Height=\"Auto\">\r\n                                        <Grid Height=\"Auto\" Width=\"Auto\">\r\n                                            <Border CornerRadius=\"1,1,1,1\"  BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"2,2,2,2\" Background=\"#33FFFFFF\" VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" x:Name=\"Line\" Opacity=\"0.5\"/>\r\n                                            <Border x:Name=\"InnerBorder\" CornerRadius=\"1,1,1,1\" BorderThickness=\"2,2,2,2\" Background=\"{x:Null}\" VerticalAlignment=\"Stretch\" HorizontalAlignment=\"Stretch\" BorderBrush=\"{x:Null}\">\r\n                                                <ScrollViewer BorderThickness=\"0\" Padding=\"1\" x:Name=\"ScrollViewer\" Height=\"Auto\" HorizontalAlignment=\"Stretch\" Margin=\"-1,-1,0,0\" VerticalAlignment=\"Stretch\" Width=\"Auto\" SnapsToDevicePixels=\"True\" HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Auto\" CanContentScroll=\"True\">\r\n                                                    <ItemsPresenter Margin=\"1,1,1,1\"/>\r\n                                                </ScrollViewer>\r\n                                            </Border>\r\n                                        </Grid>\r\n                                    </Border>\r\n                                </Border>\r\n\r\n                            </Grid>\r\n                        </Popup>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- Thumb - HorizontalThumbStyle -->\r\n    <Style x:Key=\"HorizontalThumbStyle\" TargetType=\"Thumb\">\r\n        <Setter Property=\"Background\" Value=\"#FF1F3B53\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"#FFA3AEB9\" Offset=\"0\"/>\r\n                    <GradientStop Color=\"#FF8399A9\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF718597\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF617584\" Offset=\"1\"/>\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Thumb\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#FFFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <ColorAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(Shape.Stroke).(SolidColorBrush.Color)\">\r\n                                            <SplineColorKeyFrame KeyTime=\"00:00:00\" Value=\"#FFFFFFFF\"/>\r\n                                        </ColorAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"grid\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"grid\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledVisual\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid Cursor=\"Hand\" RenderTransformOrigin=\"0.5,0.5\" x:Name=\"grid\">\r\n                            <Grid.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Grid.RenderTransform>\r\n                            <Path x:Name=\"BackgroundShadow1\" Stretch=\"Fill\" Stroke=\"#FF000000\" StrokeThickness=\"2\" Fill=\"#FF000000\" Margin=\"-2\" Opacity=\".05\" Data=\"M20.747934,1.5 L52.092117,1.5 C52.250446,1.5000001 53.737717,2.7400134 53.737717,3.1673 L53.737717,25.5 C53.737717,27.709139 52.209141,29.5 50,29.5 L46.235802,29.5 C43.564945,33.395603 36.190704,43.5 31.75,43.5 C27.309294,43.5 19.935053,33.395603 17.2642,29.5 L13.5,29.5 C11.290861,29.5 9.5,27.709139 9.5,25.5 L9.5,10.805009 C9.5,4.6463528 15.468018,1.5000001 20.747934,1.5\" />\r\n                            <Path x:Name=\"BackgroundShadow2\" Stretch=\"Fill\" Stroke=\"#FF000000\" StrokeThickness=\"2\" Fill=\"#FF000000\" Margin=\"-1\" Opacity=\".05\" Data=\"M20.747934,1.5 L52.092117,1.5 C52.250446,1.5000001 53.737717,2.7400134 53.737717,3.1673 L53.737717,25.5 C53.737717,27.709139 52.209141,29.5 50,29.5 L46.235802,29.5 C43.564945,33.395603 36.190704,43.5 31.75,43.5 C27.309294,43.5 19.935053,33.395603 17.2642,29.5 L13.5,29.5 C11.290861,29.5 9.5,27.709139 9.5,25.5 L9.5,10.805009 C9.5,4.6463528 15.468018,1.5000001 20.747934,1.5\" />\r\n                            <Path Stretch=\"Fill\" Stroke=\"{TemplateBinding Background}\" Fill=\"{TemplateBinding Background}\" StrokeThickness=\"1.5\" Data=\"M20.747934,1.5 L52.092117,1.5 C52.250446,1.5000001 53.737717,2.7400134 53.737717,3.1673 L53.737717,25.5 C53.737717,27.709139 52.209141,29.5 50,29.5 L46.235802,29.5 C43.564945,33.395603 36.190704,43.5 31.75,43.5 C27.309294,43.5 19.935053,33.395603 17.2642,29.5 L13.5,29.5 C11.290861,29.5 9.5,27.709139 9.5,25.5 L9.5,10.805009 C9.5,4.6463528 15.468018,1.5000001 20.747934,1.5\" x:Name=\"ButtonFill\"/>\r\n                            <Path x:Name=\"Background\" Stretch=\"Fill\" Stroke=\"#FF888888\" StrokeThickness=\"1.5\" Data=\"M20.747934,1.5 L52.092117,1.5 C52.250446,1.5000001 53.737717,2.7400134 53.737717,3.1673 L53.737717,25.5 C53.737717,27.709139 52.209141,29.5 50,29.5 L46.235802,29.5 C43.564945,33.395603 36.190704,43.5 31.75,43.5 C27.309294,43.5 19.935053,33.395603 17.2642,29.5 L13.5,29.5 C11.290861,29.5 9.5,27.709139 9.5,25.5 L9.5,10.805009 C9.5,4.6463528 15.468018,1.5000001 20.747934,1.5\">\r\n                                <Path.Fill>\r\n                                    <LinearGradientBrush StartPoint=\"0.7,0\" EndPoint=\"0.7,1\">\r\n                                        <GradientStop Color=\"#CCFFFFFF\" Offset=\"0\" />\r\n                                        <GradientStop Color=\"#AAFFFFFF\" Offset=\"0.285\" />\r\n                                        <GradientStop Color=\"#88FFFFFF\" Offset=\"0.285\" />\r\n                                        <GradientStop Color=\"#19FFFFFF\" Offset=\"1\" />\r\n                                    </LinearGradientBrush>\r\n                                </Path.Fill>\r\n                            </Path>\r\n                            <Path x:Name=\"BorderTransparency\" Margin=\"0.5\" Opacity=\"0.35\" Stretch=\"Fill\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"2.5\" Data=\"M20.747934,1.5 L52.092117,1.5 C52.250446,1.5000001 53.737717,2.7400134 53.737717,3.1673 L53.737717,25.5 C53.737717,27.709139 52.209141,29.5 50,29.5 L46.235802,29.5 C43.564945,33.395603 36.190704,43.5 31.75,43.5 C27.309294,43.5 19.935053,33.395603 17.2642,29.5 L13.5,29.5 C11.290861,29.5 9.5,27.709139 9.5,25.5 L9.5,10.805009 C9.5,4.6463528 15.468018,1.5000001 20.747934,1.5\"/>\r\n                            <Path x:Name=\"FocusVisual\" StrokeDashArray=\"1 2\" Margin=\"3,3,3,3\" Visibility=\"Collapsed\" Stretch=\"Fill\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\" Data=\"M20.747934,1.5 L52.092117,1.5 C52.250446,1.5000001 53.737717,2.7400134 53.737717,3.1673 L53.737717,25.5 C53.737717,27.709139 52.209141,29.5 50,29.5 L46.235802,29.5 C43.564945,33.395603 36.190704,43.5 31.75,43.5 C27.309294,43.5 19.935053,33.395603 17.2642,29.5 L13.5,29.5 C11.290861,29.5 9.5,27.709139 9.5,25.5 L9.5,10.805009 C9.5,4.6463528 15.468018,1.5000001 20.747934,1.5\"/>\r\n                            <Path x:Name=\"DisabledVisual\" Stretch=\"Fill\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"2\" Fill=\"#FFFFFFFF\" Opacity=\"0\" Data=\"M20.747934,1.5 L52.092117,1.5 C52.250446,1.5000001 53.737717,2.7400134 53.737717,3.1673 L53.737717,25.5 C53.737717,27.709139 52.209141,29.5 50,29.5 L46.235802,29.5 C43.564945,33.395603 36.190704,43.5 31.75,43.5 C27.309294,43.5 19.935053,33.395603 17.2642,29.5 L13.5,29.5 C11.290861,29.5 9.5,27.709139 9.5,25.5 L9.5,10.805009 C9.5,4.6463528 15.468018,1.5000001 20.747934,1.5\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- Slider -->\r\n    <Style x:Key=\"{x:Type Slider}\" TargetType=\"{x:Type Slider}\">\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"BorderBrush\">\r\n            <Setter.Value>\r\n                <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                    <GradientStop Color=\"#FFA3AEB9\" Offset=\"0\"/>\r\n                    <GradientStop Color=\"#FF8399A9\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF718597\" Offset=\"0.375\"/>\r\n                    <GradientStop Color=\"#FF617584\" Offset=\"1\"/>\r\n                </LinearGradientBrush>\r\n            </Setter.Value>\r\n        </Setter>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type Slider}\">\r\n                    <Grid x:Name=\"GridRoot\">\r\n                        <Grid.Resources>\r\n                            <ControlTemplate x:Key=\"RepeatButtonTemplate\">\r\n                                <Grid x:Name=\"Root\" Background=\"Transparent\" Opacity=\"0\"/>\r\n                            </ControlTemplate>\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Root\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                            <RowDefinition Height=\"Auto\" MinHeight=\"{TemplateBinding MinHeight}\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n\r\n                        <Grid Width=\"Auto\" Height=\"3\" Grid.Row=\"1\">\r\n                            <Rectangle Height=\"3\" x:Name=\"TrackRectangle\" Fill=\"#FF888888\" RadiusX=\".5\" RadiusY=\".5\"/>\r\n                            <Rectangle Height=\"3\" x:Name=\"HorizontalTrackRectangleDisabledOverlay\" Opacity=\".55\" Visibility=\"Collapsed\" Fill=\"White\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                        </Grid>\r\n\r\n                        <Track Grid.Row=\"1\" x:Name=\"PART_Track\">\r\n                            <Track.Thumb>\r\n                                <Thumb Margin=\"0,0,0,0\" Background=\"{TemplateBinding Background}\" IsTabStop=\"True\" Height=\"20\" Width=\"20\" x:Name=\"HorizontalThumb\" Grid.Column=\"1\" Style=\"{StaticResource HorizontalThumbStyle}\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                    <Thumb.RenderTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform/>\r\n                                            <SkewTransform/>\r\n                                            <RotateTransform/>\r\n                                            <TranslateTransform Y=\"2\"/>\r\n                                        </TransformGroup>\r\n                                    </Thumb.RenderTransform>\r\n                                </Thumb>\r\n                            </Track.Thumb>\r\n                            <Track.IncreaseRepeatButton>\r\n                                <RepeatButton Command=\"Slider.IncreaseLarge\" Template=\"{StaticResource RepeatButtonTemplate}\"/>\r\n                            </Track.IncreaseRepeatButton>\r\n                            <Track.DecreaseRepeatButton>\r\n                                <RepeatButton Command=\"Slider.DecreaseLarge\" Template=\"{StaticResource RepeatButtonTemplate}\"/>\r\n                            </Track.DecreaseRepeatButton>\r\n                        </Track>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- ScrollBar -->\r\n    <Style x:Key=\"{x:Type ScrollBar}\" TargetType=\"{x:Type ScrollBar}\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"MinWidth\" Value=\"17\"/>\r\n        <Setter Property=\"MinHeight\" Value=\"17\"/>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ScrollBar}\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <Grid.Resources>\r\n                            <ControlTemplate x:Key=\"RepeatButtonTemplate\" TargetType=\"RepeatButton\">\r\n                                <Grid x:Name=\"Root\" Background=\"Transparent\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n\r\n                            <!--I'm not using the repeat buttons and that's why these templates are empty-->\r\n                            <ControlTemplate x:Key=\"HorizontalIncrementTemplate\" TargetType=\"RepeatButton\" />\r\n                            <ControlTemplate x:Key=\"HorizontalDecrementTemplate\" TargetType=\"RepeatButton\" />\r\n                            <ControlTemplate x:Key=\"VerticalIncrementTemplate\" TargetType=\"RepeatButton\" />\r\n                            <ControlTemplate x:Key=\"VerticalDecrementTemplate\" TargetType=\"RepeatButton\" />\r\n\r\n                            <!--Thumb templates-->\r\n                            <ControlTemplate x:Key=\"VerticalThumbTemplate\" TargetType=\"Thumb\">\r\n                                <Grid>\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <ColorAnimation Duration=\"0:0:0.1\" Storyboard.TargetName=\"LinearBevelDarkEnd\" Storyboard.TargetProperty=\"Color\" To=\"#9FFFFFFF\" />\r\n                                                    <ColorAnimation Duration=\"0:0:0\" Storyboard.TargetName=\"borderColor\" Storyboard.TargetProperty=\"Color\" To=\"#FF999999\" />\r\n                                                    <DoubleAnimation Duration=\"0:0:0\" Storyboard.TargetName=\"whiteBorder\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <ColorAnimation Duration=\"0:0:0.1\" Storyboard.TargetName=\"LinearBevelDarkEnd\" Storyboard.TargetProperty=\"Color\" To=\"#6FFFFFFF\" />\r\n                                                    <ColorAnimation Duration=\"0:0:0.1\" Storyboard.TargetName=\"borderColor\" Storyboard.TargetProperty=\"Color\" To=\"#FF999999\" />\r\n                                                    <DoubleAnimation Duration=\"0:0:0.1\" Storyboard.TargetName=\"whiteBorder\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\".7\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Rectangle x:Name=\"Background\" Margin=\".5\" RadiusX=\"2.5\" RadiusY=\"2.5\" Fill=\"{TemplateBinding Background}\" />\r\n                                    <Rectangle Margin=\"0\" RadiusX=\"2.5\" RadiusY=\"2.5\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\"/>\r\n                                    <Rectangle Margin=\"0\" RadiusX=\"2.5\" RadiusY=\"2.5\" StrokeThickness=\"1\">\r\n                                        <Rectangle.Fill>\r\n                                            <LinearGradientBrush StartPoint=\"0,0.5\" EndPoint=\"1,0.5\">\r\n                                                <GradientStop Color=\"#FCFFFFFF\" Offset=\"0\" />\r\n                                                <GradientStop Color=\"#F4FFFFFF\" Offset=\"0.35\" />\r\n                                                <GradientStop Color=\"#E0FFFFFF\" Offset=\"0.35\" />\r\n                                                <GradientStop x:Name=\"LinearBevelDarkEnd\" Color=\"#B2FFFFFF\" Offset=\"1\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Rectangle.Fill>\r\n                                        <Rectangle.Stroke>\r\n                                            <SolidColorBrush x:Name=\"borderColor\" Color=\"#FF999999\" />\r\n                                        </Rectangle.Stroke>\r\n                                    </Rectangle>\r\n                                    <Rectangle x:Name=\"whiteBorder\" Margin=\"1\"  RadiusX=\"2.5\" RadiusY=\"2.5\" StrokeThickness=\"1\" Stroke=\"White\" Fill=\"#00000000\" />\r\n                                    <Rectangle x:Name=\"DisabledOverlay\" Margin=\".5\" RadiusX=\"2.5\" RadiusY=\"2.5\" Fill=\"#FFFFFFFF\" Opacity=\"0\" />\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"HorizontalThumbTemplate\" TargetType=\"Thumb\">\r\n                                <Grid>\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <ColorAnimation Duration=\"0:0:0.1\" Storyboard.TargetName=\"LinearBevelDarkEnd\" Storyboard.TargetProperty=\"Color\" To=\"#9FFFFFFF\" />\r\n                                                    <ColorAnimation Duration=\"0:0:0\" Storyboard.TargetName=\"borderColor\" Storyboard.TargetProperty=\"Color\" To=\"#FF999999\" />\r\n                                                    <DoubleAnimation Duration=\"0:0:0\" Storyboard.TargetName=\"whiteBorder\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <ColorAnimation Duration=\"0:0:0.1\" Storyboard.TargetName=\"LinearBevelDarkEnd\" Storyboard.TargetProperty=\"Color\" To=\"#9FFFFFFF\" />\r\n                                                    <ColorAnimation Duration=\"0:0:0.1\" Storyboard.TargetName=\"borderColor\" Storyboard.TargetProperty=\"Color\" To=\"#ff999999\" />\r\n                                                    <DoubleAnimation Duration=\"0:0:0.1\" Storyboard.TargetName=\"whiteBorder\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\".7\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                    <Rectangle x:Name=\"Background\" Margin=\".5\" RadiusX=\"2.5\" RadiusY=\"2.5\" Fill=\"{TemplateBinding Background}\" />\r\n                                    <Rectangle Margin=\"0\" RadiusX=\"2.5\" RadiusY=\"2.5\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\"/>\r\n                                    <Rectangle Margin=\"0\" RadiusX=\"2.5\" RadiusY=\"2.5\" StrokeThickness=\"1\">\r\n                                        <Rectangle.Fill>\r\n                                            <LinearGradientBrush StartPoint=\".5,0\" EndPoint=\".5,1\">\r\n                                                <GradientStop Color=\"#FCFFFFFF\" Offset=\"0\" />\r\n                                                <GradientStop Color=\"#F4FFFFFF\" Offset=\"0.35\" />\r\n                                                <GradientStop Color=\"#E0FFFFFF\" Offset=\"0.35\" />\r\n                                                <GradientStop x:Name=\"LinearBevelDarkEnd\" Color=\"#B2FFFFFF\" Offset=\"1\" />\r\n                                            </LinearGradientBrush>\r\n                                        </Rectangle.Fill>\r\n                                        <Rectangle.Stroke>\r\n                                            <SolidColorBrush x:Name=\"borderColor\" Color=\"#FF999999\" />\r\n                                        </Rectangle.Stroke>\r\n                                    </Rectangle>\r\n                                    <Rectangle x:Name=\"whiteBorder\" Margin=\"1\"  RadiusX=\"2.5\" RadiusY=\"2.5\" StrokeThickness=\"1\" Stroke=\"White\" Fill=\"#00000000\" />\r\n                                    <Rectangle x:Name=\"DisabledOverlay\" Margin=\".5\" RadiusX=\"2.5\" RadiusY=\"2.5\" Fill=\"#FFFFFFFF\" Opacity=\"0\" />\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Root\" Storyboard.TargetProperty=\"Opacity\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n\r\n                        <Grid x:Name=\"VerticalRoot\" Visibility=\"Visible\">\r\n                            <!--Start: Track-->\r\n                            <Border Background=\"#FFFFFFFF\" BorderThickness=\"1\" BorderBrush=\"#FFFFFFFF\"/>\r\n                            <Border Margin=\"0,0,0,1\" Background=\"{TemplateBinding Background}\" Opacity=\".1\"/>\r\n                            <!--End: Track-->\r\n\r\n                            <Track x:Name=\"PART_Track\" Orientation=\"Vertical\" IsDirectionReversed=\"true\">\r\n                                <Track.Thumb>\r\n                                    <Thumb Template=\"{StaticResource VerticalThumbTemplate}\" Background=\"{TemplateBinding Background}\" MinHeight=\"10\" x:Name=\"VerticalThumb\" />\r\n                                </Track.Thumb>\r\n                                <Track.IncreaseRepeatButton>\r\n                                    <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" x:Name=\"VerticalLargeIncrease\" Interval=\"50\" Command=\"ScrollBar.PageDownCommand\"/>\r\n                                </Track.IncreaseRepeatButton>\r\n                                <Track.DecreaseRepeatButton>\r\n                                    <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" x:Name=\"VerticalLargeDecrease\" Interval=\"50\" Command=\"ScrollBar.PageUpCommand\"/>\r\n                                </Track.DecreaseRepeatButton>\r\n                            </Track>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- ListBoxItem -->\r\n    <Style x:Key=\"{x:Type ListBoxItem}\" TargetType=\"{x:Type ListBoxItem}\">\r\n        <Setter Property=\"Padding\" Value=\"4\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Background\" Value=\"{StaticResource HoverBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource HoverBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"#FF333333\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListBoxItem}\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"BGColor3\" Storyboard.TargetProperty=\"Opacity\" Duration=\"0\" To=\"1\"/>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BGColor\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.4\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualState x:Name=\"Unselected\"/>\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BGColor2\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.6\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"Visibility\" Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Rectangle x:Name=\"BGColor2\" Fill=\"{TemplateBinding Background}\" StrokeThickness=\"0\" Opacity=\"0\"/>\r\n                        <Rectangle x:Name=\"BGColor3\" Fill=\"#FFFFFFFF\" StrokeThickness=\"0\" Opacity=\"0\"/>\r\n                        <Rectangle x:Name=\"BGColor\" Fill=\"{TemplateBinding Background}\" StrokeThickness=\"0\" Opacity=\"0\"/>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" x:Name=\"contentPresenter\" />\r\n                        <Rectangle x:Name=\"FocusVisual\" Stroke=\"#BF313131\" Margin=\"1\" StrokeThickness=\"1\" StrokeDashArray=\"1 2\" StrokeDashCap=\"Square\" Visibility=\"Collapsed\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- ComboBoxItem -->\r\n    <Style x:Key=\"{x:Type ComboBoxItem}\" TargetType=\"{x:Type ComboBoxItem}\">\r\n        <Setter Property=\"Padding\" Value=\"4\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Background\" Value=\"{StaticResource HoverBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource HoverBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"#FF333333\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ComboBoxItem}\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"BGColor3\" Storyboard.TargetProperty=\"Opacity\" Duration=\"0\" To=\"1\"/>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BGColor\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.4\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.55\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualState x:Name=\"Unselected\"/>\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"BGColor2\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.6\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"Visibility\" Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Rectangle x:Name=\"BGColor2\" Fill=\"{TemplateBinding Background}\" StrokeThickness=\"0\" Opacity=\"0\"/>\r\n                        <Rectangle x:Name=\"BGColor3\" Fill=\"#FFFFFFFF\" StrokeThickness=\"0\" Opacity=\"0\"/>\r\n                        <Rectangle x:Name=\"BGColor\" Fill=\"{TemplateBinding Background}\" StrokeThickness=\"0\" Opacity=\"0\"/>\r\n                        <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" />\r\n                        <Rectangle x:Name=\"FocusVisual\" Stroke=\"#BF313131\" Margin=\"1\" StrokeThickness=\"1\" StrokeDashArray=\"1 2\" StrokeDashCap=\"Square\" Visibility=\"Collapsed\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n\r\n\r\n    <!-- ScrollViewer -->\r\n    <Style x:Key=\"{x:Type ScrollViewer}\" TargetType=\"{x:Type ScrollViewer}\">\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Background\" Value=\"#FFFFFFFF\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"Padding\" Value=\"4\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"3\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ScrollViewer\">\r\n                    <Border BorderThickness=\"2.5,2.5,2.5,2.5\" CornerRadius=\"2.5\" BorderBrush=\"#FF888888\" x:Name=\"root\" Background=\"#FFFFFFFF\">\r\n                        <Grid x:Name=\"rootGrid\" Background=\"#FFFFFFFF\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"*\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <Border Height=\"Auto\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" Width=\"Auto\" BorderBrush=\"{StaticResource BaseColorBrush}\" BorderThickness=\"2,2,2,2\" CornerRadius=\"0.5,0.5,0.5,0.5\" x:Name=\"Line\" Opacity=\"0.5\"/>\r\n                            <Grid Grid.ColumnSpan=\"2\" Grid.RowSpan=\"2\" x:Name=\"Content\" Margin=\"2,2,2,2\">\r\n                                <ScrollContentPresenter Cursor=\"{TemplateBinding Cursor}\" Margin=\"1,1,19,17\" x:Name=\"ScrollContentPresenter\" ContentTemplate=\"{TemplateBinding ContentTemplate}\"/>\r\n                                <Rectangle Height=\"17\" HorizontalAlignment=\"Right\" Margin=\"0,0,0,0\" VerticalAlignment=\"Bottom\" Width=\"17\" Fill=\"{TemplateBinding Background}\" Opacity=\".1\"/>\r\n                                <ScrollBar IsTabStop=\"False\" HorizontalAlignment=\"Right\" Margin=\"0,0,0,17\" x:Name=\"PART_VerticalScrollBar\" Width=\"18\" Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Maximum=\"{TemplateBinding ScrollableHeight}\" Minimum=\"0\" Value=\"{TemplateBinding VerticalOffset}\" Orientation=\"Vertical\" ViewportSize=\"{TemplateBinding ViewportHeight}\"/>\r\n                                <ScrollBar IsTabStop=\"False\" Height=\"18\" Margin=\"0,0,17,0\" x:Name=\"PART_HorizontalScrollBar\" VerticalAlignment=\"Bottom\" Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Maximum=\"{TemplateBinding ScrollableWidth}\" Minimum=\"0\" Value=\"{TemplateBinding HorizontalOffset}\" Orientation=\"Horizontal\" ViewportSize=\"{TemplateBinding ViewportWidth}\"/>\r\n                            </Grid>\r\n                        </Grid>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!-- ListBox -->\r\n    <Style x:Key=\"{x:Type ListBox}\" TargetType=\"{x:Type ListBox}\">\r\n        <Setter Property=\"Padding\" Value=\"1\"/>\r\n        <Setter Property=\"BorderThickness\" Value=\"0\"/>\r\n        <Setter Property=\"Foreground\" Value=\"#FF000000\"/>\r\n        <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"IsTabStop\" Value=\"False\"/>\r\n        <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\"/>\r\n        <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\"/>\r\n        <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"True\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ListBox}\">\r\n                    <Border BorderThickness=\"0,0,0,0\" CornerRadius=\"0,0,0,0\">\r\n                        <ScrollViewer Background=\"{TemplateBinding Background}\" BorderBrush=\"Transparent\" BorderThickness=\"0\" Padding=\"{TemplateBinding Padding}\" x:Name=\"ScrollViewer\">\r\n                            <ItemsPresenter/>\r\n                        </ScrollViewer>\r\n                    </Border>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style TargetType=\"Expander\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Expander\">\r\n                    <Grid>\r\n                        <ContentPresenter />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/UXMusingsRoughGreen/Theme.xaml",
    "content": "﻿<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n                    xmlns:basic=\"clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit\"\r\n                    xmlns:primitives=\"clr-namespace:Microsoft.Windows.Controls.Primitives;assembly=WPFToolkit\"\r\n                    xmlns:vsm=\"clr-namespace:System.Windows;assembly=WPFToolkit\">\r\n\r\n    <!-- Resources -->\r\n    <SolidColorBrush x:Key=\"BaseColorBrush\" Color=\"#FF9FD752\"/>\r\n    <SolidColorBrush x:Key=\"BorderBrush\" Color=\"#FF333333\"/>\r\n    <SolidColorBrush x:Key=\"ForegroundBrush\" Color=\"#FF333333\"/>\r\n    <SolidColorBrush x:Key=\"HoverBrush\" Color=\"#7FFBF445\"/>\r\n    <SolidColorBrush x:Key=\"HyperlinkBrush\" Color=\"#FF74AF22\"/>    \r\n    <SolidColorBrush x:Key=\"WindowBackgroundBrush\" Color=\"#FFFFFFFF\" />\r\n\r\n    <!--Button-->\r\n    <Style TargetType=\"Button\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource BorderBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n        <Setter Property=\"Padding\" Value=\"4\" />\r\n        <Setter Property=\"Cursor\" Value=\"Hand\" />\r\n        <!--<Setter Property=\"TextWrapping\" Value=\"NoWrap\" />-->\r\n        <Setter Property=\"Margin\" Value=\"0,-1,0,0\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Button\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"Pressed\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\">\r\n                                    <Storyboard/>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledVisual\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n\r\n                        <!-- Start:UI -->\r\n                        <Path Margin=\"-1.25,0,0,-1\" x:Name=\"LineBack\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"#FFFFFFFF\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\">\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <Path HorizontalAlignment=\"Stretch\" Stretch=\"Fill\" Margin=\"1.5,2.5,5.5,2.5\" x:Name=\"Background\" VerticalAlignment=\"Stretch\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"{TemplateBinding Background}\" StrokeThickness=\"2\">\r\n                            <Path.Data>\r\n                                <PathGeometry>\r\n                                    <PathFigure IsClosed=\"True\" StartPoint=\"55.3734893798828,18.3878383636475\">\r\n                                        <BezierSegment Point1=\"55.4575424194336,19.6423645019531\" Point2=\"54.0918769836426,18.1212940216064\" Point3=\"54.1759376525879,19.3758182525635\"/>\r\n                                        <BezierSegment Point1=\"54.1044921875,19.43869972229\" Point2=\"54.1721153259277,19.5379447937012\" Point3=\"54.101448059082,19.5246734619141\"/>\r\n                                        <BezierSegment Point1=\"53.697998046875,19.2345180511475\" Point2=\"53.7027320861816,20.5981388092041\" Point3=\"53.2657089233398,20.5459175109863\"/>\r\n                                        <LineSegment Point=\"54.9807624816895,20.2940578460693\"/>\r\n                                        <BezierSegment Point1=\"55.4915466308594,19.2132472991943\" Point2=\"55.6735687255859,19.6681518554688\" Point3=\"55.5702743530273,19.2230930328369\"/>\r\n                                        <LineSegment Point=\"55.3734893798828,18.3878383636475\"/>\r\n                                    </PathFigure>\r\n                                    <PathFigure IsClosed=\"True\" StartPoint=\"2.75041627883911,4.18817186355591\">\r\n                                        <BezierSegment Point1=\"2.60941195487976,4.23498106002808\" Point2=\"2.44556498527527,4.34848213195801\" Point3=\"2.25126266479492,4.5509033203125\"/>\r\n                                        <BezierSegment Point1=\"1.95730113983154,3.90779161453247\" Point2=\"1.66666030883789,5.07916784286499\" Point3=\"1.46416211128235,5.60511302947998\"/>\r\n                                        <LineSegment Point=\"1.28398549556732,5.28074789047241\"/>\r\n                                        <LineSegment Point=\"1.2844455242157,5.27347755432129\"/>\r\n                                        <LineSegment Point=\"1.43954491615295,5.49028921127319\"/>\r\n                                        <BezierSegment Point1=\"1.46683251857758,5.47077798843384\" Point2=\"1.34879219532013,5.18408298492432\" Point3=\"1.2877790927887,5.220703125\"/>\r\n                                        <LineSegment Point=\"1.2844455242157,5.27347755432129\"/>\r\n                                        <LineSegment Point=\"1.26432502269745,5.24535417556763\"/>\r\n                                        <LineSegment Point=\"1.28398549556732,5.28074789047241\"/>\r\n                                        <LineSegment Point=\"1.26432502269745,5.59193277359009\"/>\r\n                                        <BezierSegment Point1=\"1.28229105472565,5.78759717941284\" Point2=\"1.3096958398819,5.8595871925354\" Point3=\"1.34388554096222,5.84831285476685\"/>\r\n                                        <LineSegment Point=\"1.46416211128235,5.60511302947998\"/>\r\n                                        <LineSegment Point=\"2.18957805633545,6.91105651855469\"/>\r\n                                        <BezierSegment Point1=\"4.89191150665283,6.34800672531128\" Point2=\"3.10698843002319,8.09412384033203\" Point3=\"4.9653377532959,5.38372611999512\"/>\r\n                                        <BezierSegment Point1=\"3.60521507263184,6.80067920684814\" Point2=\"3.73745012283325,3.86050128936768\" Point3=\"2.75041627883911,4.18817186355591\"/>\r\n                                    </PathFigure>\r\n                                    <PathFigure IsClosed=\"True\" StartPoint=\"3.98743844032288,2.72233080863953\">\r\n                                        <BezierSegment Point1=\"3.87878394126892,2.65442371368408\" Point2=\"3.73797965049744,2.68036603927612\" Point3=\"3.53287696838379,2.89400577545166\"/>\r\n                                        <BezierSegment Point1=\"3.3777277469635,2.55462884902954\" Point2=\"3.22433018684387,3.17277550697327\" Point3=\"3.11745405197144,3.45032072067261\"/>\r\n                                        <LineSegment Point=\"3.02235960960388,3.27914905548096\"/>\r\n                                        <LineSegment Point=\"3.02260160446167,3.27531266212463\"/>\r\n                                        <LineSegment Point=\"3.01198220252991,3.2604718208313\"/>\r\n                                        <LineSegment Point=\"3.02235960960388,3.27914905548096\"/>\r\n                                        <LineSegment Point=\"3.01198220252991,3.44336438179016\"/>\r\n                                        <BezierSegment Point1=\"3.01268339157104,3.45099830627441\" Point2=\"3.01341199874878,3.45827555656433\" Point3=\"3.11745405197144,3.45032072067261\"/>\r\n                                        <LineSegment Point=\"3.50032067298889,4.13947582244873\"/>\r\n                                        <LineSegment Point=\"4.19300651550293,4.08932685852051\"/>\r\n                                        <BezierSegment Point1=\"4.57573270797729,4.15608644485474\" Point2=\"4.22972536087036,4.40621519088745\" Point3=\"4.9653377532959,3.33349204063416\"/>\r\n                                        <BezierSegment Point1=\"4.35003042221069,3.97440934181213\" Point2=\"4.31340551376343,2.92605090141296\" Point3=\"3.98743844032288,2.72233080863953\"/>\r\n                                    </PathFigure>\r\n                                    <PathFigure IsClosed=\"True\" StartPoint=\"43.6054306030273,2.55744552612305\">\r\n                                        <LineSegment Point=\"42.7685508728027,3.07746315002441\"/>\r\n                                        <BezierSegment Point1=\"42.8401260375977,3.02574563026428\" Point2=\"44.8010520935059,3.60871481895447\" Point3=\"44.8063468933105,3.56444692611694\"/>\r\n                                        <LineSegment Point=\"47.3169860839844,3.1744339466095\"/>\r\n                                        <BezierSegment Point1=\"47.7981910705566,2.0477294921875\" Point2=\"50.5490341186523,3.69445133209229\" Point3=\"50.9364852905273,2.43774271011353\"/>\r\n                                        <LineSegment Point=\"46.9194679260254,2.11273193359375\"/>\r\n                                        <BezierSegment Point1=\"45.9232177734375,2.00986051559448\" Point2=\"42.2318840026855,3.34697723388672\" Point3=\"43.6054306030273,2.55744552612305\"/>\r\n                                    </PathFigure>\r\n                                    <PathFigure IsClosed=\"True\" StartPoint=\"16.5382518768311,2.38410639762878\">\r\n                                        <BezierSegment Point1=\"17.9376049041748,2.47057723999023\" Point2=\"28.9235725402832,0.979193687438965\" Point3=\"30.961519241333,1.25740206241608\"/>\r\n                                        <BezierSegment Point1=\"39.7206230163574,2.45314311981201\" Point2=\"36.6131362915039,2.46526336669922\" Point3=\"45.4653663635254,2.03742814064026\"/>\r\n                                        <BezierSegment Point1=\"48.1704330444336,1.90669059753418\" Point2=\"53.7993202209473,2.94819211959839\" Point3=\"56.5043983459473,2.81745433807373\"/>\r\n                                        <BezierSegment Point1=\"57.6275444030762,2.76317286491394\" Point2=\"58.8492164611816,1.81751883029938\" Point3=\"58.7605514526367,4.98419380187988\"/>\r\n                                        <BezierSegment Point1=\"58.6914901733398,7.45075988769531\" Point2=\"59.2414894104004,7.46710634231567\" Point3=\"59.1634330749512,9.40434169769287\"/>\r\n                                        <LineSegment Point=\"59.1302642822266,9.42093944549561\"/>\r\n                                        <BezierSegment Point1=\"58.9689521789551,9.46572589874268\" Point2=\"58.8931922912598,9.64298820495605\" Point3=\"58.9885597229004,10.0852022171021\"/>\r\n                                        <LineSegment Point=\"58.7547225952148,10.0751485824585\"/>\r\n                                        <BezierSegment Point1=\"58.7845993041992,10.1730222702026\" Point2=\"59.0883674621582,10.4170408248901\" Point3=\"59.129207611084,10.4465093612671\"/>\r\n                                        <LineSegment Point=\"58.9072380065918,10.2733154296875\"/>\r\n                                        <BezierSegment Point1=\"58.2435150146484,9.76523780822754\" Point2=\"58.5282859802246,11.6655864715576\" Point3=\"57.8627014160156,11.4802284240723\"/>\r\n                                        <BezierSegment Point1=\"57.8627014160156,11.4802284240723\" Point2=\"58.1601409912109,13.5446062088013\" Point3=\"58.357666015625,14.1711664199829\"/>\r\n                                        <BezierSegment Point1=\"58.9370613098145,16.0090198516846\" Point2=\"58.3653373718262,16.4901638031006\" Point3=\"58.357666015625,18.4179744720459\"/>\r\n                                        <BezierSegment Point1=\"58.3484077453613,20.745641708374\" Point2=\"60.4300498962402,21.9203453063965\" Point3=\"56.8666801452637,21.5362567901611\"/>\r\n                                        <BezierSegment Point1=\"45.6265144348145,20.32470703125\" Point2=\"39.9008178710938,21.5664978027344\" Point3=\"30.3169002532959,20.9313945770264\"/>\r\n                                        <BezierSegment Point1=\"24.7872543334961,20.5649566650391\" Point2=\"17.0756797790527,21.3352470397949\" Point3=\"11.5372772216797,21.6029224395752\"/>\r\n                                        <BezierSegment Point1=\"9.37526988983154,21.7074146270752\" Point2=\"6.82023525238037,22.2953662872314\" Point3=\"4.65164470672607,21.9357109069824\"/>\r\n                                        <BezierSegment Point1=\"1.45201742649078,21.4050598144531\" Point2=\"1.73953628540039,23.0963401794434\" Point3=\"1.51341998577118,17.1753234863281\"/>\r\n                                        <BezierSegment Point1=\"1.38521957397461,13.8183069229126\" Point2=\"0.133225455880165,11.0509176254272\" Point3=\"0.00502508180215955,7.6939001083374\"/>\r\n                                        <BezierSegment Point1=\"-0.0463196896016598,6.3494029045105\" Point2=\"0.306805700063705,4.28786516189575\" Point3=\"0.562162816524506,2.95534110069275\"/>\r\n                                        <LineSegment Point=\"2.65466785430908,2.14960050582886\"/>\r\n                                        <BezierSegment Point1=\"5.5844030380249,2.0080041885376\" Point2=\"7.20274591445923,3.57988381385803\" Point3=\"10.0115203857422,2.2107675075531\"/>\r\n                                        <BezierSegment Point1=\"11.7393894195557,1.36852860450745\" Point2=\"15.138897895813,2.29763579368591\" Point3=\"16.5382518768311,2.38410639762878\"/>\r\n                                    </PathFigure>\r\n                                </PathGeometry>\r\n                            </Path.Data>\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform X=\"1.4916732314436434\" Y=\"-0.23907148924159571\"/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <Path Margin=\"-1.25,0,0,-1\" x:Name=\"Line\" RenderTransformOrigin=\"0.5,0.5\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\">\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <ContentPresenter\r\n                              x:Name=\"contentPresenter\"\r\n                              Content=\"{TemplateBinding Content}\"\r\n                              ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                              RenderTransformOrigin=\"0.5,0.5\" \r\n                            \r\n                              HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" \r\n                              Margin=\"{TemplateBinding Padding}\"\r\n                              VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"                                                           \r\n                            >\r\n\r\n                            <!--                              FontFamily=\"Arial\"\r\n                              FontSize=\"11\"\r\n                              FontWeight=\"Bold\"\r\n                              FontStretch=\"{TemplateBinding FontStretch}\"\r\n                              FontStyle=\"{TemplateBinding FontStyle}\"\r\n                            \r\n                            Foreground=\"{TemplateBinding Foreground}\"\r\n                            \r\n                            Padding=\"{TemplateBinding Padding}\"\r\n                              TextDecorations=\"{TemplateBinding TextDecorations}\"\r\n                              TextWrapping=\"{TemplateBinding TextWrapping}\"\r\n                              TextAlignment=\"Center\"\r\n                              VerticalContentAlignment=\"Center\"\r\n                              HorizontalContentAlignment=\"Center\" -->\r\n                            <ContentPresenter.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </ContentPresenter.RenderTransform>\r\n                        </ContentPresenter>\r\n                        <Path Margin=\"2.75,4.375,4,3.5\" x:Name=\"FocusVisual\" StrokeDashArray=\"1 2\" RenderTransformOrigin=\"0.5,0.5\" Visibility=\"Collapsed\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"0.5\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\">\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <Path Margin=\"-1.25,0,0,-1\" x:Name=\"DisabledVisual\" Stretch=\"Fill\" Stroke=\"#B2FFFFFF\" StrokeThickness=\"2\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\" Opacity=\"0\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"#B2FFFFFF\">\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <!-- End:UI -->\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--CheckBox-->\r\n    <Style TargetType=\"CheckBox\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource BorderBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n        <Setter Property=\"Margin\" Value=\"0\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\"/>\r\n        <Setter Property=\"Cursor\" Value=\"Arrow\"/>\r\n        <!--<Setter Property=\"TextAlignment\" Value=\"Left\"/>-->\r\n        <!--<Setter Property=\"TextWrapping\" Value=\"NoWrap\"/>-->\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"CheckBox\">\r\n                    <Grid Cursor=\"Arrow\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"Pressed\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Fill\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Fill\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"CheckOut\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"CheckOut\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"IndetermintateOut\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"IndetermintateOut\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.125\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.125\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Fill\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.125\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Fill\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.125\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"CheckOut\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.125\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"CheckOut\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.125\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"IndetermintateOut\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.125\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"IndetermintateOut\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.125\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"DisabledVisual\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Content\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"CheckVisual\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\" />\r\n                                <VisualState x:Name=\"Indeterminate\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"IndeterminateVisual\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"ContentFocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ContentFocused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"ContentFocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"*\" />\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <!-- Start:UI -->\r\n                        <Path x:Name=\"Line\" Fill=\"#FFFFFFFF\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Width=\"14\" Height=\"14\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" RenderTransformOrigin=\"0.5,0.5\" Data=\"M2.1666667,234.16667 C5.8173413,233.69049 9.0472345,234.16667 12.666667,234.16667 C13.625546,234.16667 13.614246,233.78091 14.333333,234.5 C14.749932,234.9166 15,235.35416 15,236 C15,238.95284 15.614571,241.34795 14.333333,244.16667 C13.440694,246.13048 15.787796,246.83333 12.166667,246.83333 C9.3277521,246.83333 6.6090913,246.69827 3.8333333,246.5 C1.8735431,246.36002 2.6004581,249.33678 2,244.83333 C1.790879,243.26492 2,241.59055 2,240 C2,238.45003 1.63987,236.88104 1.8333334,235.33333 C2.0027289,233.97816 2.1791835,234.78062 3,233.66667\">\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <Path x:Name=\"Fill\" Fill=\"{TemplateBinding Background}\" Stretch=\"Fill\" StrokeThickness=\"2\" Width=\"8.5\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" Height=\"8.5\" RenderTransformOrigin=\"0.5,0.5\" Data=\"M2.1666667,234.16667 C5.8173413,233.69049 9.42311,233.73672 13.042542,233.73672 C14.001422,233.73672 13.614246,233.78091 14.333333,234.5 C14.749932,234.9166 15.64248,235.36954 15.64248,236.01538 C15.64248,238.96822 16.676264,242.16611 15.395027,244.98483 C14.502388,246.94864 16.118021,247.54753 12.496893,247.54753 C9.6579781,247.54753 8.7105455,247.99353 5.9347878,247.79526 C3.9749978,247.65527 2.6004581,249.33678 2,244.83333 C1.790879,243.26492 2,241.59055 2,240 C2,238.45003 1.63987,236.88104 1.8333334,235.33333 C2.0027289,233.97816 2.4982078,233.78133 3.3190243,232.66737\">\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <Grid x:Name=\"CheckOut\">\r\n                            <Grid.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                </TransformGroup>\r\n                            </Grid.RenderTransform>\r\n                            <Path Fill=\"{TemplateBinding BorderBrush}\" Stroke=\"{TemplateBinding BorderBrush}\" Stretch=\"Fill\" StrokeThickness=\"0.75\" x:Name=\"CheckVisual\" Width=\"7\" Height=\"6\" Opacity=\"0\" RenderTransformOrigin=\"0.5,0.5\" Data=\"M5.6667972,237.66629 C7.2538533,237.87108 8.2900753,237.86133 9.9167976,237.49983 C10.450503,237.38123 10.932315,238.16667 11.5,238.16667 C12.126745,238.16667 12.194501,237.722 11.916667,238.83333 C11.794479,239.32208 12.080911,244.03731 11.666667,244.08333 C10.690258,244.19182 5.3457832,245.12595 4.75,244.08333 C4.0560555,242.86893 4.5,240.56615 4.5,239.08333 C4.5,237.8156 4.1810727,238.00514 5.6667972,237.66629 z\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"IndetermintateOut\">\r\n                            <Grid.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                </TransformGroup>\r\n                            </Grid.RenderTransform>\r\n                            <Path Fill=\"#7FFFFFFF\" Stroke=\"{TemplateBinding BorderBrush}\" Stretch=\"Fill\" StrokeThickness=\"1\" x:Name=\"IndeterminateVisual\" Width=\"7\" Height=\"6\" Opacity=\"0\" RenderTransformOrigin=\"0.5,0.5\" Data=\"M5.6667972,237.66629 C7.2538533,237.87108 8.2900753,237.86133 9.9167976,237.49983 C10.450503,237.38123 10.932315,238.16667 11.5,238.16667 C12.126745,238.16667 12.194501,237.722 11.916667,238.83333 C11.794479,239.32208 12.080911,244.03731 11.666667,244.08333 C10.690258,244.19182 5.3457832,245.12595 4.75,244.08333 C4.0560555,242.86893 4.5,240.56615 4.5,239.08333 C4.5,237.8156 4.1810727,238.00514 5.6667972,237.66629 z\"/>\r\n                        </Grid>\r\n                        <ContentPresenter\r\n\t\t                          x:Name=\"Content\"\r\n\t\t                          Grid.Column=\"1\"\r\n\t\t                          Content=\"{TemplateBinding Content}\"\r\n\t\t                          ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n\t\t                          Margin=\"4,2,2,1\"\r\n\t\t                          IsHitTestVisible=\"true\" />\r\n                        <!--\r\n\t\t                          Background=\"Transparent\"\r\n\t\t                          FontFamily=\"Arial\"\r\n\t\t                          FontSize=\"11\"\r\n\t\t                          FontWeight=\"Normal\"\r\n\t\t                          FontStretch=\"{TemplateBinding FontStretch}\"\r\n\t\t                          FontStyle=\"{TemplateBinding FontStyle}\"\r\n\t\t                          Foreground=\"{TemplateBinding Foreground}\"\r\n\t\t                          HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n\t\t                          Padding=\"{TemplateBinding Padding}\"\r\n\t\t                          TextAlignment=\"{TemplateBinding TextAlignment}\"\r\n\t\t                          TextDecorations=\"{TemplateBinding TextDecorations}\"\r\n\t\t                          TextWrapping=\"{TemplateBinding TextWrapping}\"\r\n\t\t                          VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n-->\r\n                        <Rectangle x:Name=\"ContentFocusVisualElement\" Grid.Column=\"1\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\".5\" StrokeDashCap=\"Square\" Margin=\"1\" StrokeDashArray=\"1 2\" Visibility=\"Collapsed\" RadiusX=\"2\" RadiusY=\"2\" IsHitTestVisible=\"false\"/>\r\n                        <Path x:Name=\"DisabledVisual\" Fill=\"#B2FFFFFF\" Opacity=\"0\" Stretch=\"Fill\" Stroke=\"#B2FFFFFF\" StrokeThickness=\"2\" Width=\"14\" Height=\"14\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" RenderTransformOrigin=\"0.5,0.5\" Data=\"M2.1666667,234.16667 C5.8173413,233.69049 9.0472345,234.16667 12.666667,234.16667 C13.625546,234.16667 13.614246,233.78091 14.333333,234.5 C14.749932,234.9166 15,235.35416 15,236 C15,238.95284 15.614571,241.34795 14.333333,244.16667 C13.440694,246.13048 15.787796,246.83333 12.166667,246.83333 C9.3277521,246.83333 6.6090913,246.69827 3.8333333,246.5 C1.8735431,246.36002 2.6004581,249.33678 2,244.83333 C1.790879,243.26492 2,241.59055 2,240 C2,238.45003 1.63987,236.88104 1.8333334,235.33333 C2.0027289,233.97816 2.1791835,234.78062 3,233.66667\"/>\r\n                        <!-- Start:UI -->\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--RadioButton-->\r\n    <Style TargetType=\"RadioButton\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource BorderBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n        <Setter Property=\"Margin\" Value=\"0\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\"/>\r\n        <Setter Property=\"Cursor\" Value=\"Arrow\"/>\r\n        <!--<Setter Property=\"TextAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"TextWrapping\" Value=\"NoWrap\"/>-->\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"RadioButton\">\r\n                    <Grid Cursor=\"Arrow\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"Pressed\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Fill\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Fill\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"CheckOut\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"CheckOut\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.125\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.125\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Fill\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.125\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Fill\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.125\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"CheckOut\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.125\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"CheckOut\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.125\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledVisual\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.7\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Content\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"CheckVisual\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\"/>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Unfocused\" >\r\n                                    <Storyboard/>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"ContentFocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ContentFocused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"ContentFocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"*\" />\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <!-- Start:UI -->\r\n                        <Path x:Name=\"Line\" Margin=\"0,0,0,0\" Fill=\"#FFFFFFFF\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Width=\"14\" Height=\"14\" RenderTransformOrigin=\"0.5,0.5\" Data=\"M2.6666667,237.16667 C4.2994065,235.0237 4.2461996,234.08333 7.75,234.08333 C9.1296425,234.08333 10.540268,233.97746 11.916667,234.08333 C12.87594,234.15712 13.290311,234.70699 14,235.41667 C15.771234,237.1879 15.757409,238.28888 15.25,241.33333 C14.939452,243.19662 14.419329,244.38515 12.333333,245.33333 C11.006699,245.93636 10.253301,245.91667 8.75,245.91667 C7.8333335,245.91667 6.9166665,245.91667 6,245.91667 C4.4510226,245.91667 4.9184051,245.96489 3.75,244.66667 C1.6190016,242.29889 1.251086,240.91795 2.6666667,237.16667 z\">\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <Path x:Name=\"Fill\" Margin=\"0,0,0,0\" Fill=\"{TemplateBinding Background}\" Stretch=\"Fill\" StrokeThickness=\"2\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Width=\"9.618\" Height=\"8.04\" RenderTransformOrigin=\"0.5,0.5\" Data=\"M1.2876575,236.0699 C2.9203973,233.92693 5.3235211,233.38657 8.827322,233.38657 C10.206964,233.38657 10.540268,233.97746 11.916667,234.08333 C12.87594,234.15712 13.290311,234.70699 14,235.41667 C15.771234,237.1879 15.493634,238.80948 14.986225,241.85393 C14.675677,243.71722 14.862322,244.8708 12.776326,245.81898 C11.449692,246.42201 10.363843,245.13373 8.8605423,245.13373 C7.9438763,245.13373 6.9166665,245.91667 6,245.91667 C4.4510226,245.91667 1.1887827,244.58354 0.02037777,243.28532 C-2.1106207,240.91754 -0.12792324,239.82118 1.2876575,236.0699 z\">\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <Grid x:Name=\"CheckOut\">\r\n                            <Grid.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                </TransformGroup>\r\n                            </Grid.RenderTransform>\r\n                            <Path x:Name=\"CheckVisual\" Height=\"5\" HorizontalAlignment=\"Center\" Margin=\"0,0,0,0\" VerticalAlignment=\"Center\" Width=\"5\" Fill=\"{TemplateBinding BorderBrush}\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"0.5\" Opacity=\"0\" RenderTransformOrigin=\"0.5,0.5\" Data=\"M7.4375,238.1875 C8.021925,237.78763 8.4588184,237.78125 9.25,237.78125 C10.516856,237.78125 10.221523,237.67723 10.8125,239.1875 C10.928074,239.48285 11.086929,239.70766 11.125,240.03125 C11.160986,240.33713 11.284562,240.83171 11.15625,241.125 C10.730259,242.09869 9.9986687,241.61713 9.21875,242.09375 C8.5447254,242.50566 8.1085663,242.95682 7.0625,242.40625 C6.1778407,241.94064 5.9525313,241.50909 5.84375,240.3125 C5.7126927,238.87086 6.2825603,239.03349 7.5625,238.0625\">\r\n                            </Path>\r\n                        </Grid>\r\n                        <ContentPresenter\r\n                              Grid.Column=\"1\"\r\n                              Content=\"{TemplateBinding Content}\"\r\n                              ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                              Margin=\"4,2,2,1\"\r\n                              IsHitTestVisible=\"true\" />\r\n                        <!--\r\n                              Background=\"Transparent\"\r\n                              FontFamily=\"Arial\"\r\n                              FontSize=\"11\"\r\n                              FontWeight=\"Normal\"\r\n                              FontStretch=\"{TemplateBinding FontStretch}\"\r\n                              FontStyle=\"{TemplateBinding FontStyle}\"\r\n\t\t                      Foreground=\"{TemplateBinding Foreground}\"\r\n                              HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                              Padding=\"{TemplateBinding Padding}\"\r\n                              TextAlignment=\"{TemplateBinding TextAlignment}\"\r\n                              TextDecorations=\"{TemplateBinding TextDecorations}\"\r\n                              TextWrapping=\"{TemplateBinding TextWrapping}\"\r\n                              VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                        \r\n-->\r\n                        <Rectangle x:Name=\"ContentFocusVisualElement\" StrokeDashArray=\"1 2\" Grid.Column=\"1\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\".5\" StrokeDashCap=\"Square\" Margin=\"1\" Visibility=\"Collapsed\" RadiusX=\"2\" RadiusY=\"2\" IsHitTestVisible=\"false\"/>\r\n                        <Path x:Name=\"DisabledVisual\" Height=\"14\" Width=\"14\" Margin=\"0,0,0,0\" Fill=\"#B2FFFFFF\" Stretch=\"Fill\" Stroke=\"#B2FFFFFF\" StrokeThickness=\"2\" Opacity=\"0\" Data=\"M2.6666667,237.16667 C4.2994065,235.0237 4.2461996,234.08333 7.75,234.08333 C9.1296425,234.08333 10.540268,233.97746 11.916667,234.08333 C12.87594,234.15712 13.290311,234.70699 14,235.41667 C15.771234,237.1879 15.757409,238.28888 15.25,241.33333 C14.939452,243.19662 14.419329,244.38515 12.333333,245.33333 C11.006699,245.93636 10.253301,245.91667 8.75,245.91667 C7.8333335,245.91667 6.9166665,245.91667 6,245.91667 C4.4510226,245.91667 4.9184051,245.96489 3.75,244.66667 C1.6190016,242.29889 1.251086,240.91795 2.6666667,237.16667 z\"/>\r\n                        <!-- Start:UI -->\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--ToggleButton-->\r\n    <Style TargetType=\"ToggleButton\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource BorderBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n        <Setter Property=\"Padding\" Value=\"4\" />\r\n        <Setter Property=\"Cursor\" Value=\"Hand\" />\r\n        <!--<Setter Property=\"TextWrapping\" Value=\"NoWrap\" />-->\r\n        <Setter Property=\"Margin\" Value=\"0,-1,0,0\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ToggleButton\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"Pressed\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Noise\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Noise\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Noise\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Noise\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledVisual\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"NoiseOne\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"NoiseTwo\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\" >\r\n                                    <Storyboard/>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Indeterminate\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"NoiseOne\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"NoiseTwo\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n\r\n                        <!-- Start:UI -->\r\n                        <Path Margin=\"-1.25,0,0,-1\" x:Name=\"LineBack\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"#FFFFFFFF\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\">\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <Path HorizontalAlignment=\"Stretch\" Stretch=\"Fill\" Margin=\"1.5,2.5,5.5,2.5\" x:Name=\"Background\" VerticalAlignment=\"Stretch\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"{TemplateBinding Background}\" StrokeThickness=\"2\">\r\n                            <Path.Data>\r\n                                <PathGeometry>\r\n                                    <PathFigure IsClosed=\"True\" StartPoint=\"55.3734893798828,18.3878383636475\">\r\n                                        <BezierSegment Point1=\"55.4575424194336,19.6423645019531\" Point2=\"54.0918769836426,18.1212940216064\" Point3=\"54.1759376525879,19.3758182525635\"/>\r\n                                        <BezierSegment Point1=\"54.1044921875,19.43869972229\" Point2=\"54.1721153259277,19.5379447937012\" Point3=\"54.101448059082,19.5246734619141\"/>\r\n                                        <BezierSegment Point1=\"53.697998046875,19.2345180511475\" Point2=\"53.7027320861816,20.5981388092041\" Point3=\"53.2657089233398,20.5459175109863\"/>\r\n                                        <LineSegment Point=\"54.9807624816895,20.2940578460693\"/>\r\n                                        <BezierSegment Point1=\"55.4915466308594,19.2132472991943\" Point2=\"55.6735687255859,19.6681518554688\" Point3=\"55.5702743530273,19.2230930328369\"/>\r\n                                        <LineSegment Point=\"55.3734893798828,18.3878383636475\"/>\r\n                                    </PathFigure>\r\n                                    <PathFigure IsClosed=\"True\" StartPoint=\"2.75041627883911,4.18817186355591\">\r\n                                        <BezierSegment Point1=\"2.60941195487976,4.23498106002808\" Point2=\"2.44556498527527,4.34848213195801\" Point3=\"2.25126266479492,4.5509033203125\"/>\r\n                                        <BezierSegment Point1=\"1.95730113983154,3.90779161453247\" Point2=\"1.66666030883789,5.07916784286499\" Point3=\"1.46416211128235,5.60511302947998\"/>\r\n                                        <LineSegment Point=\"1.28398549556732,5.28074789047241\"/>\r\n                                        <LineSegment Point=\"1.2844455242157,5.27347755432129\"/>\r\n                                        <LineSegment Point=\"1.43954491615295,5.49028921127319\"/>\r\n                                        <BezierSegment Point1=\"1.46683251857758,5.47077798843384\" Point2=\"1.34879219532013,5.18408298492432\" Point3=\"1.2877790927887,5.220703125\"/>\r\n                                        <LineSegment Point=\"1.2844455242157,5.27347755432129\"/>\r\n                                        <LineSegment Point=\"1.26432502269745,5.24535417556763\"/>\r\n                                        <LineSegment Point=\"1.28398549556732,5.28074789047241\"/>\r\n                                        <LineSegment Point=\"1.26432502269745,5.59193277359009\"/>\r\n                                        <BezierSegment Point1=\"1.28229105472565,5.78759717941284\" Point2=\"1.3096958398819,5.8595871925354\" Point3=\"1.34388554096222,5.84831285476685\"/>\r\n                                        <LineSegment Point=\"1.46416211128235,5.60511302947998\"/>\r\n                                        <LineSegment Point=\"2.18957805633545,6.91105651855469\"/>\r\n                                        <BezierSegment Point1=\"4.89191150665283,6.34800672531128\" Point2=\"3.10698843002319,8.09412384033203\" Point3=\"4.9653377532959,5.38372611999512\"/>\r\n                                        <BezierSegment Point1=\"3.60521507263184,6.80067920684814\" Point2=\"3.73745012283325,3.86050128936768\" Point3=\"2.75041627883911,4.18817186355591\"/>\r\n                                    </PathFigure>\r\n                                    <PathFigure IsClosed=\"True\" StartPoint=\"3.98743844032288,2.72233080863953\">\r\n                                        <BezierSegment Point1=\"3.87878394126892,2.65442371368408\" Point2=\"3.73797965049744,2.68036603927612\" Point3=\"3.53287696838379,2.89400577545166\"/>\r\n                                        <BezierSegment Point1=\"3.3777277469635,2.55462884902954\" Point2=\"3.22433018684387,3.17277550697327\" Point3=\"3.11745405197144,3.45032072067261\"/>\r\n                                        <LineSegment Point=\"3.02235960960388,3.27914905548096\"/>\r\n                                        <LineSegment Point=\"3.02260160446167,3.27531266212463\"/>\r\n                                        <LineSegment Point=\"3.01198220252991,3.2604718208313\"/>\r\n                                        <LineSegment Point=\"3.02235960960388,3.27914905548096\"/>\r\n                                        <LineSegment Point=\"3.01198220252991,3.44336438179016\"/>\r\n                                        <BezierSegment Point1=\"3.01268339157104,3.45099830627441\" Point2=\"3.01341199874878,3.45827555656433\" Point3=\"3.11745405197144,3.45032072067261\"/>\r\n                                        <LineSegment Point=\"3.50032067298889,4.13947582244873\"/>\r\n                                        <LineSegment Point=\"4.19300651550293,4.08932685852051\"/>\r\n                                        <BezierSegment Point1=\"4.57573270797729,4.15608644485474\" Point2=\"4.22972536087036,4.40621519088745\" Point3=\"4.9653377532959,3.33349204063416\"/>\r\n                                        <BezierSegment Point1=\"4.35003042221069,3.97440934181213\" Point2=\"4.31340551376343,2.92605090141296\" Point3=\"3.98743844032288,2.72233080863953\"/>\r\n                                    </PathFigure>\r\n                                    <PathFigure IsClosed=\"True\" StartPoint=\"43.6054306030273,2.55744552612305\">\r\n                                        <LineSegment Point=\"42.7685508728027,3.07746315002441\"/>\r\n                                        <BezierSegment Point1=\"42.8401260375977,3.02574563026428\" Point2=\"44.8010520935059,3.60871481895447\" Point3=\"44.8063468933105,3.56444692611694\"/>\r\n                                        <LineSegment Point=\"47.3169860839844,3.1744339466095\"/>\r\n                                        <BezierSegment Point1=\"47.7981910705566,2.0477294921875\" Point2=\"50.5490341186523,3.69445133209229\" Point3=\"50.9364852905273,2.43774271011353\"/>\r\n                                        <LineSegment Point=\"46.9194679260254,2.11273193359375\"/>\r\n                                        <BezierSegment Point1=\"45.9232177734375,2.00986051559448\" Point2=\"42.2318840026855,3.34697723388672\" Point3=\"43.6054306030273,2.55744552612305\"/>\r\n                                    </PathFigure>\r\n                                    <PathFigure IsClosed=\"True\" StartPoint=\"16.5382518768311,2.38410639762878\">\r\n                                        <BezierSegment Point1=\"17.9376049041748,2.47057723999023\" Point2=\"28.9235725402832,0.979193687438965\" Point3=\"30.961519241333,1.25740206241608\"/>\r\n                                        <BezierSegment Point1=\"39.7206230163574,2.45314311981201\" Point2=\"36.6131362915039,2.46526336669922\" Point3=\"45.4653663635254,2.03742814064026\"/>\r\n                                        <BezierSegment Point1=\"48.1704330444336,1.90669059753418\" Point2=\"53.7993202209473,2.94819211959839\" Point3=\"56.5043983459473,2.81745433807373\"/>\r\n                                        <BezierSegment Point1=\"57.6275444030762,2.76317286491394\" Point2=\"58.8492164611816,1.81751883029938\" Point3=\"58.7605514526367,4.98419380187988\"/>\r\n                                        <BezierSegment Point1=\"58.6914901733398,7.45075988769531\" Point2=\"59.2414894104004,7.46710634231567\" Point3=\"59.1634330749512,9.40434169769287\"/>\r\n                                        <LineSegment Point=\"59.1302642822266,9.42093944549561\"/>\r\n                                        <BezierSegment Point1=\"58.9689521789551,9.46572589874268\" Point2=\"58.8931922912598,9.64298820495605\" Point3=\"58.9885597229004,10.0852022171021\"/>\r\n                                        <LineSegment Point=\"58.7547225952148,10.0751485824585\"/>\r\n                                        <BezierSegment Point1=\"58.7845993041992,10.1730222702026\" Point2=\"59.0883674621582,10.4170408248901\" Point3=\"59.129207611084,10.4465093612671\"/>\r\n                                        <LineSegment Point=\"58.9072380065918,10.2733154296875\"/>\r\n                                        <BezierSegment Point1=\"58.2435150146484,9.76523780822754\" Point2=\"58.5282859802246,11.6655864715576\" Point3=\"57.8627014160156,11.4802284240723\"/>\r\n                                        <BezierSegment Point1=\"57.8627014160156,11.4802284240723\" Point2=\"58.1601409912109,13.5446062088013\" Point3=\"58.357666015625,14.1711664199829\"/>\r\n                                        <BezierSegment Point1=\"58.9370613098145,16.0090198516846\" Point2=\"58.3653373718262,16.4901638031006\" Point3=\"58.357666015625,18.4179744720459\"/>\r\n                                        <BezierSegment Point1=\"58.3484077453613,20.745641708374\" Point2=\"60.4300498962402,21.9203453063965\" Point3=\"56.8666801452637,21.5362567901611\"/>\r\n                                        <BezierSegment Point1=\"45.6265144348145,20.32470703125\" Point2=\"39.9008178710938,21.5664978027344\" Point3=\"30.3169002532959,20.9313945770264\"/>\r\n                                        <BezierSegment Point1=\"24.7872543334961,20.5649566650391\" Point2=\"17.0756797790527,21.3352470397949\" Point3=\"11.5372772216797,21.6029224395752\"/>\r\n                                        <BezierSegment Point1=\"9.37526988983154,21.7074146270752\" Point2=\"6.82023525238037,22.2953662872314\" Point3=\"4.65164470672607,21.9357109069824\"/>\r\n                                        <BezierSegment Point1=\"1.45201742649078,21.4050598144531\" Point2=\"1.73953628540039,23.0963401794434\" Point3=\"1.51341998577118,17.1753234863281\"/>\r\n                                        <BezierSegment Point1=\"1.38521957397461,13.8183069229126\" Point2=\"0.133225455880165,11.0509176254272\" Point3=\"0.00502508180215955,7.6939001083374\"/>\r\n                                        <BezierSegment Point1=\"-0.0463196896016598,6.3494029045105\" Point2=\"0.306805700063705,4.28786516189575\" Point3=\"0.562162816524506,2.95534110069275\"/>\r\n                                        <LineSegment Point=\"2.65466785430908,2.14960050582886\"/>\r\n                                        <BezierSegment Point1=\"5.5844030380249,2.0080041885376\" Point2=\"7.20274591445923,3.57988381385803\" Point3=\"10.0115203857422,2.2107675075531\"/>\r\n                                        <BezierSegment Point1=\"11.7393894195557,1.36852860450745\" Point2=\"15.138897895813,2.29763579368591\" Point3=\"16.5382518768311,2.38410639762878\"/>\r\n                                    </PathFigure>\r\n                                </PathGeometry>\r\n                            </Path.Data>\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform X=\"1.4916732314436434\" Y=\"-0.23907148924159571\"/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <Path Margin=\"-1.25,0,0,-1\" x:Name=\"Line\" RenderTransformOrigin=\"0.5,0.5\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\">\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <ContentPresenter\r\n                              x:Name=\"contentPresenter\"\r\n                              Content=\"{TemplateBinding Content}\"\r\n                              ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                              RenderTransformOrigin=\"0.5,0.5\" \r\n                            \r\n                              HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" \r\n                              Margin=\"{TemplateBinding Padding}\"\r\n                              VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" \r\n                            >\r\n                            <!--\r\n                              FontFamily=\"Arial\"\r\n                              FontSize=\"11\"\r\n                              FontWeight=\"Bold\"\r\n                              FontStretch=\"{TemplateBinding FontStretch}\"\r\n                              FontStyle=\"{TemplateBinding FontStyle}\"\r\n                              Foreground=\"{TemplateBinding Foreground}\"\r\n                              Padding=\"{TemplateBinding Padding}\"\r\n                              TextDecorations=\"{TemplateBinding TextDecorations}\"\r\n                              TextWrapping=\"{TemplateBinding TextWrapping}\"\r\n                              TextAlignment=\"Center\"\r\n                              VerticalContentAlignment=\"Center\"\r\n                              HorizontalContentAlignment=\"Center\"\r\n                            \r\n-->\r\n                            <ContentPresenter.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </ContentPresenter.RenderTransform>\r\n                        </ContentPresenter>\r\n                        <Grid Margin=\"-0.185,-1.02,0.125,-0.375\" x:Name=\"Noise\" RenderTransformOrigin=\"0.5,0.5\">\r\n                            <Grid.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Grid.RenderTransform>\r\n                            <Grid Margin=\"2.625,3.625,0,0\" x:Name=\"NoiseOne\" Opacity=\"0\">\r\n                                <Path Height=\"2.018\" HorizontalAlignment=\"Right\" Margin=\"0,0,0.625,7.635\" VerticalAlignment=\"Bottom\" Width=\"6\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M58.25,17.625 C61.473705,16.819075 58.619175,15.871116 62,18.125 C62.438251,18.417168 63.276283,18.067675 63.75,18\"/>\r\n                                <Path HorizontalAlignment=\"Right\" Margin=\"0,9.75,0.375,10.984\" Width=\"7.625\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M56.265625,12.717266 C58.762352,14.039062 59.299107,14.252841 62.25,12.375 C62.36116,12.30426 62.504715,12.446218 62.625,12.5 C62.931671,12.637115 63.193027,12.863567 63.5,13 C63.576153,13.033845 63.673012,13.03189 63.75,13 C63.858879,12.954901 63.88221,12.746201 64,12.75\"/>\r\n                                <Path Height=\"2.971\" HorizontalAlignment=\"Right\" Margin=\"0,4.164,0,0\" VerticalAlignment=\"Top\" Width=\"7.5\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M57.375,7.75 C61.094475,7.75 59.169235,5.0442362 62.75,8.625 C63.768261,9.64326 62.873402,9.1565504 64.375,8.875\"/>\r\n                                <Path HorizontalAlignment=\"Right\" Margin=\"0,0,0.375,2.947\" Width=\"7.167\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M56.895832,11.943392 C59.392559,13.265187 59.299107,14.252841 62.25,12.375 C62.36116,12.30426 62.504715,12.446218 62.625,12.5 C62.931671,12.637115 63.193027,12.863567 63.5,13 C63.576153,13.033845 63.673012,13.03189 63.75,13 C63.858879,12.954901 63.88221,12.746201 64,12.75\" Height=\"3.095\" VerticalAlignment=\"Bottom\"/>\r\n                                <Path HorizontalAlignment=\"Right\" Margin=\"0,0,0.375,0\" Width=\"7.625\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M56.265625,12.717266 C58.762352,14.039062 59.299107,14.252841 62.25,12.375 C62.36116,12.30426 62.504715,12.446218 62.625,12.5 C62.931671,12.637115 63.193027,12.863567 63.5,13 C63.576153,13.033845 63.673012,13.03189 63.75,13 C63.858879,12.954901 63.88221,12.746201 64,12.75\" Height=\"3.035\" VerticalAlignment=\"Top\"/>\r\n                                <Path HorizontalAlignment=\"Right\" Margin=\"0,7.035,0.625,0\" Width=\"6\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M58.5,12.625 C60.996727,13.946795 59.299107,14.252841 62.25,12.375 C62.36116,12.30426 62.504715,12.446218 62.625,12.5 C62.931671,12.637115 63.193027,12.863567 63.5,13 C63.576153,13.033845 63.673012,13.03189 63.75,13 C63.858879,12.954901 63.88221,12.746201 64,12.75\" Height=\"1.844\" VerticalAlignment=\"Top\"/>\r\n                            </Grid>\r\n                            <Grid Margin=\"0,0,2.625,3.625\" x:Name=\"NoiseTwo\" Opacity=\"0\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                <Grid.RenderTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform/>\r\n                                        <SkewTransform/>\r\n                                        <RotateTransform Angle=\"-180\"/>\r\n                                        <TranslateTransform/>\r\n                                    </TransformGroup>\r\n                                </Grid.RenderTransform>\r\n                                <Path Height=\"2.018\" HorizontalAlignment=\"Right\" Margin=\"0,0,0.25,7.635\" VerticalAlignment=\"Bottom\" Width=\"6\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M58.25,17.625 C61.473705,16.819075 58.619175,15.871116 62,18.125 C62.438251,18.417168 63.276283,18.067675 63.75,18\"/>\r\n                                <Path HorizontalAlignment=\"Right\" Margin=\"0,9.75,0.375,10.984\" Width=\"7.625\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M56.265625,12.717266 C58.762352,14.039062 59.299107,14.252841 62.25,12.375 C62.36116,12.30426 62.504715,12.446218 62.625,12.5 C62.931671,12.637115 63.193027,12.863567 63.5,13 C63.576153,13.033845 63.673012,13.03189 63.75,13 C63.858879,12.954901 63.88221,12.746201 64,12.75\"/>\r\n                                <Path Height=\"2.971\" HorizontalAlignment=\"Right\" Margin=\"0,4.164,0,0\" VerticalAlignment=\"Top\" Width=\"7.5\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M57.375,7.75 C61.094475,7.75 59.169235,5.0442362 62.75,8.625 C63.768261,9.64326 62.873402,9.1565504 64.375,8.875\"/>\r\n                                <Path HorizontalAlignment=\"Right\" Margin=\"0,0,0.375,3.891\" Width=\"6\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M58.5,12.625 C60.996727,13.946795 59.299107,14.252841 62.25,12.375 C62.36116,12.30426 62.504715,12.446218 62.625,12.5 C62.931671,12.637115 63.193027,12.863567 63.5,13 C63.576153,13.033845 63.673012,13.03189 63.75,13 C63.858879,12.954901 63.88221,12.746201 64,12.75\" Height=\"1.844\" VerticalAlignment=\"Bottom\"/>\r\n                                <Path HorizontalAlignment=\"Right\" Margin=\"0,7.035,-0.315,0\" Width=\"6.94\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M58.5,12.625 C60.996727,13.946795 59.299107,14.252841 62.25,12.375 C62.36116,12.30426 62.504715,12.446218 62.625,12.5 C62.931671,12.637115 63.193027,12.863567 63.5,13 C63.576153,13.033845 63.673012,13.03189 63.75,13 C63.858879,12.954901 65.174706,12.864925 65.292496,12.868725\" Height=\"3\" VerticalAlignment=\"Top\"/>\r\n                                <Path Height=\"2.018\" HorizontalAlignment=\"Right\" Margin=\"0,0,1.5,0\" VerticalAlignment=\"Top\" Width=\"6\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M58.25,17.625 C61.473705,16.819075 58.619175,15.871116 62,18.125 C62.438251,18.417168 63.276283,18.067675 63.75,18\"/>\r\n                                <Path HorizontalAlignment=\"Right\" Margin=\"0,-3.299,2,0\" Width=\"6\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M58.5,12.625 C60.996727,13.946795 59.299107,14.252841 62.25,12.375 C62.36116,12.30426 62.504715,12.446218 62.625,12.5 C62.931671,12.637115 63.193027,12.863567 63.5,13 C63.576153,13.033845 63.673012,13.03189 63.75,13 C63.858879,12.954901 63.88221,12.746201 64,12.75\" Height=\"1.844\" VerticalAlignment=\"Top\"/>\r\n                            </Grid>\r\n                        </Grid>\r\n                        <Path Margin=\"2.75,4.375,4,3.5\" x:Name=\"FocusVisual\" StrokeDashArray=\"1 2\" RenderTransformOrigin=\"0.5,0.5\" Visibility=\"Collapsed\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"0.5\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\">\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <Path Margin=\"-1.25,0,0,-1\" x:Name=\"DisabledVisual\" Stretch=\"Fill\" Stroke=\"#B2FFFFFF\" StrokeThickness=\"2\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\" Opacity=\"0\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"#B2FFFFFF\">\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <!-- End:UI -->\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--Thumb-->\r\n    <Style TargetType=\"Thumb\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource BorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Thumb\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"Pressed\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledVisual\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n\r\n                        <!--Start UI-->\r\n                        <Path Margin=\"-1.25,0,0,-1\" x:Name=\"LineBack\" Fill=\"#FFFFFFFF\" RenderTransformOrigin=\"0.5,0.5\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\">\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <Path HorizontalAlignment=\"Stretch\" Stretch=\"Fill\" Margin=\"1,2,5,2\" x:Name=\"Background\" VerticalAlignment=\"Stretch\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"{TemplateBinding Background}\" StrokeThickness=\"2\">\r\n                            <Path.Data>\r\n                                <PathGeometry>\r\n                                    <PathFigure IsClosed=\"True\" StartPoint=\"55.3734893798828,18.3878383636475\">\r\n                                        <BezierSegment Point1=\"55.4575424194336,19.6423645019531\" Point2=\"54.0918769836426,18.1212940216064\" Point3=\"54.1759376525879,19.3758182525635\"/>\r\n                                        <BezierSegment Point1=\"54.1044921875,19.43869972229\" Point2=\"54.1721153259277,19.5379447937012\" Point3=\"54.101448059082,19.5246734619141\"/>\r\n                                        <BezierSegment Point1=\"53.697998046875,19.2345180511475\" Point2=\"53.7027320861816,20.5981388092041\" Point3=\"53.2657089233398,20.5459175109863\"/>\r\n                                        <LineSegment Point=\"54.9807624816895,20.2940578460693\"/>\r\n                                        <BezierSegment Point1=\"55.4915466308594,19.2132472991943\" Point2=\"55.6735687255859,19.6681518554688\" Point3=\"55.5702743530273,19.2230930328369\"/>\r\n                                        <LineSegment Point=\"55.3734893798828,18.3878383636475\"/>\r\n                                    </PathFigure>\r\n                                    <PathFigure IsClosed=\"True\" StartPoint=\"2.75041627883911,4.18817186355591\">\r\n                                        <BezierSegment Point1=\"2.60941195487976,4.23498106002808\" Point2=\"2.44556498527527,4.34848213195801\" Point3=\"2.25126266479492,4.5509033203125\"/>\r\n                                        <BezierSegment Point1=\"1.95730113983154,3.90779161453247\" Point2=\"1.66666030883789,5.07916784286499\" Point3=\"1.46416211128235,5.60511302947998\"/>\r\n                                        <LineSegment Point=\"1.28398549556732,5.28074789047241\"/>\r\n                                        <LineSegment Point=\"1.2844455242157,5.27347755432129\"/>\r\n                                        <LineSegment Point=\"1.43954491615295,5.49028921127319\"/>\r\n                                        <BezierSegment Point1=\"1.46683251857758,5.47077798843384\" Point2=\"1.34879219532013,5.18408298492432\" Point3=\"1.2877790927887,5.220703125\"/>\r\n                                        <LineSegment Point=\"1.2844455242157,5.27347755432129\"/>\r\n                                        <LineSegment Point=\"1.26432502269745,5.24535417556763\"/>\r\n                                        <LineSegment Point=\"1.28398549556732,5.28074789047241\"/>\r\n                                        <LineSegment Point=\"1.26432502269745,5.59193277359009\"/>\r\n                                        <BezierSegment Point1=\"1.28229105472565,5.78759717941284\" Point2=\"1.3096958398819,5.8595871925354\" Point3=\"1.34388554096222,5.84831285476685\"/>\r\n                                        <LineSegment Point=\"1.46416211128235,5.60511302947998\"/>\r\n                                        <LineSegment Point=\"2.18957805633545,6.91105651855469\"/>\r\n                                        <BezierSegment Point1=\"4.89191150665283,6.34800672531128\" Point2=\"3.10698843002319,8.09412384033203\" Point3=\"4.9653377532959,5.38372611999512\"/>\r\n                                        <BezierSegment Point1=\"3.60521507263184,6.80067920684814\" Point2=\"3.73745012283325,3.86050128936768\" Point3=\"2.75041627883911,4.18817186355591\"/>\r\n                                    </PathFigure>\r\n                                    <PathFigure IsClosed=\"True\" StartPoint=\"3.98743844032288,2.72233080863953\">\r\n                                        <BezierSegment Point1=\"3.87878394126892,2.65442371368408\" Point2=\"3.73797965049744,2.68036603927612\" Point3=\"3.53287696838379,2.89400577545166\"/>\r\n                                        <BezierSegment Point1=\"3.3777277469635,2.55462884902954\" Point2=\"3.22433018684387,3.17277550697327\" Point3=\"3.11745405197144,3.45032072067261\"/>\r\n                                        <LineSegment Point=\"3.02235960960388,3.27914905548096\"/>\r\n                                        <LineSegment Point=\"3.02260160446167,3.27531266212463\"/>\r\n                                        <LineSegment Point=\"3.01198220252991,3.2604718208313\"/>\r\n                                        <LineSegment Point=\"3.02235960960388,3.27914905548096\"/>\r\n                                        <LineSegment Point=\"3.01198220252991,3.44336438179016\"/>\r\n                                        <BezierSegment Point1=\"3.01268339157104,3.45099830627441\" Point2=\"3.01341199874878,3.45827555656433\" Point3=\"3.11745405197144,3.45032072067261\"/>\r\n                                        <LineSegment Point=\"3.50032067298889,4.13947582244873\"/>\r\n                                        <LineSegment Point=\"4.19300651550293,4.08932685852051\"/>\r\n                                        <BezierSegment Point1=\"4.57573270797729,4.15608644485474\" Point2=\"4.22972536087036,4.40621519088745\" Point3=\"4.9653377532959,3.33349204063416\"/>\r\n                                        <BezierSegment Point1=\"4.35003042221069,3.97440934181213\" Point2=\"4.31340551376343,2.92605090141296\" Point3=\"3.98743844032288,2.72233080863953\"/>\r\n                                    </PathFigure>\r\n                                    <PathFigure IsClosed=\"True\" StartPoint=\"43.6054306030273,2.55744552612305\">\r\n                                        <LineSegment Point=\"42.7685508728027,3.07746315002441\"/>\r\n                                        <BezierSegment Point1=\"42.8401260375977,3.02574563026428\" Point2=\"44.8010520935059,3.60871481895447\" Point3=\"44.8063468933105,3.56444692611694\"/>\r\n                                        <LineSegment Point=\"47.3169860839844,3.1744339466095\"/>\r\n                                        <BezierSegment Point1=\"47.7981910705566,2.0477294921875\" Point2=\"50.5490341186523,3.69445133209229\" Point3=\"50.9364852905273,2.43774271011353\"/>\r\n                                        <LineSegment Point=\"46.9194679260254,2.11273193359375\"/>\r\n                                        <BezierSegment Point1=\"45.9232177734375,2.00986051559448\" Point2=\"42.2318840026855,3.34697723388672\" Point3=\"43.6054306030273,2.55744552612305\"/>\r\n                                    </PathFigure>\r\n                                    <PathFigure IsClosed=\"True\" StartPoint=\"16.5382518768311,2.38410639762878\">\r\n                                        <BezierSegment Point1=\"17.9376049041748,2.47057723999023\" Point2=\"28.9235725402832,0.979193687438965\" Point3=\"30.961519241333,1.25740206241608\"/>\r\n                                        <BezierSegment Point1=\"39.7206230163574,2.45314311981201\" Point2=\"36.6131362915039,2.46526336669922\" Point3=\"45.4653663635254,2.03742814064026\"/>\r\n                                        <BezierSegment Point1=\"48.1704330444336,1.90669059753418\" Point2=\"53.7993202209473,2.94819211959839\" Point3=\"56.5043983459473,2.81745433807373\"/>\r\n                                        <BezierSegment Point1=\"57.6275444030762,2.76317286491394\" Point2=\"58.8492164611816,1.81751883029938\" Point3=\"58.7605514526367,4.98419380187988\"/>\r\n                                        <BezierSegment Point1=\"58.6914901733398,7.45075988769531\" Point2=\"59.2414894104004,7.46710634231567\" Point3=\"59.1634330749512,9.40434169769287\"/>\r\n                                        <LineSegment Point=\"59.1302642822266,9.42093944549561\"/>\r\n                                        <BezierSegment Point1=\"58.9689521789551,9.46572589874268\" Point2=\"58.8931922912598,9.64298820495605\" Point3=\"58.9885597229004,10.0852022171021\"/>\r\n                                        <LineSegment Point=\"58.7547225952148,10.0751485824585\"/>\r\n                                        <BezierSegment Point1=\"58.7845993041992,10.1730222702026\" Point2=\"59.0883674621582,10.4170408248901\" Point3=\"59.129207611084,10.4465093612671\"/>\r\n                                        <LineSegment Point=\"58.9072380065918,10.2733154296875\"/>\r\n                                        <BezierSegment Point1=\"58.2435150146484,9.76523780822754\" Point2=\"58.5282859802246,11.6655864715576\" Point3=\"57.8627014160156,11.4802284240723\"/>\r\n                                        <BezierSegment Point1=\"57.8627014160156,11.4802284240723\" Point2=\"58.1601409912109,13.5446062088013\" Point3=\"58.357666015625,14.1711664199829\"/>\r\n                                        <BezierSegment Point1=\"58.9370613098145,16.0090198516846\" Point2=\"58.3653373718262,16.4901638031006\" Point3=\"58.357666015625,18.4179744720459\"/>\r\n                                        <BezierSegment Point1=\"58.3484077453613,20.745641708374\" Point2=\"60.4300498962402,21.9203453063965\" Point3=\"56.8666801452637,21.5362567901611\"/>\r\n                                        <BezierSegment Point1=\"45.6265144348145,20.32470703125\" Point2=\"39.9008178710938,21.5664978027344\" Point3=\"30.3169002532959,20.9313945770264\"/>\r\n                                        <BezierSegment Point1=\"24.7872543334961,20.5649566650391\" Point2=\"17.0756797790527,21.3352470397949\" Point3=\"11.5372772216797,21.6029224395752\"/>\r\n                                        <BezierSegment Point1=\"9.37526988983154,21.7074146270752\" Point2=\"6.82023525238037,22.2953662872314\" Point3=\"4.65164470672607,21.9357109069824\"/>\r\n                                        <BezierSegment Point1=\"1.45201742649078,21.4050598144531\" Point2=\"1.73953628540039,23.0963401794434\" Point3=\"1.51341998577118,17.1753234863281\"/>\r\n                                        <BezierSegment Point1=\"1.38521957397461,13.8183069229126\" Point2=\"0.133225455880165,11.0509176254272\" Point3=\"0.00502508180215955,7.6939001083374\"/>\r\n                                        <BezierSegment Point1=\"-0.0463196896016598,6.3494029045105\" Point2=\"0.306805700063705,4.28786516189575\" Point3=\"0.562162816524506,2.95534110069275\"/>\r\n                                        <LineSegment Point=\"2.65466785430908,2.14960050582886\"/>\r\n                                        <BezierSegment Point1=\"5.5844030380249,2.0080041885376\" Point2=\"7.20274591445923,3.57988381385803\" Point3=\"10.0115203857422,2.2107675075531\"/>\r\n                                        <BezierSegment Point1=\"11.7393894195557,1.36852860450745\" Point2=\"15.138897895813,2.29763579368591\" Point3=\"16.5382518768311,2.38410639762878\"/>\r\n                                    </PathFigure>\r\n                                </PathGeometry>\r\n                            </Path.Data>\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform X=\"1.4916732314436434\" Y=\"-0.23907148924159571\"/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <Path Margin=\"-1.25,0,0,-1\" x:Name=\"Line\" RenderTransformOrigin=\"0.5,0.5\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\">\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <Path Margin=\"2.75,4.375,4,3.5\" x:Name=\"FocusVisualElement\" StrokeDashArray=\"1 2\" RenderTransformOrigin=\"0.5,0.5\" Visibility=\"Collapsed\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"0.5\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\">\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <Path Margin=\"-1.25,0,0,-1\" x:Name=\"DisabledVisual\" Stretch=\"Fill\" Stroke=\"#B2FFFFFF\" StrokeThickness=\"2\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\" Opacity=\"0\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"#B2FFFFFF\">\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <!--End UI-->\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--Slider-->\r\n    <Style TargetType=\"Slider\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Slider\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <Grid.Resources>\r\n                            <ControlTemplate x:Key=\"RepeatButtonTemplate\">\r\n                                <Grid x:Name=\"Root\" Opacity=\"0\" Background=\"Transparent\"/>\r\n                            </ControlTemplate>\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Root\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Unfocused\">\r\n                                    <Storyboard/>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid x:Name=\"HorizontalTemplate\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <Path Grid.Column=\"0\" Grid.ColumnSpan=\"3\" Height=\"4\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Data=\"M18.75,122 C39.116455,122 60.341763,125.40137 80.75,122 C85.406425,121.22393 88.864746,120.25 94.25,120.25 C100.58633,120.25 106.7787,121.25 113,121.25 C118.82059,121.25 124.48981,123.30612 130.5,123.5\" Stretch=\"Fill\" Stroke=\"{StaticResource BorderBrush}\" StrokeThickness=\"2\" />\r\n                            <Path Grid.Column=\"0\" Grid.ColumnSpan=\"3\" Height=\"6.5\" StrokeThickness=\".5\" HorizontalAlignment=\"Center\" Margin=\"20,0,15,0\" VerticalAlignment=\"Center\" Data=\"M23,125.25 C36.334629,122.89683 47.114662,121 60.75,121 C67,121 76,122.25 82.25,122.25 C88.080826,122.25 106.59772,120.31523 112.25,119.75\" Stretch=\"Fill\" Stroke=\"{StaticResource BorderBrush}\"/>\r\n\r\n\r\n                            <Track x:Name=\"PART_Track\" Grid.Column=\"0\" Grid.ColumnSpan=\"3\">\r\n                                <Track.Thumb>\r\n                                    <Thumb Background=\"{TemplateBinding Background}\" Height=\"20\" Width=\"16\" />\r\n                                </Track.Thumb>\r\n                                <Track.IncreaseRepeatButton>\r\n                                    <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Command=\"Slider.IncreaseLarge\" />\r\n                                </Track.IncreaseRepeatButton>\r\n                                <Track.DecreaseRepeatButton>\r\n                                    <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Command=\"Slider.DecreaseLarge\" />\r\n                                </Track.DecreaseRepeatButton>\r\n                            </Track>\r\n                        </Grid>\r\n                        <Grid x:Name=\"VerticalTemplate\" Visibility=\"Collapsed\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"*\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <Path Grid.Row=\"0\" Grid.RowSpan=\"3\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Width=\"10\" Data=\"M113,31 C113,70.161034 108.01472,114.58094 115,153 C120.63165,183.97409 108,213.89046 108,246\" Stretch=\"Fill\" Stroke=\"#FF000000\" StrokeThickness=\"2\" Grid.Column=\"0\" Grid.ColumnSpan=\"3\" />\r\n                            <Path Grid.Row=\"0\" Grid.RowSpan=\"3\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Width=\"5\" Data=\"M111,57 C113.85657,84.613487 110.98022,105.44611 112,134 C113,162 106,163 114,216\" Stretch=\"Fill\" Stroke=\"#FF000000\" StrokeThickness=\"1\" Grid.Column=\"0\" Grid.ColumnSpan=\"3\" />\r\n                            <RepeatButton x:Name=\"VerticalTrackLargeChangeDecreaseRepeatButton\" IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Grid.Row=\"2\"/>\r\n                            <Thumb Background=\"{TemplateBinding Background}\" Height=\"16\" Width=\"20\" x:Name=\"VerticalThumb\" Grid.Row=\"1\"/>\r\n                            <RepeatButton x:Name=\"VerticalTrackLargeChangeIncreaseRepeatButton\" IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Grid.Row=\"0\"/>\r\n                        </Grid>\r\n                        <Rectangle x:Name=\"FocusVisual\" Stroke=\"#FF999999\" StrokeDashArray=\"1 2\" StrokeThickness=\".65\" Opacity=\"1\" StrokeDashCap=\"Square\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--TextBox-->\r\n    <Style TargetType=\"TextBox\">\r\n        <Setter Property=\"Background\" Value=\"#FFFFFFFF\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource BorderBrush}\"/>\r\n        <Setter Property=\"FontSize\" Value=\"11\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"Arial\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TextBox\">\r\n                    <Grid x:Name=\"RootElement\">\r\n                        <Grid.Resources>\r\n                            <Storyboard x:Key=\"Normal State\">\r\n                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"Focused State\">\r\n                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                        </Grid.Resources>\r\n\r\n                        <Grid x:Name=\"Background\">\r\n                            <Path x:Name=\"Wiggles\" StrokeThickness=\"2\" Fill=\"#FFFFFFFF\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" Data=\"M0.66666669,0.83333331 C22.98843,0.83333331 17.999788,1.0007761 41.49995,1.5003691 C46.659081,1.6100477 78.647705,0.66666669 83.833336,0.66666669 C87.669823,0.66666669 91.711746,1.1313757 95.5,0.5 C101.84077,-0.55679578 99.333336,7.3401279 99.333336,17.666666 C99.333336,21.970675 101.8026,20.833334 93.166664,20.833334 C87.083107,20.833334 81.223564,20.838076 75.166664,20.333334 C64.167976,19.416775 52.892971,20.99983 41.833286,20.99983 C29.611065,20.99983 17.388889,20.166666 5.1666665,20.166666 C0.80628252,20.166666 0.83333331,24.179943 0.83333331,15.333333 C0.83333331,10.525309 1.2613385,5.5907078 0.66666669,0.83333331 z\"/>\r\n                            <Border x:Name=\"ContentElement\" Margin=\"5,5,5,2\">\r\n                                <ScrollViewer BorderThickness=\"0\" IsTabStop=\"False\" Padding=\"{TemplateBinding Padding}\" x:Name=\"PART_ContentHost\" />\r\n                            </Border>\r\n                            <Path x:Name=\"FocusVisual\" Opacity=\"0\" StrokeThickness=\".5\" StrokeDashArray=\"1 2\" RenderTransformOrigin=\"0.5,0.5\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" Data=\"M0.66666669,0.83333331 C22.98843,0.83333331 17.999788,1.0007761 41.49995,1.5003691 C46.659081,1.6100477 78.647705,0.66666669 83.833336,0.66666669 C87.669823,0.66666669 91.711746,1.1313757 95.5,0.5 C101.84077,-0.55679578 99.333336,7.3401279 99.333336,17.666666 C99.333336,21.970675 101.8026,20.833334 93.166664,20.833334 C87.083107,20.833334 81.223564,20.838076 75.166664,20.333334 C64.167976,19.416775 52.892971,20.99983 41.833286,20.99983 C29.611065,20.99983 17.388889,20.166666 5.1666665,20.166666 C0.80628252,20.166666 0.83333331,24.179943 0.83333331,15.333333 C0.83333331,10.525309 1.2613385,5.5907078 0.66666669,0.83333331 z\">\r\n                                <Path.RenderTransform>\r\n                                    <ScaleTransform ScaleX=\".95\" ScaleY=\".6\"/>\r\n                                </Path.RenderTransform>\r\n                            </Path>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--ListBox-->\r\n    <Style TargetType=\"ListBox\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource BorderBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n        <Setter Property=\"Padding\" Value=\"0\"/>\r\n        <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\"/>\r\n        <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\"/>\r\n        <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"True\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ListBox\">\r\n                    <Grid>\r\n                        <Path Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Fill=\"#FFFFFFFF\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M8.0486603,-1.7956065 C40.652985,-1.2334629 60.802299,5.3778448 94.571907,-3.8320472 C132.02231,-14.045796 175.82878,1 215,1 C278.08371,1 340.94531,1 405,1 C447.66666,1 488.54492,0.24040417 531.21155,0.24040417 C560.38153,0.24040417 624.77802,-6.8858747 639.86951,-0.77759421 C642.52252,0.29620132 639.86847,98.304474 639.86847,124.43706 C639.86847,190.61852 640.87457,264.57269 640.87457,330.07413 C640.87457,369.30386 637.85645,396.94827 637.85645,435.94669 C637.85645,441.81662 648.37085,477.30365 637.85669,479.72144 C615.7226,484.81128 553.33221,480.23886 538.25421,479.72162 C360.17755,473.61288 232.40511,488.88297 2,479 C4.0243306,313.78604 0,161.53839 0,3 C0.66666669,3 2.3515811,1.2584095 3.0182476,1.2584095 C3.0182476,0.59174258 8.0486603,-1.1289399 8.0486603,-1.7956065 z\"/>\r\n                        <ScrollViewer Margin=\"5\" Foreground=\"{TemplateBinding Foreground}\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" x:Name=\"ScrollViewer\">\r\n                            <ItemsPresenter />\r\n                        </ScrollViewer>\r\n                        <Path Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"0.5\" Margin=\"-0.094,0.769,0.799,-0.479\" Data=\"M1.7206836,12.568695 C2.4419925,11.031993 1.4481189,7.3090796 1.7209258,5.6722374 C2.2648225,2.4088583 0.46910813,5.715632 5.1693902,3.7012255 C10.004368,1.6290923 20.664461,1.2662256 26,2.3333333 C36.24308,4.3819494 47.8027,3.6553195 58.131069,2.7163765 C68.803482,1.7461575 79.164429,1.9772166 89.908081,1.9772166 C100.39313,1.9772166 98,-0.96195835 98,16.333334 C98,23.112209 96.493988,25.349688 97.298027,31.782001 C98.258453,39.465462 97.476074,52.003723 97.29808,59.862312 C97.103302,68.46196 97.666664,74.564713 97.666664,83 C97.666664,108.95624 103.8933,92.074692 62.072483,97.302299 C52.738716,98.469017 39.806664,100.01 30.333334,99.333336 C22.81004,98.795952 7.3937144,97.694511 1.967056,97.548622 C-0.28294224,97.488136 1.5684019,88.452782 2.3333333,82.333336 C3.1227529,76.017975 2.5054271,71.237221 2,64.666664 C0.6911695,47.651871 3.9379203,29.072496 1.720971,12.568695\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--TreeView-->\r\n    <Style TargetType=\"TreeView\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource BorderBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n        <Setter Property=\"Padding\" Value=\"0\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TreeView\">\r\n                    <Grid>\r\n                        <Path Fill=\"#FFFFFFFF\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M8.0486603,-1.7956065 C40.652985,-1.2334629 60.802299,5.3778448 94.571907,-3.8320472 C132.02231,-14.045796 175.82878,1 215,1 C278.08371,1 340.94531,1 405,1 C447.66666,1 488.54492,0.24040417 531.21155,0.24040417 C560.38153,0.24040417 624.77802,-6.8858747 639.86951,-0.77759421 C642.52252,0.29620132 639.86847,98.304474 639.86847,124.43706 C639.86847,190.61852 640.87457,264.57269 640.87457,330.07413 C640.87457,369.30386 637.85645,396.94827 637.85645,435.94669 C637.85645,441.81662 648.37085,477.30365 637.85669,479.72144 C615.7226,484.81128 553.33221,480.23886 538.25421,479.72162 C360.17755,473.61288 232.40511,488.88297 2,479 C4.0243306,313.78604 0,161.53839 0,3 C0.66666669,3 2.3515811,1.2584095 3.0182476,1.2584095 C3.0182476,0.59174258 8.0486603,-1.1289399 8.0486603,-1.7956065 z\"/>\r\n                        <ScrollViewer Margin=\"5,10,5,5\" Foreground=\"{TemplateBinding Foreground}\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" x:Name=\"ScrollViewer\">\r\n                            <ItemsPresenter />\r\n                        </ScrollViewer>\r\n                        <Path Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"0.5\" Margin=\"-0.094,0.769,0.799,-0.479\" Data=\"M1.7206836,12.568695 C2.4419925,11.031993 1.4481189,7.3090796 1.7209258,5.6722374 C2.2648225,2.4088583 0.46910813,5.715632 5.1693902,3.7012255 C10.004368,1.6290923 20.664461,1.2662256 26,2.3333333 C36.24308,4.3819494 47.8027,3.6553195 58.131069,2.7163765 C68.803482,1.7461575 79.164429,1.9772166 89.908081,1.9772166 C100.39313,1.9772166 98,-0.96195835 98,16.333334 C98,23.112209 96.493988,25.349688 97.298027,31.782001 C98.258453,39.465462 97.476074,52.003723 97.29808,59.862312 C97.103302,68.46196 97.666664,74.564713 97.666664,83 C97.666664,108.95624 103.8933,92.074692 62.072483,97.302299 C52.738716,98.469017 39.806664,100.01 30.333334,99.333336 C22.81004,98.795952 7.3937144,97.694511 1.967056,97.548622 C-0.28294224,97.488136 1.5684019,88.452782 2.3333333,82.333336 C3.1227529,76.017975 2.5054271,71.237221 2,64.666664 C0.6911695,47.651871 3.9379203,29.072496 1.720971,12.568695\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--ListboxItem-->\r\n    <Style TargetType=\"ListBoxItem\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource HoverBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource BorderBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <!--<Setter Property=\"TextAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"TextWrapping\" Value=\"NoWrap\" />-->\r\n        <Setter Property=\"Padding\" Value=\"10,0,0,0\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ListBoxItem\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"FillColor\" Storyboard.TargetProperty=\"Opacity\" Duration=\"0\" To=\"1\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualState x:Name=\"Unselected\" />\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"StrokeColor\" Storyboard.TargetProperty=\"Opacity\" Duration=\"0\" To=\"1\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"Visibility\" Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"*\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n\r\n                        <!--Start UI-->\r\n                        <Path x:Name=\"FillColor\" Opacity=\"0\" Fill=\"{TemplateBinding Background}\" Margin=\"1,0,-6.5,-2\" Height=\"22\" Stretch=\"Fill\" StrokeThickness=\"1\" Data=\"M0.5,4 C5.4921546,-1.2298763 6.7624655,0.25 16.25,0.25 C26.98455,0.25 37.771278,-0.14736003 48.5,0.25 C58.050766,0.60373205 67.126785,1.8436862 76.75,1.5 C81.214241,1.3405629 85.468109,1 90,1 C93.832878,1 95.48951,0.42107743 98.75,2.75 C103.03876,5.8134003 99,22.711088 99,29 C99,36.099834 99.578392,43.275311 99.25,50.5 C98.582687,65.180809 99.25,79.852791 99.25,94.5 C99.25,106.65568 72.737717,98.226776 56.5,99 C47.401512,99.433258 38.067318,99.75 29,99.75 C23.833334,99.75 18.666666,99.75 13.5,99.75 C11.25,99.75 9,99.75 6.75,99.75 C2.9788802,99.75 3.51701,102.43028 2,97.5 C0.044149127,91.143486 0.5,85.399605 0.5,78.5 C0.5,68.201317 -0.62925881,58.16333 0.5,48 C2.0587127,33.971584 0,18.959808 0,4.75 C0.13653865,4.6544228 0.34602007,4.8137808 0.5,4.75 C0.7177605,4.6598005 0.80388385,4.380744 1,4.25 C0.83333331,4.25 0.66666669,4.25 0.5,4.25 C0.5,4.1666665 0.5,4.0833335 0.5,4 z\"/>\r\n                        <Path x:Name=\"StrokeColor\" Opacity=\"0\" Stroke=\"{TemplateBinding BorderBrush}\" Margin=\"1,0,-3.5,-2\" Height=\"22\" Stretch=\"Fill\" StrokeThickness=\"1\" Data=\"M0.5,4 C5.4921546,-1.2298763 6.7624655,0.25 16.25,0.25 C26.98455,0.25 37.771278,-0.14736003 48.5,0.25 C58.050766,0.60373205 67.126785,1.8436862 76.75,1.5 C81.214241,1.3405629 85.468109,1 90,1 C93.832878,1 95.48951,0.42107743 98.75,2.75 C103.03876,5.8134003 99,22.711088 99,29 C99,36.099834 99.578392,43.275311 99.25,50.5 C98.582687,65.180809 99.25,79.852791 99.25,94.5 C99.25,106.65568 72.737717,98.226776 56.5,99 C47.401512,99.433258 38.067318,99.75 29,99.75 C23.833334,99.75 18.666666,99.75 13.5,99.75 C11.25,99.75 9,99.75 6.75,99.75 C2.9788802,99.75 3.51701,102.43028 2,97.5 C0.044149127,91.143486 0.5,85.399605 0.5,78.5 C0.5,68.201317 -0.62925881,58.16333 0.5,48 C2.0587127,33.971584 0,18.959808 0,4.75 C0.13653865,4.6544228 0.34602007,4.8137808 0.5,4.75 C0.7177605,4.6598005 0.80388385,4.380744 1,4.25 C0.83333331,4.25 0.66666669,4.25 0.5,4.25 C0.5,4.1666665 0.5,4.0833335 0.5,4 z\"/>\r\n\r\n                        <ContentPresenter\r\n                              HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                              VerticalAlignment=\"Center\"\r\n                              Margin=\"{TemplateBinding Padding}\"                              \r\n                            />\r\n                        <!--\r\n                              Content=\"{TemplateBinding Content}\"\r\n                              ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                              FontFamily=\"Arial\"\r\n                              FontSize=\"11\"\r\n                              FontStretch=\"{TemplateBinding FontStretch}\"\r\n                              FontStyle=\"{TemplateBinding FontStyle}\"\r\n                              FontWeight=\"Normal\"\r\n                              HorizontalAlignment=\"Left\"\r\n                              HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                              Padding=\"{TemplateBinding Padding}\"\r\n                              TextAlignment=\"{TemplateBinding TextAlignment}\"\r\n                              TextDecorations=\"{TemplateBinding TextDecorations}\"\r\n                              TextWrapping=\"{TemplateBinding TextWrapping}\"\r\n                              VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                              Foreground=\"{TemplateBinding Foreground}\"/>\r\n-->\r\n                        <Path x:Name=\"FocusVisual\" Height=\"21\" Margin=\"2,0,.25,0\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\".5\" Visibility=\"Collapsed\" Data=\"M0.5,4 C5.4921546,-1.2298763 6.7624655,0.25 16.25,0.25 C26.98455,0.25 37.771278,-0.14736003 48.5,0.25 C58.050766,0.60373205 67.126785,1.8436862 76.75,1.5 C81.214241,1.3405629 85.468109,1 90,1 C93.832878,1 95.48951,0.42107743 98.75,2.75 C103.03876,5.8134003 99,22.711088 99,29 C99,36.099834 99.578392,43.275311 99.25,50.5 C98.582687,65.180809 99.25,79.852791 99.25,94.5 C99.25,106.65568 72.737717,98.226776 56.5,99 C47.401512,99.433258 38.067318,99.75 29,99.75 C23.833334,99.75 18.666666,99.75 13.5,99.75 C11.25,99.75 9,99.75 6.75,99.75 C2.9788802,99.75 3.51701,102.43028 2,97.5 C0.044149127,91.143486 0.5,85.399605 0.5,78.5 C0.5,68.201317 -0.62925881,58.16333 0.5,48 C2.0587127,33.971584 0,18.959808 0,4.75 C0.13653865,4.6544228 0.34602007,4.8137808 0.5,4.75 C0.7177605,4.6598005 0.80388385,4.380744 1,4.25 C0.83333331,4.25 0.66666669,4.25 0.5,4.25 C0.5,4.1666665 0.5,4.0833335 0.5,4 z\"/>\r\n                        <!--End UI-->\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--ScrollBar-->\r\n    <Style TargetType=\"ScrollBar\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource BorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ScrollBar\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <Grid.Resources>\r\n                            <ControlTemplate x:Key=\"RepeatButtonTemplate\" TargetType=\"RepeatButton\">\r\n                                <Grid x:Name=\"Root\" Background=\"Transparent\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n\r\n                            <!--I'm not using the repeat buttons and that's why these templates are empty-->\r\n                            <ControlTemplate x:Key=\"HorizontalIncrementTemplate\" TargetType=\"RepeatButton\" />\r\n                            <ControlTemplate x:Key=\"HorizontalDecrementTemplate\" TargetType=\"RepeatButton\" />\r\n                            <ControlTemplate x:Key=\"VerticalIncrementTemplate\" TargetType=\"RepeatButton\" />\r\n                            <ControlTemplate x:Key=\"VerticalDecrementTemplate\" TargetType=\"RepeatButton\" />\r\n\r\n                            <!--Thumb templates-->\r\n                            <ControlTemplate x:Key=\"VerticalThumbTemplate\" TargetType=\"Thumb\">\r\n                                <Grid Margin=\"1,6,1,6\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"MouseOver\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n\r\n                                    <!--Start UI-->\r\n                                    <Path Margin=\"-1.25,0,0,4\" x:Name=\"LineBack\" Fill=\"#FFFFFFFF\" RenderTransformOrigin=\"0.5,0.5\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\">\r\n                                        <Path.RenderTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform/>\r\n                                                <SkewTransform/>\r\n                                                <RotateTransform/>\r\n                                                <TranslateTransform/>\r\n                                            </TransformGroup>\r\n                                        </Path.RenderTransform>\r\n                                    </Path>\r\n                                    <Path HorizontalAlignment=\"Stretch\" Stretch=\"Fill\" Margin=\"1,2,5,7\" x:Name=\"Background\" VerticalAlignment=\"Stretch\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"{TemplateBinding Background}\" StrokeThickness=\"2\">\r\n                                        <Path.Data>\r\n                                            <PathGeometry>\r\n                                                <PathFigure IsClosed=\"True\" StartPoint=\"55.3734893798828,18.3878383636475\">\r\n                                                    <BezierSegment Point1=\"55.4575424194336,19.6423645019531\" Point2=\"54.0918769836426,18.1212940216064\" Point3=\"54.1759376525879,19.3758182525635\"/>\r\n                                                    <BezierSegment Point1=\"54.1044921875,19.43869972229\" Point2=\"54.1721153259277,19.5379447937012\" Point3=\"54.101448059082,19.5246734619141\"/>\r\n                                                    <BezierSegment Point1=\"53.697998046875,19.2345180511475\" Point2=\"53.7027320861816,20.5981388092041\" Point3=\"53.2657089233398,20.5459175109863\"/>\r\n                                                    <LineSegment Point=\"54.9807624816895,20.2940578460693\"/>\r\n                                                    <BezierSegment Point1=\"55.4915466308594,19.2132472991943\" Point2=\"55.6735687255859,19.6681518554688\" Point3=\"55.5702743530273,19.2230930328369\"/>\r\n                                                    <LineSegment Point=\"55.3734893798828,18.3878383636475\"/>\r\n                                                </PathFigure>\r\n                                                <PathFigure IsClosed=\"True\" StartPoint=\"2.75041627883911,4.18817186355591\">\r\n                                                    <BezierSegment Point1=\"2.60941195487976,4.23498106002808\" Point2=\"2.44556498527527,4.34848213195801\" Point3=\"2.25126266479492,4.5509033203125\"/>\r\n                                                    <BezierSegment Point1=\"1.95730113983154,3.90779161453247\" Point2=\"1.66666030883789,5.07916784286499\" Point3=\"1.46416211128235,5.60511302947998\"/>\r\n                                                    <LineSegment Point=\"1.28398549556732,5.28074789047241\"/>\r\n                                                    <LineSegment Point=\"1.2844455242157,5.27347755432129\"/>\r\n                                                    <LineSegment Point=\"1.43954491615295,5.49028921127319\"/>\r\n                                                    <BezierSegment Point1=\"1.46683251857758,5.47077798843384\" Point2=\"1.34879219532013,5.18408298492432\" Point3=\"1.2877790927887,5.220703125\"/>\r\n                                                    <LineSegment Point=\"1.2844455242157,5.27347755432129\"/>\r\n                                                    <LineSegment Point=\"1.26432502269745,5.24535417556763\"/>\r\n                                                    <LineSegment Point=\"1.28398549556732,5.28074789047241\"/>\r\n                                                    <LineSegment Point=\"1.26432502269745,5.59193277359009\"/>\r\n                                                    <BezierSegment Point1=\"1.28229105472565,5.78759717941284\" Point2=\"1.3096958398819,5.8595871925354\" Point3=\"1.34388554096222,5.84831285476685\"/>\r\n                                                    <LineSegment Point=\"1.46416211128235,5.60511302947998\"/>\r\n                                                    <LineSegment Point=\"2.18957805633545,6.91105651855469\"/>\r\n                                                    <BezierSegment Point1=\"4.89191150665283,6.34800672531128\" Point2=\"3.10698843002319,8.09412384033203\" Point3=\"4.9653377532959,5.38372611999512\"/>\r\n                                                    <BezierSegment Point1=\"3.60521507263184,6.80067920684814\" Point2=\"3.73745012283325,3.86050128936768\" Point3=\"2.75041627883911,4.18817186355591\"/>\r\n                                                </PathFigure>\r\n                                                <PathFigure IsClosed=\"True\" StartPoint=\"3.98743844032288,2.72233080863953\">\r\n                                                    <BezierSegment Point1=\"3.87878394126892,2.65442371368408\" Point2=\"3.73797965049744,2.68036603927612\" Point3=\"3.53287696838379,2.89400577545166\"/>\r\n                                                    <BezierSegment Point1=\"3.3777277469635,2.55462884902954\" Point2=\"3.22433018684387,3.17277550697327\" Point3=\"3.11745405197144,3.45032072067261\"/>\r\n                                                    <LineSegment Point=\"3.02235960960388,3.27914905548096\"/>\r\n                                                    <LineSegment Point=\"3.02260160446167,3.27531266212463\"/>\r\n                                                    <LineSegment Point=\"3.01198220252991,3.2604718208313\"/>\r\n                                                    <LineSegment Point=\"3.02235960960388,3.27914905548096\"/>\r\n                                                    <LineSegment Point=\"3.01198220252991,3.44336438179016\"/>\r\n                                                    <BezierSegment Point1=\"3.01268339157104,3.45099830627441\" Point2=\"3.01341199874878,3.45827555656433\" Point3=\"3.11745405197144,3.45032072067261\"/>\r\n                                                    <LineSegment Point=\"3.50032067298889,4.13947582244873\"/>\r\n                                                    <LineSegment Point=\"4.19300651550293,4.08932685852051\"/>\r\n                                                    <BezierSegment Point1=\"4.57573270797729,4.15608644485474\" Point2=\"4.22972536087036,4.40621519088745\" Point3=\"4.9653377532959,3.33349204063416\"/>\r\n                                                    <BezierSegment Point1=\"4.35003042221069,3.97440934181213\" Point2=\"4.31340551376343,2.92605090141296\" Point3=\"3.98743844032288,2.72233080863953\"/>\r\n                                                </PathFigure>\r\n                                                <PathFigure IsClosed=\"True\" StartPoint=\"43.6054306030273,2.55744552612305\">\r\n                                                    <LineSegment Point=\"42.7685508728027,3.07746315002441\"/>\r\n                                                    <BezierSegment Point1=\"42.8401260375977,3.02574563026428\" Point2=\"44.8010520935059,3.60871481895447\" Point3=\"44.8063468933105,3.56444692611694\"/>\r\n                                                    <LineSegment Point=\"47.3169860839844,3.1744339466095\"/>\r\n                                                    <BezierSegment Point1=\"47.7981910705566,2.0477294921875\" Point2=\"50.5490341186523,3.69445133209229\" Point3=\"50.9364852905273,2.43774271011353\"/>\r\n                                                    <LineSegment Point=\"46.9194679260254,2.11273193359375\"/>\r\n                                                    <BezierSegment Point1=\"45.9232177734375,2.00986051559448\" Point2=\"42.2318840026855,3.34697723388672\" Point3=\"43.6054306030273,2.55744552612305\"/>\r\n                                                </PathFigure>\r\n                                                <PathFigure IsClosed=\"True\" StartPoint=\"16.5382518768311,2.38410639762878\">\r\n                                                    <BezierSegment Point1=\"17.9376049041748,2.47057723999023\" Point2=\"28.9235725402832,0.979193687438965\" Point3=\"30.961519241333,1.25740206241608\"/>\r\n                                                    <BezierSegment Point1=\"39.7206230163574,2.45314311981201\" Point2=\"36.6131362915039,2.46526336669922\" Point3=\"45.4653663635254,2.03742814064026\"/>\r\n                                                    <BezierSegment Point1=\"48.1704330444336,1.90669059753418\" Point2=\"53.7993202209473,2.94819211959839\" Point3=\"56.5043983459473,2.81745433807373\"/>\r\n                                                    <BezierSegment Point1=\"57.6275444030762,2.76317286491394\" Point2=\"58.8492164611816,1.81751883029938\" Point3=\"58.7605514526367,4.98419380187988\"/>\r\n                                                    <BezierSegment Point1=\"58.6914901733398,7.45075988769531\" Point2=\"59.2414894104004,7.46710634231567\" Point3=\"59.1634330749512,9.40434169769287\"/>\r\n                                                    <LineSegment Point=\"59.1302642822266,9.42093944549561\"/>\r\n                                                    <BezierSegment Point1=\"58.9689521789551,9.46572589874268\" Point2=\"58.8931922912598,9.64298820495605\" Point3=\"58.9885597229004,10.0852022171021\"/>\r\n                                                    <LineSegment Point=\"58.7547225952148,10.0751485824585\"/>\r\n                                                    <BezierSegment Point1=\"58.7845993041992,10.1730222702026\" Point2=\"59.0883674621582,10.4170408248901\" Point3=\"59.129207611084,10.4465093612671\"/>\r\n                                                    <LineSegment Point=\"58.9072380065918,10.2733154296875\"/>\r\n                                                    <BezierSegment Point1=\"58.2435150146484,9.76523780822754\" Point2=\"58.5282859802246,11.6655864715576\" Point3=\"57.8627014160156,11.4802284240723\"/>\r\n                                                    <BezierSegment Point1=\"57.8627014160156,11.4802284240723\" Point2=\"58.1601409912109,13.5446062088013\" Point3=\"58.357666015625,14.1711664199829\"/>\r\n                                                    <BezierSegment Point1=\"58.9370613098145,16.0090198516846\" Point2=\"58.3653373718262,16.4901638031006\" Point3=\"58.357666015625,18.4179744720459\"/>\r\n                                                    <BezierSegment Point1=\"58.3484077453613,20.745641708374\" Point2=\"60.4300498962402,21.9203453063965\" Point3=\"56.8666801452637,21.5362567901611\"/>\r\n                                                    <BezierSegment Point1=\"45.6265144348145,20.32470703125\" Point2=\"39.9008178710938,21.5664978027344\" Point3=\"30.3169002532959,20.9313945770264\"/>\r\n                                                    <BezierSegment Point1=\"24.7872543334961,20.5649566650391\" Point2=\"17.0756797790527,21.3352470397949\" Point3=\"11.5372772216797,21.6029224395752\"/>\r\n                                                    <BezierSegment Point1=\"9.37526988983154,21.7074146270752\" Point2=\"6.82023525238037,22.2953662872314\" Point3=\"4.65164470672607,21.9357109069824\"/>\r\n                                                    <BezierSegment Point1=\"1.45201742649078,21.4050598144531\" Point2=\"1.73953628540039,23.0963401794434\" Point3=\"1.51341998577118,17.1753234863281\"/>\r\n                                                    <BezierSegment Point1=\"1.38521957397461,13.8183069229126\" Point2=\"0.133225455880165,11.0509176254272\" Point3=\"0.00502508180215955,7.6939001083374\"/>\r\n                                                    <BezierSegment Point1=\"-0.0463196896016598,6.3494029045105\" Point2=\"0.306805700063705,4.28786516189575\" Point3=\"0.562162816524506,2.95534110069275\"/>\r\n                                                    <LineSegment Point=\"2.65466785430908,2.14960050582886\"/>\r\n                                                    <BezierSegment Point1=\"5.5844030380249,2.0080041885376\" Point2=\"7.20274591445923,3.57988381385803\" Point3=\"10.0115203857422,2.2107675075531\"/>\r\n                                                    <BezierSegment Point1=\"11.7393894195557,1.36852860450745\" Point2=\"15.138897895813,2.29763579368591\" Point3=\"16.5382518768311,2.38410639762878\"/>\r\n                                                </PathFigure>\r\n                                            </PathGeometry>\r\n                                        </Path.Data>\r\n                                        <Path.RenderTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform/>\r\n                                                <SkewTransform/>\r\n                                                <RotateTransform/>\r\n                                                <TranslateTransform X=\"1.4916732314436434\" Y=\"-0.23907148924159571\"/>\r\n                                            </TransformGroup>\r\n                                        </Path.RenderTransform>\r\n                                    </Path>\r\n                                    <Path Margin=\"-1.25,0,0,4\" x:Name=\"Line\" RenderTransformOrigin=\"0.5,0.5\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\">\r\n                                        <Path.RenderTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform/>\r\n                                                <SkewTransform/>\r\n                                                <RotateTransform/>\r\n                                                <TranslateTransform/>\r\n                                            </TransformGroup>\r\n                                        </Path.RenderTransform>\r\n                                    </Path>\r\n                                    <Path Margin=\"2.75,4.375,4,8.5\" x:Name=\"FocusVisualElement\" StrokeDashArray=\"1 2\" RenderTransformOrigin=\"0.5,0.5\" Visibility=\"Collapsed\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"0.5\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\">\r\n                                        <Path.RenderTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform/>\r\n                                                <SkewTransform/>\r\n                                                <RotateTransform/>\r\n                                                <TranslateTransform/>\r\n                                            </TransformGroup>\r\n                                        </Path.RenderTransform>\r\n                                    </Path>\r\n                                    <Path Margin=\"-1.25,0,0,4\" x:Name=\"DisabledOverlay\" Stretch=\"Fill\" Stroke=\"#B2FFFFFF\" StrokeThickness=\"2\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\" Opacity=\"0\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"#B2FFFFFF\">\r\n                                        <Path.RenderTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform/>\r\n                                                <SkewTransform/>\r\n                                                <RotateTransform/>\r\n                                                <TranslateTransform/>\r\n                                            </TransformGroup>\r\n                                        </Path.RenderTransform>\r\n                                    </Path>\r\n                                    <!--End UI-->\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"HorizontalThumbTemplate\" TargetType=\"Thumb\">\r\n                                <Grid Margin=\"6,1,6,1\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"MouseOver\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n\r\n                                    <!--Start UI-->\r\n                                    <Path Margin=\"-1.25,0,5,-1\" x:Name=\"LineBack\" Fill=\"#FFFFFFFF\" RenderTransformOrigin=\"0.5,0.5\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\">\r\n                                        <Path.RenderTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform/>\r\n                                                <SkewTransform/>\r\n                                                <RotateTransform/>\r\n                                                <TranslateTransform/>\r\n                                            </TransformGroup>\r\n                                        </Path.RenderTransform>\r\n                                    </Path>\r\n                                    <Path HorizontalAlignment=\"Stretch\" Stretch=\"Fill\" Margin=\"1,2,10,2\" x:Name=\"Background\" VerticalAlignment=\"Stretch\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"{TemplateBinding Background}\" StrokeThickness=\"2\">\r\n                                        <Path.Data>\r\n                                            <PathGeometry>\r\n                                                <PathFigure IsClosed=\"True\" StartPoint=\"55.3734893798828,18.3878383636475\">\r\n                                                    <BezierSegment Point1=\"55.4575424194336,19.6423645019531\" Point2=\"54.0918769836426,18.1212940216064\" Point3=\"54.1759376525879,19.3758182525635\"/>\r\n                                                    <BezierSegment Point1=\"54.1044921875,19.43869972229\" Point2=\"54.1721153259277,19.5379447937012\" Point3=\"54.101448059082,19.5246734619141\"/>\r\n                                                    <BezierSegment Point1=\"53.697998046875,19.2345180511475\" Point2=\"53.7027320861816,20.5981388092041\" Point3=\"53.2657089233398,20.5459175109863\"/>\r\n                                                    <LineSegment Point=\"54.9807624816895,20.2940578460693\"/>\r\n                                                    <BezierSegment Point1=\"55.4915466308594,19.2132472991943\" Point2=\"55.6735687255859,19.6681518554688\" Point3=\"55.5702743530273,19.2230930328369\"/>\r\n                                                    <LineSegment Point=\"55.3734893798828,18.3878383636475\"/>\r\n                                                </PathFigure>\r\n                                                <PathFigure IsClosed=\"True\" StartPoint=\"2.75041627883911,4.18817186355591\">\r\n                                                    <BezierSegment Point1=\"2.60941195487976,4.23498106002808\" Point2=\"2.44556498527527,4.34848213195801\" Point3=\"2.25126266479492,4.5509033203125\"/>\r\n                                                    <BezierSegment Point1=\"1.95730113983154,3.90779161453247\" Point2=\"1.66666030883789,5.07916784286499\" Point3=\"1.46416211128235,5.60511302947998\"/>\r\n                                                    <LineSegment Point=\"1.28398549556732,5.28074789047241\"/>\r\n                                                    <LineSegment Point=\"1.2844455242157,5.27347755432129\"/>\r\n                                                    <LineSegment Point=\"1.43954491615295,5.49028921127319\"/>\r\n                                                    <BezierSegment Point1=\"1.46683251857758,5.47077798843384\" Point2=\"1.34879219532013,5.18408298492432\" Point3=\"1.2877790927887,5.220703125\"/>\r\n                                                    <LineSegment Point=\"1.2844455242157,5.27347755432129\"/>\r\n                                                    <LineSegment Point=\"1.26432502269745,5.24535417556763\"/>\r\n                                                    <LineSegment Point=\"1.28398549556732,5.28074789047241\"/>\r\n                                                    <LineSegment Point=\"1.26432502269745,5.59193277359009\"/>\r\n                                                    <BezierSegment Point1=\"1.28229105472565,5.78759717941284\" Point2=\"1.3096958398819,5.8595871925354\" Point3=\"1.34388554096222,5.84831285476685\"/>\r\n                                                    <LineSegment Point=\"1.46416211128235,5.60511302947998\"/>\r\n                                                    <LineSegment Point=\"2.18957805633545,6.91105651855469\"/>\r\n                                                    <BezierSegment Point1=\"4.89191150665283,6.34800672531128\" Point2=\"3.10698843002319,8.09412384033203\" Point3=\"4.9653377532959,5.38372611999512\"/>\r\n                                                    <BezierSegment Point1=\"3.60521507263184,6.80067920684814\" Point2=\"3.73745012283325,3.86050128936768\" Point3=\"2.75041627883911,4.18817186355591\"/>\r\n                                                </PathFigure>\r\n                                                <PathFigure IsClosed=\"True\" StartPoint=\"3.98743844032288,2.72233080863953\">\r\n                                                    <BezierSegment Point1=\"3.87878394126892,2.65442371368408\" Point2=\"3.73797965049744,2.68036603927612\" Point3=\"3.53287696838379,2.89400577545166\"/>\r\n                                                    <BezierSegment Point1=\"3.3777277469635,2.55462884902954\" Point2=\"3.22433018684387,3.17277550697327\" Point3=\"3.11745405197144,3.45032072067261\"/>\r\n                                                    <LineSegment Point=\"3.02235960960388,3.27914905548096\"/>\r\n                                                    <LineSegment Point=\"3.02260160446167,3.27531266212463\"/>\r\n                                                    <LineSegment Point=\"3.01198220252991,3.2604718208313\"/>\r\n                                                    <LineSegment Point=\"3.02235960960388,3.27914905548096\"/>\r\n                                                    <LineSegment Point=\"3.01198220252991,3.44336438179016\"/>\r\n                                                    <BezierSegment Point1=\"3.01268339157104,3.45099830627441\" Point2=\"3.01341199874878,3.45827555656433\" Point3=\"3.11745405197144,3.45032072067261\"/>\r\n                                                    <LineSegment Point=\"3.50032067298889,4.13947582244873\"/>\r\n                                                    <LineSegment Point=\"4.19300651550293,4.08932685852051\"/>\r\n                                                    <BezierSegment Point1=\"4.57573270797729,4.15608644485474\" Point2=\"4.22972536087036,4.40621519088745\" Point3=\"4.9653377532959,3.33349204063416\"/>\r\n                                                    <BezierSegment Point1=\"4.35003042221069,3.97440934181213\" Point2=\"4.31340551376343,2.92605090141296\" Point3=\"3.98743844032288,2.72233080863953\"/>\r\n                                                </PathFigure>\r\n                                                <PathFigure IsClosed=\"True\" StartPoint=\"43.6054306030273,2.55744552612305\">\r\n                                                    <LineSegment Point=\"42.7685508728027,3.07746315002441\"/>\r\n                                                    <BezierSegment Point1=\"42.8401260375977,3.02574563026428\" Point2=\"44.8010520935059,3.60871481895447\" Point3=\"44.8063468933105,3.56444692611694\"/>\r\n                                                    <LineSegment Point=\"47.3169860839844,3.1744339466095\"/>\r\n                                                    <BezierSegment Point1=\"47.7981910705566,2.0477294921875\" Point2=\"50.5490341186523,3.69445133209229\" Point3=\"50.9364852905273,2.43774271011353\"/>\r\n                                                    <LineSegment Point=\"46.9194679260254,2.11273193359375\"/>\r\n                                                    <BezierSegment Point1=\"45.9232177734375,2.00986051559448\" Point2=\"42.2318840026855,3.34697723388672\" Point3=\"43.6054306030273,2.55744552612305\"/>\r\n                                                </PathFigure>\r\n                                                <PathFigure IsClosed=\"True\" StartPoint=\"16.5382518768311,2.38410639762878\">\r\n                                                    <BezierSegment Point1=\"17.9376049041748,2.47057723999023\" Point2=\"28.9235725402832,0.979193687438965\" Point3=\"30.961519241333,1.25740206241608\"/>\r\n                                                    <BezierSegment Point1=\"39.7206230163574,2.45314311981201\" Point2=\"36.6131362915039,2.46526336669922\" Point3=\"45.4653663635254,2.03742814064026\"/>\r\n                                                    <BezierSegment Point1=\"48.1704330444336,1.90669059753418\" Point2=\"53.7993202209473,2.94819211959839\" Point3=\"56.5043983459473,2.81745433807373\"/>\r\n                                                    <BezierSegment Point1=\"57.6275444030762,2.76317286491394\" Point2=\"58.8492164611816,1.81751883029938\" Point3=\"58.7605514526367,4.98419380187988\"/>\r\n                                                    <BezierSegment Point1=\"58.6914901733398,7.45075988769531\" Point2=\"59.2414894104004,7.46710634231567\" Point3=\"59.1634330749512,9.40434169769287\"/>\r\n                                                    <LineSegment Point=\"59.1302642822266,9.42093944549561\"/>\r\n                                                    <BezierSegment Point1=\"58.9689521789551,9.46572589874268\" Point2=\"58.8931922912598,9.64298820495605\" Point3=\"58.9885597229004,10.0852022171021\"/>\r\n                                                    <LineSegment Point=\"58.7547225952148,10.0751485824585\"/>\r\n                                                    <BezierSegment Point1=\"58.7845993041992,10.1730222702026\" Point2=\"59.0883674621582,10.4170408248901\" Point3=\"59.129207611084,10.4465093612671\"/>\r\n                                                    <LineSegment Point=\"58.9072380065918,10.2733154296875\"/>\r\n                                                    <BezierSegment Point1=\"58.2435150146484,9.76523780822754\" Point2=\"58.5282859802246,11.6655864715576\" Point3=\"57.8627014160156,11.4802284240723\"/>\r\n                                                    <BezierSegment Point1=\"57.8627014160156,11.4802284240723\" Point2=\"58.1601409912109,13.5446062088013\" Point3=\"58.357666015625,14.1711664199829\"/>\r\n                                                    <BezierSegment Point1=\"58.9370613098145,16.0090198516846\" Point2=\"58.3653373718262,16.4901638031006\" Point3=\"58.357666015625,18.4179744720459\"/>\r\n                                                    <BezierSegment Point1=\"58.3484077453613,20.745641708374\" Point2=\"60.4300498962402,21.9203453063965\" Point3=\"56.8666801452637,21.5362567901611\"/>\r\n                                                    <BezierSegment Point1=\"45.6265144348145,20.32470703125\" Point2=\"39.9008178710938,21.5664978027344\" Point3=\"30.3169002532959,20.9313945770264\"/>\r\n                                                    <BezierSegment Point1=\"24.7872543334961,20.5649566650391\" Point2=\"17.0756797790527,21.3352470397949\" Point3=\"11.5372772216797,21.6029224395752\"/>\r\n                                                    <BezierSegment Point1=\"9.37526988983154,21.7074146270752\" Point2=\"6.82023525238037,22.2953662872314\" Point3=\"4.65164470672607,21.9357109069824\"/>\r\n                                                    <BezierSegment Point1=\"1.45201742649078,21.4050598144531\" Point2=\"1.73953628540039,23.0963401794434\" Point3=\"1.51341998577118,17.1753234863281\"/>\r\n                                                    <BezierSegment Point1=\"1.38521957397461,13.8183069229126\" Point2=\"0.133225455880165,11.0509176254272\" Point3=\"0.00502508180215955,7.6939001083374\"/>\r\n                                                    <BezierSegment Point1=\"-0.0463196896016598,6.3494029045105\" Point2=\"0.306805700063705,4.28786516189575\" Point3=\"0.562162816524506,2.95534110069275\"/>\r\n                                                    <LineSegment Point=\"2.65466785430908,2.14960050582886\"/>\r\n                                                    <BezierSegment Point1=\"5.5844030380249,2.0080041885376\" Point2=\"7.20274591445923,3.57988381385803\" Point3=\"10.0115203857422,2.2107675075531\"/>\r\n                                                    <BezierSegment Point1=\"11.7393894195557,1.36852860450745\" Point2=\"15.138897895813,2.29763579368591\" Point3=\"16.5382518768311,2.38410639762878\"/>\r\n                                                </PathFigure>\r\n                                            </PathGeometry>\r\n                                        </Path.Data>\r\n                                        <Path.RenderTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform/>\r\n                                                <SkewTransform/>\r\n                                                <RotateTransform/>\r\n                                                <TranslateTransform X=\"1.4916732314436434\" Y=\"-0.23907148924159571\"/>\r\n                                            </TransformGroup>\r\n                                        </Path.RenderTransform>\r\n                                    </Path>\r\n                                    <Path Margin=\"-1.25,0,5,-1\" x:Name=\"Line\" RenderTransformOrigin=\"0.5,0.5\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\">\r\n                                        <Path.RenderTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform/>\r\n                                                <SkewTransform/>\r\n                                                <RotateTransform/>\r\n                                                <TranslateTransform/>\r\n                                            </TransformGroup>\r\n                                        </Path.RenderTransform>\r\n                                    </Path>\r\n                                    <Path Margin=\"2.75,4.375,9,3.5\" x:Name=\"FocusVisualElement\" StrokeDashArray=\"1 2\" RenderTransformOrigin=\"0.5,0.5\" Visibility=\"Collapsed\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"0.5\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\">\r\n                                        <Path.RenderTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform/>\r\n                                                <SkewTransform/>\r\n                                                <RotateTransform/>\r\n                                                <TranslateTransform/>\r\n                                            </TransformGroup>\r\n                                        </Path.RenderTransform>\r\n                                    </Path>\r\n                                    <Path Margin=\"-1.25,0,5,-1\" x:Name=\"DisabledOverlay\" Stretch=\"Fill\" Stroke=\"#B2FFFFFF\" StrokeThickness=\"2\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\" Opacity=\"0\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"#B2FFFFFF\">\r\n                                        <Path.RenderTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform/>\r\n                                                <SkewTransform/>\r\n                                                <RotateTransform/>\r\n                                                <TranslateTransform/>\r\n                                            </TransformGroup>\r\n                                        </Path.RenderTransform>\r\n                                    </Path>\r\n                                    <!--End UI-->\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Root\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid x:Name=\"HorizontalRoot\" Visibility=\"Collapsed\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition/>\r\n                                <RowDefinition/>\r\n                            </Grid.RowDefinitions>\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                            </Grid.ColumnDefinitions>\r\n\r\n                            <!--Start: Track-->\r\n                            <Rectangle Grid.RowSpan=\"2\" Grid.ColumnSpan=\"5\" Fill=\"#FFFFFFFF\"/>\r\n                            <Rectangle Grid.RowSpan=\"2\" Grid.ColumnSpan=\"5\" Fill=\"#FFFFFFFF\"/>\r\n                            <Path Grid.RowSpan=\"2\" Grid.ColumnSpan=\"5\" Margin=\"4,0,4,0\" Height=\"5\" Fill=\"{TemplateBinding Background}\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" Data=\"M2.5,10.75 C10.769531,9.6713657 20.250107,9.2501192 28.25,10.25 C38.895863,11.580592 50.207603,10.5 61.25,10.5 C70.336395,10.5 75.250519,8.7502098 90.750267,10.000045 C90.961433,10.017073 101.80408,11.999342 96.5,12 C95.750412,12.000093 79.953804,11.344656 73.75,11 C65.415443,10.536969 57.345238,12 49,12 C33.191448,12 17.421957,12.5 1.75,12.5 C2.0833333,12.25 2.4166667,12 2.75,11.75 C2.6972954,11.64459 2.4882734,11.617267 2.5,11.5 C2.5185413,11.314586 2.2201519,11.183933 2.25,11 C2.2688777,10.883671 2.5785825,10.837828 2.5,10.75 z\"/>\r\n                            <!--End: Track-->\r\n\r\n                            <RepeatButton x:Name=\"HorizontalSmallDecrease\" Width=\"0\" IsTabStop=\"False\" Template=\"{StaticResource HorizontalDecrementTemplate}\" Grid.Column=\"0\" Grid.RowSpan=\"2\" Interval=\"50\"/>\r\n                            <RepeatButton x:Name=\"HorizontalLargeDecrease\" Width=\"0\" IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Grid.Column=\"1\" Grid.RowSpan=\"2\" Interval=\"50\"/>\r\n                            <Thumb MinWidth=\"30\" x:Name=\"HorizontalThumb\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" Width=\"30\" Template=\"{StaticResource HorizontalThumbTemplate}\" Grid.Column=\"2\" Grid.RowSpan=\"2\"/>\r\n                            <RepeatButton x:Name=\"HorizontalLargeIncrease\" IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Grid.Column=\"3\" Grid.RowSpan=\"2\" Interval=\"50\"/>\r\n                            <RepeatButton x:Name=\"HorizontalSmallIncrease\" Width=\"0\" IsTabStop=\"False\" Template=\"{StaticResource HorizontalIncrementTemplate}\" Grid.Column=\"4\" Grid.RowSpan=\"2\" Interval=\"50\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"VerticalRoot\" Visibility=\"Visible\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"*\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition/>\r\n                                <ColumnDefinition/>\r\n                            </Grid.ColumnDefinitions>\r\n\r\n                            <!--Start: Track-->\r\n                            <Rectangle Grid.RowSpan=\"5\" Grid.ColumnSpan=\"2\" Fill=\"#FFFFFFFF\"/>\r\n                            <Rectangle Grid.RowSpan=\"5\" Grid.ColumnSpan=\"2\" Fill=\"#FFFFFFFF\"/>\r\n                            <Path Grid.RowSpan=\"5\" Grid.ColumnSpan=\"2\" Width=\"5\" Fill=\"{TemplateBinding Background}\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" Margin=\"0,4,0,4\" Data=\"M10.75,1.75 C10.75,12.649285 10.25,23.720615 10.25,34.75 C10.25,50.941807 9.5,67.320854 9.5,83.75 C11.158469,84.223846 8.75,90.980972 8.75,94.25 C8.75,95.54538 8.4319277,97.227707 8.75,98.5 C8.82022,98.780884 11.25,101.93609 11.25,99.25 C11.25,88.213257 12,77.355553 12,66.25 C12,51.455677 13,37.040787 13,22.25 C13,16.22773 13.5,10.253379 13.5,4.25 C13.5,0.27270243 13.181593,2.7098393 10.75,1.75 z\"/>\r\n                            <!--End: Track-->\r\n\r\n                            <RepeatButton Height=\"0\" x:Name=\"VerticalSmallDecrease\" IsTabStop=\"False\" Template=\"{StaticResource VerticalDecrementTemplate}\" Grid.ColumnSpan=\"2\" Grid.Row=\"0\" Interval=\"50\"/>\r\n\r\n                            <Track Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Grid.Row=\"0\" Grid.RowSpan=\"5\" x:Name=\"PART_Track\" Orientation=\"Vertical\" IsDirectionReversed=\"true\">\r\n                                <Track.Thumb>\r\n                                    <Thumb Height=\"30\" x:Name=\"VerticalThumb\" BorderBrush=\"{TemplateBinding BorderBrush}\" Background=\"{TemplateBinding Background}\" Template=\"{StaticResource VerticalThumbTemplate}\"/>\r\n                                </Track.Thumb>\r\n                                <Track.IncreaseRepeatButton>\r\n                                    <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Command=\"ScrollBar.PageDownCommand\" Interval=\"50\" />\r\n                                </Track.IncreaseRepeatButton>\r\n                                <Track.DecreaseRepeatButton>\r\n                                    <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Command=\"ScrollBar.PageUpCommand\" Interval=\"50\" />\r\n                                </Track.DecreaseRepeatButton>\r\n                            </Track>\r\n\r\n                            <RepeatButton Height=\"0\" x:Name=\"VerticalSmallIncrease\" IsTabStop=\"False\" Template=\"{StaticResource VerticalIncrementTemplate}\" Grid.ColumnSpan=\"2\" Grid.Row=\"4\" Interval=\"50\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--ScrollViewer-->\r\n    <Style TargetType=\"ScrollViewer\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource BorderBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Cursor\" Value=\"Arrow\"/>\r\n        <!--<Setter Property=\"TextAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"TextWrapping\" Value=\"Wrap\"/>-->\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ScrollViewer\">\r\n                    <Grid Margin=\"4\" Background=\"#FFFFFFFF\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"*\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <ScrollContentPresenter  \r\n\t\t\t\t\t\t\t\t\t    x:Name=\"ScrollContentPresenter\" \r\n\t\t\t\t\t\t\t\t\t    Grid.Column=\"0\" \r\n\t\t\t\t\t\t\t\t\t    Grid.Row=\"0\" \r\n\t\t\t\t\t\t\t\t\t    Cursor=\"{TemplateBinding Cursor}\"\r\n\t\t\t\t\t\t\t\t\t    Content=\"{TemplateBinding Content}\" \r\n\t\t\t\t\t\t\t\t\t    ContentTemplate=\"{TemplateBinding ContentTemplate}\" />\r\n                        <!--\r\n                                        Background=\"#FFFFFFFF\" \r\n\t\t\t\t\t\t\t\t\t    FontFamily=\"Verdana\" \r\n\t\t\t\t\t\t\t\t\t    FontSize=\"11\"\r\n\t\t\t\t\t\t\t\t\t    HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" \r\n\t\t\t\t\t\t\t\t\t    VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\" \r\n\t\t\t\t\t\t\t\t\t    TextAlignment=\"{TemplateBinding TextAlignment}\" \r\n\t\t\t\t\t\t\t\t\t    TextWrapping=\"{TemplateBinding TextWrapping}\"/>\r\n-->\r\n                        <ScrollBar Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" Cursor=\"Arrow\" x:Name=\"PART_VerticalScrollBar\" Width=\"18\" \r\n                                        Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Grid.Column=\"1\" Grid.Row=\"0\" \r\n                                        Maximum=\"{TemplateBinding ScrollableHeight}\" Minimum=\"0\" Value=\"{TemplateBinding VerticalOffset}\" \r\n                                        Orientation=\"Vertical\" ViewportSize=\"{TemplateBinding ViewportHeight}\" \r\n                                        />\r\n                        <ScrollBar Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" Cursor=\"Arrow\" Height=\"18\" \r\n                                        x:Name=\"PART_HorizontalScrollBar\" Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" \r\n                                        Grid.Column=\"0\" Grid.Row=\"1\" Maximum=\"{TemplateBinding ScrollableWidth}\" Minimum=\"0\" \r\n                                        Value=\"{TemplateBinding HorizontalOffset}\" Orientation=\"Horizontal\" \r\n                                        ViewportSize=\"{TemplateBinding ViewportWidth}\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--ComboBoxItem-->\r\n    <Style TargetType=\"ComboBoxItem\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource HoverBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource BorderBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <!--<Setter Property=\"TextAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"TextWrapping\" Value=\"NoWrap\" />-->\r\n        <Setter Property=\"Padding\" Value=\"10,0,0,0\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ComboBoxItem\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"FillColor\" Storyboard.TargetProperty=\"Opacity\" Duration=\"0\" To=\"1\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualState x:Name=\"Unselected\" />\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"StrokeColor\" Storyboard.TargetProperty=\"Opacity\" Duration=\"0\" To=\"1\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"Visibility\" Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"*\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n\r\n                        <!--Start UI-->\r\n                        <Path x:Name=\"FillColor\" Opacity=\"0\" Fill=\"{TemplateBinding Background}\" Margin=\"1,0,-6.5,-2\" Height=\"22\" Stretch=\"Fill\" StrokeThickness=\"1\" Data=\"M0.5,4 C5.4921546,-1.2298763 6.7624655,0.25 16.25,0.25 C26.98455,0.25 37.771278,-0.14736003 48.5,0.25 C58.050766,0.60373205 67.126785,1.8436862 76.75,1.5 C81.214241,1.3405629 85.468109,1 90,1 C93.832878,1 95.48951,0.42107743 98.75,2.75 C103.03876,5.8134003 99,22.711088 99,29 C99,36.099834 99.578392,43.275311 99.25,50.5 C98.582687,65.180809 99.25,79.852791 99.25,94.5 C99.25,106.65568 72.737717,98.226776 56.5,99 C47.401512,99.433258 38.067318,99.75 29,99.75 C23.833334,99.75 18.666666,99.75 13.5,99.75 C11.25,99.75 9,99.75 6.75,99.75 C2.9788802,99.75 3.51701,102.43028 2,97.5 C0.044149127,91.143486 0.5,85.399605 0.5,78.5 C0.5,68.201317 -0.62925881,58.16333 0.5,48 C2.0587127,33.971584 0,18.959808 0,4.75 C0.13653865,4.6544228 0.34602007,4.8137808 0.5,4.75 C0.7177605,4.6598005 0.80388385,4.380744 1,4.25 C0.83333331,4.25 0.66666669,4.25 0.5,4.25 C0.5,4.1666665 0.5,4.0833335 0.5,4 z\"/>\r\n                        <Path x:Name=\"StrokeColor\" Opacity=\"0\" Stroke=\"{TemplateBinding BorderBrush}\" Margin=\"1,0,-3.5,-2\" Height=\"22\" Stretch=\"Fill\" StrokeThickness=\"1\" Data=\"M0.5,4 C5.4921546,-1.2298763 6.7624655,0.25 16.25,0.25 C26.98455,0.25 37.771278,-0.14736003 48.5,0.25 C58.050766,0.60373205 67.126785,1.8436862 76.75,1.5 C81.214241,1.3405629 85.468109,1 90,1 C93.832878,1 95.48951,0.42107743 98.75,2.75 C103.03876,5.8134003 99,22.711088 99,29 C99,36.099834 99.578392,43.275311 99.25,50.5 C98.582687,65.180809 99.25,79.852791 99.25,94.5 C99.25,106.65568 72.737717,98.226776 56.5,99 C47.401512,99.433258 38.067318,99.75 29,99.75 C23.833334,99.75 18.666666,99.75 13.5,99.75 C11.25,99.75 9,99.75 6.75,99.75 C2.9788802,99.75 3.51701,102.43028 2,97.5 C0.044149127,91.143486 0.5,85.399605 0.5,78.5 C0.5,68.201317 -0.62925881,58.16333 0.5,48 C2.0587127,33.971584 0,18.959808 0,4.75 C0.13653865,4.6544228 0.34602007,4.8137808 0.5,4.75 C0.7177605,4.6598005 0.80388385,4.380744 1,4.25 C0.83333331,4.25 0.66666669,4.25 0.5,4.25 C0.5,4.1666665 0.5,4.0833335 0.5,4 z\"/>\r\n\r\n                        <ContentPresenter\r\n                              HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                              VerticalAlignment=\"Center\"\r\n                              Margin=\"{TemplateBinding Padding}\"                              \r\n                            />\r\n                        <!--\r\n                              Content=\"{TemplateBinding Content}\"\r\n                              ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                              FontFamily=\"Arial\"\r\n                              FontSize=\"11\"\r\n                              FontStretch=\"{TemplateBinding FontStretch}\"\r\n                              FontStyle=\"{TemplateBinding FontStyle}\"\r\n                              FontWeight=\"Normal\"\r\n                              HorizontalAlignment=\"Left\"\r\n                              HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                              Padding=\"{TemplateBinding Padding}\"\r\n                              TextAlignment=\"{TemplateBinding TextAlignment}\"\r\n                              TextDecorations=\"{TemplateBinding TextDecorations}\"\r\n                              TextWrapping=\"{TemplateBinding TextWrapping}\"\r\n                              VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                              Foreground=\"{TemplateBinding Foreground}\"/>\r\n-->\r\n                        <Path x:Name=\"FocusVisual\" Height=\"21\" Margin=\"2,0,.25,0\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\".5\" Visibility=\"Collapsed\" Data=\"M0.5,4 C5.4921546,-1.2298763 6.7624655,0.25 16.25,0.25 C26.98455,0.25 37.771278,-0.14736003 48.5,0.25 C58.050766,0.60373205 67.126785,1.8436862 76.75,1.5 C81.214241,1.3405629 85.468109,1 90,1 C93.832878,1 95.48951,0.42107743 98.75,2.75 C103.03876,5.8134003 99,22.711088 99,29 C99,36.099834 99.578392,43.275311 99.25,50.5 C98.582687,65.180809 99.25,79.852791 99.25,94.5 C99.25,106.65568 72.737717,98.226776 56.5,99 C47.401512,99.433258 38.067318,99.75 29,99.75 C23.833334,99.75 18.666666,99.75 13.5,99.75 C11.25,99.75 9,99.75 6.75,99.75 C2.9788802,99.75 3.51701,102.43028 2,97.5 C0.044149127,91.143486 0.5,85.399605 0.5,78.5 C0.5,68.201317 -0.62925881,58.16333 0.5,48 C2.0587127,33.971584 0,18.959808 0,4.75 C0.13653865,4.6544228 0.34602007,4.8137808 0.5,4.75 C0.7177605,4.6598005 0.80388385,4.380744 1,4.25 C0.83333331,4.25 0.66666669,4.25 0.5,4.25 C0.5,4.1666665 0.5,4.0833335 0.5,4 z\"/>\r\n                        <!--End UI-->\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type ComboBox}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n        <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource BorderBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n        <Setter Property=\"Padding\" Value=\"0\"/>\r\n\r\n\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ComboBox}\">\r\n                    <Grid>\r\n                        <ToggleButton Grid.Column=\"2\" Focusable=\"false\" IsChecked=\"{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" ClickMode=\"Press\"/>\r\n                        <ContentPresenter HorizontalAlignment=\"Left\" Margin=\"10,3,23,3\" x:Name=\"ContentSite\" VerticalAlignment=\"Center\" Content=\"{TemplateBinding SelectionBoxItem}\" ContentTemplate=\"{TemplateBinding SelectionBoxItemTemplate}\" ContentTemplateSelector=\"{TemplateBinding ItemTemplateSelector}\" IsHitTestVisible=\"False\"/>\r\n\r\n                        <!--<TextBox Visibility=\"Hidden\" Template=\"{DynamicResource ComboBoxTextBox}\" HorizontalAlignment=\"Left\" Margin=\"3,3,23,3\" x:Name=\"PART_EditableTextBox\" Style=\"{x:Null}\" VerticalAlignment=\"Center\" Focusable=\"True\" Background=\"Transparent\" IsReadOnly=\"{TemplateBinding IsReadOnly}\"/>-->\r\n\r\n                        <Popup IsOpen=\"{TemplateBinding IsDropDownOpen}\" Placement=\"Bottom\" x:Name=\"Popup\" Focusable=\"False\" AllowsTransparency=\"True\" PopupAnimation=\"Slide\">\r\n                            <Grid MaxHeight=\"{TemplateBinding MaxDropDownHeight}\" MinWidth=\"{TemplateBinding ActualWidth}\" x:Name=\"DropDown\" SnapsToDevicePixels=\"True\">\r\n                                <Path Fill=\"#FFFFFFFF\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M8.0486603,-1.7956065 C40.652985,-1.2334629 60.802299,5.3778448 94.571907,-3.8320472 C132.02231,-14.045796 175.82878,1 215,1 C278.08371,1 340.94531,1 405,1 C447.66666,1 488.54492,0.24040417 531.21155,0.24040417 C560.38153,0.24040417 624.77802,-6.8858747 639.86951,-0.77759421 C642.52252,0.29620132 639.86847,98.304474 639.86847,124.43706 C639.86847,190.61852 640.87457,264.57269 640.87457,330.07413 C640.87457,369.30386 637.85645,396.94827 637.85645,435.94669 C637.85645,441.81662 648.37085,477.30365 637.85669,479.72144 C615.7226,484.81128 553.33221,480.23886 538.25421,479.72162 C360.17755,473.61288 232.40511,488.88297 2,479 C4.0243306,313.78604 0,161.53839 0,3 C0.66666669,3 2.3515811,1.2584095 3.0182476,1.2584095 C3.0182476,0.59174258 8.0486603,-1.1289399 8.0486603,-1.7956065 z\"/>\r\n\r\n                                <ScrollViewer Margin=\"4,6,4,6\" SnapsToDevicePixels=\"True\" HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Auto\" CanContentScroll=\"True\">\r\n                                    <ItemsPresenter />\r\n                                </ScrollViewer>\r\n\r\n                                <Path Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"0.5\" Margin=\"-0.094,0.769,0.799,-0.479\" Data=\"M1.7206836,12.568695 C2.4419925,11.031993 1.4481189,7.3090796 1.7209258,5.6722374 C2.2648225,2.4088583 0.46910813,5.715632 5.1693902,3.7012255 C10.004368,1.6290923 20.664461,1.2662256 26,2.3333333 C36.24308,4.3819494 47.8027,3.6553195 58.131069,2.7163765 C68.803482,1.7461575 79.164429,1.9772166 89.908081,1.9772166 C100.39313,1.9772166 98,-0.96195835 98,16.333334 C98,23.112209 96.493988,25.349688 97.298027,31.782001 C98.258453,39.465462 97.476074,52.003723 97.29808,59.862312 C97.103302,68.46196 97.666664,74.564713 97.666664,83 C97.666664,108.95624 103.8933,92.074692 62.072483,97.302299 C52.738716,98.469017 39.806664,100.01 30.333334,99.333336 C22.81004,98.795952 7.3937144,97.694511 1.967056,97.548622 C-0.28294224,97.488136 1.5684019,88.452782 2.3333333,82.333336 C3.1227529,76.017975 2.5054271,71.237221 2,64.666664 C0.6911695,47.651871 3.9379203,29.072496 1.720971,12.568695\"/>\r\n                            </Grid>\r\n                        </Popup>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <!-- This forces the DropDown to have a minimum size if it is empty \r\n                        <Trigger Property=\"HasItems\" Value=\"false\">\r\n                            <Setter Property=\"MinHeight\" Value=\"95\" TargetName=\"DropDownBorder\"/>\r\n                        </Trigger> -->\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                            <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\"/>\r\n                        </Trigger>\r\n                        <!--<Trigger Property=\"AllowsTransparency\" SourceName=\"Popup\" Value=\"true\">\r\n                            <Setter Property=\"CornerRadius\" Value=\"4\" TargetName=\"DropDownBorder\"/>\r\n                            <Setter Property=\"Margin\" Value=\"0,2,0,0\" TargetName=\"DropDownBorder\"/>\r\n                        </Trigger>-->\r\n                        <Trigger Property=\"IsEditable\" Value=\"true\">\r\n                            <Setter Property=\"IsTabStop\" Value=\"false\"/>\r\n                            <!--<Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"PART_EditableTextBox\"/>-->\r\n                            <Setter Property=\"Visibility\" Value=\"Hidden\" TargetName=\"ContentSite\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style TargetType=\"Expander\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Expander\">\r\n                    <Grid>\r\n                        <ContentPresenter />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/UXMusingsRoughRed/Theme.xaml",
    "content": "﻿<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n                    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n                    xmlns:basic=\"clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit\"\r\n                    xmlns:primitives=\"clr-namespace:Microsoft.Windows.Controls.Primitives;assembly=WPFToolkit\"\r\n                    xmlns:vsm=\"clr-namespace:System.Windows;assembly=WPFToolkit\">\r\n\r\n    <!-- Resources -->\r\n    <SolidColorBrush x:Key=\"BaseColorBrush\" Color=\"Tomato\"/>\r\n    <SolidColorBrush x:Key=\"BorderBrush\" Color=\"#FF333333\"/>\r\n    <SolidColorBrush x:Key=\"ForegroundBrush\" Color=\"#FF333333\"/>\r\n    <SolidColorBrush x:Key=\"HoverBrush\" Color=\"WhiteSmoke\"/>\r\n    <SolidColorBrush x:Key=\"HyperlinkBrush\" Color=\"Tomato\"/>\r\n    <SolidColorBrush x:Key=\"WindowBackgroundBrush\" Color=\"#FFFFFFFF\" />\r\n\r\n    <!--Button-->\r\n    <Style TargetType=\"Button\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource BorderBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n        <Setter Property=\"Padding\" Value=\"4\" />\r\n        <Setter Property=\"Cursor\" Value=\"Hand\" />\r\n        <!--<Setter Property=\"TextWrapping\" Value=\"NoWrap\" />-->\r\n        <Setter Property=\"Margin\" Value=\"0,-1,0,0\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Button\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"Pressed\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\">\r\n                                    <Storyboard/>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledVisual\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Duration=\"0\" Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"Visibility\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\"/>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n\r\n                        <!-- Start:UI -->\r\n                        <Path Margin=\"-1.25,0,0,-1\" x:Name=\"LineBack\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"#FFFFFFFF\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\">\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <Path HorizontalAlignment=\"Stretch\" Stretch=\"Fill\" Margin=\"1.5,2.5,5.5,2.5\" x:Name=\"Background\" VerticalAlignment=\"Stretch\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"{TemplateBinding Background}\" StrokeThickness=\"2\">\r\n                            <Path.Data>\r\n                                <PathGeometry>\r\n                                    <PathFigure IsClosed=\"True\" StartPoint=\"55.3734893798828,18.3878383636475\">\r\n                                        <BezierSegment Point1=\"55.4575424194336,19.6423645019531\" Point2=\"54.0918769836426,18.1212940216064\" Point3=\"54.1759376525879,19.3758182525635\"/>\r\n                                        <BezierSegment Point1=\"54.1044921875,19.43869972229\" Point2=\"54.1721153259277,19.5379447937012\" Point3=\"54.101448059082,19.5246734619141\"/>\r\n                                        <BezierSegment Point1=\"53.697998046875,19.2345180511475\" Point2=\"53.7027320861816,20.5981388092041\" Point3=\"53.2657089233398,20.5459175109863\"/>\r\n                                        <LineSegment Point=\"54.9807624816895,20.2940578460693\"/>\r\n                                        <BezierSegment Point1=\"55.4915466308594,19.2132472991943\" Point2=\"55.6735687255859,19.6681518554688\" Point3=\"55.5702743530273,19.2230930328369\"/>\r\n                                        <LineSegment Point=\"55.3734893798828,18.3878383636475\"/>\r\n                                    </PathFigure>\r\n                                    <PathFigure IsClosed=\"True\" StartPoint=\"2.75041627883911,4.18817186355591\">\r\n                                        <BezierSegment Point1=\"2.60941195487976,4.23498106002808\" Point2=\"2.44556498527527,4.34848213195801\" Point3=\"2.25126266479492,4.5509033203125\"/>\r\n                                        <BezierSegment Point1=\"1.95730113983154,3.90779161453247\" Point2=\"1.66666030883789,5.07916784286499\" Point3=\"1.46416211128235,5.60511302947998\"/>\r\n                                        <LineSegment Point=\"1.28398549556732,5.28074789047241\"/>\r\n                                        <LineSegment Point=\"1.2844455242157,5.27347755432129\"/>\r\n                                        <LineSegment Point=\"1.43954491615295,5.49028921127319\"/>\r\n                                        <BezierSegment Point1=\"1.46683251857758,5.47077798843384\" Point2=\"1.34879219532013,5.18408298492432\" Point3=\"1.2877790927887,5.220703125\"/>\r\n                                        <LineSegment Point=\"1.2844455242157,5.27347755432129\"/>\r\n                                        <LineSegment Point=\"1.26432502269745,5.24535417556763\"/>\r\n                                        <LineSegment Point=\"1.28398549556732,5.28074789047241\"/>\r\n                                        <LineSegment Point=\"1.26432502269745,5.59193277359009\"/>\r\n                                        <BezierSegment Point1=\"1.28229105472565,5.78759717941284\" Point2=\"1.3096958398819,5.8595871925354\" Point3=\"1.34388554096222,5.84831285476685\"/>\r\n                                        <LineSegment Point=\"1.46416211128235,5.60511302947998\"/>\r\n                                        <LineSegment Point=\"2.18957805633545,6.91105651855469\"/>\r\n                                        <BezierSegment Point1=\"4.89191150665283,6.34800672531128\" Point2=\"3.10698843002319,8.09412384033203\" Point3=\"4.9653377532959,5.38372611999512\"/>\r\n                                        <BezierSegment Point1=\"3.60521507263184,6.80067920684814\" Point2=\"3.73745012283325,3.86050128936768\" Point3=\"2.75041627883911,4.18817186355591\"/>\r\n                                    </PathFigure>\r\n                                    <PathFigure IsClosed=\"True\" StartPoint=\"3.98743844032288,2.72233080863953\">\r\n                                        <BezierSegment Point1=\"3.87878394126892,2.65442371368408\" Point2=\"3.73797965049744,2.68036603927612\" Point3=\"3.53287696838379,2.89400577545166\"/>\r\n                                        <BezierSegment Point1=\"3.3777277469635,2.55462884902954\" Point2=\"3.22433018684387,3.17277550697327\" Point3=\"3.11745405197144,3.45032072067261\"/>\r\n                                        <LineSegment Point=\"3.02235960960388,3.27914905548096\"/>\r\n                                        <LineSegment Point=\"3.02260160446167,3.27531266212463\"/>\r\n                                        <LineSegment Point=\"3.01198220252991,3.2604718208313\"/>\r\n                                        <LineSegment Point=\"3.02235960960388,3.27914905548096\"/>\r\n                                        <LineSegment Point=\"3.01198220252991,3.44336438179016\"/>\r\n                                        <BezierSegment Point1=\"3.01268339157104,3.45099830627441\" Point2=\"3.01341199874878,3.45827555656433\" Point3=\"3.11745405197144,3.45032072067261\"/>\r\n                                        <LineSegment Point=\"3.50032067298889,4.13947582244873\"/>\r\n                                        <LineSegment Point=\"4.19300651550293,4.08932685852051\"/>\r\n                                        <BezierSegment Point1=\"4.57573270797729,4.15608644485474\" Point2=\"4.22972536087036,4.40621519088745\" Point3=\"4.9653377532959,3.33349204063416\"/>\r\n                                        <BezierSegment Point1=\"4.35003042221069,3.97440934181213\" Point2=\"4.31340551376343,2.92605090141296\" Point3=\"3.98743844032288,2.72233080863953\"/>\r\n                                    </PathFigure>\r\n                                    <PathFigure IsClosed=\"True\" StartPoint=\"43.6054306030273,2.55744552612305\">\r\n                                        <LineSegment Point=\"42.7685508728027,3.07746315002441\"/>\r\n                                        <BezierSegment Point1=\"42.8401260375977,3.02574563026428\" Point2=\"44.8010520935059,3.60871481895447\" Point3=\"44.8063468933105,3.56444692611694\"/>\r\n                                        <LineSegment Point=\"47.3169860839844,3.1744339466095\"/>\r\n                                        <BezierSegment Point1=\"47.7981910705566,2.0477294921875\" Point2=\"50.5490341186523,3.69445133209229\" Point3=\"50.9364852905273,2.43774271011353\"/>\r\n                                        <LineSegment Point=\"46.9194679260254,2.11273193359375\"/>\r\n                                        <BezierSegment Point1=\"45.9232177734375,2.00986051559448\" Point2=\"42.2318840026855,3.34697723388672\" Point3=\"43.6054306030273,2.55744552612305\"/>\r\n                                    </PathFigure>\r\n                                    <PathFigure IsClosed=\"True\" StartPoint=\"16.5382518768311,2.38410639762878\">\r\n                                        <BezierSegment Point1=\"17.9376049041748,2.47057723999023\" Point2=\"28.9235725402832,0.979193687438965\" Point3=\"30.961519241333,1.25740206241608\"/>\r\n                                        <BezierSegment Point1=\"39.7206230163574,2.45314311981201\" Point2=\"36.6131362915039,2.46526336669922\" Point3=\"45.4653663635254,2.03742814064026\"/>\r\n                                        <BezierSegment Point1=\"48.1704330444336,1.90669059753418\" Point2=\"53.7993202209473,2.94819211959839\" Point3=\"56.5043983459473,2.81745433807373\"/>\r\n                                        <BezierSegment Point1=\"57.6275444030762,2.76317286491394\" Point2=\"58.8492164611816,1.81751883029938\" Point3=\"58.7605514526367,4.98419380187988\"/>\r\n                                        <BezierSegment Point1=\"58.6914901733398,7.45075988769531\" Point2=\"59.2414894104004,7.46710634231567\" Point3=\"59.1634330749512,9.40434169769287\"/>\r\n                                        <LineSegment Point=\"59.1302642822266,9.42093944549561\"/>\r\n                                        <BezierSegment Point1=\"58.9689521789551,9.46572589874268\" Point2=\"58.8931922912598,9.64298820495605\" Point3=\"58.9885597229004,10.0852022171021\"/>\r\n                                        <LineSegment Point=\"58.7547225952148,10.0751485824585\"/>\r\n                                        <BezierSegment Point1=\"58.7845993041992,10.1730222702026\" Point2=\"59.0883674621582,10.4170408248901\" Point3=\"59.129207611084,10.4465093612671\"/>\r\n                                        <LineSegment Point=\"58.9072380065918,10.2733154296875\"/>\r\n                                        <BezierSegment Point1=\"58.2435150146484,9.76523780822754\" Point2=\"58.5282859802246,11.6655864715576\" Point3=\"57.8627014160156,11.4802284240723\"/>\r\n                                        <BezierSegment Point1=\"57.8627014160156,11.4802284240723\" Point2=\"58.1601409912109,13.5446062088013\" Point3=\"58.357666015625,14.1711664199829\"/>\r\n                                        <BezierSegment Point1=\"58.9370613098145,16.0090198516846\" Point2=\"58.3653373718262,16.4901638031006\" Point3=\"58.357666015625,18.4179744720459\"/>\r\n                                        <BezierSegment Point1=\"58.3484077453613,20.745641708374\" Point2=\"60.4300498962402,21.9203453063965\" Point3=\"56.8666801452637,21.5362567901611\"/>\r\n                                        <BezierSegment Point1=\"45.6265144348145,20.32470703125\" Point2=\"39.9008178710938,21.5664978027344\" Point3=\"30.3169002532959,20.9313945770264\"/>\r\n                                        <BezierSegment Point1=\"24.7872543334961,20.5649566650391\" Point2=\"17.0756797790527,21.3352470397949\" Point3=\"11.5372772216797,21.6029224395752\"/>\r\n                                        <BezierSegment Point1=\"9.37526988983154,21.7074146270752\" Point2=\"6.82023525238037,22.2953662872314\" Point3=\"4.65164470672607,21.9357109069824\"/>\r\n                                        <BezierSegment Point1=\"1.45201742649078,21.4050598144531\" Point2=\"1.73953628540039,23.0963401794434\" Point3=\"1.51341998577118,17.1753234863281\"/>\r\n                                        <BezierSegment Point1=\"1.38521957397461,13.8183069229126\" Point2=\"0.133225455880165,11.0509176254272\" Point3=\"0.00502508180215955,7.6939001083374\"/>\r\n                                        <BezierSegment Point1=\"-0.0463196896016598,6.3494029045105\" Point2=\"0.306805700063705,4.28786516189575\" Point3=\"0.562162816524506,2.95534110069275\"/>\r\n                                        <LineSegment Point=\"2.65466785430908,2.14960050582886\"/>\r\n                                        <BezierSegment Point1=\"5.5844030380249,2.0080041885376\" Point2=\"7.20274591445923,3.57988381385803\" Point3=\"10.0115203857422,2.2107675075531\"/>\r\n                                        <BezierSegment Point1=\"11.7393894195557,1.36852860450745\" Point2=\"15.138897895813,2.29763579368591\" Point3=\"16.5382518768311,2.38410639762878\"/>\r\n                                    </PathFigure>\r\n                                </PathGeometry>\r\n                            </Path.Data>\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform X=\"1.4916732314436434\" Y=\"-0.23907148924159571\"/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <Path Margin=\"-1.25,0,0,-1\" x:Name=\"Line\" RenderTransformOrigin=\"0.5,0.5\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\">\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <ContentPresenter\r\n                              x:Name=\"contentPresenter\"\r\n                              Content=\"{TemplateBinding Content}\"\r\n                              ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                              RenderTransformOrigin=\"0.5,0.5\" \r\n                            \r\n                              HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" \r\n                              Margin=\"{TemplateBinding Padding}\"\r\n                              VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"                                                           \r\n                            >\r\n\r\n                            <!--                              FontFamily=\"Arial\"\r\n                              FontSize=\"11\"\r\n                              FontWeight=\"Bold\"\r\n                              FontStretch=\"{TemplateBinding FontStretch}\"\r\n                              FontStyle=\"{TemplateBinding FontStyle}\"\r\n                            \r\n                            Foreground=\"{TemplateBinding Foreground}\"\r\n                            \r\n                            Padding=\"{TemplateBinding Padding}\"\r\n                              TextDecorations=\"{TemplateBinding TextDecorations}\"\r\n                              TextWrapping=\"{TemplateBinding TextWrapping}\"\r\n                              TextAlignment=\"Center\"\r\n                              VerticalContentAlignment=\"Center\"\r\n                              HorizontalContentAlignment=\"Center\" -->\r\n                            <ContentPresenter.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </ContentPresenter.RenderTransform>\r\n                        </ContentPresenter>\r\n                        <Path Margin=\"2.75,4.375,4,3.5\" x:Name=\"FocusVisual\" StrokeDashArray=\"1 2\" RenderTransformOrigin=\"0.5,0.5\" Visibility=\"Collapsed\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"0.5\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\">\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <Path Margin=\"-1.25,0,0,-1\" x:Name=\"DisabledVisual\" Stretch=\"Fill\" Stroke=\"#B2FFFFFF\" StrokeThickness=\"2\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\" Opacity=\"0\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"#B2FFFFFF\">\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <!-- End:UI -->\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--CheckBox-->\r\n    <Style TargetType=\"CheckBox\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource BorderBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n        <Setter Property=\"Margin\" Value=\"0\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\"/>\r\n        <Setter Property=\"Cursor\" Value=\"Arrow\"/>\r\n        <!--<Setter Property=\"TextAlignment\" Value=\"Left\"/>-->\r\n        <!--<Setter Property=\"TextWrapping\" Value=\"NoWrap\"/>-->\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"CheckBox\">\r\n                    <Grid Cursor=\"Arrow\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"Pressed\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Fill\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Fill\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"CheckOut\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"CheckOut\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"IndetermintateOut\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"IndetermintateOut\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.125\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.125\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Fill\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.125\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Fill\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.125\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"CheckOut\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.125\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"CheckOut\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.125\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"IndetermintateOut\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.125\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"IndetermintateOut\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.125\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"DisabledVisual\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Content\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"CheckVisual\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\" />\r\n                                <VisualState x:Name=\"Indeterminate\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"IndeterminateVisual\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"ContentFocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ContentFocused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"ContentFocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"*\" />\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <!-- Start:UI -->\r\n                        <Path x:Name=\"Line\" Fill=\"#FFFFFFFF\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Width=\"14\" Height=\"14\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" RenderTransformOrigin=\"0.5,0.5\" Data=\"M2.1666667,234.16667 C5.8173413,233.69049 9.0472345,234.16667 12.666667,234.16667 C13.625546,234.16667 13.614246,233.78091 14.333333,234.5 C14.749932,234.9166 15,235.35416 15,236 C15,238.95284 15.614571,241.34795 14.333333,244.16667 C13.440694,246.13048 15.787796,246.83333 12.166667,246.83333 C9.3277521,246.83333 6.6090913,246.69827 3.8333333,246.5 C1.8735431,246.36002 2.6004581,249.33678 2,244.83333 C1.790879,243.26492 2,241.59055 2,240 C2,238.45003 1.63987,236.88104 1.8333334,235.33333 C2.0027289,233.97816 2.1791835,234.78062 3,233.66667\">\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <Path x:Name=\"Fill\" Fill=\"{TemplateBinding Background}\" Stretch=\"Fill\" StrokeThickness=\"2\" Width=\"8.5\" HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" Height=\"8.5\" RenderTransformOrigin=\"0.5,0.5\" Data=\"M2.1666667,234.16667 C5.8173413,233.69049 9.42311,233.73672 13.042542,233.73672 C14.001422,233.73672 13.614246,233.78091 14.333333,234.5 C14.749932,234.9166 15.64248,235.36954 15.64248,236.01538 C15.64248,238.96822 16.676264,242.16611 15.395027,244.98483 C14.502388,246.94864 16.118021,247.54753 12.496893,247.54753 C9.6579781,247.54753 8.7105455,247.99353 5.9347878,247.79526 C3.9749978,247.65527 2.6004581,249.33678 2,244.83333 C1.790879,243.26492 2,241.59055 2,240 C2,238.45003 1.63987,236.88104 1.8333334,235.33333 C2.0027289,233.97816 2.4982078,233.78133 3.3190243,232.66737\">\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <Grid x:Name=\"CheckOut\">\r\n                            <Grid.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                </TransformGroup>\r\n                            </Grid.RenderTransform>\r\n                            <Path Fill=\"{TemplateBinding BorderBrush}\" Stroke=\"{TemplateBinding BorderBrush}\" Stretch=\"Fill\" StrokeThickness=\"0.75\" x:Name=\"CheckVisual\" Width=\"7\" Height=\"6\" Opacity=\"0\" RenderTransformOrigin=\"0.5,0.5\" Data=\"M5.6667972,237.66629 C7.2538533,237.87108 8.2900753,237.86133 9.9167976,237.49983 C10.450503,237.38123 10.932315,238.16667 11.5,238.16667 C12.126745,238.16667 12.194501,237.722 11.916667,238.83333 C11.794479,239.32208 12.080911,244.03731 11.666667,244.08333 C10.690258,244.19182 5.3457832,245.12595 4.75,244.08333 C4.0560555,242.86893 4.5,240.56615 4.5,239.08333 C4.5,237.8156 4.1810727,238.00514 5.6667972,237.66629 z\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"IndetermintateOut\">\r\n                            <Grid.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                </TransformGroup>\r\n                            </Grid.RenderTransform>\r\n                            <Path Fill=\"#7FFFFFFF\" Stroke=\"{TemplateBinding BorderBrush}\" Stretch=\"Fill\" StrokeThickness=\"1\" x:Name=\"IndeterminateVisual\" Width=\"7\" Height=\"6\" Opacity=\"0\" RenderTransformOrigin=\"0.5,0.5\" Data=\"M5.6667972,237.66629 C7.2538533,237.87108 8.2900753,237.86133 9.9167976,237.49983 C10.450503,237.38123 10.932315,238.16667 11.5,238.16667 C12.126745,238.16667 12.194501,237.722 11.916667,238.83333 C11.794479,239.32208 12.080911,244.03731 11.666667,244.08333 C10.690258,244.19182 5.3457832,245.12595 4.75,244.08333 C4.0560555,242.86893 4.5,240.56615 4.5,239.08333 C4.5,237.8156 4.1810727,238.00514 5.6667972,237.66629 z\"/>\r\n                        </Grid>\r\n                        <ContentPresenter\r\n\t\t                          x:Name=\"Content\"\r\n\t\t                          Grid.Column=\"1\"\r\n\t\t                          Content=\"{TemplateBinding Content}\"\r\n\t\t                          ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n\t\t                          Margin=\"4,2,2,1\"\r\n\t\t                          IsHitTestVisible=\"true\" />\r\n                        <!--\r\n\t\t                          Background=\"Transparent\"\r\n\t\t                          FontFamily=\"Arial\"\r\n\t\t                          FontSize=\"11\"\r\n\t\t                          FontWeight=\"Normal\"\r\n\t\t                          FontStretch=\"{TemplateBinding FontStretch}\"\r\n\t\t                          FontStyle=\"{TemplateBinding FontStyle}\"\r\n\t\t                          Foreground=\"{TemplateBinding Foreground}\"\r\n\t\t                          HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n\t\t                          Padding=\"{TemplateBinding Padding}\"\r\n\t\t                          TextAlignment=\"{TemplateBinding TextAlignment}\"\r\n\t\t                          TextDecorations=\"{TemplateBinding TextDecorations}\"\r\n\t\t                          TextWrapping=\"{TemplateBinding TextWrapping}\"\r\n\t\t                          VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n-->\r\n                        <Rectangle x:Name=\"ContentFocusVisualElement\" Grid.Column=\"1\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\".5\" StrokeDashCap=\"Square\" Margin=\"1\" StrokeDashArray=\"1 2\" Visibility=\"Collapsed\" RadiusX=\"2\" RadiusY=\"2\" IsHitTestVisible=\"false\"/>\r\n                        <Path x:Name=\"DisabledVisual\" Fill=\"#B2FFFFFF\" Opacity=\"0\" Stretch=\"Fill\" Stroke=\"#B2FFFFFF\" StrokeThickness=\"2\" Width=\"14\" Height=\"14\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" RenderTransformOrigin=\"0.5,0.5\" Data=\"M2.1666667,234.16667 C5.8173413,233.69049 9.0472345,234.16667 12.666667,234.16667 C13.625546,234.16667 13.614246,233.78091 14.333333,234.5 C14.749932,234.9166 15,235.35416 15,236 C15,238.95284 15.614571,241.34795 14.333333,244.16667 C13.440694,246.13048 15.787796,246.83333 12.166667,246.83333 C9.3277521,246.83333 6.6090913,246.69827 3.8333333,246.5 C1.8735431,246.36002 2.6004581,249.33678 2,244.83333 C1.790879,243.26492 2,241.59055 2,240 C2,238.45003 1.63987,236.88104 1.8333334,235.33333 C2.0027289,233.97816 2.1791835,234.78062 3,233.66667\"/>\r\n                        <!-- Start:UI -->\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--RadioButton-->\r\n    <Style TargetType=\"RadioButton\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource BorderBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n        <Setter Property=\"Margin\" Value=\"0\"/>\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\"/>\r\n        <Setter Property=\"Cursor\" Value=\"Arrow\"/>\r\n        <!--<Setter Property=\"TextAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"TextWrapping\" Value=\"NoWrap\"/>-->\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"RadioButton\">\r\n                    <Grid Cursor=\"Arrow\">\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"Pressed\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Fill\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Fill\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"CheckOut\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"CheckOut\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.125\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.125\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Fill\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.125\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Fill\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.125\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"CheckOut\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.125\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"CheckOut\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.125\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledVisual\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.7\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"Content\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"CheckVisual\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\"/>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Unfocused\" >\r\n                                    <Storyboard/>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"ContentFocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"ContentFocused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"ContentFocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"Auto\" />\r\n                            <ColumnDefinition Width=\"*\" />\r\n                        </Grid.ColumnDefinitions>\r\n\r\n                        <!-- Start:UI -->\r\n                        <Path x:Name=\"Line\" Margin=\"0,0,0,0\" Fill=\"#FFFFFFFF\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Width=\"14\" Height=\"14\" RenderTransformOrigin=\"0.5,0.5\" Data=\"M2.6666667,237.16667 C4.2994065,235.0237 4.2461996,234.08333 7.75,234.08333 C9.1296425,234.08333 10.540268,233.97746 11.916667,234.08333 C12.87594,234.15712 13.290311,234.70699 14,235.41667 C15.771234,237.1879 15.757409,238.28888 15.25,241.33333 C14.939452,243.19662 14.419329,244.38515 12.333333,245.33333 C11.006699,245.93636 10.253301,245.91667 8.75,245.91667 C7.8333335,245.91667 6.9166665,245.91667 6,245.91667 C4.4510226,245.91667 4.9184051,245.96489 3.75,244.66667 C1.6190016,242.29889 1.251086,240.91795 2.6666667,237.16667 z\">\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <Path x:Name=\"Fill\" Margin=\"0,0,0,0\" Fill=\"{TemplateBinding Background}\" Stretch=\"Fill\" StrokeThickness=\"2\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Width=\"9.618\" Height=\"8.04\" RenderTransformOrigin=\"0.5,0.5\" Data=\"M1.2876575,236.0699 C2.9203973,233.92693 5.3235211,233.38657 8.827322,233.38657 C10.206964,233.38657 10.540268,233.97746 11.916667,234.08333 C12.87594,234.15712 13.290311,234.70699 14,235.41667 C15.771234,237.1879 15.493634,238.80948 14.986225,241.85393 C14.675677,243.71722 14.862322,244.8708 12.776326,245.81898 C11.449692,246.42201 10.363843,245.13373 8.8605423,245.13373 C7.9438763,245.13373 6.9166665,245.91667 6,245.91667 C4.4510226,245.91667 1.1887827,244.58354 0.02037777,243.28532 C-2.1106207,240.91754 -0.12792324,239.82118 1.2876575,236.0699 z\">\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <Grid x:Name=\"CheckOut\">\r\n                            <Grid.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                </TransformGroup>\r\n                            </Grid.RenderTransform>\r\n                            <Path x:Name=\"CheckVisual\" Height=\"5\" HorizontalAlignment=\"Center\" Margin=\"0,0,0,0\" VerticalAlignment=\"Center\" Width=\"5\" Fill=\"{TemplateBinding BorderBrush}\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"0.5\" Opacity=\"0\" RenderTransformOrigin=\"0.5,0.5\" Data=\"M7.4375,238.1875 C8.021925,237.78763 8.4588184,237.78125 9.25,237.78125 C10.516856,237.78125 10.221523,237.67723 10.8125,239.1875 C10.928074,239.48285 11.086929,239.70766 11.125,240.03125 C11.160986,240.33713 11.284562,240.83171 11.15625,241.125 C10.730259,242.09869 9.9986687,241.61713 9.21875,242.09375 C8.5447254,242.50566 8.1085663,242.95682 7.0625,242.40625 C6.1778407,241.94064 5.9525313,241.50909 5.84375,240.3125 C5.7126927,238.87086 6.2825603,239.03349 7.5625,238.0625\">\r\n                            </Path>\r\n                        </Grid>\r\n                        <ContentPresenter\r\n                              Grid.Column=\"1\"\r\n                              Content=\"{TemplateBinding Content}\"\r\n                              ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                              Margin=\"4,2,2,1\"\r\n                              IsHitTestVisible=\"true\" />\r\n                        <!--\r\n                              Background=\"Transparent\"\r\n                              FontFamily=\"Arial\"\r\n                              FontSize=\"11\"\r\n                              FontWeight=\"Normal\"\r\n                              FontStretch=\"{TemplateBinding FontStretch}\"\r\n                              FontStyle=\"{TemplateBinding FontStyle}\"\r\n\t\t                      Foreground=\"{TemplateBinding Foreground}\"\r\n                              HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                              Padding=\"{TemplateBinding Padding}\"\r\n                              TextAlignment=\"{TemplateBinding TextAlignment}\"\r\n                              TextDecorations=\"{TemplateBinding TextDecorations}\"\r\n                              TextWrapping=\"{TemplateBinding TextWrapping}\"\r\n                              VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                        \r\n-->\r\n                        <Rectangle x:Name=\"ContentFocusVisualElement\" StrokeDashArray=\"1 2\" Grid.Column=\"1\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\".5\" StrokeDashCap=\"Square\" Margin=\"1\" Visibility=\"Collapsed\" RadiusX=\"2\" RadiusY=\"2\" IsHitTestVisible=\"false\"/>\r\n                        <Path x:Name=\"DisabledVisual\" Height=\"14\" Width=\"14\" Margin=\"0,0,0,0\" Fill=\"#B2FFFFFF\" Stretch=\"Fill\" Stroke=\"#B2FFFFFF\" StrokeThickness=\"2\" Opacity=\"0\" Data=\"M2.6666667,237.16667 C4.2994065,235.0237 4.2461996,234.08333 7.75,234.08333 C9.1296425,234.08333 10.540268,233.97746 11.916667,234.08333 C12.87594,234.15712 13.290311,234.70699 14,235.41667 C15.771234,237.1879 15.757409,238.28888 15.25,241.33333 C14.939452,243.19662 14.419329,244.38515 12.333333,245.33333 C11.006699,245.93636 10.253301,245.91667 8.75,245.91667 C7.8333335,245.91667 6.9166665,245.91667 6,245.91667 C4.4510226,245.91667 4.9184051,245.96489 3.75,244.66667 C1.6190016,242.29889 1.251086,240.91795 2.6666667,237.16667 z\"/>\r\n                        <!-- Start:UI -->\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--ToggleButton-->\r\n    <Style TargetType=\"ToggleButton\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource BorderBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n        <Setter Property=\"Padding\" Value=\"4\" />\r\n        <Setter Property=\"Cursor\" Value=\"Hand\" />\r\n        <!--<Setter Property=\"TextWrapping\" Value=\"NoWrap\" />-->\r\n        <Setter Property=\"Margin\" Value=\"0,-1,0,0\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ToggleButton\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"Pressed\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Noise\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Noise\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Noise\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Noise\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"contentPresenter\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledVisual\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"CheckStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Checked\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"NoiseOne\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"NoiseTwo\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unchecked\" >\r\n                                    <Storyboard/>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Indeterminate\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"NoiseOne\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                        <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"NoiseTwo\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n\r\n                        <!-- Start:UI -->\r\n                        <Path Margin=\"-1.25,0,0,-1\" x:Name=\"LineBack\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"#FFFFFFFF\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\">\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <Path HorizontalAlignment=\"Stretch\" Stretch=\"Fill\" Margin=\"1.5,2.5,5.5,2.5\" x:Name=\"Background\" VerticalAlignment=\"Stretch\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"{TemplateBinding Background}\" StrokeThickness=\"2\">\r\n                            <Path.Data>\r\n                                <PathGeometry>\r\n                                    <PathFigure IsClosed=\"True\" StartPoint=\"55.3734893798828,18.3878383636475\">\r\n                                        <BezierSegment Point1=\"55.4575424194336,19.6423645019531\" Point2=\"54.0918769836426,18.1212940216064\" Point3=\"54.1759376525879,19.3758182525635\"/>\r\n                                        <BezierSegment Point1=\"54.1044921875,19.43869972229\" Point2=\"54.1721153259277,19.5379447937012\" Point3=\"54.101448059082,19.5246734619141\"/>\r\n                                        <BezierSegment Point1=\"53.697998046875,19.2345180511475\" Point2=\"53.7027320861816,20.5981388092041\" Point3=\"53.2657089233398,20.5459175109863\"/>\r\n                                        <LineSegment Point=\"54.9807624816895,20.2940578460693\"/>\r\n                                        <BezierSegment Point1=\"55.4915466308594,19.2132472991943\" Point2=\"55.6735687255859,19.6681518554688\" Point3=\"55.5702743530273,19.2230930328369\"/>\r\n                                        <LineSegment Point=\"55.3734893798828,18.3878383636475\"/>\r\n                                    </PathFigure>\r\n                                    <PathFigure IsClosed=\"True\" StartPoint=\"2.75041627883911,4.18817186355591\">\r\n                                        <BezierSegment Point1=\"2.60941195487976,4.23498106002808\" Point2=\"2.44556498527527,4.34848213195801\" Point3=\"2.25126266479492,4.5509033203125\"/>\r\n                                        <BezierSegment Point1=\"1.95730113983154,3.90779161453247\" Point2=\"1.66666030883789,5.07916784286499\" Point3=\"1.46416211128235,5.60511302947998\"/>\r\n                                        <LineSegment Point=\"1.28398549556732,5.28074789047241\"/>\r\n                                        <LineSegment Point=\"1.2844455242157,5.27347755432129\"/>\r\n                                        <LineSegment Point=\"1.43954491615295,5.49028921127319\"/>\r\n                                        <BezierSegment Point1=\"1.46683251857758,5.47077798843384\" Point2=\"1.34879219532013,5.18408298492432\" Point3=\"1.2877790927887,5.220703125\"/>\r\n                                        <LineSegment Point=\"1.2844455242157,5.27347755432129\"/>\r\n                                        <LineSegment Point=\"1.26432502269745,5.24535417556763\"/>\r\n                                        <LineSegment Point=\"1.28398549556732,5.28074789047241\"/>\r\n                                        <LineSegment Point=\"1.26432502269745,5.59193277359009\"/>\r\n                                        <BezierSegment Point1=\"1.28229105472565,5.78759717941284\" Point2=\"1.3096958398819,5.8595871925354\" Point3=\"1.34388554096222,5.84831285476685\"/>\r\n                                        <LineSegment Point=\"1.46416211128235,5.60511302947998\"/>\r\n                                        <LineSegment Point=\"2.18957805633545,6.91105651855469\"/>\r\n                                        <BezierSegment Point1=\"4.89191150665283,6.34800672531128\" Point2=\"3.10698843002319,8.09412384033203\" Point3=\"4.9653377532959,5.38372611999512\"/>\r\n                                        <BezierSegment Point1=\"3.60521507263184,6.80067920684814\" Point2=\"3.73745012283325,3.86050128936768\" Point3=\"2.75041627883911,4.18817186355591\"/>\r\n                                    </PathFigure>\r\n                                    <PathFigure IsClosed=\"True\" StartPoint=\"3.98743844032288,2.72233080863953\">\r\n                                        <BezierSegment Point1=\"3.87878394126892,2.65442371368408\" Point2=\"3.73797965049744,2.68036603927612\" Point3=\"3.53287696838379,2.89400577545166\"/>\r\n                                        <BezierSegment Point1=\"3.3777277469635,2.55462884902954\" Point2=\"3.22433018684387,3.17277550697327\" Point3=\"3.11745405197144,3.45032072067261\"/>\r\n                                        <LineSegment Point=\"3.02235960960388,3.27914905548096\"/>\r\n                                        <LineSegment Point=\"3.02260160446167,3.27531266212463\"/>\r\n                                        <LineSegment Point=\"3.01198220252991,3.2604718208313\"/>\r\n                                        <LineSegment Point=\"3.02235960960388,3.27914905548096\"/>\r\n                                        <LineSegment Point=\"3.01198220252991,3.44336438179016\"/>\r\n                                        <BezierSegment Point1=\"3.01268339157104,3.45099830627441\" Point2=\"3.01341199874878,3.45827555656433\" Point3=\"3.11745405197144,3.45032072067261\"/>\r\n                                        <LineSegment Point=\"3.50032067298889,4.13947582244873\"/>\r\n                                        <LineSegment Point=\"4.19300651550293,4.08932685852051\"/>\r\n                                        <BezierSegment Point1=\"4.57573270797729,4.15608644485474\" Point2=\"4.22972536087036,4.40621519088745\" Point3=\"4.9653377532959,3.33349204063416\"/>\r\n                                        <BezierSegment Point1=\"4.35003042221069,3.97440934181213\" Point2=\"4.31340551376343,2.92605090141296\" Point3=\"3.98743844032288,2.72233080863953\"/>\r\n                                    </PathFigure>\r\n                                    <PathFigure IsClosed=\"True\" StartPoint=\"43.6054306030273,2.55744552612305\">\r\n                                        <LineSegment Point=\"42.7685508728027,3.07746315002441\"/>\r\n                                        <BezierSegment Point1=\"42.8401260375977,3.02574563026428\" Point2=\"44.8010520935059,3.60871481895447\" Point3=\"44.8063468933105,3.56444692611694\"/>\r\n                                        <LineSegment Point=\"47.3169860839844,3.1744339466095\"/>\r\n                                        <BezierSegment Point1=\"47.7981910705566,2.0477294921875\" Point2=\"50.5490341186523,3.69445133209229\" Point3=\"50.9364852905273,2.43774271011353\"/>\r\n                                        <LineSegment Point=\"46.9194679260254,2.11273193359375\"/>\r\n                                        <BezierSegment Point1=\"45.9232177734375,2.00986051559448\" Point2=\"42.2318840026855,3.34697723388672\" Point3=\"43.6054306030273,2.55744552612305\"/>\r\n                                    </PathFigure>\r\n                                    <PathFigure IsClosed=\"True\" StartPoint=\"16.5382518768311,2.38410639762878\">\r\n                                        <BezierSegment Point1=\"17.9376049041748,2.47057723999023\" Point2=\"28.9235725402832,0.979193687438965\" Point3=\"30.961519241333,1.25740206241608\"/>\r\n                                        <BezierSegment Point1=\"39.7206230163574,2.45314311981201\" Point2=\"36.6131362915039,2.46526336669922\" Point3=\"45.4653663635254,2.03742814064026\"/>\r\n                                        <BezierSegment Point1=\"48.1704330444336,1.90669059753418\" Point2=\"53.7993202209473,2.94819211959839\" Point3=\"56.5043983459473,2.81745433807373\"/>\r\n                                        <BezierSegment Point1=\"57.6275444030762,2.76317286491394\" Point2=\"58.8492164611816,1.81751883029938\" Point3=\"58.7605514526367,4.98419380187988\"/>\r\n                                        <BezierSegment Point1=\"58.6914901733398,7.45075988769531\" Point2=\"59.2414894104004,7.46710634231567\" Point3=\"59.1634330749512,9.40434169769287\"/>\r\n                                        <LineSegment Point=\"59.1302642822266,9.42093944549561\"/>\r\n                                        <BezierSegment Point1=\"58.9689521789551,9.46572589874268\" Point2=\"58.8931922912598,9.64298820495605\" Point3=\"58.9885597229004,10.0852022171021\"/>\r\n                                        <LineSegment Point=\"58.7547225952148,10.0751485824585\"/>\r\n                                        <BezierSegment Point1=\"58.7845993041992,10.1730222702026\" Point2=\"59.0883674621582,10.4170408248901\" Point3=\"59.129207611084,10.4465093612671\"/>\r\n                                        <LineSegment Point=\"58.9072380065918,10.2733154296875\"/>\r\n                                        <BezierSegment Point1=\"58.2435150146484,9.76523780822754\" Point2=\"58.5282859802246,11.6655864715576\" Point3=\"57.8627014160156,11.4802284240723\"/>\r\n                                        <BezierSegment Point1=\"57.8627014160156,11.4802284240723\" Point2=\"58.1601409912109,13.5446062088013\" Point3=\"58.357666015625,14.1711664199829\"/>\r\n                                        <BezierSegment Point1=\"58.9370613098145,16.0090198516846\" Point2=\"58.3653373718262,16.4901638031006\" Point3=\"58.357666015625,18.4179744720459\"/>\r\n                                        <BezierSegment Point1=\"58.3484077453613,20.745641708374\" Point2=\"60.4300498962402,21.9203453063965\" Point3=\"56.8666801452637,21.5362567901611\"/>\r\n                                        <BezierSegment Point1=\"45.6265144348145,20.32470703125\" Point2=\"39.9008178710938,21.5664978027344\" Point3=\"30.3169002532959,20.9313945770264\"/>\r\n                                        <BezierSegment Point1=\"24.7872543334961,20.5649566650391\" Point2=\"17.0756797790527,21.3352470397949\" Point3=\"11.5372772216797,21.6029224395752\"/>\r\n                                        <BezierSegment Point1=\"9.37526988983154,21.7074146270752\" Point2=\"6.82023525238037,22.2953662872314\" Point3=\"4.65164470672607,21.9357109069824\"/>\r\n                                        <BezierSegment Point1=\"1.45201742649078,21.4050598144531\" Point2=\"1.73953628540039,23.0963401794434\" Point3=\"1.51341998577118,17.1753234863281\"/>\r\n                                        <BezierSegment Point1=\"1.38521957397461,13.8183069229126\" Point2=\"0.133225455880165,11.0509176254272\" Point3=\"0.00502508180215955,7.6939001083374\"/>\r\n                                        <BezierSegment Point1=\"-0.0463196896016598,6.3494029045105\" Point2=\"0.306805700063705,4.28786516189575\" Point3=\"0.562162816524506,2.95534110069275\"/>\r\n                                        <LineSegment Point=\"2.65466785430908,2.14960050582886\"/>\r\n                                        <BezierSegment Point1=\"5.5844030380249,2.0080041885376\" Point2=\"7.20274591445923,3.57988381385803\" Point3=\"10.0115203857422,2.2107675075531\"/>\r\n                                        <BezierSegment Point1=\"11.7393894195557,1.36852860450745\" Point2=\"15.138897895813,2.29763579368591\" Point3=\"16.5382518768311,2.38410639762878\"/>\r\n                                    </PathFigure>\r\n                                </PathGeometry>\r\n                            </Path.Data>\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform X=\"1.4916732314436434\" Y=\"-0.23907148924159571\"/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <Path Margin=\"-1.25,0,0,-1\" x:Name=\"Line\" RenderTransformOrigin=\"0.5,0.5\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\">\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <ContentPresenter\r\n                              x:Name=\"contentPresenter\"\r\n                              Content=\"{TemplateBinding Content}\"\r\n                              ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                              RenderTransformOrigin=\"0.5,0.5\" \r\n                            \r\n                              HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" \r\n                              Margin=\"{TemplateBinding Padding}\"\r\n                              VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" \r\n                            >\r\n                            <!--\r\n                              FontFamily=\"Arial\"\r\n                              FontSize=\"11\"\r\n                              FontWeight=\"Bold\"\r\n                              FontStretch=\"{TemplateBinding FontStretch}\"\r\n                              FontStyle=\"{TemplateBinding FontStyle}\"\r\n                              Foreground=\"{TemplateBinding Foreground}\"\r\n                              Padding=\"{TemplateBinding Padding}\"\r\n                              TextDecorations=\"{TemplateBinding TextDecorations}\"\r\n                              TextWrapping=\"{TemplateBinding TextWrapping}\"\r\n                              TextAlignment=\"Center\"\r\n                              VerticalContentAlignment=\"Center\"\r\n                              HorizontalContentAlignment=\"Center\"\r\n                            \r\n-->\r\n                            <ContentPresenter.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </ContentPresenter.RenderTransform>\r\n                        </ContentPresenter>\r\n                        <Grid Margin=\"-0.185,-1.02,0.125,-0.375\" x:Name=\"Noise\" RenderTransformOrigin=\"0.5,0.5\">\r\n                            <Grid.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Grid.RenderTransform>\r\n                            <Grid Margin=\"2.625,3.625,0,0\" x:Name=\"NoiseOne\" Opacity=\"0\">\r\n                                <Path Height=\"2.018\" HorizontalAlignment=\"Right\" Margin=\"0,0,0.625,7.635\" VerticalAlignment=\"Bottom\" Width=\"6\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M58.25,17.625 C61.473705,16.819075 58.619175,15.871116 62,18.125 C62.438251,18.417168 63.276283,18.067675 63.75,18\"/>\r\n                                <Path HorizontalAlignment=\"Right\" Margin=\"0,9.75,0.375,10.984\" Width=\"7.625\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M56.265625,12.717266 C58.762352,14.039062 59.299107,14.252841 62.25,12.375 C62.36116,12.30426 62.504715,12.446218 62.625,12.5 C62.931671,12.637115 63.193027,12.863567 63.5,13 C63.576153,13.033845 63.673012,13.03189 63.75,13 C63.858879,12.954901 63.88221,12.746201 64,12.75\"/>\r\n                                <Path Height=\"2.971\" HorizontalAlignment=\"Right\" Margin=\"0,4.164,0,0\" VerticalAlignment=\"Top\" Width=\"7.5\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M57.375,7.75 C61.094475,7.75 59.169235,5.0442362 62.75,8.625 C63.768261,9.64326 62.873402,9.1565504 64.375,8.875\"/>\r\n                                <Path HorizontalAlignment=\"Right\" Margin=\"0,0,0.375,2.947\" Width=\"7.167\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M56.895832,11.943392 C59.392559,13.265187 59.299107,14.252841 62.25,12.375 C62.36116,12.30426 62.504715,12.446218 62.625,12.5 C62.931671,12.637115 63.193027,12.863567 63.5,13 C63.576153,13.033845 63.673012,13.03189 63.75,13 C63.858879,12.954901 63.88221,12.746201 64,12.75\" Height=\"3.095\" VerticalAlignment=\"Bottom\"/>\r\n                                <Path HorizontalAlignment=\"Right\" Margin=\"0,0,0.375,0\" Width=\"7.625\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M56.265625,12.717266 C58.762352,14.039062 59.299107,14.252841 62.25,12.375 C62.36116,12.30426 62.504715,12.446218 62.625,12.5 C62.931671,12.637115 63.193027,12.863567 63.5,13 C63.576153,13.033845 63.673012,13.03189 63.75,13 C63.858879,12.954901 63.88221,12.746201 64,12.75\" Height=\"3.035\" VerticalAlignment=\"Top\"/>\r\n                                <Path HorizontalAlignment=\"Right\" Margin=\"0,7.035,0.625,0\" Width=\"6\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M58.5,12.625 C60.996727,13.946795 59.299107,14.252841 62.25,12.375 C62.36116,12.30426 62.504715,12.446218 62.625,12.5 C62.931671,12.637115 63.193027,12.863567 63.5,13 C63.576153,13.033845 63.673012,13.03189 63.75,13 C63.858879,12.954901 63.88221,12.746201 64,12.75\" Height=\"1.844\" VerticalAlignment=\"Top\"/>\r\n                            </Grid>\r\n                            <Grid Margin=\"0,0,2.625,3.625\" x:Name=\"NoiseTwo\" Opacity=\"0\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                <Grid.RenderTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform/>\r\n                                        <SkewTransform/>\r\n                                        <RotateTransform Angle=\"-180\"/>\r\n                                        <TranslateTransform/>\r\n                                    </TransformGroup>\r\n                                </Grid.RenderTransform>\r\n                                <Path Height=\"2.018\" HorizontalAlignment=\"Right\" Margin=\"0,0,0.25,7.635\" VerticalAlignment=\"Bottom\" Width=\"6\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M58.25,17.625 C61.473705,16.819075 58.619175,15.871116 62,18.125 C62.438251,18.417168 63.276283,18.067675 63.75,18\"/>\r\n                                <Path HorizontalAlignment=\"Right\" Margin=\"0,9.75,0.375,10.984\" Width=\"7.625\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M56.265625,12.717266 C58.762352,14.039062 59.299107,14.252841 62.25,12.375 C62.36116,12.30426 62.504715,12.446218 62.625,12.5 C62.931671,12.637115 63.193027,12.863567 63.5,13 C63.576153,13.033845 63.673012,13.03189 63.75,13 C63.858879,12.954901 63.88221,12.746201 64,12.75\"/>\r\n                                <Path Height=\"2.971\" HorizontalAlignment=\"Right\" Margin=\"0,4.164,0,0\" VerticalAlignment=\"Top\" Width=\"7.5\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M57.375,7.75 C61.094475,7.75 59.169235,5.0442362 62.75,8.625 C63.768261,9.64326 62.873402,9.1565504 64.375,8.875\"/>\r\n                                <Path HorizontalAlignment=\"Right\" Margin=\"0,0,0.375,3.891\" Width=\"6\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M58.5,12.625 C60.996727,13.946795 59.299107,14.252841 62.25,12.375 C62.36116,12.30426 62.504715,12.446218 62.625,12.5 C62.931671,12.637115 63.193027,12.863567 63.5,13 C63.576153,13.033845 63.673012,13.03189 63.75,13 C63.858879,12.954901 63.88221,12.746201 64,12.75\" Height=\"1.844\" VerticalAlignment=\"Bottom\"/>\r\n                                <Path HorizontalAlignment=\"Right\" Margin=\"0,7.035,-0.315,0\" Width=\"6.94\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M58.5,12.625 C60.996727,13.946795 59.299107,14.252841 62.25,12.375 C62.36116,12.30426 62.504715,12.446218 62.625,12.5 C62.931671,12.637115 63.193027,12.863567 63.5,13 C63.576153,13.033845 63.673012,13.03189 63.75,13 C63.858879,12.954901 65.174706,12.864925 65.292496,12.868725\" Height=\"3\" VerticalAlignment=\"Top\"/>\r\n                                <Path Height=\"2.018\" HorizontalAlignment=\"Right\" Margin=\"0,0,1.5,0\" VerticalAlignment=\"Top\" Width=\"6\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M58.25,17.625 C61.473705,16.819075 58.619175,15.871116 62,18.125 C62.438251,18.417168 63.276283,18.067675 63.75,18\"/>\r\n                                <Path HorizontalAlignment=\"Right\" Margin=\"0,-3.299,2,0\" Width=\"6\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M58.5,12.625 C60.996727,13.946795 59.299107,14.252841 62.25,12.375 C62.36116,12.30426 62.504715,12.446218 62.625,12.5 C62.931671,12.637115 63.193027,12.863567 63.5,13 C63.576153,13.033845 63.673012,13.03189 63.75,13 C63.858879,12.954901 63.88221,12.746201 64,12.75\" Height=\"1.844\" VerticalAlignment=\"Top\"/>\r\n                            </Grid>\r\n                        </Grid>\r\n                        <Path Margin=\"2.75,4.375,4,3.5\" x:Name=\"FocusVisual\" StrokeDashArray=\"1 2\" RenderTransformOrigin=\"0.5,0.5\" Visibility=\"Collapsed\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"0.5\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\">\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <Path Margin=\"-1.25,0,0,-1\" x:Name=\"DisabledVisual\" Stretch=\"Fill\" Stroke=\"#B2FFFFFF\" StrokeThickness=\"2\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\" Opacity=\"0\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"#B2FFFFFF\">\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <!-- End:UI -->\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--Thumb-->\r\n    <Style TargetType=\"Thumb\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource BorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Thumb\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"MouseOver\"/>\r\n                                    <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"Pressed\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Pressed\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"DisabledVisual\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n\r\n                        <!--Start UI-->\r\n                        <Path Margin=\"-1.25,0,0,-1\" x:Name=\"LineBack\" Fill=\"#FFFFFFFF\" RenderTransformOrigin=\"0.5,0.5\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\">\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <Path HorizontalAlignment=\"Stretch\" Stretch=\"Fill\" Margin=\"1,2,5,2\" x:Name=\"Background\" VerticalAlignment=\"Stretch\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"{TemplateBinding Background}\" StrokeThickness=\"2\">\r\n                            <Path.Data>\r\n                                <PathGeometry>\r\n                                    <PathFigure IsClosed=\"True\" StartPoint=\"55.3734893798828,18.3878383636475\">\r\n                                        <BezierSegment Point1=\"55.4575424194336,19.6423645019531\" Point2=\"54.0918769836426,18.1212940216064\" Point3=\"54.1759376525879,19.3758182525635\"/>\r\n                                        <BezierSegment Point1=\"54.1044921875,19.43869972229\" Point2=\"54.1721153259277,19.5379447937012\" Point3=\"54.101448059082,19.5246734619141\"/>\r\n                                        <BezierSegment Point1=\"53.697998046875,19.2345180511475\" Point2=\"53.7027320861816,20.5981388092041\" Point3=\"53.2657089233398,20.5459175109863\"/>\r\n                                        <LineSegment Point=\"54.9807624816895,20.2940578460693\"/>\r\n                                        <BezierSegment Point1=\"55.4915466308594,19.2132472991943\" Point2=\"55.6735687255859,19.6681518554688\" Point3=\"55.5702743530273,19.2230930328369\"/>\r\n                                        <LineSegment Point=\"55.3734893798828,18.3878383636475\"/>\r\n                                    </PathFigure>\r\n                                    <PathFigure IsClosed=\"True\" StartPoint=\"2.75041627883911,4.18817186355591\">\r\n                                        <BezierSegment Point1=\"2.60941195487976,4.23498106002808\" Point2=\"2.44556498527527,4.34848213195801\" Point3=\"2.25126266479492,4.5509033203125\"/>\r\n                                        <BezierSegment Point1=\"1.95730113983154,3.90779161453247\" Point2=\"1.66666030883789,5.07916784286499\" Point3=\"1.46416211128235,5.60511302947998\"/>\r\n                                        <LineSegment Point=\"1.28398549556732,5.28074789047241\"/>\r\n                                        <LineSegment Point=\"1.2844455242157,5.27347755432129\"/>\r\n                                        <LineSegment Point=\"1.43954491615295,5.49028921127319\"/>\r\n                                        <BezierSegment Point1=\"1.46683251857758,5.47077798843384\" Point2=\"1.34879219532013,5.18408298492432\" Point3=\"1.2877790927887,5.220703125\"/>\r\n                                        <LineSegment Point=\"1.2844455242157,5.27347755432129\"/>\r\n                                        <LineSegment Point=\"1.26432502269745,5.24535417556763\"/>\r\n                                        <LineSegment Point=\"1.28398549556732,5.28074789047241\"/>\r\n                                        <LineSegment Point=\"1.26432502269745,5.59193277359009\"/>\r\n                                        <BezierSegment Point1=\"1.28229105472565,5.78759717941284\" Point2=\"1.3096958398819,5.8595871925354\" Point3=\"1.34388554096222,5.84831285476685\"/>\r\n                                        <LineSegment Point=\"1.46416211128235,5.60511302947998\"/>\r\n                                        <LineSegment Point=\"2.18957805633545,6.91105651855469\"/>\r\n                                        <BezierSegment Point1=\"4.89191150665283,6.34800672531128\" Point2=\"3.10698843002319,8.09412384033203\" Point3=\"4.9653377532959,5.38372611999512\"/>\r\n                                        <BezierSegment Point1=\"3.60521507263184,6.80067920684814\" Point2=\"3.73745012283325,3.86050128936768\" Point3=\"2.75041627883911,4.18817186355591\"/>\r\n                                    </PathFigure>\r\n                                    <PathFigure IsClosed=\"True\" StartPoint=\"3.98743844032288,2.72233080863953\">\r\n                                        <BezierSegment Point1=\"3.87878394126892,2.65442371368408\" Point2=\"3.73797965049744,2.68036603927612\" Point3=\"3.53287696838379,2.89400577545166\"/>\r\n                                        <BezierSegment Point1=\"3.3777277469635,2.55462884902954\" Point2=\"3.22433018684387,3.17277550697327\" Point3=\"3.11745405197144,3.45032072067261\"/>\r\n                                        <LineSegment Point=\"3.02235960960388,3.27914905548096\"/>\r\n                                        <LineSegment Point=\"3.02260160446167,3.27531266212463\"/>\r\n                                        <LineSegment Point=\"3.01198220252991,3.2604718208313\"/>\r\n                                        <LineSegment Point=\"3.02235960960388,3.27914905548096\"/>\r\n                                        <LineSegment Point=\"3.01198220252991,3.44336438179016\"/>\r\n                                        <BezierSegment Point1=\"3.01268339157104,3.45099830627441\" Point2=\"3.01341199874878,3.45827555656433\" Point3=\"3.11745405197144,3.45032072067261\"/>\r\n                                        <LineSegment Point=\"3.50032067298889,4.13947582244873\"/>\r\n                                        <LineSegment Point=\"4.19300651550293,4.08932685852051\"/>\r\n                                        <BezierSegment Point1=\"4.57573270797729,4.15608644485474\" Point2=\"4.22972536087036,4.40621519088745\" Point3=\"4.9653377532959,3.33349204063416\"/>\r\n                                        <BezierSegment Point1=\"4.35003042221069,3.97440934181213\" Point2=\"4.31340551376343,2.92605090141296\" Point3=\"3.98743844032288,2.72233080863953\"/>\r\n                                    </PathFigure>\r\n                                    <PathFigure IsClosed=\"True\" StartPoint=\"43.6054306030273,2.55744552612305\">\r\n                                        <LineSegment Point=\"42.7685508728027,3.07746315002441\"/>\r\n                                        <BezierSegment Point1=\"42.8401260375977,3.02574563026428\" Point2=\"44.8010520935059,3.60871481895447\" Point3=\"44.8063468933105,3.56444692611694\"/>\r\n                                        <LineSegment Point=\"47.3169860839844,3.1744339466095\"/>\r\n                                        <BezierSegment Point1=\"47.7981910705566,2.0477294921875\" Point2=\"50.5490341186523,3.69445133209229\" Point3=\"50.9364852905273,2.43774271011353\"/>\r\n                                        <LineSegment Point=\"46.9194679260254,2.11273193359375\"/>\r\n                                        <BezierSegment Point1=\"45.9232177734375,2.00986051559448\" Point2=\"42.2318840026855,3.34697723388672\" Point3=\"43.6054306030273,2.55744552612305\"/>\r\n                                    </PathFigure>\r\n                                    <PathFigure IsClosed=\"True\" StartPoint=\"16.5382518768311,2.38410639762878\">\r\n                                        <BezierSegment Point1=\"17.9376049041748,2.47057723999023\" Point2=\"28.9235725402832,0.979193687438965\" Point3=\"30.961519241333,1.25740206241608\"/>\r\n                                        <BezierSegment Point1=\"39.7206230163574,2.45314311981201\" Point2=\"36.6131362915039,2.46526336669922\" Point3=\"45.4653663635254,2.03742814064026\"/>\r\n                                        <BezierSegment Point1=\"48.1704330444336,1.90669059753418\" Point2=\"53.7993202209473,2.94819211959839\" Point3=\"56.5043983459473,2.81745433807373\"/>\r\n                                        <BezierSegment Point1=\"57.6275444030762,2.76317286491394\" Point2=\"58.8492164611816,1.81751883029938\" Point3=\"58.7605514526367,4.98419380187988\"/>\r\n                                        <BezierSegment Point1=\"58.6914901733398,7.45075988769531\" Point2=\"59.2414894104004,7.46710634231567\" Point3=\"59.1634330749512,9.40434169769287\"/>\r\n                                        <LineSegment Point=\"59.1302642822266,9.42093944549561\"/>\r\n                                        <BezierSegment Point1=\"58.9689521789551,9.46572589874268\" Point2=\"58.8931922912598,9.64298820495605\" Point3=\"58.9885597229004,10.0852022171021\"/>\r\n                                        <LineSegment Point=\"58.7547225952148,10.0751485824585\"/>\r\n                                        <BezierSegment Point1=\"58.7845993041992,10.1730222702026\" Point2=\"59.0883674621582,10.4170408248901\" Point3=\"59.129207611084,10.4465093612671\"/>\r\n                                        <LineSegment Point=\"58.9072380065918,10.2733154296875\"/>\r\n                                        <BezierSegment Point1=\"58.2435150146484,9.76523780822754\" Point2=\"58.5282859802246,11.6655864715576\" Point3=\"57.8627014160156,11.4802284240723\"/>\r\n                                        <BezierSegment Point1=\"57.8627014160156,11.4802284240723\" Point2=\"58.1601409912109,13.5446062088013\" Point3=\"58.357666015625,14.1711664199829\"/>\r\n                                        <BezierSegment Point1=\"58.9370613098145,16.0090198516846\" Point2=\"58.3653373718262,16.4901638031006\" Point3=\"58.357666015625,18.4179744720459\"/>\r\n                                        <BezierSegment Point1=\"58.3484077453613,20.745641708374\" Point2=\"60.4300498962402,21.9203453063965\" Point3=\"56.8666801452637,21.5362567901611\"/>\r\n                                        <BezierSegment Point1=\"45.6265144348145,20.32470703125\" Point2=\"39.9008178710938,21.5664978027344\" Point3=\"30.3169002532959,20.9313945770264\"/>\r\n                                        <BezierSegment Point1=\"24.7872543334961,20.5649566650391\" Point2=\"17.0756797790527,21.3352470397949\" Point3=\"11.5372772216797,21.6029224395752\"/>\r\n                                        <BezierSegment Point1=\"9.37526988983154,21.7074146270752\" Point2=\"6.82023525238037,22.2953662872314\" Point3=\"4.65164470672607,21.9357109069824\"/>\r\n                                        <BezierSegment Point1=\"1.45201742649078,21.4050598144531\" Point2=\"1.73953628540039,23.0963401794434\" Point3=\"1.51341998577118,17.1753234863281\"/>\r\n                                        <BezierSegment Point1=\"1.38521957397461,13.8183069229126\" Point2=\"0.133225455880165,11.0509176254272\" Point3=\"0.00502508180215955,7.6939001083374\"/>\r\n                                        <BezierSegment Point1=\"-0.0463196896016598,6.3494029045105\" Point2=\"0.306805700063705,4.28786516189575\" Point3=\"0.562162816524506,2.95534110069275\"/>\r\n                                        <LineSegment Point=\"2.65466785430908,2.14960050582886\"/>\r\n                                        <BezierSegment Point1=\"5.5844030380249,2.0080041885376\" Point2=\"7.20274591445923,3.57988381385803\" Point3=\"10.0115203857422,2.2107675075531\"/>\r\n                                        <BezierSegment Point1=\"11.7393894195557,1.36852860450745\" Point2=\"15.138897895813,2.29763579368591\" Point3=\"16.5382518768311,2.38410639762878\"/>\r\n                                    </PathFigure>\r\n                                </PathGeometry>\r\n                            </Path.Data>\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform X=\"1.4916732314436434\" Y=\"-0.23907148924159571\"/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <Path Margin=\"-1.25,0,0,-1\" x:Name=\"Line\" RenderTransformOrigin=\"0.5,0.5\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\">\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <Path Margin=\"2.75,4.375,4,3.5\" x:Name=\"FocusVisualElement\" StrokeDashArray=\"1 2\" RenderTransformOrigin=\"0.5,0.5\" Visibility=\"Collapsed\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"0.5\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\">\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <Path Margin=\"-1.25,0,0,-1\" x:Name=\"DisabledVisual\" Stretch=\"Fill\" Stroke=\"#B2FFFFFF\" StrokeThickness=\"2\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\" Opacity=\"0\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"#B2FFFFFF\">\r\n                            <Path.RenderTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform/>\r\n                                    <SkewTransform/>\r\n                                    <RotateTransform/>\r\n                                    <TranslateTransform/>\r\n                                </TransformGroup>\r\n                            </Path.RenderTransform>\r\n                        </Path>\r\n                        <!--End UI-->\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--Slider-->\r\n    <Style TargetType=\"Slider\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Slider\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <Grid.Resources>\r\n                            <ControlTemplate x:Key=\"RepeatButtonTemplate\">\r\n                                <Grid x:Name=\"Root\" Opacity=\"0\" Background=\"Transparent\"/>\r\n                            </ControlTemplate>\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Root\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualStateGroup.Transitions>\r\n                                    <VisualTransition GeneratedDuration=\"0\"/>\r\n                                </VisualStateGroup.Transitions>\r\n                                <VisualState x:Name=\"Unfocused\">\r\n                                    <Storyboard/>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"(UIElement.Visibility)\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"00:00:00\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid x:Name=\"HorizontalTemplate\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <Path Grid.Column=\"0\" Grid.ColumnSpan=\"3\" Height=\"4\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Data=\"M18.75,122 C39.116455,122 60.341763,125.40137 80.75,122 C85.406425,121.22393 88.864746,120.25 94.25,120.25 C100.58633,120.25 106.7787,121.25 113,121.25 C118.82059,121.25 124.48981,123.30612 130.5,123.5\" Stretch=\"Fill\" Stroke=\"{StaticResource BorderBrush}\" StrokeThickness=\"2\" />\r\n                            <Path Grid.Column=\"0\" Grid.ColumnSpan=\"3\" Height=\"6.5\" StrokeThickness=\".5\" HorizontalAlignment=\"Center\" Margin=\"20,0,15,0\" VerticalAlignment=\"Center\" Data=\"M23,125.25 C36.334629,122.89683 47.114662,121 60.75,121 C67,121 76,122.25 82.25,122.25 C88.080826,122.25 106.59772,120.31523 112.25,119.75\" Stretch=\"Fill\" Stroke=\"{StaticResource BorderBrush}\"/>\r\n\r\n\r\n                            <Track x:Name=\"PART_Track\" Grid.Column=\"0\" Grid.ColumnSpan=\"3\">\r\n                                <Track.Thumb>\r\n                                    <Thumb Background=\"{TemplateBinding Background}\" Height=\"20\" Width=\"16\" />\r\n                                </Track.Thumb>\r\n                                <Track.IncreaseRepeatButton>\r\n                                    <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Command=\"Slider.IncreaseLarge\" />\r\n                                </Track.IncreaseRepeatButton>\r\n                                <Track.DecreaseRepeatButton>\r\n                                    <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Command=\"Slider.DecreaseLarge\" />\r\n                                </Track.DecreaseRepeatButton>\r\n                            </Track>\r\n                        </Grid>\r\n                        <Grid x:Name=\"VerticalTemplate\" Visibility=\"Collapsed\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"*\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <Path Grid.Row=\"0\" Grid.RowSpan=\"3\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Width=\"10\" Data=\"M113,31 C113,70.161034 108.01472,114.58094 115,153 C120.63165,183.97409 108,213.89046 108,246\" Stretch=\"Fill\" Stroke=\"#FF000000\" StrokeThickness=\"2\" Grid.Column=\"0\" Grid.ColumnSpan=\"3\" />\r\n                            <Path Grid.Row=\"0\" Grid.RowSpan=\"3\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Width=\"5\" Data=\"M111,57 C113.85657,84.613487 110.98022,105.44611 112,134 C113,162 106,163 114,216\" Stretch=\"Fill\" Stroke=\"#FF000000\" StrokeThickness=\"1\" Grid.Column=\"0\" Grid.ColumnSpan=\"3\" />\r\n                            <RepeatButton x:Name=\"VerticalTrackLargeChangeDecreaseRepeatButton\" IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Grid.Row=\"2\"/>\r\n                            <Thumb Background=\"{TemplateBinding Background}\" Height=\"16\" Width=\"20\" x:Name=\"VerticalThumb\" Grid.Row=\"1\"/>\r\n                            <RepeatButton x:Name=\"VerticalTrackLargeChangeIncreaseRepeatButton\" IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Grid.Row=\"0\"/>\r\n                        </Grid>\r\n                        <Rectangle x:Name=\"FocusVisual\" Stroke=\"#FF999999\" StrokeDashArray=\"1 2\" StrokeThickness=\".65\" Opacity=\"1\" StrokeDashCap=\"Square\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--TextBox-->\r\n    <Style TargetType=\"TextBox\">\r\n        <Setter Property=\"Background\" Value=\"#FFFFFFFF\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource BorderBrush}\"/>\r\n        <Setter Property=\"FontSize\" Value=\"11\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\"/>\r\n        <Setter Property=\"FontFamily\" Value=\"Arial\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TextBox\">\r\n                    <Grid x:Name=\"RootElement\">\r\n                        <Grid.Resources>\r\n                            <Storyboard x:Key=\"Normal State\">\r\n                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"Focused State\">\r\n                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                        </Grid.Resources>\r\n\r\n                        <Grid x:Name=\"Background\">\r\n                            <Path x:Name=\"Wiggles\" StrokeThickness=\"2\" Fill=\"#FFFFFFFF\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" Data=\"M0.66666669,0.83333331 C22.98843,0.83333331 17.999788,1.0007761 41.49995,1.5003691 C46.659081,1.6100477 78.647705,0.66666669 83.833336,0.66666669 C87.669823,0.66666669 91.711746,1.1313757 95.5,0.5 C101.84077,-0.55679578 99.333336,7.3401279 99.333336,17.666666 C99.333336,21.970675 101.8026,20.833334 93.166664,20.833334 C87.083107,20.833334 81.223564,20.838076 75.166664,20.333334 C64.167976,19.416775 52.892971,20.99983 41.833286,20.99983 C29.611065,20.99983 17.388889,20.166666 5.1666665,20.166666 C0.80628252,20.166666 0.83333331,24.179943 0.83333331,15.333333 C0.83333331,10.525309 1.2613385,5.5907078 0.66666669,0.83333331 z\"/>\r\n                            <Border x:Name=\"ContentElement\" Margin=\"5,5,5,2\">\r\n                                <ScrollViewer BorderThickness=\"0\" IsTabStop=\"False\" Padding=\"{TemplateBinding Padding}\" x:Name=\"PART_ContentHost\" />\r\n                            </Border>\r\n                            <Path x:Name=\"FocusVisual\" Opacity=\"0\" StrokeThickness=\".5\" StrokeDashArray=\"1 2\" RenderTransformOrigin=\"0.5,0.5\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" Data=\"M0.66666669,0.83333331 C22.98843,0.83333331 17.999788,1.0007761 41.49995,1.5003691 C46.659081,1.6100477 78.647705,0.66666669 83.833336,0.66666669 C87.669823,0.66666669 91.711746,1.1313757 95.5,0.5 C101.84077,-0.55679578 99.333336,7.3401279 99.333336,17.666666 C99.333336,21.970675 101.8026,20.833334 93.166664,20.833334 C87.083107,20.833334 81.223564,20.838076 75.166664,20.333334 C64.167976,19.416775 52.892971,20.99983 41.833286,20.99983 C29.611065,20.99983 17.388889,20.166666 5.1666665,20.166666 C0.80628252,20.166666 0.83333331,24.179943 0.83333331,15.333333 C0.83333331,10.525309 1.2613385,5.5907078 0.66666669,0.83333331 z\">\r\n                                <Path.RenderTransform>\r\n                                    <ScaleTransform ScaleX=\".95\" ScaleY=\".6\"/>\r\n                                </Path.RenderTransform>\r\n                            </Path>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--ListBox-->\r\n    <Style TargetType=\"ListBox\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource BorderBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n        <Setter Property=\"Padding\" Value=\"0\"/>\r\n        <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\"/>\r\n        <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\"/>\r\n        <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"True\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ListBox\">\r\n                    <Grid>\r\n                        <Path Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Fill=\"#FFFFFFFF\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M8.0486603,-1.7956065 C40.652985,-1.2334629 60.802299,5.3778448 94.571907,-3.8320472 C132.02231,-14.045796 175.82878,1 215,1 C278.08371,1 340.94531,1 405,1 C447.66666,1 488.54492,0.24040417 531.21155,0.24040417 C560.38153,0.24040417 624.77802,-6.8858747 639.86951,-0.77759421 C642.52252,0.29620132 639.86847,98.304474 639.86847,124.43706 C639.86847,190.61852 640.87457,264.57269 640.87457,330.07413 C640.87457,369.30386 637.85645,396.94827 637.85645,435.94669 C637.85645,441.81662 648.37085,477.30365 637.85669,479.72144 C615.7226,484.81128 553.33221,480.23886 538.25421,479.72162 C360.17755,473.61288 232.40511,488.88297 2,479 C4.0243306,313.78604 0,161.53839 0,3 C0.66666669,3 2.3515811,1.2584095 3.0182476,1.2584095 C3.0182476,0.59174258 8.0486603,-1.1289399 8.0486603,-1.7956065 z\"/>\r\n                        <ScrollViewer Margin=\"5\" Foreground=\"{TemplateBinding Foreground}\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" x:Name=\"ScrollViewer\">\r\n                            <ItemsPresenter />\r\n                        </ScrollViewer>\r\n                        <Path Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"0.5\" Margin=\"-0.094,0.769,0.799,-0.479\" Data=\"M1.7206836,12.568695 C2.4419925,11.031993 1.4481189,7.3090796 1.7209258,5.6722374 C2.2648225,2.4088583 0.46910813,5.715632 5.1693902,3.7012255 C10.004368,1.6290923 20.664461,1.2662256 26,2.3333333 C36.24308,4.3819494 47.8027,3.6553195 58.131069,2.7163765 C68.803482,1.7461575 79.164429,1.9772166 89.908081,1.9772166 C100.39313,1.9772166 98,-0.96195835 98,16.333334 C98,23.112209 96.493988,25.349688 97.298027,31.782001 C98.258453,39.465462 97.476074,52.003723 97.29808,59.862312 C97.103302,68.46196 97.666664,74.564713 97.666664,83 C97.666664,108.95624 103.8933,92.074692 62.072483,97.302299 C52.738716,98.469017 39.806664,100.01 30.333334,99.333336 C22.81004,98.795952 7.3937144,97.694511 1.967056,97.548622 C-0.28294224,97.488136 1.5684019,88.452782 2.3333333,82.333336 C3.1227529,76.017975 2.5054271,71.237221 2,64.666664 C0.6911695,47.651871 3.9379203,29.072496 1.720971,12.568695\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--TreeView-->\r\n    <Style TargetType=\"TreeView\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource BorderBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n        <Setter Property=\"Padding\" Value=\"0\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"TreeView\">\r\n                    <Grid>\r\n                        <Path Fill=\"#FFFFFFFF\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M8.0486603,-1.7956065 C40.652985,-1.2334629 60.802299,5.3778448 94.571907,-3.8320472 C132.02231,-14.045796 175.82878,1 215,1 C278.08371,1 340.94531,1 405,1 C447.66666,1 488.54492,0.24040417 531.21155,0.24040417 C560.38153,0.24040417 624.77802,-6.8858747 639.86951,-0.77759421 C642.52252,0.29620132 639.86847,98.304474 639.86847,124.43706 C639.86847,190.61852 640.87457,264.57269 640.87457,330.07413 C640.87457,369.30386 637.85645,396.94827 637.85645,435.94669 C637.85645,441.81662 648.37085,477.30365 637.85669,479.72144 C615.7226,484.81128 553.33221,480.23886 538.25421,479.72162 C360.17755,473.61288 232.40511,488.88297 2,479 C4.0243306,313.78604 0,161.53839 0,3 C0.66666669,3 2.3515811,1.2584095 3.0182476,1.2584095 C3.0182476,0.59174258 8.0486603,-1.1289399 8.0486603,-1.7956065 z\"/>\r\n                        <ScrollViewer Margin=\"5,10,5,5\" Foreground=\"{TemplateBinding Foreground}\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" x:Name=\"ScrollViewer\">\r\n                            <ItemsPresenter />\r\n                        </ScrollViewer>\r\n                        <Path Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"0.5\" Margin=\"-0.094,0.769,0.799,-0.479\" Data=\"M1.7206836,12.568695 C2.4419925,11.031993 1.4481189,7.3090796 1.7209258,5.6722374 C2.2648225,2.4088583 0.46910813,5.715632 5.1693902,3.7012255 C10.004368,1.6290923 20.664461,1.2662256 26,2.3333333 C36.24308,4.3819494 47.8027,3.6553195 58.131069,2.7163765 C68.803482,1.7461575 79.164429,1.9772166 89.908081,1.9772166 C100.39313,1.9772166 98,-0.96195835 98,16.333334 C98,23.112209 96.493988,25.349688 97.298027,31.782001 C98.258453,39.465462 97.476074,52.003723 97.29808,59.862312 C97.103302,68.46196 97.666664,74.564713 97.666664,83 C97.666664,108.95624 103.8933,92.074692 62.072483,97.302299 C52.738716,98.469017 39.806664,100.01 30.333334,99.333336 C22.81004,98.795952 7.3937144,97.694511 1.967056,97.548622 C-0.28294224,97.488136 1.5684019,88.452782 2.3333333,82.333336 C3.1227529,76.017975 2.5054271,71.237221 2,64.666664 C0.6911695,47.651871 3.9379203,29.072496 1.720971,12.568695\"/>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--ListboxItem-->\r\n    <Style TargetType=\"ListBoxItem\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource HoverBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource BorderBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <!--<Setter Property=\"TextAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"TextWrapping\" Value=\"NoWrap\" />-->\r\n        <Setter Property=\"Padding\" Value=\"10,0,0,0\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ListBoxItem\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"FillColor\" Storyboard.TargetProperty=\"Opacity\" Duration=\"0\" To=\"1\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualState x:Name=\"Unselected\" />\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"StrokeColor\" Storyboard.TargetProperty=\"Opacity\" Duration=\"0\" To=\"1\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"Visibility\" Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"*\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n\r\n                        <!--Start UI-->\r\n                        <Path x:Name=\"FillColor\" Opacity=\"0\" Fill=\"{TemplateBinding Background}\" Margin=\"1,0,-6.5,-2\" Height=\"22\" Stretch=\"Fill\" StrokeThickness=\"1\" Data=\"M0.5,4 C5.4921546,-1.2298763 6.7624655,0.25 16.25,0.25 C26.98455,0.25 37.771278,-0.14736003 48.5,0.25 C58.050766,0.60373205 67.126785,1.8436862 76.75,1.5 C81.214241,1.3405629 85.468109,1 90,1 C93.832878,1 95.48951,0.42107743 98.75,2.75 C103.03876,5.8134003 99,22.711088 99,29 C99,36.099834 99.578392,43.275311 99.25,50.5 C98.582687,65.180809 99.25,79.852791 99.25,94.5 C99.25,106.65568 72.737717,98.226776 56.5,99 C47.401512,99.433258 38.067318,99.75 29,99.75 C23.833334,99.75 18.666666,99.75 13.5,99.75 C11.25,99.75 9,99.75 6.75,99.75 C2.9788802,99.75 3.51701,102.43028 2,97.5 C0.044149127,91.143486 0.5,85.399605 0.5,78.5 C0.5,68.201317 -0.62925881,58.16333 0.5,48 C2.0587127,33.971584 0,18.959808 0,4.75 C0.13653865,4.6544228 0.34602007,4.8137808 0.5,4.75 C0.7177605,4.6598005 0.80388385,4.380744 1,4.25 C0.83333331,4.25 0.66666669,4.25 0.5,4.25 C0.5,4.1666665 0.5,4.0833335 0.5,4 z\"/>\r\n                        <Path x:Name=\"StrokeColor\" Opacity=\"0\" Stroke=\"{TemplateBinding BorderBrush}\" Margin=\"1,0,-3.5,-2\" Height=\"22\" Stretch=\"Fill\" StrokeThickness=\"1\" Data=\"M0.5,4 C5.4921546,-1.2298763 6.7624655,0.25 16.25,0.25 C26.98455,0.25 37.771278,-0.14736003 48.5,0.25 C58.050766,0.60373205 67.126785,1.8436862 76.75,1.5 C81.214241,1.3405629 85.468109,1 90,1 C93.832878,1 95.48951,0.42107743 98.75,2.75 C103.03876,5.8134003 99,22.711088 99,29 C99,36.099834 99.578392,43.275311 99.25,50.5 C98.582687,65.180809 99.25,79.852791 99.25,94.5 C99.25,106.65568 72.737717,98.226776 56.5,99 C47.401512,99.433258 38.067318,99.75 29,99.75 C23.833334,99.75 18.666666,99.75 13.5,99.75 C11.25,99.75 9,99.75 6.75,99.75 C2.9788802,99.75 3.51701,102.43028 2,97.5 C0.044149127,91.143486 0.5,85.399605 0.5,78.5 C0.5,68.201317 -0.62925881,58.16333 0.5,48 C2.0587127,33.971584 0,18.959808 0,4.75 C0.13653865,4.6544228 0.34602007,4.8137808 0.5,4.75 C0.7177605,4.6598005 0.80388385,4.380744 1,4.25 C0.83333331,4.25 0.66666669,4.25 0.5,4.25 C0.5,4.1666665 0.5,4.0833335 0.5,4 z\"/>\r\n\r\n                        <ContentPresenter\r\n                              HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                              VerticalAlignment=\"Center\"\r\n                              Margin=\"{TemplateBinding Padding}\"                              \r\n                            />\r\n                        <!--\r\n                              Content=\"{TemplateBinding Content}\"\r\n                              ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                              FontFamily=\"Arial\"\r\n                              FontSize=\"11\"\r\n                              FontStretch=\"{TemplateBinding FontStretch}\"\r\n                              FontStyle=\"{TemplateBinding FontStyle}\"\r\n                              FontWeight=\"Normal\"\r\n                              HorizontalAlignment=\"Left\"\r\n                              HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                              Padding=\"{TemplateBinding Padding}\"\r\n                              TextAlignment=\"{TemplateBinding TextAlignment}\"\r\n                              TextDecorations=\"{TemplateBinding TextDecorations}\"\r\n                              TextWrapping=\"{TemplateBinding TextWrapping}\"\r\n                              VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                              Foreground=\"{TemplateBinding Foreground}\"/>\r\n-->\r\n                        <Path x:Name=\"FocusVisual\" Height=\"21\" Margin=\"2,0,.25,0\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\".5\" Visibility=\"Collapsed\" Data=\"M0.5,4 C5.4921546,-1.2298763 6.7624655,0.25 16.25,0.25 C26.98455,0.25 37.771278,-0.14736003 48.5,0.25 C58.050766,0.60373205 67.126785,1.8436862 76.75,1.5 C81.214241,1.3405629 85.468109,1 90,1 C93.832878,1 95.48951,0.42107743 98.75,2.75 C103.03876,5.8134003 99,22.711088 99,29 C99,36.099834 99.578392,43.275311 99.25,50.5 C98.582687,65.180809 99.25,79.852791 99.25,94.5 C99.25,106.65568 72.737717,98.226776 56.5,99 C47.401512,99.433258 38.067318,99.75 29,99.75 C23.833334,99.75 18.666666,99.75 13.5,99.75 C11.25,99.75 9,99.75 6.75,99.75 C2.9788802,99.75 3.51701,102.43028 2,97.5 C0.044149127,91.143486 0.5,85.399605 0.5,78.5 C0.5,68.201317 -0.62925881,58.16333 0.5,48 C2.0587127,33.971584 0,18.959808 0,4.75 C0.13653865,4.6544228 0.34602007,4.8137808 0.5,4.75 C0.7177605,4.6598005 0.80388385,4.380744 1,4.25 C0.83333331,4.25 0.66666669,4.25 0.5,4.25 C0.5,4.1666665 0.5,4.0833335 0.5,4 z\"/>\r\n                        <!--End UI-->\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--ScrollBar-->\r\n    <Style TargetType=\"ScrollBar\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource BorderBrush}\"/>\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ScrollBar\">\r\n                    <Grid x:Name=\"Root\">\r\n                        <Grid.Resources>\r\n                            <ControlTemplate x:Key=\"RepeatButtonTemplate\" TargetType=\"RepeatButton\">\r\n                                <Grid x:Name=\"Root\" Background=\"Transparent\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n\r\n                            <!--I'm not using the repeat buttons and that's why these templates are empty-->\r\n                            <ControlTemplate x:Key=\"HorizontalIncrementTemplate\" TargetType=\"RepeatButton\" />\r\n                            <ControlTemplate x:Key=\"HorizontalDecrementTemplate\" TargetType=\"RepeatButton\" />\r\n                            <ControlTemplate x:Key=\"VerticalIncrementTemplate\" TargetType=\"RepeatButton\" />\r\n                            <ControlTemplate x:Key=\"VerticalDecrementTemplate\" TargetType=\"RepeatButton\" />\r\n\r\n                            <!--Thumb templates-->\r\n                            <ControlTemplate x:Key=\"VerticalThumbTemplate\" TargetType=\"Thumb\">\r\n                                <Grid Margin=\"1,6,1,6\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"MouseOver\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n\r\n                                    <!--Start UI-->\r\n                                    <Path Margin=\"-1.25,0,0,4\" x:Name=\"LineBack\" Fill=\"#FFFFFFFF\" RenderTransformOrigin=\"0.5,0.5\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\">\r\n                                        <Path.RenderTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform/>\r\n                                                <SkewTransform/>\r\n                                                <RotateTransform/>\r\n                                                <TranslateTransform/>\r\n                                            </TransformGroup>\r\n                                        </Path.RenderTransform>\r\n                                    </Path>\r\n                                    <Path HorizontalAlignment=\"Stretch\" Stretch=\"Fill\" Margin=\"1,2,5,7\" x:Name=\"Background\" VerticalAlignment=\"Stretch\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"{TemplateBinding Background}\" StrokeThickness=\"2\">\r\n                                        <Path.Data>\r\n                                            <PathGeometry>\r\n                                                <PathFigure IsClosed=\"True\" StartPoint=\"55.3734893798828,18.3878383636475\">\r\n                                                    <BezierSegment Point1=\"55.4575424194336,19.6423645019531\" Point2=\"54.0918769836426,18.1212940216064\" Point3=\"54.1759376525879,19.3758182525635\"/>\r\n                                                    <BezierSegment Point1=\"54.1044921875,19.43869972229\" Point2=\"54.1721153259277,19.5379447937012\" Point3=\"54.101448059082,19.5246734619141\"/>\r\n                                                    <BezierSegment Point1=\"53.697998046875,19.2345180511475\" Point2=\"53.7027320861816,20.5981388092041\" Point3=\"53.2657089233398,20.5459175109863\"/>\r\n                                                    <LineSegment Point=\"54.9807624816895,20.2940578460693\"/>\r\n                                                    <BezierSegment Point1=\"55.4915466308594,19.2132472991943\" Point2=\"55.6735687255859,19.6681518554688\" Point3=\"55.5702743530273,19.2230930328369\"/>\r\n                                                    <LineSegment Point=\"55.3734893798828,18.3878383636475\"/>\r\n                                                </PathFigure>\r\n                                                <PathFigure IsClosed=\"True\" StartPoint=\"2.75041627883911,4.18817186355591\">\r\n                                                    <BezierSegment Point1=\"2.60941195487976,4.23498106002808\" Point2=\"2.44556498527527,4.34848213195801\" Point3=\"2.25126266479492,4.5509033203125\"/>\r\n                                                    <BezierSegment Point1=\"1.95730113983154,3.90779161453247\" Point2=\"1.66666030883789,5.07916784286499\" Point3=\"1.46416211128235,5.60511302947998\"/>\r\n                                                    <LineSegment Point=\"1.28398549556732,5.28074789047241\"/>\r\n                                                    <LineSegment Point=\"1.2844455242157,5.27347755432129\"/>\r\n                                                    <LineSegment Point=\"1.43954491615295,5.49028921127319\"/>\r\n                                                    <BezierSegment Point1=\"1.46683251857758,5.47077798843384\" Point2=\"1.34879219532013,5.18408298492432\" Point3=\"1.2877790927887,5.220703125\"/>\r\n                                                    <LineSegment Point=\"1.2844455242157,5.27347755432129\"/>\r\n                                                    <LineSegment Point=\"1.26432502269745,5.24535417556763\"/>\r\n                                                    <LineSegment Point=\"1.28398549556732,5.28074789047241\"/>\r\n                                                    <LineSegment Point=\"1.26432502269745,5.59193277359009\"/>\r\n                                                    <BezierSegment Point1=\"1.28229105472565,5.78759717941284\" Point2=\"1.3096958398819,5.8595871925354\" Point3=\"1.34388554096222,5.84831285476685\"/>\r\n                                                    <LineSegment Point=\"1.46416211128235,5.60511302947998\"/>\r\n                                                    <LineSegment Point=\"2.18957805633545,6.91105651855469\"/>\r\n                                                    <BezierSegment Point1=\"4.89191150665283,6.34800672531128\" Point2=\"3.10698843002319,8.09412384033203\" Point3=\"4.9653377532959,5.38372611999512\"/>\r\n                                                    <BezierSegment Point1=\"3.60521507263184,6.80067920684814\" Point2=\"3.73745012283325,3.86050128936768\" Point3=\"2.75041627883911,4.18817186355591\"/>\r\n                                                </PathFigure>\r\n                                                <PathFigure IsClosed=\"True\" StartPoint=\"3.98743844032288,2.72233080863953\">\r\n                                                    <BezierSegment Point1=\"3.87878394126892,2.65442371368408\" Point2=\"3.73797965049744,2.68036603927612\" Point3=\"3.53287696838379,2.89400577545166\"/>\r\n                                                    <BezierSegment Point1=\"3.3777277469635,2.55462884902954\" Point2=\"3.22433018684387,3.17277550697327\" Point3=\"3.11745405197144,3.45032072067261\"/>\r\n                                                    <LineSegment Point=\"3.02235960960388,3.27914905548096\"/>\r\n                                                    <LineSegment Point=\"3.02260160446167,3.27531266212463\"/>\r\n                                                    <LineSegment Point=\"3.01198220252991,3.2604718208313\"/>\r\n                                                    <LineSegment Point=\"3.02235960960388,3.27914905548096\"/>\r\n                                                    <LineSegment Point=\"3.01198220252991,3.44336438179016\"/>\r\n                                                    <BezierSegment Point1=\"3.01268339157104,3.45099830627441\" Point2=\"3.01341199874878,3.45827555656433\" Point3=\"3.11745405197144,3.45032072067261\"/>\r\n                                                    <LineSegment Point=\"3.50032067298889,4.13947582244873\"/>\r\n                                                    <LineSegment Point=\"4.19300651550293,4.08932685852051\"/>\r\n                                                    <BezierSegment Point1=\"4.57573270797729,4.15608644485474\" Point2=\"4.22972536087036,4.40621519088745\" Point3=\"4.9653377532959,3.33349204063416\"/>\r\n                                                    <BezierSegment Point1=\"4.35003042221069,3.97440934181213\" Point2=\"4.31340551376343,2.92605090141296\" Point3=\"3.98743844032288,2.72233080863953\"/>\r\n                                                </PathFigure>\r\n                                                <PathFigure IsClosed=\"True\" StartPoint=\"43.6054306030273,2.55744552612305\">\r\n                                                    <LineSegment Point=\"42.7685508728027,3.07746315002441\"/>\r\n                                                    <BezierSegment Point1=\"42.8401260375977,3.02574563026428\" Point2=\"44.8010520935059,3.60871481895447\" Point3=\"44.8063468933105,3.56444692611694\"/>\r\n                                                    <LineSegment Point=\"47.3169860839844,3.1744339466095\"/>\r\n                                                    <BezierSegment Point1=\"47.7981910705566,2.0477294921875\" Point2=\"50.5490341186523,3.69445133209229\" Point3=\"50.9364852905273,2.43774271011353\"/>\r\n                                                    <LineSegment Point=\"46.9194679260254,2.11273193359375\"/>\r\n                                                    <BezierSegment Point1=\"45.9232177734375,2.00986051559448\" Point2=\"42.2318840026855,3.34697723388672\" Point3=\"43.6054306030273,2.55744552612305\"/>\r\n                                                </PathFigure>\r\n                                                <PathFigure IsClosed=\"True\" StartPoint=\"16.5382518768311,2.38410639762878\">\r\n                                                    <BezierSegment Point1=\"17.9376049041748,2.47057723999023\" Point2=\"28.9235725402832,0.979193687438965\" Point3=\"30.961519241333,1.25740206241608\"/>\r\n                                                    <BezierSegment Point1=\"39.7206230163574,2.45314311981201\" Point2=\"36.6131362915039,2.46526336669922\" Point3=\"45.4653663635254,2.03742814064026\"/>\r\n                                                    <BezierSegment Point1=\"48.1704330444336,1.90669059753418\" Point2=\"53.7993202209473,2.94819211959839\" Point3=\"56.5043983459473,2.81745433807373\"/>\r\n                                                    <BezierSegment Point1=\"57.6275444030762,2.76317286491394\" Point2=\"58.8492164611816,1.81751883029938\" Point3=\"58.7605514526367,4.98419380187988\"/>\r\n                                                    <BezierSegment Point1=\"58.6914901733398,7.45075988769531\" Point2=\"59.2414894104004,7.46710634231567\" Point3=\"59.1634330749512,9.40434169769287\"/>\r\n                                                    <LineSegment Point=\"59.1302642822266,9.42093944549561\"/>\r\n                                                    <BezierSegment Point1=\"58.9689521789551,9.46572589874268\" Point2=\"58.8931922912598,9.64298820495605\" Point3=\"58.9885597229004,10.0852022171021\"/>\r\n                                                    <LineSegment Point=\"58.7547225952148,10.0751485824585\"/>\r\n                                                    <BezierSegment Point1=\"58.7845993041992,10.1730222702026\" Point2=\"59.0883674621582,10.4170408248901\" Point3=\"59.129207611084,10.4465093612671\"/>\r\n                                                    <LineSegment Point=\"58.9072380065918,10.2733154296875\"/>\r\n                                                    <BezierSegment Point1=\"58.2435150146484,9.76523780822754\" Point2=\"58.5282859802246,11.6655864715576\" Point3=\"57.8627014160156,11.4802284240723\"/>\r\n                                                    <BezierSegment Point1=\"57.8627014160156,11.4802284240723\" Point2=\"58.1601409912109,13.5446062088013\" Point3=\"58.357666015625,14.1711664199829\"/>\r\n                                                    <BezierSegment Point1=\"58.9370613098145,16.0090198516846\" Point2=\"58.3653373718262,16.4901638031006\" Point3=\"58.357666015625,18.4179744720459\"/>\r\n                                                    <BezierSegment Point1=\"58.3484077453613,20.745641708374\" Point2=\"60.4300498962402,21.9203453063965\" Point3=\"56.8666801452637,21.5362567901611\"/>\r\n                                                    <BezierSegment Point1=\"45.6265144348145,20.32470703125\" Point2=\"39.9008178710938,21.5664978027344\" Point3=\"30.3169002532959,20.9313945770264\"/>\r\n                                                    <BezierSegment Point1=\"24.7872543334961,20.5649566650391\" Point2=\"17.0756797790527,21.3352470397949\" Point3=\"11.5372772216797,21.6029224395752\"/>\r\n                                                    <BezierSegment Point1=\"9.37526988983154,21.7074146270752\" Point2=\"6.82023525238037,22.2953662872314\" Point3=\"4.65164470672607,21.9357109069824\"/>\r\n                                                    <BezierSegment Point1=\"1.45201742649078,21.4050598144531\" Point2=\"1.73953628540039,23.0963401794434\" Point3=\"1.51341998577118,17.1753234863281\"/>\r\n                                                    <BezierSegment Point1=\"1.38521957397461,13.8183069229126\" Point2=\"0.133225455880165,11.0509176254272\" Point3=\"0.00502508180215955,7.6939001083374\"/>\r\n                                                    <BezierSegment Point1=\"-0.0463196896016598,6.3494029045105\" Point2=\"0.306805700063705,4.28786516189575\" Point3=\"0.562162816524506,2.95534110069275\"/>\r\n                                                    <LineSegment Point=\"2.65466785430908,2.14960050582886\"/>\r\n                                                    <BezierSegment Point1=\"5.5844030380249,2.0080041885376\" Point2=\"7.20274591445923,3.57988381385803\" Point3=\"10.0115203857422,2.2107675075531\"/>\r\n                                                    <BezierSegment Point1=\"11.7393894195557,1.36852860450745\" Point2=\"15.138897895813,2.29763579368591\" Point3=\"16.5382518768311,2.38410639762878\"/>\r\n                                                </PathFigure>\r\n                                            </PathGeometry>\r\n                                        </Path.Data>\r\n                                        <Path.RenderTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform/>\r\n                                                <SkewTransform/>\r\n                                                <RotateTransform/>\r\n                                                <TranslateTransform X=\"1.4916732314436434\" Y=\"-0.23907148924159571\"/>\r\n                                            </TransformGroup>\r\n                                        </Path.RenderTransform>\r\n                                    </Path>\r\n                                    <Path Margin=\"-1.25,0,0,4\" x:Name=\"Line\" RenderTransformOrigin=\"0.5,0.5\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\">\r\n                                        <Path.RenderTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform/>\r\n                                                <SkewTransform/>\r\n                                                <RotateTransform/>\r\n                                                <TranslateTransform/>\r\n                                            </TransformGroup>\r\n                                        </Path.RenderTransform>\r\n                                    </Path>\r\n                                    <Path Margin=\"2.75,4.375,4,8.5\" x:Name=\"FocusVisualElement\" StrokeDashArray=\"1 2\" RenderTransformOrigin=\"0.5,0.5\" Visibility=\"Collapsed\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"0.5\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\">\r\n                                        <Path.RenderTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform/>\r\n                                                <SkewTransform/>\r\n                                                <RotateTransform/>\r\n                                                <TranslateTransform/>\r\n                                            </TransformGroup>\r\n                                        </Path.RenderTransform>\r\n                                    </Path>\r\n                                    <Path Margin=\"-1.25,0,0,4\" x:Name=\"DisabledOverlay\" Stretch=\"Fill\" Stroke=\"#B2FFFFFF\" StrokeThickness=\"2\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\" Opacity=\"0\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"#B2FFFFFF\">\r\n                                        <Path.RenderTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform/>\r\n                                                <SkewTransform/>\r\n                                                <RotateTransform/>\r\n                                                <TranslateTransform/>\r\n                                            </TransformGroup>\r\n                                        </Path.RenderTransform>\r\n                                    </Path>\r\n                                    <!--End UI-->\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                            <ControlTemplate x:Key=\"HorizontalThumbTemplate\" TargetType=\"Thumb\">\r\n                                <Grid Margin=\"6,1,6,1\">\r\n                                    <VisualStateManager.VisualStateGroups>\r\n                                        <VisualStateGroup x:Name=\"CommonStates\">\r\n                                            <VisualStateGroup.Transitions>\r\n                                                <VisualTransition GeneratedDuration=\"0:0:0.1\" To=\"MouseOver\"/>\r\n                                            </VisualStateGroup.Transitions>\r\n                                            <VisualState x:Name=\"Normal\"/>\r\n                                            <VisualState x:Name=\"MouseOver\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.05\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Pressed\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Line\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"LineBack\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Background\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1.075\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                            <VisualState x:Name=\"Disabled\">\r\n                                                <Storyboard>\r\n                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"DisabledOverlay\" Storyboard.TargetProperty=\"(UIElement.Opacity)\" BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\">\r\n                                                        <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                                    </DoubleAnimationUsingKeyFrames>\r\n                                                </Storyboard>\r\n                                            </VisualState>\r\n                                        </VisualStateGroup>\r\n                                    </VisualStateManager.VisualStateGroups>\r\n\r\n                                    <!--Start UI-->\r\n                                    <Path Margin=\"-1.25,0,5,-1\" x:Name=\"LineBack\" Fill=\"#FFFFFFFF\" RenderTransformOrigin=\"0.5,0.5\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\">\r\n                                        <Path.RenderTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform/>\r\n                                                <SkewTransform/>\r\n                                                <RotateTransform/>\r\n                                                <TranslateTransform/>\r\n                                            </TransformGroup>\r\n                                        </Path.RenderTransform>\r\n                                    </Path>\r\n                                    <Path HorizontalAlignment=\"Stretch\" Stretch=\"Fill\" Margin=\"1,2,10,2\" x:Name=\"Background\" VerticalAlignment=\"Stretch\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"{TemplateBinding Background}\" StrokeThickness=\"2\">\r\n                                        <Path.Data>\r\n                                            <PathGeometry>\r\n                                                <PathFigure IsClosed=\"True\" StartPoint=\"55.3734893798828,18.3878383636475\">\r\n                                                    <BezierSegment Point1=\"55.4575424194336,19.6423645019531\" Point2=\"54.0918769836426,18.1212940216064\" Point3=\"54.1759376525879,19.3758182525635\"/>\r\n                                                    <BezierSegment Point1=\"54.1044921875,19.43869972229\" Point2=\"54.1721153259277,19.5379447937012\" Point3=\"54.101448059082,19.5246734619141\"/>\r\n                                                    <BezierSegment Point1=\"53.697998046875,19.2345180511475\" Point2=\"53.7027320861816,20.5981388092041\" Point3=\"53.2657089233398,20.5459175109863\"/>\r\n                                                    <LineSegment Point=\"54.9807624816895,20.2940578460693\"/>\r\n                                                    <BezierSegment Point1=\"55.4915466308594,19.2132472991943\" Point2=\"55.6735687255859,19.6681518554688\" Point3=\"55.5702743530273,19.2230930328369\"/>\r\n                                                    <LineSegment Point=\"55.3734893798828,18.3878383636475\"/>\r\n                                                </PathFigure>\r\n                                                <PathFigure IsClosed=\"True\" StartPoint=\"2.75041627883911,4.18817186355591\">\r\n                                                    <BezierSegment Point1=\"2.60941195487976,4.23498106002808\" Point2=\"2.44556498527527,4.34848213195801\" Point3=\"2.25126266479492,4.5509033203125\"/>\r\n                                                    <BezierSegment Point1=\"1.95730113983154,3.90779161453247\" Point2=\"1.66666030883789,5.07916784286499\" Point3=\"1.46416211128235,5.60511302947998\"/>\r\n                                                    <LineSegment Point=\"1.28398549556732,5.28074789047241\"/>\r\n                                                    <LineSegment Point=\"1.2844455242157,5.27347755432129\"/>\r\n                                                    <LineSegment Point=\"1.43954491615295,5.49028921127319\"/>\r\n                                                    <BezierSegment Point1=\"1.46683251857758,5.47077798843384\" Point2=\"1.34879219532013,5.18408298492432\" Point3=\"1.2877790927887,5.220703125\"/>\r\n                                                    <LineSegment Point=\"1.2844455242157,5.27347755432129\"/>\r\n                                                    <LineSegment Point=\"1.26432502269745,5.24535417556763\"/>\r\n                                                    <LineSegment Point=\"1.28398549556732,5.28074789047241\"/>\r\n                                                    <LineSegment Point=\"1.26432502269745,5.59193277359009\"/>\r\n                                                    <BezierSegment Point1=\"1.28229105472565,5.78759717941284\" Point2=\"1.3096958398819,5.8595871925354\" Point3=\"1.34388554096222,5.84831285476685\"/>\r\n                                                    <LineSegment Point=\"1.46416211128235,5.60511302947998\"/>\r\n                                                    <LineSegment Point=\"2.18957805633545,6.91105651855469\"/>\r\n                                                    <BezierSegment Point1=\"4.89191150665283,6.34800672531128\" Point2=\"3.10698843002319,8.09412384033203\" Point3=\"4.9653377532959,5.38372611999512\"/>\r\n                                                    <BezierSegment Point1=\"3.60521507263184,6.80067920684814\" Point2=\"3.73745012283325,3.86050128936768\" Point3=\"2.75041627883911,4.18817186355591\"/>\r\n                                                </PathFigure>\r\n                                                <PathFigure IsClosed=\"True\" StartPoint=\"3.98743844032288,2.72233080863953\">\r\n                                                    <BezierSegment Point1=\"3.87878394126892,2.65442371368408\" Point2=\"3.73797965049744,2.68036603927612\" Point3=\"3.53287696838379,2.89400577545166\"/>\r\n                                                    <BezierSegment Point1=\"3.3777277469635,2.55462884902954\" Point2=\"3.22433018684387,3.17277550697327\" Point3=\"3.11745405197144,3.45032072067261\"/>\r\n                                                    <LineSegment Point=\"3.02235960960388,3.27914905548096\"/>\r\n                                                    <LineSegment Point=\"3.02260160446167,3.27531266212463\"/>\r\n                                                    <LineSegment Point=\"3.01198220252991,3.2604718208313\"/>\r\n                                                    <LineSegment Point=\"3.02235960960388,3.27914905548096\"/>\r\n                                                    <LineSegment Point=\"3.01198220252991,3.44336438179016\"/>\r\n                                                    <BezierSegment Point1=\"3.01268339157104,3.45099830627441\" Point2=\"3.01341199874878,3.45827555656433\" Point3=\"3.11745405197144,3.45032072067261\"/>\r\n                                                    <LineSegment Point=\"3.50032067298889,4.13947582244873\"/>\r\n                                                    <LineSegment Point=\"4.19300651550293,4.08932685852051\"/>\r\n                                                    <BezierSegment Point1=\"4.57573270797729,4.15608644485474\" Point2=\"4.22972536087036,4.40621519088745\" Point3=\"4.9653377532959,3.33349204063416\"/>\r\n                                                    <BezierSegment Point1=\"4.35003042221069,3.97440934181213\" Point2=\"4.31340551376343,2.92605090141296\" Point3=\"3.98743844032288,2.72233080863953\"/>\r\n                                                </PathFigure>\r\n                                                <PathFigure IsClosed=\"True\" StartPoint=\"43.6054306030273,2.55744552612305\">\r\n                                                    <LineSegment Point=\"42.7685508728027,3.07746315002441\"/>\r\n                                                    <BezierSegment Point1=\"42.8401260375977,3.02574563026428\" Point2=\"44.8010520935059,3.60871481895447\" Point3=\"44.8063468933105,3.56444692611694\"/>\r\n                                                    <LineSegment Point=\"47.3169860839844,3.1744339466095\"/>\r\n                                                    <BezierSegment Point1=\"47.7981910705566,2.0477294921875\" Point2=\"50.5490341186523,3.69445133209229\" Point3=\"50.9364852905273,2.43774271011353\"/>\r\n                                                    <LineSegment Point=\"46.9194679260254,2.11273193359375\"/>\r\n                                                    <BezierSegment Point1=\"45.9232177734375,2.00986051559448\" Point2=\"42.2318840026855,3.34697723388672\" Point3=\"43.6054306030273,2.55744552612305\"/>\r\n                                                </PathFigure>\r\n                                                <PathFigure IsClosed=\"True\" StartPoint=\"16.5382518768311,2.38410639762878\">\r\n                                                    <BezierSegment Point1=\"17.9376049041748,2.47057723999023\" Point2=\"28.9235725402832,0.979193687438965\" Point3=\"30.961519241333,1.25740206241608\"/>\r\n                                                    <BezierSegment Point1=\"39.7206230163574,2.45314311981201\" Point2=\"36.6131362915039,2.46526336669922\" Point3=\"45.4653663635254,2.03742814064026\"/>\r\n                                                    <BezierSegment Point1=\"48.1704330444336,1.90669059753418\" Point2=\"53.7993202209473,2.94819211959839\" Point3=\"56.5043983459473,2.81745433807373\"/>\r\n                                                    <BezierSegment Point1=\"57.6275444030762,2.76317286491394\" Point2=\"58.8492164611816,1.81751883029938\" Point3=\"58.7605514526367,4.98419380187988\"/>\r\n                                                    <BezierSegment Point1=\"58.6914901733398,7.45075988769531\" Point2=\"59.2414894104004,7.46710634231567\" Point3=\"59.1634330749512,9.40434169769287\"/>\r\n                                                    <LineSegment Point=\"59.1302642822266,9.42093944549561\"/>\r\n                                                    <BezierSegment Point1=\"58.9689521789551,9.46572589874268\" Point2=\"58.8931922912598,9.64298820495605\" Point3=\"58.9885597229004,10.0852022171021\"/>\r\n                                                    <LineSegment Point=\"58.7547225952148,10.0751485824585\"/>\r\n                                                    <BezierSegment Point1=\"58.7845993041992,10.1730222702026\" Point2=\"59.0883674621582,10.4170408248901\" Point3=\"59.129207611084,10.4465093612671\"/>\r\n                                                    <LineSegment Point=\"58.9072380065918,10.2733154296875\"/>\r\n                                                    <BezierSegment Point1=\"58.2435150146484,9.76523780822754\" Point2=\"58.5282859802246,11.6655864715576\" Point3=\"57.8627014160156,11.4802284240723\"/>\r\n                                                    <BezierSegment Point1=\"57.8627014160156,11.4802284240723\" Point2=\"58.1601409912109,13.5446062088013\" Point3=\"58.357666015625,14.1711664199829\"/>\r\n                                                    <BezierSegment Point1=\"58.9370613098145,16.0090198516846\" Point2=\"58.3653373718262,16.4901638031006\" Point3=\"58.357666015625,18.4179744720459\"/>\r\n                                                    <BezierSegment Point1=\"58.3484077453613,20.745641708374\" Point2=\"60.4300498962402,21.9203453063965\" Point3=\"56.8666801452637,21.5362567901611\"/>\r\n                                                    <BezierSegment Point1=\"45.6265144348145,20.32470703125\" Point2=\"39.9008178710938,21.5664978027344\" Point3=\"30.3169002532959,20.9313945770264\"/>\r\n                                                    <BezierSegment Point1=\"24.7872543334961,20.5649566650391\" Point2=\"17.0756797790527,21.3352470397949\" Point3=\"11.5372772216797,21.6029224395752\"/>\r\n                                                    <BezierSegment Point1=\"9.37526988983154,21.7074146270752\" Point2=\"6.82023525238037,22.2953662872314\" Point3=\"4.65164470672607,21.9357109069824\"/>\r\n                                                    <BezierSegment Point1=\"1.45201742649078,21.4050598144531\" Point2=\"1.73953628540039,23.0963401794434\" Point3=\"1.51341998577118,17.1753234863281\"/>\r\n                                                    <BezierSegment Point1=\"1.38521957397461,13.8183069229126\" Point2=\"0.133225455880165,11.0509176254272\" Point3=\"0.00502508180215955,7.6939001083374\"/>\r\n                                                    <BezierSegment Point1=\"-0.0463196896016598,6.3494029045105\" Point2=\"0.306805700063705,4.28786516189575\" Point3=\"0.562162816524506,2.95534110069275\"/>\r\n                                                    <LineSegment Point=\"2.65466785430908,2.14960050582886\"/>\r\n                                                    <BezierSegment Point1=\"5.5844030380249,2.0080041885376\" Point2=\"7.20274591445923,3.57988381385803\" Point3=\"10.0115203857422,2.2107675075531\"/>\r\n                                                    <BezierSegment Point1=\"11.7393894195557,1.36852860450745\" Point2=\"15.138897895813,2.29763579368591\" Point3=\"16.5382518768311,2.38410639762878\"/>\r\n                                                </PathFigure>\r\n                                            </PathGeometry>\r\n                                        </Path.Data>\r\n                                        <Path.RenderTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform/>\r\n                                                <SkewTransform/>\r\n                                                <RotateTransform/>\r\n                                                <TranslateTransform X=\"1.4916732314436434\" Y=\"-0.23907148924159571\"/>\r\n                                            </TransformGroup>\r\n                                        </Path.RenderTransform>\r\n                                    </Path>\r\n                                    <Path Margin=\"-1.25,0,5,-1\" x:Name=\"Line\" RenderTransformOrigin=\"0.5,0.5\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\">\r\n                                        <Path.RenderTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform/>\r\n                                                <SkewTransform/>\r\n                                                <RotateTransform/>\r\n                                                <TranslateTransform/>\r\n                                            </TransformGroup>\r\n                                        </Path.RenderTransform>\r\n                                    </Path>\r\n                                    <Path Margin=\"2.75,4.375,9,3.5\" x:Name=\"FocusVisualElement\" StrokeDashArray=\"1 2\" RenderTransformOrigin=\"0.5,0.5\" Visibility=\"Collapsed\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"0.5\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\">\r\n                                        <Path.RenderTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform/>\r\n                                                <SkewTransform/>\r\n                                                <RotateTransform/>\r\n                                                <TranslateTransform/>\r\n                                            </TransformGroup>\r\n                                        </Path.RenderTransform>\r\n                                    </Path>\r\n                                    <Path Margin=\"-1.25,0,5,-1\" x:Name=\"DisabledOverlay\" Stretch=\"Fill\" Stroke=\"#B2FFFFFF\" StrokeThickness=\"2\" Data=\"M0.86650187,0.69540656 C9.839016,1.5543122E-15 19.298248,0 28.666666,0 C34.111111,0 39.555557,0 45,0 C49.827866,0 54.697731,1.1666666 59.333332,1.1666666 C64.324516,1.1666666 69.205429,0.91472858 74.166664,0.66666669 C76.631264,0.54343694 79.333336,-1.1676883 79.333336,3.8333333 C79.333336,11.344878 79,19.153017 79,26.666666 C79,30.484423 77.184448,30.447409 70.5,29.333334 C63.711517,28.20192 56.572155,29.121061 49.666668,28.833334 C39.880856,28.425591 30.177942,31.056808 20.666666,30 C16.043324,29.486296 11.5665,30.340723 7,29.833334 C4.1721892,29.519133 4.3808351,30.563976 2,28 C0.43954825,26.319513 1.6226629,23.586496 0,22.166666 C-2.3480425,20.112129 -0.66666669,14.317116 -0.66666669,10.833333 C-0.66666669,7.1040154 -0.31854713,1.2169615 0.86650187,0.69540656 z\" Opacity=\"0\" RenderTransformOrigin=\"0.5,0.5\" Fill=\"#B2FFFFFF\">\r\n                                        <Path.RenderTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform/>\r\n                                                <SkewTransform/>\r\n                                                <RotateTransform/>\r\n                                                <TranslateTransform/>\r\n                                            </TransformGroup>\r\n                                        </Path.RenderTransform>\r\n                                    </Path>\r\n                                    <!--End UI-->\r\n                                </Grid>\r\n                            </ControlTemplate>\r\n                        </Grid.Resources>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\"/>\r\n                                <VisualState x:Name=\"MouseOver\"/>\r\n                                <VisualState x:Name=\"Disabled\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"Root\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                            <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0.5\"/>\r\n                                        </DoubleAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid x:Name=\"HorizontalRoot\" Visibility=\"Collapsed\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition/>\r\n                                <RowDefinition/>\r\n                            </Grid.RowDefinitions>\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                            </Grid.ColumnDefinitions>\r\n\r\n                            <!--Start: Track-->\r\n                            <Rectangle Grid.RowSpan=\"2\" Grid.ColumnSpan=\"5\" Fill=\"#FFFFFFFF\"/>\r\n                            <Rectangle Grid.RowSpan=\"2\" Grid.ColumnSpan=\"5\" Fill=\"#FFFFFFFF\"/>\r\n                            <Path Grid.RowSpan=\"2\" Grid.ColumnSpan=\"5\" Margin=\"4,0,4,0\" Height=\"5\" Fill=\"{TemplateBinding Background}\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" Data=\"M2.5,10.75 C10.769531,9.6713657 20.250107,9.2501192 28.25,10.25 C38.895863,11.580592 50.207603,10.5 61.25,10.5 C70.336395,10.5 75.250519,8.7502098 90.750267,10.000045 C90.961433,10.017073 101.80408,11.999342 96.5,12 C95.750412,12.000093 79.953804,11.344656 73.75,11 C65.415443,10.536969 57.345238,12 49,12 C33.191448,12 17.421957,12.5 1.75,12.5 C2.0833333,12.25 2.4166667,12 2.75,11.75 C2.6972954,11.64459 2.4882734,11.617267 2.5,11.5 C2.5185413,11.314586 2.2201519,11.183933 2.25,11 C2.2688777,10.883671 2.5785825,10.837828 2.5,10.75 z\"/>\r\n                            <!--End: Track-->\r\n\r\n                            <RepeatButton x:Name=\"HorizontalSmallDecrease\" Width=\"0\" IsTabStop=\"False\" Template=\"{StaticResource HorizontalDecrementTemplate}\" Grid.Column=\"0\" Grid.RowSpan=\"2\" Interval=\"50\"/>\r\n                            <RepeatButton x:Name=\"HorizontalLargeDecrease\" Width=\"0\" IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Grid.Column=\"1\" Grid.RowSpan=\"2\" Interval=\"50\"/>\r\n                            <Thumb MinWidth=\"30\" x:Name=\"HorizontalThumb\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" Width=\"30\" Template=\"{StaticResource HorizontalThumbTemplate}\" Grid.Column=\"2\" Grid.RowSpan=\"2\"/>\r\n                            <RepeatButton x:Name=\"HorizontalLargeIncrease\" IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Grid.Column=\"3\" Grid.RowSpan=\"2\" Interval=\"50\"/>\r\n                            <RepeatButton x:Name=\"HorizontalSmallIncrease\" Width=\"0\" IsTabStop=\"False\" Template=\"{StaticResource HorizontalIncrementTemplate}\" Grid.Column=\"4\" Grid.RowSpan=\"2\" Interval=\"50\"/>\r\n                        </Grid>\r\n                        <Grid x:Name=\"VerticalRoot\" Visibility=\"Visible\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"*\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition/>\r\n                                <ColumnDefinition/>\r\n                            </Grid.ColumnDefinitions>\r\n\r\n                            <!--Start: Track-->\r\n                            <Rectangle Grid.RowSpan=\"5\" Grid.ColumnSpan=\"2\" Fill=\"#FFFFFFFF\"/>\r\n                            <Rectangle Grid.RowSpan=\"5\" Grid.ColumnSpan=\"2\" Fill=\"#FFFFFFFF\"/>\r\n                            <Path Grid.RowSpan=\"5\" Grid.ColumnSpan=\"2\" Width=\"5\" Fill=\"{TemplateBinding Background}\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" Margin=\"0,4,0,4\" Data=\"M10.75,1.75 C10.75,12.649285 10.25,23.720615 10.25,34.75 C10.25,50.941807 9.5,67.320854 9.5,83.75 C11.158469,84.223846 8.75,90.980972 8.75,94.25 C8.75,95.54538 8.4319277,97.227707 8.75,98.5 C8.82022,98.780884 11.25,101.93609 11.25,99.25 C11.25,88.213257 12,77.355553 12,66.25 C12,51.455677 13,37.040787 13,22.25 C13,16.22773 13.5,10.253379 13.5,4.25 C13.5,0.27270243 13.181593,2.7098393 10.75,1.75 z\"/>\r\n                            <!--End: Track-->\r\n\r\n                            <RepeatButton Height=\"0\" x:Name=\"VerticalSmallDecrease\" IsTabStop=\"False\" Template=\"{StaticResource VerticalDecrementTemplate}\" Grid.ColumnSpan=\"2\" Grid.Row=\"0\" Interval=\"50\"/>\r\n\r\n                            <Track Grid.Column=\"0\" Grid.ColumnSpan=\"2\" Grid.Row=\"0\" Grid.RowSpan=\"5\" x:Name=\"PART_Track\" Orientation=\"Vertical\" IsDirectionReversed=\"true\">\r\n                                <Track.Thumb>\r\n                                    <Thumb Height=\"30\" x:Name=\"VerticalThumb\" BorderBrush=\"{TemplateBinding BorderBrush}\" Background=\"{TemplateBinding Background}\" Template=\"{StaticResource VerticalThumbTemplate}\"/>\r\n                                </Track.Thumb>\r\n                                <Track.IncreaseRepeatButton>\r\n                                    <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Command=\"ScrollBar.PageDownCommand\" Interval=\"50\" />\r\n                                </Track.IncreaseRepeatButton>\r\n                                <Track.DecreaseRepeatButton>\r\n                                    <RepeatButton IsTabStop=\"False\" Template=\"{StaticResource RepeatButtonTemplate}\" Command=\"ScrollBar.PageUpCommand\" Interval=\"50\" />\r\n                                </Track.DecreaseRepeatButton>\r\n                            </Track>\r\n\r\n                            <RepeatButton Height=\"0\" x:Name=\"VerticalSmallIncrease\" IsTabStop=\"False\" Template=\"{StaticResource VerticalIncrementTemplate}\" Grid.ColumnSpan=\"2\" Grid.Row=\"4\" Interval=\"50\"/>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <!--ScrollViewer-->\r\n    <Style TargetType=\"ScrollViewer\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource BorderBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n        <Setter Property=\"Cursor\" Value=\"Arrow\"/>\r\n        <!--<Setter Property=\"TextAlignment\" Value=\"Left\"/>\r\n        <Setter Property=\"TextWrapping\" Value=\"Wrap\"/>-->\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ScrollViewer\">\r\n                    <Grid Margin=\"4\" Background=\"#FFFFFFFF\">\r\n                        <Grid.ColumnDefinitions>\r\n                            <ColumnDefinition Width=\"*\"/>\r\n                            <ColumnDefinition Width=\"Auto\"/>\r\n                        </Grid.ColumnDefinitions>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"*\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n                        <ScrollContentPresenter  \r\n\t\t\t\t\t\t\t\t\t    x:Name=\"ScrollContentPresenter\" \r\n\t\t\t\t\t\t\t\t\t    Grid.Column=\"0\" \r\n\t\t\t\t\t\t\t\t\t    Grid.Row=\"0\" \r\n\t\t\t\t\t\t\t\t\t    Cursor=\"{TemplateBinding Cursor}\"\r\n\t\t\t\t\t\t\t\t\t    Content=\"{TemplateBinding Content}\" \r\n\t\t\t\t\t\t\t\t\t    ContentTemplate=\"{TemplateBinding ContentTemplate}\" />\r\n                        <!--\r\n                                        Background=\"#FFFFFFFF\" \r\n\t\t\t\t\t\t\t\t\t    FontFamily=\"Verdana\" \r\n\t\t\t\t\t\t\t\t\t    FontSize=\"11\"\r\n\t\t\t\t\t\t\t\t\t    HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" \r\n\t\t\t\t\t\t\t\t\t    VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\" \r\n\t\t\t\t\t\t\t\t\t    TextAlignment=\"{TemplateBinding TextAlignment}\" \r\n\t\t\t\t\t\t\t\t\t    TextWrapping=\"{TemplateBinding TextWrapping}\"/>\r\n-->\r\n                        <ScrollBar Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" Cursor=\"Arrow\" x:Name=\"PART_VerticalScrollBar\" Width=\"18\" \r\n                                        Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Grid.Column=\"1\" Grid.Row=\"0\" \r\n                                        Maximum=\"{TemplateBinding ScrollableHeight}\" Minimum=\"0\" Value=\"{TemplateBinding VerticalOffset}\" \r\n                                        Orientation=\"Vertical\" ViewportSize=\"{TemplateBinding ViewportHeight}\" \r\n                                        />\r\n                        <ScrollBar Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" Cursor=\"Arrow\" Height=\"18\" \r\n                                        x:Name=\"PART_HorizontalScrollBar\" Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" \r\n                                        Grid.Column=\"0\" Grid.Row=\"1\" Maximum=\"{TemplateBinding ScrollableWidth}\" Minimum=\"0\" \r\n                                        Value=\"{TemplateBinding HorizontalOffset}\" Orientation=\"Horizontal\" \r\n                                        ViewportSize=\"{TemplateBinding ViewportWidth}\" />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <!--ComboBoxItem-->\r\n    <Style TargetType=\"ComboBoxItem\">\r\n        <Setter Property=\"Background\" Value=\"{StaticResource HoverBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource BorderBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n        <!--<Setter Property=\"TextAlignment\" Value=\"Left\" />\r\n        <Setter Property=\"TextWrapping\" Value=\"NoWrap\" />-->\r\n        <Setter Property=\"Padding\" Value=\"10,0,0,0\" />\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"ComboBoxItem\">\r\n                    <Grid>\r\n                        <VisualStateManager.VisualStateGroups>\r\n                            <VisualStateGroup x:Name=\"CommonStates\">\r\n                                <VisualState x:Name=\"Normal\" />\r\n                                <VisualState x:Name=\"MouseOver\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"FillColor\" Storyboard.TargetProperty=\"Opacity\" Duration=\"0\" To=\"1\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"SelectionStates\">\r\n                                <VisualState x:Name=\"Unselected\" />\r\n                                <VisualState x:Name=\"Selected\">\r\n                                    <Storyboard>\r\n                                        <DoubleAnimation Storyboard.TargetName=\"StrokeColor\" Storyboard.TargetProperty=\"Opacity\" Duration=\"0\" To=\"1\"/>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                            </VisualStateGroup>\r\n                            <VisualStateGroup x:Name=\"FocusStates\">\r\n                                <VisualState x:Name=\"Focused\">\r\n                                    <Storyboard>\r\n                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"FocusVisual\" Storyboard.TargetProperty=\"Visibility\" Duration=\"0\">\r\n                                            <DiscreteObjectKeyFrame KeyTime=\"0\">\r\n                                                <DiscreteObjectKeyFrame.Value>\r\n                                                    <Visibility>Visible</Visibility>\r\n                                                </DiscreteObjectKeyFrame.Value>\r\n                                            </DiscreteObjectKeyFrame>\r\n                                        </ObjectAnimationUsingKeyFrames>\r\n                                    </Storyboard>\r\n                                </VisualState>\r\n                                <VisualState x:Name=\"Unfocused\" />\r\n                            </VisualStateGroup>\r\n                        </VisualStateManager.VisualStateGroups>\r\n                        <Grid.RowDefinitions>\r\n                            <RowDefinition Height=\"*\"/>\r\n                            <RowDefinition Height=\"Auto\"/>\r\n                        </Grid.RowDefinitions>\r\n\r\n                        <!--Start UI-->\r\n                        <Path x:Name=\"FillColor\" Opacity=\"0\" Fill=\"{TemplateBinding Background}\" Margin=\"1,0,-6.5,-2\" Height=\"22\" Stretch=\"Fill\" StrokeThickness=\"1\" Data=\"M0.5,4 C5.4921546,-1.2298763 6.7624655,0.25 16.25,0.25 C26.98455,0.25 37.771278,-0.14736003 48.5,0.25 C58.050766,0.60373205 67.126785,1.8436862 76.75,1.5 C81.214241,1.3405629 85.468109,1 90,1 C93.832878,1 95.48951,0.42107743 98.75,2.75 C103.03876,5.8134003 99,22.711088 99,29 C99,36.099834 99.578392,43.275311 99.25,50.5 C98.582687,65.180809 99.25,79.852791 99.25,94.5 C99.25,106.65568 72.737717,98.226776 56.5,99 C47.401512,99.433258 38.067318,99.75 29,99.75 C23.833334,99.75 18.666666,99.75 13.5,99.75 C11.25,99.75 9,99.75 6.75,99.75 C2.9788802,99.75 3.51701,102.43028 2,97.5 C0.044149127,91.143486 0.5,85.399605 0.5,78.5 C0.5,68.201317 -0.62925881,58.16333 0.5,48 C2.0587127,33.971584 0,18.959808 0,4.75 C0.13653865,4.6544228 0.34602007,4.8137808 0.5,4.75 C0.7177605,4.6598005 0.80388385,4.380744 1,4.25 C0.83333331,4.25 0.66666669,4.25 0.5,4.25 C0.5,4.1666665 0.5,4.0833335 0.5,4 z\"/>\r\n                        <Path x:Name=\"StrokeColor\" Opacity=\"0\" Stroke=\"{TemplateBinding BorderBrush}\" Margin=\"1,0,-3.5,-2\" Height=\"22\" Stretch=\"Fill\" StrokeThickness=\"1\" Data=\"M0.5,4 C5.4921546,-1.2298763 6.7624655,0.25 16.25,0.25 C26.98455,0.25 37.771278,-0.14736003 48.5,0.25 C58.050766,0.60373205 67.126785,1.8436862 76.75,1.5 C81.214241,1.3405629 85.468109,1 90,1 C93.832878,1 95.48951,0.42107743 98.75,2.75 C103.03876,5.8134003 99,22.711088 99,29 C99,36.099834 99.578392,43.275311 99.25,50.5 C98.582687,65.180809 99.25,79.852791 99.25,94.5 C99.25,106.65568 72.737717,98.226776 56.5,99 C47.401512,99.433258 38.067318,99.75 29,99.75 C23.833334,99.75 18.666666,99.75 13.5,99.75 C11.25,99.75 9,99.75 6.75,99.75 C2.9788802,99.75 3.51701,102.43028 2,97.5 C0.044149127,91.143486 0.5,85.399605 0.5,78.5 C0.5,68.201317 -0.62925881,58.16333 0.5,48 C2.0587127,33.971584 0,18.959808 0,4.75 C0.13653865,4.6544228 0.34602007,4.8137808 0.5,4.75 C0.7177605,4.6598005 0.80388385,4.380744 1,4.25 C0.83333331,4.25 0.66666669,4.25 0.5,4.25 C0.5,4.1666665 0.5,4.0833335 0.5,4 z\"/>\r\n\r\n                        <ContentPresenter\r\n                              HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                              VerticalAlignment=\"Center\"\r\n                              Margin=\"{TemplateBinding Padding}\"                              \r\n                            />\r\n                        <!--\r\n                              Content=\"{TemplateBinding Content}\"\r\n                              ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                              FontFamily=\"Arial\"\r\n                              FontSize=\"11\"\r\n                              FontStretch=\"{TemplateBinding FontStretch}\"\r\n                              FontStyle=\"{TemplateBinding FontStyle}\"\r\n                              FontWeight=\"Normal\"\r\n                              HorizontalAlignment=\"Left\"\r\n                              HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                              Padding=\"{TemplateBinding Padding}\"\r\n                              TextAlignment=\"{TemplateBinding TextAlignment}\"\r\n                              TextDecorations=\"{TemplateBinding TextDecorations}\"\r\n                              TextWrapping=\"{TemplateBinding TextWrapping}\"\r\n                              VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                              Foreground=\"{TemplateBinding Foreground}\"/>\r\n-->\r\n                        <Path x:Name=\"FocusVisual\" Height=\"21\" Margin=\"2,0,.25,0\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\".5\" Visibility=\"Collapsed\" Data=\"M0.5,4 C5.4921546,-1.2298763 6.7624655,0.25 16.25,0.25 C26.98455,0.25 37.771278,-0.14736003 48.5,0.25 C58.050766,0.60373205 67.126785,1.8436862 76.75,1.5 C81.214241,1.3405629 85.468109,1 90,1 C93.832878,1 95.48951,0.42107743 98.75,2.75 C103.03876,5.8134003 99,22.711088 99,29 C99,36.099834 99.578392,43.275311 99.25,50.5 C98.582687,65.180809 99.25,79.852791 99.25,94.5 C99.25,106.65568 72.737717,98.226776 56.5,99 C47.401512,99.433258 38.067318,99.75 29,99.75 C23.833334,99.75 18.666666,99.75 13.5,99.75 C11.25,99.75 9,99.75 6.75,99.75 C2.9788802,99.75 3.51701,102.43028 2,97.5 C0.044149127,91.143486 0.5,85.399605 0.5,78.5 C0.5,68.201317 -0.62925881,58.16333 0.5,48 C2.0587127,33.971584 0,18.959808 0,4.75 C0.13653865,4.6544228 0.34602007,4.8137808 0.5,4.75 C0.7177605,4.6598005 0.80388385,4.380744 1,4.25 C0.83333331,4.25 0.66666669,4.25 0.5,4.25 C0.5,4.1666665 0.5,4.0833335 0.5,4 z\"/>\r\n                        <!--End UI-->\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n    <Style TargetType=\"{x:Type ComboBox}\">\r\n        <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n        <Setter Property=\"Background\" Value=\"{StaticResource BaseColorBrush}\"/>\r\n        <Setter Property=\"BorderBrush\" Value=\"{StaticResource BorderBrush}\"/>\r\n        <Setter Property=\"Foreground\" Value=\"{StaticResource ForegroundBrush}\" />\r\n        <Setter Property=\"Padding\" Value=\"0\"/>\r\n\r\n\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"{x:Type ComboBox}\">\r\n                    <Grid>\r\n                        <ToggleButton Grid.Column=\"2\" Focusable=\"false\" IsChecked=\"{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" ClickMode=\"Press\"/>\r\n                        <ContentPresenter HorizontalAlignment=\"Left\" Margin=\"10,3,23,3\" x:Name=\"ContentSite\" VerticalAlignment=\"Center\" Content=\"{TemplateBinding SelectionBoxItem}\" ContentTemplate=\"{TemplateBinding SelectionBoxItemTemplate}\" ContentTemplateSelector=\"{TemplateBinding ItemTemplateSelector}\" IsHitTestVisible=\"False\"/>\r\n\r\n                        <!--<TextBox Visibility=\"Hidden\" Template=\"{DynamicResource ComboBoxTextBox}\" HorizontalAlignment=\"Left\" Margin=\"3,3,23,3\" x:Name=\"PART_EditableTextBox\" Style=\"{x:Null}\" VerticalAlignment=\"Center\" Focusable=\"True\" Background=\"Transparent\" IsReadOnly=\"{TemplateBinding IsReadOnly}\"/>-->\r\n\r\n                        <Popup IsOpen=\"{TemplateBinding IsDropDownOpen}\" Placement=\"Bottom\" x:Name=\"Popup\" Focusable=\"False\" AllowsTransparency=\"True\" PopupAnimation=\"Slide\">\r\n                            <Grid MaxHeight=\"{TemplateBinding MaxDropDownHeight}\" MinWidth=\"{TemplateBinding ActualWidth}\" x:Name=\"DropDown\" SnapsToDevicePixels=\"True\">\r\n                                <Path Fill=\"#FFFFFFFF\" Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"2\" Data=\"M8.0486603,-1.7956065 C40.652985,-1.2334629 60.802299,5.3778448 94.571907,-3.8320472 C132.02231,-14.045796 175.82878,1 215,1 C278.08371,1 340.94531,1 405,1 C447.66666,1 488.54492,0.24040417 531.21155,0.24040417 C560.38153,0.24040417 624.77802,-6.8858747 639.86951,-0.77759421 C642.52252,0.29620132 639.86847,98.304474 639.86847,124.43706 C639.86847,190.61852 640.87457,264.57269 640.87457,330.07413 C640.87457,369.30386 637.85645,396.94827 637.85645,435.94669 C637.85645,441.81662 648.37085,477.30365 637.85669,479.72144 C615.7226,484.81128 553.33221,480.23886 538.25421,479.72162 C360.17755,473.61288 232.40511,488.88297 2,479 C4.0243306,313.78604 0,161.53839 0,3 C0.66666669,3 2.3515811,1.2584095 3.0182476,1.2584095 C3.0182476,0.59174258 8.0486603,-1.1289399 8.0486603,-1.7956065 z\"/>\r\n\r\n                                <ScrollViewer Margin=\"4,6,4,6\" SnapsToDevicePixels=\"True\" HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Auto\" CanContentScroll=\"True\">\r\n                                    <ItemsPresenter />\r\n                                </ScrollViewer>\r\n\r\n                                <Path Stretch=\"Fill\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"0.5\" Margin=\"-0.094,0.769,0.799,-0.479\" Data=\"M1.7206836,12.568695 C2.4419925,11.031993 1.4481189,7.3090796 1.7209258,5.6722374 C2.2648225,2.4088583 0.46910813,5.715632 5.1693902,3.7012255 C10.004368,1.6290923 20.664461,1.2662256 26,2.3333333 C36.24308,4.3819494 47.8027,3.6553195 58.131069,2.7163765 C68.803482,1.7461575 79.164429,1.9772166 89.908081,1.9772166 C100.39313,1.9772166 98,-0.96195835 98,16.333334 C98,23.112209 96.493988,25.349688 97.298027,31.782001 C98.258453,39.465462 97.476074,52.003723 97.29808,59.862312 C97.103302,68.46196 97.666664,74.564713 97.666664,83 C97.666664,108.95624 103.8933,92.074692 62.072483,97.302299 C52.738716,98.469017 39.806664,100.01 30.333334,99.333336 C22.81004,98.795952 7.3937144,97.694511 1.967056,97.548622 C-0.28294224,97.488136 1.5684019,88.452782 2.3333333,82.333336 C3.1227529,76.017975 2.5054271,71.237221 2,64.666664 C0.6911695,47.651871 3.9379203,29.072496 1.720971,12.568695\"/>\r\n                            </Grid>\r\n                        </Popup>\r\n                    </Grid>\r\n                    <ControlTemplate.Triggers>\r\n                        <!-- This forces the DropDown to have a minimum size if it is empty \r\n                        <Trigger Property=\"HasItems\" Value=\"false\">\r\n                            <Setter Property=\"MinHeight\" Value=\"95\" TargetName=\"DropDownBorder\"/>\r\n                        </Trigger> -->\r\n                        <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                            <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                        </Trigger>\r\n                        <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                            <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\"/>\r\n                        </Trigger>\r\n                        <!--<Trigger Property=\"AllowsTransparency\" SourceName=\"Popup\" Value=\"true\">\r\n                            <Setter Property=\"CornerRadius\" Value=\"4\" TargetName=\"DropDownBorder\"/>\r\n                            <Setter Property=\"Margin\" Value=\"0,2,0,0\" TargetName=\"DropDownBorder\"/>\r\n                        </Trigger>-->\r\n                        <Trigger Property=\"IsEditable\" Value=\"true\">\r\n                            <Setter Property=\"IsTabStop\" Value=\"false\"/>\r\n                            <!--<Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"PART_EditableTextBox\"/>-->\r\n                            <Setter Property=\"Visibility\" Value=\"Hidden\" TargetName=\"ContentSite\"/>\r\n                        </Trigger>\r\n                    </ControlTemplate.Triggers>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n    <Style TargetType=\"Expander\">\r\n        <Setter Property=\"Template\">\r\n            <Setter.Value>\r\n                <ControlTemplate TargetType=\"Expander\">\r\n                    <Grid>\r\n                        <ContentPresenter />\r\n                    </Grid>\r\n                </ControlTemplate>\r\n            </Setter.Value>\r\n        </Setter>\r\n    </Style>\r\n\r\n\r\n</ResourceDictionary>"
  },
  {
    "path": "WpfToolkit/WPF.Themes/WhistlerBlue/Theme.xaml",
    "content": "﻿<!--\r\n// (c) Copyright Microsoft Corporation.\r\n// This source is subject to Microsoft Public License (Ms-PL).\r\n// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.\r\n// All other rights reserved.\r\n-->\r\n\r\n<ResourceDictionary\r\n  xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n  xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n  xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n  mc:Ignorable=\"d\"\r\n  xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\">\r\n\r\n   \r\n        <!-- Color Palette -->\r\n        <SolidColorBrush x:Key=\"OutsideFontColor\" Color=\"#FF000000\"/>\r\n        <SolidColorBrush x:Key=\"ButtonFontColor\" Color=\"#FF042271\"/>\r\n        <Color x:Key=\"Focus\">#FF04CCFF</Color>\r\n        <Color x:Key=\"HyperlinkFocus\">#FF2B54BA</Color>\r\n        <Color x:Key=\"Calendar\">#FF0066CC</Color>\r\n        <Color x:Key=\"PressStroke1\">#FF1D415C</Color>\r\n        <Color x:Key=\"PressStroke2\">#FF2C628B</Color>\r\n        <Color x:Key=\"TabStroke\">#FF4F8BB9</Color>\r\n        <Color x:Key=\"DataSortArrow\">#3F2C628B</Color>\r\n        <!--PressStroke2, 25%-->\r\n        <Color x:Key=\"DropLocate\">#FF6392C8</Color>\r\n        <Color x:Key=\"TreeviewArrowNorm\">#FF76D5FD</Color>\r\n        <Color x:Key=\"TreeviewArrowOver\">#FFC1EFF8</Color>\r\n        <Color x:Key=\"TreeviewArrowCheck\">#FF6380EE</Color>\r\n        <Color x:Key=\"ExpandArrowStroke\">#FF688DC4</Color>\r\n        <Color x:Key=\"Arrow\">#FF425080</Color>\r\n        <Color x:Key=\"Arrow2\">#FF7682E4</Color>\r\n        <Color x:Key=\"TextBkgSelection\">#FF309AFF</Color>\r\n        <Color x:Key=\"TextboxOver1\">#FF5296BD</Color>\r\n        <Color x:Key=\"TextboxOver2\">#FFC2E4F6</Color>\r\n        <Color x:Key=\"TextboxPress1\">#FF3B79AC</Color>\r\n        <Color x:Key=\"TextboxPress2\">#FFB2DBED</Color>\r\n        <Color x:Key=\"ItemOver1\">#FFF4FAFD</Color>\r\n        <Color x:Key=\"ItemOver2\">#FFCFEDFD</Color>\r\n        <Color x:Key=\"ItemOverStroke\">#FFD8F0FA</Color>\r\n        <Color x:Key=\"ItemSelectStroke\">#FF98DDFB</Color>\r\n        <Color x:Key=\"Over1\">#FFE2F5FF</Color>\r\n        <Color x:Key=\"Over2\">#FFC0E7FC</Color>\r\n        <Color x:Key=\"Over3\">#FF9EDDFF</Color>\r\n        <Color x:Key=\"Press1\">#FF759FB6</Color>\r\n        <Color x:Key=\"Press2\">#FFB6E0F6</Color>\r\n        <Color x:Key=\"Press3\">#FF9DD5F4</Color>\r\n        <Color x:Key=\"PressHighlight\">#FF387599</Color>\r\n        <Color x:Key=\"ButtonHighlightMid\">#0095D9FF</Color>\r\n        <Color x:Key=\"ButtonHighlightMid2\">#9935A6E6</Color>\r\n        <!--60%-->\r\n        <Color x:Key=\"ButtonHighlightMid3\">#A535A6E6</Color>\r\n        <!--65%-->\r\n        <Color x:Key=\"RadioIcon1\">#FF90D5E5</Color>\r\n        <Color x:Key=\"RadioIcon2\">#FF28A2D1</Color>\r\n        <Color x:Key=\"RadioIcon3\">#FF1898D1</Color>\r\n        <Color x:Key=\"RadioIcon4\">#FF0F83C7</Color>\r\n        <Color x:Key=\"RadioIconOver1\">#FF1EBEFF</Color>\r\n        <Color x:Key=\"RadioIconOver2\">#FF13A2F3</Color>\r\n        <Color x:Key=\"RadioIconPress1\">#99759FB6</Color>\r\n        <!--Press1, 60%-->\r\n        <Color x:Key=\"RadioIconPress2\">#FF4B8DAF</Color>\r\n        <Color x:Key=\"RadioStroke\">#FF275674</Color>\r\n        <Color x:Key=\"CheckInnerOver\">#FF79C6F9</Color>\r\n        <Color x:Key=\"CheckInnerOver2\">#FFAFDEFD</Color>\r\n        <Color x:Key=\"CheckInnerPress\">#FF5EB6F7</Color>\r\n        <Color x:Key=\"CheckInnerPress2\">#FF90CFFC</Color>\r\n        <Color x:Key=\"CheckOutterOver\">#FF5989A5</Color>\r\n        <Color x:Key=\"CheckOutterOver2\">#FFDEF9FA</Color>\r\n        <Color x:Key=\"ThumbPress1\">#FF6CBBE5</Color>\r\n        <Color x:Key=\"ThumbPress2\">#FF50A1CC</Color>\r\n        <Color x:Key=\"ExpanderOver1\">#FFB1E7FE</Color>\r\n        <Color x:Key=\"ExpanderOver2\">#FFEAFFFF</Color>\r\n        <Color x:Key=\"ExpanderOver3\">#A56EB4F6</Color>\r\n        <Color x:Key=\"ExpanderMid\">#009DD5F4</Color>\r\n        <!--Press3, 0%-->\r\n        <Color x:Key=\"ExpanderPress1\">#FF80CEFF</Color>\r\n        <Color x:Key=\"ExpanderPress2\">#FF2D84CF</Color>\r\n        <Color x:Key=\"ThumbDivetOver\">#E5387599</Color>\r\n        <!--PressHighlight, 20%-->\r\n        <Color x:Key=\"ThumbDivetFill1\">#199DD5F4</Color>\r\n        <!--Press3, 10%-->\r\n        <Color x:Key=\"ThumbDivetFill2\">#33387599</Color>\r\n        <!--PressHighlight, 20%-->\r\n        <!-- End Color Palette-->\r\n\r\n\r\n        <!-- Communal Static Resources -->\r\n        <SolidColorBrush x:Key=\"btnFocus\" Color=\"{StaticResource Focus}\"/>\r\n        <SolidColorBrush x:Key=\"btnPressStroke1\" Color=\"{StaticResource PressStroke1}\"/>\r\n        <SolidColorBrush x:Key=\"btnPressStroke2\" Color=\"{StaticResource PressStroke2}\"/>\r\n\r\n        <LinearGradientBrush x:Key=\"btnPressBorder\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n            <GradientStop Color=\"{StaticResource PressStroke1}\" Offset=\"0\"/>\r\n            <GradientStop Color=\"{StaticResource PressStroke2}\" Offset=\"1\"/>\r\n        </LinearGradientBrush>\r\n\r\n        <SolidColorBrush x:Key=\"hyperlinkPress\" Color=\"{StaticResource HyperlinkFocus}\"/>\r\n        <SolidColorBrush x:Key=\"calendarBtnFill\" Color=\"{StaticResource Over2}\"/>\r\n        <SolidColorBrush x:Key=\"calendarTodayStroke\" Color=\"{StaticResource Calendar}\"/>\r\n        <SolidColorBrush x:Key=\"treeviewArrowUnchecked\" Color=\"{StaticResource TreeviewArrowNorm}\"/>\r\n        <SolidColorBrush x:Key=\"treeviewArrowHover\" Color=\"{StaticResource TreeviewArrowOver}\"/>\r\n        <SolidColorBrush x:Key=\"treeviewArrowChecked\" Color=\"{StaticResource TreeviewArrowCheck}\"/>\r\n\r\n        <SolidColorBrush x:Key=\"TextBackgroundSelection\" Color=\"{StaticResource TextBkgSelection}\"/>\r\n        <SolidColorBrush x:Key=\"TextBoxOverBrush\" Color=\"{StaticResource TextboxOver1}\"/>\r\n        <SolidColorBrush x:Key=\"TextBoxPressBrush\" Color=\"{StaticResource TextboxPress1}\"/>\r\n\r\n        <LinearGradientBrush x:Key=\"TextBoxOver\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n            <GradientStop Color=\"{StaticResource TextboxOver1}\" Offset=\"0\"/>\r\n            <GradientStop Color=\"{StaticResource TextboxOver2}\" Offset=\"0.355\"/>\r\n        </LinearGradientBrush>\r\n        <LinearGradientBrush x:Key=\"TextBoxFocus\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n            <GradientStop Color=\"{StaticResource TextboxPress1}\" Offset=\"0\"/>\r\n            <GradientStop Color=\"{StaticResource TextboxPress2}\" Offset=\"0.355\"/>\r\n        </LinearGradientBrush>\r\n        <LinearGradientBrush x:Key=\"TextBoxNorm\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n            <GradientStop Color=\"#FFABAEB3\" Offset=\"0\"/>\r\n            <GradientStop Color=\"#FFE2E8EE\" Offset=\"0.355\"/>\r\n        </LinearGradientBrush>\r\n\r\n        <LinearGradientBrush x:Key=\"grayGradient\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n            <GradientStop Color=\"#FFEDEDED\" Offset=\"0.171\"/>\r\n            <GradientStop Color=\"#FFE7E7E7\" Offset=\"0.5\"/>\r\n            <GradientStop Color=\"#FFDCDCDC\" Offset=\"0.51\"/>\r\n            <GradientStop Color=\"#FFEAEBEC\" Offset=\"1\"/>\r\n        </LinearGradientBrush>\r\n\r\n        <SolidColorBrush x:Key=\"hoverStroke\" Color=\"{StaticResource ItemOverStroke}\"/>\r\n        <SolidColorBrush x:Key=\"selectedStroke\" Color=\"{StaticResource ItemSelectStroke}\"/>\r\n\r\n        <LinearGradientBrush x:Key=\"hoverGradient\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n            <GradientStop Color=\"{StaticResource ItemOver1}\" Offset=\"0.5\"/>\r\n            <GradientStop Color=\"{StaticResource Over1}\" Offset=\"0.5\"/>\r\n            <GradientStop Color=\"{StaticResource ItemOver2}\" Offset=\"1\"/>\r\n        </LinearGradientBrush>\r\n        <LinearGradientBrush x:Key=\"hoverGradientVertical\" EndPoint=\"1,0.5\" StartPoint=\"0,0.5\">\r\n            <GradientStop Color=\"{StaticResource ItemOver1}\" Offset=\"0.5\"/>\r\n            <GradientStop Color=\"{StaticResource Over1}\" Offset=\"0.5\"/>\r\n            <GradientStop Color=\"{StaticResource ItemOver2}\" Offset=\"1\"/>\r\n        </LinearGradientBrush>\r\n\r\n        <LinearGradientBrush x:Key=\"BtnOverFill\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n            <GradientStop Color=\"{StaticResource Over1}\" Offset=\"0.5\"/>\r\n            <GradientStop Color=\"{StaticResource Over2}\" Offset=\"0.509\"/>\r\n            <GradientStop Color=\"{StaticResource Over3}\" Offset=\"1\"/>\r\n        </LinearGradientBrush>\r\n        <LinearGradientBrush x:Key=\"BtnPressFill\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n            <GradientStop Color=\"{StaticResource Press1}\" Offset=\"0\"/>\r\n            <GradientStop Color=\"{StaticResource Press2}\" Offset=\"0.152\"/>\r\n            <GradientStop Color=\"{StaticResource Over2}\" Offset=\"0.5\"/>\r\n            <GradientStop Color=\"{StaticResource Press3}\" Offset=\"0.509\"/>\r\n        </LinearGradientBrush>\r\n\r\n        <!-- standard button specific resources -->\r\n        <LinearGradientBrush x:Key=\"btnOverFillHighlight\" EndPoint=\"1,0.5\" StartPoint=\"0,0.5\">\r\n            <GradientStop Color=\"{StaticResource ButtonHighlightMid2}\" Offset=\"0\"/>\r\n            <GradientStop Color=\"{StaticResource ButtonHighlightMid}\" Offset=\"0.101\"/>\r\n            <GradientStop Color=\"{StaticResource ButtonHighlightMid}\" Offset=\"0.899\"/>\r\n            <GradientStop Color=\"{StaticResource ButtonHighlightMid2}\" Offset=\"1\"/>\r\n        </LinearGradientBrush>\r\n        <LinearGradientBrush x:Key=\"btnPressFillHighlight\" EndPoint=\"1,0.5\" StartPoint=\"0,0.5\">\r\n            <GradientStop Color=\"{StaticResource PressHighlight}\" Offset=\"0\"/>\r\n            <GradientStop Color=\"{StaticResource ButtonHighlightMid3}\" Offset=\"0.037\"/>\r\n            <GradientStop Color=\"{StaticResource ButtonHighlightMid}\" Offset=\"0.143\"/>\r\n            <GradientStop Color=\"{StaticResource ButtonHighlightMid}\" Offset=\"0.857\"/>\r\n            <GradientStop Color=\"{StaticResource ButtonHighlightMid3}\" Offset=\"0.963\"/>\r\n            <GradientStop Color=\"{StaticResource PressHighlight}\" Offset=\"1\"/>\r\n        </LinearGradientBrush>\r\n\r\n        <!-- Radio/Checkbox specific resources -->\r\n        <SolidColorBrush x:Key=\"checkOverStroke\" Color=\"{StaticResource CheckOutterOver}\"/>\r\n        <SolidColorBrush x:Key=\"checkOverFill\" Color=\"{StaticResource CheckOutterOver2}\"/>\r\n        <SolidColorBrush x:Key=\"checkPressFill\" Color=\"{StaticResource TextboxOver2}\"/>\r\n        <SolidColorBrush x:Key=\"checkInnerOverFill\" Color=\"{StaticResource CheckInnerOver2}\"/>\r\n        <SolidColorBrush x:Key=\"checkInnerPressFill\" Color=\"{StaticResource CheckInnerPress2}\"/>\r\n        <SolidColorBrush x:Key=\"checkIconStroke\" Color=\"{StaticResource Arrow}\"/>\r\n        <SolidColorBrush x:Key=\"radioIconStroke\" Color=\"{StaticResource RadioStroke}\"/>\r\n\r\n        <LinearGradientBrush x:Key=\"radioIconFill\" EndPoint=\"0.8,0.8\" StartPoint=\"0.3,0.3\">\r\n            <GradientStop Color=\"{StaticResource RadioIcon1}\" Offset=\"0\"/>\r\n            <GradientStop Color=\"{StaticResource RadioIcon2}\" Offset=\"0.179\"/>\r\n            <GradientStop Color=\"{StaticResource RadioIcon3}\" Offset=\"0.496\"/>\r\n            <GradientStop Color=\"{StaticResource RadioIcon4}\" Offset=\"0.812\"/>\r\n        </LinearGradientBrush>\r\n        <LinearGradientBrush x:Key=\"radioIconFillOver\" EndPoint=\"0.8,0.8\" StartPoint=\"0.3,0.3\">\r\n            <GradientStop Color=\"{StaticResource Over2}\" Offset=\"0\"/>\r\n            <GradientStop Color=\"{StaticResource Focus}\" Offset=\"0.179\"/>\r\n            <GradientStop Color=\"{StaticResource RadioIconOver1}\" Offset=\"0.496\"/>\r\n            <GradientStop Color=\"{StaticResource RadioIconOver2}\" Offset=\"0.812\"/>\r\n        </LinearGradientBrush>\r\n        <LinearGradientBrush x:Key=\"radioIconFillPress\" EndPoint=\"0.8,0.8\" StartPoint=\"0.3,0.3\">\r\n            <GradientStop Color=\"{StaticResource RadioIconPress1}\" Offset=\"0\"/>\r\n            <GradientStop Color=\"{StaticResource RadioIconPress2}\" Offset=\"0.317\"/>\r\n            <GradientStop Color=\"{StaticResource PressHighlight}\" Offset=\"0.504\"/>\r\n            <GradientStop Color=\"{StaticResource PressStroke2}\" Offset=\"0.817\"/>\r\n        </LinearGradientBrush>\r\n\r\n        <LinearGradientBrush x:Key=\"checkInnerOverStroke\" EndPoint=\"0.8,0.8\" StartPoint=\"0.3,0.3\">\r\n            <GradientStop Color=\"{StaticResource CheckInnerOver}\" Offset=\"0\"/>\r\n            <GradientStop Color=\"{StaticResource ItemOver2}\" Offset=\"1\"/>\r\n        </LinearGradientBrush>\r\n        <LinearGradientBrush x:Key=\"checkInnerPressStroke\" EndPoint=\"0.8,0.8\" StartPoint=\"0.3,0.3\">\r\n            <GradientStop Color=\"{StaticResource CheckInnerPress}\" Offset=\"0\"/>\r\n            <GradientStop Color=\"{StaticResource Over2}\" Offset=\"1\"/>\r\n        </LinearGradientBrush>\r\n\r\n        <!-- slider specific resources -->\r\n        <LinearGradientBrush x:Key=\"ThumbOver\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n            <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n            <GradientStop Color=\"{StaticResource Over1}\" Offset=\"0.484\"/>\r\n            <GradientStop Color=\"{StaticResource Over2}\" Offset=\"0.493\"/>\r\n            <GradientStop Color=\"{StaticResource Over3}\" Offset=\"1\"/>\r\n        </LinearGradientBrush>\r\n        <LinearGradientBrush x:Key=\"ThumbPress\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n            <GradientStop Color=\"{StaticResource ItemOver1}\" Offset=\"0\"/>\r\n            <GradientStop Color=\"{StaticResource Press3}\" Offset=\"0.576\"/>\r\n            <GradientStop Color=\"{StaticResource ThumbPress1}\" Offset=\"0.581\"/>\r\n            <GradientStop Color=\"{StaticResource ThumbPress2}\" Offset=\"1\"/>\r\n        </LinearGradientBrush>\r\n\r\n        <!-- datagrid specific resources -->\r\n        <SolidColorBrush x:Key=\"HeaderSeparator\" Color=\"#FFD7D5D8\" />\r\n        <SolidColorBrush x:Key=\"GridBorder\" Color=\"#FFD6D7D6\" />\r\n\r\n        <SolidColorBrush x:Key=\"dropLocator\" Color=\"{StaticResource DropLocate}\" />\r\n        <LinearGradientBrush x:Key=\"sortArrow\" EndPoint=\"0.725,0.832\" StartPoint=\"0.275,0.168\">\r\n            <GradientStop Color=\"{StaticResource PressStroke2}\"/>\r\n            <GradientStop Color=\"{StaticResource DataSortArrow}\" Offset=\"1\"/>\r\n        </LinearGradientBrush>\r\n\r\n        <!-- combobox/datepicker/numericupdown specific resources -->\r\n        <LinearGradientBrush x:Key=\"ComboTogglePressHighlight\" EndPoint=\"1,0.5\" StartPoint=\"0,0.5\">\r\n            <GradientStop Color=\"{StaticResource PressHighlight}\" Offset=\"0\"/>\r\n            <GradientStop Color=\"{StaticResource ButtonHighlightMid3}\" Offset=\"0.088\"/>\r\n            <GradientStop Color=\"{StaticResource ButtonHighlightMid}\" Offset=\"0.221\"/>\r\n            <GradientStop Color=\"{StaticResource ButtonHighlightMid}\" Offset=\"0.779\"/>\r\n            <GradientStop Color=\"{StaticResource ButtonHighlightMid3}\" Offset=\"0.912\"/>\r\n            <GradientStop Color=\"{StaticResource PressHighlight}\" Offset=\"1\"/>\r\n        </LinearGradientBrush>\r\n\r\n        <!-- expander specific resources -->\r\n        <SolidColorBrush x:Key=\"expanderArrowStroke\" Color=\"{StaticResource ExpandArrowStroke}\"/>\r\n\r\n        <LinearGradientBrush x:Key=\"ExpanderArrowHoverFill1\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n            <GradientStop Color=\"{StaticResource ItemOver1}\" Offset=\"0\"/>\r\n            <GradientStop Color=\"{StaticResource ExpanderOver1}\" Offset=\"0.52\"/>\r\n            <GradientStop Color=\"{StaticResource Over3}\" Offset=\"0.521\"/>\r\n            <GradientStop Color=\"{StaticResource Over2}\" Offset=\"0.78\"/>\r\n            <GradientStop Color=\"{StaticResource ExpanderOver2}\" Offset=\"1\"/>\r\n        </LinearGradientBrush>\r\n        <LinearGradientBrush x:Key=\"ExpanderArrowHoverFill2\" EndPoint=\"1,0\" StartPoint=\"0,0\">\r\n            <GradientStop Color=\"{StaticResource ExpanderOver3}\" Offset=\"0\"/>\r\n            <GradientStop Color=\"{StaticResource ExpanderMid}\" Offset=\"0.346\"/>\r\n            <GradientStop Color=\"{StaticResource ExpanderMid}\" Offset=\"0.696\"/>\r\n            <GradientStop Color=\"{StaticResource ExpanderOver3}\" Offset=\"1\"/>\r\n        </LinearGradientBrush>\r\n        <LinearGradientBrush x:Key=\"ExpanderArrowHoverFill3\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n            <GradientStop Color=\"#B9FFFFFF\" Offset=\"0\"/>\r\n            <GradientStop Color=\"#33FFFFFF\" Offset=\"0.51\"/>\r\n            <GradientStop Color=\"#00FFFFFF\" Offset=\"0.52\"/>\r\n        </LinearGradientBrush>\r\n        <LinearGradientBrush x:Key=\"ExpanderArrowPressedFill1\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n            <GradientStop Color=\"{StaticResource ItemOver2}\" Offset=\"0\"/>\r\n            <GradientStop Color=\"{StaticResource ExpanderPress1}\" Offset=\"0.52\"/>\r\n            <GradientStop Color=\"{StaticResource CheckInnerOver}\" Offset=\"0.521\"/>\r\n            <GradientStop Color=\"{StaticResource TreeviewArrowOver}\" Offset=\"1\"/>\r\n        </LinearGradientBrush>\r\n        <LinearGradientBrush x:Key=\"ExpanderArrowPressedFill2\" EndPoint=\"1,0\" StartPoint=\"0,0\">\r\n            <GradientStop Color=\"{StaticResource ExpanderPress2}\" Offset=\"0\"/>\r\n            <GradientStop Color=\"{StaticResource ExpanderMid}\" Offset=\"0.5\"/>\r\n            <GradientStop Color=\"{StaticResource ExpanderPress2}\" Offset=\"1\"/>\r\n        </LinearGradientBrush>\r\n        <LinearGradientBrush x:Key=\"ExpanderArrowPressedFill3\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n            <GradientStop Color=\"#A5FFFFFF\" Offset=\"0\"/>\r\n            <GradientStop Color=\"#26FFFFFF\" Offset=\"0.506\"/>\r\n            <GradientStop Color=\"#00FFFFFF\" Offset=\"0.521\"/>\r\n        </LinearGradientBrush>\r\n\r\n        <!-- Tab specific resources -->\r\n        <SolidColorBrush x:Key=\"TabOverStroke\" Color=\"{StaticResource TabStroke}\"/>\r\n\r\n        <!-- Tab vertical (btn over vertical) -->\r\n        <LinearGradientBrush x:Key=\"VTabOverGradient\" EndPoint=\"1,0.5\" StartPoint=\"0,0.5\">\r\n            <GradientStop Color=\"{StaticResource Over1}\" Offset=\"0.5\"/>\r\n            <GradientStop Color=\"{StaticResource Over2}\" Offset=\"0.509\"/>\r\n            <GradientStop Color=\"{StaticResource Over3}\" Offset=\"1\"/>\r\n        </LinearGradientBrush>\r\n\r\n        <!-- Scrollbar specific resources -->\r\n        <SolidColorBrush x:Key=\"ScrollbarBkgNormStroke\" Color=\"#FFA4A4A4\"/>\r\n\r\n        <LinearGradientBrush x:Key=\"HScrollbarBkgNormFill\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n            <GradientStop Color=\"#FFEFEFF0\" Offset=\"0.5\"/>\r\n            <GradientStop Color=\"#FFD5D6D8\" Offset=\"0.513\"/>\r\n        </LinearGradientBrush>\r\n        <LinearGradientBrush x:Key=\"HScrollbarBkgOverFill\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n            <GradientStop Color=\"{StaticResource Over1}\" Offset=\"0.5\"/>\r\n            <GradientStop Color=\"{StaticResource Over2}\" Offset=\"0.513\"/>\r\n        </LinearGradientBrush>\r\n        <LinearGradientBrush x:Key=\"HScrollbarBkgPressFill\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n            <GradientStop Color=\"{StaticResource Press2}\" Offset=\"0.5\"/>\r\n            <GradientStop Color=\"{StaticResource ThumbPress1}\" Offset=\"0.513\"/>\r\n        </LinearGradientBrush>\r\n        <LinearGradientBrush x:Key=\"VScrollbarBkgNormFill\" EndPoint=\"1,0.5\" StartPoint=\"0,0.5\">\r\n            <GradientStop Color=\"#FFEFEFF0\" Offset=\"0.5\"/>\r\n            <GradientStop Color=\"#FFD5D6D8\" Offset=\"0.513\"/>\r\n        </LinearGradientBrush>\r\n        <LinearGradientBrush x:Key=\"VScrollbarBkgOverFill\" EndPoint=\"1,0.5\" StartPoint=\"0,0.5\">\r\n            <GradientStop Color=\"{StaticResource Over1}\" Offset=\"0.5\"/>\r\n            <GradientStop Color=\"{StaticResource Over2}\" Offset=\"0.513\"/>\r\n        </LinearGradientBrush>\r\n        <LinearGradientBrush x:Key=\"VScrollbarBkgPressFill\" EndPoint=\"1,0.5\" StartPoint=\"0,0.5\">\r\n            <GradientStop Color=\"{StaticResource Press2}\" Offset=\"0.5\"/>\r\n            <GradientStop Color=\"{StaticResource ThumbPress1}\" Offset=\"0.513\"/>\r\n        </LinearGradientBrush>\r\n\r\n        <LinearGradientBrush x:Key=\"HThumbDivetNormFill\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0.1\">\r\n            <GradientStop Color=\"#FF979797\" Offset=\"0\"/>\r\n            <GradientStop Color=\"#19979797\" Offset=\"1\"/>\r\n        </LinearGradientBrush>\r\n        <LinearGradientBrush x:Key=\"HThumbDivetNormStroke\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0.1\">\r\n            <GradientStop Color=\"#B2000000\" Offset=\"0\"/>\r\n            <GradientStop Color=\"#33000000\" Offset=\"1\"/>\r\n        </LinearGradientBrush>\r\n        <LinearGradientBrush x:Key=\"HThumbDivetOverFill\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0.1\">\r\n            <GradientStop Color=\"{StaticResource Press3}\" Offset=\"0\"/>\r\n            <GradientStop Color=\"{StaticResource ThumbDivetFill1}\" Offset=\"1\"/>\r\n        </LinearGradientBrush>\r\n        <LinearGradientBrush x:Key=\"HThumbDivetOverStroke\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0.1\">\r\n            <GradientStop Color=\"{StaticResource ThumbDivetOver}\" Offset=\"0\"/>\r\n            <GradientStop Color=\"{StaticResource ThumbDivetFill2}\" Offset=\"1\"/>\r\n        </LinearGradientBrush>\r\n        <LinearGradientBrush x:Key=\"HThumbDivetPressFill\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0.1\">\r\n            <GradientStop Color=\"{StaticResource RadioIconPress2}\" Offset=\"0\"/>\r\n            <GradientStop Color=\"{StaticResource ThumbDivetFill1}\" Offset=\"1\"/>\r\n        </LinearGradientBrush>\r\n        <LinearGradientBrush x:Key=\"HThumbDivetPressStroke\" EndPoint=\"0.5,1\" StartPoint=\"0.5,0.1\">\r\n            <GradientStop Color=\"{StaticResource PressStroke1}\" Offset=\"0\"/>\r\n            <GradientStop Color=\"{StaticResource ThumbDivetFill2}\" Offset=\"1\"/>\r\n        </LinearGradientBrush>\r\n        <LinearGradientBrush x:Key=\"VThumbDivetNormFill\" EndPoint=\"1,0.5\" StartPoint=\"0.1,0.5\">\r\n            <GradientStop Color=\"#FF979797\" Offset=\"0\"/>\r\n            <GradientStop Color=\"#19979797\" Offset=\"1\"/>\r\n        </LinearGradientBrush>\r\n        <LinearGradientBrush x:Key=\"VThumbDivetNormStroke\" EndPoint=\"1,0.5\" StartPoint=\"0.1,0.5\">\r\n            <GradientStop Color=\"#B2000000\" Offset=\"0\"/>\r\n            <GradientStop Color=\"#33000000\" Offset=\"1\"/>\r\n        </LinearGradientBrush>\r\n        <LinearGradientBrush x:Key=\"VThumbDivetOverFill\" EndPoint=\"1,0.5\" StartPoint=\"0.1,0.5\">\r\n            <GradientStop Color=\"{StaticResource Press3}\" Offset=\"0\"/>\r\n            <GradientStop Color=\"{StaticResource ThumbDivetFill1}\" Offset=\"1\"/>\r\n        </LinearGradientBrush>\r\n        <LinearGradientBrush x:Key=\"VThumbDivetOverStroke\" EndPoint=\"1,0.5\" StartPoint=\"0.1,0.5\">\r\n            <GradientStop Color=\"{StaticResource ThumbDivetOver}\" Offset=\"0\"/>\r\n            <GradientStop Color=\"{StaticResource ThumbDivetFill2}\" Offset=\"1\"/>\r\n        </LinearGradientBrush>\r\n        <LinearGradientBrush x:Key=\"VThumbDivetPressFill\" EndPoint=\"1,0.5\" StartPoint=\"0.1,0.5\">\r\n            <GradientStop Color=\"{StaticResource RadioIconPress2}\" Offset=\"0\"/>\r\n            <GradientStop Color=\"{StaticResource ThumbDivetFill1}\" Offset=\"1\"/>\r\n        </LinearGradientBrush>\r\n        <LinearGradientBrush x:Key=\"VThumbDivetPressStroke\" EndPoint=\"1,0.5\" StartPoint=\"0.1,0.5\">\r\n            <GradientStop Color=\"{StaticResource PressStroke1}\" Offset=\"0\"/>\r\n            <GradientStop Color=\"{StaticResource ThumbDivetFill2}\" Offset=\"1\"/>\r\n        </LinearGradientBrush>\r\n        <!-- End Static Resources -->\r\n\r\n\r\n        <Color x:Key=\"BlackColor\">#FF000000</Color>\r\n        <Color x:Key=\"WhiteColor\">#FFFFFFFF</Color>\r\n\r\n\r\n        <SolidColorBrush x:Key=\"DisabledForegroundBrush\" Color=\"#888\"/>\r\n\r\n\r\n        <SolidColorBrush x:Key=\"WindowBackgroundBrush\" Color=\"#FFF\"/>\r\n\r\n\r\n        <Style x:Key=\"NuclearButtonFocusVisual\">\r\n            <Setter Property=\"Control.Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate>\r\n                        <Border>\r\n                            <Rectangle Margin=\"2\" Stroke=\"#60000000\" StrokeThickness=\"1\" StrokeDashArray=\"1 2\"/>\r\n                        </Border>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <Style TargetType=\"{x:Type Button}\" BasedOn=\"{x:Null}\">\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource ButtonFontColor}\"/>\r\n            <Setter Property=\"Padding\" Value=\"3\"/>\r\n            <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource NuclearButtonFocusVisual}\"/>\r\n<Setter Property=\"Template\" Value=\"{DynamicResource ButtonTemplate}\" />\r\n        </Style>\r\n    \r\n    <ControlTemplate x:Key=\"ButtonTemplate\" TargetType=\"{x:Type Button}\">\r\n                        <ControlTemplate.Resources>\r\n                            <Storyboard x:Key=\"HoverOn\">\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundOver\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundOver_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0.65\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"HoverOff\">\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundOver_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"PressedOn\">\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\" To=\"0.84\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgoundPressed_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0.65\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"PressedOff\">\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgoundPressed_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"FocusedOn\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"FocusedOff\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                        </ControlTemplate.Resources>\r\n                        <Grid x:Name=\"Grid\">\r\n                            <Border x:Name=\"BackgroundNorm\" Background=\"{StaticResource grayGradient}\" BorderThickness=\"1\" BorderBrush=\"#FF8E8F8F\" CornerRadius=\"3\"/>\r\n                            <Border x:Name=\"BackgroundNorm_highlight\" Margin=\"1\" BorderBrush=\"#F2FFFFFF\" BorderThickness=\"1,0,1,1\" CornerRadius=\"3\" Opacity=\"0.65\"/>\r\n                            <Border x:Name=\"BackgroundOver\" Background=\"{StaticResource BtnOverFill}\" BorderBrush=\"{StaticResource TextBoxPressBrush}\" BorderThickness=\"1\" CornerRadius=\"3\" Opacity=\"0\"/>\r\n                            <Border x:Name=\"BackgroundOver_Highlight\" Margin=\"1\" Background=\"{StaticResource btnOverFillHighlight}\" BorderBrush=\"{StaticResource hoverStroke}\" BorderThickness=\"1,0,1,1\" CornerRadius=\"3\" Opacity=\"0\"/>\r\n                            <Border x:Name=\"BackgroundPressed\" Background=\"{StaticResource BtnPressFill}\" BorderBrush=\"{StaticResource btnPressBorder}\" BorderThickness=\"1\" CornerRadius=\"3\" Opacity=\"0\"/>\r\n                            <Border x:Name=\"BackgoundPressed_Highlight\" Background=\"{StaticResource btnPressFillHighlight}\" Margin=\"1\" CornerRadius=\"2.5\" Opacity=\"0\"/>\r\n                            <Border x:Name=\"Background_overlay\" Margin=\"1,1,1,0\" BorderThickness=\"1\" CornerRadius=\"3,3,0,0\">\r\n                                <Border.Background>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                        <GradientStop Color=\"#00FFFFFF\" Offset=\"0\"/>\r\n                                        <GradientStop Color=\"#72FFFFFF\" Offset=\"0.157\"/>\r\n                                        <GradientStop Color=\"#72FFFFFF\" Offset=\"0.5\"/>\r\n                                        <GradientStop Color=\"#00FFFFFF\" Offset=\"0.51\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Border.Background>\r\n                            </Border>\r\n                            <Border x:Name=\"DisabledVisualElement\" Background=\"#FFF1F1F1\" BorderBrush=\"#FFB2B2B2\" BorderThickness=\"1\" CornerRadius=\"3\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\"/>\r\n                            <ContentPresenter\r\n                        \t\tx:Name=\"contentPresenter\"\r\n                        \t\tContent=\"{TemplateBinding Content}\"\r\n                        \t\tContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n                        \t\tVerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                        \t\tHorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                        \t\tMargin=\"{TemplateBinding Padding}\"/>\r\n                            <TextBlock Panel.ZIndex=\"1\"\r\n                        \t\tx:Name=\"DisabledOverlay\"\r\n                        \t\tText=\"{TemplateBinding Content}\"\r\n                        \t\tForeground=\"#FF969696\"\r\n                        \t\tHorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                        \t\tVerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n                        \t\tMargin=\"{TemplateBinding Padding}\"\r\n                        \t\tVisibility=\"Collapsed\"/>\r\n                            <Border x:Name=\"FocusVisualElement\" Margin=\"1\" BorderBrush=\"{StaticResource btnFocus}\" BorderThickness=\"1\" CornerRadius=\"2\" IsHitTestVisible=\"false\" Opacity=\"0\"/>\r\n                            <Border x:Name=\"DefaultBorder\" Margin=\"1\" BorderBrush=\"{StaticResource btnFocus}\" BorderThickness=\"1\" CornerRadius=\"2\" IsHitTestVisible=\"false\" Opacity=\"0\"/>\r\n                        </Grid>\r\n\r\n                        <ControlTemplate.Triggers>\r\n                            <Trigger Property=\"IsDefault\" Value=\"True\">\r\n                                <Setter Property=\"Opacity\" TargetName=\"DefaultBorder\" Value=\"1\"/>\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard x:Name=\"FocusedOff_BeginStoryboard\" Storyboard=\"{StaticResource FocusedOff}\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard x:Name=\"FocusedOn_BeginStoryboard\" Storyboard=\"{StaticResource FocusedOn}\"/>\r\n                                </Trigger.EnterActions>\r\n\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                                </Trigger.EnterActions>\r\n\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" />\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\"/>\r\n                                </Trigger.EnterActions>\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsEnabled\" Value=\"true\"/>\r\n                            <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                                <Setter Property=\"Visibility\" TargetName=\"DisabledVisualElement\" Value=\"Visible\"/>\r\n                                <Setter Property=\"Visibility\" TargetName=\"DisabledOverlay\" Value=\"Visible\"/>\r\n                                <Setter Property=\"Visibility\" TargetName=\"contentPresenter\" Value=\"Collapsed\"/>\r\n                            </Trigger>\r\n                        </ControlTemplate.Triggers>\r\n                    </ControlTemplate>\r\n\r\n        <Style x:Key=\"RadioButtonFocusVisual\">\r\n            <Setter Property=\"Control.Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate>\r\n                        <Border>\r\n                            <Rectangle Margin=\"15,0,0,0\" Stroke=\"#60000000\" StrokeThickness=\"1\" StrokeDashArray=\"1 2\"/>\r\n                        </Border>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <Style x:Key=\"CheckBoxFocusVisual\">\r\n            <Setter Property=\"Control.Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate>\r\n                        <Border>\r\n                            <Rectangle Margin=\"15,0,0,0\" Stroke=\"#60000000\" StrokeThickness=\"1\" StrokeDashArray=\"1 2\"/>\r\n                        </Border>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <Style TargetType=\"{x:Type CheckBox}\">\r\n            <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n            <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource CheckBoxFocusVisual}\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource OutsideFontColor}\"/>\r\n            <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n            <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n            <Setter Property=\"Padding\" Value=\"4,1,0,0\"/>\r\n\r\n<Setter Property=\"Template\" Value=\"{DynamicResource CheckBoxTemplate}\" />\r\n        </Style>\r\n    \r\n    <ControlTemplate x:Key=\"CheckBoxTemplate\" TargetType=\"{x:Type CheckBox}\">\r\n                        <ControlTemplate.Resources>\r\n                            <Storyboard x:Key=\"HoverOn\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Background_Over\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BoxOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"HoverOff\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Background_Over\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BoxOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"PressedOn\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BoxPress\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Background_Press\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"PressedOff\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"Background_Press\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BoxPress\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"CheckedOn\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.9\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"CheckedOff\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"IndeterminateOn\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"IndeterminateIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.9\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"IndeterminateOff\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"IndeterminateIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"FocusedOn\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusedVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"FocusedOff\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusedVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                        </ControlTemplate.Resources>\r\n                        <BulletDecorator Background=\"Transparent\">\r\n                            <BulletDecorator.Bullet>\r\n                                <Grid>\r\n                                    <Rectangle x:Name=\"Background\" Margin=\"1\" Width=\"13\" Height=\"13\" Fill=\"#FFF4F4F4\" Stroke=\"#FF868686\" StrokeThickness=\"1\" />\r\n                                    <Rectangle x:Name=\"Background_Over\" Width=\"13\" Height=\"13\" Fill=\"{StaticResource checkOverFill}\" Stroke=\"{StaticResource checkOverStroke}\" StrokeThickness=\"1\" Opacity=\"0\"/>\r\n                                    <Rectangle x:Name=\"Background_Press\" Width=\"13\" Height=\"13\" Fill=\"{StaticResource checkPressFill}\" Stroke=\"{StaticResource btnPressStroke2}\" StrokeThickness=\"1\" Opacity=\"0\"/>\r\n                                    <Rectangle x:Name=\"BoxFill\" Width=\"9\" Height=\"9\" Fill=\"#FFCACFD5\" StrokeThickness=\"1\">\r\n                                        <Rectangle.Stroke>\r\n                                            <LinearGradientBrush EndPoint=\"0.8,0.8\" StartPoint=\"0.3,0.3\">\r\n                                                <GradientStop Color=\"#FFB3B8BD\"/>\r\n                                                <GradientStop Color=\"#FFE0E0E0\" Offset=\"1\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Rectangle.Stroke>\r\n                                    </Rectangle>\r\n                                    <Rectangle x:Name=\"BoxOver\" Margin=\"3\" Width=\"9\" Height=\"9\" Fill=\"{StaticResource checkInnerOverFill}\" Stroke=\"{StaticResource checkInnerOverStroke}\" StrokeThickness=\"1\" Opacity=\"0\"/>\r\n                                    <Rectangle x:Name=\"BoxPress\" Width=\"9\" Height=\"9\" Fill=\"{StaticResource checkInnerPressFill}\" Stroke=\"{StaticResource checkInnerPressStroke}\" StrokeThickness=\"1\" Opacity=\"0\" />\r\n                                    <Rectangle x:Name=\"BoxGradient\" Width=\"7\" Height=\"7\" StrokeThickness=\"1\">\r\n                                        <Rectangle.Fill>\r\n                                            <LinearGradientBrush StartPoint=\"0.238,0.228\" EndPoint=\"0.752,0.749\">\r\n                                                <GradientStop Color=\"#00F6F6F6\" Offset=\"0.254\" />\r\n                                                <GradientStop Color=\"#53F8F8F8\" Offset=\"0.54\"/>\r\n                                                <GradientStop Color=\"#BFFFFFFF\" Offset=\"0.996\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Rectangle.Fill>\r\n                                    </Rectangle>\r\n                                    <Rectangle x:Name=\"IndeterminateIcon\" Width=\"5\" Height=\"2\" Fill=\"{StaticResource checkIconStroke}\" Opacity=\"0\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"/>\r\n                                    <Path x:Name=\"CheckIcon\" Margin=\"0,3.333,3.833,0\" Width=\"7\" Height=\"9\" Fill=\"{StaticResource checkIconStroke}\" Stretch=\"Fill\" Opacity=\"0\" VerticalAlignment=\"Top\" HorizontalAlignment=\"Right\" Data=\"M103.78572,598.96112 L105.09846,597.5661 L107.00806,600.16229 C107.00806,600.16229 109.91004,592.74463 109.91004,592.74463 C109.91004,592.74463 111.74678,593.79761 111.74678,593.79761 C111.74678,593.79761 107.88566,602.75848 107.88566,602.75848 L106.60118,602.75848 z\"/>\r\n                                    <Rectangle x:Name=\"FocusedVisualElement\" Stroke=\"{StaticResource btnFocus}\" StrokeThickness=\"1\" Visibility=\"Visible\" Opacity=\"0\"/>\r\n                                    <Rectangle x:Name=\"DisabledVisualElement\" Margin=\"1\" Fill=\"#4CFFFFFF\" Visibility=\"Collapsed\"/>\r\n                                </Grid>\r\n                            </BulletDecorator.Bullet>\r\n                            <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" RecognizesAccessKey=\"True\"/>\r\n                        </BulletDecorator>\r\n\r\n                        <ControlTemplate.Triggers>\r\n                            <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                                <Trigger.ExitActions>\r\n\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\"/>\r\n\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\"/>\r\n\r\n                                </Trigger.EnterActions>\r\n                            </Trigger>\r\n                            <MultiTrigger>\r\n                                <MultiTrigger.Conditions>\r\n                                    <Condition Property=\"IsChecked\" Value=\"True\" />\r\n                                    <Condition Property=\"IsThreeState\" Value=\"True\" />\r\n                                </MultiTrigger.Conditions>\r\n                                <MultiTrigger.EnterActions>\r\n\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource CheckedOn}\" x:Name=\"CheckedOn_BeginStoryboard\"/>\r\n\r\n                                </MultiTrigger.EnterActions>\r\n                                <MultiTrigger.ExitActions>\r\n\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource CheckedOff}\" x:Name=\"CheckedOff_BeginStoryboard\"/>\r\n\r\n                                </MultiTrigger.ExitActions>\r\n                            </MultiTrigger>\r\n                            <MultiTrigger>\r\n                                <MultiTrigger.Conditions>\r\n                                    <Condition Property=\"IsChecked\" Value=\"{x:Null}\" />\r\n                                    <Condition Property=\"IsThreeState\" Value=\"True\" />\r\n                                </MultiTrigger.Conditions>\r\n                                <MultiTrigger.EnterActions>\r\n\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource IndeterminateOn}\" x:Name=\"IndeterminateOn_BeginStoryboard\"/>\r\n\r\n                                </MultiTrigger.EnterActions>\r\n                                <MultiTrigger.ExitActions>\r\n\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource IndeterminateOff}\" x:Name=\"IndeterminateOff_BeginStoryboard\"/>\r\n\r\n                                </MultiTrigger.ExitActions>\r\n                                <Setter Property=\"Opacity\" TargetName=\"CheckIcon\" Value=\"0\"/>\r\n                                <Setter Property=\"Visibility\" TargetName=\"CheckIcon\" Value=\"Collapsed\"/>\r\n                            </MultiTrigger>\r\n                            <Trigger Property=\"IsChecked\" Value=\"True\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource CheckedOff}\" x:Name=\"CheckedOn_BeginStoryboard1\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource CheckedOn}\" x:Name=\"CheckedOff_BeginStoryboard1\"/>\r\n                                </Trigger.EnterActions>\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                                </Trigger.EnterActions>\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\"/>\r\n                                </Trigger.EnterActions>\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n\r\n                                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                                <Setter Property=\"Visibility\" TargetName=\"DisabledVisualElement\" Value=\"Visible\"/>\r\n                            </Trigger>\r\n                        </ControlTemplate.Triggers>\r\n\r\n                    </ControlTemplate>\r\n\r\n        <Style TargetType=\"{x:Type RadioButton}\">\r\n            <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n            <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource RadioButtonFocusVisual}\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource OutsideFontColor}\"/>\r\n            <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n            <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n            <Setter Property=\"Padding\" Value=\"4,1,0,0\"/>\r\n<Setter Property=\"Template\" Value=\"{DynamicResource RadioButtonTemplate}\" />\r\n        </Style>\r\n    \r\n    <ControlTemplate x:Key=\"RadioButtonTemplate\" TargetType=\"{x:Type RadioButton}\">\r\n                        <ControlTemplate.Resources>\r\n                            <Storyboard x:Key=\"HoverOn\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CircleOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"HoverOff\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"BackgroundOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CircleOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"PressedOn\">\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundPress\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"CircleFillPress\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"CircleIconPress\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"PressedOff\">\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundPress\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"CircleFillPress\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"CircleIconPress\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"CheckedOn\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CircleIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckIconOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CircleIconPress\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n\r\n\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"CheckedOff\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CircleIcon\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CheckIconOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"CircleIconPress\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n\r\n\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"FocusedOn\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusedVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"FocusedOff\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusedVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                        </ControlTemplate.Resources>\r\n                        <BulletDecorator Background=\"Transparent\">\r\n                            <BulletDecorator.Bullet>\r\n                                <Grid>\r\n                                    <Ellipse x:Name=\"Background\" Width=\"14\" Height=\"14\" Fill=\"#FFF4F4F4\" Stroke=\"#FF6F6F6F\" StrokeThickness=\"1\"/>\r\n                                    <Ellipse x:Name=\"BackgroundOver\" Width=\"14\" Height=\"14\" Fill=\"{StaticResource checkOverFill}\" Stroke=\"{StaticResource checkOverStroke}\" StrokeThickness=\"1\" Opacity=\"0\"/>\r\n                                    <Ellipse x:Name=\"BackgroundPress\" Width=\"14\" Height=\"14\" Fill=\"{StaticResource checkPressFill}\" Stroke=\"{StaticResource btnPressStroke2}\" StrokeThickness=\"1\" Opacity=\"0\"/>\r\n                                    <Ellipse x:Name=\"CircleFill\" Margin=\"2\" Fill=\"#FFCACFD5\" StrokeThickness=\"1\">\r\n                                        <Ellipse.Stroke>\r\n                                            <LinearGradientBrush EndPoint=\"0.8,0.8\" StartPoint=\"0.3,0.3\">\r\n                                                <GradientStop Color=\"#FFB3B8BD\" Offset=\"0\"/>\r\n                                                <GradientStop Color=\"#FFE0E0E0\" Offset=\"1\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Ellipse.Stroke>\r\n                                    </Ellipse>\r\n                                    <Ellipse x:Name=\"CircleOver\" Margin=\"2\" Fill=\"{StaticResource checkInnerOverFill}\" Stroke=\"{StaticResource checkInnerOverStroke}\" StrokeThickness=\"1\" Opacity=\"0\"/>\r\n                                    <Ellipse x:Name=\"CircleFillPress\" Margin=\"2\" Fill=\"{StaticResource checkInnerPressFill}\" Stroke=\"{StaticResource checkInnerPressStroke}\" StrokeThickness=\"1\" Opacity=\"0\" Visibility=\"Visible\"/>\r\n                                    <Ellipse x:Name=\"CircleGradient\" Margin=\"3\" StrokeThickness=\"1\">\r\n                                        <Ellipse.Fill>\r\n                                            <LinearGradientBrush EndPoint=\"0.8,0.8\" StartPoint=\"0.3,0.3\">\r\n                                                <GradientStop Color=\"#00F6F6F6\" Offset=\"0\"/>\r\n                                                <GradientStop Color=\"#53F8F8F8\" Offset=\"0.3\"/>\r\n                                                <GradientStop Color=\"#BFFFFFFF\" Offset=\"1\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Ellipse.Fill>\r\n                                    </Ellipse>\r\n                                    <Ellipse x:Name=\"CircleIcon\" Margin=\"3\" Fill=\"{StaticResource radioIconFill}\" Stroke=\"{StaticResource radioIconStroke}\" StrokeThickness=\"1.25\" Opacity=\"0\"/>\r\n                                    <Ellipse x:Name=\"CheckIconOver\" Margin=\"3\" Fill=\"{StaticResource radioIconFillOver}\" Stroke=\"{StaticResource radioIconStroke}\" StrokeThickness=\"1.25\" Opacity=\"0\"/>\r\n                                    <Ellipse x:Name=\"CircleIconPress\" Margin=\"3\" Fill=\"{StaticResource radioIconFillPress}\" Stroke=\"{StaticResource radioIconStroke}\" StrokeThickness=\"1.25\" Opacity=\"0\"/>\r\n                                    <Ellipse x:Name=\"DisabledVisualElement\" Width=\"14\" Height=\"14\" Fill=\"#FFFFFFFF\" Stroke=\"#FFFFFFFF\" Opacity=\"0.35\" Visibility=\"Collapsed\"/>\r\n                                    <Ellipse x:Name=\"FocusedVisualElement\" Margin=\"-1\" Width=\"16\" Height=\"16\" Stroke=\"{StaticResource btnFocus}\" StrokeThickness=\"1\" IsHitTestVisible=\"false\" Opacity=\"0\" />\r\n                                </Grid>\r\n                            </BulletDecorator.Bullet>\r\n                            <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"{TemplateBinding Padding}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" RecognizesAccessKey=\"True\"/>\r\n                        </BulletDecorator>\r\n\r\n                        <ControlTemplate.Triggers>\r\n                            <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\"/>\r\n                                </Trigger.EnterActions>\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsChecked\" Value=\"false\">\r\n\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard x:Name=\"CheckedOn_BeginStoryboard\" Storyboard=\"{StaticResource CheckedOn}\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard x:Name=\"CheckedOff_BeginStoryboard\" Storyboard=\"{StaticResource CheckedOff}\"/>\r\n                                </Trigger.EnterActions>\r\n\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                                </Trigger.EnterActions>\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\"/>\r\n                                </Trigger.EnterActions>\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n\r\n                                <Setter Property=\"Foreground\" Value=\"#80000000\"/>\r\n                                <Setter Property=\"Visibility\" TargetName=\"DisabledVisualElement\" Value=\"Visible\"/>\r\n                            </Trigger>\r\n\r\n                        </ControlTemplate.Triggers>\r\n                    </ControlTemplate>\r\n\r\n        <Style x:Key=\"NuclearRepeatButton\" d:IsControlPart=\"True\" TargetType=\"{x:Type RepeatButton}\" BasedOn=\"{x:Null}\">\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n                        <ControlTemplate.Resources>\r\n                            <Storyboard x:Key=\"HoverOn\">\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundOver\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"HoverOff\">\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"PressedOn\">\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\" To=\"1\" />\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"PressedOff\">\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\" To=\"0\" />\r\n                            </Storyboard>\r\n                        </ControlTemplate.Resources>\r\n                        <Grid>\r\n                            <Rectangle x:Name=\"Background\" Fill=\"{StaticResource VScrollbarBkgNormFill}\" Stroke=\"{StaticResource ScrollbarBkgNormStroke}\" StrokeThickness=\"1\" RadiusX=\"0.5\" RadiusY=\"0.5\" Opacity=\"0\" />\r\n                            <Rectangle x:Name=\"BackgroundOver\" Fill=\"{StaticResource VScrollbarBkgOverFill}\" Stroke=\"{StaticResource TextBoxPressBrush}\" StrokeThickness=\"1\" RadiusX=\"0.5\" RadiusY=\"0.5\" Opacity=\"0\"/>\r\n                            <Rectangle x:Name=\"BackgroundPressed\" Fill=\"{StaticResource VScrollbarBkgPressFill}\" Stroke=\"{StaticResource btnPressStroke2}\" StrokeThickness=\"1\" RadiusX=\"0.5\" RadiusY=\"0.5\" Opacity=\"0\"/>\r\n                            <Rectangle x:Name=\"Highlight\" Margin=\"1\" Stroke=\"#99FFFFFF\" StrokeThickness=\"1\" RadiusX=\"0.5\" RadiusY=\"0.5\" Opacity=\"0\" IsHitTestVisible=\"false\"/>\r\n                            <Rectangle x:Name=\"DisabledElement\" Fill=\"#FFFFFFFF\" Opacity=\"0\"/>\r\n                            <ContentPresenter HorizontalAlignment=\"Center\" x:Name=\"ContentPresenter\" VerticalAlignment=\"Center\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" ContentTemplateSelector=\"{TemplateBinding ContentTemplateSelector}\"/>\r\n                        </Grid>\r\n                        <ControlTemplate.Triggers>\r\n                            <Trigger Property=\"IsKeyboardFocused\" Value=\"true\"/>\r\n                            <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                                </Trigger.EnterActions>\r\n\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                                </Trigger.EnterActions>\r\n\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n\r\n                                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                                <Setter Property=\"Opacity\" TargetName=\"DisabledElement\" Value=\"0.7\"/>\r\n                            </Trigger>\r\n                        </ControlTemplate.Triggers>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <Style x:Key=\"NuclearThumbStyle\" d:IsControlPart=\"True\" TargetType=\"{x:Type Thumb}\" BasedOn=\"{x:Null}\">\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                        <ControlTemplate.Resources>\r\n                            <Storyboard x:Key=\"HoverOn\">\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundOver\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BorderOver\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BorderOver1\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BorderOver2\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"HoverOff\">\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BorderOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BorderOver1\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BorderOver2\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"PressedOn\">\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BorderPress\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BorderPress1\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BorderPress2\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"PressedOff\">\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BorderPress\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BorderPress1\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BorderPress2\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                            </Storyboard>\r\n                        </ControlTemplate.Resources>\r\n                        <Grid Margin=\"0,0,0,0\" x:Name=\"Grid\">\r\n                            <Rectangle x:Name=\"Background\" Fill=\"{StaticResource VScrollbarBkgNormFill}\" Stroke=\"{StaticResource ScrollbarBkgNormStroke}\" RadiusX=\"1.5\" RadiusY=\"1.5\"/>\r\n                            <Rectangle x:Name=\"BackgroundOver\" Fill=\"{StaticResource VScrollbarBkgOverFill}\" Stroke=\"{StaticResource TextBoxPressBrush}\" RadiusX=\"1.5\" RadiusY=\"1.5\" Opacity=\"0\"/>\r\n                            <Rectangle x:Name=\"BackgroundPressed\" Fill=\"{StaticResource VScrollbarBkgPressFill}\" Stroke=\"{StaticResource btnPressStroke2}\" RadiusX=\"1.5\" RadiusY=\"1.5\" Opacity=\"0\"/>\r\n                            <Rectangle x:Name=\"BorderHighlight\" Width=\"11\" Height=\"10\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\">\r\n                                <Rectangle.Stroke>\r\n                                    <LinearGradientBrush EndPoint=\"1,0.5\" StartPoint=\"0,0.5\">\r\n                                        <GradientStop Color=\"#00FFFFFF\" Offset=\"0\"/>\r\n                                        <GradientStop Color=\"#59FFFFFF\" Offset=\"1\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Stroke>\r\n                            </Rectangle>\r\n                            <Border Margin=\"0,0,0,6\" Width=\"9\" Height=\"2\" Background=\"{StaticResource VThumbDivetNormFill}\" BorderBrush=\"{StaticResource VThumbDivetNormStroke}\" BorderThickness=\"1,1,0,0\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"/>\r\n                            <Border Width=\"9\" Height=\"2\" Background=\"{StaticResource VThumbDivetNormFill}\" BorderBrush=\"{StaticResource VThumbDivetNormStroke}\" BorderThickness=\"1,1,0,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\"/>\r\n                            <Border Margin=\"0,0,0,-6\" Width=\"9\" Height=\"2\" Background=\"{StaticResource VThumbDivetNormFill}\" BorderBrush=\"{StaticResource VThumbDivetNormStroke}\" BorderThickness=\"1,1,0,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\"/>\r\n                            <Border x:Name=\"BorderOver\" Margin=\"0,0,0,6\" Width=\"9\" Height=\"2\" Background=\"{StaticResource VThumbDivetOverFill}\" BorderBrush=\"{StaticResource VThumbDivetOverStroke}\" BorderThickness=\"1,1,0,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Opacity=\"0\"/>\r\n                            <Border x:Name=\"BorderOver1\" Width=\"9\" Height=\"2\" Background=\"{StaticResource VThumbDivetOverFill}\" BorderBrush=\"{StaticResource VThumbDivetOverStroke}\" BorderThickness=\"1,1,0,0\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Opacity=\"0\"/>\r\n                            <Border x:Name=\"BorderOver2\" Margin=\"0,0,0,-6\" Width=\"9\" Height=\"2\" Background=\"{StaticResource VThumbDivetOverFill}\" BorderBrush=\"{StaticResource VThumbDivetOverStroke}\" BorderThickness=\"1,1,0,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Opacity=\"0\"/>\r\n                            <Border x:Name=\"BorderPress\" Margin=\"0,0,0,6\" Width=\"9\" Height=\"2\" Background=\"{StaticResource VThumbDivetPressFill}\" BorderBrush=\"{StaticResource VThumbDivetPressStroke}\" BorderThickness=\"1,1,0,0\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Opacity=\"0\"/>\r\n                            <Border x:Name=\"BorderPress1\" Width=\"9\" Height=\"2\" Background=\"{StaticResource VThumbDivetPressFill}\" BorderBrush=\"{StaticResource VThumbDivetPressStroke}\" BorderThickness=\"1,1,0,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Opacity=\"0\"/>\r\n                            <Border x:Name=\"BorderPress2\" Margin=\"0,0,0,-6\" Width=\"9\" Height=\"2\" Background=\"{StaticResource VThumbDivetPressFill}\" BorderBrush=\"{StaticResource VThumbDivetPressStroke}\" BorderThickness=\"1,1,0,0\" VerticalAlignment=\"Center\" HorizontalAlignment=\"Center\" Opacity=\"0\"/>\r\n                            <Rectangle x:Name=\"Highlight\" Margin=\"1\" Stroke=\"#FFFFFFFF\" RadiusX=\"0.5\" RadiusY=\"0.5\" Opacity=\"0.6\" IsHitTestVisible=\"false\" />\r\n                        </Grid>\r\n                        <ControlTemplate.Triggers>\r\n                            <Trigger Property=\"IsFocused\" Value=\"True\"/>\r\n                            <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                                </Trigger.EnterActions>\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                                <Setter Property=\"Opacity\" TargetName=\"Grid\" Value=\"0\"/>\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsDragging\" Value=\"True\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                                </Trigger.EnterActions>\r\n                            </Trigger>\r\n                        </ControlTemplate.Triggers>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <Style x:Key=\"NuclearScrollRepeatButtonStyle\" d:IsControlPart=\"True\" TargetType=\"{x:Type RepeatButton}\">\r\n            <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n            <Setter Property=\"BorderBrush\" Value=\"Transparent\"/>\r\n            <Setter Property=\"IsTabStop\" Value=\"false\"/>\r\n            <Setter Property=\"Focusable\" Value=\"false\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type RepeatButton}\">\r\n                        <Grid>\r\n                            <Rectangle Fill=\"{TemplateBinding Background}\" Stroke=\"{TemplateBinding BorderBrush}\" StrokeThickness=\"{TemplateBinding BorderThickness}\"/>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n\r\n        <Style TargetType=\"{x:Type ScrollBar}\">\r\n            <Setter Property=\"Stylus.IsFlicksEnabled\" Value=\"false\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type ScrollBar}\">\r\n                        <Grid x:Name=\"GridRoot\" Width=\"{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition MaxHeight=\"18\"/>\r\n                                <RowDefinition Height=\"0.00001*\"/>\r\n                                <RowDefinition MaxHeight=\"18\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <Rectangle Grid.RowSpan=\"5\" RadiusX=\"0\" RadiusY=\"0\" StrokeThickness=\"1\" Stroke=\"#FFF0F0F0\" Fill=\"#FFEFEFEF\"/>\r\n                            <RepeatButton x:Name=\"DecreaseRepeat\" Style=\"{DynamicResource NuclearRepeatButton}\" Command=\"ScrollBar.LineUpCommand\">\r\n                                <Grid>\r\n                                    <Path x:Name=\"ArrowUp\" Height=\"6\" Width=\"10\" Data=\"F1 M 541.537,173.589L 531.107,173.589L 536.322,167.49L 541.537,173.589 Z \" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Stretch=\"Uniform\" IsHitTestVisible=\"False\">\r\n                                        <Path.Fill>\r\n                                            <LinearGradientBrush EndPoint=\"0.7,0.75\" StartPoint=\"0.25,0\">\r\n                                                <GradientStop Color=\"#CC000000\" Offset=\"0.25\"/>\r\n                                                <GradientStop Color=\"#7F000000\" Offset=\"0.75\"/>\r\n                                                <GradientStop Color=\"#33000000\" Offset=\"1\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Path.Fill>\r\n                                    </Path>\r\n                                </Grid>\r\n                            </RepeatButton>\r\n\r\n                            <Track Grid.Row=\"1\" x:Name=\"PART_Track\" Orientation=\"Vertical\" IsDirectionReversed=\"true\">\r\n                                <Track.Thumb>\r\n                                    <Thumb Style=\"{DynamicResource NuclearThumbStyle}\"/>\r\n                                </Track.Thumb>\r\n                                <Track.IncreaseRepeatButton>\r\n                                    <RepeatButton x:Name=\"PageUp\" Style=\"{DynamicResource NuclearScrollRepeatButtonStyle}\" Command=\"ScrollBar.PageDownCommand\"/>\r\n                                </Track.IncreaseRepeatButton>\r\n                                <Track.DecreaseRepeatButton>\r\n                                    <RepeatButton x:Name=\"PageDown\" Style=\"{DynamicResource NuclearScrollRepeatButtonStyle}\" Command=\"ScrollBar.PageUpCommand\"/>\r\n                                </Track.DecreaseRepeatButton>\r\n                            </Track>\r\n\r\n                            <RepeatButton Grid.Row=\"2\" x:Name=\"IncreaseRepeat\" Style=\"{DynamicResource NuclearRepeatButton}\" Command=\"ScrollBar.LineDownCommand\">\r\n                                <Grid>\r\n                                    <Path x:Name=\"ArrowDown\" Grid.Row=\"4\" Height=\"6\" Width=\"10\" Data=\"F1 M 531.107,321.943L 541.537,321.943L 536.322,328.042L 531.107,321.943 Z \" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" Stretch=\"Uniform\" IsHitTestVisible=\"False\">\r\n                                        <Path.Fill>\r\n                                            <LinearGradientBrush EndPoint=\"0.4,1\" StartPoint=\"-0.3,0\">\r\n                                                <GradientStop Color=\"#CC000000\" Offset=\"0.25\"/>\r\n                                                <GradientStop Color=\"#7F000000\" Offset=\"0.75\"/>\r\n                                                <GradientStop Color=\"#33000000\" Offset=\"1\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Path.Fill>\r\n                                    </Path>\r\n                                </Grid>\r\n                            </RepeatButton>\r\n                        </Grid>\r\n\r\n                        <ControlTemplate.Triggers>\r\n                            <Trigger Property=\"Orientation\" Value=\"Horizontal\">\r\n\r\n                                <Setter Property=\"LayoutTransform\" TargetName=\"GridRoot\">\r\n                                    <Setter.Value>\r\n                                        <RotateTransform Angle=\"-90\"/>\r\n                                    </Setter.Value>\r\n                                </Setter>\r\n\r\n                                <Setter TargetName=\"PART_Track\" Property=\"Orientation\" Value=\"Vertical\"/>\r\n\r\n                                <Setter Property=\"Command\" Value=\"ScrollBar.LineLeftCommand\" TargetName=\"DecreaseRepeat\"/>\r\n                                <Setter Property=\"Command\" Value=\"ScrollBar.LineRightCommand\" TargetName=\"IncreaseRepeat\"/>\r\n                                <Setter Property=\"Command\" Value=\"ScrollBar.PageLeftCommand\" TargetName=\"PageDown\"/>\r\n                                <Setter Property=\"Command\" Value=\"ScrollBar.PageRightCommand\" TargetName=\"PageUp\"/>\r\n                            </Trigger>\r\n                        </ControlTemplate.Triggers>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <Style TargetType=\"{x:Type ScrollViewer}\" BasedOn=\"{x:Null}\">\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type ScrollViewer}\">\r\n                        <Grid Background=\"{TemplateBinding Background}\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"*\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n                            <ScrollContentPresenter Grid.Column=\"0\" Grid.Row=\"0\" Margin=\"{TemplateBinding Padding}\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" CanContentScroll=\"{TemplateBinding CanContentScroll}\"/>\r\n\r\n                            <ScrollBar Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Grid.Column=\"0\" Grid.Row=\"1\" x:Name=\"PART_HorizontalScrollBar\"   Orientation=\"Horizontal\" Value=\"{Binding Path=HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" ViewportSize=\"{TemplateBinding ViewportWidth}\" Minimum=\"0\" Maximum=\"{TemplateBinding ScrollableWidth}\" AutomationProperties.AutomationId=\"HorizontalScrollBar\"/>\r\n                            <ScrollBar Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Grid.Column=\"1\" Grid.Row=\"0\" x:Name=\"PART_VerticalScrollBar\"   Orientation=\"Vertical\" Value=\"{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" ViewportSize=\"{TemplateBinding ViewportHeight}\" Minimum=\"0\" Maximum=\"{TemplateBinding ScrollableHeight}\" AutomationProperties.AutomationId=\"VerticalScrollBar\"/>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <Style TargetType=\"{x:Type ListBox}\">\r\n            <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n            <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\"/>\r\n            <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\"/>\r\n            <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"True\"/>\r\n            <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n            <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n            <Setter Property=\"BorderBrush\" Value=\"{StaticResource btnPressStroke2}\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n            <Setter Property=\"Padding\" Value=\"1\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource OutsideFontColor}\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type ListBox}\">\r\n                        <Grid>\r\n                            <Border BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"#FFFFFFFF\" BorderBrush=\"{TemplateBinding BorderBrush}\" CornerRadius=\"2\">\r\n                                <ScrollViewer Margin=\"1\"   Focusable=\"false\" Background=\"{TemplateBinding Background}\">\r\n\r\n                                    <StackPanel Margin=\"2\" IsItemsHost=\"true\"/>\r\n\r\n                                </ScrollViewer>\r\n                            </Border>\r\n                        </Grid>\r\n                        <ControlTemplate.Triggers>\r\n                            <Trigger Property=\"IsEnabled\" Value=\"false\"/>\r\n                            <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                                <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\"/>\r\n                            </Trigger>\r\n                        </ControlTemplate.Triggers>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n\r\n        <Style d:IsControlPart=\"True\" TargetType=\"{x:Type ListBoxItem}\">\r\n            <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n            <Setter Property=\"OverridesDefaultStyle\" Value=\"true\"/>\r\n            <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n            <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n            <Setter Property=\"Padding\" Value=\"3\" />\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource OutsideFontColor}\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type ListBoxItem}\">\r\n                        <ControlTemplate.Resources>\r\n                            <Storyboard x:Key=\"HoverOn\">\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundGradientOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0.73\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"HoverOff\">\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundGradientOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"SelectedOn\">\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundGradientSelected\" Storyboard.TargetProperty=\"Opacity\" To=\"0.84\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundGradientSelectedDisabled\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"SelectedOff\">\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundGradientSelected\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundGradientSelectedDisabled\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                            </Storyboard>\r\n                        </ControlTemplate.Resources>\r\n                        <Grid SnapsToDevicePixels=\"true\">\r\n                            <Rectangle x:Name=\"BackgroundGradientOver\" Fill=\"{StaticResource hoverGradient}\" Stroke=\"{StaticResource hoverStroke}\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\"/>\r\n                            <Rectangle x:Name=\"BackgroundGradientSelectedDisabled\" Fill=\"{StaticResource grayGradient}\" Stroke=\"#7F8E8F8F\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\"/>\r\n                            <Rectangle x:Name=\"BackgroundGradientSelected\" Fill=\"{StaticResource BtnOverFill}\" Stroke=\"{StaticResource selectedStroke}\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\"/>\r\n                            <Rectangle x:Name=\"BackgroundHighlight\" Margin=\"1\" Stroke=\"#A0FFFFFF\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                            <ContentPresenter\r\n\t                        \tx:Name=\"contentPresenter\"\r\n\t                        \tContent=\"{TemplateBinding Content}\"\r\n\t                        \tContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n\t                        \tHorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n\t                        \tMargin=\"{TemplateBinding Padding}\"/>\r\n                        </Grid>\r\n                        <ControlTemplate.Triggers>\r\n\r\n                            <Trigger Property=\"IsSelected\" Value=\"true\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource SelectedOff}\" x:Name=\"SelectedOff_BeginStoryboard\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\" x:Name=\"SelectedOn_BeginStoryboard\"/>\r\n                                </Trigger.EnterActions>\r\n\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                                </Trigger.EnterActions>\r\n                            </Trigger>\r\n\r\n                            <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                                <Setter Property=\"Visibility\" TargetName=\"BackgroundGradientSelected\" Value=\"Hidden\"/>\r\n                            </Trigger>\r\n                        </ControlTemplate.Triggers>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <Style x:Key=\"ExpanderHeaderFocusVisual\">\r\n            <Setter Property=\"Control.Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate>\r\n                        <Border>\r\n                            <Rectangle SnapsToDevicePixels=\"true\" Margin=\"0\" Stroke=\"Black\" StrokeDashArray=\"1 2\" StrokeThickness=\"1\" />\r\n                        </Border>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <Style x:Key=\"ExpanderDownHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                        <ControlTemplate.Resources>\r\n                            <Storyboard x:Key=\"HoverOn\">\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"circleOver1\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"circleOver2\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"circleOver3\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"HoverBackground\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"HoverOff\">\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"circleOver1\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"circleOver2\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"circleOver3\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"HoverBackground\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"PressedOn\">\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"circlePress1\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"circlePress2\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"circlePress3\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"HoverBackground1\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"PressedOff\">\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"circlePress1\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"circlePress2\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"circlePress3\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"HoverBackground1\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"CheckedOn\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00.1000000\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrowDown\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"-1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00.1000000\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"HoverBackground2\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"-1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"CheckedOff\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00.4000000\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrowDown\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00.4000000\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"HoverBackground2\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"FocusedOn\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusBackground\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.84\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"FocusedOff\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusBackground\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                        </ControlTemplate.Resources>\r\n                        <Grid>\r\n                            <Rectangle x:Name=\"HoverBackground\" Fill=\"{StaticResource hoverGradient}\" Stroke=\"{StaticResource hoverStroke}\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                <Rectangle.RenderTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform/>\r\n                                        <SkewTransform/>\r\n                                        <RotateTransform/>\r\n                                        <TranslateTransform/>\r\n                                    </TransformGroup>\r\n                                </Rectangle.RenderTransform>\r\n                            </Rectangle>\r\n                            <Rectangle x:Name=\"HoverBackground1\" Fill=\"{StaticResource hoverGradient}\" Stroke=\"{StaticResource hoverStroke}\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                <Rectangle.RenderTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform/>\r\n                                        <SkewTransform/>\r\n                                        <RotateTransform/>\r\n                                        <TranslateTransform/>\r\n                                    </TransformGroup>\r\n                                </Rectangle.RenderTransform>\r\n                            </Rectangle>\r\n                            <Rectangle x:Name=\"HoverBackground2\" Fill=\"{StaticResource hoverGradient}\" Stroke=\"{StaticResource hoverStroke}\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                <Rectangle.RenderTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform/>\r\n                                        <SkewTransform/>\r\n                                        <RotateTransform/>\r\n                                        <TranslateTransform/>\r\n                                    </TransformGroup>\r\n                                </Rectangle.RenderTransform>\r\n                            </Rectangle>\r\n                            <Grid Margin=\"{TemplateBinding Padding}\">\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"18\"/>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <Grid Height=\"18\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\">\r\n                                    <Ellipse x:Name=\"circleOver1\" Height=\"18\" Width=\"18\" Fill=\"{StaticResource ExpanderArrowHoverFill1}\" Stroke=\"#00000000\" Opacity=\"0\"/>\r\n                                    <Ellipse x:Name=\"circleOver2\" Height=\"18\" Width=\"18\" Fill=\"{StaticResource ExpanderArrowHoverFill2}\" Stroke=\"#00000000\" Opacity=\"0\"/>\r\n                                    <Ellipse x:Name=\"circleOver3\" Height=\"18\" Width=\"18\" Fill=\"{StaticResource ExpanderArrowHoverFill3}\" Stroke=\"{StaticResource expanderArrowStroke}\" Opacity=\"0\"/>\r\n                                    <Ellipse x:Name=\"circlePress1\" Height=\"18\" Width=\"18\" Fill=\"{StaticResource ExpanderArrowPressedFill1}\" Stroke=\"#00000000\" Opacity=\"0\"/>\r\n                                    <Ellipse x:Name=\"circlePress2\" Height=\"18\" Width=\"18\" Fill=\"{StaticResource ExpanderArrowPressedFill2}\" Stroke=\"#00000000\" Opacity=\"0\"/>\r\n                                    <Ellipse x:Name=\"circlePress3\" Height=\"18\" Width=\"18\" Fill=\"{StaticResource ExpanderArrowPressedFill3}\" Stroke=\"{StaticResource expanderArrowStroke}\" Opacity=\"0\"/>\r\n                                    <Path x:Name=\"arrowDown\" Stroke=\"{StaticResource ButtonFontColor}\" StrokeThickness=\"2\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                        <Path.RenderTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform/>\r\n                                                <SkewTransform/>\r\n                                                <RotateTransform/>\r\n                                                <TranslateTransform/>\r\n                                            </TransformGroup>\r\n                                        </Path.RenderTransform>\r\n                                    </Path>\r\n                                </Grid>\r\n                                <ContentPresenter x:Name=\"header\" Margin=\"4,0,0,0\" Grid.Column=\"1\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Center\" IsHitTestVisible=\"false\"/>\r\n                            </Grid>\r\n                            <Rectangle x:Name=\"FocusBackground\" Stroke=\"{StaticResource selectedStroke}\" RadiusX=\"2\" RadiusY=\"2\" IsHitTestVisible=\"false\" Opacity=\"0\"/>\r\n                        </Grid>\r\n                        <ControlTemplate.Triggers>\r\n                            <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\"/>\r\n                                </Trigger.EnterActions>\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsChecked\" Value=\"true\">\r\n\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard x:Name=\"CheckedOff_BeginStoryboard\" Storyboard=\"{StaticResource CheckedOff}\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard x:Name=\"CheckedOn_BeginStoryboard\" Storyboard=\"{StaticResource CheckedOn}\"/>\r\n                                </Trigger.EnterActions>\r\n\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                                </Trigger.EnterActions>\r\n\r\n\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                                </Trigger.EnterActions>\r\n                            </Trigger>\r\n                        </ControlTemplate.Triggers>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <Style x:Key=\"ExpanderRightHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                        <ControlTemplate.Resources>\r\n                            <Storyboard x:Key=\"HoverOn\">\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"circleOver1\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"circleOver2\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"circleOver3\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"HoverBackground\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"HoverOff\">\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"circleOver1\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"circleOver2\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"circleOver3\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"HoverBackground\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"PressedOn\">\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"circlePress1\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"circlePress2\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"circlePress3\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"HoverBackground1\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"PressedOff\">\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"circlePress1\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"circlePress2\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"circlePress3\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"HoverBackground1\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"CheckedOn\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"arrowRight\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"90\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"HoverBackground2\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"-1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"CheckedOff\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"arrowRight\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"-90\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"HoverBackground2\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"FocusedOn\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusBackground\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.84\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"FocusedOff\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusBackground\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                        </ControlTemplate.Resources>\r\n                        <Grid>\r\n                            <Rectangle x:Name=\"HoverBackground\" Fill=\"{StaticResource hoverGradientVertical}\" Stroke=\"{StaticResource hoverStroke}\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                <Rectangle.RenderTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform/>\r\n                                        <SkewTransform/>\r\n                                        <RotateTransform/>\r\n                                        <TranslateTransform/>\r\n                                    </TransformGroup>\r\n                                </Rectangle.RenderTransform>\r\n                            </Rectangle>\r\n\r\n                            <Rectangle x:Name=\"HoverBackground1\" Fill=\"{StaticResource hoverGradientVertical}\" Stroke=\"{StaticResource hoverStroke}\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                <Rectangle.RenderTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform/>\r\n                                        <SkewTransform/>\r\n                                        <RotateTransform/>\r\n                                        <TranslateTransform/>\r\n                                    </TransformGroup>\r\n                                </Rectangle.RenderTransform>\r\n                            </Rectangle>\r\n\r\n                            <Rectangle x:Name=\"HoverBackground2\" Fill=\"{StaticResource hoverGradientVertical}\" Stroke=\"{StaticResource hoverStroke}\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                <Rectangle.RenderTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform/>\r\n                                        <SkewTransform/>\r\n                                        <RotateTransform/>\r\n                                        <TranslateTransform/>\r\n                                    </TransformGroup>\r\n                                </Rectangle.RenderTransform>\r\n                            </Rectangle>\r\n\r\n\r\n\r\n                            <Grid SnapsToDevicePixels=\"False\" Background=\"Transparent\">\r\n                                <Grid.RowDefinitions>\r\n                                    <RowDefinition Height=\"18\"/>\r\n                                    <RowDefinition Height=\"*\"/>\r\n                                </Grid.RowDefinitions>\r\n                                <Grid>\r\n                                    <Grid.LayoutTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform ScaleX=\"1\" ScaleY=\"1\"/>\r\n                                            <SkewTransform AngleX=\"0\" AngleY=\"0\"/>\r\n                                            <RotateTransform Angle=\"0\"/>\r\n                                            <TranslateTransform X=\"0\" Y=\"0\"/>\r\n                                        </TransformGroup>\r\n                                    </Grid.LayoutTransform>\r\n                                    <Ellipse x:Name=\"circleOver1\" Width=\"18\" Height=\"18\" Fill=\"{StaticResource ExpanderArrowHoverFill1}\" Stroke=\"#00000000\" Opacity=\"0\"/>\r\n                                    <Ellipse x:Name=\"circleOver2\" Width=\"18\" Height=\"18\" Fill=\"{StaticResource ExpanderArrowHoverFill2}\" Stroke=\"#00000000\" Opacity=\"0\"/>\r\n                                    <Ellipse x:Name=\"circleOver3\" Width=\"18\" Height=\"18\" Fill=\"{StaticResource ExpanderArrowHoverFill3}\" Stroke=\"{StaticResource expanderArrowStroke}\" Opacity=\"0\"/>\r\n                                    <Ellipse x:Name=\"circlePress1\" Width=\"18\" Height=\"18\" Fill=\"{StaticResource ExpanderArrowPressedFill1}\" Stroke=\"#00000000\" Opacity=\"0\"/>\r\n                                    <Ellipse x:Name=\"circlePress2\" Width=\"18\" Height=\"18\" Fill=\"{StaticResource ExpanderArrowPressedFill2}\" Stroke=\"#00000000\" Opacity=\"0\"/>\r\n                                    <Ellipse x:Name=\"circlePress3\" Width=\"18\" Height=\"18\" Fill=\"{StaticResource ExpanderArrowPressedFill3}\" Stroke=\"{StaticResource expanderArrowStroke}\" Opacity=\"0\"/>\r\n                                    <Path x:Name=\"arrowRight\" Stroke=\"{StaticResource ButtonFontColor}\" StrokeThickness=\"2\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                        <Path.RenderTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform/>\r\n                                                <SkewTransform/>\r\n                                                <RotateTransform Angle=\"-90\"/>\r\n                                            </TransformGroup>\r\n                                        </Path.RenderTransform>\r\n                                    </Path>\r\n                                </Grid>\r\n                                <ContentPresenter SnapsToDevicePixels=\"True\" HorizontalAlignment=\"Center\" Margin=\"6,4,6,0\" VerticalAlignment=\"Top\" Grid.Row=\"1\" RecognizesAccessKey=\"True\">\r\n                                    <ContentPresenter.LayoutTransform>\r\n                                        <TransformGroup>\r\n                                            <TransformGroup.Children>\r\n                                                <TransformCollection>\r\n                                                    <RotateTransform Angle=\"-90\" />\r\n                                                </TransformCollection>\r\n                                            </TransformGroup.Children>\r\n                                        </TransformGroup>\r\n                                    </ContentPresenter.LayoutTransform>\r\n                                </ContentPresenter>\r\n                                <Rectangle x:Name=\"FocusBackground\" Stroke=\"{StaticResource selectedStroke}\" RadiusX=\"2\" RadiusY=\"2\" IsHitTestVisible=\"false\" Opacity=\"0\" Grid.RowSpan=\"2\" />\r\n                            </Grid>\r\n                        </Grid>\r\n                        <ControlTemplate.Triggers>\r\n                            <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" />\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" />\r\n                                </Trigger.EnterActions>\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsChecked\" Value=\"true\">\r\n\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard x:Name=\"CheckedOff_BeginStoryboard\" Storyboard=\"{StaticResource CheckedOff}\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard x:Name=\"CheckedOn_BeginStoryboard\" Storyboard=\"{StaticResource CheckedOn}\"/>\r\n                                </Trigger.EnterActions>\r\n\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" x:Name=\"HoverOn_BeginStoryboard\"/>\r\n                                </Trigger.EnterActions>\r\n\r\n\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                                </Trigger.EnterActions>\r\n                            </Trigger>\r\n                        </ControlTemplate.Triggers>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n        <Style x:Key=\"ExpanderUpHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                        <ControlTemplate.Resources>\r\n                            <Storyboard x:Key=\"HoverOn\">\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"circleOver1\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"circleOver2\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"circleOver3\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"HoverBackground\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"HoverOff\">\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"circleOver1\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"circleOver2\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"circleOver3\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"HoverBackground\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"PressedOn\">\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"circlePress1\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"circlePress2\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"circlePress3\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"HoverBackground1\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"PressedOff\">\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"circlePress1\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"circlePress2\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"circlePress3\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"HoverBackground1\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"CheckedOn\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrowUp\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"-1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"HoverBackground2\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"CheckedOff\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrowUp\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"HoverBackground2\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"FocusedOn\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusBackground\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.84\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"FocusedOff\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusBackground\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                        </ControlTemplate.Resources>\r\n                        <Grid>\r\n                            <Rectangle x:Name=\"HoverBackground\" Fill=\"{StaticResource hoverGradient}\" Stroke=\"{StaticResource hoverStroke}\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                <Rectangle.RenderTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleY=\"-1\"/>\r\n                                        <SkewTransform/>\r\n                                        <RotateTransform/>\r\n                                        <TranslateTransform/>\r\n                                    </TransformGroup>\r\n                                </Rectangle.RenderTransform>\r\n                            </Rectangle>\r\n                            <Rectangle x:Name=\"HoverBackground1\" Fill=\"{StaticResource hoverGradient}\" Stroke=\"{StaticResource hoverStroke}\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                <Rectangle.RenderTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleY=\"-1\"/>\r\n                                        <SkewTransform/>\r\n                                        <RotateTransform/>\r\n                                        <TranslateTransform/>\r\n                                    </TransformGroup>\r\n                                </Rectangle.RenderTransform>\r\n                            </Rectangle>\r\n                            <Rectangle x:Name=\"HoverBackground2\" Fill=\"{StaticResource hoverGradient}\" Stroke=\"{StaticResource hoverStroke}\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                <Rectangle.RenderTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleY=\"-1\"/>\r\n                                        <SkewTransform/>\r\n                                        <RotateTransform/>\r\n                                        <TranslateTransform/>\r\n                                    </TransformGroup>\r\n                                </Rectangle.RenderTransform>\r\n                            </Rectangle>\r\n                            <Grid Margin=\"{TemplateBinding Padding}\">\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition Width=\"18\"/>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <Grid Height=\"18\" HorizontalAlignment=\"Left\" VerticalAlignment=\"Top\">\r\n                                    <Grid.LayoutTransform>\r\n                                        <TransformGroup>\r\n                                            <TransformGroup.Children>\r\n                                                <TransformCollection>\r\n                                                    <RotateTransform Angle=\"180\" />\r\n                                                </TransformCollection>\r\n                                            </TransformGroup.Children>\r\n                                        </TransformGroup>\r\n                                    </Grid.LayoutTransform>\r\n                                    <Ellipse x:Name=\"circleOver1\" Width=\"18\" Height=\"18\" Fill=\"{StaticResource ExpanderArrowHoverFill1}\" Stroke=\"#00000000\" Opacity=\"0\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"/>\r\n                                    <Ellipse x:Name=\"circleOver2\" Width=\"18\" Height=\"18\" Fill=\"{StaticResource ExpanderArrowHoverFill2}\" Stroke=\"#00000000\" Opacity=\"0\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"/>\r\n                                    <Ellipse x:Name=\"circleOver3\" Width=\"18\" Height=\"18\" Fill=\"{StaticResource ExpanderArrowHoverFill3}\" Stroke=\"{StaticResource expanderArrowStroke}\" Opacity=\"0\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"/>\r\n                                    <Ellipse x:Name=\"circlePress1\" Width=\"18\" Height=\"18\" Fill=\"{StaticResource ExpanderArrowPressedFill1}\" Stroke=\"#00000000\" Opacity=\"0\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"/>\r\n                                    <Ellipse x:Name=\"circlePress2\" Width=\"18\" Height=\"18\" Fill=\"{StaticResource ExpanderArrowPressedFill2}\" Stroke=\"#00000000\" Opacity=\"0\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"/>\r\n                                    <Ellipse x:Name=\"circlePress3\" Width=\"18\" Height=\"18\" Fill=\"{StaticResource ExpanderArrowPressedFill3}\" Stroke=\"{StaticResource expanderArrowStroke}\" Opacity=\"0\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"/>\r\n                                    <Path x:Name=\"arrowUp\" Stroke=\"{StaticResource ButtonFontColor}\" StrokeThickness=\"2\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                        <Path.RenderTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform ScaleY=\"-1\"/>\r\n                                            </TransformGroup>\r\n                                        </Path.RenderTransform>\r\n                                    </Path>\r\n                                </Grid>\r\n                                <ContentPresenter SnapsToDevicePixels=\"True\" HorizontalAlignment=\"Left\" Margin=\"4,2,0,2\" VerticalAlignment=\"Center\" Grid.Column=\"1\" RecognizesAccessKey=\"True\" />\r\n                            </Grid>\r\n                            <Rectangle x:Name=\"FocusBackground\" Stroke=\"{StaticResource selectedStroke}\" RadiusX=\"2\" RadiusY=\"2\" IsHitTestVisible=\"false\" Opacity=\"0\"/>\r\n                        </Grid>\r\n                        <ControlTemplate.Triggers>\r\n                            <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" />\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" />\r\n                                </Trigger.EnterActions>\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsChecked\" Value=\"true\">\r\n\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard x:Name=\"CheckedOff_BeginStoryboard\" Storyboard=\"{StaticResource CheckedOff}\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard x:Name=\"CheckedOn_BeginStoryboard\" Storyboard=\"{StaticResource CheckedOn}\"/>\r\n                                </Trigger.EnterActions>\r\n\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" x:Name=\"HoverOn_BeginStoryboard\"/>\r\n                                </Trigger.EnterActions>\r\n\r\n\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                                </Trigger.EnterActions>\r\n                            </Trigger>\r\n                        </ControlTemplate.Triggers>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n        <Style x:Key=\"ExpanderLeftHeaderStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                        <ControlTemplate.Resources>\r\n                            <Storyboard x:Key=\"HoverOn\">\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"circleOver1\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"circleOver2\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"circleOver3\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"HoverBackground\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"HoverOff\">\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"circleOver1\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"circleOver2\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"circleOver3\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"HoverBackground\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"PressedOn\">\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"circlePress1\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"circlePress2\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"circlePress3\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"HoverBackground1\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"PressedOff\">\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"circlePress1\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"circlePress2\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"circlePress3\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"HoverBackground1\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"CheckedOn\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrowLeft\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"-1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrowLeft\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"-90\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"HoverBackground2\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"CheckedOff\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrowLeft\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"arrowLeft\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"90\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Duration=\"00:00:00.0010000\" Storyboard.TargetName=\"HoverBackground2\" Storyboard.TargetProperty=\"(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00\" Value=\"0\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"FocusedOn\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusBackground\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.84\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"FocusedOff\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusBackground\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"0\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                        </ControlTemplate.Resources>\r\n                        <Grid>\r\n                            <Rectangle x:Name=\"HoverBackground\" Fill=\"{StaticResource hoverGradientVertical}\" Stroke=\"{StaticResource hoverStroke}\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                <Rectangle.RenderTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"-1\"/>\r\n                                        <SkewTransform/>\r\n                                        <RotateTransform/>\r\n                                        <TranslateTransform/>\r\n                                    </TransformGroup>\r\n                                </Rectangle.RenderTransform>\r\n                            </Rectangle>\r\n                            <Rectangle x:Name=\"HoverBackground1\" Fill=\"{StaticResource hoverGradientVertical}\" Stroke=\"{StaticResource hoverStroke}\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                <Rectangle.RenderTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"-1\"/>\r\n                                        <SkewTransform/>\r\n                                        <RotateTransform/>\r\n                                        <TranslateTransform/>\r\n                                    </TransformGroup>\r\n                                </Rectangle.RenderTransform>\r\n                            </Rectangle>\r\n                            <Rectangle x:Name=\"HoverBackground2\" Fill=\"{StaticResource hoverGradientVertical}\" Stroke=\"{StaticResource hoverStroke}\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                <Rectangle.RenderTransform>\r\n                                    <TransformGroup>\r\n                                        <ScaleTransform ScaleX=\"-1\"/>\r\n                                        <SkewTransform/>\r\n                                        <RotateTransform/>\r\n                                        <TranslateTransform/>\r\n                                    </TransformGroup>\r\n                                </Rectangle.RenderTransform>\r\n                            </Rectangle>\r\n                            <Grid Margin=\"{TemplateBinding Padding}\">\r\n                                <Grid.RowDefinitions>\r\n                                    <RowDefinition Height=\"18\"/>\r\n                                    <RowDefinition Height=\"*\"/>\r\n                                </Grid.RowDefinitions>\r\n                                <Grid Width=\"18\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Top\">\r\n                                    <Grid.LayoutTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform ScaleX=\"1\" ScaleY=\"1\"/>\r\n                                            <SkewTransform AngleX=\"0\" AngleY=\"0\"/>\r\n                                            <RotateTransform Angle=\"0\"/>\r\n                                            <TranslateTransform X=\"0\" Y=\"0\"/>\r\n                                        </TransformGroup>\r\n                                    </Grid.LayoutTransform>\r\n                                    <Ellipse x:Name=\"circleOver1\" Width=\"18\" Height=\"18\" Fill=\"{StaticResource ExpanderArrowHoverFill1}\" Stroke=\"#00000000\" Opacity=\"0\"/>\r\n                                    <Ellipse x:Name=\"circleOver2\" Width=\"18\" Height=\"18\" Fill=\"{StaticResource ExpanderArrowHoverFill2}\" Stroke=\"#00000000\" Opacity=\"0\"/>\r\n                                    <Ellipse x:Name=\"circleOver3\" Width=\"18\" Height=\"18\" Fill=\"{StaticResource ExpanderArrowHoverFill3}\" Stroke=\"{StaticResource expanderArrowStroke}\" Opacity=\"0\"/>\r\n                                    <Ellipse x:Name=\"circlePress1\" Width=\"18\" Height=\"18\" Fill=\"{StaticResource ExpanderArrowPressedFill1}\" Stroke=\"#00000000\" Opacity=\"0\"/>\r\n                                    <Ellipse x:Name=\"circlePress2\" Width=\"18\" Height=\"18\" Fill=\"{StaticResource ExpanderArrowPressedFill2}\" Stroke=\"#00000000\" Opacity=\"0\"/>\r\n                                    <Ellipse x:Name=\"circlePress3\" Width=\"18\" Height=\"18\" Fill=\"{StaticResource ExpanderArrowPressedFill3}\" Stroke=\"{StaticResource expanderArrowStroke}\" Opacity=\"0\"/>\r\n                                    <Path x:Name=\"arrowLeft\" Stroke=\"{StaticResource ButtonFontColor}\" StrokeThickness=\"2\" Data=\"M 1,1.5 L 4.5,5 L 8,1.5\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\" RenderTransformOrigin=\"0.5,0.5\">\r\n                                        <Path.RenderTransform>\r\n                                            <TransformGroup>\r\n                                                <ScaleTransform/>\r\n                                                <SkewTransform/>\r\n                                                <RotateTransform Angle=\"90\"/>\r\n                                                <TranslateTransform/>\r\n                                            </TransformGroup>\r\n                                        </Path.RenderTransform>\r\n                                    </Path>\r\n                                </Grid>\r\n                                <ContentPresenter SnapsToDevicePixels=\"True\" HorizontalAlignment=\"Center\" Margin=\"3,4,3,0\" VerticalAlignment=\"Top\" Grid.Row=\"1\" RecognizesAccessKey=\"True\">\r\n                                    <ContentPresenter.LayoutTransform>\r\n                                        <TransformGroup>\r\n                                            <TransformGroup.Children>\r\n                                                <TransformCollection>\r\n                                                    <RotateTransform Angle=\"90\" />\r\n                                                </TransformCollection>\r\n                                            </TransformGroup.Children>\r\n                                        </TransformGroup>\r\n                                    </ContentPresenter.LayoutTransform>\r\n                                </ContentPresenter>\r\n                            </Grid>\r\n                            <Rectangle x:Name=\"FocusBackground\" Stroke=\"{StaticResource selectedStroke}\" RadiusX=\"2\" RadiusY=\"2\" IsHitTestVisible=\"false\" Opacity=\"0\"/>\r\n                        </Grid>\r\n                        <ControlTemplate.Triggers>\r\n                            <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" />\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" />\r\n                                </Trigger.EnterActions>\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsChecked\" Value=\"true\">\r\n\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard x:Name=\"CheckedOff_BeginStoryboard\" Storyboard=\"{StaticResource CheckedOff}\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard x:Name=\"CheckedOn_BeginStoryboard\" Storyboard=\"{StaticResource CheckedOn}\"/>\r\n                                </Trigger.EnterActions>\r\n\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" x:Name=\"HoverOn_BeginStoryboard\"/>\r\n                                </Trigger.EnterActions>\r\n\r\n\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                                </Trigger.EnterActions>\r\n                            </Trigger>\r\n                        </ControlTemplate.Triggers>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <Style TargetType=\"{x:Type Expander}\">\r\n            <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource ButtonFontColor}\"/>\r\n            <Setter Property=\"FontWeight\" Value=\"Bold\"/>\r\n            <Setter Property=\"Padding\" Value=\"4\"/>\r\n            <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\"/>\r\n            <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\"/>\r\n            <Setter Property=\"BorderBrush\" Value=\"Transparent\" />\r\n            <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type Expander}\">\r\n                        <Border SnapsToDevicePixels=\"true\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"1,1,1,1\" CornerRadius=\"3\">\r\n                            <Grid>\r\n                                <DockPanel>\r\n                                    <ToggleButton FontFamily=\"{TemplateBinding FontFamily}\" FontSize=\"{TemplateBinding FontSize}\" FontStretch=\"{TemplateBinding FontStretch}\" FontStyle=\"{TemplateBinding FontStyle}\" FontWeight=\"{TemplateBinding FontWeight}\" Foreground=\"{TemplateBinding Foreground}\" HorizontalContentAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Padding=\"{TemplateBinding Padding}\" VerticalContentAlignment=\"{TemplateBinding VerticalContentAlignment}\" FocusVisualStyle=\"{StaticResource ExpanderHeaderFocusVisual}\" Margin=\"1,1,1,0\" MinHeight=\"0\" MinWidth=\"0\" x:Name=\"HeaderSite\" Style=\"{StaticResource ExpanderDownHeaderStyle}\" Content=\"{TemplateBinding Header}\" ContentTemplate=\"{TemplateBinding HeaderTemplate}\" ContentTemplateSelector=\"{TemplateBinding HeaderTemplateSelector}\" IsChecked=\"{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" DockPanel.Dock=\"Top\" />\r\n                                    <Border x:Name=\"border\" Grid.Column=\"0\" Grid.Row=\"1\" Background=\"#FFFFFFFF\" BorderThickness=\"1\" CornerRadius=\"2\" Padding=\"0\" Visibility=\"Collapsed\">\r\n                                        <Border.BorderBrush>\r\n                                            <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                                <GradientStop Color=\"#FFABAEB3\" Offset=\"0\"/>\r\n                                                <GradientStop Color=\"#FFE2E8EE\" Offset=\"0.355\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Border.BorderBrush>\r\n                                        <ContentPresenter Focusable=\"false\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" Margin=\"1,1,1,1\" x:Name=\"ExpandSite\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" DockPanel.Dock=\"Bottom\" />\r\n                                    </Border>\r\n                                </DockPanel>\r\n                                <Border x:Name=\"DisabledVisualElement\" IsHitTestVisible=\"false\" Background=\"#A5FFFFFF\" Opacity=\"0\"/>\r\n                                <Border x:Name=\"FocusVisualElement\" IsHitTestVisible=\"false\" BorderBrush=\"#00FFFFFF\" BorderThickness=\"1\" Visibility=\"Collapsed\"/>\r\n                            </Grid>\r\n                        </Border>\r\n                        <ControlTemplate.Triggers>\r\n                            <Trigger Property=\"IsExpanded\" Value=\"true\">\r\n                                <Setter Property=\"Visibility\" TargetName=\"border\" Value=\"Visible\" />\r\n                            </Trigger>\r\n                            <Trigger Property=\"ExpandDirection\" Value=\"Down\" />\r\n                            <Trigger Property=\"ExpandDirection\" Value=\"Right\">\r\n                                <Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Right\" />\r\n                                <Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Left\" />\r\n                                <Setter Property=\"Style\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderRightHeaderStyle}\" />\r\n                            </Trigger>\r\n                            <Trigger Property=\"ExpandDirection\" Value=\"Up\">\r\n                                <Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Top\" />\r\n                                <Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Bottom\" />\r\n                                <Setter Property=\"Style\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderUpHeaderStyle}\" />\r\n                            </Trigger>\r\n                            <Trigger Property=\"ExpandDirection\" Value=\"Left\">\r\n                                <Setter Property=\"DockPanel.Dock\" TargetName=\"ExpandSite\" Value=\"Left\" />\r\n                                <Setter Property=\"DockPanel.Dock\" TargetName=\"HeaderSite\" Value=\"Right\" />\r\n                                <Setter Property=\"Style\" TargetName=\"HeaderSite\" Value=\"{StaticResource ExpanderLeftHeaderStyle}\" />\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                                <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                                <Setter Property=\"Opacity\" TargetName=\"DisabledVisualElement\" Value=\"1\"/>\r\n                            </Trigger>\r\n                        </ControlTemplate.Triggers>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <ControlTemplate x:Key=\"ComboBoxToggleButton\" TargetType=\"{x:Type ToggleButton}\">\r\n            <ControlTemplate.Resources>\r\n                <Storyboard x:Key=\"HoverOn\">\r\n                    <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BtnOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0.8\"/>\r\n                    <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"Background_over\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                </Storyboard>\r\n                <Storyboard x:Key=\"HoverOff\">\r\n                    <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BtnOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                    <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"Background_over\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                </Storyboard>\r\n                <Storyboard x:Key=\"PressedOn\">\r\n                    <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BtnPress\" Storyboard.TargetProperty=\"Opacity\" To=\"0.8\"/>\r\n                    <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"Background_press\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                    <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BtnPress_highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                </Storyboard>\r\n                <Storyboard x:Key=\"PressedOff\">\r\n                    <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BtnPress\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                    <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"Background_press\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                    <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BtnPress_highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                </Storyboard>\r\n            </ControlTemplate.Resources>\r\n            <Grid>\r\n                <Rectangle x:Name=\"Background\" Fill=\"#FFFFFFFF\" Stroke=\"#FFABAEB3\" RadiusX=\"3\" RadiusY=\"3\" IsHitTestVisible=\"false\"/>\r\n                <Rectangle x:Name=\"Background_over\" Stroke=\"{StaticResource TextBoxOverBrush}\" RadiusX=\"3\" RadiusY=\"3\" Opacity=\"0\" IsHitTestVisible=\"false\"/>\r\n                <Rectangle x:Name=\"Background_press\" Stroke=\"{StaticResource TextBoxPressBrush}\" RadiusX=\"3\" RadiusY=\"3\" Opacity=\"0\" IsHitTestVisible=\"false\"/>\r\n                <Border x:Name=\"BtnOver\" Width=\"20\" Background=\"{StaticResource BtnOverFill}\" BorderBrush=\"{StaticResource TextBoxPressBrush}\" BorderThickness=\"1\" CornerRadius=\"0,3,3,0\" Opacity=\"0\" HorizontalAlignment=\"Right\"/>\r\n                <Border x:Name=\"BtnPress\" Width=\"20\" Background=\"{StaticResource BtnPressFill}\" BorderBrush=\"{StaticResource btnPressStroke1}\" BorderThickness=\"1\" CornerRadius=\"0,3,3,0\" Opacity=\"0\" HorizontalAlignment=\"Right\"/>\r\n                <Border x:Name=\"BtnPress_highlight\" Background=\"{StaticResource ComboTogglePressHighlight}\" Margin=\"1\" Width=\"18\" CornerRadius=\"0,2,2,0\" Opacity=\"0\" HorizontalAlignment=\"Right\"/>\r\n                <Border x:Name=\"BtnOverlay\" Margin=\"1\" Width=\"18\" CornerRadius=\"0,2,2,0\" HorizontalAlignment=\"Right\">\r\n                    <Border.Background>\r\n                        <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                            <GradientStop Color=\"#00FFFFFF\"/>\r\n                            <GradientStop Color=\"#72FFFFFF\" Offset=\"0.189\"/>\r\n                            <GradientStop Color=\"#72FFFFFF\" Offset=\"0.5\"/>\r\n                            <GradientStop Color=\"#00FFFFFF\" Offset=\"0.51\"/>\r\n                        </LinearGradientBrush>\r\n                    </Border.Background>\r\n                </Border>\r\n                <Path x:Name=\"BtnArrow\" Margin=\"0,0,7,0\" Width=\"6\" Data=\"F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z \" HorizontalAlignment=\"Right\" Stretch=\"Uniform\">\r\n                    <Path.Fill>\r\n                        <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                            <GradientStop Color=\"{StaticResource Arrow}\" Offset=\"0\"/>\r\n                            <GradientStop Color=\"#FF000000\" Offset=\"1\"/>\r\n                        </LinearGradientBrush>\r\n                    </Path.Fill>\r\n                </Path>\r\n                <Rectangle x:Name=\"DisabledVisualElement\" Margin=\"1\" Fill=\"#00FFFFFF\" RadiusX=\"3\" RadiusY=\"3\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\"/>\r\n            </Grid>\r\n            <ControlTemplate.Triggers>\r\n                <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                    <Trigger.ExitActions>\r\n                        <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                    </Trigger.ExitActions>\r\n                    <Trigger.EnterActions>\r\n                        <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                    </Trigger.EnterActions>\r\n\r\n                </Trigger>\r\n                <Trigger Property=\"IsChecked\" Value=\"true\"/>\r\n                <Trigger Property=\"IsPressed\" Value=\"True\">\r\n                    <Trigger.ExitActions>\r\n                        <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                    </Trigger.ExitActions>\r\n                    <Trigger.EnterActions>\r\n                        <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                    </Trigger.EnterActions>\r\n                </Trigger>\r\n                <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                    <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                    <Setter Property=\"Visibility\" TargetName=\"DisabledVisualElement\" Value=\"Visible\"/>\r\n                </Trigger>\r\n            </ControlTemplate.Triggers>\r\n        </ControlTemplate>\r\n\r\n\r\n        <ControlTemplate x:Key=\"ComboBoxTextBox\" TargetType=\"{x:Type TextBox}\">\r\n            <Border x:Name=\"PART_ContentHost\" Focusable=\"False\" Background=\"{TemplateBinding Background}\"/>\r\n        </ControlTemplate>\r\n\r\n\r\n        <Style TargetType=\"{x:Type ComboBox}\">\r\n            <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource OutsideFontColor}\"/>\r\n<Setter Property=\"Template\" Value=\"{DynamicResource ComboBoxTemplate}\" />\r\n        </Style>\r\n    \r\n    <ControlTemplate x:Key=\"ComboBoxTemplate\" TargetType=\"{x:Type ComboBox}\">\r\n                        <ControlTemplate.Resources>\r\n                            <Storyboard x:Key=\"FocusedOn\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"FocusedOff\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                        </ControlTemplate.Resources>\r\n                        <Grid>\r\n                            <ToggleButton Focusable=\"false\" IsChecked=\"{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" ClickMode=\"Press\" Background=\"#00000000\" Style=\"{x:Null}\" />\r\n                            <ToggleButton Grid.Column=\"2\" Template=\"{DynamicResource ComboBoxToggleButton}\" x:Name=\"ToggleButton\" Focusable=\"false\" IsChecked=\"{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\" ClickMode=\"Press\"/>\r\n                            <ContentPresenter HorizontalAlignment=\"Left\" Margin=\"3,3,23,3\" x:Name=\"ContentSite\" VerticalAlignment=\"Center\" Content=\"{TemplateBinding SelectionBoxItem}\" ContentTemplate=\"{TemplateBinding SelectionBoxItemTemplate}\" ContentTemplateSelector=\"{TemplateBinding ItemTemplateSelector}\" IsHitTestVisible=\"False\"/>\r\n                            <TextBox Visibility=\"Hidden\" Template=\"{DynamicResource ComboBoxTextBox}\" HorizontalAlignment=\"Left\" Margin=\"3,3,23,3\" x:Name=\"PART_EditableTextBox\" Style=\"{x:Null}\" VerticalAlignment=\"Center\" Focusable=\"True\" Background=\"Transparent\" IsReadOnly=\"{TemplateBinding IsReadOnly}\"/>\r\n                            <Rectangle x:Name=\"DisabledVisualElement\" Fill=\"#A5FFFFFF\" RadiusX=\"4\" RadiusY=\"4\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" />\r\n                            <Rectangle x:Name=\"FocusVisualElement\" Margin=\"-1\" Stroke=\"{StaticResource selectedStroke}\" StrokeThickness=\"1\" RadiusX=\"4\" RadiusY=\"4\" IsHitTestVisible=\"false\" Opacity=\"0\"/>\r\n                            <Popup IsOpen=\"{TemplateBinding IsDropDownOpen}\" Placement=\"Bottom\" x:Name=\"Popup\" Focusable=\"False\" AllowsTransparency=\"True\" PopupAnimation=\"Slide\">\r\n                                <Grid MaxHeight=\"{TemplateBinding MaxDropDownHeight}\" MinWidth=\"{TemplateBinding ActualWidth}\" x:Name=\"DropDown\" SnapsToDevicePixels=\"True\">\r\n                                    <Border x:Name=\"DropDownBorder\" Background=\"#FFFFFFFF\" BorderBrush=\"{StaticResource TextBoxNorm}\" BorderThickness=\"1\" CornerRadius=\"1,1,3,3\">\r\n                                        <ScrollViewer Margin=\"4,6,4,6\"   SnapsToDevicePixels=\"True\" HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Auto\" CanContentScroll=\"True\">\r\n\r\n                                            <StackPanel IsItemsHost=\"True\" KeyboardNavigation.DirectionalNavigation=\"Contained\"/>\r\n\r\n                                        </ScrollViewer>\r\n                                    </Border>\r\n                                </Grid>\r\n                            </Popup>\r\n                        </Grid>\r\n                        <ControlTemplate.Triggers>\r\n                            <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\"/>\r\n                                </Trigger.EnterActions>\r\n                            </Trigger>\r\n                            <Trigger Property=\"HasItems\" Value=\"false\">\r\n                                <Setter Property=\"MinHeight\" Value=\"95\" TargetName=\"DropDownBorder\"/>\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                                <Setter Property=\"Visibility\" TargetName=\"DisabledVisualElement\" Value=\"Visible\"/>\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                                <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\"/>\r\n                            </Trigger>\r\n                            <Trigger Property=\"AllowsTransparency\" SourceName=\"Popup\" Value=\"true\">\r\n                                <Setter Property=\"CornerRadius\" Value=\"4\" TargetName=\"DropDownBorder\"/>\r\n                                <Setter Property=\"Margin\" Value=\"0,2,0,0\" TargetName=\"DropDownBorder\"/>\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsEditable\" Value=\"true\">\r\n                                <Setter Property=\"IsTabStop\" Value=\"false\"/>\r\n                                <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"PART_EditableTextBox\"/>\r\n                                <Setter Property=\"Visibility\" Value=\"Hidden\" TargetName=\"ContentSite\"/>\r\n                            </Trigger>\r\n                        </ControlTemplate.Triggers>\r\n                    </ControlTemplate>\r\n\r\n        <Style d:IsControlPart=\"True\" TargetType=\"{x:Type ComboBoxItem}\">\r\n            <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n            <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n            <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n            <Setter Property=\"Padding\" Value=\"3\" />\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource OutsideFontColor}\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type ComboBoxItem}\">\r\n                        <ControlTemplate.Resources>\r\n                            <Storyboard x:Key=\"HoverOn\">\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundGradientOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0.73\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"HoverOff\">\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundGradientOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"SelectedOn\">\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundGradientSelected\" Storyboard.TargetProperty=\"Opacity\" To=\"0.84\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"SelectedOff\">\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundGradientSelected\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                            </Storyboard>\r\n                        </ControlTemplate.Resources>\r\n                        <Grid SnapsToDevicePixels=\"true\">\r\n                            <Rectangle x:Name=\"BackgroundGradientOver\" Fill=\"{StaticResource hoverGradient}\" Stroke=\"{StaticResource hoverStroke}\" RadiusX=\"2\" RadiusY=\"2\"  Opacity=\"0\"/>\r\n                            <Rectangle x:Name=\"BackgroundGradientSelected\" Fill=\"{StaticResource BtnOverFill}\" Stroke=\"{StaticResource selectedStroke}\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\"/>\r\n                            <Rectangle x:Name=\"BackgroundHighlight\" Margin=\"1\" Stroke=\"#A0FFFFFF\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                            <ContentPresenter\r\n\t                        \tx:Name=\"contentPresenter\"\r\n\t                        \tHorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n\t                        \tMargin=\"{TemplateBinding Padding}\"/>\r\n                        </Grid>\r\n                        <ControlTemplate.Triggers>\r\n\r\n                            <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" x:Name=\"HoverOn_BeginStoryboard\"/>\r\n                                </Trigger.EnterActions>\r\n                            </Trigger>\r\n\r\n                            <Trigger Property=\"IsHighlighted\" Value=\"true\"/>\r\n                            <Trigger Property=\"Selector.IsSelected\" Value=\"True\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource SelectedOff}\" x:Name=\"SelectedOff_BeginStoryboard1\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\" x:Name=\"SelectedOn_BeginStoryboard1\"/>\r\n                                </Trigger.EnterActions>\r\n                            </Trigger>\r\n\r\n                            <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                            </Trigger>\r\n                        </ControlTemplate.Triggers>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <Style TargetType=\"{x:Type ProgressBar}\">\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type ProgressBar}\">\r\n                        <ControlTemplate.Resources>\r\n                            <Storyboard x:Key=\"IndeterminateOn\" RepeatBehavior=\"Forever\">\r\n                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName=\"IndeterminateGradientFill\" Storyboard.TargetProperty=\"(Shape.Fill).(Brush.Transform).(TransformGroup.Children)[0].X\" RepeatBehavior=\"Forever\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"0\" Value=\"0\"/>\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:.5\" Value=\"20\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                        </ControlTemplate.Resources>\r\n                        <Grid>\r\n\r\n                            <Border x:Name=\"PART_Track\" BorderThickness=\"1\" CornerRadius=\"3\" Opacity=\"0.825\">\r\n                                <Border.Background>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                        <GradientStop Color=\"#FFFFFFFF\"/>\r\n                                        <GradientStop Color=\"#FFD8D8D8\" Offset=\"0.327\"/>\r\n                                        <GradientStop Color=\"#FFDADADA\" Offset=\"0.488\"/>\r\n                                        <GradientStop Color=\"#FFBEBEBE\" Offset=\"0.539\"/>\r\n                                        <GradientStop Color=\"#FFD6D6D6\" Offset=\"0.77\"/>\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"1\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Border.Background>\r\n                                <Border.BorderBrush>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                        <GradientStop Color=\"#FFBBBBBB\" Offset=\"0\"/>\r\n                                        <GradientStop Color=\"#FF7E7E7E\" Offset=\"1\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Border.BorderBrush>\r\n                            </Border>\r\n                            <Grid x:Name=\"IndeterminateRoot\" Visibility=\"Collapsed\">\r\n                                <Rectangle x:Name=\"IndeterminateSolidFill\" Margin=\"1\" Fill=\"#FF00C120\" RadiusX=\"2\" RadiusY=\"2\"/>\r\n                                <Rectangle x:Name=\"ProgressBarRootGradient\" Margin=\"1\" RadiusX=\"1.5\" RadiusY=\"1.5\" Panel.ZIndex=\"1\">\r\n                                    <Rectangle.Fill>\r\n                                        <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                            <GradientStop Color=\"#FFE8FFEC\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#84BDFFC9\" Offset=\"0.516\"/>\r\n                                            <GradientStop Color=\"#00D6D6D6\" Offset=\"0.521\"/>\r\n                                            <GradientStop Color=\"#FF7BFF94\" Offset=\"1\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Rectangle.Fill>\r\n                                </Rectangle>\r\n                                <Rectangle x:Name=\"IndeterminateGradientFill\" Margin=\"1\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0.7\">\r\n                                    <Rectangle.Fill>\r\n                                        <LinearGradientBrush EndPoint=\"0,1\" StartPoint=\"20,1\" MappingMode=\"Absolute\" SpreadMethod=\"Repeat\">\r\n                                            <LinearGradientBrush.Transform>\r\n                                                <TransformGroup>\r\n                                                    <TranslateTransform X=\"0\"/>\r\n                                                    <SkewTransform AngleX=\"-10\"/>\r\n                                                </TransformGroup>\r\n                                            </LinearGradientBrush.Transform>\r\n                                            <GradientStop Color=\"#FF95FFA8\" Offset=\"0.129\"/>\r\n                                            <GradientStop Color=\"#9159FF76\" Offset=\"0.304\"/>\r\n                                            <GradientStop Color=\"#0007B324\" Offset=\"0.498\"/>\r\n                                            <GradientStop Color=\"#8661FF7C\" Offset=\"0.714\"/>\r\n                                            <GradientStop Color=\"#FF8BFFA1\" Offset=\"0.949\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Rectangle.Fill>\r\n                                </Rectangle>\r\n                            </Grid>\r\n                            <Grid x:Name=\"DeterminateRoot\">\r\n                                <Rectangle x:Name=\"PART_Indicator\" Margin=\"1\" RadiusX=\"1.5\" RadiusY=\"1.5\" HorizontalAlignment=\"Left\" Opacity=\"0.83\">\r\n                                    <Rectangle.Fill>\r\n                                        <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                            <GradientStop Color=\"#FFE4FFDA\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#FFBDF4C0\" Offset=\"0.198\"/>\r\n                                            <GradientStop Color=\"#FF9CEBAB\" Offset=\"0.516\"/>\r\n                                            <GradientStop Color=\"#FF00C523\" Offset=\"0.521\"/>\r\n                                            <GradientStop Color=\"#FF00D724\" Offset=\"0.797\"/>\r\n                                            <GradientStop Color=\"#FF10DC2E\" Offset=\"1\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Rectangle.Fill>\r\n                                </Rectangle>\r\n                            </Grid>\r\n                            <Border x:Name=\"DisabledVisualElement\" Background=\"#A5FFFFFF\" BorderBrush=\"#59C0C0C0\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" IsHitTestVisible=\"False\" Visibility=\"Collapsed\"/>\r\n                        </Grid>\r\n                        <ControlTemplate.Triggers>\r\n                            <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                                <Setter Property=\"Visibility\" TargetName=\"DisabledVisualElement\" Value=\"Visible\"/>\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsIndeterminate\" Value=\"True\">\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource IndeterminateOn}\"/>\r\n                                </Trigger.EnterActions>\r\n                                <Setter Property=\"Visibility\" TargetName=\"IndeterminateRoot\" Value=\"Visible\"/>\r\n                                <Setter Property=\"Visibility\" TargetName=\"DeterminateRoot\" Value=\"Collapsed\"/>\r\n                            </Trigger>\r\n                        </ControlTemplate.Triggers>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <Style TargetType=\"{x:Type TextBox}\">\r\n            <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\"/>\r\n            <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\"/>\r\n            <Setter Property=\"AllowDrop\" Value=\"true\"/>\r\n            <Setter Property=\"Background\" Value=\"#FFFFFFFF\"/>\r\n            <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\"/>\r\n            <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\"/>\r\n            <Setter Property=\"Padding\" Value=\"4\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n<Setter Property=\"Template\" Value=\"{DynamicResource TextBoxTemplate}\" />\r\n        </Style>\r\n    \r\n    <ControlTemplate x:Key=\"TextBoxTemplate\" TargetType=\"{x:Type TextBox}\">\r\n                        <ControlTemplate.Resources>\r\n                            <Storyboard x:Key=\"HoverOn\">\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"Over\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"HoverOff\">\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"Over\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"FocusedOn\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"FocusedOff\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n\r\n                        </ControlTemplate.Resources>\r\n                        <Grid>\r\n                            <Border x:Name=\"BorderBase\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{StaticResource TextBoxNorm}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\"/>\r\n                            <Border x:Name=\"Over\" BorderBrush=\"{StaticResource TextBoxOver}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" Opacity=\"0\"/>\r\n                            <ScrollViewer Margin=\"0\" x:Name=\"PART_ContentHost\" Padding=\"{TemplateBinding Padding}\" />\r\n                            <Border x:Name=\"DisabledVisualElement\" Background=\"#A5FFFFFF\" BorderBrush=\"#59C0C0C0\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" IsHitTestVisible=\"False\" Visibility=\"Collapsed\"/>\r\n                            <Border x:Name=\"FocusVisualElement\" BorderBrush=\"{StaticResource TextBoxFocus}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" IsHitTestVisible=\"False\" Opacity=\"0\"/>\r\n                        </Grid>\r\n                        <ControlTemplate.Triggers>\r\n                            <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\"/>\r\n                                </Trigger.EnterActions>\r\n                            </Trigger>\r\n                            <MultiTrigger>\r\n                                <MultiTrigger.Conditions>\r\n                                    <Condition Property=\"IsMouseOver\" Value=\"True\"/>\r\n                                    <Condition Property=\"IsFocused\" Value=\"False\"/>\r\n                                </MultiTrigger.Conditions>\r\n                                <MultiTrigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                                </MultiTrigger.ExitActions>\r\n                                <MultiTrigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                                </MultiTrigger.EnterActions>\r\n                            </MultiTrigger>\r\n                            <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                                <Setter Property=\"Visibility\" TargetName=\"DisabledVisualElement\" Value=\"Visible\"/>\r\n                            </Trigger>\r\n                        </ControlTemplate.Triggers>\r\n                    </ControlTemplate>\r\n\r\n        <Style TargetType=\"{x:Type PasswordBox}\">\r\n            <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\"/>\r\n            <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\"/>\r\n            <Setter Property=\"AllowDrop\" Value=\"true\"/>\r\n            <Setter Property=\"Background\" Value=\"#FFFFFFFF\"/>\r\n            <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\"/>\r\n            <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\"/>\r\n            <Setter Property=\"Padding\" Value=\"4\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type PasswordBox}\">\r\n                        <ControlTemplate.Resources>\r\n                            <Storyboard x:Key=\"HoverOn\">\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"Over\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"HoverOff\">\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"Over\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"FocusedOn\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"FocusedOff\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n\r\n                        </ControlTemplate.Resources>\r\n                        <Grid>\r\n                            <Border x:Name=\"BorderBase\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{StaticResource TextBoxNorm}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\"/>\r\n                            <Border x:Name=\"Over\" BorderBrush=\"{StaticResource TextBoxOver}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" Opacity=\"0\"/>\r\n                            <ScrollViewer Margin=\"0\" x:Name=\"PART_ContentHost\" Padding=\"{TemplateBinding Padding}\" />\r\n                            <Border x:Name=\"DisabledVisualElement\" Background=\"#A5FFFFFF\" BorderBrush=\"#59C0C0C0\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" IsHitTestVisible=\"False\" Visibility=\"Collapsed\"/>\r\n                            <Border x:Name=\"FocusVisualElement\" BorderBrush=\"{StaticResource TextBoxFocus}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" IsHitTestVisible=\"False\" Opacity=\"0\"/>\r\n                        </Grid>\r\n                        <ControlTemplate.Triggers>\r\n                            <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\"/>\r\n                                </Trigger.EnterActions>\r\n                            </Trigger>\r\n                            <MultiTrigger>\r\n                                <MultiTrigger.Conditions>\r\n                                    <Condition Property=\"IsMouseOver\" Value=\"True\"/>\r\n                                    <Condition Property=\"IsFocused\" Value=\"False\"/>\r\n                                </MultiTrigger.Conditions>\r\n                                <MultiTrigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                                </MultiTrigger.ExitActions>\r\n                                <MultiTrigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                                </MultiTrigger.EnterActions>\r\n                            </MultiTrigger>\r\n                            <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                                <Setter Property=\"Visibility\" TargetName=\"DisabledVisualElement\" Value=\"Visible\"/>\r\n                            </Trigger>\r\n                        </ControlTemplate.Triggers>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <Style TargetType=\"{x:Type RichTextBox}\">\r\n            <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\"/>\r\n            <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\"/>\r\n            <Setter Property=\"AllowDrop\" Value=\"true\"/>\r\n            <Setter Property=\"Background\" Value=\"#FFFFFFFF\"/>\r\n            <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\"/>\r\n            <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\"/>\r\n            <Setter Property=\"Padding\" Value=\"4\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type RichTextBox}\">\r\n                        <ControlTemplate.Resources>\r\n                            <Storyboard x:Key=\"HoverOn\">\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"Over\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"HoverOff\">\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"Over\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"FocusedOn\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"FocusedOff\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n\r\n                        </ControlTemplate.Resources>\r\n                        <Grid>\r\n                            <Border x:Name=\"BorderBase\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{StaticResource TextBoxNorm}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\"/>\r\n                            <Border x:Name=\"Over\" BorderBrush=\"{StaticResource TextBoxOver}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" Opacity=\"0\"/>\r\n                            <ScrollViewer Margin=\"0\" x:Name=\"PART_ContentHost\" Padding=\"{TemplateBinding Padding}\" />\r\n                            <Border x:Name=\"DisabledVisualElement\" Background=\"#A5FFFFFF\" BorderBrush=\"#59C0C0C0\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" IsHitTestVisible=\"False\" Visibility=\"Collapsed\"/>\r\n                            <Border x:Name=\"FocusVisualElement\" BorderBrush=\"{StaticResource TextBoxFocus}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" IsHitTestVisible=\"False\" Opacity=\"0\"/>\r\n                        </Grid>\r\n                        <ControlTemplate.Triggers>\r\n                            <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\"/>\r\n                                </Trigger.EnterActions>\r\n                            </Trigger>\r\n                            <MultiTrigger>\r\n                                <MultiTrigger.Conditions>\r\n                                    <Condition Property=\"IsMouseOver\" Value=\"True\"/>\r\n                                    <Condition Property=\"IsFocused\" Value=\"False\"/>\r\n                                </MultiTrigger.Conditions>\r\n                                <MultiTrigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                                </MultiTrigger.ExitActions>\r\n                                <MultiTrigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                                </MultiTrigger.EnterActions>\r\n                            </MultiTrigger>\r\n                            <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\"/>\r\n                                <Setter Property=\"Visibility\" TargetName=\"DisabledVisualElement\" Value=\"Visible\"/>\r\n                            </Trigger>\r\n                        </ControlTemplate.Triggers>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <Style TargetType=\"{x:Type Label}\">\r\n            <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n            <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource OutsideFontColor}\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type Label}\">\r\n                        <Grid>\r\n                            <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" RecognizesAccessKey=\"True\"/>\r\n                        </Grid>\r\n                        <ControlTemplate.Triggers>\r\n                            <Trigger Property=\"IsEnabled\" Value=\"false\"/>\r\n                        </ControlTemplate.Triggers>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <Style TargetType=\"{x:Type Menu}\">\r\n            <Setter Property=\"SnapsToDevicePixels\" Value=\"True\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource OutsideFontColor}\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type Menu}\">\r\n                        <Grid>\r\n                            <Border x:Name=\"Border\" Background=\"{StaticResource grayGradient}\" />\r\n                            <StackPanel IsItemsHost=\"True\" ClipToBounds=\"True\" Orientation=\"Horizontal\"/>\r\n                        </Grid>\r\n                        <ControlTemplate.Triggers>\r\n                            <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                                <Setter Property=\"Background\" Value=\"#A5FFFFFF\" TargetName=\"Border\"/>\r\n                                <Setter Property=\"BorderBrush\" Value=\"#59C0C0C0\" TargetName=\"Border\"/>\r\n                            </Trigger>\r\n                        </ControlTemplate.Triggers>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <DropShadowBitmapEffect x:Key=\"PopupDropShadow\" ShadowDepth=\"1.5\" Softness=\"0.15\"/>\r\n\r\n        <Style TargetType=\"{x:Type MenuItem}\">\r\n            <Setter Property=\"HorizontalContentAlignment\" Value=\"{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\"/>\r\n            <Setter Property=\"VerticalContentAlignment\" Value=\"{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}\"/>\r\n            <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource OutsideFontColor}\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type MenuItem}\">\r\n                        <ControlTemplate.Resources>\r\n                            <Storyboard x:Key=\"HighlightOn\">\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundGradientSelected\" Storyboard.TargetProperty=\"Opacity\" To=\"0.84\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"HighlightOff\">\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundGradientSelected\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                            </Storyboard>\r\n                        </ControlTemplate.Resources>\r\n                        <Border x:Name=\"Border\" Background=\"{TemplateBinding Background}\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\">\r\n                            <Grid Margin=\"1,1,1,1\">\r\n\r\n                                <Grid.ColumnDefinitions>\r\n                                    <ColumnDefinition MinWidth=\"17\" Width=\"Auto\" SharedSizeGroup=\"MenuItemIconColumnGroup\"/>\r\n                                    <ColumnDefinition Width=\"*\"/>\r\n                                    <ColumnDefinition Width=\"Auto\" SharedSizeGroup=\"MenuItemIGTColumnGroup\"/>\r\n                                    <ColumnDefinition Width=\"14\"/>\r\n                                </Grid.ColumnDefinitions>\r\n                                <Rectangle x:Name=\"BackgroundGradientOver\" Fill=\"{StaticResource hoverGradient}\" Stroke=\"{StaticResource hoverStroke}\" RadiusX=\"2\" RadiusY=\"2\"  Opacity=\"0\" Grid.ColumnSpan=\"4\"/>\r\n                                <Rectangle x:Name=\"BackgroundGradientSelected\" Fill=\"{StaticResource BtnOverFill}\" Stroke=\"{StaticResource selectedStroke}\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\" Grid.ColumnSpan=\"4\"/>\r\n                                <Rectangle x:Name=\"BackgroundHighlight\" Margin=\"1\" Stroke=\"#A0FFFFFF\" RadiusX=\"1\" RadiusY=\"1\" Grid.ColumnSpan=\"4\" Opacity=\"0\"/>\r\n                                <ContentPresenter Margin=\"4,0,6,0\" x:Name=\"Icon\" VerticalAlignment=\"Center\" ContentSource=\"Icon\"/>\r\n                                <Grid Visibility=\"Hidden\" Margin=\"4,0,6,0\" x:Name=\"GlyphPanel\" VerticalAlignment=\"Center\">\r\n                                    <Path x:Name=\"GlyphPanelpath\" VerticalAlignment=\"Center\" Fill=\"{TemplateBinding Foreground}\" Data=\"M0,2 L0,4.8 L2.5,7.4 L7.1,2.8 L7.1,0 L2.5,4.6 z\" FlowDirection=\"LeftToRight\"/>\r\n                                </Grid>\r\n\r\n                                <ContentPresenter Grid.Column=\"1\" Margin=\"{TemplateBinding Padding}\" x:Name=\"HeaderHost\" RecognizesAccessKey=\"True\" ContentSource=\"Header\"/>\r\n\r\n                                <Grid Grid.Column=\"3\" Margin=\"4,0,6,0\" x:Name=\"ArrowPanel\" VerticalAlignment=\"Center\">\r\n                                    <Path x:Name=\"ArrowPanelPath\" VerticalAlignment=\"Center\" Fill=\"{TemplateBinding Foreground}\" Data=\"M0,0 L0,8 L4,4 z\"/>\r\n                                </Grid>\r\n\r\n                                <Popup IsOpen=\"{Binding Path=IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Right\" x:Name=\"SubMenuPopup\" Focusable=\"false\" AllowsTransparency=\"true\" PopupAnimation=\"{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}\" VerticalOffset=\"-3\">\r\n                                    <Grid x:Name=\"SubMenu\">\r\n                                        <Border x:Name=\"SubMenuBorder\" Background=\"#FFFFFFFF\" BorderBrush=\"{StaticResource TextBoxNorm}\" BorderThickness=\"1\"/>\r\n\r\n                                        <StackPanel IsItemsHost=\"True\" KeyboardNavigation.DirectionalNavigation=\"Cycle\"/>\r\n                                    </Grid>\r\n                                </Popup>\r\n\r\n                            </Grid>\r\n                        </Border>\r\n\r\n                        <ControlTemplate.Triggers>\r\n\r\n                            <Trigger Property=\"Role\" Value=\"TopLevelHeader\">\r\n                                <Setter Property=\"Margin\" Value=\"0,1,0,1\"/>\r\n                                <Setter Property=\"Padding\" Value=\"6,3,6,3\"/>\r\n                                <Setter Property=\"Grid.IsSharedSizeScope\" Value=\"true\"/>\r\n                                <Setter Property=\"Placement\" Value=\"Bottom\" TargetName=\"SubMenuPopup\"/>\r\n                                <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ArrowPanel\"/>\r\n                            </Trigger>\r\n\r\n                            <Trigger Property=\"Role\" Value=\"TopLevelItem\">\r\n                                <Setter Property=\"Margin\" Value=\"0,1,0,1\"/>\r\n                                <Setter Property=\"Padding\" Value=\"6,3,6,3\"/>\r\n                                <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ArrowPanel\"/>\r\n                            </Trigger>\r\n\r\n                            <Trigger Property=\"Role\" Value=\"SubmenuHeader\">\r\n                                <Setter Property=\"DockPanel.Dock\" Value=\"Top\"/>\r\n                                <Setter Property=\"Padding\" Value=\"0,2,0,2\"/>\r\n                                <Setter Property=\"Grid.IsSharedSizeScope\" Value=\"true\"/>\r\n                            </Trigger>\r\n\r\n                            <Trigger Property=\"Role\" Value=\"SubmenuItem\">\r\n                                <Setter Property=\"DockPanel.Dock\" Value=\"Top\"/>\r\n                                <Setter Property=\"Padding\" Value=\"0,2,0,2\"/>\r\n                                <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ArrowPanel\"/>\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsSuspendingPopupAnimation\" Value=\"true\">\r\n                                <Setter Property=\"PopupAnimation\" Value=\"None\" TargetName=\"SubMenuPopup\"/>\r\n                            </Trigger>\r\n\r\n                            <Trigger Property=\"Icon\" Value=\"{x:Null}\">\r\n                                <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"Icon\"/>\r\n                            </Trigger>\r\n\r\n                            <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                                <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"GlyphPanel\"/>\r\n                                <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"Icon\"/>\r\n                            </Trigger>\r\n\r\n                            <Trigger Property=\"AllowsTransparency\" SourceName=\"SubMenuPopup\" Value=\"true\">\r\n                                <Setter Property=\"Margin\" Value=\"0,0,3,3\" TargetName=\"SubMenu\"/>\r\n                                <Setter Property=\"SnapsToDevicePixels\" Value=\"true\" TargetName=\"SubMenu\"/>\r\n                                <Setter Property=\"BitmapEffect\" Value=\"{DynamicResource PopupDropShadow}\" TargetName=\"SubMenuBorder\"/>\r\n                            </Trigger>\r\n\r\n                            <Trigger Property=\"IsHighlighted\" Value=\"true\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HighlightOff}\" />\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HighlightOn}\" />\r\n                                </Trigger.EnterActions>\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                                <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\"/>\r\n                            </Trigger>\r\n                        </ControlTemplate.Triggers>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <Style TargetType=\"{x:Type Separator}\">\r\n            <Setter Property=\"Height\" Value=\"1\"/>\r\n            <Setter Property=\"Margin\" Value=\"0,2,0,2\"/>\r\n            <Setter Property=\"Focusable\" Value=\"false\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type Separator}\">\r\n                        <Border BorderBrush=\"#FF888888\" BorderThickness=\"1\"/>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <Style TargetType=\"{x:Type TabControl}\">\r\n            <Setter Property=\"Background\" Value=\"#FFFFFFFF\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n            <Setter Property=\"Padding\" Value=\"5\"/>\r\n            <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\"/>\r\n            <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource OutsideFontColor}\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type TabControl}\">\r\n                        <Grid ClipToBounds=\"true\" SnapsToDevicePixels=\"true\" KeyboardNavigation.TabNavigation=\"Local\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition x:Name=\"ColumnDefinition0\" />\r\n                                <ColumnDefinition x:Name=\"ColumnDefinition1\" Width=\"0\" />\r\n                            </Grid.ColumnDefinitions>\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\" x:Name=\"RowDefinition0\" />\r\n                                <RowDefinition Height=\"*\" x:Name=\"RowDefinition1\" />\r\n                            </Grid.RowDefinitions>\r\n                            <Border CornerRadius=\"2,2,0,0\" x:Name=\"border\" Margin=\"0,0,0,-1.5\" Panel.ZIndex=\"100\">\r\n                                <TabPanel x:Name=\"HeaderPanel\" IsItemsHost=\"true\" Panel.ZIndex=\"1\" KeyboardNavigation.TabIndex=\"1\" RenderTransformOrigin=\"0.5,0.5\" Width=\"Auto\" Height=\"Auto\" Margin=\"2,0,0,0\">\r\n                                    <TabPanel.LayoutTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                            <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                            <RotateTransform Angle=\"0\" />\r\n                                            <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                        </TransformGroup>\r\n                                    </TabPanel.LayoutTransform>\r\n                                    <TabPanel.RenderTransform>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                            <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                            <RotateTransform />\r\n                                            <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                        </TransformGroup>\r\n                                    </TabPanel.RenderTransform>\r\n\r\n                                </TabPanel>\r\n                            </Border>\r\n                            <Border Grid.Row=\"1\" x:Name=\"ContentPanel\" MinHeight=\"10\" MinWidth=\"10\" Background=\"#FFFFFFFF\" BorderBrush=\"#FF979AA2\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"1\">\r\n                                <ContentPresenter Margin=\"4\" x:Name=\"PART_SelectedContentHost\" ContentSource=\"SelectedContent\"/>\r\n                            </Border>\r\n                            <Border x:Name=\"DisabledVisualTop\" Grid.Row=\"1\" Grid.RowSpan=\"2\" Background=\"#8CFFFFFF\" CornerRadius=\"1\" Panel.ZIndex=\"1\" IsHitTestVisible=\"False\" Opacity=\"0\"/>\r\n                        </Grid>\r\n                        <ControlTemplate.Triggers>\r\n                            <Trigger Property=\"TabStripPlacement\" Value=\"Bottom\">\r\n                                <Setter Property=\"Grid.Row\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                                <Setter Property=\"Height\" TargetName=\"RowDefinition0\" Value=\"*\" />\r\n                                <Setter Property=\"Height\" TargetName=\"RowDefinition1\" Value=\"Auto\" />\r\n                                <Setter Property=\"Grid.Row\" TargetName=\"border\" Value=\"1\"/>\r\n                                <Setter Property=\"CornerRadius\" TargetName=\"ContentPanel\" Value=\"2,2,0,0\"/>\r\n                                <Setter Property=\"CornerRadius\" TargetName=\"border\" Value=\"0,0,2,2\"/>\r\n                                <Setter Property=\"Margin\" TargetName=\"border\" Value=\"0,-1.5,0,0\"/>\r\n                            </Trigger>\r\n                            <Trigger Property=\"TabStripPlacement\" Value=\"Left\">\r\n\r\n                                <Setter Property=\"Grid.Row\" TargetName=\"HeaderPanel\" Value=\"0\" />\r\n                                <Setter Property=\"Grid.Row\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                                <Setter Property=\"Grid.Column\" TargetName=\"ContentPanel\" Value=\"1\" />\r\n                                <Setter Property=\"Width\" TargetName=\"ColumnDefinition0\" Value=\"Auto\" />\r\n                                <Setter Property=\"Width\" TargetName=\"ColumnDefinition1\" Value=\"*\" />\r\n                                <Setter Property=\"Height\" TargetName=\"RowDefinition0\" Value=\"*\" />\r\n                                <Setter Property=\"Height\" TargetName=\"RowDefinition1\" Value=\"0\" />\r\n                                <Setter Property=\"Grid.Column\" TargetName=\"border\" Value=\"0\"/>\r\n                                <Setter Property=\"Margin\" TargetName=\"border\" Value=\"0,0,-1,0\"/>\r\n                                <Setter Property=\"Margin\" TargetName=\"ContentPanel\" Value=\"0,0,0,0\"/>\r\n                                <Setter Property=\"CornerRadius\" TargetName=\"border\" Value=\"0,2,2,0\"/>\r\n                                <Setter Property=\"CornerRadius\" TargetName=\"ContentPanel\" Value=\"0,2,2,0\"/>\r\n                                <Setter Property=\"Margin\" TargetName=\"HeaderPanel\" Value=\"5,2,0,0\"/>\r\n\r\n                            </Trigger>\r\n                            <Trigger Property=\"TabStripPlacement\" Value=\"Right\">\r\n                                <Setter Property=\"Grid.Row\" TargetName=\"HeaderPanel\" Value=\"0\" />\r\n                                <Setter Property=\"Grid.Row\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                                <Setter Property=\"Grid.Column\" TargetName=\"ContentPanel\" Value=\"0\" />\r\n                                <Setter Property=\"Width\" TargetName=\"ColumnDefinition0\" Value=\"*\" />\r\n                                <Setter Property=\"Width\" TargetName=\"ColumnDefinition1\" Value=\"Auto\" />\r\n                                <Setter Property=\"Height\" TargetName=\"RowDefinition0\" Value=\"*\" />\r\n                                <Setter Property=\"Height\" TargetName=\"RowDefinition1\" Value=\"0\" />\r\n                                <Setter Property=\"Grid.Column\" TargetName=\"border\" Value=\"1\"/>\r\n                                <Setter Property=\"CornerRadius\" TargetName=\"ContentPanel\" Value=\"2,0,0,2\"/>\r\n                                <Setter Property=\"CornerRadius\" TargetName=\"border\" Value=\"0,2,2,0\"/>\r\n                                <Setter Property=\"Margin\" TargetName=\"border\" Value=\"-6,2,0,0\"/>\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                                <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                                <Setter Property=\"Opacity\" TargetName=\"DisabledVisualTop\" Value=\"1\"/>\r\n                            </Trigger>\r\n                        </ControlTemplate.Triggers>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <Style d:IsControlPart=\"True\" TargetType=\"{x:Type TabItem}\">\r\n            <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\"/>\r\n            <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\"/>\r\n            <Setter Property=\"Padding\" Value=\"10,6,10,6\"/>\r\n            <Setter Property=\"MinWidth\" Value=\"5\"/>\r\n            <Setter Property=\"MinHeight\" Value=\"5\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource OutsideFontColor}\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type TabItem}\">\r\n                        <ControlTemplate.Resources>\r\n                            <Storyboard x:Key=\"SelectedOn\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"TemplateTopSelected\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"TemplateTopUnselected\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"SelectedOff\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"TemplateTopSelected\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"TemplateTopUnselected\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"HoverOn\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"TopUnselectedOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"HoverOff\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"TopUnselectedOver\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                        </ControlTemplate.Resources>\r\n                        <Grid x:Name=\"grid\">\r\n                            <Grid.LayoutTransform>\r\n                                <TransformGroup>\r\n                                    <ScaleTransform ScaleX=\"1\" ScaleY=\"1\"/>\r\n                                    <SkewTransform AngleX=\"0\" AngleY=\"0\"/>\r\n                                    <RotateTransform Angle=\"0\"/>\r\n                                    <TranslateTransform X=\"0\" Y=\"0\"/>\r\n                                </TransformGroup>\r\n                            </Grid.LayoutTransform>\r\n\r\n\r\n                            <Grid x:Name=\"TemplateTopSelected\" Margin=\"-2,0,-2,0\" Panel.ZIndex=\"0\" Opacity=\"0\">\r\n                                <Grid>\r\n                                    <Border x:Name=\"BackgroundTop\" Background=\"#FFFFFFFF\" BorderBrush=\"#FF979AA2\" BorderThickness=\"1,1,1,0\" />\r\n                                </Grid>\r\n                                <Border x:Name=\"DisabledVisualTopSelected\" Background=\"#8CFFFFFF\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" />\r\n                            </Grid>\r\n                            <Grid x:Name=\"TemplateTopUnselected\" Margin=\"0,2,0,1\" >\r\n                                <Grid>\r\n                                    <Border x:Name=\"TopUnselected_Background\" BorderBrush=\"#FF94979F\" BorderThickness=\"1,1,1,0\">\r\n                                        <Border.Background>\r\n                                            <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                                <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                                <GradientStop Color=\"#FFF3F3F3\" Offset=\"0.152\"/>\r\n                                                <GradientStop Color=\"#FFF3F3F3\" Offset=\"0.456\"/>\r\n                                                <GradientStop Color=\"#FFEBEBEB\" Offset=\"0.465\"/>\r\n                                                <GradientStop Color=\"#FFD6D6D5\" Offset=\"1\"/>\r\n                                            </LinearGradientBrush>\r\n                                        </Border.Background>\r\n                                    </Border>\r\n                                    <Border x:Name=\"TopUnselectedOver\" Background=\"{StaticResource BtnOverFill}\" BorderBrush=\"{StaticResource TabOverStroke}\" BorderThickness=\"1,1,1,0\" Opacity=\"0\"/>\r\n                                    <Border x:Name=\"TopUnselected_Highlight\" Margin=\"1\" BorderBrush=\"#FFFFFFFF\" BorderThickness=\"1,1,1,0\"/>\r\n                                </Grid>\r\n                                <Border x:Name=\"DisabledVisualTopUnSelected\" Background=\"#8CFFFFFF\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\"/>\r\n                            </Grid>\r\n\r\n\r\n                            <ContentPresenter HorizontalAlignment=\"Center\" Margin=\"{TemplateBinding Padding}\" x:Name=\"ContentSite\" VerticalAlignment=\"Center\" RecognizesAccessKey=\"True\" ContentSource=\"Header\" Opacity=\"1\"/>\r\n\r\n                        </Grid>\r\n                        <ControlTemplate.Triggers>\r\n                            <Trigger Property=\"TabStripPlacement\" Value=\"Left\">\r\n                                <Setter Property=\"LayoutTransform\" TargetName=\"grid\">\r\n                                    <Setter.Value>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                            <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                            <RotateTransform Angle=\"-90\" />\r\n                                            <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                        </TransformGroup>\r\n                                    </Setter.Value>\r\n                                </Setter>\r\n                            </Trigger>\r\n                            <Trigger Property=\"TabStripPlacement\" Value=\"Right\">\r\n                                <Setter Property=\"LayoutTransform\" TargetName=\"grid\">\r\n                                    <Setter.Value>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                            <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                            <RotateTransform Angle=\"90\" />\r\n                                            <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                        </TransformGroup>\r\n                                    </Setter.Value>\r\n                                </Setter>\r\n                            </Trigger>\r\n                            <Trigger Property=\"TabStripPlacement\" Value=\"Bottom\">\r\n                                <Setter Property=\"LayoutTransform\" TargetName=\"ContentSite\">\r\n                                    <Setter.Value>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform ScaleX=\"1\" ScaleY=\"1\" />\r\n                                            <SkewTransform AngleX=\"0\" AngleY=\"0\" />\r\n                                            <RotateTransform Angle=\"180\" />\r\n                                            <TranslateTransform X=\"0\" Y=\"0\" />\r\n                                        </TransformGroup>\r\n                                    </Setter.Value>\r\n                                </Setter>\r\n                                <Setter Property=\"LayoutTransform\" TargetName=\"grid\">\r\n                                    <Setter.Value>\r\n                                        <TransformGroup>\r\n                                            <ScaleTransform ScaleX=\"1\" ScaleY=\"1\"/>\r\n                                            <SkewTransform AngleX=\"0\" AngleY=\"0\"/>\r\n                                            <RotateTransform Angle=\"180\"/>\r\n                                            <TranslateTransform X=\"0\" Y=\"0\"/>\r\n                                        </TransformGroup>\r\n                                    </Setter.Value>\r\n                                </Setter>\r\n                            </Trigger>\r\n                            <MultiTrigger>\r\n                                <MultiTrigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                                </MultiTrigger.ExitActions>\r\n                                <MultiTrigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" x:Name=\"HoverOn_BeginStoryboard\"/>\r\n                                </MultiTrigger.EnterActions>\r\n                                <MultiTrigger.Conditions>\r\n                                    <Condition Property=\"IsMouseOver\" Value=\"True\" />\r\n                                    <Condition Property=\"Selector.IsSelected\" Value=\"False\" />\r\n                                </MultiTrigger.Conditions>\r\n                            </MultiTrigger>\r\n                            <Trigger Property=\"IsSelected\" Value=\"True\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource SelectedOff}\" x:Name=\"SelectedOff_BeginStoryboard\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\"/>\r\n                                </Trigger.EnterActions>\r\n                                <Setter Property=\"Panel.ZIndex\" Value=\"100\" />\r\n\r\n                            </Trigger>\r\n                            <MultiTrigger>\r\n                                <MultiTrigger.Conditions>\r\n                                    <Condition Property=\"IsMouseOver\" Value=\"True\" SourceName=\"grid\" />\r\n                                    <Condition Property=\"Selector.IsSelected\" Value=\"True\" />\r\n                                </MultiTrigger.Conditions>\r\n                            </MultiTrigger>\r\n                            <Trigger Property=\"IsEnabled\" Value=\"False\">\r\n                                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                                <Setter Property=\"Visibility\" TargetName=\"DisabledVisualTopUnSelected\" Value=\"Visible\"/>\r\n                            </Trigger>\r\n                        </ControlTemplate.Triggers>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n            <Setter Property=\"Foreground\" Value=\"{DynamicResource OutsideFontColor}\"/>\r\n        </Style>\r\n\r\n        <Style x:Key=\"NuclearSliderThumb\" d:IsControlPart=\"True\" TargetType=\"{x:Type Thumb}\">\r\n            <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n            <Setter Property=\"Height\" Value=\"21\"/>\r\n            <Setter Property=\"Width\" Value=\"11\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                        <ControlTemplate.Resources>\r\n                            <Storyboard x:Key=\"HoverOn\">\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"Over\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"HoverOff\">\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"Over\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"PressedOn\">\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"Press\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"PressedOff\">\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"Press\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"FocusedOn\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"FocusedOff\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                        </ControlTemplate.Resources>\r\n                        <Grid>\r\n                            <Path x:Name=\"Base\" Stretch=\"Fill\" Stroke=\"#FF707070\" StrokeThickness=\"1\" StrokeLineJoin=\"Round\" Data=\"F1 M 0,1 C 0,0 1,0 1,0 L 7,0 C 7,0 7.750000,0 8,1 C 8.013672,1.054688 8,11.875000 8,11.875000 L 4.625000,15.250000 C 4.312500,15.583984 3.625000,15.250000 3.625000,15.250000 L 0,11.750000 C 0,11.750000 0,1.062500 0,1 Z\">\r\n                                <Path.Fill>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                        <GradientStop Color=\"#FFF2F2F2\" Offset=\"0.498\"/>\r\n                                        <GradientStop Color=\"#FFE1E1E1\" Offset=\"0.498\"/>\r\n                                        <GradientStop Color=\"#FFF3F3F3\" Offset=\"0.143\"/>\r\n                                        <GradientStop Color=\"#FFD1D1D1\" Offset=\"1\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Path.Fill>\r\n                            </Path>\r\n                            <Path x:Name=\"Over\" Fill=\"{StaticResource ThumbOver}\" Stroke=\"{StaticResource TextBoxPressBrush}\" Stretch=\"Fill\" Data=\"F1 M 0,1 C 0,0 1,0 1,0 L 7,0 C 7,0 7.750000,0 8,1 C 8.013672,1.054688 8,11.875000 8,11.875000 L 4.625000,15.250000 C 4.312500,15.583984 3.625000,15.250000 3.625000,15.250000 L 0,11.750000 C 0,11.750000 0,1.062500 0,1 Z\" Opacity=\"0\"/>\r\n                            <Path x:Name=\"Press\" Fill=\"{StaticResource ThumbPress}\" Stroke=\"{StaticResource btnPressStroke2}\" Stretch=\"Fill\" Data=\"F1 M 0,1 C 0,0 1,0 1,0 L 7,0 C 7,0 7.750000,0 8,1 C 8.013672,1.054688 8,11.875000 8,11.875000 L 4.625000,15.250000 C 4.312500,15.583984 3.625000,15.250000 3.625000,15.250000 L 0,11.750000 C 0,11.750000 0,1.062500 0,1 Z\" Opacity=\"0\"/>\r\n                            <Path x:Name=\"Highlight\" Margin=\"1\" Stroke=\"#FFFFFFFF\" Stretch=\"Fill\" Data=\"F1 M 0,1 C 0,0 1,0 1,0 L 7,0 C 7,0 7.750000,0 8,1 C 8.013672,1.054688 8,11.875000 8,11.875000 L 4.625000,15.250000 C 4.312500,15.583984 3.625000,15.250000 3.625000,15.250000 L 0,11.750000 C 0,11.750000 0,1.062500 0,1 Z\"/>\r\n                            <Path x:Name=\"DisabledVisualElement\" Fill=\"#FFFFFFFF\" Stroke=\"#FFFFFFFF\" StrokeThickness=\"1\" StrokeLineJoin=\"Round\" Stretch=\"Fill\" Opacity=\"0.5\" Data=\"F1 M 0,1 C 0,0 1,0 1,0 L 7,0 C 7,0 7.750000,0 8,1 C 8.013672,1.054688 8,11.875000 8,11.875000 L 4.625000,15.250000 C 4.312500,15.583984 3.625000,15.250000 3.625000,15.250000 L 0,11.750000 C 0,11.750000 0,1.062500 0,1 Z\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\" />\r\n                            <Path x:Name=\"FocusVisualElement\" Margin=\"-1\" Stroke=\"{StaticResource btnFocus}\" StrokeThickness=\"1\"  StrokeLineJoin=\"Round\" Stretch=\"Fill\" Data=\"F1 M 0.009766,1.453125 C 0.291016,0.093750 1.509766,0.000000 1.509766,0.000000 L 6.509766,0.000000 C 6.509766,0.000000 7.728516,0.000000 8.009766,1.500000 L 8.009766,11.500000 L 4.988770,15.200195 C 4.197266,15.854492 3.384766,15.166992 3.384766,15.166992 L 0.009766,11.500000 C 0.009766,11.500000 -0.012207,1.560059 0.009766,1.453125 Z\" IsHitTestVisible=\"false\" Opacity=\"0\"/>\r\n                        </Grid>\r\n                        <ControlTemplate.Triggers>\r\n                            <Trigger Property=\"IsFocused\" Value=\"True\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource FocusedOff}\" x:Name=\"FocusedOff_BeginStoryboard\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource FocusedOn}\" x:Name=\"FocusedOn_BeginStoryboard\"/>\r\n                                </Trigger.EnterActions>\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard x:Name=\"HoverOff_BeginStoryboard\" Storyboard=\"{StaticResource HoverOff}\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                                </Trigger.EnterActions>\r\n\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsDragging\" Value=\"True\">\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard x:Name=\"PressedOn_BeginStoryboard\" Storyboard=\"{StaticResource PressedOn}\"/>\r\n                                </Trigger.EnterActions>\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard x:Name=\"PressedOff_BeginStoryboard\" Storyboard=\"{StaticResource PressedOff}\"/>\r\n                                </Trigger.ExitActions>\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                                <Setter Property=\"Visibility\" TargetName=\"DisabledVisualElement\" Value=\"Visible\"/>\r\n                            </Trigger>\r\n                        </ControlTemplate.Triggers>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <Style TargetType=\"{x:Type Slider}\">\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type Slider}\">\r\n                        <Grid x:Name=\"GridRoot\">\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition Height=\"Auto\" MinHeight=\"{TemplateBinding MinHeight}\"/>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                            </Grid.RowDefinitions>\r\n\r\n                            <TickBar Visibility=\"Collapsed\" x:Name=\"TopTick\" Height=\"4\" SnapsToDevicePixels=\"True\" Placement=\"Top\" Fill=\"#FF405A78\"/>\r\n                            <Rectangle Margin=\"5.5,0,5.5,0\" Grid.Column=\"0\" Grid.ColumnSpan=\"3\" Height=\"6\" RadiusX=\"3\" RadiusY=\"3\">\r\n                                <Rectangle.Fill>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                        <GradientStop Color=\"#FFB0B0B0\" Offset=\"0.341\"/>\r\n                                        <GradientStop Color=\"#FFE7EAEA\" Offset=\"0.346\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n\r\n                            <Track x:Name=\"PART_Track\">\r\n                                <Track.Thumb>\r\n                                    <Thumb Style=\"{DynamicResource NuclearSliderThumb}\"/>\r\n                                </Track.Thumb>\r\n                                <Track.IncreaseRepeatButton>\r\n                                    <RepeatButton Style=\"{DynamicResource NuclearScrollRepeatButtonStyle}\" Command=\"Slider.IncreaseLarge\"/>\r\n                                </Track.IncreaseRepeatButton>\r\n                                <Track.DecreaseRepeatButton>\r\n                                    <RepeatButton Style=\"{DynamicResource NuclearScrollRepeatButtonStyle}\" Command=\"Slider.DecreaseLarge\"/>\r\n                                </Track.DecreaseRepeatButton>\r\n                            </Track>\r\n\r\n                            <TickBar Visibility=\"Collapsed\" Grid.Row=\"2\" x:Name=\"BottomTick\" Height=\"4\" SnapsToDevicePixels=\"True\" Placement=\"Bottom\" Fill=\"{TemplateBinding Foreground}\"/>\r\n                        </Grid>\r\n                        <ControlTemplate.Triggers>\r\n                            <Trigger Property=\"TickPlacement\" Value=\"TopLeft\">\r\n                                <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"TopTick\"/>\r\n                            </Trigger>\r\n                            <Trigger Property=\"TickPlacement\" Value=\"BottomRight\">\r\n                                <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"BottomTick\"/>\r\n                            </Trigger>\r\n                            <Trigger Property=\"TickPlacement\" Value=\"Both\">\r\n                                <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"TopTick\"/>\r\n                                <Setter Property=\"Visibility\" Value=\"Visible\" TargetName=\"BottomTick\"/>\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsEnabled\" Value=\"false\"/>\r\n\r\n                            <Trigger Property=\"Orientation\" Value=\"Vertical\">\r\n                                <Setter Property=\"LayoutTransform\" TargetName=\"GridRoot\">\r\n                                    <Setter.Value>\r\n                                        <RotateTransform Angle=\"-90\"/>\r\n                                    </Setter.Value>\r\n                                </Setter>\r\n                                <Setter TargetName=\"PART_Track\" Property=\"Orientation\" Value=\"Horizontal\"/>\r\n                            </Trigger>\r\n\r\n                        </ControlTemplate.Triggers>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <Style TargetType=\"{x:Type TreeView}\">\r\n            <Setter Property=\"Background\" Value=\"#FFFFFFFF\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource OutsideFontColor}\"/>\r\n            <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n            <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n            <Setter Property=\"BorderBrush\" Value=\"{StaticResource btnPressStroke2}\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n            <Setter Property=\"Padding\" Value=\"4\"/>\r\n            <Setter Property=\"Cursor\" Value=\"Arrow\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource OutsideFontColor}\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type TreeView}\">\r\n                        <Grid>\r\n                            <Border x:Name=\"Border\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\">\r\n                                <ScrollViewer   Focusable=\"False\" Background=\"{TemplateBinding Background}\" Padding=\"4\" HorizontalScrollBarVisibility=\"Auto\" VerticalScrollBarVisibility=\"Auto\" CanContentScroll=\"False\">\r\n                                    <ItemsPresenter/>\r\n                                </ScrollViewer>\r\n                            </Border>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <Style x:Key=\"NuclearTreeViewItemToggleButton\" d:IsControlPart=\"True\" TargetType=\"{x:Type ToggleButton}\">\r\n            <Setter Property=\"Focusable\" Value=\"False\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                        <ControlTemplate.Resources>\r\n                            <Storyboard x:Key=\"HoverOn\">\r\n                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"CheckedVisual\" Storyboard.TargetProperty=\"(Shape.Fill)\">\r\n                                    <DiscreteObjectKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"{StaticResource treeviewArrowHover}\"/>\r\n                                </ObjectAnimationUsingKeyFrames>\r\n                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"UncheckedVisual\" Storyboard.TargetProperty=\"(Shape.Fill)\">\r\n                                    <DiscreteObjectKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"{StaticResource treeviewArrowHover}\"/>\r\n                                </ObjectAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"HoverOff\">\r\n                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"CheckedVisual\" Storyboard.TargetProperty=\"(Shape.Fill)\">\r\n                                    <DiscreteObjectKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"{StaticResource treeviewArrowChecked}\"/>\r\n                                </ObjectAnimationUsingKeyFrames>\r\n                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName=\"UncheckedVisual\" Storyboard.TargetProperty=\"(Shape.Fill)\">\r\n                                    <DiscreteObjectKeyFrame KeyTime=\"00:00:00.4000000\" Value=\"{StaticResource treeviewArrowUnchecked}\"/>\r\n                                </ObjectAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"CheckedOn\">\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"UncheckedVisual\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"CheckedVisual\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"CheckedOff\">\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"UncheckedVisual\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"CheckedVisual\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                            </Storyboard>\r\n                        </ControlTemplate.Resources>\r\n                        <Grid HorizontalAlignment=\"Right\" Margin=\"2,2,5,2\">\r\n                            <Path x:Name=\"UncheckedVisual\" Height=\"9\" Width=\"6\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Center\" Fill=\"{StaticResource treeviewArrowUnchecked}\" StrokeLineJoin=\"Miter\" Data=\"M 0,0 L 0,9 L 5,4.5 Z\"/>\r\n                            <Path x:Name=\"CheckedVisual\" Height=\"6\" Width=\"6\" HorizontalAlignment=\"Right\" VerticalAlignment=\"Center\" Fill=\"{StaticResource treeviewArrowChecked}\" StrokeLineJoin=\"Miter\" Opacity=\"0\" Data=\"M 6,0 L 6,6 L 0,6 Z\"/>\r\n                        </Grid>\r\n                        <ControlTemplate.Triggers>\r\n                            <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" />\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                                </Trigger.EnterActions>\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsChecked\" Value=\"True\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource CheckedOff}\" />\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource CheckedOn}\" />\r\n                                </Trigger.EnterActions>\r\n                            </Trigger>\r\n                        </ControlTemplate.Triggers>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <Style d:IsControlPart=\"True\" TargetType=\"{x:Type TreeViewItem}\">\r\n            <Setter Property=\"Background\" Value=\"Transparent\"/>\r\n            <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n            <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n            <Setter Property=\"Padding\" Value=\"5,3,15,3\"/>\r\n            <Setter Property=\"Cursor\" Value=\"Arrow\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource OutsideFontColor}\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type TreeViewItem}\">\r\n                        <ControlTemplate.Resources>\r\n                            <Storyboard x:Key=\"SelectedOn\">\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"select_gradient\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"select_highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"SelectedOff\">\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"select_gradient\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"select_highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"HoverOn\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"hover_gradient\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"0.65\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"HoverOff\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"hover_gradient\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"highlight\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n\r\n                            </Storyboard>\r\n                        </ControlTemplate.Resources>\r\n                        <Grid>\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition MinWidth=\"19\" Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"Auto\"/>\r\n                                <ColumnDefinition Width=\"*\"/>\r\n                            </Grid.ColumnDefinitions>\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\"/>\r\n                                <RowDefinition/>\r\n                            </Grid.RowDefinitions>\r\n                            <ToggleButton x:Name=\"Expander\" Style=\"{DynamicResource NuclearTreeViewItemToggleButton}\" IsChecked=\"{Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}\" ClickMode=\"Press\"/>\r\n                            <Rectangle x:Name=\"select_gradient\" Grid.Column=\"1\" Fill=\"{StaticResource BtnOverFill}\" Stroke=\"{StaticResource selectedStroke}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\" IsHitTestVisible=\"False\"/>\r\n                            <Rectangle x:Name=\"select_highlight\" Margin=\"1\" Grid.Column=\"1\" Stroke=\"#A0FFFFFF\" Opacity=\"0\"/>\r\n                            <Rectangle x:Name=\"inactive\" Grid.Column=\"1\" Fill=\"#FF999999\" Stroke=\"#FF333333\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\" IsHitTestVisible=\"False\"/>\r\n                            <Rectangle x:Name=\"hover_gradient\" Grid.Column=\"1\" Fill=\"{StaticResource hoverGradient}\" Stroke=\"{StaticResource hoverStroke}\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\" IsHitTestVisible=\"False\"/>\r\n                            <Rectangle x:Name=\"highlight\" Grid.Column=\"1\" Margin=\"1\" StrokeThickness=\"1\" RadiusX=\"1\" RadiusY=\"1\" Opacity=\"0\" IsHitTestVisible=\"False\" Stroke=\"#FFFFFFFF\"/>\r\n                            <ContentPresenter HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" x:Name=\"PART_Header\" ContentSource=\"Header\" Grid.Column=\"1\" Margin=\"{TemplateBinding Padding}\" />\r\n\r\n                            <ItemsPresenter Grid.Column=\"1\" Grid.ColumnSpan=\"2\" Grid.Row=\"1\" x:Name=\"ItemsHost\"/>\r\n                        </Grid>\r\n                        <ControlTemplate.Triggers>\r\n                            <Trigger Property=\"IsMouseOver\" Value=\"true\" SourceName=\"PART_Header\" >\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" />\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\" />\r\n                                </Trigger.EnterActions>\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsExpanded\" Value=\"false\">\r\n                                <Setter Property=\"Visibility\" Value=\"Collapsed\" TargetName=\"ItemsHost\"/>\r\n                            </Trigger>\r\n                            <Trigger Property=\"HasItems\" Value=\"false\">\r\n                                <Setter Property=\"Visibility\" Value=\"Hidden\" TargetName=\"Expander\"/>\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsSelected\" Value=\"true\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource SelectedOff}\" />\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource SelectedOn}\" />\r\n                                </Trigger.EnterActions>\r\n\r\n                            </Trigger>\r\n                            <MultiTrigger>\r\n                                <MultiTrigger.Conditions>\r\n                                    <Condition Property=\"IsSelected\" Value=\"true\"/>\r\n                                    <Condition Property=\"IsSelectionActive\" Value=\"false\"/>\r\n                                </MultiTrigger.Conditions>\r\n                                <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}\"/>\r\n                            </MultiTrigger>\r\n                            <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                                <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\"/>\r\n                            </Trigger>\r\n                        </ControlTemplate.Triggers>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <Style x:Key=\"{x:Static ToolBar.ButtonStyleKey}\" TargetType=\"{x:Type Button}\" BasedOn=\"{x:Null}\">\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource ButtonFontColor}\"/>\r\n\t\t\t\t\t\t\t<Setter Property=\"FontSize\" Value=\"10\"/>\r\n\t\t\t\t<Setter Property=\"MinHeight\" Value=\"18\"/>\r\n\t\t\t\t<Setter Property=\"MinWidth\" Value=\"50\"/>\r\n            <Setter Property=\"Padding\" Value=\"3\"/>\r\n            <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource NuclearButtonFocusVisual}\"/>\r\n            <Setter Property=\"Template\" Value=\"{DynamicResource ButtonTemplate}\" />\r\n        </Style>\r\n\r\n        <Style x:Key=\"{x:Static ToolBar.CheckBoxStyleKey}\" TargetType=\"{x:Type CheckBox}\">\r\n\t\t\t\t<Setter Property=\"FontSize\" Value=\"10\"/>\r\n            <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n            <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource CheckBoxFocusVisual}\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource OutsideFontColor}\"/>\r\n            <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n            <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n            <Setter Property=\"Padding\" Value=\"4,1,0,0\"/>\r\n\r\n            <Setter Property=\"Template\" Value=\"{DynamicResource CheckBoxTemplate}\" />\r\n        </Style>\r\n\r\n        <Style x:Key=\"{x:Static ToolBar.RadioButtonStyleKey}\" TargetType=\"{x:Type RadioButton}\">\r\n\t\t\t\t<Setter Property=\"FontSize\" Value=\"10\"/>\r\n            <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n            <Setter Property=\"FocusVisualStyle\" Value=\"{DynamicResource RadioButtonFocusVisual}\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource OutsideFontColor}\"/>\r\n            <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n            <Setter Property=\"VerticalContentAlignment\" Value=\"Top\"/>\r\n            <Setter Property=\"Padding\" Value=\"4,1,0,0\"/>\r\n            <Setter Property=\"Template\" Value=\"{DynamicResource RadioButtonTemplate}\" />\r\n        </Style>\r\n\r\n        <Style x:Key=\"{x:Static ToolBar.ComboBoxStyleKey}\" TargetType=\"{x:Type ComboBox}\">\r\n\t\t\t\t<Setter Property=\"FontSize\" Value=\"10\"/>\r\n            <Setter Property=\"SnapsToDevicePixels\" Value=\"true\"/>\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource OutsideFontColor}\"/>\r\n            <Setter Property=\"Template\" Value=\"{DynamicResource ComboBoxTemplate}\" />\r\n        </Style>\r\n\r\n        <Style x:Key=\"{x:Static ToolBar.TextBoxStyleKey}\" TargetType=\"{x:Type TextBox}\">\r\n\t\t\t\t<Setter Property=\"FontSize\" Value=\"10\"/>\r\n            <Setter Property=\"KeyboardNavigation.TabNavigation\" Value=\"None\"/>\r\n            <Setter Property=\"FocusVisualStyle\" Value=\"{x:Null}\"/>\r\n            <Setter Property=\"AllowDrop\" Value=\"true\"/>\r\n            <Setter Property=\"Background\" Value=\"#FFFFFFFF\"/>\r\n            <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\"/>\r\n            <Setter Property=\"VerticalContentAlignment\" Value=\"Stretch\"/>\r\n            <Setter Property=\"Padding\" Value=\"4\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n            <Setter Property=\"Template\" Value=\"{DynamicResource TextBoxTemplate}\" />\r\n        </Style>\r\n\r\n        <LinearGradientBrush x:Key=\"ToolBarHorizontalBackground\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n            <GradientStop Color=\"#FFFFFF\" Offset=\"0\"/>\r\n            <GradientStop Color=\"#FFFBFF\" Offset=\"0.5\"/>\r\n            <GradientStop Color=\"#F7F7F7\" Offset=\"1\"/>\r\n        </LinearGradientBrush>\r\n        <LinearGradientBrush x:Key=\"ToolBarToggleButtonHorizontalBackground\" EndPoint=\"0,1\" StartPoint=\"0,0\">\r\n            <GradientStop Color=\"#ECECEC\" Offset=\"0\"/>\r\n            <GradientStop Color=\"#DDDDDD\" Offset=\"0.5\"/>\r\n            <GradientStop Color=\"#A0A0A0\" Offset=\"1\"/>\r\n        </LinearGradientBrush>\r\n        <SolidColorBrush x:Key=\"ToolBarButtonHover\" Color=\"#FF818181\" />\r\n        <SolidColorBrush x:Key=\"ToolBarGripper\" Color=\"#C6C3C6\"/>\r\n        <Style x:Key=\"ToolBarHorizontalOverflowButtonStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n            <Setter Property=\"Background\" Value=\"{StaticResource ToolBarToggleButtonHorizontalBackground}\"/>\r\n            <Setter Property=\"MinHeight\" Value=\"0\"/>\r\n            <Setter Property=\"MinWidth\" Value=\"0\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                        <ControlTemplate.Resources>\r\n                            <Storyboard x:Key=\"HoverOn\">\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundOver\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundOver_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0.65\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"HoverOff\">\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundOver_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"PressedOn\">\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\" To=\"0.84\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgoundPressed_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0.65\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"PressedOff\">\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgoundPressed_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"FocusedOn\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"FocusedOff\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                        </ControlTemplate.Resources>\r\n                        <Border SnapsToDevicePixels=\"true\" x:Name=\"Bd\" CornerRadius=\"0,0,0,0\" >\r\n                            <Grid>\r\n                                <Border x:Name=\"BackgroundNorm\" Background=\"{StaticResource grayGradient}\" BorderThickness=\"1\" BorderBrush=\"#FF8E8F8F\" CornerRadius=\"0,3,3,0\"/>\r\n                                <Border x:Name=\"BackgroundNorm_highlight\" Margin=\"1\" BorderBrush=\"#F2FFFFFF\" BorderThickness=\"1,0,1,1\" CornerRadius=\"0,3,3,0\" Opacity=\"0.65\"/>\r\n                                <Border x:Name=\"BackgroundOver\" Background=\"{StaticResource BtnOverFill}\" BorderBrush=\"{StaticResource TextBoxPressBrush}\" BorderThickness=\"1\" CornerRadius=\"0,3,3,0\" Opacity=\"0\"/>\r\n                                <Border x:Name=\"BackgroundOver_Highlight\" Margin=\"1\" Background=\"{StaticResource btnOverFillHighlight}\" BorderBrush=\"{StaticResource hoverStroke}\" BorderThickness=\"1,0,1,1\" CornerRadius=\"0,3,3,0\" Opacity=\"0\"/>\r\n                                <Border x:Name=\"BackgroundPressed\" Background=\"{StaticResource BtnPressFill}\" BorderBrush=\"{StaticResource btnPressBorder}\" BorderThickness=\"1\" CornerRadius=\"0,3,3,0\" Opacity=\"0\"/>\r\n                                <Border x:Name=\"BackgoundPressed_Highlight\" Background=\"{StaticResource btnPressFillHighlight}\" Margin=\"1\" CornerRadius=\"0,3,3,0\" Opacity=\"0\"/>\r\n                                <Border x:Name=\"Background_overlay\" Margin=\"1,1,1,0\" BorderThickness=\"1\" CornerRadius=\"0,3,3,0\">\r\n                                    <Border.Background>\r\n                                        <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                            <GradientStop Color=\"#00FFFFFF\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#72FFFFFF\" Offset=\"0.157\"/>\r\n                                            <GradientStop Color=\"#72FFFFFF\" Offset=\"0.5\"/>\r\n                                            <GradientStop Color=\"#00FFFFFF\" Offset=\"0.51\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Border.Background>\r\n                                </Border>\r\n                                <Canvas SnapsToDevicePixels=\"true\" HorizontalAlignment=\"Right\" Margin=\"7,2,2,2\" VerticalAlignment=\"Bottom\" Width=\"6\" Height=\"7\">\r\n                                    <Path Stroke=\"White\" Data=\"M 1 1.5 L 6 1.5\"/>\r\n                                    <Path Stroke=\"{TemplateBinding Foreground}\" Data=\"M 0 0.5 L 5 0.5\"/>\r\n                                    <Path Fill=\"White\" Data=\"M 0.5 4 L 6.5 4 L 3.5 7 Z\"/>\r\n                                    <Path Fill=\"{TemplateBinding Foreground}\" Data=\"M -0.5 3 L 5.5 3 L 2.5 6 Z\"/>\r\n                                </Canvas>\r\n                                <Border x:Name=\"FocusVisualElement\" Margin=\"1\" BorderBrush=\"{StaticResource btnFocus}\" BorderThickness=\"1\" CornerRadius=\"2\" IsHitTestVisible=\"false\" Opacity=\"0\"/>\r\n                                <Border x:Name=\"DisabledVisualElement\" Background=\"#FFF1F1F1\" BorderBrush=\"#FFB2B2B2\" BorderThickness=\"1\" CornerRadius=\"3\" IsHitTestVisible=\"false\" Opacity=\"0\" />\r\n                            </Grid>\r\n                        </Border>\r\n                        <ControlTemplate.Triggers>\r\n                            <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard x:Name=\"FocusedOff_BeginStoryboard\" Storyboard=\"{StaticResource FocusedOff}\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard x:Name=\"FocusedOn_BeginStoryboard\" Storyboard=\"{StaticResource FocusedOn}\"/>\r\n                                </Trigger.EnterActions>\r\n\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                                </Trigger.EnterActions>\r\n\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" />\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\"/>\r\n                                </Trigger.EnterActions>\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsEnabled\" Value=\"true\"/>\r\n                            <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                                <Setter Property=\"Foreground\" Value=\"{StaticResource ToolBarGripper}\"/>\r\n                            </Trigger>\r\n                        </ControlTemplate.Triggers>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n        <SolidColorBrush x:Key=\"ToolBarSubMenuBackground\" Color=\"#FFFDFDFD\"/>\r\n        <SolidColorBrush x:Key=\"ToolBarMenuBorder\" Color=\"#FFFFFFFF\"/>\r\n        <Style x:Key=\"ToolBarThumbStyle\" TargetType=\"{x:Type Thumb}\">\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                        <Border SnapsToDevicePixels=\"True\" Background=\"Transparent\" Padding=\"{TemplateBinding Padding}\" CornerRadius=\"0,0,0,0\">\r\n                            <Rectangle>\r\n                                <Rectangle.Fill>\r\n                                    <DrawingBrush TileMode=\"Tile\" Viewbox=\"0,0,4,4\" ViewboxUnits=\"Absolute\" Viewport=\"0,0,4,4\" ViewportUnits=\"Absolute\">\r\n                                        <DrawingBrush.Drawing>\r\n                                            <DrawingGroup>\r\n                                                <GeometryDrawing Brush=\"White\" Geometry=\"M 1 1 L 1 3 L 3 3 L 3 1 z\"/>\r\n                                                <GeometryDrawing Brush=\"{StaticResource ToolBarGripper}\" Geometry=\"M 0 0 L 0 2 L 2 2 L 2 0 z\"/>\r\n                                            </DrawingGroup>\r\n                                        </DrawingBrush.Drawing>\r\n                                    </DrawingBrush>\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                        </Border>\r\n                        <ControlTemplate.Triggers>\r\n                            <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                                <Setter Property=\"Cursor\" Value=\"SizeAll\"/>\r\n                            </Trigger>\r\n                        </ControlTemplate.Triggers>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n        <LinearGradientBrush x:Key=\"ToolBarToggleButtonVerticalBackground\" EndPoint=\"1,0\" StartPoint=\"0,0\">\r\n            <GradientStop Color=\"#ECECEC\" Offset=\"0\"/>\r\n            <GradientStop Color=\"#DDDDDD\" Offset=\"0.5\"/>\r\n            <GradientStop Color=\"#A0A0A0\" Offset=\"1\"/>\r\n        </LinearGradientBrush>\r\n        <Style x:Key=\"ToolBarVerticalOverflowButtonStyle\" TargetType=\"{x:Type ToggleButton}\">\r\n            <Setter Property=\"Background\" Value=\"{StaticResource ToolBarToggleButtonVerticalBackground}\"/>\r\n            <Setter Property=\"MinHeight\" Value=\"0\"/>\r\n            <Setter Property=\"MinWidth\" Value=\"0\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                        <Border SnapsToDevicePixels=\"true\" x:Name=\"Bd\" Background=\"{TemplateBinding Background}\" CornerRadius=\"0,0,3,3\">\r\n                            <Canvas SnapsToDevicePixels=\"true\" HorizontalAlignment=\"Right\" Margin=\"2,7,2,2\" VerticalAlignment=\"Bottom\" Width=\"7\" Height=\"6\">\r\n                                <Path Stroke=\"White\" Data=\"M 1.5 1 L 1.5 6\"/>\r\n                                <Path Stroke=\"{TemplateBinding Foreground}\" Data=\"M 0.5 0 L 0.5 5\"/>\r\n                                <Path Fill=\"White\" Data=\"M 3.5 0.5 L 7 3.5 L 4 6.5 Z\"/>\r\n                                <Path Fill=\"{TemplateBinding Foreground}\" Data=\"M 3 -0.5 L 6 2.5 L 3 5.5 Z\"/>\r\n                            </Canvas>\r\n                        </Border>\r\n                        <ControlTemplate.Triggers>\r\n                            <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                                <Setter Property=\"Background\" TargetName=\"Bd\" Value=\"{StaticResource ToolBarButtonHover}\"/>\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsKeyboardFocused\" Value=\"true\">\r\n                                <Setter Property=\"Background\" TargetName=\"Bd\" Value=\"{StaticResource ToolBarButtonHover}\"/>\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                                <Setter Property=\"Foreground\" Value=\"{StaticResource ToolBarGripper}\"/>\r\n                            </Trigger>\r\n                        </ControlTemplate.Triggers>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n        <LinearGradientBrush x:Key=\"ToolBarVerticalBackground\" EndPoint=\"1,0\" StartPoint=\"0,0\">\r\n            <GradientStop Color=\"#FFFFFF\" Offset=\"0\"/>\r\n            <GradientStop Color=\"#FFFBFF\" Offset=\"0.5\"/>\r\n            <GradientStop Color=\"#F7F7F7\" Offset=\"1\"/>\r\n        </LinearGradientBrush>\r\n        <Style TargetType=\"{x:Type ToolBar}\">\r\n            <Setter Property=\"Background\" Value=\"{StaticResource ToolBarHorizontalBackground}\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type ToolBar}\">\r\n                        <Grid SnapsToDevicePixels=\"true\" Margin=\"3,1,1,1\" x:Name=\"Grid\">\r\n                            <Grid HorizontalAlignment=\"Right\" x:Name=\"OverflowGrid\" Margin=\"0,0,-3,0\">\r\n                                <ToggleButton IsEnabled=\"{TemplateBinding HasOverflowItems}\" FocusVisualStyle=\"{x:Null}\" x:Name=\"OverflowButton\" Style=\"{StaticResource ToolBarHorizontalOverflowButtonStyle}\" ClickMode=\"Press\" IsChecked=\"{Binding Path=IsOverflowOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}\"/>\r\n                                <Popup Focusable=\"false\" AllowsTransparency=\"true\" IsOpen=\"{Binding Path=IsOverflowOpen, RelativeSource={RelativeSource TemplatedParent}}\" Placement=\"Bottom\" PopupAnimation=\"{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}\" StaysOpen=\"False\" x:Name=\"OverflowPopup\">\r\n                                    <Border x:Name=\"Shdw\" Background=\"#FFFFFFFF\" BorderBrush=\"{StaticResource TextBoxNorm}\" BorderThickness=\"1\" CornerRadius=\"1,1,3,3\">\r\n                                        <Border BorderThickness=\"1,1,1,1\" >\r\n                                            <ToolBarOverflowPanel Focusable=\"true\" SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" FocusVisualStyle=\"{x:Null}\" Margin=\"2\" x:Name=\"PART_ToolBarOverflowPanel\" WrapWidth=\"200\" KeyboardNavigation.DirectionalNavigation=\"Cycle\" KeyboardNavigation.TabNavigation=\"Cycle\"/>\r\n                                        </Border>\r\n                                    </Border>\r\n                                </Popup>\r\n                            </Grid>\r\n                            <Border Margin=\"0,0,11,0\" x:Name=\"MainPanelBorder\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"0,0,0,0\" Padding=\"{TemplateBinding Padding}\" >\r\n                                <Grid>\r\n                                    <Border x:Name=\"BackgroundNorm\" Background=\"{StaticResource grayGradient}\" BorderThickness=\"1\" BorderBrush=\"#FF8E8F8F\"/>\r\n                                    <DockPanel KeyboardNavigation.TabIndex=\"1\" KeyboardNavigation.TabNavigation=\"Local\">\r\n                                        <Thumb Padding=\"6,5,1,6\" Margin=\"-3,-1,0,0\" x:Name=\"ToolBarThumb\" Style=\"{StaticResource ToolBarThumbStyle}\" Width=\"10\"/>\r\n                                        <ContentPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" HorizontalAlignment=\"Center\" Margin=\"4,0,4,0\" x:Name=\"ToolBarHeader\" VerticalAlignment=\"Center\" ContentSource=\"Header\"/>\r\n                                        <Grid>\r\n                                            <Border x:Name=\"BackgroundNorm1\" Background=\"{StaticResource grayGradient}\" BorderThickness=\"0,1,0,1\" BorderBrush=\"#FF8E8F8F\"/>\r\n                                            <ToolBarPanel SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Margin=\"0,1,2,2\" x:Name=\"PART_ToolBarPanel\" IsItemsHost=\"true\" />\r\n                                        </Grid>\r\n                                    </DockPanel>\r\n                                </Grid>\r\n                            </Border>\r\n                        </Grid>\r\n                        <ControlTemplate.Triggers>\r\n                            <Trigger Property=\"IsOverflowOpen\" Value=\"true\">\r\n                                <Setter Property=\"IsEnabled\" TargetName=\"ToolBarThumb\" Value=\"false\"/>\r\n                            </Trigger>\r\n                            <Trigger Property=\"Header\" Value=\"{x:Null}\">\r\n                                <Setter Property=\"Visibility\" TargetName=\"ToolBarHeader\" Value=\"Collapsed\"/>\r\n                            </Trigger>\r\n                            <Trigger Property=\"ToolBarTray.IsLocked\" Value=\"true\">\r\n                                <Setter Property=\"Visibility\" TargetName=\"ToolBarThumb\" Value=\"Collapsed\"/>\r\n                            </Trigger>\r\n                            <Trigger Property=\"HasDropShadow\" SourceName=\"OverflowPopup\" Value=\"true\">\r\n                                <Setter Property=\"Margin\" TargetName=\"Shdw\" Value=\"0,0,5,5\"/>\r\n                                <Setter Property=\"SnapsToDevicePixels\" TargetName=\"Shdw\" Value=\"true\"/>\r\n                                <Setter Property=\"Background\" TargetName=\"Shdw\" Value=\"#71000000\"/>\r\n                            </Trigger>\r\n                            <Trigger Property=\"Orientation\" Value=\"Vertical\">\r\n                                <Setter Property=\"Margin\" TargetName=\"Grid\" Value=\"1,3,1,1\"/>\r\n                                <Setter Property=\"Style\" TargetName=\"OverflowButton\" Value=\"{StaticResource ToolBarVerticalOverflowButtonStyle}\"/>\r\n                                <Setter Property=\"Height\" TargetName=\"ToolBarThumb\" Value=\"10\"/>\r\n                                <Setter Property=\"Width\" TargetName=\"ToolBarThumb\" Value=\"Auto\"/>\r\n                                <Setter Property=\"Margin\" TargetName=\"ToolBarThumb\" Value=\"-1,-3,0,0\"/>\r\n                                <Setter Property=\"Padding\" TargetName=\"ToolBarThumb\" Value=\"5,6,6,1\"/>\r\n                                <Setter Property=\"Margin\" TargetName=\"ToolBarHeader\" Value=\"0,0,0,4\"/>\r\n                                <Setter Property=\"Margin\" TargetName=\"PART_ToolBarPanel\" Value=\"1,0,2,2\"/>\r\n                                <Setter Property=\"DockPanel.Dock\" TargetName=\"ToolBarThumb\" Value=\"Top\"/>\r\n                                <Setter Property=\"DockPanel.Dock\" TargetName=\"ToolBarHeader\" Value=\"Top\"/>\r\n                                <Setter Property=\"HorizontalAlignment\" TargetName=\"OverflowGrid\" Value=\"Stretch\"/>\r\n                                <Setter Property=\"VerticalAlignment\" TargetName=\"OverflowGrid\" Value=\"Bottom\"/>\r\n                                <Setter Property=\"Placement\" TargetName=\"OverflowPopup\" Value=\"Right\"/>\r\n                                <Setter Property=\"Margin\" TargetName=\"MainPanelBorder\" Value=\"0,0,0,11\"/>\r\n                                <Setter Property=\"Background\" Value=\"{StaticResource ToolBarVerticalBackground}\"/>\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                                <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\"/>\r\n                            </Trigger>\r\n                        </ControlTemplate.Triggers>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n            <Setter Property=\"Foreground\" Value=\"#FF000000\"/>\r\n        </Style>\r\n\r\n        <BorderGapMaskConverter x:Key=\"BorderGapMaskConverter\" />\r\n        <Style TargetType=\"{x:Type GroupBox}\">\r\n            <Setter Property=\"BorderBrush\" Value=\"#D5DFE5\" />\r\n            <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource OutsideFontColor}\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type GroupBox}\">\r\n                        <Grid SnapsToDevicePixels=\"true\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"6\" />\r\n                                <ColumnDefinition Width=\"Auto\" />\r\n                                <ColumnDefinition Width=\"*\" />\r\n                                <ColumnDefinition Width=\"6\" />\r\n                            </Grid.ColumnDefinitions>\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"Auto\" />\r\n                                <RowDefinition Height=\"Auto\" />\r\n                                <RowDefinition Height=\"*\" />\r\n                                <RowDefinition Height=\"6\" />\r\n                            </Grid.RowDefinitions>\r\n                            <Border Grid.ColumnSpan=\"4\" Grid.Row=\"1\" Grid.RowSpan=\"3\" BorderThickness=\"1,1,1,1\" CornerRadius=\"4\" >\r\n                                <Border.OpacityMask>\r\n                                    <MultiBinding Converter=\"{StaticResource BorderGapMaskConverter}\" ConverterParameter=\"7\">\r\n                                        <Binding Path=\"ActualWidth\" ElementName=\"Header\" />\r\n                                        <Binding Path=\"ActualWidth\" RelativeSource=\"{RelativeSource Self}\" />\r\n                                        <Binding Path=\"ActualHeight\" RelativeSource=\"{RelativeSource Self}\" />\r\n                                    </MultiBinding>\r\n                                </Border.OpacityMask>\r\n                            </Border>\r\n                            <Border Grid.Column=\"0\" Grid.ColumnSpan=\"4\" Grid.Row=\"1\" Grid.RowSpan=\"3\" Background=\"#FFFFFFFF\" BorderBrush=\"{StaticResource TextBoxNorm}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"3\" x:Name=\"ContentBorder\" />\r\n                            <!--<Border x:Name=\"DropDownBorder\" Background=\"#FFFFFFFF\" BorderBrush=\"{StaticResource TextBoxNorm}\" BorderThickness=\"1\" CornerRadius=\"1,1,3,3\"/>-->\r\n                            <Border x:Name=\"BackgroundNorm\" Background=\"{StaticResource grayGradient}\" BorderThickness=\"1\" BorderBrush=\"#FF8E8F8F\" CornerRadius=\"3,3,0,0\" Grid.ColumnSpan=\"4\" Grid.RowSpan=\"2\"/>\r\n\r\n                            <Border x:Name=\"Header\" Grid.Column=\"1\" Grid.Row=\"0\" Grid.RowSpan=\"2\" Padding=\"3,1,3,0\">\r\n                                <ContentPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" ContentSource=\"Header\" RecognizesAccessKey=\"True\" Margin=\"0,4,0,4\" />\r\n                            </Border>\r\n\r\n                            <ContentPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Margin=\"{TemplateBinding Padding}\" Grid.Column=\"1\" Grid.ColumnSpan=\"2\" Grid.Row=\"2\" />\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n            <Setter Property=\"Foreground\" Value=\"{DynamicResource OutsideFontColor}\"/>\r\n        </Style>\r\n        <Style x:Key=\"{x:Static GridView.GridViewScrollViewerStyleKey}\" TargetType=\"{x:Type ScrollViewer}\">\r\n            <Setter Property=\"Focusable\" Value=\"false\" />\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type ScrollViewer}\">\r\n                        <Grid SnapsToDevicePixels=\"true\" Background=\"{TemplateBinding Background}\">\r\n                            <Grid.ColumnDefinitions>\r\n                                <ColumnDefinition Width=\"*\" />\r\n                                <ColumnDefinition Width=\"Auto\" />\r\n                            </Grid.ColumnDefinitions>\r\n                            <Grid.RowDefinitions>\r\n                                <RowDefinition Height=\"*\" />\r\n                                <RowDefinition Height=\"Auto\" />\r\n                            </Grid.RowDefinitions>\r\n                            <DockPanel Margin=\"{TemplateBinding Padding}\">\r\n                                <ScrollViewer Focusable=\"false\" DockPanel.Dock=\"Top\" HorizontalScrollBarVisibility=\"Hidden\" VerticalScrollBarVisibility=\"Hidden\">\r\n                                    <GridViewHeaderRowPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Margin=\"2,0,2,0\" AllowsColumnReorder=\"{Binding Path=TemplatedParent.View.AllowsColumnReorder, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderContainerStyle=\"{Binding Path=TemplatedParent.View.ColumnHeaderContainerStyle, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderContextMenu=\"{Binding Path=TemplatedParent.View.ColumnHeaderContextMenu, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderTemplate=\"{Binding Path=TemplatedParent.View.ColumnHeaderTemplate, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderTemplateSelector=\"{Binding Path=TemplatedParent.View.ColumnHeaderTemplateSelector, RelativeSource={RelativeSource TemplatedParent}}\" ColumnHeaderToolTip=\"{Binding Path=TemplatedParent.View.ColumnHeaderToolTip, RelativeSource={RelativeSource TemplatedParent}}\" Columns=\"{Binding Path=TemplatedParent.View.Columns, RelativeSource={RelativeSource TemplatedParent}}\" />\r\n\r\n                                </ScrollViewer>\r\n                                <ScrollContentPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" x:Name=\"PART_ScrollContentPresenter\" Content=\"{TemplateBinding Content}\" ContentTemplate=\"{TemplateBinding ContentTemplate}\" CanContentScroll=\"{TemplateBinding CanContentScroll}\" KeyboardNavigation.DirectionalNavigation=\"Local\" />\r\n                            </DockPanel>\r\n                            <ScrollBar Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Cursor=\"Arrow\" x:Name=\"PART_HorizontalScrollBar\" Grid.Row=\"1\" Orientation=\"Horizontal\" ViewportSize=\"{TemplateBinding ViewportWidth}\" Maximum=\"{TemplateBinding ScrollableWidth}\" Minimum=\"0.0\" Value=\"{Binding Path=HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" />\r\n                            <ScrollBar Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Cursor=\"Arrow\" x:Name=\"PART_VerticalScrollBar\" Grid.Column=\"1\" Orientation=\"Vertical\" ViewportSize=\"{TemplateBinding ViewportHeight}\" Maximum=\"{TemplateBinding ScrollableHeight}\" Minimum=\"0.0\" Value=\"{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}\" />\r\n                            <DockPanel Grid.Column=\"1\" Grid.Row=\"1\" Background=\"{Binding Path=Background, ElementName=PART_VerticalScrollBar}\" LastChildFill=\"false\">\r\n                                <Rectangle Visibility=\"{TemplateBinding ComputedVerticalScrollBarVisibility}\" Width=\"1\" Fill=\"White\" DockPanel.Dock=\"Left\" />\r\n                                <Rectangle Visibility=\"{TemplateBinding ComputedHorizontalScrollBarVisibility}\" Height=\"1\" Fill=\"White\" DockPanel.Dock=\"Top\" />\r\n                            </DockPanel>\r\n                        </Grid>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n        <Style TargetType=\"{x:Type ListView}\">\r\n            <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource OutsideFontColor}\"/>\r\n            <Setter Property=\"ScrollViewer.HorizontalScrollBarVisibility\" Value=\"Auto\" />\r\n            <Setter Property=\"ScrollViewer.VerticalScrollBarVisibility\" Value=\"Auto\" />\r\n            <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"true\" />\r\n            <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n            <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n            <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n            <Setter Property=\"BorderBrush\" Value=\"{StaticResource btnPressStroke2}\"/>\r\n            <Setter Property=\"BorderThickness\" Value=\"1\"/>\r\n            <Setter Property=\"Padding\" Value=\"1\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type ListView}\">\r\n                        <Border BorderThickness=\"{TemplateBinding BorderThickness}\" Background=\"#FFFFFFFF\" BorderBrush=\"{TemplateBinding BorderBrush}\" CornerRadius=\"2\">\r\n\r\n                            <ScrollViewer Padding=\"{TemplateBinding Padding}\" Style=\"{DynamicResource {x:Static GridView.GridViewScrollViewerStyleKey}}\">\r\n                                <ItemsPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" />\r\n                            </ScrollViewer>\r\n                        </Border>\r\n\r\n                        <ControlTemplate.Triggers>\r\n                            <Trigger Property=\"IsGrouping\" Value=\"true\">\r\n                                <Setter Property=\"ScrollViewer.CanContentScroll\" Value=\"false\" />\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsEnabled\" Value=\"false\"/>\r\n                        </ControlTemplate.Triggers>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n        <Style x:Key=\"ListViewItemFocusVisual\">\r\n            <Setter Property=\"Control.Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate>\r\n                        <Rectangle Stroke=\"#8E6EA6F5\" StrokeThickness=\"1\" RadiusX=\"2\" RadiusY=\"2\" />\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <Style TargetType=\"{x:Type ListViewItem}\">\r\n            <Setter Property=\"FocusVisualStyle\" Value=\"{StaticResource ListViewItemFocusVisual}\" />\r\n            <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n            <Setter Property=\"Margin\" Value=\"0,0,0,1\" />\r\n            <Setter Property=\"Padding\" Value=\"5,2,5,2\" />\r\n            <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n            <Setter Property=\"HorizontalContentAlignment\" Value=\"Stretch\" />\r\n            <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n            <Setter Property=\"Foreground\" Value=\"{StaticResource OutsideFontColor}\"/>\r\n            <Setter Property=\"Padding\" Value=\"3\" />\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type ListViewItem}\">\r\n                        <ControlTemplate.Resources>\r\n                            <Storyboard x:Key=\"HoverOn\">\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundGradientOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0.73\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"HoverOff\">\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundGradientOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"SelectedOn\">\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundGradientSelected\" Storyboard.TargetProperty=\"Opacity\" To=\"0.84\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundGradientSelectedDisabled\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"SelectedOff\">\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundGradientSelected\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundGradientSelectedDisabled\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                            </Storyboard>\r\n                        </ControlTemplate.Resources>\r\n                        <Border SnapsToDevicePixels=\"true\" BorderBrush=\"{TemplateBinding BorderBrush}\" BorderThickness=\"{TemplateBinding BorderThickness}\" CornerRadius=\"2\" x:Name=\"border\">\r\n\r\n                            <Grid Margin=\"2,0,2,0\">\r\n                                <Rectangle x:Name=\"BackgroundGradientOver\" Fill=\"{StaticResource hoverGradient}\" Stroke=\"{StaticResource hoverStroke}\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\"/>\r\n                                <Rectangle x:Name=\"BackgroundGradientSelectedDisabled\" Fill=\"{StaticResource grayGradient}\" Stroke=\"#7F8E8F8F\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\"/>\r\n                                <Rectangle x:Name=\"BackgroundGradientSelected\" Fill=\"{StaticResource BtnOverFill}\" Stroke=\"{StaticResource selectedStroke}\" RadiusX=\"2\" RadiusY=\"2\" Opacity=\"0\"/>\r\n                                <Rectangle x:Name=\"BackgroundHighlight\" Margin=\"1\" Stroke=\"#A0FFFFFF\" RadiusX=\"1\" RadiusY=\"1\"/>\r\n                                <GridViewRowPresenter SnapsToDevicePixels=\"{TemplateBinding SnapsToDevicePixels}\" Margin=\"0,2,0,2\" VerticalAlignment=\"Stretch\" />\r\n                            </Grid>\r\n\r\n                        </Border>\r\n                        <ControlTemplate.Triggers>\r\n                            <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                                </Trigger.EnterActions>\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsSelected\" Value=\"true\">\r\n\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard x:Name=\"SelectedOff_BeginStoryboard\" Storyboard=\"{StaticResource SelectedOff}\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard x:Name=\"SelectedOn_BeginStoryboard\" Storyboard=\"{StaticResource SelectedOn}\"/>\r\n                                </Trigger.EnterActions>\r\n\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                                <Setter Property=\"Foreground\" Value=\"{DynamicResource DisabledForegroundBrush}\" />\r\n                                <Setter Property=\"Visibility\" TargetName=\"BackgroundGradientSelected\" Value=\"Hidden\"/>\r\n                            </Trigger>\r\n                            <MultiTrigger>\r\n                                <MultiTrigger.Conditions>\r\n                                    <Condition Property=\"IsSelected\" Value=\"true\" />\r\n                                    <Condition Property=\"Selector.IsSelectionActive\" Value=\"false\" />\r\n                                </MultiTrigger.Conditions>\r\n\r\n                            </MultiTrigger>\r\n\r\n                        </ControlTemplate.Triggers>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n\r\n        <Style x:Key=\"GridViewColumnHeaderGripper\" TargetType=\"{x:Type Thumb}\">\r\n            <Setter Property=\"Canvas.Right\" Value=\"-8.5\" />\r\n            <Setter Property=\"Width\" Value=\"18\" />\r\n            <Setter Property=\"Height\" Value=\"{Binding Path=ActualHeight, RelativeSource={RelativeSource TemplatedParent}}\" />\r\n            <Setter Property=\"Padding\" Value=\"0,3,0,4\" />\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type Thumb}\">\r\n                        <Border Padding=\"{TemplateBinding Padding}\" Background=\"#00FFFFFF\">\r\n                            <Rectangle HorizontalAlignment=\"Center\" Width=\"0.5\">\r\n                                <Rectangle.Fill>\r\n                                    <SolidColorBrush Color=\"{DynamicResource WhiteColor}\" />\r\n                                </Rectangle.Fill>\r\n                            </Rectangle>\r\n                        </Border>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n        <Style x:Key=\"{x:Type GridViewColumnHeader}\" TargetType=\"{x:Type GridViewColumnHeader}\">\r\n            <Setter Property=\"HorizontalContentAlignment\" Value=\"Center\" />\r\n            <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n            <Setter Property=\"Padding\" Value=\"2,0,2,0\" />\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type GridViewColumnHeader}\">\r\n                        <ControlTemplate.Resources>\r\n                            <Storyboard x:Key=\"HoverOn\">\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundOver\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundOver_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0.65\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"HoverOff\">\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundOver_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"PressedOn\">\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\" To=\"0.84\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgoundPressed_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0.65\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"PressedOff\">\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgoundPressed_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                            </Storyboard>\r\n                        </ControlTemplate.Resources>\r\n                        <Grid Margin=\"0,1,0,1\">\r\n                            <Grid>\r\n                                <Border x:Name=\"BackgroundNorm\" Background=\"{StaticResource grayGradient}\" BorderThickness=\"1\" BorderBrush=\"#FF8E8F8F\"/>\r\n                                <Border x:Name=\"BackgroundNorm_highlight\" Margin=\"1\" BorderBrush=\"#F2FFFFFF\" BorderThickness=\"1,0,1,1\" Opacity=\"0.65\"/>\r\n                                <Border x:Name=\"BackgroundOver\" Background=\"{StaticResource BtnOverFill}\" BorderBrush=\"{StaticResource TextBoxPressBrush}\" BorderThickness=\"1\" Opacity=\"0\"/>\r\n                                <Border x:Name=\"BackgroundOver_Highlight\" Margin=\"1\" Background=\"{StaticResource btnOverFillHighlight}\" BorderBrush=\"{StaticResource hoverStroke}\" BorderThickness=\"1,0,1,1\" Opacity=\"0\"/>\r\n                                <Border x:Name=\"BackgroundPressed\" Background=\"{StaticResource BtnPressFill}\" BorderBrush=\"{StaticResource btnPressBorder}\" BorderThickness=\"1\" Opacity=\"0\"/>\r\n                                <Border x:Name=\"BackgoundPressed_Highlight\" Background=\"{StaticResource btnPressFillHighlight}\" Margin=\"1\" Opacity=\"0\"/>\r\n                                <Border x:Name=\"Background_overlay\" Margin=\"1,1,1,0\" BorderThickness=\"1\">\r\n                                    <Border.Background>\r\n                                        <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                            <GradientStop Color=\"#00FFFFFF\" Offset=\"0\"/>\r\n                                            <GradientStop Color=\"#72FFFFFF\" Offset=\"0.157\"/>\r\n                                            <GradientStop Color=\"#72FFFFFF\" Offset=\"0.5\"/>\r\n                                            <GradientStop Color=\"#00FFFFFF\" Offset=\"0.51\"/>\r\n                                        </LinearGradientBrush>\r\n                                    </Border.Background>\r\n                                </Border>\r\n\r\n                                <ContentPresenter VerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\" HorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\" RecognizesAccessKey=\"True\" Margin=\"2,2,2,2\" />\r\n                                <Border x:Name=\"DisabledVisualElement\" Background=\"#FFF1F1F1\" BorderBrush=\"#FFB2B2B2\" BorderThickness=\"1\" CornerRadius=\"3\" IsHitTestVisible=\"false\" Opacity=\"0\"/>\r\n                            </Grid>\r\n                            <Canvas>\r\n                                <Thumb x:Name=\"PART_HeaderGripper\" Style=\"{StaticResource GridViewColumnHeaderGripper}\" HorizontalAlignment=\"Stretch\" />\r\n                            </Canvas>\r\n                        </Grid>\r\n                        <ControlTemplate.Triggers>\r\n                            <Trigger Property=\"IsMouseOver\" Value=\"true\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                                </Trigger.EnterActions>\r\n                                <Setter TargetName=\"PART_HeaderGripper\" Property=\"Background\" Value=\"Transparent\" />\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsPressed\" Value=\"true\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" x:Name=\"PressedOff_BeginStoryboard\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\" x:Name=\"PressedOn_BeginStoryboard\"/>\r\n                                </Trigger.EnterActions>\r\n                                <Setter TargetName=\"PART_HeaderGripper\" Property=\"Visibility\" Value=\"Hidden\" />\r\n                                <Setter Property=\"Background\" Value=\"SkyBlue\" />\r\n                            </Trigger>\r\n                            <Trigger Property=\"Height\" Value=\"Auto\">\r\n                                <Setter Property=\"MinHeight\" Value=\"20\" />\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                                <Setter Property=\"Foreground\" Value=\"{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}\" />\r\n                                <Setter Property=\"Opacity\" TargetName=\"DisabledVisualElement\" Value=\"0.4\"/>\r\n                            </Trigger>\r\n                            <Trigger Property=\"Role\" Value=\"Padding\">\r\n                                <Setter TargetName=\"PART_HeaderGripper\" Property=\"Visibility\" Value=\"Collapsed\" />\r\n                            </Trigger>\r\n                            <Trigger Property=\"Role\" Value=\"Floating\">\r\n                                <Setter TargetName=\"PART_HeaderGripper\" Property=\"Visibility\" Value=\"Collapsed\" />\r\n                                <Setter Property=\"Background\" Value=\"Yellow\" />\r\n                            </Trigger>\r\n                        </ControlTemplate.Triggers>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <Style TargetType=\"{x:Type ToggleButton}\">\r\n            <Setter Property=\"FocusVisualStyle\" Value=\"{StaticResource NuclearButtonFocusVisual}\" />\r\n            <Setter Property=\"BorderThickness\" Value=\"1\" />\r\n            <Setter Property=\"Foreground\" Value=\"{DynamicResource OutsideFontColor}\" />\r\n            <Setter Property=\"HorizontalContentAlignment\" Value=\"Center\" />\r\n            <Setter Property=\"VerticalContentAlignment\" Value=\"Center\" />\r\n            <Setter Property=\"Padding\" Value=\"1\" />\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"{x:Type ToggleButton}\">\r\n                        <ControlTemplate.Resources>\r\n                            <Storyboard x:Key=\"HoverOn\">\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundOver\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundOver_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0.65\"/>\r\n\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"HoverOff\">\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundOver\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundOver_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"CheckedOn\">\r\n                                <Storyboard>\r\n                                    <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgroundChecked\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                    <DoubleAnimation Duration=\"00:00:00.1000000\" Storyboard.TargetName=\"BackgoundChecked_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                </Storyboard>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"CheckedOff\">\r\n                                <Storyboard>\r\n                                    <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundChecked\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                    <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgoundChecked_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                </Storyboard>\r\n                            </Storyboard>\r\n\r\n                            <Storyboard x:Key=\"PressedOn\">\r\n                                <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                                <DoubleAnimation Duration=\"0\" Storyboard.TargetName=\"BackgoundPressed_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"1\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"PressedOff\">\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgroundPressed\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                                <DoubleAnimation Duration=\"00:00:00.4000000\" Storyboard.TargetName=\"BackgoundPressed_Highlight\" Storyboard.TargetProperty=\"Opacity\" To=\"0\"/>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"FocusedOn\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.1000000\" Value=\"1\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n                            <Storyboard x:Key=\"FocusedOff\">\r\n                                <DoubleAnimationUsingKeyFrames BeginTime=\"00:00:00\" Storyboard.TargetName=\"FocusVisualElement\" Storyboard.TargetProperty=\"(UIElement.Opacity)\">\r\n                                    <SplineDoubleKeyFrame KeyTime=\"00:00:00.3000000\" Value=\"0\"/>\r\n                                </DoubleAnimationUsingKeyFrames>\r\n                            </Storyboard>\r\n\r\n                        </ControlTemplate.Resources>\r\n                        <Grid x:Name=\"grid1\" >\r\n                            <Border x:Name=\"BackgroundNorm\" Background=\"{StaticResource grayGradient}\" BorderThickness=\"1\" BorderBrush=\"#FF8E8F8F\" CornerRadius=\"3\"/>\r\n                            <Border x:Name=\"BackgroundNorm_highlight\" Margin=\"1\" BorderBrush=\"#F2FFFFFF\" BorderThickness=\"1,0,1,1\" CornerRadius=\"3\" Opacity=\"0.65\"/>\r\n                            <Border x:Name=\"BackgroundChecked\" Background=\"{StaticResource BtnPressFill}\" BorderBrush=\"{StaticResource btnPressBorder}\" BorderThickness=\"1\" CornerRadius=\"3\" Opacity=\"0\"/>\r\n                            <Border x:Name=\"BackgoundChecked_Highlight\" Background=\"{StaticResource btnPressFillHighlight}\" Margin=\"1\" CornerRadius=\"2.5\" Opacity=\"0\"/>\r\n                            <Border x:Name=\"BackgroundOver\" Background=\"{StaticResource BtnOverFill}\" BorderBrush=\"{StaticResource TextBoxPressBrush}\" BorderThickness=\"1\" CornerRadius=\"3\" Opacity=\"0\"/>\r\n                            <Border x:Name=\"BackgroundOver_Highlight\" Margin=\"1\" Background=\"{StaticResource btnOverFillHighlight}\" BorderBrush=\"{StaticResource hoverStroke}\" BorderThickness=\"1,0,1,1\" CornerRadius=\"3\" Opacity=\"0\"/>\r\n                            <Border x:Name=\"BackgroundPressed\" Background=\"{StaticResource BtnPressFill}\" BorderBrush=\"{StaticResource btnPressBorder}\" BorderThickness=\"1\" CornerRadius=\"3\" Opacity=\"0\"/>\r\n                            <Border x:Name=\"BackgoundPressed_Highlight\" Background=\"{StaticResource btnPressFillHighlight}\" Margin=\"1\" CornerRadius=\"2.5\" Opacity=\"0\"/>\r\n                            <Border x:Name=\"Background_overlay\" Margin=\"1,0,1,0\" BorderThickness=\"1\" CornerRadius=\"3,3,0,0\">\r\n                                <Border.Background>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                        <GradientStop Color=\"#00FFFFFF\" Offset=\"0\"/>\r\n                                        <GradientStop Color=\"#72FFFFFF\" Offset=\"0.157\"/>\r\n                                        <GradientStop Color=\"#72FFFFFF\" Offset=\"0.5\"/>\r\n                                        <GradientStop Color=\"#00FFFFFF\" Offset=\"0.51\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Border.Background>\r\n                            </Border>\r\n                            <Border x:Name=\"DisabledVisualElement\" Background=\"#FFF1F1F1\" BorderBrush=\"#FFB2B2B2\" BorderThickness=\"1\" CornerRadius=\"3\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\"/>\r\n                            <ContentPresenter\r\n\t\t\t\t\t\t\t\tx:Name=\"contentPresenter\"\r\n\t\t\t\t\t\t\t\tContent=\"{TemplateBinding Content}\"\r\n\t\t\t\t\t\t\t\tContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n\t\t\t\t\t\t\t\tVerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n\t\t\t\t\t\t\t\tHorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n\t\t\t\t\t\t\t\tMargin=\"{TemplateBinding Padding}\"/>\r\n                            <TextBlock Panel.ZIndex=\"1\"\r\n                            \tx:Name=\"DisabledOverlay\"\r\n                            \tText=\"{TemplateBinding Content}\"\r\n                            \tForeground=\"#FF8E96A2\"\r\n                            \tHorizontalAlignment=\"{TemplateBinding HorizontalContentAlignment}\"\r\n                            \tVerticalAlignment=\"{TemplateBinding VerticalContentAlignment}\"\r\n\t\t\t\t\t\t\t\tMargin=\"{TemplateBinding Padding}\"\r\n                            \tVisibility=\"Collapsed\"/>\r\n                            <Border x:Name=\"FocusVisualElement\" Margin=\"1\" BorderBrush=\"{StaticResource btnFocus}\" BorderThickness=\"1\" CornerRadius=\"2\" IsHitTestVisible=\"false\" Visibility=\"Collapsed\"/>\r\n                        </Grid>\r\n\r\n                        <ControlTemplate.Triggers>\r\n                            <Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOff}\" x:Name=\"HoverOff_BeginStoryboard\"/>\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource HoverOn}\"/>\r\n                                </Trigger.EnterActions>\r\n\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsPressed\" Value=\"True\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource PressedOff}\" />\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource PressedOn}\"/>\r\n                                </Trigger.EnterActions>\r\n\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsKeyboardFocused\" Value=\"true\"/>\r\n                            <Trigger Property=\"IsChecked\" Value=\"true\">\r\n                                <Trigger.ExitActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource CheckedOff}\" />\r\n                                </Trigger.ExitActions>\r\n                                <Trigger.EnterActions>\r\n                                    <BeginStoryboard Storyboard=\"{StaticResource CheckedOn}\"/>\r\n                                </Trigger.EnterActions>\r\n\r\n                            </Trigger>\r\n                            <Trigger Property=\"IsEnabled\" Value=\"false\">\r\n                                <Setter Property=\"Foreground\" Value=\"#ADADAD\" />\r\n                                <Setter Property=\"Visibility\" TargetName=\"DisabledVisualElement\" Value=\"Visible\"/>\r\n                                <Setter Property=\"Visibility\" TargetName=\"DisabledOverlay\" Value=\"Visible\"/>\r\n                                <Setter Property=\"Visibility\" TargetName=\"contentPresenter\" Value=\"Collapsed\"/>\r\n                                <Setter Property=\"Opacity\" TargetName=\"DisabledVisualElement\" Value=\"1\"/>\r\n\r\n\r\n                            </Trigger>\r\n                        </ControlTemplate.Triggers>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n        <Style TargetType=\"ToolTip\">\r\n            <Setter Property=\"Foreground\" Value=\"#FF525552\"/>\r\n            <Setter Property=\"Padding\" Value=\"3,0,3,0\"/>\r\n            <Setter Property=\"Template\">\r\n                <Setter.Value>\r\n                    <ControlTemplate TargetType=\"ToolTip\">\r\n                        <Border x:Name=\"Root\">\r\n                            <Border BorderBrush=\"#FF737573\" BorderThickness=\"1\" CornerRadius=\"2\" Padding=\"4\">\r\n                                <Border.Resources>\r\n                                    <Storyboard x:Key=\"Visible State\"/>\r\n                                    <Storyboard x:Key=\"Normal State\"/>\r\n                                </Border.Resources>\r\n                                <Border.Background>\r\n                                    <LinearGradientBrush EndPoint=\"0.5,1\" StartPoint=\"0.5,0\">\r\n                                        <GradientStop Color=\"#FFFFFFFF\" Offset=\"0\"/>\r\n                                        <GradientStop Color=\"#FFE7E7F7\" Offset=\"1\"/>\r\n                                    </LinearGradientBrush>\r\n                                </Border.Background>\r\n                                <ContentPresenter\r\n\t                                Content=\"{TemplateBinding Content}\"\r\n\t                                ContentTemplate=\"{TemplateBinding ContentTemplate}\"\r\n\t                                Cursor=\"{TemplateBinding Cursor}\"\r\n\t                                Margin=\"{TemplateBinding Padding}\" />\r\n                            </Border>\r\n                        </Border>\r\n                    </ControlTemplate>\r\n                </Setter.Value>\r\n            </Setter>\r\n        </Style>\r\n\r\n    </ResourceDictionary>\r\n"
  },
  {
    "path": "WpfToolkit/WPFToolkit.sln",
    "content": "﻿\r\nMicrosoft Visual Studio Solution File, Format Version 12.00\r\n# Visual Studio Version 17\r\nVisualStudioVersion = 17.1.31911.260\r\nMinimumVisualStudioVersion = 10.0.40219.1\r\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"DotNetProjects.DataVisualization.Toolkit\", \"DataVisualization\\DotNetProjects.DataVisualization.Toolkit.csproj\", \"{066FB4E3-8F9C-42D0-9982-8B1F238FAF63}\"\r\nEndProject\r\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"WPFToolkitSamples\", \"Samples\\WPFToolkitSamples.csproj\", \"{50A16FB2-1BE3-4C26-94F5-EC0FEBC70C28}\"\r\nEndProject\r\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"DotNetProjects.Input.Toolkit\", \"Input\\DotNetProjects.Input.Toolkit.csproj\", \"{83E92AA1-85BC-4B5A-A126-CDCCF2C6E968}\"\r\nEndProject\r\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"DotNetProjects.Layout.Toolkit\", \"Layout\\DotNetProjects.Layout.Toolkit.csproj\", \"{82123C26-FFD4-455D-B5D9-78E72F465961}\"\r\nEndProject\r\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"DotNetProjects.WPF.Themes\", \"WPF.Themes\\DotNetProjects.WPF.Themes.csproj\", \"{CD3CD636-D63E-4BD5-9FE9-2B63DA6F0616}\"\r\nEndProject\r\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"ci\", \"ci\", \"{6D8DCDC8-C505-4208-A21E-B12A0395D1C1}\"\r\n\tProjectSection(SolutionItems) = preProject\r\n\t\t..\\appveyor.yml = ..\\appveyor.yml\r\n\tEndProjectSection\r\nEndProject\r\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"WpfTest\", \"WpfTest\\WpfTest.csproj\", \"{9456F323-C500-4BD1-86C7-9CD842320B16}\"\r\nEndProject\r\nGlobal\r\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\r\n\t\tDebug|Any CPU = Debug|Any CPU\r\n\t\tRelease with Code Analysis|Any CPU = Release with Code Analysis|Any CPU\r\n\t\tRelease|Any CPU = Release|Any CPU\r\n\tEndGlobalSection\r\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\r\n\t\t{066FB4E3-8F9C-42D0-9982-8B1F238FAF63}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{066FB4E3-8F9C-42D0-9982-8B1F238FAF63}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{066FB4E3-8F9C-42D0-9982-8B1F238FAF63}.Release with Code Analysis|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{066FB4E3-8F9C-42D0-9982-8B1F238FAF63}.Release with Code Analysis|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{066FB4E3-8F9C-42D0-9982-8B1F238FAF63}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{066FB4E3-8F9C-42D0-9982-8B1F238FAF63}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{50A16FB2-1BE3-4C26-94F5-EC0FEBC70C28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{50A16FB2-1BE3-4C26-94F5-EC0FEBC70C28}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{50A16FB2-1BE3-4C26-94F5-EC0FEBC70C28}.Release with Code Analysis|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{50A16FB2-1BE3-4C26-94F5-EC0FEBC70C28}.Release with Code Analysis|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{50A16FB2-1BE3-4C26-94F5-EC0FEBC70C28}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{50A16FB2-1BE3-4C26-94F5-EC0FEBC70C28}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{83E92AA1-85BC-4B5A-A126-CDCCF2C6E968}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{83E92AA1-85BC-4B5A-A126-CDCCF2C6E968}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{83E92AA1-85BC-4B5A-A126-CDCCF2C6E968}.Release with Code Analysis|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{83E92AA1-85BC-4B5A-A126-CDCCF2C6E968}.Release with Code Analysis|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{83E92AA1-85BC-4B5A-A126-CDCCF2C6E968}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{83E92AA1-85BC-4B5A-A126-CDCCF2C6E968}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{82123C26-FFD4-455D-B5D9-78E72F465961}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{82123C26-FFD4-455D-B5D9-78E72F465961}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{82123C26-FFD4-455D-B5D9-78E72F465961}.Release with Code Analysis|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{82123C26-FFD4-455D-B5D9-78E72F465961}.Release with Code Analysis|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{82123C26-FFD4-455D-B5D9-78E72F465961}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{82123C26-FFD4-455D-B5D9-78E72F465961}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{CD3CD636-D63E-4BD5-9FE9-2B63DA6F0616}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{CD3CD636-D63E-4BD5-9FE9-2B63DA6F0616}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{CD3CD636-D63E-4BD5-9FE9-2B63DA6F0616}.Release with Code Analysis|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{CD3CD636-D63E-4BD5-9FE9-2B63DA6F0616}.Release with Code Analysis|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{CD3CD636-D63E-4BD5-9FE9-2B63DA6F0616}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{CD3CD636-D63E-4BD5-9FE9-2B63DA6F0616}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{9456F323-C500-4BD1-86C7-9CD842320B16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r\n\t\t{9456F323-C500-4BD1-86C7-9CD842320B16}.Debug|Any CPU.Build.0 = Debug|Any CPU\r\n\t\t{9456F323-C500-4BD1-86C7-9CD842320B16}.Release with Code Analysis|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{9456F323-C500-4BD1-86C7-9CD842320B16}.Release with Code Analysis|Any CPU.Build.0 = Release|Any CPU\r\n\t\t{9456F323-C500-4BD1-86C7-9CD842320B16}.Release|Any CPU.ActiveCfg = Release|Any CPU\r\n\t\t{9456F323-C500-4BD1-86C7-9CD842320B16}.Release|Any CPU.Build.0 = Release|Any CPU\r\n\tEndGlobalSection\r\n\tGlobalSection(SolutionProperties) = preSolution\r\n\t\tHideSolutionNode = FALSE\r\n\tEndGlobalSection\r\n\tGlobalSection(ExtensibilityGlobals) = postSolution\r\n\t\tSolutionGuid = {C3470880-3D21-4697-8A10-EE5981C01579}\r\n\tEndGlobalSection\r\nEndGlobal\r\n"
  },
  {
    "path": "WpfToolkit/WpfTest/App.xaml",
    "content": "﻿<Application x:Class=\"WpfTest.App\"\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n    StartupUri=\"MainWindow.xaml\">\r\n</Application>\r\n"
  },
  {
    "path": "WpfToolkit/WpfTest/App.xaml.cs",
    "content": "﻿using System;\r\nusing System.Collections.Generic;\r\nusing System.Configuration;\r\nusing System.Data;\r\nusing System.Linq;\r\nusing System.Windows;\r\n\r\nnamespace WpfTest\r\n{\r\n    /// <summary>\r\n    /// Interaction logic for App.xaml\r\n    /// </summary>\r\n    public partial class App : Application\r\n    {\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/WpfTest/MainWindow.xaml",
    "content": "﻿<Window x:Class=\"WpfTest.MainWindow\"\r\n        xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n        xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\r\n        xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\r\n        xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\r\n        xmlns:local=\"clr-namespace:WpfTest\"\r\n        mc:Ignorable=\"d\"\r\n        xmlns:toolkit=\"clr-namespace:System.Windows.Controls;assembly=DotNetProjects.Input.Toolkit\"\r\n        Title=\"AutoCompleteBox in ListView\" Height=\"300\" Width=\"350\" WindowStartupLocation=\"CenterScreen\">\r\n\r\n    <!-- Required Template to show the names of the Items in the ItemsList -->\r\n    <Window.Resources>\r\n        <DataTemplate x:Key=\"AutoCompleteBoxItemTemplate\">\r\n            <StackPanel Orientation=\"Horizontal\" HorizontalAlignment=\"Center\" Background=\"Transparent\">\r\n                <Label Content=\"{Binding Name}\"/>\r\n            </StackPanel>\r\n        </DataTemplate>\r\n    </Window.Resources>\r\n\r\n    <StackPanel Margin=\"5\">\r\n        <StackPanel Orientation=\"Horizontal\" Margin=\"0 5 0 0\">\r\n            <StackPanel Width=\"{Binding ElementName=FirstColumnWidth, Path=ActualWidth}\">\r\n                <TextBlock Text=\"ACB binded to Cart.Item\"/>\r\n\r\n                <!-- ACB that binds correctly -->\r\n                <toolkit:AutoCompleteBox \r\n                                  ItemsSource=\"{Binding Path=ItemsList}\"\r\n                                   ValueMemberPath=\"Name\"\r\n                                   SelectedItem=\"{Binding Path=Cart.Item, Mode=TwoWay}\"\r\n                                   ItemTemplate=\"{StaticResource AutoCompleteBoxItemTemplate}\"/>\r\n            </StackPanel>\r\n\r\n            <StackPanel Margin=\"15 0 0 0\">\r\n                <TextBlock Text=\"Value of Cart.Item.Name\"/>\r\n                <TextBlock Text=\"{Binding Path=Cart.Item.Name}\"/>\r\n            </StackPanel>\r\n        </StackPanel>\r\n\r\n        <TextBlock Margin=\"0 30 0 0\" HorizontalAlignment=\"Center\" Text=\"ListView with CartsList as ItemsListSource\"/>\r\n        <ListView ItemsSource=\"{Binding CartsList}\">\r\n            <ListView.View>\r\n                <GridView>\r\n                    <GridViewColumn x:Name=\"FirstColumnWidth\">\r\n                        <GridViewColumn.Header>\r\n                            <TextBlock Text=\"ACB binded to each Cart.Item\"/>\r\n                        </GridViewColumn.Header>\r\n                        <GridViewColumn.CellTemplate>\r\n                            <DataTemplate>\r\n                                <!-- ACB that doesn't bind correctly -->\r\n                                <toolkit:AutoCompleteBox\r\n                                  ItemsSource=\"{\r\n                                        Binding RelativeSource={RelativeSource AncestorType=Window},\r\n                                        Path=DataContext.ItemsList}\"\r\n                                   ValueMemberPath=\"Name\"\r\n                                   SelectedItem=\"{Binding Path=Item, Mode=TwoWay}\"\r\n                                   ItemTemplate=\"{StaticResource AutoCompleteBoxItemTemplate}\"/>\r\n                            </DataTemplate>\r\n                        </GridViewColumn.CellTemplate>\r\n                    </GridViewColumn>\r\n\r\n                    <GridViewColumn >\r\n                        <GridViewColumn.Header>\r\n                            <TextBlock Text=\"Value of each Cart.Item.Name\"/>\r\n                        </GridViewColumn.Header>\r\n                        <GridViewColumn.CellTemplate>\r\n                            <DataTemplate>\r\n                                <TextBlock Text=\"{Binding Path=Item.Name}\"/>\r\n                            </DataTemplate>\r\n                        </GridViewColumn.CellTemplate>\r\n                    </GridViewColumn>\r\n                </GridView>\r\n            </ListView.View>\r\n        </ListView>\r\n    </StackPanel>\r\n</Window>\r\n"
  },
  {
    "path": "WpfToolkit/WpfTest/MainWindow.xaml.cs",
    "content": "﻿using System.Collections.ObjectModel;\r\nusing System.ComponentModel;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Windows;\r\n\r\nnamespace WpfTest\r\n{\r\n    public partial class MainWindow : Window, INotifyPropertyChanged\r\n    {\r\n        // INPC Implementation\r\n        public event PropertyChangedEventHandler PropertyChanged;\r\n        private void OnPropertyChanged([CallerMemberName] string propertyName = null)\r\n        {\r\n            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));\r\n        }\r\n\r\n        // The list that contains Items that will be chosen in a Cart\r\n        private ObservableCollection<Item> _ItemsList;\r\n        public ObservableCollection<Item> ItemsList\r\n        {\r\n            get => _ItemsList;\r\n            set\r\n            {\r\n                _ItemsList = value;\r\n                OnPropertyChanged();\r\n            }\r\n        }\r\n\r\n        // The list that contains Carts that will be shown in the ListView\r\n        private ObservableCollection<Cart> _CartsList;\r\n        public ObservableCollection<Cart> CartsList\r\n        {\r\n            get => _CartsList;\r\n            set\r\n            {\r\n                _CartsList = value;\r\n                OnPropertyChanged();\r\n            }\r\n        }\r\n\r\n        // A signle Cart\r\n        private Cart _Cart;\r\n        public Cart Cart\r\n        {\r\n            get => _Cart;\r\n            set\r\n            {\r\n                _Cart = value;\r\n                OnPropertyChanged();\r\n            }\r\n        }\r\n\r\n        public MainWindow()\r\n        {\r\n            DataContext = this;\r\n            InitializeComponent();\r\n\r\n            // Populating ItemsList\r\n            ItemsList = new ObservableCollection<Item>()\r\n            {\r\n                new Item(\"T-shirt\"), new Item(\"Jeans\"), new Item(\"Boots\"),\r\n            };\r\n\r\n            // Populating CartsList\r\n            CartsList = new ObservableCollection<Cart>()\r\n            {\r\n                new Cart(ItemsList[0]),\r\n                new Cart(ItemsList[2]),\r\n                new Cart(ItemsList[1]),\r\n                new Cart(ItemsList[0]),\r\n                new Cart(ItemsList[1]),\r\n            };\r\n\r\n            // Setting an Item to Cart\r\n            Cart = new Cart(ItemsList[2]);\r\n\r\n        }\r\n    }\r\n\r\n    // Cart Object\r\n    public class Cart\r\n    {\r\n        public Item Item { get; set; }\r\n\r\n        public Cart(Item item) => Item = item;\r\n    }\r\n\r\n    // Item Object\r\n    public class Item\r\n    {\r\n        // Important to be private set so it cannot be changed\r\n        public string Name { get; private set; }\r\n\r\n        public Item(string name) => Name = name;\r\n    }\r\n}\r\n"
  },
  {
    "path": "WpfToolkit/WpfTest/WpfTest.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk.WindowsDesktop\">\r\n    <PropertyGroup>\r\n        <OutputType>WinExe</OutputType>\r\n        <RootNamespace>System.Windows.Controls.Samples</RootNamespace>\r\n        <TargetFramework>net45</TargetFramework>\r\n        <UseWPF>true</UseWPF>\r\n        <ApplicationIcon />\r\n        <StartupObject />\r\n    </PropertyGroup>\r\n    <ItemGroup>\r\n        <ProjectReference Include=\"..\\Input\\DotNetProjects.Input.Toolkit.csproj\" />\r\n    </ItemGroup>\r\n</Project>\r\n"
  },
  {
    "path": "appveyor.yml",
    "content": "version: 6.1.{build}\r\n\r\ndotnet_csproj:\r\n  patch: true\r\n  file: '**\\*.csproj'\r\n  version: '{version}'\r\n  package_version: '{version}' \r\n  assembly_version: '{version}'\r\n  file_version: '{version}'\r\n  informational_version: '{version}'\r\n  \r\nbranches:\r\n  only:\r\n    - master\r\n\r\nimage: Visual Studio 2022\r\n\r\nconfiguration: Release\r\n\r\nbefore_build:\r\n  - nuget restore WpfToolkit\\WPFToolkit.sln\r\n\r\nbuild:\r\n  project: 'WpfToolkit\\WPFToolkit.sln'\r\n\r\ntest: off\r\n\r\nartifacts:\r\n  - path: '**\\bin\\$(configuration)\\net40\\DotNetProjects.*.dll'\r\n  - path: '**\\bin\\$(configuration)\\net40\\DotNetProjects.*.pdb'\r\n  - path: '**\\bin\\$(configuration)\\DotNetProjects.*.nupkg'\r\n\r\n#uncomment to publish to NuGet\r\ndeploy:\r\n  provider: NuGet\r\n  api_key:\r\n    secure: 88aMSx9ONm6ZEyZHiWughpXbF3QGPuYy7yjQxQSt69pDc89aKMBYm8KPOaCIUX9s\r\n  artifact: /.*\\.nupkg/\r\n"
  },
  {
    "path": "build.bat",
    "content": "\"C:\\Program Files (x86)\\MSBuild\\12.0\\Bin\\amd64\\msbuild.exe\" \"WpfToolkit\\WPFToolkit.sln\" /property:Configuration=Release;OutDir=..\\..\\bin\n\nrmdir /S /Q Package\\lib >nul 2>&1\nxcopy bin\\*.* Package\\lib\\net40 /E /I /R /Y\n\nTools\\NuGet\\NuGet.exe pack Package\\WpfToolkit.nuspec -OutputDirectory Package\n\npause"
  }
]